--- udev-079.orig/debian/compat +++ udev-079/debian/compat @@ -0,0 +1 @@ +4 --- udev-079.orig/debian/patches/80-extras-storage_enum.patch +++ udev-079/debian/patches/80-extras-storage_enum.patch @@ -0,0 +1,121 @@ +diff -ruNp udev-079~/extras/storage_enum.sh udev-079/extras/storage_enum.sh +--- udev-079~/extras/storage_enum.sh 1970-01-01 01:00:00.000000000 +0100 ++++ udev-079/extras/storage_enum.sh 2006-03-15 18:37:40.000000000 +0000 +@@ -0,0 +1,117 @@ ++#!/bin/sh -e ++# storage_enum - enumerated storage devices ++# ++# Copyright © 2005 Canonical Ltd. ++# Author: Scott James Remnant ++# ++# This program is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License as published by the ++# Free Software Foundation version 2 of the License. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License along ++# with this program; if not, write to the Free Software Foundation, Inc., ++# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++ ++ ++# Figure out what type of device we've been called for ++devname="$1" ++case "$devname" in ++ fd[0-9]*) ++ type=floppy ++ ;; ++ ++ sd[a-z]) ++ type=disk ++ ;; ++ ++ sd[a-z][0-9]*) ++ type=partition ++ name=part${devname##sd[a-z]} ++ disk=${devname%%[0-9]*} ++ ;; ++ ++ sr[0-9]*) ++ type=cdrom ++ ;; ++ ++ hd[a-z]) ++ type=$(/lib/udev/ide_media $PHYSDEVPATH) ++ ;; ++ ++ hd[a-z][0-9]*) ++ type=partition ++ name=part${devname##hd[a-z]} ++ disk=${devname%%[0-9]*} ++ ;; ++ ++ *) ++ exit 1 ++ ;; ++esac ++ ++ ++# Handle partitions, which don't need enumerating ++if [ "$type" = "partition" ]; then ++ subdir=$(sed -n -e "/^$disk /s/.* //p" /dev/.names) ++ echo "discs/$subdir/$name" ++ exit 0 ++fi ++ ++# Handle repeated calls to udevplug ++for symlink in $(udevinfo -q symlink -n $devname); do ++ case "$symlink" in ++ discs/disc[0-9]*/disc) ++ if [ "$type" = "disc" ]; then ++ echo "$symlink" ++ exit 0 ++ fi ++ ;; ++ cdroms/cdrom[0-9]*) ++ if [ "$type" = "cdrom" ]; then ++ echo "$symlink" ++ exit 0 ++ fi ++ ;; ++ floppy/[0-9]*) ++ if [ "$type" = "floppy" ]; then ++ echo "$symlink" ++ exit 0 ++ fi ++ ;; ++ esac ++done ++ ++ ++# Get the next number atomically, the only way we reliably can ++while ! mkdir /dev/.$type.lock 2>/dev/null; do ++ sleep 1 ++done ++if [ -e /dev/.$type.next ]; then ++ enum=$(cat /dev/.$type.next) ++else ++ enum=0 ++fi ++echo $(($enum + 1)) > /dev/.$type.next ++rmdir /dev/.$type.lock ++ ++ ++# Figure out the symlink name ++case "$type" in ++ disk) ++ echo "$devname disc$enum" >> /dev/.names ++ echo "discs/disc$enum/disc" ++ ;; ++ ++ cdrom) ++ echo "cdroms/cdrom$enum" ++ ;; ++ ++ floppy) ++ echo "floppy/$enum" ++ ;; ++esac --- udev-079.orig/debian/patches/01-lib-udev.patch +++ udev-079/debian/patches/01-lib-udev.patch @@ -0,0 +1,119 @@ +diff -ruNp udev-076~/extras/ata_id/Makefile udev-076/extras/ata_id/Makefile +--- udev-076~/extras/ata_id/Makefile 2005-11-22 16:34:55.000000000 +0000 ++++ udev-076/extras/ata_id/Makefile 2005-11-22 18:37:55.757581520 +0000 +@@ -48,11 +48,11 @@ clean: + .PHONY: clean + + install-bin: all +- $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG) ++ $(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) + .PHONY: install-bin + + uninstall-bin: +- - rm $(DESTDIR)$(sbindir)/$(PROG) ++ - rm $(DESTDIR)$(libudevdir)/$(PROG) + .PHONY: uninstall-bin + + install-man: +diff -ruNp udev-076~/extras/cdrom_id/Makefile udev-076/extras/cdrom_id/Makefile +--- udev-076~/extras/cdrom_id/Makefile 2005-11-22 16:34:55.000000000 +0000 ++++ udev-076/extras/cdrom_id/Makefile 2005-11-22 18:37:55.758581368 +0000 +@@ -48,11 +48,11 @@ clean: + .PHONY: clean + + install-bin: all +- $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG) ++ $(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) + .PHONY: install-bin + + uninstall-bin: +- - rm $(DESTDIR)$(sbindir)/$(PROG) ++ - rm $(DESTDIR)$(libudevdir)/$(PROG) + .PHONY: uninstall-bin + + install-man: +diff -ruNp udev-076~/extras/dasd_id/Makefile udev-076/extras/dasd_id/Makefile +--- udev-076~/extras/dasd_id/Makefile 2005-11-22 16:34:55.000000000 +0000 ++++ udev-076/extras/dasd_id/Makefile 2005-11-22 18:37:55.759581216 +0000 +@@ -48,11 +48,11 @@ clean: + .PHONY: clean + + install-bin: all +- $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG) ++ $(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) + .PHONY: install-bin + + uninstall-bin: +- - rm $(DESTDIR)$(sbindir)/$(PROG) ++ - rm $(DESTDIR)$(libudevdir)/$(PROG) + .PHONY: uninstall-bin + + install-man: +diff -ruNp udev-076~/extras/edd_id/Makefile udev-076/extras/edd_id/Makefile +--- udev-076~/extras/edd_id/Makefile 2005-11-22 16:34:55.000000000 +0000 ++++ udev-076/extras/edd_id/Makefile 2005-11-22 18:37:55.761580912 +0000 +@@ -48,11 +48,11 @@ clean: + .PHONY: clean + + install-bin: all +- $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG) ++ $(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) + .PHONY: install-bin + + uninstall-bin: +- - rm $(DESTDIR)$(sbindir)/$(PROG) ++ - rm $(DESTDIR)$(libudevdir)/$(PROG) + .PHONY: uninstall-bin + + install-man: +diff -ruNp udev-076~/extras/scsi_id/Makefile udev-076/extras/scsi_id/Makefile +--- udev-076~/extras/scsi_id/Makefile 2005-11-22 16:34:55.000000000 +0000 ++++ udev-076/extras/scsi_id/Makefile 2005-11-22 18:37:55.766580152 +0000 +@@ -67,11 +67,11 @@ clean: + .PHONY: clean + + install-bin: all +- $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG) ++ $(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) + .PHONY: install-bin + + uninstall-bin: +- - rm $(DESTDIR)$(sbindir)/$(PROG) ++ - rm $(DESTDIR)$(libudevdir)/$(PROG) + .PHONY: uninstall-bin + + install-man: +diff -ruNp udev-076~/extras/usb_id/Makefile udev-076/extras/usb_id/Makefile +--- udev-076~/extras/usb_id/Makefile 2005-11-22 16:34:55.000000000 +0000 ++++ udev-076/extras/usb_id/Makefile 2005-11-22 18:37:55.768579848 +0000 +@@ -48,11 +48,11 @@ clean: + .PHONY: clean + + install-bin: all +- $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG) ++ $(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) + .PHONY: install-bin + + uninstall-bin: +- - rm $(DESTDIR)$(sbindir)/$(PROG) ++ - rm $(DESTDIR)$(libudevdir)/$(PROG) + .PHONY: uninstall-bin + + install-man: +diff -ruNp udev-076~/extras/volume_id/Makefile udev-076/extras/volume_id/Makefile +--- udev-076~/extras/volume_id/Makefile 2005-11-22 16:34:55.000000000 +0000 ++++ udev-076/extras/volume_id/Makefile 2005-11-22 18:37:55.769579696 +0000 +@@ -51,11 +51,11 @@ clean: + .PHONY: clean + + install-bin: all +- $(INSTALL_PROGRAM) $(PROG) $(DESTDIR)$(sbindir)/$(PROG) ++ $(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) + .PHONY: install-bin + + uninstall-bin: +- - rm $(DESTDIR)$(sbindir)/$(PROG) ++ - rm $(DESTDIR)$(libudevdir)/$(PROG) + .PHONY: uninstall-bin + + install-man: --- udev-079.orig/debian/patches/50-result-whitespace.patch +++ udev-079/debian/patches/50-result-whitespace.patch @@ -0,0 +1,22 @@ +diff -ruNp udev-075~/udev_utils_string.c udev-075/udev_utils_string.c +--- udev-075~/udev_utils_string.c 2005-11-10 01:20:25.000000000 +0000 ++++ udev-075/udev_utils_string.c 2005-11-22 17:32:33.305884816 +0000 +@@ -245,10 +245,17 @@ int replace_untrusted_chars(char *str) + if ((str[i] >= '0' && str[i] <= '9') || + (str[i] >= 'A' && str[i] <= 'Z') || + (str[i] >= 'a' && str[i] <= 'z') || +- strchr(" #$%+-./:=?@_", str[i])) { ++ strchr("#$%+-./:=?@_", str[i])) { + i++; + continue; + } ++ /* whitespace replaced with ordinary space */ ++ if (isspace(str[i])) { ++ str[i] = ' '; ++ i++; ++ replaced++; ++ continue; ++ } + /* valid utf8 is accepted */ + len = utf8_encoded_valid_unichar(&str[i]); + if (len > 1) { --- udev-079.orig/debian/patches/80-extras-dvb_device_name.patch +++ udev-079/debian/patches/80-extras-dvb_device_name.patch @@ -0,0 +1,215 @@ +diff -ruNp udev-079~/extras/dvb_device_name/Makefile udev-079/extras/dvb_device_name/Makefile +--- udev-079~/extras/dvb_device_name/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ udev-079/extras/dvb_device_name/Makefile 2006-01-04 09:29:45.707393480 +0000 +@@ -0,0 +1,66 @@ ++# Copyright © 2005 Canonical Ltd. ++# Author: Scott James Remnant ++# ++# Released under the GNU General Public License, version 2. ++ ++PROG = dvb_device_name ++OBJ = ++HEADERS = ++GEN_HEADERS = ++MAN_PAGES = ++ ++prefix = ++etcdir = ${prefix}/etc ++sbindir = ${prefix}/sbin ++usrbindir = ${prefix}/usr/bin ++usrsbindir = ${prefix}/usr/sbin ++libudevdir = ${prefix}/lib/udev ++mandir = ${prefix}/usr/share/man ++configdir = ${etcdir}/udev/ ++ ++INSTALL = /usr/bin/install -c ++INSTALL_PROGRAM = ${INSTALL} ++INSTALL_DATA = ${INSTALL} -m 644 ++INSTALL_SCRIPT = ${INSTALL_PROGRAM} ++ ++all: $(PROG) $(MAN_PAGES) ++.PHONY: all ++.DEFAULT: all ++ ++%.o: %.c $(GEN_HEADERS) ++ $(QUIET) $(CC) -c $(CFLAGS) $< -o $@ ++ ++$(PROG): %: $(HEADERS) %.o $(OBJS) ++ $(QUIET) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS) ++ifneq ($(strip $(STRIPCMD)),) ++ $(QUIET) $(STRIPCMD) $@ ++endif ++ ++# man pages ++%.8: %.xml ++ xmlto man $? ++.PRECIOUS: %.8 ++ ++clean: ++ rm -f $(PROG) $(OBJS) $(GEN_HEADERS) ++.PHONY: clean ++ ++install-bin: all ++ $(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) ++.PHONY: install-bin ++ ++uninstall-bin: ++ - rm $(DESTDIR)$(libudevdir)/$(PROG) ++.PHONY: uninstall-bin ++ ++install-man: ++ $(INSTALL_DATA) -D $(PROG).8 $(DESTDIR)$(mandir)/man8/$(PROG).8 ++.PHONY: uninstall-man ++ ++uninstall-man: ++ -rm -f $(DESTDIR)$(mandir)/man8/$(PROG).8 ++.PHONY: uninstall-man ++ ++install-config: ++ @echo "no config file to install" ++.PHONY: install-config +diff -ruNp udev-079~/extras/dvb_device_name/dvb_device_name.8 udev-079/extras/dvb_device_name/dvb_device_name.8 +--- udev-079~/extras/dvb_device_name/dvb_device_name.8 1970-01-01 01:00:00.000000000 +0100 ++++ udev-079/extras/dvb_device_name/dvb_device_name.8 2006-01-04 09:29:45.708393328 +0000 +@@ -0,0 +1,28 @@ ++.TH DVB_DEVICE_NAME 8 "November 2005" "" "Linux Administrator's Manual" ++.SH NAME ++dvb_device_name \- udev callout to split kernel name for dvb devices ++.SH SYNOPSIS ++.BI dvb_device_name ++[\fI--export\fP] \fIdevicename\fP ++.SH DESCRIPTION ++.B dvb_device_name ++is normally called from a udev rule to split the kernel-assigned name for a ++device in the dvb_device subsystem into bus and device numbers. Udev can use ++this information to construct a name under /dev/dvb for the real device ++node. ++.SH USAGE ++.B dvb_device_name ++splits the kernel-assigned name specified on the command-line and prints the ++information chosen by the options. ++.SH OPTIONS ++The following command-line switches are supported to specify what ++dvb_device_name should print: ++.TP ++.BI --export ++print bus and device numbers as DVB_ADAPTER and DVB_DEV environment variables, ++for use with an IMPORT{program} rule. ++.RE ++.SH SEE ALSO ++.BR udev (8) ++.SH AUTHORS ++Scott James Remnant +diff -ruNp udev-079~/extras/dvb_device_name/dvb_device_name.c udev-079/extras/dvb_device_name/dvb_device_name.c +--- udev-079~/extras/dvb_device_name/dvb_device_name.c 1970-01-01 01:00:00.000000000 +0100 ++++ udev-079/extras/dvb_device_name/dvb_device_name.c 2006-01-04 09:32:19.544006760 +0000 +@@ -0,0 +1,109 @@ ++/* ++ * dvb_device_name - splits kernel name for dvb_device subsystem ++ * ++ * Copyright © 2006 Canonical Ltd. ++ * Author: Scott James Remnant ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation version 2 of the License. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include "../../logging.h" ++#include "../../udev_utils.h" ++ ++#ifdef USE_LOG ++void log_message(int priority, const char *format, ...) ++{ ++ va_list args; ++ static int udev_log = -1; ++ ++ if (udev_log == -1) { ++ const char *value; ++ ++ value = getenv("UDEV_LOG"); ++ if (value) ++ udev_log = log_priority(value); ++ else ++ udev_log = LOG_ERR; ++ } ++ ++ if (priority > udev_log) ++ return; ++ ++ va_start(args, format); ++ vsyslog(priority, format, args); ++ va_end(args); ++} ++#endif ++ ++int main(int argc, char *argv[]) ++{ ++ const char *name = NULL, *ptr; ++ int export = 0, ret = 0; ++ int i, bus, dev; ++ ++ logging_init("dvb_device_name"); ++ ++ for (i = 1; i < argc; i++) { ++ if (strcmp (argv[i], "--export") == 0) { ++ export = 1; ++ } else { ++ name = argv[i]; ++ } ++ } ++ ++ if (!name) { ++ err("no device name specified"); ++ ret = 1; ++ goto exit; ++ } ++ ++ if (strncmp(name, "dvb", 3) != 0) { ++ info("device not dvb_device"); ++ ret = 1; ++ goto exit; ++ } ++ ++ ptr = strchr(name, '.'); ++ if (!ptr) { ++ err("device name contains no device"); ++ ret = 1; ++ goto exit; ++ } ++ ++ name += 3; ++ bus = atoi(name); ++ ++ name = strdup(ptr + 1); ++ while (*ptr && !isdigit(*ptr)) ++ ptr++; ++ dev = atoi(ptr); ++ ++ if (export) { ++ printf("DVB_ADAPTER=%d\n", bus); ++ printf("DVB_NAME=%s\n", name); ++ printf("DVB_DEV=%d\n", dev); ++ } else { ++ printf("adapter%d %s\n", bus, name); ++ } ++ ++exit: ++ logging_close(); ++ return ret; ++} --- udev-079.orig/debian/patches/80-extras-pnp_modules.patch +++ udev-079/debian/patches/80-extras-pnp_modules.patch @@ -0,0 +1,211 @@ +diff -ruNp udev-076~/extras/pnp_modules/Makefile udev-076/extras/pnp_modules/Makefile +--- udev-076~/extras/pnp_modules/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ udev-076/extras/pnp_modules/Makefile 2005-12-01 01:15:52.315553750 +0000 +@@ -0,0 +1,66 @@ ++# Copyright © 2005 Canonical Ltd. ++# Author: Scott James Remnant ++# ++# Released under the GNU General Public License, version 2. ++ ++PROG = pnp_modules ++OBJ = ++HEADERS = ++GEN_HEADERS = ++MAN_PAGES = ++ ++prefix = ++etcdir = ${prefix}/etc ++sbindir = ${prefix}/sbin ++usrbindir = ${prefix}/usr/bin ++usrsbindir = ${prefix}/usr/sbin ++libudevdir = ${prefix}/lib/udev ++mandir = ${prefix}/usr/share/man ++configdir = ${etcdir}/udev/ ++ ++INSTALL = /usr/bin/install -c ++INSTALL_PROGRAM = ${INSTALL} ++INSTALL_DATA = ${INSTALL} -m 644 ++INSTALL_SCRIPT = ${INSTALL_PROGRAM} ++ ++all: $(PROG) $(MAN_PAGES) ++.PHONY: all ++.DEFAULT: all ++ ++%.o: %.c $(GEN_HEADERS) ++ $(QUIET) $(CC) -c $(CFLAGS) $< -o $@ ++ ++$(PROG): %: $(HEADERS) %.o $(OBJS) ++ $(QUIET) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS) ++ifneq ($(strip $(STRIPCMD)),) ++ $(QUIET) $(STRIPCMD) $@ ++endif ++ ++# man pages ++%.8: %.xml ++ xmlto man $? ++.PRECIOUS: %.8 ++ ++clean: ++ rm -f $(PROG) $(OBJS) $(GEN_HEADERS) ++.PHONY: clean ++ ++install-bin: all ++ $(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) ++.PHONY: install-bin ++ ++uninstall-bin: ++ - rm $(DESTDIR)$(libudevdir)/$(PROG) ++.PHONY: uninstall-bin ++ ++install-man: ++ $(INSTALL_DATA) -D $(PROG).8 $(DESTDIR)$(mandir)/man8/$(PROG).8 ++.PHONY: uninstall-man ++ ++uninstall-man: ++ -rm -f $(DESTDIR)$(mandir)/man8/$(PROG).8 ++.PHONY: uninstall-man ++ ++install-config: ++ @echo "no config file to install" ++.PHONY: install-config +diff -ruNp udev-076~/extras/pnp_modules/pnp_modules.8 udev-076/extras/pnp_modules/pnp_modules.8 +--- udev-076~/extras/pnp_modules/pnp_modules.8 1970-01-01 01:00:00.000000000 +0100 ++++ udev-076/extras/pnp_modules/pnp_modules.8 2005-12-01 01:15:52.315553750 +0000 +@@ -0,0 +1,22 @@ ++.TH PNP_MODULES 8 "November 2005" "" "Linux Administrator's Manual" ++.SH NAME ++pnp_modules \- udev callout to list modules for PNP devices ++.SH SYNOPSIS ++.BI pnp_modules ++\fIdevpath\fP ++.SH DESCRIPTION ++.B ide_media ++is normally called from a udev PROGRAM rule to list aliases that can be ++used to load modules for PNP devices. ++.SH USAGE ++.B pnp_modules ++takes a single argument which should be a path under /sys, if not given ++it uses the value of the ++.I DEVPATH ++environment variable instead. Outputs a list of modprobe aliases that ++can be used to load modules, e.g. with a RUN rule. ++.RE ++.SH SEE ALSO ++.BR udev (8) ++.SH AUTHORS ++Scott James Remnant +diff -ruNp udev-076~/extras/pnp_modules/pnp_modules.c udev-076/extras/pnp_modules/pnp_modules.c +--- udev-076~/extras/pnp_modules/pnp_modules.c 1970-01-01 01:00:00.000000000 +0100 ++++ udev-076/extras/pnp_modules/pnp_modules.c 2005-12-01 13:21:32.696657500 +0000 +@@ -0,0 +1,111 @@ ++/* ++ * pnp_modules - list modules for PNP devices ++ * ++ * Copyright © 2005 Canonical Ltd. ++ * Author: Scott James Remnant ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation version 2 of the License. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++ * ++ */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "../../logging.h" ++#include "../../udev_utils.h" ++#include "../../udev_libc_wrapper.h" ++ ++#ifdef USE_LOG ++void log_message(int priority, const char *format, ...) ++{ ++ va_list args; ++ static int udev_log = -1; ++ ++ if (udev_log == -1) { ++ const char *value; ++ ++ value = getenv("UDEV_LOG"); ++ if (value) ++ udev_log = log_priority(value); ++ else ++ udev_log = LOG_ERR; ++ } ++ ++ if (priority > udev_log) ++ return; ++ ++ va_start(args, format); ++ vsyslog(priority, format, args); ++ va_end(args); ++} ++#endif ++ ++int main(int argc, char *argv[]) ++{ ++ struct stat statbuf; ++ const char *devpath; ++ char filename[PATH_SIZE], line[256]; ++ FILE *fp; ++ int ret = 0; ++ ++ logging_init("pnp_modules"); ++ udev_init_config(); ++ ++ if (argc > 1) { ++ devpath = argv[1]; ++ } else { ++ devpath = getenv("DEVPATH"); ++ if (!devpath) { ++ err("no devpath specified and DEVPATH not set"); ++ ret = 1; ++ goto exit; ++ } ++ } ++ ++ strlcpy(filename, sysfs_path, sizeof(filename)); ++ strlcat(filename, devpath, sizeof(filename)); ++ ++ if (stat(filename, &statbuf) != 0) { ++ err("stat of '%s' failed", filename); ++ ret = 1; ++ goto exit; ++ } ++ ++ strlcat(filename, "/", sizeof(filename)); ++ strlcat(filename, "id", sizeof(filename)); ++ ++ fp = fopen(filename, "r"); ++ if (!fp) { ++ err("can't open '%s': %s", filename, strerror(errno)); ++ ret = 1; ++ goto exit; ++ } ++ ++ while (fgets(line, sizeof(line), fp)) { ++ remove_trailing_chars(line, '\n'); ++ printf("pnp:d%s\n", line); ++ } ++ ++ fclose(fp); ++exit: ++ logging_close(); ++ return ret; ++} --- udev-079.orig/debian/patches/80-extras-usb_device_name.patch +++ udev-079/debian/patches/80-extras-usb_device_name.patch @@ -0,0 +1,209 @@ +diff -ruNp udev-076~/extras/usb_device_name/Makefile udev-076/extras/usb_device_name/Makefile +--- udev-076~/extras/usb_device_name/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ udev-076/extras/usb_device_name/Makefile 2005-11-24 19:24:32.682074992 +0000 +@@ -0,0 +1,66 @@ ++# Copyright © 2005 Canonical Ltd. ++# Author: Scott James Remnant ++# ++# Released under the GNU General Public License, version 2. ++ ++PROG = usb_device_name ++OBJ = ++HEADERS = ++GEN_HEADERS = ++MAN_PAGES = ++ ++prefix = ++etcdir = ${prefix}/etc ++sbindir = ${prefix}/sbin ++usrbindir = ${prefix}/usr/bin ++usrsbindir = ${prefix}/usr/sbin ++libudevdir = ${prefix}/lib/udev ++mandir = ${prefix}/usr/share/man ++configdir = ${etcdir}/udev/ ++ ++INSTALL = /usr/bin/install -c ++INSTALL_PROGRAM = ${INSTALL} ++INSTALL_DATA = ${INSTALL} -m 644 ++INSTALL_SCRIPT = ${INSTALL_PROGRAM} ++ ++all: $(PROG) $(MAN_PAGES) ++.PHONY: all ++.DEFAULT: all ++ ++%.o: %.c $(GEN_HEADERS) ++ $(QUIET) $(CC) -c $(CFLAGS) $< -o $@ ++ ++$(PROG): %: $(HEADERS) %.o $(OBJS) ++ $(QUIET) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS) ++ifneq ($(strip $(STRIPCMD)),) ++ $(QUIET) $(STRIPCMD) $@ ++endif ++ ++# man pages ++%.8: %.xml ++ xmlto man $? ++.PRECIOUS: %.8 ++ ++clean: ++ rm -f $(PROG) $(OBJS) $(GEN_HEADERS) ++.PHONY: clean ++ ++install-bin: all ++ $(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) ++.PHONY: install-bin ++ ++uninstall-bin: ++ - rm $(DESTDIR)$(libudevdir)/$(PROG) ++.PHONY: uninstall-bin ++ ++install-man: ++ $(INSTALL_DATA) -D $(PROG).8 $(DESTDIR)$(mandir)/man8/$(PROG).8 ++.PHONY: uninstall-man ++ ++uninstall-man: ++ -rm -f $(DESTDIR)$(mandir)/man8/$(PROG).8 ++.PHONY: uninstall-man ++ ++install-config: ++ @echo "no config file to install" ++.PHONY: install-config +diff -ruNp udev-076~/extras/usb_device_name/usb_device_name.8 udev-076/extras/usb_device_name/usb_device_name.8 +--- udev-076~/extras/usb_device_name/usb_device_name.8 1970-01-01 01:00:00.000000000 +0100 ++++ udev-076/extras/usb_device_name/usb_device_name.8 2005-11-24 19:24:32.683074840 +0000 +@@ -0,0 +1,28 @@ ++.TH USB_DEVICE_NAME 8 "November 2005" "" "Linux Administrator's Manual" ++.SH NAME ++usb_device_name \- udev callout to split kernel name for usb devices ++.SH SYNOPSIS ++.BI usb_device_name ++[\fI--export\fP] \fIdevicename\fP ++.SH DESCRIPTION ++.B usb_device_name ++is normally called from a udev rule to split the kernel-assigned name for a ++device in the usb_device subsystem into bus and device numbers. Udev can use ++this information to construct a name under /dev/bus/usb for the real device ++node. ++.SH USAGE ++.B usb_device_name ++splits the kernel-assigned name specified on the command-line and prints the ++information chosen by the options. ++.SH OPTIONS ++The following command-line switches are supported to specify what ++usb_device_name should print: ++.TP ++.BI --export ++print bus and device numbers as USB_BUS and USB_DEV environment variables, ++for use with an IMPORT{program} rule. ++.RE ++.SH SEE ALSO ++.BR udev (8) ++.SH AUTHORS ++Scott James Remnant +diff -ruNp udev-076~/extras/usb_device_name/usb_device_name.c udev-076/extras/usb_device_name/usb_device_name.c +--- udev-076~/extras/usb_device_name/usb_device_name.c 1970-01-01 01:00:00.000000000 +0100 ++++ udev-076/extras/usb_device_name/usb_device_name.c 2005-11-24 20:02:54.252329500 +0000 +@@ -0,0 +1,103 @@ ++/* ++ * usb_device_name - splits kernel name for usb_device subsystem ++ * ++ * Copyright © 2005 Canonical Ltd. ++ * Author: Scott James Remnant ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation version 2 of the License. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++ * ++ */ ++ ++#include ++#include ++#include ++ ++#include "../../logging.h" ++#include "../../udev_utils.h" ++ ++#ifdef USE_LOG ++void log_message(int priority, const char *format, ...) ++{ ++ va_list args; ++ static int udev_log = -1; ++ ++ if (udev_log == -1) { ++ const char *value; ++ ++ value = getenv("UDEV_LOG"); ++ if (value) ++ udev_log = log_priority(value); ++ else ++ udev_log = LOG_ERR; ++ } ++ ++ if (priority > udev_log) ++ return; ++ ++ va_start(args, format); ++ vsyslog(priority, format, args); ++ va_end(args); ++} ++#endif ++ ++int main(int argc, char *argv[]) ++{ ++ const char *name = NULL, *ptr; ++ int export = 0, ret = 0; ++ int i, bus, dev; ++ ++ logging_init("usb_device_name"); ++ ++ for (i = 1; i < argc; i++) { ++ if (strcmp(argv[i], "--export") == 0) { ++ export = 1; ++ } else { ++ name = argv[i]; ++ } ++ } ++ ++ if (!name) { ++ err("no device name specified"); ++ ret = 1; ++ goto exit; ++ } ++ ++ if (strncmp(name, "usbdev", 6) != 0) { ++ info("device not usb_device"); ++ ret = 1; ++ goto exit; ++ } ++ ++ ptr = strchr(name, '.'); ++ if (!ptr) { ++ err("device name contains no device"); ++ ret = 1; ++ goto exit; ++ } ++ ++ name += 6; ++ bus = atoi(name); ++ dev = atoi(ptr + 1); ++ ++ if (export) { ++ printf("USB_BUS=%03d\n", bus); ++ printf("USB_DEV=%03d\n", dev); ++ } else { ++ printf("%03d.%03d\n", bus, dev); ++ } ++ ++exit: ++ logging_close(); ++ return ret; ++} --- udev-079.orig/debian/patches/80-extras-vio_type.patch +++ udev-079/debian/patches/80-extras-vio_type.patch @@ -0,0 +1,272 @@ +diff -ruNp udev-076~/extras/vio_type/Makefile udev-076/extras/vio_type/Makefile +--- udev-076~/extras/vio_type/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ udev-076/extras/vio_type/Makefile 2005-12-01 01:15:52.387558250 +0000 +@@ -0,0 +1,66 @@ ++# Copyright © 2005 Canonical Ltd. ++# Author: Scott James Remnant ++# ++# Released under the GNU General Public License, version 2. ++ ++PROG = vio_type ++OBJ = ++HEADERS = ++GEN_HEADERS = ++MAN_PAGES = ++ ++prefix = ++etcdir = ${prefix}/etc ++sbindir = ${prefix}/sbin ++usrbindir = ${prefix}/usr/bin ++usrsbindir = ${prefix}/usr/sbin ++libudevdir = ${prefix}/lib/udev ++mandir = ${prefix}/usr/share/man ++configdir = ${etcdir}/udev/ ++ ++INSTALL = /usr/bin/install -c ++INSTALL_PROGRAM = ${INSTALL} ++INSTALL_DATA = ${INSTALL} -m 644 ++INSTALL_SCRIPT = ${INSTALL_PROGRAM} ++ ++all: $(PROG) $(MAN_PAGES) ++.PHONY: all ++.DEFAULT: all ++ ++%.o: %.c $(GEN_HEADERS) ++ $(QUIET) $(CC) -c $(CFLAGS) $< -o $@ ++ ++$(PROG): %: $(HEADERS) %.o $(OBJS) ++ $(QUIET) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS) ++ifneq ($(strip $(STRIPCMD)),) ++ $(QUIET) $(STRIPCMD) $@ ++endif ++ ++# man pages ++%.8: %.xml ++ xmlto man $? ++.PRECIOUS: %.8 ++ ++clean: ++ rm -f $(PROG) $(OBJS) $(GEN_HEADERS) ++.PHONY: clean ++ ++install-bin: all ++ $(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) ++.PHONY: install-bin ++ ++uninstall-bin: ++ - rm $(DESTDIR)$(libudevdir)/$(PROG) ++.PHONY: uninstall-bin ++ ++install-man: ++ $(INSTALL_DATA) -D $(PROG).8 $(DESTDIR)$(mandir)/man8/$(PROG).8 ++.PHONY: uninstall-man ++ ++uninstall-man: ++ -rm -f $(DESTDIR)$(mandir)/man8/$(PROG).8 ++.PHONY: uninstall-man ++ ++install-config: ++ @echo "no config file to install" ++.PHONY: install-config +diff -ruNp udev-076~/extras/vio_type/vio_type.8 udev-076/extras/vio_type/vio_type.8 +--- udev-076~/extras/vio_type/vio_type.8 1970-01-01 01:00:00.000000000 +0100 ++++ udev-076/extras/vio_type/vio_type.8 2005-12-01 01:15:52.387558250 +0000 +@@ -0,0 +1,29 @@ ++.TH VIO_TYPE 8 "November 2005" "" "Linux Administrator's Manual" ++.SH NAME ++vio_type \- udev callout to identify type of VIO device ++.SH SYNOPSIS ++.BI vio_type ++[\fI--export\fP] \fIdevpath\fP ++.SH DESCRIPTION ++.B vio_type ++is normally called from a udev rule to identify the type of a VIO ++device. Udev can use this information to assign appropriate permissions to ++the device or load an appropriate module. ++.SH USAGE ++.B vio_type ++takes a path under /sys, if not given it uses the value of the ++.I DEVPATH ++environment variable instead. It then prints the information chosen by the ++options. ++.SH OPTIONS ++The following command-line switches are supported to specify what ++vio_type should print: ++.TP ++.BI --export ++print device type as VIO_TYPE environment variable for use with an ++IMPORT{program} rule. ++.RE ++.SH SEE ALSO ++.BR udev (8) ++.SH AUTHORS ++Scott James Remnant +diff -ruNp udev-076~/extras/vio_type/vio_type.c udev-076/extras/vio_type/vio_type.c +--- udev-076~/extras/vio_type/vio_type.c 1970-01-01 01:00:00.000000000 +0100 ++++ udev-076/extras/vio_type/vio_type.c 2005-12-01 01:15:52.387558250 +0000 +@@ -0,0 +1,165 @@ ++/* ++ * vio-type - identify type of a VIO device ++ * ++ * Copyright © 2005 Canonical Ltd. ++ * Author: Scott James Remnant ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation version 2 of the License. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++ * ++ */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "../../logging.h" ++#include "../../udev_utils.h" ++#include "../../udev_libc_wrapper.h" ++ ++#ifdef USE_LOG ++void log_message(int priority, const char *format, ...) ++{ ++ va_list args; ++ static int udev_log = -1; ++ ++ if (udev_log == -1) { ++ const char *value; ++ ++ value = getenv("UDEV_LOG"); ++ if (value) ++ udev_log = log_priority(value); ++ else ++ udev_log = LOG_ERR; ++ } ++ ++ if (priority > udev_log) ++ return; ++ ++ va_start(args, format); ++ vsyslog(priority, format, args); ++ va_end(args); ++} ++#endif ++ ++int main(int argc, char *argv[]) ++{ ++ struct stat buf; ++ const char *devpath = NULL; ++ char filename[PATH_SIZE], devspec[256], devtype[256]; ++ int ret = 0, export = 0; ++ int i, fd, len; ++ ++ logging_init("ide_media"); ++ ++ for (i = 1; i < argc; i++) { ++ if (strcmp(argv[i], "--export") == 0) { ++ export = 1; ++ } else { ++ devpath = argv[i]; ++ } ++ } ++ ++ if (!devpath) { ++ devpath = getenv("DEVPATH"); ++ if (!devpath) { ++ err("no devpath specified and DEVPATH not set"); ++ ret = 1; ++ goto exit; ++ } ++ } ++ ++ strlcpy(filename, sysfs_path, sizeof(filename)); ++ strlcat(filename, devpath, sizeof(filename)); ++ ++ if (stat(filename, &buf) != 0) { ++ err("stat of '%s' failed", filename); ++ ret = 1; ++ goto exit; ++ } ++ ++ strlcat(filename, "/", sizeof(filename)); ++ strlcat(filename, "devspec", sizeof(filename)); ++ ++ fd = open(filename, O_RDONLY); ++ if (!fd) { ++ err("unable to open '%s'", filename); ++ ret = 1; ++ goto exit; ++ } ++ ++ len = read(fd, devspec, sizeof(devspec)); ++ if (len <= 0) { ++ err("unable to read from '%s'", filename); ++ ret = 1; ++ goto close; ++ } ++ ++ devspec[len] = '\0'; ++ if (devspec[len-1] == '\n') ++ devspec[len-1] = '\0'; ++ ++ close(fd); ++ ++ ++ /* now we look in /proc */ ++ ++ strlcpy(filename, "/proc/device-tree", sizeof(filename)); ++ strlcat(filename, devspec, sizeof(filename)); ++ strlcat(filename, "/", sizeof(filename)); ++ strlcat(filename, "device_type", sizeof(filename)); ++ ++ /* hang around for /proc to catch up */ ++ for (i = 100; i; i--) { ++ if (stat(filename, &buf) == 0) ++ break; ++ ++ usleep(30000); ++ } ++ ++ fd = open(filename, O_RDONLY); ++ if (!fd) { ++ err("unable to open '%s'", filename); ++ ret = 1; ++ goto exit; ++ } ++ ++ len = read(fd, devtype, sizeof(devtype)); ++ if (len <= 0) { ++ err("unable to read from '%s'", filename); ++ ret = 1; ++ goto close; ++ } ++ ++ devtype[len] = '\0'; ++ if (devtype[len-1] == '\n') ++ devtype[len-1] = '\0'; ++ ++ if (export) { ++ printf("VIO_TYPE=%s\n", devtype); ++ } else { ++ printf("%s\n", devtype); ++ } ++ ++close: ++ close(fd); ++exit: ++ logging_close(); ++ return ret; ++} --- udev-079.orig/debian/patches/80-extras-ide_media.patch +++ udev-079/debian/patches/80-extras-ide_media.patch @@ -0,0 +1,268 @@ +diff -ruNp udev-079~/extras/ide_media/Makefile udev-079/extras/ide_media/Makefile +--- udev-079~/extras/ide_media/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ udev-079/extras/ide_media/Makefile 2006-03-01 14:33:06.002776968 +0100 +@@ -0,0 +1,66 @@ ++# Copyright © 2005 Canonical Ltd. ++# Author: Scott James Remnant ++# ++# Released under the GNU General Public License, version 2. ++ ++PROG = ide_media ++OBJ = ++HEADERS = ++GEN_HEADERS = ++MAN_PAGES = ++ ++prefix = ++etcdir = ${prefix}/etc ++sbindir = ${prefix}/sbin ++usrbindir = ${prefix}/usr/bin ++usrsbindir = ${prefix}/usr/sbin ++libudevdir = ${prefix}/lib/udev ++mandir = ${prefix}/usr/share/man ++configdir = ${etcdir}/udev/ ++ ++INSTALL = /usr/bin/install -c ++INSTALL_PROGRAM = ${INSTALL} ++INSTALL_DATA = ${INSTALL} -m 644 ++INSTALL_SCRIPT = ${INSTALL_PROGRAM} ++ ++all: $(PROG) $(MAN_PAGES) ++.PHONY: all ++.DEFAULT: all ++ ++%.o: %.c $(GEN_HEADERS) ++ $(QUIET) $(CC) -c $(CFLAGS) $< -o $@ ++ ++$(PROG): %: $(HEADERS) %.o $(OBJS) ++ $(QUIET) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS) ++ifneq ($(strip $(STRIPCMD)),) ++ $(QUIET) $(STRIPCMD) $@ ++endif ++ ++# man pages ++%.8: %.xml ++ xmlto man $? ++.PRECIOUS: %.8 ++ ++clean: ++ rm -f $(PROG) $(OBJS) $(GEN_HEADERS) ++.PHONY: clean ++ ++install-bin: all ++ $(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) ++.PHONY: install-bin ++ ++uninstall-bin: ++ - rm $(DESTDIR)$(libudevdir)/$(PROG) ++.PHONY: uninstall-bin ++ ++install-man: ++ $(INSTALL_DATA) -D $(PROG).8 $(DESTDIR)$(mandir)/man8/$(PROG).8 ++.PHONY: uninstall-man ++ ++uninstall-man: ++ -rm -f $(DESTDIR)$(mandir)/man8/$(PROG).8 ++.PHONY: uninstall-man ++ ++install-config: ++ @echo "no config file to install" ++.PHONY: install-config +diff -ruNp udev-079~/extras/ide_media/ide_media.8 udev-079/extras/ide_media/ide_media.8 +--- udev-079~/extras/ide_media/ide_media.8 1970-01-01 01:00:00.000000000 +0100 ++++ udev-079/extras/ide_media/ide_media.8 2006-03-01 14:33:06.019774384 +0100 +@@ -0,0 +1,29 @@ ++.TH IDE_MEDIA 8 "November 2005" "" "Linux Administrator's Manual" ++.SH NAME ++ide_media \- udev callout to identify media of IDE device ++.SH SYNOPSIS ++.BI ide_media ++[\fI--export\fP] \fIdevpath\fP ++.SH DESCRIPTION ++.B ide_media ++is normally called from a udev rule to identify the media type of an IDE ++device. Udev can use this information to assign appropriate permissions to ++the device or load an appropriate module. ++.SH USAGE ++.B ide_media ++takes a path under /sys, if not given it uses the value of the ++.I DEVPATH ++environment variable instead. It then prints the information chosen by the ++options. ++.SH OPTIONS ++The following command-line switches are supported to specify what ++ide_media should print: ++.TP ++.BI --export ++print media type as IDE_MEDIA environment variable for use with an ++IMPORT{program} rule. ++.RE ++.SH SEE ALSO ++.BR udev (8) ++.SH AUTHORS ++Scott James Remnant +diff -ruNp udev-079~/extras/ide_media/ide_media.c udev-079/extras/ide_media/ide_media.c +--- udev-079~/extras/ide_media/ide_media.c 1970-01-01 01:00:00.000000000 +0100 ++++ udev-079/extras/ide_media/ide_media.c 2006-03-02 13:36:14.662699608 +0100 +@@ -0,0 +1,161 @@ ++/* ++ * ide_media - identify media type of an IDE device ++ * ++ * Copyright © 2005 Canonical Ltd. ++ * Author: Scott James Remnant ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation version 2 of the License. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++ * ++ */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "../../logging.h" ++#include "../../udev_utils.h" ++#include "../../udev_libc_wrapper.h" ++ ++#ifdef USE_LOG ++void log_message(int priority, const char *format, ...) ++{ ++ va_list args; ++ static int udev_log = -1; ++ ++ if (udev_log == -1) { ++ const char *value; ++ ++ value = getenv("UDEV_LOG"); ++ if (value) ++ udev_log = log_priority(value); ++ else ++ udev_log = LOG_ERR; ++ } ++ ++ if (priority > udev_log) ++ return; ++ ++ va_start(args, format); ++ vsyslog(priority, format, args); ++ va_end(args); ++} ++#endif ++ ++int main(int argc, char *argv[]) ++{ ++ struct stat buf; ++ const char *devpath = NULL, *name, *ptr; ++ char filename[PATH_SIZE], media[256]; ++ int ret = 0, export = 0; ++ int host, drive, dev; ++ int i, fd, len; ++ ++ logging_init("ide_media"); ++ ++ for (i = 1; i < argc; i++) { ++ if (strcmp(argv[i], "--export") == 0) { ++ export = 1; ++ } else { ++ devpath = argv[i]; ++ } ++ } ++ ++ if (!devpath) { ++ devpath = getenv("DEVPATH"); ++ if (!devpath) { ++ err("no devpath specified and DEVPATH not set"); ++ ret = 1; ++ goto exit; ++ } ++ } ++ ++ name = strstr(devpath, "/ide"); ++ if (name) ++ name = strchr(name + 1, '/'); ++ if (!name) { ++ info("devpath is not ide device"); ++ ret = 1; ++ goto exit; ++ } ++ ++ ptr = strchr(name, '.'); ++ if (!ptr) { ++ err("device name contains no drive"); ++ ret = 1; ++ goto exit; ++ } ++ ++ name += 1; ++ host = atoi(name); ++ drive = atoi(ptr + 1); ++ ++ /* evil, evil, evil */ ++ dev = drive + host * 2; ++ if (dev >= 26) { ++ err("ide device %d out of range", dev); ++ ret = 1; ++ goto exit; ++ } ++ ++ snprintf(filename, sizeof(filename), "/proc/ide/ide%d/hd%c/media", ++ host, dev + 'a'); ++ filename[sizeof(filename)-1] = '\0'; ++ ++ /* hang around for /proc to catch up */ ++ for (i = 100; i; i--) { ++ if (stat(filename, &buf) == 0) ++ break; ++ ++ usleep(30000); ++ } ++ ++ fd = open(filename, O_RDONLY); ++ if (!fd) { ++ err("unable to open '%s'", filename); ++ ret = 1; ++ goto exit; ++ } ++ ++ len = read(fd, media, sizeof(media)); ++ if (len <= 0) { ++ err("unable to read from '%s'", filename); ++ ret = 1; ++ goto close; ++ } ++ ++ media[len] = '\0'; ++ if (media[len-1] == '\n') ++ media[len-1] = '\0'; ++ ++ if (export) { ++ printf("IDE_HOST=%d\n", host); ++ printf("IDE_DRIVE=%d\n", drive); ++ printf("IDE_DEVICE=hd%x\n", dev); ++ printf("IDE_MEDIA=%s\n", media); ++ } else { ++ printf("%s\n", media); ++ } ++ ++close: ++ close(fd); ++exit: ++ logging_close(); ++ return ret; ++} --- udev-079.orig/debian/patches/60-firmware-hunt.patch +++ udev-079/debian/patches/60-firmware-hunt.patch @@ -0,0 +1,121 @@ +diff -ruNp udev-076~/extras/firmware/firmware_helper.c udev-076/extras/firmware/firmware_helper.c +--- udev-076~/extras/firmware/firmware_helper.c 2005-11-22 16:34:55.000000000 +0000 ++++ udev-076/extras/firmware/firmware_helper.c 2005-11-23 14:16:31.533149568 +0000 +@@ -16,11 +16,11 @@ + #include + #include + #include ++#include + + #include "../../udev_utils.h" + #include "../../logging.h" + +-#define FIRMWARE_PATH "/lib/firmware" + #define PATH_SIZE 256 + + #ifdef USE_LOG +@@ -74,10 +74,12 @@ int main(int argc, char **argv) { + char *devpath, *firmware, *action, *driver; + char fw_path[PATH_SIZE]; + char data_path[PATH_SIZE]; ++ struct utsname utsbuf; + int fw_fd; + char *fw_buffer; + size_t fw_buffer_size; + size_t count; ++ int i, loaded = 0; + int rc = 0; + + logging_init("firmware_helper"); +@@ -93,42 +95,67 @@ int main(int argc, char **argv) { + exit(1); + } + ++ if (uname(&utsbuf)) { ++ err("unable to get kernel version"); ++ exit(1); ++ } ++ + dbg("try to load firmware '%s' for '%s'", firmware, devpath); + set_loading(devpath, 1); + +- snprintf(fw_path, sizeof(fw_path), "%s/%s", FIRMWARE_PATH, firmware); +- fw_path[sizeof(fw_path)-1] = '\0'; +- if (file_map(fw_path, &fw_buffer, &fw_buffer_size) != 0 || fw_buffer_size == 0) { +- err("could not load firmware '%s' for '%s'", fw_path, devpath); +- fw_buffer = NULL; +- goto out_err; +- } +- +- snprintf(data_path, sizeof(data_path), "/sys/%s/data", devpath); +- data_path[sizeof(data_path)-1] = '\0'; +- fw_fd = open(data_path, O_RDWR); +- if (fw_fd < 0) { +- rc = errno; +- goto out_err; +- } ++ for (i = 0; i < 2; i++) { ++ switch (i) { ++ case 0: /* /lib/firmware/$VERSION/$FIRMWARE */ ++ snprintf(fw_path, sizeof(fw_path), ++ "/lib/firmware/%s/%s", utsbuf.release, ++ firmware); ++ break; ++ case 1: /* /lib/firmware/$FIRMWARE */ ++ snprintf(fw_path, sizeof(fw_path), ++ "/lib/firmware/%s", firmware); ++ break; ++ } ++ fw_path[sizeof(fw_path)-1] = '\0'; + +- count = 0; +- while (count < fw_buffer_size) { +- ssize_t c; ++ dbg("looking for firmware at '%s'", fw_path); ++ if (file_map(fw_path, &fw_buffer, &fw_buffer_size) != 0 || fw_buffer_size == 0) { ++ fw_buffer = NULL; ++ continue; ++ } + +- c = write(fw_fd, fw_buffer+count, fw_buffer_size-count); +- if (c <= 0) { ++ dbg("firmware found"); ++ snprintf(data_path, sizeof(data_path), "/sys/%s/data", devpath); ++ data_path[sizeof(data_path)-1] = '\0'; ++ fw_fd = open(data_path, O_RDWR); ++ if (fw_fd < 0) { + rc = errno; +- close(fw_fd); + goto out_err; + } +- count += c; ++ ++ count = 0; ++ while (count < fw_buffer_size) { ++ ssize_t c; ++ ++ c = write(fw_fd, fw_buffer+count, fw_buffer_size-count); ++ if (c <= 0) { ++ rc = errno; ++ close(fw_fd); ++ goto out_err; ++ } ++ count += c; ++ } ++ ++ close(fw_fd); ++ file_unmap(fw_buffer, fw_buffer_size); ++ loaded = 1; + } + +- close(fw_fd); +- file_unmap(fw_buffer, fw_buffer_size); ++ if (!loaded) ++ goto out_err; ++ + set_loading(devpath, 0); + info("loaded '%s' for device '%s'", fw_path, devpath); ++ + logging_close(); + return 0; + --- udev-079.orig/debian/patches/40-udevplug.patch +++ udev-079/debian/patches/40-udevplug.patch @@ -0,0 +1,772 @@ +diff -ruNp udev-079~/Makefile udev-079/Makefile +--- udev-079~/Makefile 2006-01-04 09:57:24.442227456 +0000 ++++ udev-079/Makefile 2006-01-04 09:47:08.679837568 +0000 +@@ -54,7 +54,8 @@ PROGRAMS = \ + udevmonitor \ + udevinfo \ + udevtest \ +- udevstart ++ udevstart \ ++ udevplug + + HEADERS = \ + udev.h \ +@@ -88,9 +89,11 @@ MAN_PAGES = \ + udevsend.8 \ + udevtest.8 \ + udevinfo.8 \ +- udevstart.8 ++ udevstart.8 \ ++ udevplug.8 + + SYSFS_OBJS = \ ++ libsysfs/sysfs_bus.o \ + libsysfs/sysfs_class.o \ + libsysfs/sysfs_device.o \ + libsysfs/sysfs_dir.o \ +@@ -298,6 +301,7 @@ install-man: + $(INSTALL_DATA) -D udevd.8 $(DESTDIR)$(mandir)/man8/udevd.8 + $(INSTALL_DATA) -D udevsend.8 $(DESTDIR)$(mandir)/man8/udevsend.8 + $(INSTALL_DATA) -D udevmonitor.8 $(DESTDIR)$(mandir)/man8/udevmonitor.8 ++ $(INSTALL_DATA) -D udevplug.8 $(DESTDIR)$(mandir)/man8/udevplug.8 + - ln -f -s udevd.8 $(DESTDIR)$(mandir)/man8/udevcontrol.8 + @extras="$(EXTRAS)"; for target in $$extras; do \ + echo $$target; \ +@@ -314,6 +318,7 @@ uninstall-man: + - rm -f $(DESTDIR)$(mandir)/man8/udevmonitor.8 + - rm -f $(DESTDIR)$(mandir)/man8/udevsend.8 + - rm -f $(DESTDIR)$(mandir)/man8/udevcontrol.8 ++ - rm -f $(DESTDIR)$(mandir)/man8/udevplug.8 + @extras="$(EXTRAS)"; for target in $$extras; do \ + echo $$target; \ + $(MAKE) -C $$target $@ || exit 1; \ +@@ -330,6 +335,7 @@ install-bin: + $(INSTALL_PROGRAM) -D udevinfo $(DESTDIR)$(usrbindir)/udevinfo + $(INSTALL_PROGRAM) -D udevtest $(DESTDIR)$(usrbindir)/udevtest + $(INSTALL_PROGRAM) -D udevstart $(DESTDIR)$(sbindir)/udevstart ++ $(INSTALL_PROGRAM) -D udevplug $(DESTDIR)$(sbindir)/udevplug + @extras="$(EXTRAS)"; for target in $$extras; do \ + echo $$target; \ + $(MAKE) -C $$target $@ || exit 1; \ +@@ -350,6 +356,7 @@ uninstall-bin: + - rm -f $(DESTDIR)$(usrsbindir)/udevmonitor + - rm -f $(usrbindir)/udevinfo + - rm -f $(DESTDIR)$(DESTDIR)$(usrbindir)/udevtest ++ - rm -f $(DESTDIR)$(sbindir)/udevplug + ifndef DESTDIR + - killall udevd + - rm -rf /dev/.udev +diff -ruNp udev-079~/udevplug.8 udev-079/udevplug.8 +--- udev-079~/udevplug.8 1970-01-01 01:00:00.000000000 +0100 ++++ udev-079/udevplug.8 2006-01-04 09:58:53.977616008 +0000 +@@ -0,0 +1,87 @@ ++.TH "UDEVPLUG" "8" "January 2006" "udev" "udevplug" ++.SH NAME ++udevplug \- device cold-plugging tool ++.SH SYNOPSIS ++.B udevplug ++[\fB-I\fR\fIattr\fR=\fIvalue\fR]... [\fB-X\fR\fIattr\fR=\fIvalue\fR]... ++[\fB-b\fR] [\fB-c\fR] [\fB-B\fR\fIbus\fR]... [\fB-C\fR\fIclass\fR]... ++[\fB-F\fR] [\fB-s\fR] [\fB-v\fR] [\fIdevpath\fR]... ++ ++.B udevplug -W ++.\" ++.SH DESCRIPTION ++.B udevplug ++is a tool to ease the cold-plugging of system devices. It examines sysfs ++for devices already present on the system, for which the events may have ++been missed, and writes to the uevent attribute to cause the kernel to ++replay the event. It does not process the events themselves, ++.BR udevd (8) ++should be run before calling this tool to do that. ++ ++Both before and after requesting the events, it waits for the ++.BR udevd (8) ++event queue to be empty. This provides some synchrony and prevents most ++but not all, race conditions. ++.\" ++.SH USAGE ++When called without any arguments ++.B udevplug ++replays the events for all currently connected devices on the system. Options ++can be given to alter this list, limiting it to devices on a particular bus, ++in a particular class or those with or without specified attributes. ++ ++Any non-option arguments given should be paths to individual devices that ++need to be replayed, instead of all connected devices. ++.SH OPTIONS ++All options are accumulative and may be specified multiple times. ++.TP ++.BI -I attr\fR=\fIvalue ++only events for those devices for which the \fIattr\fR attribute matches ++\fIvalue\fR are replayed. \fIvalue\fR may include wildcards and globbing, ++as with the ++.BR udev (8) ++configuration file format. ++.TP ++.BI -X attr\fR=\fIvalue ++only events for those devices for which the \fIattr\fR attribute DOES NOT ++MATCH \fIvalue\fR are replayed. \fIvalue\fR may include wildcards and ++globbing, as with the ++.BR udev (8) ++configuration file format. ++.TP ++.BI -b ++events for all block devices are replayed. ++.TP ++.BI -c ++events for all class devices are replayed. ++.TP ++.BI -B bus ++only events for those devices on the \fIbus\fR bus are replayed. ++.TP ++.BI -C class ++only events for those devices in the \fIclass\fR class are replayed. ++.TP ++.BI -F ++causes events for devices that have previously failed to be replayed. When ++combined with the \fB-B\fR or \fB-C\fR options it acts as a union, rather ++than an exclusion, e.g. all \fIpci\fR devices and anything previously failed ++will be replayed. ++.TP ++.BI -s ++plugs each device in serial, waiting afterwards for the event to complete ++before moving on to the next device. ++.TP ++.BI -v ++prints the sysfs path of each device being plugged. ++.TP ++.BI -W ++causes udev to simply wait for the ++.BR udevd (8) ++queue to empty, exiting immediately if there is nothing in the queue. This ++can not be used in combination with other arguments. ++.RE ++.SH SEE ALSO ++.BR udev (8) ++.BR udevd (8) ++.SH AUTHORS ++Scott James Remnant +diff -ruNp udev-079~/udevplug.c udev-079/udevplug.c +--- udev-079~/udevplug.c 1970-01-01 01:00:00.000000000 +0100 ++++ udev-079/udevplug.c 2006-01-04 10:09:56.795852320 +0000 +@@ -0,0 +1,619 @@ ++/* ++ * udevplug.c - device cold-plugging tool ++ * ++ * Copyright © 2006 Canonical Ltd. ++ * Author: Scott James Remnant ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation version 2 of the License. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++ * ++ */ ++ ++#include ++#include ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "libsysfs/sysfs/libsysfs.h" ++#include "list.h" ++#include "udev.h" ++#include "udevd.h" ++#include "udev_utils.h" ++#include "udev_version.h" ++#include "udev_libc_wrapper.h" ++ ++#include "logging.h" ++ ++ ++/* plug devices in serial */ ++static int serial_plug = 0; ++ ++/* print the nodes we visit */ ++static int verbose = 0; ++ ++ ++/* need to wait for devices */ ++static int need_wait = 0; ++ ++ ++#ifdef USE_LOG ++void log_message(int priority, const char *format, ...) ++{ ++ va_list args; ++ ++ if (priority > udev_log_priority) ++ return; ++ ++ va_start(args, format); ++ vsyslog(priority, format, args); ++ va_end(args); ++} ++#endif ++ ++ ++/* make the queue directory after waiting for it to go away ++ * (provides some kind of synchrony to the process) */ ++static int make_queue(void) ++{ ++ char queue[PATH_SIZE]; ++ int first = 1; ++ ++ strlcpy(queue, udev_root, sizeof(queue)); ++ strlcat(queue, "/", sizeof(queue)); ++ strlcat(queue, EVENT_QUEUE_DIR, sizeof(queue)); ++ ++ dbg("directory: '%s'", queue); ++ ++ if (create_path(queue)) { ++ err("unable to create %s: %s", queue, strerror(errno)); ++ return 1; ++ } ++ ++ while (mkdir(queue, 0755)) { ++ if (errno != EEXIST) { ++ err("unable to create %s: %s", queue, strerror(errno)); ++ return 1; ++ } ++ ++ if (first) { ++ dbg("waiting for queue to become empty first"); ++ first = 0; ++ } ++ ++ usleep(10000); ++ } ++ ++ need_wait = 1; ++ return 0; ++} ++ ++/* wait for the queue directory to go away */ ++static void wait_for_queue(void) ++{ ++ struct stat statbuf; ++ char queue[PATH_SIZE]; ++ ++ strlcpy(queue, udev_root, sizeof(queue)); ++ strlcat(queue, "/", sizeof(queue)); ++ strlcat(queue, EVENT_QUEUE_DIR, sizeof(queue)); ++ ++ dbg("directory: '%s'", queue); ++ ++ for (;;) { ++ if (stat(queue, &statbuf)) { ++ if (errno != ENOENT) ++ err("unable to stat %s: %s", queue, ++ strerror(errno)); ++ break; ++ } ++ ++ usleep(10000); ++ } ++ ++ need_wait = 0; ++} ++ ++ ++struct device { ++ struct list_head node; ++ struct sysfs_device *dev; ++}; ++ ++struct filter { ++ struct list_head node; ++ char name[NAME_SIZE]; ++ char value[VALUE_SIZE]; ++ int include; ++}; ++ ++/* insert the devpaths in lexical order */ ++static int device_list_insert(struct sysfs_device *device, struct list_head *device_list) ++{ ++ struct device *loop_device; ++ struct device *new_device; ++ ++ dbg("insert: '%s'", device->path); ++ ++ list_for_each_entry(loop_device, device_list, node) { ++ if (strcmp(loop_device->dev->path, device->path) > 0) ++ break; ++ } ++ ++ new_device = malloc(sizeof(struct device)); ++ if (new_device == NULL) { ++ dbg("error malloc"); ++ return -ENOMEM; ++ } ++ ++ new_device->dev = device; ++ list_add_tail(&new_device->node, &loop_device->node); ++ return 0; ++} ++ ++/* append the filter to the list */ ++static int filter_list_insert(int include, const char *filter, struct list_head *filter_list) ++{ ++ struct filter *new_filter; ++ const char *ptr; ++ ++ dbg("insert: '%s'", filter); ++ ++ new_filter = malloc(sizeof(struct filter)); ++ if (!new_filter) { ++ dbg("error malloc"); ++ return -ENOMEM; ++ } ++ new_filter->include = include; ++ ++ ptr = strchr(filter, '='); ++ if (ptr) { ++ if ((size_t)(ptr + 1 - filter) > sizeof(new_filter->name)) { ++ err("attribute name too long in filter %s", filter); ++ free(new_filter); ++ return 1; ++ } ++ memcpy(new_filter->name, filter, ptr - filter); ++ new_filter->name[ptr - filter] = '\0'; ++ ++ strlcpy(new_filter->value, ptr + 1, sizeof(new_filter->value)); ++ } else { ++ strlcpy(new_filter->name, filter, sizeof(new_filter->name)); ++ strlcpy(new_filter->value, "?*", sizeof(new_filter->value)); ++ } ++ ++ list_add_tail(&new_filter->node, filter_list); ++ dbg("add %s filter '%s' value '%s'", ++ new_filter->include ? "include" : "exclude", ++ new_filter->name, new_filter->value); ++ return 0; ++} ++ ++/* touch up a device to load the uevent */ ++static int tickle(struct sysfs_device *device) ++{ ++ static const char message[] = "poke"; ++ char uevent[PATH_SIZE]; ++ int fd; ++ ++ strlcpy(uevent, device->path, sizeof(uevent)); ++ strlcat(uevent, "/uevent", sizeof(uevent)); ++ ++ dbg("uevent: '%s'", uevent); ++ ++ if (!need_wait) ++ make_queue(); ++ ++ if (verbose) ++ printf("%s\n", device->path); ++ ++ fd = open(uevent, O_WRONLY); ++ if (fd < 0) { ++ err("unable to open uevent '%s': %s", uevent, ++ strerror(errno)); ++ return 1; ++ } ++ ++ write(fd, message, sizeof(message)); ++ close(fd); ++ ++ if (serial_plug) ++ wait_for_queue(); ++ ++ return 0; ++} ++ ++/* filter the device list and run any left */ ++static void exec_list(struct list_head *device_list, struct list_head *filter_list) ++{ ++ struct filter *loop_filter; ++ struct device *loop_device; ++ ++ list_for_each_entry(loop_device, device_list, node) { ++ struct sysfs_device *device = loop_device->dev; ++ ++ list_for_each_entry(loop_filter, filter_list, node) { ++ struct sysfs_attribute *attr; ++ char value[256]; ++ int i; ++ ++ attr = sysfs_get_device_attr(device, loop_filter->name); ++ if (!attr) { ++ if (loop_filter->include) ++ goto next; ++ ++ continue; ++ } ++ ++ i = strlcpy(value, attr->value, sizeof(value)); ++ while (i > 0 && isspace(value[i-1])) ++ value[--i] = '\0'; ++ ++ if (strcmp_pattern(loop_filter->value, value) == 0) { ++ dbg("device '%s' attr '%s' matched filter '%s' <-> '%s'", ++ device->path, attr->name, value, loop_filter->value); ++ ++ if (!loop_filter->include) ++ goto next; ++ } else { ++ if (loop_filter->include) ++ goto next; ++ } ++ } ++ ++ tickle(device); ++ ++ next: ++ ; ++ } ++} ++ ++ ++/* add a single device by path */ ++static int add_device(const char *path, struct list_head *device_list) ++{ ++ struct sysfs_device *device; ++ ++ dbg("add: '%s'", path); ++ ++ device = sysfs_open_device_path(path); ++ if (!device) { ++ err("unable to open device '%s'", path); ++ return 1; ++ } ++ ++ device_list_insert(device, device_list); ++ return 0; ++} ++ ++/* test whether something is probably a device */ ++static int has_uevent(const char *path) ++{ ++ struct stat statbuf; ++ char uevent[PATH_SIZE]; ++ ++ strlcpy(uevent, path, sizeof(uevent)); ++ strlcat(uevent, "/uevent", sizeof(uevent)); ++ ++ if (lstat(uevent, &statbuf)) { ++ if (errno != ENOENT) ++ err("error checking for uevent '%s': %s", uevent, ++ strerror(errno)); ++ ++ return 0; ++ } ++ ++ return 1; ++} ++ ++static int recurse_subtree(const char *path, struct list_head *device_list, int follow_links); ++ ++/* visit an entry, adding the device and recursing the subtree beneath it */ ++static int visit_entry(const char *path, struct list_head *device_list, int follow_links) ++{ ++ char subpath[PATH_SIZE]; ++ struct stat statbuf; ++ ++ if (lstat(path, &statbuf)) { ++ err("error stat '%s': %s", path, strerror(errno)); ++ return 1; ++ } ++ ++ strlcpy(subpath, path, sizeof(subpath)); ++ if (S_ISLNK(statbuf.st_mode) && follow_links) { ++ char linkpath[PATH_SIZE]; ++ char *lptr; ++ int len; ++ ++ len = readlink(path, linkpath, sizeof(linkpath)); ++ if (len <= 0) { ++ err("unable to readlink '%s': %s", path, strerror(errno)); ++ return 1; ++ } ++ linkpath[len] = '\0'; ++ dbg("link is '%s'", linkpath); ++ ++ lptr = linkpath; ++ for (;;) { ++ char *ptr; ++ ++ ptr = strrchr(subpath, '/'); ++ if (ptr) ++ *ptr = '\0'; ++ else ++ subpath[0] = '\0'; ++ ++ if (!*lptr || strncmp(lptr, "../", 3)) ++ break; ++ lptr += 3; ++ } ++ strlcat(subpath, "/", sizeof(subpath)); ++ strlcat(subpath, lptr, sizeof(subpath)); ++ dbg("link points to '%s'", subpath); ++ ++ follow_links = 0; ++ ++ } else if (S_ISDIR(statbuf.st_mode)) { ++ dbg("subdir '%s'", subpath); ++ if (follow_links) ++ follow_links--; ++ ++ } else { ++ return 1; ++ } ++ ++ if (has_uevent(subpath)) ++ add_device(subpath, device_list); ++ ++ return recurse_subtree(subpath, device_list, follow_links); ++} ++ ++/* recurse a tree adding anything that looks like a device */ ++static int recurse_subtree(const char *path, struct list_head *device_list, int follow_links) ++{ ++ struct dirent *dent; ++ DIR *dp; ++ ++ dbg("tree: '%s'", path); ++ dp = opendir(path); ++ if (!dp) { ++ info("unable to open tree: '%s': %s", path, strerror(errno)); ++ return 1; ++ } ++ ++ while ((dent = readdir(dp))) { ++ char subpath[PATH_SIZE]; ++ ++ if (dent->d_name[0] == '.') ++ continue; ++ ++ snprintf(subpath, sizeof(subpath), "%s/%s", path, dent->d_name); ++ visit_entry(subpath, device_list, follow_links); ++ } ++ ++ closedir(dp); ++ ++ return 0; ++} ++ ++/* recurse a tree adding anything that looks like a device */ ++static int recurse_tree(const char *path, struct list_head *device_list) ++{ ++ char tmppath[PATH_SIZE]; ++ const char *syspath; ++ ++ if (strncmp(path, sysfs_path, strlen(sysfs_path)) != 0) { ++ strlcpy(tmppath, sysfs_path, sizeof(tmppath)); ++ if (path[0] != '/') ++ strlcat(tmppath, "/", sizeof(tmppath)); ++ strlcat(tmppath, path, sizeof(tmppath)); ++ syspath = tmppath; ++ } else { ++ syspath = path; ++ } ++ ++ dbg("recurse: '%s'", syspath); ++ return visit_entry(syspath, device_list, 1); ++} ++ ++ ++/* scan the given bus for all devices */ ++static int scan_bus(const char *name, struct list_head *device_list) ++{ ++ char path[PATH_SIZE]; ++ ++ strlcpy(path, sysfs_path, sizeof(path)); ++ strlcat(path, "/bus/", sizeof(path)); ++ strlcat(path, name, sizeof(path)); ++ strlcat(path, "/devices", sizeof(path)); ++ ++ return recurse_subtree(path, device_list, 1); ++} ++ ++/* scan the given class for all devices */ ++static int scan_class(const char *name, struct list_head *device_list) ++{ ++ char path[PATH_SIZE]; ++ ++ strlcpy(path, sysfs_path, sizeof(path)); ++ strlcat(path, "/class/", sizeof(path)); ++ strlcat(path, name, sizeof(path)); ++ ++ return recurse_subtree(path, device_list, 1); ++} ++ ++/* scan all of the class devices */ ++static int scan_class_tree(struct list_head *device_list) ++{ ++ char path[PATH_SIZE]; ++ ++ strlcpy(path, sysfs_path, sizeof(path)); ++ strlcat(path, "/class", sizeof(path)); ++ ++ return recurse_subtree(path, device_list, 2); ++} ++ ++/* scan all of the block devices */ ++static int scan_block_tree(struct list_head *device_list) ++{ ++ char path[PATH_SIZE]; ++ ++ strlcpy(path, sysfs_path, sizeof(path)); ++ strlcat(path, "/block", sizeof(path)); ++ ++ return recurse_subtree(path, device_list, 2); ++} ++ ++/* scan all of the separated devices */ ++static int scan_device_tree(struct list_head *device_list) ++{ ++ char path[PATH_SIZE]; ++ ++ strlcpy(path, sysfs_path, sizeof(path)); ++ strlcat(path, "/devices", sizeof(path)); ++ ++ return recurse_subtree(path, device_list, 0); ++} ++ ++/* scan the failed queue for symlinks and queue them */ ++static int scan_failed(struct list_head *device_list) ++{ ++ char failed[PATH_SIZE]; ++ ++ strlcpy(failed, udev_root, sizeof(failed)); ++ strlcat(failed, "/", sizeof(failed)); ++ strlcat(failed, EVENT_FAILED_DIR, sizeof(failed)); ++ ++ dbg("directory: '%s'", failed); ++ return recurse_subtree(failed, device_list, 1); ++} ++ ++ ++static void asmlinkage sig_handler(int signum) ++{ ++ switch (signum) { ++ case SIGALRM: ++ exit(1); ++ case SIGINT: ++ case SIGTERM: ++ exit(20 + signum); ++ } ++} ++ ++int main(int argc, char *argv[]) ++{ ++ LIST_HEAD(device_list); ++ LIST_HEAD(filter_list); ++ struct sigaction act; ++ int args = 0, wait_only = 0, ret = 0; ++ int i; ++ ++ logging_init("udevplug"); ++ udev_init_config(); ++ dbg("version %s", UDEV_VERSION); ++ ++ /* set signal handlers */ ++ memset(&act, 0, sizeof(act)); ++ act.sa_handler = (void (*) (int))sig_handler; ++ sigemptyset (&act.sa_mask); ++ act.sa_flags = 0; ++ sigaction(SIGALRM, &act, NULL); ++ sigaction(SIGINT, &act, NULL); ++ sigaction(SIGTERM, &act, NULL); ++ ++ /* trigger timeout to prevent hanging processes */ ++ alarm(UDEV_ALARM_TIMEOUT); ++ ++ for (i = 1; i < argc; i++) { ++ char *arg = argv[i]; ++ ++ args++; ++ if (strcmp(arg, "-W") == 0) { ++ wait_only = 1; ++ ++ } else if (strcmp(arg, "-F") == 0) { ++ scan_failed(&device_list); ++ ++ } else if (strcmp(arg, "-c") == 0) { ++ scan_class_tree(&device_list); ++ ++ } else if (strcmp(arg, "-b") == 0) { ++ scan_block_tree(&device_list); ++ ++ } else if (strcmp(arg, "-s") == 0) { ++ args--; ++ serial_plug = 1; ++ ++ } else if (strcmp(arg, "-v") == 0) { ++ args--; ++ verbose = 1; ++ ++ } else if (arg[0] == '-') { ++ char *varg; ++ ++ if (arg[2] != '\0') { ++ varg = &arg[2]; ++ } else if (++i < argc) { ++ varg = argv[i]; ++ } else { ++ args--; ++ continue; ++ } ++ ++ switch (arg[1]) { ++ case 'I': ++ filter_list_insert(1, varg, &filter_list); ++ break; ++ case 'X': ++ filter_list_insert(0, varg, &filter_list); ++ break; ++ case 'B': ++ scan_bus(varg, &device_list); ++ break; ++ case 'C': ++ scan_class(varg, &device_list); ++ break; ++ } ++ ++ } else { ++ recurse_tree(arg, &device_list); ++ } ++ } ++ ++ if (wait_only) { ++ wait_for_queue(); ++ goto exit; ++ } ++ ++ if (!args) { ++ scan_class_tree(&device_list); ++ scan_block_tree(&device_list); ++ scan_device_tree(&device_list); ++ } ++ ++ exec_list(&device_list, &filter_list); ++ if (need_wait) ++ wait_for_queue(); ++ ++exit: ++ logging_close(); ++ return ret; ++} --- udev-079.orig/debian/patches/55-run-program.patch +++ udev-079/debian/patches/55-run-program.patch @@ -0,0 +1,19 @@ +diff -ruNp udev-077~/udev_utils_run.c udev-077/udev_utils_run.c +--- udev-077~/udev_utils_run.c 2005-12-04 02:01:48.000000000 +0000 ++++ udev-077/udev_utils_run.c 2005-12-05 17:13:09.030804750 +0000 +@@ -160,8 +160,13 @@ int run_program(const char *command, con + dup2(errpipe[WRITE_END], STDERR_FILENO); + execv(argv[0], argv); + +- /* we should never reach this */ +- err("exec of program '%s' failed", argv[0]); ++ if ((errno == ENOENT) || (errno = ENOTDIR)) { ++ /* will probably turn up later */ ++ info("program '%s' not found", argv[0]); ++ } else { ++ /* bigger problems */ ++ err("exec of program '%s' failed", argv[0]); ++ } + _exit(1); + case -1: + err("fork of '%s' failed: %s", argv[0], strerror(errno)); --- udev-079.orig/debian/patches/10-selinux-include-udev-h.patch +++ udev-079/debian/patches/10-selinux-include-udev-h.patch @@ -0,0 +1,10 @@ +--- udev-079~/udev_selinux.c 2005-12-04 02:01:48.000000000 +0000 ++++ udev-079/udev_selinux.c 2006-01-04 09:44:15.825115480 +0000 +@@ -30,6 +30,7 @@ + #include + #include + ++#include "udev.h" + #include "udev_selinux.h" + #include "logging.h" + --- udev-079.orig/debian/patches/80-extras-iftab_helper.patch +++ udev-079/debian/patches/80-extras-iftab_helper.patch @@ -0,0 +1,476 @@ +diff -ruNp udev-079~/extras/iftab/Makefile udev-079/extras/iftab/Makefile +--- udev-079~/extras/iftab/Makefile 1970-01-01 01:00:00.000000000 +0100 ++++ udev-079/extras/iftab/Makefile 2006-03-15 18:53:05.000000000 +0000 +@@ -0,0 +1,68 @@ ++# Copyright © 2006 Canonical Ltd. ++# Author: Scott James Remnant ++# ++# Released under the GNU General Public License, version 2. ++ ++PROG = iftab_helper ++OBJ = ++HEADERS = ++GEN_HEADERS = ++MAN_PAGES = ++ ++prefix = ++etcdir = ${prefix}/etc ++sbindir = ${prefix}/sbin ++usrbindir = ${prefix}/usr/bin ++usrsbindir = ${prefix}/usr/sbin ++libudevdir = ${prefix}/lib/udev ++mandir = ${prefix}/usr/share/man ++configdir = ${etcdir}/udev/ ++ ++INSTALL = /usr/bin/install -c ++INSTALL_PROGRAM = ${INSTALL} ++INSTALL_DATA = ${INSTALL} -m 644 ++INSTALL_SCRIPT = ${INSTALL_PROGRAM} ++ ++all: $(PROG) $(MAN_PAGES) ++.PHONY: all ++.DEFAULT: all ++ ++%.o: %.c $(GEN_HEADERS) ++ $(QUIET) $(CC) -c $(CFLAGS) $< -o $@ ++ ++$(PROG): %: $(HEADERS) %.o $(OBJS) ++ $(QUIET) $(LD) $(LDFLAGS) $@.o $(OBJS) -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS) ++ifneq ($(strip $(STRIPCMD)),) ++ $(QUIET) $(STRIPCMD) $@ ++endif ++ ++# man pages ++%.8: %.xml ++ xmlto man $? ++.PRECIOUS: %.8 ++ ++clean: ++ rm -f $(PROG) $(OBJS) $(GEN_HEADERS) ++.PHONY: clean ++ ++install-bin: all ++ $(INSTALL_PROGRAM) -D $(PROG) $(DESTDIR)$(libudevdir)/$(PROG) ++.PHONY: install-bin ++ ++uninstall-bin: ++ - rm $(DESTDIR)$(libudevdir)/$(PROG) ++.PHONY: uninstall-bin ++ ++install-man: ++ $(INSTALL_DATA) -D $(PROG).8 $(DESTDIR)$(mandir)/man8/$(PROG).8 ++ $(INSTALL_DATA) -D iftab.5 $(DESTDIR)$(mandir)/man5/iftab.5 ++.PHONY: uninstall-man ++ ++uninstall-man: ++ -rm -f $(DESTDIR)$(mandir)/man8/$(PROG).8 ++ -rm -f $(DESTDIR)$(mandir)/man5/iftab.5 ++.PHONY: uninstall-man ++ ++install-config: ++ @echo "no config file to install" ++.PHONY: install-config +diff -ruNp udev-079~/extras/iftab/iftab.5 udev-079/extras/iftab/iftab.5 +--- udev-079~/extras/iftab/iftab.5 1970-01-01 01:00:00.000000000 +0100 ++++ udev-079/extras/iftab/iftab.5 2006-03-15 18:53:05.000000000 +0000 +@@ -0,0 +1,93 @@ ++.TH IFTAB 5 "February 2006" "" "Linux Administrator's Manual" ++.SH NAME ++iftab \- assign consistent names to network interfaces ++.SH DESCRIPTION ++The file ++.B /etc/iftab ++contains descriptive information about the various network interfaces and ++is used by ++.BR udev (8) ++and its ++.BR iftab_helper (8) ++to assign consistent names to network interfaces. ++ ++.B /etc/iftab ++defines a set of \fImappings\fR. Each mapping contains an interface name ++and a set of selectors which identify the physical network device that ++should be assigned that name. ++ ++If a network device matches all selectors of a mapping, \fBudev\fR will ++rename the interface to the name given by the mapping. ++ ++If a network device \fIdoes not\fR match all of the selectors, ++but has the same name as the mapping, \fBudev\fR instead will rename the ++interface so that it does not have the name given by the kernel. ++.\" ++.SH COMPATIBILITY ++Please note that this file format is a subset of that supported by the ++.BR ifrename (8) ++tool you may find in other distributions, and does not (yet) support the ++full range of selectors and features. ++.\" ++.SH MAPPINGS ++Each mapping is described on a separate line, which may be broken across ++multiple lines by terminating the first line with a backslash. A mapping ++starts with an \fIinterface name\fR and contains a set of \fIselector\fR ++name and value pairs; all separated by space or tabs. ++ ++The interface name may contain a single wildcard (such as \fIeth*\fR ++or \fIwlan*\fR), which indicates that the first free number in that ++class should be used. As an extension to ++.BR ifrename (8) ++this can also be followed by a number to indicate the lowest integer you ++wish to use, e.g. \fIeth*2\fR will use \fIeth2\fR if available, and if not ++try \fIeth3\fR, \fIeth4\fR, etc. ++ ++The relationship between selectors of a mapping is a \fIlogical and\fR. ++A mapping only matches a network deivce if all of the selectors for it ++match. ++ ++When multiple matching selectors are present, the last in the file is used. ++.\" ++.SH SELECTORS ++Each selector is composed of a selector name and selector value ++separated by spaces or tabs. Selectors specify a static attribute of a ++network device, the goal being to uniquely identify each piece of hardware. ++ ++Currently only the following selectors are supported, other selectors supported ++by the ++.BR ifrename (8) ++tool will be implemented as and when required. ++ ++.TP ++.BI mac " mac-address" ++Matches the MAC address of the device which can be obtained by using ++.BR ifconfig (8) ++or ++.BR ip (8). ++.\" ++.TP ++.BI arp " arp-type" ++Matches the ARP type (also known as the Link type) of the interface, ++which can be obtained by using ++.BR ifconfig (8) ++or ++.BR ip (8). ++ ++This selector is most useful when a driver creates multiple interfaces ++for a single device. ++.\" ++.SH EXAMPLE ++# This is a comment ++.br ++eth0 mac 00:12:79:59:8D:38 ++.br ++eth1 mac 00:0B:CD:5C:9E:2A arp 1 ++.SH SEE ALSO ++.BR udev (8) ++.BR iftab_helper (8) ++.BR ifconfig (8) ++.BR ip (8) ++.BR ifrename (8) ++.SH AUTHORS ++Scott James Remnant +diff -ruNp udev-079~/extras/iftab/iftab_helper.8 udev-079/extras/iftab/iftab_helper.8 +--- udev-079~/extras/iftab/iftab_helper.8 1970-01-01 01:00:00.000000000 +0100 ++++ udev-079/extras/iftab/iftab_helper.8 2006-03-15 18:53:05.000000000 +0000 +@@ -0,0 +1,33 @@ ++.TH IFTAB_HELPER 8 "February 2006" "" "Linux Administrator's Manual" ++.SH NAME ++iftab_helper \- udev callout to parse /etc/iftab and name network devices ++.SH SYNOPSIS ++.BI iftab_helper ++\fIdevicename\fR \fIaddress\fR \fIarptype\fR ++.SH DESCRIPTION ++.B iftab_helper ++is normally called from a udev rule to provide the name for a detected ++network device. Udev can use this information to rename devices and thus ++provide consistent names for network devices. ++.SH USAGE ++.B iftab_helper ++looks up the address specified on the command-line in the \fI/etc/iftab\fR ++file and returns the name assigned to it in that file. If it is not present ++it checks whether the kernel-assigned name is assigned to a different device ++in that file and if so returns a new name for the device. ++ ++.B iftab_helper ++is not responsible for performing the actual renaming, that is instead ++eperformed by udev using a NAME rule. This replaces the functionality ++previously offered by ++.BR ifrename (8) ++though note that ++.B iftab_helper ++does not support as wide a range of selectors for devices and files may ++need to be simplified. ++.SH SEE ALSO ++.BR iftab (5) ++.BR ifrename (8) ++.BR udev (8) ++.SH AUTHORS ++Scott James Remnant +diff -ruNp udev-079~/extras/iftab/iftab_helper.c udev-079/extras/iftab/iftab_helper.c +--- udev-079~/extras/iftab/iftab_helper.c 1970-01-01 01:00:00.000000000 +0100 ++++ udev-079/extras/iftab/iftab_helper.c 2006-03-15 18:57:56.000000000 +0000 +@@ -0,0 +1,266 @@ ++/* ++ * iftab_helper - parses /etc/iftab and outputs network device name ++ * ++ * Copyright © 2006 Canonical Ltd. ++ * Author: Scott James Remnant ++ * ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the ++ * Free Software Foundation version 2 of the License. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License along ++ * with this program; if not, write to the Free Software Foundation, Inc., ++ * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ++ * ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include "../../logging.h" ++#include "../../udev_utils.h" ++#include "../../udev_libc_wrapper.h" ++ ++#define IFTAB "/etc/iftab" ++ ++#ifdef USE_LOG ++void log_message(int priority, const char *format, ...) ++{ ++ va_list args; ++ static int udev_log = -1; ++ ++ if (udev_log == -1) { ++ const char *value; ++ ++ value = getenv("UDEV_LOG"); ++ if (value) ++ udev_log = log_priority(value); ++ else ++ udev_log = LOG_ERR; ++ } ++ ++ if (priority > udev_log) ++ return; ++ ++ va_start(args, format); ++ vsyslog(priority, format, args); ++ va_end(args); ++} ++#endif ++ ++static char *next_token(char **linepos) ++{ ++ char *token = *linepos; ++ ++ /* read up to whitespace */ ++ while (**linepos && !isspace(**linepos)) ++ (*linepos)++; ++ ++ /* split the string and skip over whitespace */ ++ if (**linepos) { ++ *((*linepos)++) = '\0'; ++ while (isspace(**linepos)) ++ (*linepos)++; ++ } ++ ++ return token; ++} ++ ++static int class_number(const char *ifname, const char *class) ++{ ++ const char *ifptr, *clptr; ++ int num; ++ ++ ifptr = ifname; ++ clptr = class; ++ while (*ifptr && !isdigit(*ifptr) && *ifptr == *clptr) ++ ifptr++, clptr++; ++ ++ if (!isdigit(*ifptr) || !isdigit(*clptr)) ++ return -1; ++ ++ num = atoi(ifptr); ++ ++ while (*ifptr && isdigit(*ifptr)) ++ ifptr++; ++ ++ while (*clptr && isdigit(*clptr)) ++ clptr++; ++ ++ while (*ifptr && *ifptr == *clptr) ++ ifptr++, clptr++; ++ ++ if (*ifptr || *clptr) ++ return -1; ++ ++ return num; ++} ++ ++static const char *whats_my_name(const char *name, const char *address, ++ int arp_type) ++{ ++ static char iftab_name[NAME_SIZE] = ""; ++ char *buf; ++ size_t bufsize, cur, lineno; ++ int found = 0, clashed = 0, next = 0; ++ ++ strlcpy(iftab_name, name, sizeof(iftab_name)); ++ ++ if (file_map(IFTAB, &buf, &bufsize)) { ++ if (errno != ENOENT) ++ err("%s: unable to open: %s", IFTAB, strerror(errno)); ++ return iftab_name; ++ } ++ ++ cur = 0; ++ lineno = 0; ++ while (cur < bufsize) { ++ char line[LINE_SIZE], *bufline, *linepos; ++ char *ifname; ++ size_t count; ++ int match = 1; ++ ++ count = buf_get_line(buf, bufsize, cur); ++ bufline = &buf[cur]; ++ cur += count+1; ++ lineno++; ++ ++ if (count >= sizeof(line)) { ++ err("%s:%d: line too long", IFTAB, lineno); ++ continue; ++ } ++ ++ /* eat initial whitespace */ ++ while ((count > 0) && isspace(bufline[0])) { ++ bufline++; ++ count--; ++ } ++ if (!count) ++ continue; ++ ++ /* comment? */ ++ if (bufline[0] == '#') ++ continue; ++ ++ /* copy into buffer */ ++ memcpy(line, bufline, count); ++ line[count] = '\0'; ++ linepos = line; ++ ++ /* up to the first whitespace is the interface name */ ++ ifname = next_token(&linepos); ++ if (!*linepos) { ++ err("%s:%d: no selectors for %s", IFTAB, lineno, ifname); ++ continue; ++ } ++ ++ while (*linepos) { ++ char *selector, *value; ++ ++ /* read selector name and value */ ++ selector = next_token(&linepos); ++ if (!*linepos) { ++ err("%s:%d: no value after %s selector for %s", IFTAB, lineno, selector, ifname); ++ break; ++ } ++ value = next_token(&linepos); ++ ++ if (!strcasecmp(selector, "mac") ++ || !strcasecmp(selector, "ethaddr")) { ++ if (strcasecmp(value, address)) ++ match = 0; ++ ++ } else if (!strcasecmp(selector, "arp") ++ || !strcasecmp(selector, "linktype")) { ++ if (atoi(value) != arp_type) ++ match = 0; ++ ++ } else { ++ err("%s:%d: unknown or unsupported %s selector for %s", IFTAB, lineno, selector, ifname); ++ } ++ } ++ ++ if (match) { ++ /* Matched details: use assigned name */ ++ strlcpy(iftab_name, ifname, sizeof(iftab_name)); ++ found = 1; ++ } else if (!strcasecmp(ifname, name)) { ++ /* Name assigned to another device */ ++ clashed = 1; ++ } else { ++ /* Same class, update next free number */ ++ int this = class_number(ifname, name); ++ if (this >= next) ++ next = this + 1; ++ } ++ } ++ ++ /* if device has no allocated name and clashes with an allocated ++ * one, generate the * form */ ++ if (!found && clashed) { ++ char ending[NAME_SIZE]; ++ char *ptr = iftab_name; ++ char *end; ++ ++ while (*ptr && !isdigit(*ptr)) ++ ptr++; ++ ++ end = ptr; ++ while (isdigit(*end)) ++ end++; ++ ++ strlcpy(ending, end, sizeof(ending)); ++ sprintf(ptr, "*%d%s", next, ending); ++ } ++ ++ file_unmap(buf, bufsize); ++ return iftab_name; ++} ++ ++ ++int main(int argc, char *argv[]) ++{ ++ const char *name = NULL, *address = NULL, *iftab_name; ++ int arp_type = -1, ret = 0, i = 1; ++ ++ logging_init("iftab_helper"); ++ ++ if (i < argc) { ++ name = argv[i++]; ++ } else { ++ err("no device name specified"); ++ ret = 1; ++ goto exit; ++ } ++ ++ if (i < argc) { ++ address = argv[i++]; ++ } else { ++ err("no mac address specified"); ++ ret = 1; ++ goto exit; ++ } ++ ++ if (i < argc) { ++ arp_type = atoi(argv[i++]); ++ } else { ++ err("no arp type specified"); ++ ret = 1; ++ goto exit; ++ } ++ ++ iftab_name = whats_my_name(name, address, arp_type); ++ printf("%s\n", iftab_name); ++ ++exit: ++ logging_close(); ++ return ret; ++} --- udev-079.orig/debian/patches/20-sparc-sorcvbufforce.patch +++ udev-079/debian/patches/20-sparc-sorcvbufforce.patch @@ -0,0 +1,19 @@ +diff -ruNp udev-079~/udev_libc_wrapper.h udev-079/udev_libc_wrapper.h +--- udev-079~/udev_libc_wrapper.h 2005-12-23 00:51:30.000000000 +0100 ++++ udev-079/udev_libc_wrapper.h 2006-03-01 11:22:41.496856248 +0100 +@@ -135,8 +135,15 @@ static inline int inotify_add_watch(int + #endif + + #ifndef SO_RCVBUFFORCE ++/* Some architectures use a different value for compatibility with ++ * other Unix. ++ */ ++#if defined(__alpha__) || defined(__hppa__) || defined(__sparc__) || defined(__sparc_v9__) ++#define SO_RCVBUFFORCE 0x100b ++#else + #define SO_RCVBUFFORCE 33 + #endif ++#endif + + extern uid_t lookup_user(const char *user); + extern gid_t lookup_group(const char *group); --- udev-079.orig/debian/patches/70-ifrename.patch +++ udev-079/debian/patches/70-ifrename.patch @@ -0,0 +1,137 @@ +diff -ruNp udev-079~/udev_add.c udev-079/udev_add.c +--- udev-079~/udev_add.c 2006-03-01 14:09:00.849473664 +0100 ++++ udev-079/udev_add.c 2006-03-01 14:02:27.307301168 +0100 +@@ -32,6 +32,8 @@ + #include + #include + #include ++#include ++#include + + #include "libsysfs/sysfs/libsysfs.h" + #include "udev_libc_wrapper.h" +@@ -262,10 +264,97 @@ static int rename_net_if(struct udevice + strlcpy(ifr.ifr_newname, udev->name, IFNAMSIZ); + + retval = ioctl(sk, SIOCSIFNAME, &ifr); +- if (retval != 0) +- err("error changing net interface name: %s", strerror(errno)); ++ if (retval != 0) { ++ if (errno != EEXIST) { ++ err("error changing net interface name: %s", strerror(errno)); ++ goto error; ++ } ++ ++ /* Destination interface already exits. ++ * First rename our interface to something temporary in case ++ * we're trying to swap with that one. */ ++ strlcpy(ifr.ifr_newname, udev->kernel_name, IFNAMSIZ); ++ strlcat(ifr.ifr_newname, "_ifrename", IFNAMSIZ); ++ ++ retval = ioctl(sk, SIOCSIFNAME, &ifr); ++ if (retval != 0) { ++ err("error changing net interface name: %s", strerror(errno)); ++ goto error; ++ } ++ ++ /* Now we loop until our target interface goes away. */ ++ strlcpy(ifr.ifr_name, ifr.ifr_newname, IFNAMSIZ); ++ strlcpy(ifr.ifr_newname, udev->name, IFNAMSIZ); ++ while ((retval = ioctl(sk, SIOCSIFNAME, &ifr)) != 0) { ++ if (errno != EEXIST) { ++ err("error changing net interface name: %s", strerror(errno)); ++ break; ++ } ++ ++ usleep(50000); ++ } ++ } ++ ++error: + close(sk); ++ return retval; ++} ++ ++static int rename_net_if_increment(struct udevice *udev) ++{ ++ struct ifreq ifr; ++ char *ptr, *end; ++ int dev = 0, sk, retval; ++ ++ info("changing net interface name from '%s' to first matching '%s'", udev->kernel_name, udev->name); ++ if (udev->test_run) ++ return 0; ++ + ++ /* Split the name up */ ++ ptr = udev->name; ++ while (*ptr && *ptr != '*') ++ ptr++; ++ ++ end = ptr + 1; ++ if (isdigit(*end)) ++ dev = atoi(end); ++ ++ while (isdigit(*end)) ++ end++; ++ ++ ++ sk = socket(PF_INET, SOCK_DGRAM, 0); ++ if (sk < 0) { ++ err("error opening socket: %s", strerror(errno)); ++ return -1; ++ } ++ ++ memset(&ifr, 0x00, sizeof(struct ifreq)); ++ strlcpy(ifr.ifr_name, udev->kernel_name, IFNAMSIZ); ++ ++ do { ++ strncpy(ifr.ifr_newname, udev->name, ptr - udev->name); ++ sprintf(ifr.ifr_newname + (ptr - udev->name), "%d%s", ++ dev, end); ++ ++ retval = ioctl(sk, SIOCSIFNAME, &ifr); ++ if (retval == 0) { ++ strlcpy(udev->name, ifr.ifr_newname, sizeof(udev->name)); ++ break; ++ } ++ ++ if (errno != EEXIST) { ++ err("error changing net interface name: %s", strerror(errno)); ++ goto error; ++ } ++ ++ /* Try the next one */ ++ dev++; ++ } while (1); ++ ++error: ++ close(sk); + return retval; + } + +@@ -287,7 +376,11 @@ int udev_add_device(struct udevice *udev + } else if (udev->type == DEV_NET) { + /* look if we want to change the name of the netif */ + if (strcmp(udev->name, udev->kernel_name) != 0) { +- retval = rename_net_if(udev); ++ if (strchr(udev->name, '*')) { ++ retval = rename_net_if_increment(udev); ++ } else { ++ retval = rename_net_if(udev); ++ } + if (retval != 0) + goto exit; + +diff -ruNp udev-079~/udev_utils_string.c udev-079/udev_utils_string.c +--- udev-079~/udev_utils_string.c 2006-03-01 13:43:06.955991768 +0100 ++++ udev-079/udev_utils_string.c 2006-03-01 14:00:55.234298392 +0100 +@@ -245,7 +245,7 @@ int replace_untrusted_chars(char *str) + if ((str[i] >= '0' && str[i] <= '9') || + (str[i] >= 'A' && str[i] <= 'Z') || + (str[i] >= 'a' && str[i] <= 'z') || +- strchr("#$%+-./:=?@_", str[i])) { ++ strchr("#$%+-./:=?*@_", str[i])) { + i++; + continue; + } --- udev-079.orig/debian/udev.examples +++ udev-079/debian/udev.examples @@ -0,0 +1 @@ +extras/scsi_id/scsi_id.config --- udev-079.orig/debian/rules.d/99-udevmonitor.rules +++ udev-079/debian/rules.d/99-udevmonitor.rules @@ -0,0 +1,2 @@ +# event to be caught by udevmonitor +RUN+="socket:/org/kernel/udev/monitor" --- udev-079.orig/debian/rules.d/80-programs.rules +++ udev-079/debian/rules.d/80-programs.rules @@ -0,0 +1,9 @@ +# This file causes programs to be run on device insertion. +# See udev(8) for syntax. +# +# "Hotplug replacement" is handled in 90-modprobe.rules; this file only +# specifies rules for those programs that are shipped in the minimal Ubuntu +# system, programs outside of that may ship their own rules. + +# Load firmware on demand +SUBSYSTEM=="firmware", ACTION=="add", RUN+="firmware_helper" --- udev-079.orig/debian/rules.d/40-permissions.rules +++ udev-079/debian/rules.d/40-permissions.rules @@ -0,0 +1,94 @@ +# This file establishes permissions and ownership of devices according +# to Ubuntu policy. See udev(8) for syntax. +# +# The names of the devices must not be set here, but in 20-names.rules; +# user-friendly symlinks (which need no permissions or ownership) should +# be set in 60-symlinks.rules. + +# Block devices +SUBSYSTEM!="block", GOTO="block_end" +SYSFS{removable}!="1", GROUP="disk" +SYSFS{removable}=="1", GROUP="floppy" +BUS=="usb", GROUP="plugdev" +BUS=="ieee1394", GROUP="plugdev" +LABEL="block_end" + +# IDE devices +ENV{PHYSDEVBUS}!="ide", GOTO="ide_end" +KERNEL=="hd[a-z]|pcd[0-9]*", \ + IMPORT{program}="cdrom_id --export $tempnode" +ENV{ID_CDROM}=="?*", GROUP="cdrom" +KERNEL=="ht[0-9]*", GROUP="tape" +KERNEL=="nht[0-9]*", GROUP="tape" +LABEL="ide_end" + +# IEEE1394 (firewire) devices +# Please note that raw1394 gives unrestricted, raw access to every single +# device on the bus and those devices may do anything as root on your system. +# Yes, I know it also happens to be the only way to rewind your video camera, +# but it's not going to be group "video", okay? +KERNEL=="raw1394", GROUP="disk" +KERNEL=="dv1394*", GROUP="video" +KERNEL=="video1394*", GROUP="video" + +# Packet CD devices, group under /dev/pktcdvd +KERNEL=="pktcdvd", MODE="0644" +KERNEL=="pktcdvd[0-9]*", GROUP="cdrom" + +# Printers and Parallel devices +SUBSYSTEM=="printer", GROUP="lp" +SUBSYSTEM=="ppdev", GROUP="lp" +SUBSYSTEM=="usb", KERNEL="lp[0-9]*", GROUP="lp" +KERNEL=="pt[0-9]*", GROUP="tape" +KERNEL=="pht[0-9]*", GROUP="tape" + +# SCSI devices +ENV{PHYSDEVBUS}!="scsi", GOTO="scsi_end" +SYSFS{type}=="1", GROUP="tape" +SYSFS{type}=="5", GROUP="cdrom" +SYSFS{type}=="6", GROUP="scanner" +SYSFS{type}=="3", SYSFS{vendor}=="HP", GROUP="scanner" +LABEL="scsi_end" + +# Serial devices +SUBSYSTEM=="tty", GROUP="dialout" +SUBSYSTEM=="capi", GROUP="dialout" +SUBSYSTEM=="slamr", GROUP="dialout" +KERNEL=="ttyLTM[0-9]*", GROUP="dialout", MODE="0660" + +# Sound devices +SUBSYSTEM=="sound", GROUP="audio" + +# USB devices (usbfs replacement) +SUBSYSTEM=="usb_device", MODE="0664" + +# vc (virtual console) devices +SUBSYSTEM!="tty", GOTO="vc_end" +KERNEL=="console", GROUP="root", MODE="0600" +KERNEL=="ptmx", GROUP="root", MODE="0666" +KERNEL=="pty*", GROUP="tty", MODE="0666" +KERNEL=="tty", GROUP="root", MODE="0666" +KERNEL=="tty[0-9]*", GROUP="root" +LABEL="vc_end" + +# Video devices +SUBSYSTEM=="drm", GROUP="video" +SUBSYSTEM=="dvb", GROUP="video" +SUBSYSTEM=="graphics", GROUP="video" +SUBSYSTEM=="video4linux", GROUP="video" +KERNEL=="agpgart", GROUP="video" +KERNEL=="nvidia*", GROUP="video" + +# Other devices, by name +KERNEL=="null", MODE="0666" +KERNEL=="zero", MODE="0666" +KERNEL=="full", MODE="0666" +KERNEL=="random", MODE="0666" +KERNEL=="urandom", MODE="0666" +KERNEL=="mem", GROUP="kmem", MODE="0640" +KERNEL=="kmem", GROUP="kmem", MODE="0640" +KERNEL=="port", GROUP="kmem", MODE="0640" +KERNEL=="nvram", GROUP="nvram" +KERNEL=="rtc", GROUP="audio" +KERNEL=="inotify", MODE="0666" +KERNEL=="js[0-9]*", GROUP="plugdev" --- udev-079.orig/debian/rules.d/90-modprobe.rules +++ udev-079/debian/rules.d/90-modprobe.rules @@ -0,0 +1,66 @@ +# This file causes modules to be loaded for inserted devices. +# See udev(8) for syntax. +# +# This file should only specify rules that cause modprobe to be called, +# programs that configure or activate hardware should be called in +# 80-programs.rules + +ACTION!="add", GOTO="modprobe_end" + +# Load S/390 ccw modules using the old-fashioned grepmap +SUBSYSTEM=="ccw", PROGRAM="/sbin/grepmap --udev", \ + RUN+="/sbin/modprobe -Qba $result" + +# Load IDE class modules based on the media type +SUBSYSTEM!="ide", GOTO="ide_end" +IMPORT{program}="ide_media --export $devpath" +ENV{IDE_MEDIA}=="cdrom", RUN+="/sbin/modprobe -Qba ide-cd" +ENV{IDE_MEDIA}=="disk", RUN+="/sbin/modprobe -Qba ide-disk" +ENV{IDE_MEDIA}=="floppy", RUN+="/sbin/modprobe -Qba ide-floppy" +ENV{IDE_MEDIA}=="tape", RUN+="/sbin/modprobe -Qba ide-tape" +LABEL="ide_end" + +# Load i2o class modules unequivocably until we know more about them +SUBSYSTEM!="i2o", GOTO="i2o_end" +RUN+="/sbin/modprobe -Qba i2o-block" +LABEL="i2o_end" + +# Load input modules using the old-fashioned inputmap +SUBSYSTEM=="input", PROGRAM="/sbin/grepmap --udev", \ + RUN+="/sbin/modprobe -Qba $result" + +# Load MMC class modules unequivocably until we know more about them +SUBSYSTEM!="mmc", GOTO="mmc_end" +RUN+="/sbin/modprobe -Qba mmc-block" +LABEL="mmc_end" + +# Load PNP modules with a helper that iterates the device ids +SUBSYSTEM=="pnp", PROGRAM="pnp_modules $devpath", \ + RUN+="/sbin/modprobe -Qba $result" + +# Load SCSI class modules based on the device class +SUBSYSTEM!="scsi_device", GOTO="scsi_device_end" +SYSFS{type}=="0|7|14", RUN+="/sbin/modprobe -Qba sd_mod" +SYSFS{type}=="1", RUN+="/sbin/modprobe -Qba st" +SYSFS{type}=="[345]", RUN+="/sbin/modprobe -Qba sr_mod" +RUN+="/sbin/modprobe -Qba sg" +LABEL="scsi_device_end" + +# Load VIO modules based on the device type +# (modules that lack modalias support) +SUBSYSTEM!="vio", GOTO="vio_end" +IMPORT{program}="vio_type --export $devpath" +ENV{VIO_TYPE}=="serial", RUN+="/sbin/modprobe -Qba hvc_console" +ENV{VIO_TYPE}=="serial-server", RUN+="/sbin/modprobe -Qba hvcs" +ENV{VIO_TYPE}=="network", RUN+="/sbin/modprobe -Qba ibmveth" +ENV{VIO_TYPE}=="vscsi", RUN+="/sbin/modprobe -Qba ibmvscsic" +ENV{VIO_TYPE}=="vlan", RUN+="/sbin/modprobe -Qba iseries_veth" +ENV{VIO_TYPE}=="viodasd", RUN+="/sbin/modprobe -Qba viodasd" +ENV{VIO_TYPE}=="viocd", RUN+="/sbin/modprobe -Qba viocd" +LABEL="vio_end" + + +# Load drivers that match kernel-supplied alias +ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe -Q $env{MODALIAS}" + +LABEL="modprobe_end" --- udev-079.orig/debian/rules.d/60-symlinks.rules +++ udev-079/debian/rules.d/60-symlinks.rules @@ -0,0 +1,30 @@ +# This file establishes user-friendly symlinks to devices according to +# Ubuntu policy. See udev(8) for syntax. +# +# The names of the actual devices themselves must not be set here, but +# in 20-names.rules; the permissions and ownership of those devices +# should be set in 40-permissions.rules. + +# Compatibility symlinks for /dev/scd* devices +BUS=="scsi", KERNEL=="sr[0-9]*", SYMLINK+="%k" + +# Create /dev/cdrom* symlinks for CD-ROM devices +BUS=="ide", KERNEL=="hd[a-z]|pcd[0-9]*", ACTION=="add", \ + IMPORT{program}="cdrom_id --export $tempnode" +BUS=="scsi", KERNEL=="sr[0-9]*", ACTION=="add", \ + IMPORT{program}="cdrom_id --export $tempnode" +ENV{ID_CDROM}=="?*", SYMLINK+="cdrom" +ENV{ID_CDROM_CD_RW}=="?*", SYMLINK+="cdrw" +ENV{ID_CDROM_DVD}=="?*", SYMLINK+="dvd" +ENV{ID_CDROM_DVD_R}=="?*", SYMLINK+="dvdrw" + +# Create /dev/pilot symlink for Palm Pilots +KERNEL=="ttyUSB*", SYSFS{product}=="Palm Handheld*", \ + SYMLINK+="pilot" + +# Create /dev/input/aiptektablet +BUS=="usb", DRIVER=="aiptek", KERNEL=="event[0-9]*", \ + SYMLINK+="input/aiptektablet" + +# Create /dev/modem symlinks +KERNEL=="ttyLTM[0-9]*", SYMLINK+="modem" --- udev-079.orig/debian/rules.d/00-init.rules +++ udev-079/debian/rules.d/00-init.rules @@ -0,0 +1,6 @@ +# Wait for the "bus" link to appear in sysfs +ACTION=="add", DEVPATH=="/devices/*", ENV{PHYSDEVBUS}=="?*", \ + WAIT_FOR_SYSFS="bus" + +# Wait for the "address" attribute of network devices to appear in sysfs +ACTION=="add", SUBSYSTEM=="net", WAIT_FOR_SYSFS="address" --- udev-079.orig/debian/rules.d/25-iftab.rules +++ udev-079/debian/rules.d/25-iftab.rules @@ -0,0 +1,6 @@ +# This file causes network devices to be assigned consistent names. +# See udev(8) for syntax. + +SUBSYSTEM=="net", ACTION=="add", \ + PROGRAM="iftab_helper %k $sysfs{address} $sysfs{type}", \ + NAME="$result" --- udev-079.orig/debian/rules.d/20-names.rules +++ udev-079/debian/rules.d/20-names.rules @@ -0,0 +1,67 @@ +# This file establishes the device names according to Ubuntu policy. +# See udev(8) for syntax. +# +# Permissions and ownership of devices must not be set here, but in +# 40-permissions.rules; user-friendly symlinks to devices should be +# set in 60-symlinks.rules. + +# CPU devices, group under /dev/cpu +KERNEL=="cpu[0-9]*", NAME="cpu/%n/cpuid" +KERNEL=="msr[0-9]*", NAME="cpu/%n/msr" +KERNEL=="microcode", NAME="cpu/microcode" + +# Device mapper targets +KERNEL=="device-mapper", NAME="mapper/control" +KERNEL=="dm-[0-9]*", NAME="dm/%n" + +# Input devices, group under /dev/input +KERNEL=="event[0-9]*", NAME="input/%k" +KERNEL=="mice", NAME="input/%k" +KERNEL=="mouse[0-9]*", NAME="input/%k" +KERNEL=="js[0-9]*", NAME="input/%k" +KERNEL=="ts[0-9]*", NAME="input/%k" +KERNEL=="uinput", NAME="input/%k" + +# ISDN devices, group under /dev/capi +KERNEL=="capi", NAME="capi20" +KERNEL=="capi[0-9]*", NAME="capi/%n" + +# Packet CD devices, group under /dev/pktcdvd +KERNEL=="pktcdvd", NAME="pktcdvd/control" +KERNEL=="pktcdvd[0-9]*", NAME="pktcdvd/%k" + +# Sound devices, group under /dev/snd +KERNEL=="controlC[0-9]*", NAME="snd/%k" +KERNEL=="hwC[D0-9]*", NAME="snd/%k" +KERNEL=="midiC[D0-9]*", NAME="snd/%k" +KERNEL=="pcmC[D0-9cp]*", NAME="snd/%k" +KERNEL=="seq", NAME="snd/%k" +KERNEL=="timer", NAME="snd/%k" + +# USB devices (usbfs replacement), group under /dev/bus/usb +SUBSYSTEM!="usb_device", GOTO="usb_device_end" +IMPORT{program}="usb_device_name --export %k" +ENV{USB_BUS}=="?*", ENV{USB_DEV}=="?*", \ + NAME="bus/usb/$env{USB_BUS}/$env{USB_DEV}" +LABEL="usb_device_end" + +# Video devices, group dvb devices under /dev/dvb +SUBSYSTEM!="dvb", GOTO="dvb_end" +IMPORT{program}="dvb_device_name --export %k" +ENV{DVB_ADAPTER}=="?*", ENV{DVB_DEV}=="?*", \ + NAME="dvb/adapter$env{DVB_ADAPTER}/$env{DVB_NAME}" +LABEL="dvb_end" + +# Work-around for IDE devices that don't report media changes +BUS=="ide", KERNEL=="hd[a-z]", SYSFS{removable}=="1", \ + ENV{ID_MODEL}=="IOMEGA_ZIP*", NAME{all_partitions}="%k" + +# SCSI CD-ROM devices use /dev/scdN now +BUS=="scsi", KERNEL=="sr[0-9]*", NAME="scd%n" + +# USB printers need to be /dev/usb* +BUS=="usb", KERNEL=="lp[0-9]*", NAME="usb%k" + +# Other devices +KERNEL=="hw_random", NAME="hwrng" +KERNEL=="tun", NAME="net/%k" --- udev-079.orig/debian/udev.install +++ udev-079/debian/udev.install @@ -0,0 +1 @@ +extras/path_id lib/udev --- udev-079.orig/debian/udev.postrm +++ udev-079/debian/udev.postrm @@ -0,0 +1,171 @@ +#!/bin/sh -e +# This script can be called in the following ways: +# +# After the package was removed: +# remove +# +# After the package was purged: +# purge +# +# After the package was upgraded: +# upgrade +# if that fails: +# failed-upgrade +# +# +# After all of the packages files have been replaced: +# disappear +# +# +# If preinst fails during install: +# abort-install +# +# If preinst fails during upgrade of removed package: +# abort-install +# +# If preinst fails during upgrade: +# abort-upgrade + + +# Undo removal of a no-longer used conffile +undo_rm_conffile() +{ + CONFFILE="$1" + + if [ ! -e "$CONFFILE" ]; then + if [ -e "$CONFFILE".dpkg-bak ]; then + echo "Restoring modified conffile $CONFFILE" + mv -f "$CONFFILE".dpkg-bak "$CONFFILE" + fi + fi +} + +# Undo move of a conffile +undo_mv_conffile() +{ + CONFFILE="$1" + + if [ ! -e "$CONFFILE" ]; then + if [ -e "$CONFFILE".dpkg-bak ]; then + mv -f "$CONFFILE".dpkg-bak "$CONFFILE" + fi + fi +} + + +# Undo removal of obsolete pieces of udev from the Debian split +undo_rm_debian_udev() +{ + # /etc/udev/scripts used to contain helper scripts + undo_rm_conffile /etc/udev/scripts/scsi-devfs.sh + undo_rm_conffile /etc/udev/scripts/cdsymlinks.sh + undo_rm_conffile /etc/udev/scripts/dvb.sh + undo_rm_conffile /etc/udev/scripts/ide-devfs.sh + undo_rm_conffile /etc/udev/scripts/inputdev.sh + undo_rm_conffile /etc/udev/scripts/removable.sh + undo_rm_conffile /etc/udev/scripts/ide-model.sh + undo_rm_conffile /etc/udev/scripts/raid-devfs.sh + + # rules files used to be in /etc/udev with symlinks + undo_rm_conffile /etc/udev/cd-aliases.rules + undo_rm_conffile /etc/udev/hotplugd.rules + undo_rm_conffile /etc/udev/permissions.rules + undo_rm_conffile /etc/udev/run.rules + undo_rm_conffile /etc/udev/udev.rules + + # other rules and files that we shipped + undo_rm_conffile /etc/udev/compat.rules + undo_rm_conffile /etc/udev/compat-full.rules + undo_rm_conffile /etc/udev/devfs.rules + undo_rm_conffile /etc/udev/simple-cd-aliases.rules + undo_rm_conffile /etc/udev/cdsymlinks.conf + undo_rm_conffile /etc/udev/links.conf +} + +# Undo removal of all traces of the hotplug package +undo_rm_hotplug() +{ + # /etc/hotplug.d used to contain per-subsystem scripts + undo_rm_conffile /etc/hotplug.d/default/default.hotplug + + # /etc/hotplug used to contain the hotplug scripts + undo_rm_conffile /etc/hotplug/blacklist + undo_rm_conffile /etc/hotplug/dasd.agent + undo_rm_conffile /etc/hotplug/firmware.agent + undo_rm_conffile /etc/hotplug/ieee1394.agent + undo_rm_conffile /etc/hotplug/input.agent + undo_rm_conffile /etc/hotplug/net.agent + undo_rm_conffile /etc/hotplug/pci.agent + undo_rm_conffile /etc/hotplug/scsi.agent + undo_rm_conffile /etc/hotplug/tape.agent + undo_rm_conffile /etc/hotplug/usb.agent + undo_rm_conffile /etc/hotplug/ide.rc + undo_rm_conffile /etc/hotplug/input.rc + undo_rm_conffile /etc/hotplug/isapnp.rc + undo_rm_conffile /etc/hotplug/net.rc + undo_rm_conffile /etc/hotplug/pci.rc + undo_rm_conffile /etc/hotplug/scsi.rc + undo_rm_conffile /etc/hotplug/usb.rc + undo_rm_conffile /etc/hotplug/net.ifup + undo_rm_conffile /etc/hotplug/dasd.permissions + undo_rm_conffile /etc/hotplug/tape.permissions + undo_rm_conffile /etc/hotplug/usb.handmap + undo_rm_conffile /etc/hotplug/hotplug.functions + + # Remove the init script + undo_rm_conffile /etc/init.d/hotplug + undo_rm_conffile /etc/init.d/hotplug-net + + # Other bits + undo_rm_conffile /etc/logcheck/violations.ignore.d/hotplug +} + +# Undo rename of the persistent.rules file +undo_mv_persistent_rules() +{ + undo_mv_conffile /etc/udev/rules.d/65-persistent.rules +} + +# Remove configuration and log files +purge_files() +{ + if [ -f /etc/iftab ]; then + rm -f /etc/iftab || true + fi + + if [ -f /var/log/udev ]; then + rm -f /var/log/udev || true + fi +} + + +case "$1" in + remove) + ;; + + purge) + purge_files + ;; + + upgrade|failed-upgrade|disappear) + ;; + + abort-install|abort-upgrade) + if dpkg --compare-versions "$2" lt "076-0ubuntu1"; then + undo_rm_debian_udev + undo_rm_hotplug + fi + + if dpkg --compare-versions "$2" lt "079-0ubuntu1"; then + undo_mv_persistent_rules + fi + ;; + + *) + echo "$0 called with unknown argument \`$1'" 1>&2 + exit 1 + ;; +esac + +#DEBHELPER# +exit 0 --- udev-079.orig/debian/copyright +++ udev-079/debian/copyright @@ -0,0 +1,40 @@ +This is the Ubuntu package of udev, the rule-base device node and kernel +event manager. + +Copyright © 2004-2005 Key Sievers +Copyright © 2003-2004 Greg Kroah-Hartman + +Licence: + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation version 2 of the License. + +This program is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +On Ubuntu systems, the complete text of the GNU General Public License +can be found in ‘/usr/share/common-licenses/GPL’. + + +This package also includes libsysfs, a library to provide a consistent +and stable interface to the /sys filesystem. + +Copyright © 2003-2005 IBM Corp + +Licence: + +This library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published +by the Free Software Foundation; either version 2.1 of the License, or +(at your option) any later version. + +This library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser +General Public License for more details. + +On Ubuntu systems, the complete text of the GNU Lesser General Public +License can be found in ‘/usr/share/common-licenses/LGPL’. --- udev-079.orig/debian/udev.docs +++ udev-079/debian/udev.docs @@ -0,0 +1,3 @@ +FAQ +README +RELEASE-NOTES --- udev-079.orig/debian/installer-rules.d/10-devfs.rules +++ udev-079/debian/installer-rules.d/10-devfs.rules @@ -0,0 +1,5 @@ +# This is rather obviously not a complete devfs implementation, but just +# the compatibility layer for the installer which relies on some +# devfs-style paths to find storage devices. + +SUBSYSTEM=="block", PROGRAM="storage_enum %k", SYMLINK+="$result" --- udev-079.orig/debian/udev-udeb.dirs +++ udev-079/debian/udev-udeb.dirs @@ -0,0 +1,8 @@ +/sbin +/etc/udev +/etc/udev/rules.d +/lib/firmware +/lib/udev +/lib/debian-installer-startup.d +/usr/bin +/usr/sbin --- udev-079.orig/debian/udev.preinst +++ udev-079/debian/udev.preinst @@ -0,0 +1,147 @@ +#!/bin/sh -e +# This script can be called in the following ways: +# +# Before the package is installed: +# install +# +# Before removed package is upgraded: +# install +# +# Before the package is upgraded: +# upgrade +# +# +# If postrm fails during upgrade or fails on failed upgrade: +# abort-upgrade + + +# Prepare to remove a no-longer used conffile +prep_rm_conffile() +{ + CONFFILE="$1" + + if [ -e "$CONFFILE" ]; then + md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" + old_md5sum="`sed -n -e \"/^Conffiles:/,/^[^ ]/{\\\\' $CONFFILE '{s/ obsolete$//;s/.* //;p}}\" /var/lib/dpkg/status`" + if [ "$md5sum" != "$old_md5sum" ]; then + echo "Obsolete conffile $CONFFILE has been modified by you, renaming to .dpkg-bak" + mv -f "$CONFFILE" "$CONFFILE".dpkg-bak + fi + fi +} + +# Prepare to move a conffile without triggering a dpkg question +prep_mv_conffile() { + CONFFILE="$1" + + if [ -e "$CONFFILE" ]; then + md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`" + old_md5sum="`sed -n -e \"/^Conffiles:/,/^[^ ]/{\\\\' $CONFFILE '{s/ obsolete$//;s/.* //;p}}\" /var/lib/dpkg/status`" + if [ "$md5sum" = "$old_md5sum" ]; then + mv -f "$CONFFILE" "$CONFFILE".dpkg-bak + fi + fi +} + + +# Remove obsolete pieces of udev from the Debian split +prep_rm_debian_udev() +{ + # /etc/udev/scripts used to contain helper scripts + prep_rm_conffile /etc/udev/scripts/scsi-devfs.sh + prep_rm_conffile /etc/udev/scripts/cdsymlinks.sh + prep_rm_conffile /etc/udev/scripts/dvb.sh + prep_rm_conffile /etc/udev/scripts/ide-devfs.sh + prep_rm_conffile /etc/udev/scripts/inputdev.sh + prep_rm_conffile /etc/udev/scripts/removable.sh + prep_rm_conffile /etc/udev/scripts/ide-model.sh + prep_rm_conffile /etc/udev/scripts/raid-devfs.sh + + # rules files used to be in /etc/udev with symlinks + prep_rm_conffile /etc/udev/cd-aliases.rules + prep_rm_conffile /etc/udev/hotplugd.rules + prep_rm_conffile /etc/udev/permissions.rules + prep_rm_conffile /etc/udev/run.rules + prep_rm_conffile /etc/udev/udev.rules + + # other rules and files that we shipped + prep_rm_conffile /etc/udev/compat.rules + prep_rm_conffile /etc/udev/compat-full.rules + prep_rm_conffile /etc/udev/devfs.rules + prep_rm_conffile /etc/udev/simple-cd-aliases.rules + prep_rm_conffile /etc/udev/cdsymlinks.conf + prep_rm_conffile /etc/udev/links.conf + + # old mtab init script, replaced by new virtfs one + prep_rm_conffile /etc/init.d/udev-mtab +} + +# Remove all traces of the hotplug package +prep_rm_hotplug() +{ + # /etc/hotplug.d used to contain per-subsystem scripts + prep_rm_conffile /etc/hotplug.d/default/default.hotplug + + # /etc/hotplug used to contain the hotplug scripts + prep_rm_conffile /etc/hotplug/blacklist + prep_rm_conffile /etc/hotplug/dasd.agent + prep_rm_conffile /etc/hotplug/firmware.agent + prep_rm_conffile /etc/hotplug/ieee1394.agent + prep_rm_conffile /etc/hotplug/input.agent + prep_rm_conffile /etc/hotplug/net.agent + prep_rm_conffile /etc/hotplug/pci.agent + prep_rm_conffile /etc/hotplug/scsi.agent + prep_rm_conffile /etc/hotplug/tape.agent + prep_rm_conffile /etc/hotplug/usb.agent + prep_rm_conffile /etc/hotplug/ide.rc + prep_rm_conffile /etc/hotplug/input.rc + prep_rm_conffile /etc/hotplug/isapnp.rc + prep_rm_conffile /etc/hotplug/net.rc + prep_rm_conffile /etc/hotplug/pci.rc + prep_rm_conffile /etc/hotplug/scsi.rc + prep_rm_conffile /etc/hotplug/usb.rc + prep_rm_conffile /etc/hotplug/net.ifup + prep_rm_conffile /etc/hotplug/dasd.permissions + prep_rm_conffile /etc/hotplug/tape.permissions + prep_rm_conffile /etc/hotplug/usb.handmap + prep_rm_conffile /etc/hotplug/hotplug.functions + + # Remove the init script + prep_rm_conffile /etc/init.d/hotplug + prep_rm_conffile /etc/init.d/hotplug-net + + # Other bits + prep_rm_conffile /etc/logcheck/violations.ignore.d/hotplug +} + +# Rename the persistent.rules file +prep_mv_persistent_rules() +{ + prep_mv_conffile /etc/udev/rules.d/65-persistent.rules \ + /etc/udev/rules.d/65-persistent-disk.rules +} + + +case "$1" in + install|upgrade) + if dpkg --compare-versions "$2" lt "076-0ubuntu1"; then + prep_rm_debian_udev + prep_rm_hotplug + fi + + if dpkg --compare-versions "$2" lt "079-0ubuntu1"; then + prep_mv_persistent_rules + fi + ;; + + abort-upgrade) + ;; + + *) + echo "$0 called with unknown argument \`$1'" 1>&2 + exit 1 + ;; +esac + +#DEBHELPER# +exit 0 --- udev-079.orig/debian/udev.postinst +++ udev-079/debian/udev.postinst @@ -0,0 +1,204 @@ +#!/bin/sh -e +# This script can be called in the following ways: +# +# After the package was installed: +# configure +# +# +# If prerm fails during upgrade or fails on failed upgrade: +# abort-upgrade +# +# If prerm fails during deconfiguration of a package: +# abort-deconfigure in-favour +# removing +# +# If prerm fails during replacement due to conflict: +# abort-remove in-favour + + +# Remove a no-longer used conffile +rm_conffile() +{ + CONFFILE="$1" + + if [ -e "$CONFFILE" ]; then + echo "Removing obsolete conffile $CONFFILE" + rm -f "$CONFFILE" + fi +} + +# Remove a conffile directory if it's not empty +rm_confdir() +{ + CONFDIR="$1" + + if [ -d "$CONFDIR" ]; then + rmdir "$CONFDIR" 2>/dev/null \ + || echo "Unable to remove $CONFDIR, not empty" + fi +} + +# Move a conffile without triggering a dpkg question +mv_conffile() { + OLDCONFFILE="$1" + NEWCONFFILE="$2" + + if [ -e "$OLDCONFFILE" ]; then + echo "Preserving user changes to $NEWCONFFILE" + mv -f "$NEWCONFFILE" "$NEWCONFFILE".dpkg-new + mv -f "$OLDCONFFILE" "$NEWCONFFILE" + elif [ -e "$OLDCONFFILE".dpkg-bak ]; then + rm -f "$OLDCONFFILE".dpkg-bak + fi +} + + +# Remove obsolete pieces of udev from the Debian split +rm_debian_udev() +{ + # /etc/udev/scripts used to contain helper scripts + rm_conffile /etc/udev/scripts/scsi-devfs.sh + rm_conffile /etc/udev/scripts/cdsymlinks.sh + rm_conffile /etc/udev/scripts/dvb.sh + rm_conffile /etc/udev/scripts/ide-devfs.sh + rm_conffile /etc/udev/scripts/inputdev.sh + rm_conffile /etc/udev/scripts/removable.sh + rm_conffile /etc/udev/scripts/ide-model.sh + rm_conffile /etc/udev/scripts/raid-devfs.sh + rm_confdir /etc/udev/scripts + + # rules files used to be in /etc/udev with symlinks + rm_conffile /etc/udev/cd-aliases.rules + rm_conffile /etc/udev/hotplugd.rules + rm_conffile /etc/udev/permissions.rules + rm_conffile /etc/udev/run.rules + rm_conffile /etc/udev/udev.rules + rm -f /etc/udev/rules.d/020_permissions.rules + rm -f /etc/udev/rules.d/cd-aliases.rules + rm -f /etc/udev/rules.d/udev.rules + rm -f /etc/udev/rules.d/z50_run.rules + rm -f /etc/udev/rules.d/z70_hotplugd.rules + + # other rules and files that we shipped + rm_conffile /etc/udev/compat.rules + rm_conffile /etc/udev/compat-full.rules + rm_conffile /etc/udev/devfs.rules + rm_conffile /etc/udev/simple-cd-aliases.rules + rm_conffile /etc/udev/cdsymlinks.conf + rm_conffile /etc/udev/links.conf + + # old mtab init script, replaced by new virtfs one + rm_conffile /etc/init.d/udev-mtab + update-rc.d udev-mtab remove + update-rc.d -f udev remove +} + +# Remove all traces of the hotplug package +rm_hotplug() +{ + # /etc/hotplug.d used to contain per-subsystem scripts + rm_conffile /etc/hotplug.d/default/default.hotplug + rm_confdir /etc/hotplug.d/default + rm_confdir /etc/hotplug.d/chandev + rm_confdir /etc/hotplug.d/dock + rm_confdir /etc/hotplug.d/ieee1394 + rm_confdir /etc/hotplug.d/input + rm_confdir /etc/hotplug.d/net + rm_confdir /etc/hotplug.d/pci + rm_confdir /etc/hotplug.d/scsi + rm_confdir /etc/hotplug.d/usb + rm_confdir /etc/hotplug.d + + # /etc/hotplug used to contain the hotplug scripts + rm_conffile /etc/hotplug/blacklist + rm_conffile /etc/hotplug/dasd.agent + rm_conffile /etc/hotplug/firmware.agent + rm_conffile /etc/hotplug/ieee1394.agent + rm_conffile /etc/hotplug/input.agent + rm_conffile /etc/hotplug/net.agent + rm_conffile /etc/hotplug/pci.agent + rm_conffile /etc/hotplug/scsi.agent + rm_conffile /etc/hotplug/tape.agent + rm_conffile /etc/hotplug/usb.agent + rm_conffile /etc/hotplug/ide.rc + rm_conffile /etc/hotplug/input.rc + rm_conffile /etc/hotplug/isapnp.rc + rm_conffile /etc/hotplug/net.rc + rm_conffile /etc/hotplug/pci.rc + rm_conffile /etc/hotplug/scsi.rc + rm_conffile /etc/hotplug/usb.rc + rm_conffile /etc/hotplug/net.ifup + rm_conffile /etc/hotplug/dasd.permissions + rm_conffile /etc/hotplug/tape.permissions + rm_conffile /etc/hotplug/usb.handmap + rm_conffile /etc/hotplug/hotplug.functions + rm -f /etc/hotplug/.run/net.enable + rm_confdir /etc/hotplug/.run + rm_confdir /etc/hotplug/blacklist.d + rm_confdir /etc/hotplug/pci + rm_confdir /etc/hotplug/usb + rm_confdir /etc/hotplug + + # Remove the init script + rm_conffile /etc/init.d/hotplug + rm_conffile /etc/init.d/hotplug-net + update-rc.d hotplug remove + update-rc.d hotplug-net remove + rm -f /etc/default/hotplug + + # Other bits + rm_conffile /etc/logcheck/violations.ignore.d/hotplug + rm_confdir /etc/logcheck/violations.ignore.d + rm_confdir /etc/logcheck +} + +# Notify the user that a reboot is required +reboot_required() +{ + if [ -x /usr/share/update-notifier/notify-reboot-required ]; then + /usr/share/update-notifier/notify-reboot-required + fi +} + +# Update the initramfs +update_initramfs() +{ + update-initramfs -u +} + +# Rename the persistent.rules file +mv_persistent_rules() +{ + mv_conffile /etc/udev/rules.d/65-persistent.rules \ + /etc/udev/rules.d/65-persistent-disk.rules +} + + +case "$1" in + configure) + if dpkg --compare-versions "$2" lt "076-0ubuntu1"; then + rm_debian_udev + rm_hotplug + + reboot_required + fi + + if dpkg --compare-versions "$2" lt "079-0ubuntu1"; then + mv_persistent_rules + fi + + update_initramfs + ;; + + abort-upgrade|abort-deconfigure|abort-remove) + ;; + + *) + echo "$0 called with unknown argument \`$1'" 1>&2 + exit 1 + ;; +esac + +#DEBHELPER# +exit 0 + --- udev-079.orig/debian/udev.initramfs-hook +++ udev-079/debian/udev.initramfs-hook @@ -0,0 +1,55 @@ +#!/bin/sh -e +# initramfs hook for udev + +PREREQS="" + +# Output pre-requisites +prereqs() +{ + echo "$PREREQ" +} + +case "$1" in + prereqs) + prereqs + exit 0 + ;; +esac + + +. /usr/share/initramfs-tools/hook-functions + +# udev uses unix sockets for communication +force_load unix + +# Copy across the udev binaries +copy_exec /sbin/udevd /sbin +copy_exec /sbin/udevplug /sbin + +# Copy udev configuration +mkdir -p ${DESTDIR}/etc/udev +cp -p /etc/udev/udev.conf ${DESTDIR}/etc/udev + +# Only copy across relevant rules +mkdir -p ${DESTDIR}/etc/udev/rules.d +for rules in 00-init.rules 20-names.rules 65-persistent-disk.rules 90-modprobe.rules; do + cp -p /etc/udev/rules.d/$rules ${DESTDIR}/etc/udev/rules.d +done + +# Copy across helpers the rules need +mkdir -p ${DESTDIR}/lib/udev +# 20-names.rules +copy_exec /lib/udev/dvb_device_name /lib/udev +copy_exec /lib/udev/usb_device_name /lib/udev +# 65-persistent-disk.rules +copy_exec /lib/udev/ata_id /lib/udev +copy_exec /lib/udev/edd_id /lib/udev +copy_exec /lib/udev/usb_id /lib/udev +copy_exec /lib/udev/vol_id /lib/udev +copy_exec /lib/udev/dasd_id /lib/udev +copy_exec /lib/udev/scsi_id /lib/udev +copy_exec /lib/udev/path_id /lib/udev +# 90-modprobe.rules +copy_exec /lib/udev/pnp_modules /lib/udev +copy_exec /lib/udev/ide_media /lib/udev +copy_exec /lib/udev/vio_type /lib/udev --- udev-079.orig/debian/udev.installer-startup +++ udev-079/debian/udev.installer-startup @@ -0,0 +1,15 @@ +#!/bin/sh -e +# installer startup script for udev + +# Copy over default device tree +cp -a -f /lib/udev/devices/* /dev + +# It's all over netlink now +echo "" > /proc/sys/kernel/hotplug + +# Start udevd +udevd --daemon + +# Create all device nodes, and fix up permissions and missing stuff for +# those already created (by initramfs) +/sbin/udevplug --- udev-079.orig/debian/changelog +++ udev-079/debian/changelog @@ -0,0 +1,1464 @@ +udev (079-0ubuntu23) dapper; urgency=low + + * Install udev.initramfs-local into casper-premount so we get to see CD + drives, etc on the live CD. + + -- Tollef Fog Heen Mon, 27 Mar 2006 20:44:32 +0200 + +udev (079-0ubuntu22) dapper; urgency=low + + "He takes his food with a horrid zest, + he eats one half and he wears the rest!" + + * Split the initramfs script out even more, instead of a case statement + in init-premount move the module loading to local-top and nfs-top. + This fixes the long-standing bug where changing boot= on the kernel + command line has no effect. + * Drop the "|| true"s from usplash_write calls, infinity says they're + unnecessary. + * Actually load modules for intelligent devices like we say we do in the + comments. + + -- Scott James Remnant Thu, 23 Mar 2006 17:44:13 +0000 + +udev (079-0ubuntu21) dapper; urgency=low + + * Split the loop-and-wait part of the initramfs script out; it'll + go in the initramfs local script itself. Ubuntu: #36010 + + -- Scott James Remnant Wed, 22 Mar 2006 15:33:12 +0000 + +udev (079-0ubuntu20) dapper; urgency=low + + "I'm just the fastest thing you'll ever see. + That streak of lightning you just missed was me." + + * Load ide-generic in all cases after loading PCI storage controller + drivers. This reduces the complexity of the root filesystem mounting + to just a single path for both IDE and everything else and opens up to + using a UUID for everything. + * Set a global usplash timeout for the entire initramfs script. + Ubuntu: #35104. + + -- Scott James Remnant Tue, 21 Mar 2006 19:47:49 +0000 + +udev (079-0ubuntu19) dapper; urgency=low + + "For I am ordinary, unimportant, and undeserving of such attention." + + * Place joysticks in the "plugdev" group, for programs that access the + joystick device directly and not through X. Ubuntu: #33354. + * The storage device enumerator used by the installer was a bit too + efficient; it would generate new symlink names every time an add event + for a device was received. The installer causes many add events to occur, + each time hw-detect and the partitioner is run. Fix the script to + return an existing symlink name if one exists in the udevdb. + Ubuntu: #27926. + * Fix iftab_helper segmentation fault when /etc/iftab doesn't exist, + caused by returning NULL rather than the suggested name; now returns + whatever name the kernel gave. Ubuntu: #34078. + + -- Scott James Remnant Wed, 15 Mar 2006 18:28:39 +0000 + +udev (079-0ubuntu18) dapper; urgency=low + + "Just a little change; Small, to say the least; + Both a little scared; Neither one prepared." + + * Fix ide_media helper to construct IDE device names above 'hdf' + properly. Ubuntu: #32679. + * Hard-code the location of usplash_write and call directly, as + we don't have "type" in busybox. This corrects usplash timing out + early while waiting for SCSI root filesystem to show up. Ubuntu: #28357. + * Set the all_partitions options for removable IOMEGA_ZIP* devices. + Ubuntu: #27752. + + -- Scott James Remnant Thu, 2 Mar 2006 13:36:49 +0100 + +udev (079-0ubuntu17) dapper; urgency=low + + "The greatest thing you'll ever learn, is just to be loved, and be loved + in return." + + * Fix build failure caused by accidental double-inclusion of the + SORECVBUFFORCE patch. + + * As the ifrename patch generally seems to be working, drop the "_clashed" + moniker and instead just use the next free interface number available to + us. So instead of eth0_clashed, you'll see e.g. eth2 now. If you wanted + it as eth0, you need to change your /etc/iftab file. + + -- Scott James Remnant Wed, 1 Mar 2006 13:06:47 +0100 + +udev (079-0ubuntu16) dapper; urgency=low + + "You better shape up, 'cause I need a man, and my heart is set on you." + + * Define the SORECVBUFFORCE socket option correctly on Sparc (and other + ancient platforms). + + -- Scott James Remnant Wed, 1 Mar 2006 11:23:41 +0100 + +udev (079-0ubuntu15) dapper; urgency=low + + "Rembrandts! El Grecos! Toulouse-Letrec-os! + Painted last week on the banks of the Thames!" + + * We also need to "catch up" events of the scsi_device, usb_device and + usb_host classes just in case the user compiled things into their kernel + or put their SATA driver into /etc/mkinitramfs/modules (yes, you, + crispin). + + -- Scott James Remnant Mon, 27 Feb 2006 14:05:25 +0100 + +udev (079-0ubuntu14) dapper; urgency=low + + "With tuppence for paper and strings, you can have your own set of wings." + + * Log the results of performing the udevplug to /dev/.udev.log by using + udevmonitor. This log file will be moved to /var/log/udev later in the + boot sequence. Note that this won't work if /usr is on a separate + filesystem because of the location of udevmonitor, but that's a small + loss. + + -- Scott James Remnant Tue, 21 Feb 2006 16:22:33 +0000 + +udev (079-0ubuntu13) dapper; urgency=low + + "But when I'm way up here, it's crystal clear; + That now i'm in a whole new world." + + * Remove the blanket loading of ide-generic after any IDE device, by + this time they should have been claimed by a driver already. I kept + this around for historical reasons, but it breaks people with multiple + IDE controllers in their machine (hi, Fabio!). If this causes new bugs, + it can go back in. + + -- Scott James Remnant Mon, 20 Feb 2006 11:01:23 +0000 + +udev (079-0ubuntu12) dapper; urgency=low + + "Should we blame the government? Or blame society? + Or should we blame the images on TV? No, Blame Canada!" + + * Drink coffee. + * Read 80-extras-iftab_helper.patch again. + * Stare in disbelief. + * Drink more coffee. + * Add "&& !found" to the "rename to clashed" if condition. + * Close bug #31188. + * Hide in shame. + + -- Scott James Remnant Tue, 14 Feb 2006 11:28:17 +0000 + +udev (079-0ubuntu11) dapper; urgency=low + + "How do you document real life when real life's getting more like + fiction each day? + + * More updates to ifrename support: + - iftab_helper now supports the common "mac" selector, used to + distinguish different interfaces created by the same driver. + + -- Scott James Remnant Mon, 13 Feb 2006 21:19:19 +0000 + +udev (079-0ubuntu10) dapper; urgency=low + + "Near, far, in our motor car; Oh what a happy time we'll spend." + + * Fixes to a couple of think-os in the previous ifrename patch: + - after renaming to the temporary interface name, make sure we copy + that into ifr_name otherwise we'll be trying to rename the interface + we've just renamed. Ubuntu #31040. + - use "OLDNAME_ifrename" as the temporary name rather than "__NEWNAME" + to avoid clashes and just generally make it more obvious. + - use "NAME_clashed" as the iftab clash name rather than "_NAME" to make + it more obvious + - don't write an initial /etc/iftab on install or upgrade; leave it to + the installer. + + -- Scott James Remnant Fri, 10 Feb 2006 14:37:02 +0000 + +udev (079-0ubuntu9) dapper; urgency=low + + "Dancing freaks and sycophants, Westwood heels and shoulder pads." + + * Rework the initramfs premount script a little to try and make the root + filesystem order a little more predictable. In particular make sure we + don't load USB/firewire/etc. drivers until we've loaded IDE and SCSI + drivers otherwise sda could be won by a fast USB key over your SATA + root filesystem. Ubuntu #28150, #30418. + + * Include support for renaming of network interfaces. This is done with + a new iftab_helper that can parse a subset of the ifrename /etc/iftab + file and return the expected name of the network interface. This is + called from a udev rule that uses the internal support for network + interface renaming. Interface swapping is supported both by renaming + network interfaces that would clash with one specified in the file and + by waiting for an interface name to become free in udev itself. + Ubuntu: #7050, #30240. + + -- Scott James Remnant Thu, 9 Feb 2006 22:04:10 +0000 + +udev (079-0ubuntu8) dapper; urgency=low + + "Forget about your algebra and calculus, You can always do your homework + on the morning bus." + + * Change the udev message to "Loading hardware drivers" to stop people + thinking this does any kind of hardware detection, which it doesn't. + + -- Scott James Remnant Tue, 7 Feb 2006 11:12:09 +0000 + +udev (079-0ubuntu7) dapper; urgency=low + + "And someday when you're old and bent, Think of those you might have spent, + With a bad, bad man!" + + * Include 65-persistent-disk.rules and helpers in the udeb so the + installer can use /dev/disk/by-*. + + -- Scott James Remnant Sat, 4 Feb 2006 11:32:54 +0000 + +udev (079-0ubuntu6) dapper; urgency=low + + "Some little token of esteem is needed, like a dish of cream." + + * Don't check whether a device is claimed by an already loaded driver, + while clever and theoretically time-saving it turns out that various + forms of devices can be claimed by multiple drivers + Ubuntu #28654, #30377. + * Load mmc_block when an mmc device is inserted; will improve once + we get a way to determine exactly which mmc sub-module we need, but + this will give us out-of-the-box SD/MMC card support for now. + * Also load i2o_block for all i2o devices, again this is a temporary + workaround for a bad kernel subsystem. + + -- Scott James Remnant Fri, 3 Feb 2006 17:50:19 +0000 + +udev (079-0ubuntu5) dapper; urgency=low + + "We was full of hope, until I got addicted to crack and dope!" + + * Switch back to using "cp -a -f" in the init script and installer + startup; that works fine with busybox and with our patched coreutils. + + -- Scott James Remnant Thu, 2 Feb 2006 09:52:00 +0000 + +udev (079-0ubuntu4) dapper; urgency=low + + "May I return to the beginning? The light is dimming, and the dream is too" + + * Remove the /dev/.udev/queue directory at the bottom of the initramfs + just in case we killed udevd while it was in the middle of something. + + -- Scott James Remnant Sat, 28 Jan 2006 16:08:08 +0000 + +udev (079-0ubuntu3) dapper; urgency=low + + "There's gonna be a quiz at your ascension, not to mention any + threat of hell." + + * Wait time for SCSI devices should be 30 seconds, not 3 seconds. + Accidentally broken while fixing usplash timeouts. + + -- Scott James Remnant Tue, 10 Jan 2006 10:54:42 +0000 + +udev (079-0ubuntu2) dapper; urgency=low + + "I'm brushing up on looking down." + + * Probe for PCI, ISA, PCMCIA, etc. brides, USB and Firewire controllers + and docking stations during initramfs, to support more distant root disks. + * Also probe for input devices so when it all goes wrong, you can use that + USB keyboard to fix it. + + * Build the udeb separately without SELinux support, as that's not + required during the installer. + * Don't allow usplash to timeout while we run udevplug in the init script + or while we wait for SCSI devices to get out of bed. + + -- Scott James Remnant Fri, 6 Jan 2006 10:10:01 +0000 + +udev (079-0ubuntu1) dapper; urgency=low + + "You know, some guys just can't hold their arsenic." + + * New upstream release: + - %e (enumerate) in rules has been deprecated. + - event environment now lists symlinks to device in DEVLINKS variable + - device-mapper support for persistent disk rules + * Dropped 10-udev-conf.patch, now included upstream. + * Dropped 02-no-sepol.patch, as we now depend on that. + * Added 10-selinux-include-udev-h.patch to fix build failure with selinux. + * Increased versioned dependency on libselinux1-dev to that which includes + matchpathcon_init_prefix. + + * Fixed dvb device naming to create correct format names, bugs in both + udev rules to match the device and program to generate the right names. + Ubuntu #20874. + * Fixed a bug in udevplug that caused it to wait for an event to complete + that it never tickled. Ubuntu #20943. + * Included firmware loading in the udeb so network cards needing firmware + will work in the installer. Ubuntu #20993 + * Plug devices in serial during the initramfs, provides a little more + predictability of device names of the root filesystem. + + * Rule changes: + - wait for the address attribute of network devices to appear in sysfs + before processing. + Rationale: solves race not yet fixed in kernel. + - dropped %e from symlink rules; this means you will only have one + /dev/cdrom symlink no matter how many devices you have - and it isn't + necessarily predictable which one it is. Software should use HAL or + similar to present "human names" for devices, and sysadmins should + use the /dev/disk/* names. + Rationale: upstream. + - /etc/udev/rules.d/65-persistent.rules renamed to 65-persistent-disk.rules + Rationale: upstream. + - place /dev/nvram in the nvram group. + Rationale: Ubuntu #21571 and breezy. + - load sg module for all SCSI devices. + Rationale: Ubuntu #12434, SuSE rules. + - place SCSI processors (SYSFS{type}==3) from HP in the scanner group. + Rationale: Ubuntu #12434. + - change permissions of removable devices (floppies, usb, ieee1394, etc.) + to 0660 (the default) instead of overriding it down to 0640. + Rationale: allows formatting of the media, and the groups are intended + to imply physical access anyway. + + -- Scott James Remnant Wed, 4 Jan 2006 07:58:45 +0000 + +udev (077-0ubuntu5) dapper; urgency=low + + "And if you're lucky, then the god's a she." + + * Spell firewire correctly (with the extra e). + * Spell midi correctly. + * Remove strange "0" floating in the IDE device permissions rules. + * Explicitly state cdrom modes as 0660 in case they've been dropped to + 0640 because they're removable. + + -- Scott James Remnant Mon, 12 Dec 2005 13:05:53 +0000 + +udev (077-0ubuntu4) dapper; urgency=low + + "Looks like you're not happy 'less I open a vein." + + * Drop -x from initramfs premount script, was there for debugging while + it was new and shiny. + * Include the general functions in the initramfs script, so we get + log_begin_msg/log_end_msg, which we use to notify that we're hanging + around for a while. + + -- Scott James Remnant Thu, 8 Dec 2005 02:19:11 +0000 + +udev (077-0ubuntu3) dapper; urgency=low + + "Watch out, Europe ... We're going on tour!" + + * Include udevinfo and udevmonitor in the udeb for installer debugging. + * Rework the initramfs premount script. Instead of trying to do the same + steps for everything, take different paths depending on the values of + $BOOT and $ROOT. + - BOOT=nfs means we only load network card drivers. + - BOOT=local means we look at ROOT, if it's an ide device we might need + to load ide-generic if probing the bus doesn't create it; if it's a + scsi or sata device we might need to wait around for a bit for the + device to appear + * Load ide-generic if not already loaded when an ide device is detected. + + * Rule changes: + - Change group of USB and IEEE1394 block devices to plugdev and change + permissions to 0640. + Rationale: pmount/g-v-m/hal needs them in this group to work. + + -- Scott James Remnant Wed, 7 Dec 2005 18:15:21 +0000 + +udev (077-0ubuntu2) dapper; urgency=low + + "I'm so hot, hot to trot; I can hardly wait to show them what I got." + + * Turns out busybox doesn't have "cp -au", go back to "-af". + + -- Scott James Remnant Tue, 6 Dec 2005 20:36:25 +0000 + +udev (077-0ubuntu1) dapper; urgency=low + + "I think dynamic tension must be awfully hard work" + + * New upstream release: + - no longer marks an event as failed when ignore_device is used + - skipping of events with SEQNUM moved to udevsend + - automatically prefix relative program paths with /lib/udev + + * Copy devices from /lib/udev/devices using plain-old cp, rather than + find and cpio; find is in /usr. + * Update installer startup script to use "cp -au" like the init script, + instead of "cp -af". + * Add /lib/udev/devices/kmem as there's no sysfs node for it yet. + * Mount udev with mode 0755 in cases of no initramfs. + * Explain to debhelper that we like the /lib/udev/devices permissions the + way they are. + + * Rule changes: + - Rename /dev/sr* to /dev/scd*, providing old name as symlink. + Rationale: LANANA. Ubuntu #20312. + - Rename USB printers to /dev/usblp*. + Rationale: expectation in cupsys source, avoids conflict with lp. + - Rename device-mapper targets to /dev/dm/*. + Rationale: names we used in breezy. + - Change /dev/pilot symlink to be enumerated. + Rationale: some people have multiple Palm Pilots (yes, really). + - Add /dev/input/aiptektablet enumerated symlink to event device. + Rationale: used in xorg.conf. Ubuntu #18358. + - Add permissions and symlinks for ltmodem /dev/ttyLTM* devices. + Rationale: included in linux-restricted-modules. + - Add enumerated /dev/cdrw, /dev/dvd and /dev/dvdrw symlinks. + Rationale: appeared in breezy. + - Left /dev/urandom permissions as 0666, despite being 0444 in breezy. + Rationale: same write function as /dev/random. Debian #332970. + + * Drop has_driver helper, instead just check ENV{PHYSDEVDRIVER}. + * Directly use the upstream persisent rules, so we keep up with changes + without having to copy them into the debian/rules.d directory. + * Remove /lib/udev/ prefix from all program rules, and let udevd add it. + + * Replace devfs rules with a simple helper that atomically enumerates + storage devices and allows us to produce the devfs-style /dev/discs, + /dev/cdroms and /dev/floppy directories that the installer still uses. + + -- Scott James Remnant Tue, 6 Dec 2005 14:26:09 +0000 + +udev (076-0ubuntu5) dapper; urgency=low + + "I played Norway, my fjords were stunning!" + + * Load modules for all storage controllers in initramfs, not just IDE + and SCSI; some SATA controllers identify themselves as RAID. + * Load modules for network controllers in initramfs. + * Call modprobe super-quiet and with blacklist support when loading + ide-generic. + + * Add -b (block devices) and -c (class devices) options to udevplug that + follow the right numbers of symlinks. + * Add -v (verbose) to udevplug for easier debugging. + * Dereference /sys symlinks given to udevplug directly. + + * Added debian/patches/55-run-program.patch which stops udevd declaring + that the sky is falling just because a program can't be found, it'll + output a warning (normally muted) and can be replayed later with + udevplug -F + + * Fix pnp_modules which was generating device aliases, instead of device + ids that we can pass to modprobe. + + * Fix a few bugs in the init script that prevented udev from being started + on systems without initramfs, or after it was stopped. + * Include null in /lib/udev/devices by default. + * Simplify the udev.installer-startup script, the installer itself will + take care of much of the heavy mountpoint lifting. + * Include udev.conf in the udeb. + + -- Scott James Remnant Thu, 1 Dec 2005 11:38:34 +0000 + +udev (076-0ubuntu4) dapper; urgency=low + + * Allow udevplug to follow symlinks in various circumstances, such as + when enumerating a bus or class heirarchy (mostly future compatibility, + but useful today). + * Correct a silly error in the udevplug manpage. + * Use -Cmem -Cmisc -Ctty -Cvc in initramfs script to ensure we follow + symlinks properly. + * Depend on the version of module-init-tools that actually supports + modprobe -Q. + * Guard notify-reboot-required call for minimal systems. + * Fix uninitialised variable in vio_type. + + -- Scott James Remnant Thu, 1 Dec 2005 01:06:49 +0000 + +udev (076-0ubuntu3) dapper; urgency=low + + * Add debian/patches/01-no-sepol.patch to avoid inclusion of libsepol1 + in main, it doesn't appear to be used. + + -- Scott James Remnant Wed, 30 Nov 2005 20:18:54 +0000 + +udev (076-0ubuntu2) dapper; urgency=low + + "Robin Hood, what a crook; gave away, what he took" + + * Recurse the /sys tree directly it udevplug rather than trying to use + libsysfs to encapsulate it; it just doesn't really work (why /dev/tty + didn't get updated permissions). + * Include the modprobe rules in the udeb. + + -- Scott James Remnant Wed, 30 Nov 2005 19:25:14 +0000 + +udev (076-0ubuntu1) dapper; urgency=low + + "There's nothing we can't face ... except for bunnies!" + + * New upstream release: + - udev daemon is now run on startup, rather than first event + - events are received exclusively over the netlink socket, you should + leave /proc/sys/kernel/hotplug empty from now on. + - events with a TIMEOUT are now processed immediately + - disks can now be accessed through /dev/disk/by-label/ and + /dev/disk/by-uuid/ if you know what disk you're looking for, but not + what kernel-assigned name it has. + - device nodes with default name and no symlink are no longer stored in + the udevdb. + - the "udev_db" option has been removed, and the udevdb moved to + /dev/.udev/db + - when there are queued events, /dev/.udev/queue will exist and contain + symlinks to the appropriate /sys paths for each event + - exit status of programs called by RUN rules is now tracked + - if an event fails, /dev/.udev/failed will exist and contain symlinks + to the appropriate /sys paths; this can be used to replay failed events + later + - rules with NAME="" will cause no device node to be created, but RUN + keys will still be run. Use OPTION "ignore_device" to completely + ignore an event. + - added WAIT_FOR_SYSFS="" key to rule syntax, all built-in + logic to work around timing has been removed and instead this rule + should be used where necessary + - syntax to test for existance of environment variable changed from + ENV{KEY}=="*" to ENV{KEY}=="?*" + - communication with daemons such as hal can now be done using sockets, + use RUN+="socket:/org/freedesktop/hal/udev_event" + + * Repackaged for Ubuntu, we have sufficiently far digressed from Debian, + especially in dealing with users trying to break their system, that + it makes sense to just maintain our own package now. Ironically this + makes it easier to send patches back as we don't have to strip out the + "back out stuff" hunks first. + * Completely replaces the functionality of the hotplug package, which will + be removed by installing this. If you had custom /etc/hotplug.d or + /etc/dev.d scripts, you will need to update those to be called by a udev + rule in /etc/udev/rules.d/8?-*.rules + * Depends on grepmap directly for the last remaining subsystems that don't + produce MODALIAS variables, rather than indirectly using the old hotplug + agents. + * Provides its own initramfs-tools hook and scripts, replacing the /dev + functionality that used to be built into it. + + * The plain udev binary and udevstart are no longer shipped; all events are + received over the netlink socket by udevd and processed internally. The + general functionality of udevstart has been replaced by udevplug. + * /etc/udev/links.conf is gone and instead replaced by the /lib/udev/devices + directory. If you need any extra device nodes, symlinks or placed in + /dev on boot just place them here; they're copied over when the system + starts. + * The udev_root and udev_rules config options have been removed, if you + really want to change these, you can; but beware that you'll need to + change a lot of other things too -- they were just too difficult to + reliably support when combined with initramfs. + * All scripts removed from /etc/udev/scripts, instead replacements (often + binaries for speed) are shipped in /lib/udev; you can replace them by + adding your own and adjusting the rules. + + * All rules are now placed directly in /etc/udev/rules.d, rather than + symlinking them in. + * All of the default rules have been replaced with new rules; if you had + modified the old ones they will be disabled but left in /etc/udev for + you (with a .dpkg-bak name). You'll need to update your rules for the + new system, and place them in a new /etc/udev/rules.d/50-*.rules file. + + -- Scott James Remnant Tue, 22 Nov 2005 08:29:24 +0000 + +udev (0.060-1ubuntu15) breezy; urgency=low + + * The kernel's input subsystem still hasn't been updated to use the new + driver core and is still running /proc/sys/kernel/hotplug (udevsend) + itself with a hand-constructed environment, rather than attaching data + to the sysfs event. + + These hand-constructed events are missing the DEVPATH= variable which + udev requires before processing its rules. + + Added debian/patches/hotplug_input_events which instead of ignoring these + events catches those from the input subsystem and processes them by + running /sbin/udev_run_hotplugd; effectively passing all responsibility + to the old hotplug input.agent which still can deal with them. + + In the long-term, the kernel will be updated to use the driver core + (there are patches starting to be floated now) and attach its + information to the sysfs event, so this hack can go when that happens. + + -- Scott James Remnant Fri, 23 Sep 2005 23:31:23 +0100 + +udev (0.060-1ubuntu14) breezy; urgency=low + + * Well, that didn't work so well now, did it folks? + + Looks like good old Mr Kernel is _only_ sending some events down the + netlink socket, and we really don't want to be ignoring them. + + Revert the ubuntu13 change, and instead start udevd manually at + S04udev. This isn't as much of a hack as it first appears, because + once /proc/sys/kernel/hotplug goes away we'll need to do this anyway. + + -- Scott James Remnant Wed, 21 Sep 2005 12:40:40 +0100 + +udev (0.060-1ubuntu13) breezy; urgency=low + + * Disable receipt of hotplug events via the netlink socket, there are + race conditions at early boot time where we can end up ignoring + udevsend events for netlink events we've already missed. This + particularly affected /dev/input/mice. (Ubuntu #12915). + + -- Scott James Remnant Wed, 21 Sep 2005 03:45:49 +0100 + +udev (0.060-1ubuntu12) breezy; urgency=low + + * extra/permissions.rules: Reorder change from previous version so that + CD-ROMs keep cdrom/0660 instead of plugdev/0640. (Ubuntu #15098) + + -- Martin Pitt Mon, 12 Sep 2005 10:12:54 +0200 + +udev (0.060-1ubuntu11) breezy; urgency=low + + * extra/permissions.rules: Assign group plugdev to removable IDE drives to + make CF card readers and the like work. (Ubuntu #14495) + + -- Martin Pitt Fri, 9 Sep 2005 15:45:26 +0200 + +udev (0.060-1ubuntu10) breezy; urgency=low + + * debian/udev.init: Cope with a /dev tmpfs already being present. + (Ubuntu #14226) + Always make sure $udev_root/.udevdb is around + (Ubuntu #12915) + + -- Jeff Bailey Mon, 29 Aug 2005 22:43:55 -0400 + +udev (0.060-1ubuntu9) breezy; urgency=low + + * debian/udev.init: Fix links.conf path check. (Ubuntu #14281) + + -- Martin Pitt Mon, 29 Aug 2005 09:39:49 +0200 + +udev (0.060-1ubuntu8) breezy; urgency=low + + * extra/permissions.rules: When calling removable.sh, additionally scan usb + and ieee1394 buses since sometimes the kernel does not regard those as + removable. (Ubuntu #14063) + * extra/removable.sh: Remove the quoting in the 'for bus in "$SCAN_BUS"' + loop to make the loop actually work. + + -- Martin Pitt Thu, 25 Aug 2005 14:38:08 +0200 + +udev (0.060-1ubuntu7) breezy; urgency=low + + * Fix typo in udev.rules that prevented the /dev/pilot symlink from + appearing. + + -- Scott James Remnant Thu, 25 Aug 2005 01:08:59 +0100 + +udev (0.060-1ubuntu6) breezy; urgency=low + + * debian/rules: Ship /etc/udev/scripts/removable.sh again, the absence of + this broke automounting on half the machines out there. (Ubuntu #13520) + + -- Martin Pitt Tue, 16 Aug 2005 22:49:26 +0200 + +udev (0.060-1ubuntu5) breezy; urgency=low + + * Add compatibility /dev/js[0-9]* symlinks for old software that + don't yet look for /dev/input/js[0-9]*. + + -- Scott James Remnant Mon, 15 Aug 2005 17:41:43 +0100 + +udev (0.060-1ubuntu4) breezy; urgency=low + + * Avoid sed /I regex flag in cdsymlinks.sh, which is a GNU extension. + + -- Colin Watson Wed, 10 Aug 2005 22:07:17 +0100 + +udev (0.060-1ubuntu3) breezy; urgency=low + + * Add ide-model.sh to the udeb. + * Add z50_run.rules to the udeb, to terminate tty device processing. + * Add z70_hotplugd.rules and helpers to the udeb, for /etc/dev.d and + /etc/hotplug.d compatibility. + + -- Colin Watson Fri, 5 Aug 2005 12:47:57 +0100 + +udev (0.060-1ubuntu2) breezy; urgency=low + + * Disable SELinux support in the udeb build. + + -- Colin Watson Wed, 13 Jul 2005 16:46:19 +0100 + +udev (0.060-1ubuntu1) breezy; urgency=low + + * Resynchronise with Debian. + + * Prune 1394 rules, they are now part of 2.6.12 and udev upstream. + + * Redo the permissions.rules patch. The syntax changed slightly. + - Drop USB printer hackery, supported correctly with new kernel/udev + combo. + + -- Jeff Bailey Fri, 8 Jul 2005 03:13:25 +0000 + +udev (0.060-1) unstable; urgency=low + + * New upstream release. (Closes: #310960, #316478) + * Priority raised to optional. + * Enabled SELinux support. + * Added rules for ieee1394 devices. + + -- Marco d'Itri Sun, 3 Jul 2005 18:59:19 +0200 + +udev (0.056-3) unstable; urgency=high + + * Use group lp for USB printers. (Closes: #309091) + * Use group dialout for sl-modem devices. (Closes: #308488) + * Fix support for more than 9 partitions in removable.sh. (Closes: #306400) + * Mount the tmpfs from "tmpfs" instead of "none". (Closes: #307199) + + -- Marco d'Itri Sun, 29 May 2005 19:29:30 +0200 + +udev (0.056-2ubuntu2) breezy; urgency=low + + * Make sure that USB printers have group 'lp' (Ubuntu #10004) + + -- Jeff Bailey Fri, 6 May 2005 15:45:26 -0400 + +udev (0.056-2ubuntu1) breezy; urgency=low + + * Updated to new Debian version, reapplied Ubuntu changes manually; there + were too many changes and diversions. (#9688) + * Manually re-LSB'ified init script. + * debian/rules: Fix udeb generation. + + -- Martin Pitt Fri, 15 Apr 2005 15:17:10 +0200 + +udev (0.056-2) unstable; urgency=medium + + * Made the init script not fail if links.conf does not exist. + (Closes: #301525) + * Added RELEASE-NOTES to the documentation. (Closes: #301766) + * devfs.rules, udev.rules: fixed the ZIP drives hack. (Closes: #303133) + * Added patch add_firmwares_timeout: workaround for kernels with no + TIMEOUT support, which break the firmware events of some drivers. + (Closes: #302990) + * Moved all permissions-related rules to permissions.rules, installed + by default on upgrade. + + -- Marco d'Itri Sat, 9 Apr 2005 14:44:10 +0200 + +udev (0.056-1) unstable; urgency=medium + + * New upstream release. + * Improve warn_if_interactive() in the init script. (Closes: #299827) + * Stop adding by default /dev/.static/dev/ to mtab to silence df. + (Closes: #300435) + * Use /etc/udev/ instead of /tmp/ as the temporary mount point in + the init script. (Closes: #300705) + + -- Marco d'Itri Mon, 21 Mar 2005 14:56:51 +0100 + +udev (0.054-3) unstable; urgency=high + + * Do not use udevsend as the hotplug multiplexer on kernels < 2.6.10 + because they generate out of order hotplug events. + * Use /dev/.static/dev/ instead of /.dev/ to keep the root clean and + to not leave around devices with possibly insecure permissions. + This requires raising the versioned dependency on makedev to 2.3.1-77. + (Closes: #294968) + * Added upstream patch udev-segfault-DRIVER.patch to fix a segfault when + matching a non-initialized DRIVER. (Closes: #298192) + * devfs.rules, udev.rules: added the AOE character devices. + + -- Marco d'Itri Tue, 15 Mar 2005 11:55:38 +0100 + +udev (0.054-2) unstable; urgency=high + + * udev.rules: fixed the device name for raw parport devices. + * devfs.rules, udev.rules: try a different approach to setting permissions + for SCSI devices, by checking SYSFS{type}. Also detect sg devices used + by scanners and use the scanner group. (Closes: #297755) + + -- Marco d'Itri Sat, 5 Mar 2005 14:50:29 +0100 + +udev (0.054-1) unstable; urgency=high + + * New upstream release. + * Fix postinst to run udevstart on the right directory at install time. + (Closes: #296776, #296975) + * Use udevsend as the hotplug multiplexer and depend on hotplug + >= 0.0.20040329-17 to be sure that it will not be changed back by + its init script. + * Raised the tmpfs default size to 10 MB, because Alpha has 8 KB pages. + (Closes: #295087) + * Added raid-devfs.sh to udev-udeb. (Closes: #295634) + * devfs.rules, udev.rules: set group lp for raw parport and USB printer + devices. (Closes: #296256, #296276) + * Added an ide-model.sh init script to deal with partitions of Zip drives. + (Closes: #295369) + + -- Marco d'Itri Sat, 26 Feb 2005 13:41:16 +0100 + +udev (0.053-1) unstable; urgency=medium + + * New upstream release. + * Removed patches cdsymlinks_numeric (merged upstream) and scsi_id_tmp + (not needed anymore). + * Added some documentation to the init script for the benefit of people + who run commands without understanding their consequences. With the + same rationale, added some code which prints a scary message if the + script is started from an interactive shell. + * Added to the init script a check for the $UDEV_DISABLED variable, + which may be set on the kernel command line to easily disable udev. + * Do not start udev from postinst when installing in a chroot. + * Added to postinst yet another check for missing tmpfs. (Closes: #294575) + * CAPI devices now are owned by group dialout, per policy. + * Documented in README.Debian that the md RAID devices may not work. + * Updated the cdsymlinks script with a patch from the author. + + -- Marco d'Itri Sat, 12 Feb 2005 19:39:53 +0100 + +udev (0.051-1) unstable; urgency=low + + * New upstream release. + * Removed patch ignore_tmpfs_size_option, not needed anymore. + * Updated the rules files to include permissions. + The permissions files do not exist anymore. + * devfs.rules, udev.rules: added infiniband/* devices. (Closes: #293493) + * Fixed the Iomega ZIP rule. (See #289525) + * Stop creating dummy /dev/.udev.tdb. + + -- Marco d'Itri Sat, 5 Feb 2005 13:36:15 +0100 + +udev (0.050-6) unstable; urgency=high + + * Do not check the kernel version in preinst if udev is not already + active. (Closes: #292829) + + -- Marco d'Itri Sun, 30 Jan 2005 18:10:16 +0100 + +udev (0.050-5) unstable; urgency=high + + * Fixed broken upgrade test in postinst enable_udev(). (Closes: #290968) + * compat.rules: fixed the fix for #288932. (Closes: #289505) + * devfs.rules, udev.rules: added the all_partitions workaround for + ZIP drives. (Closes: #289525) + + -- Marco d'Itri Tue, 18 Jan 2005 18:39:54 +0100 + +udev (0.050-4) unstable; urgency=high + + * Create /dev/shm/ in postinst, because it may be missing on systems + which had devfs installed. + * Improved the code in postinst which determines the naming scheme to + detect devfs-like names on non-devfs systems. (Closes: #288308) + * Improved enable_udev() in postinst to make sure that it does not try + to mount a second tmpfs when upgrading from pre-.udevdb releases. + (Closes: #288775) + * compat.rules: create symlinks also for secondary audio, dsp and + mixer devices. (Closes: #288932) + * cdsymlinks.sh: fixed the NUMBERED_LINKS=0 case. (Closes: #288635) + + -- Marco d'Itri Fri, 7 Jan 2005 12:09:04 +0100 + +udev (0.050-3ubuntu7) hoary; urgency=low + + * extra/links.conf: Add raw1394, video1394 and video1394/0 ... + * extra/udev.permissions: ... and to here. + + * debian/udev.init: Set permissions on links created through + links.conf. + + Should provide the bare minimum /dev entries to get ieee1394 to + work. + + (Ubuntu BZ#3609) + + -- Jeff Bailey Tue, 29 Mar 2005 00:47:56 -0500 + +udev (0.050-3ubuntu6) hoary; urgency=low + + * debian/udev.preinst: Handle conffile move without dpkg questions. + (Ubuntu #4973) + + -- Martin Pitt Fri, 18 Mar 2005 14:50:43 +0100 + +udev (0.050-3ubuntu5) hoary; urgency=low + + * Add raid-devfs.sh to udev-udeb. + + -- Colin Watson Mon, 14 Feb 2005 14:27:22 +0000 + +udev (0.050-3ubuntu4) hoary; urgency=low + + * extra/udev.rules: put removable SCSI (USB, FireWire) and USB block devices + into group "plugdev" instead of "disk" to allow hal to read the file + system type and device label. This replaces the old /etc/udev/hal.rules + method of hal. Doing it in udev is more consistent and also avoids #6235. + * Added extras/removable.sh and install it in debian/rules. This replaces + the old device-removable.sh script from hal. + + -- Martin Pitt Mon, 7 Feb 2005 09:26:47 +0100 + +udev (0.050-3ubuntu3) hoary; urgency=low + + * Add debian/patches/include_sys_stat from Jeff Bailey, to fix a compilation + error with klibc due to a missing #include (Ubuntu #5826) + + -- Matt Zimmerman Thu, 27 Jan 2005 18:04:11 -0800 + +udev (0.050-3ubuntu2) hoary; urgency=low + + * Set the default hotplug helper to /sbin/udevsend + + -- Matt Zimmerman Sat, 8 Jan 2005 20:11:28 -0800 + +udev (0.050-3ubuntu1) hoary; urgency=low + + * Merge to new Debian version + * LSB'ified new code in init script + + -- Martin Pitt Wed, 5 Jan 2005 16:21:09 +0100 + +udev (0.050-3) unstable; urgency=high + + * Fixed the regexp in preinst which caused cd-aliases.rules to not be + enabled on upgrades. (Closes: #287225) + * Included scsi_id.config as an example. (Closes: #287959) + * Modified postinst and the init script to fail gracefully if the kernel + mounts a non-working tmpfs. (Closes: #288043) + * Added patch scsi_id_tmp: makes scsi_id create its temporary devices in + /dev instead of /tmp, which is read only when udevstart is run. + (Closes: #287959) + + -- Marco d'Itri Sat, 1 Jan 2005 23:57:26 +0100 + +udev (0.050-2) unstable; urgency=medium + + * Do not try to enable udev in postinst without a supported kernel. + (Closes: #287146) + + -- Marco d'Itri Sat, 25 Dec 2004 01:50:03 +0100 + +udev (0.050-1ubuntu1) hoary; urgency=low + + * Resynchronise with Debian. + * Manually resolve merge conflicts + * Remove overzealous replacement of echo with log_success_msg in init + script usage message + + -- Matt Zimmerman Sat, 25 Dec 2004 13:02:57 -0800 + +udev (0.050-1) unstable; urgency=medium + + * Added code to postinst to enable udev without rebooting. + * Stop trying to automatically restore the old /dev on removal, it cannot + made work. + * Fixed the init script to correctly recognize 2.6.1* kernels. + (Closes: #286188) + * Refuse to upgrade if the running kernel is too old. (Closes: #286530) + * Removed the scary warning about upgrades from devfs and all debconf code. + * New patch enable_after_udev disables udev if /dev/.udevdb/ does not exist. + * Fixed raid-devfs.sh and added support for Mylex controllers, courtesy + of Piotr Roszatycki. (Closes: #285066, #286809) + * Manually mount /proc before udevstart is run, because some scripts need + it. Stop running mountvirtfs, which is started again later anyway. + + -- Marco d'Itri Fri, 24 Dec 2004 13:46:13 +0100 + +udev (0.048-3) unstable; urgency=medium + + * devfs.rules: added support for /dev/{cciss,ida}/*. (Closes: #285066) + * New patch check_null_directory fixes core dump on amd64. (Closes: #285281) + * Improved the init script check for old kernels. (Closes: #285443) + * Depend on sed >= 3.95. (Closes: #285511) + * udev.permissions: fixed the inotify path. + + -- Marco d'Itri Wed, 15 Dec 2004 21:32:22 +0100 + +udev (0.048-2) unstable; urgency=high + + * Fixed again #283758, this time for real. + + -- Marco d'Itri Thu, 9 Dec 2004 19:27:45 +0100 + +udev (0.048-1) unstable; urgency=medium + + * New upstream release. + * devfs.rules, udev.rules: added Zaptel rules. (Closes: #284695) + * Made the init script fail if the system is running a kernel older + than 2.6.8. (Closes: #284782) + * Updated the udevtest-all script. (Closes: #284774) + * New patch no_strip builds unstripped executables with debugging symbols. + * Added a reportbug script. + + -- Marco d'Itri Thu, 9 Dec 2004 18:10:32 +0100 + +udev (0.046-6) unstable; urgency=high + + * Fixed preinst failure. (Closes: #284367, #284399) + * devfs.rules, udev.rules: added usb/cpad[0-9]*. (Closes: #284392) + * compat-full.rules: added ttyUSB[0-9]*. (Closes: #284264) + * Added a reportbug presubj file. + * High priority, because 0.046-5 fails to install and anyway it's + about time 046 moves to sarge. + + -- Marco d'Itri Mon, 6 Dec 2004 11:58:10 +0100 + +udev (0.046-5) unstable; urgency=medium + + * Make sure to create the default symlinks at install time even if some + other package already created a symlink for its own rules file. + (Closes: #283758) + * Added a note to README.Debian about sg nodes. (Closes: #271589) + * udev.rules, devfs.rules: fixed the names of the ALSA midi devices. + (Closes: #283527) + * Moved the rules using cdsymlinks.sh from udev.rules and compat.rules + to a new file cd-aliases.rules. + Added some code to preinst to automatically enable it at upgrade time. + * Cleaned up the rules which deal with CD devices. + * Removed from preinst the code needed to upgrade package versions older + than 0.024-9. + + -- Marco d'Itri Sat, 4 Dec 2004 14:49:44 +0100 + +udev (0.046-4) unstable; urgency=medium + + * Really move the scripts to /etc/udev/scripts/. (Closes: #283343) + * New upstream patch: fix_interfaces_renaming. (Closes: #283144) + * Deal with /etc/udev/rules.d/ being empty in postrm. (Closes: #283322) + + -- Marco d'Itri Sun, 28 Nov 2004 19:12:40 +0100 + +udev (0.046-4ubuntu2) hoary; urgency=low + + * Fix inotify permissions + + -- Thom May Mon, 6 Dec 2004 11:15:59 +0100 + +udev (0.046-4ubuntu1) hoary; urgency=low + + * Merge to new Debian revision. + + -- Martin Pitt Mon, 29 Nov 2004 08:50:01 +0100 + +udev (0.046-4) unstable; urgency=medium + + * Really move the scripts to /etc/udev/scripts/. (Closes: #283343) + * New upstream patch: fix_interfaces_renaming. (Closes: #283144) + * Deal with /etc/udev/rules.d/ being empty in postrm. (Closes: #283322) + + -- Marco d'Itri Sun, 28 Nov 2004 19:12:40 +0100 + +udev (0.046-3) unstable; urgency=medium + + * Fixed and improved /etc/init.d/udev-mtab. (Closes: #283118) + + -- Marco d'Itri Fri, 26 Nov 2004 18:32:04 +0100 + +udev (0.046-2ubuntu1) hoary; urgency=low + + * Manual merge with new Debian release: + - init script changed heavily, rewrote LSB init function usage + - activated udeb build in debian/rules + - do not install udev.startup into the udeb, it conflicts with d-i's + current rootskel + + -- Martin Pitt Fri, 26 Nov 2004 16:06:57 +0100 + +udev (0.046-2) unstable; urgency=medium + + * Run udevstart at upgrade time only if udev.tdb exists. (Closes: #282310) + * Install a new init script udev-mtab to update /etc/mtab. (Closes: #282455) + * Raised the default size of the tmpfs to 5 MB. (Closes: #282518) + * New patch ignore_tmpfs_size_option makes udev ignore the tmpfs_size + option in udev.conf. + * New patch devname.patch, from CVS. + * udev.rules: sr* devices are renamed to scd*, with a compatibility symlink. + * udev.rules, compat.rules: use cdsymlinks.sh for all kinds of cdrom drives. + (Closes: #282348) + * Added to debian/rules some code to build udev-udeb, currently disabled. + * Moved all scripts to /etc/udev/scripts/. + * Fixed postrm to not fail if /.dev/ is not present. (Closes: #283068) + + -- Marco d'Itri Fri, 26 Nov 2004 13:21:38 +0100 + +udev (0.046-1) unstable; urgency=medium + + * New upstream release. + * links.conf: manually create /dev/net/tun too. + * Try to mount --move /.dev/ over /dev/ on package removal. + * Always use mount -n in the init script. (Closes: #281921) + * Add a man page for wait_for_sysfs. (Closes: #281239) + + -- Marco d'Itri Sat, 20 Nov 2004 15:44:01 +0100 + +udev (0.042-1ubuntu3) hoary; urgency=low + + * udev-udeb depends on hotplug-udeb, not hotplug. + + -- Colin Watson Thu, 18 Nov 2004 19:05:43 +0000 + +udev (0.042-1ubuntu2) hoary; urgency=low + + * Add udev-udeb, for use in the installer. + + -- Colin Watson Tue, 16 Nov 2004 10:16:35 +0000 + +udev (0.042-1ubuntu1) hoary; urgency=low + + * Resynchronised with Debian, resolved minor merging conflicts. + * Reverted the changes from 0.026-1ubuntu4 (plugdev extension), this will be + handled by the pmount package from now on (consensus with Marco d'Itri). + * Deleted leftover work/ directory from automatic merge attempt + + -- Martin Pitt Thu, 11 Nov 2004 13:10:21 +0100 + +udev (0.042-1) unstable; urgency=medium + + * New upstream release. + * Point out again in README.Debian that rules files end in ".rules". + (Closes: #277920) + * devfs.rules, devfs.rules, udev.permissions: added pktcdvd/control. + (Closes: #278600) + * udev.permissions: added sonypi, misc/inotify. + * links.conf: manually create /dev/loop/0 and /dev/ppp, because their + drivers cannot be autoprobed in any way. + Please do not request to add other devices to the list. + + -- Marco d'Itri Sat, 30 Oct 2004 12:54:28 +0200 + +udev (0.040-1ubuntu3) hoary; urgency=low + + * Use "scd" device names in place of "sr", with a compatibility symlink for + the latter (Closes: Ubuntu#1909) + + -- Matt Zimmerman Thu, 28 Oct 2004 23:15:53 -0700 + +udev (0.040-1ubuntu2) hoary; urgency=low + + * Resolve merge conflicts + + -- Matt Zimmerman Thu, 28 Oct 2004 17:42:04 -0700 + +udev (0.040-1ubuntu1) hoary; urgency=low + + * Resynchronise with Debian. + + -- Scott James Remnant Thu, 28 Oct 2004 09:53:41 +0100 + +udev (0.040-1) unstable; urgency=medium + + * New upstream release. + + Removed patch hotplug.dev_exec, merged upstream. + * devfs.rules, udev.rules, udev.permissions: moved pktcdvd* to pktcdvd/, + as requested by the udftools maintainer. (Closes: #274110) + * scsi-devfs.sh: create .../disc instead of .../disk. (Closes: #276484) + * Added a workaround to mount the tmpfs even if .udev.tdb exists in the + static /dev/ directory. + + -- Marco d'Itri Fri, 22 Oct 2004 16:36:57 +0200 + +udev (0.034-1) unstable; urgency=medium + + * New upstream release. + + Removed patch udev-whitespace-bug-01.patch, merged upstream. + * New debconf translation: nl. (Closes: #274895) + * udev.permissions: made /dev/mouse*, /dev/input/mouse* and /dev/input/mice + mode 600. (Closes: #275392) + * udev.rules: fixed errors in the sg and DVB rules. (Closes: #275469) + + -- Marco d'Itri Sat, 9 Oct 2004 14:50:22 +0200 + +udev (0.032-2) unstable; urgency=medium + + * Fixed postrm failure. (Closes: #274272) + * Added support for DVB devices. (Closes: #274335) + * Added partial support for an alternative mount point. + + -- Marco d'Itri Sun, 3 Oct 2004 12:32:48 +0200 + +udev (0.032-1) unstable; urgency=medium + + * New upstream release. + + Removed patch udevstart-fix-01.patch, merged upstream. + * Delete rules.d/ symlinks in postrm. (Closes: #271570) + * Fixed a variable name in cdsymlinks.conf. (Closes: #271656) + * Make preinst not fail if start-stop-daemon --stop fails. (Closes: #273098) + * Make inputdev.sh accept an optional keywords regexp. (Closes: #272434) + * udev.permissions: removed djs* because it's obsolete. (Closes: #272188) + * devfs.rules: fixed the "hd[a-z]*" pattern. (Closes: #271723) + + -- Marco d'Itri Thu, 30 Sep 2004 16:12:59 +0200 + +udev (0.031-2) unstable; urgency=high + + * New patch udevstart-fix-01.patch fixes %-arguments passed to PROGRAMs. + (Closes: #271372) + * Added simple-cd-aliases.rules, not enabled by default. + * Added a note to README.Debian about timestamps and non-UTC system + clocks. (Closes: #259697) + + -- Marco d'Itri Mon, 13 Sep 2004 10:03:23 +0200 + +udev (0.031-1) unstable; urgency=medium + + * New upstream release. Fixes: + + At boot time, create the mem devices before the others. (Closes: #258590) + * Run mountvirtfs in the init script, just to be sure. (See #258214) + * Updated cdsymlinks.sh, courtesy of Darren Salt. (Closes: #247179, #255150) + * scsi-devfs.sh: added support for nst* devices. (Closes: #266419) + * Fix installation of compat-full.rules in postinst. (Closes: #261559) + * udev.permissions: made /dev/input/js* and /dev/input/mouse* world + readable and /dev/input/mice world writeable. (Closes: #260941) + * udev.permissions: made /dev/usb/legousbtower world writeable. + (Closes: #265987) + * udev.rules, devfs.rules: added /dev/cpu/*/. (Closes: #265922) + * udev.rules, devfs.rules: fixed some wildcards. (Closes: #269707) + * udev.rules, devfs.rules: added /dev/input/uinput. (Closes: #270446) + * New script inputdev.sh to support different permissions for some + input events devicse, by Darren Salt. (Closes: #265799) + + -- Marco d'Itri Sun, 12 Sep 2004 20:11:57 +0200 + +udev (0.030-1) unstable; urgency=medium + + * New upstream release. + * New debconf translation: de. (Closes: #254545) + * rtc: 660 => 664 + * input/*: 644 => 600 (Closes: #257165) + + -- Marco d'Itri Sun, 11 Jul 2004 16:59:49 +0200 + +udev (0.026-1ubuntu5) warty; urgency=low + + * Create joystick devices world-readable + + -- Matt Zimmerman Fri, 17 Sep 2004 15:22:54 -0700 + +udev (0.026-1ubuntu4) warty; urgency=low + + * Added and installed extra/removable.sh to test whether a device is + removable (this will only work on kernels 2.6.8 and up; on earlier kernels + this script considers every device as non-removable) + * udev.rules: put IDE and SCSI devices in group 'plugdev' if they are + removable (Warty bug #996) + * udev.postinst: Ensure that group 'plugdev' exists. + + -- Martin Pitt Mon, 6 Sep 2004 12:21:26 +0200 + +udev (0.026-1ubuntu3) warty; urgency=low + + * Added versioned depend on lsb-base + + -- Nathaniel McCallum Fri, 3 Sep 2004 15:16:38 -0400 + +udev (0.026-1ubuntu2) warty; urgency=low + + * debian/udev.init: pretty initscript + + -- Nathaniel McCallum Fri, 3 Sep 2004 12:13:37 -0400 + +udev (0.026-1ubuntu1) warty; urgency=high + + * Patch udev.permissions such that /dev/input devices are mode 0600 rather + than 0644. This prevents a security issue where any user could, for + example, sniff passwords typed at the console + + -- Matt Zimmerman Mon, 5 Jul 2004 14:43:17 -0700 + +udev (0.026-1) unstable; urgency=medium + + * New upstream release. (Closes: #251566) + * udev_dbus and udev_selinux have been removed. (Closes: #243429) + * udev.permissions: added pktcdvd[0-9]*. (Closes: #252383) + * Depending on initscripts >= 2.85-16 allows to simplify the init script. + * Removed patches devfs.sh-ide-floppy, devnode_to_devname.patch and + extras_no_logging which have been merged upstream. + + -- Marco d'Itri Tue, 8 Jun 2004 11:27:54 +0200 + +udev (0.024-9) unstable; urgency=low + + * Removed MAKEDEV-wrapper and Depend on makedev > 2.3.1-70. (Closes: #245441) + * /etc/udev/.dev/ moved to /.dev/. (Closes: #246592) + If you do not want to see it anyway, just rmdir it. + You will have to manually remove /etc/udev/.dev/ after the next reboot. + You want to reboot soon anyway because MAKEDEV has been updated to look + for the new directory. + * Added a script to create by default a /dev/cdrom symlink, courtesy of + Michal Čihař. (Closes: #247179) + * Added Japanese debconf template translation. (Closes: #245434) + * Add /dev/misc/nvram to devfs.rules. (Closes: #246125) + * Fixed the group of /dev/fb*. (Closes: #246011) + * When installing on a devfs system enable compat-full.rules if + /dev/tty1 exists. (Closes: #251146) + * Removed support for $udev_root from the init script. (Closes: #249183) + * Do not start udev if the kernel lacks tmpfs support. (Closes: #250476) + * Make the nvram device g+rw and owned by group nvram. + + -- Marco d'Itri Fri, 28 May 2004 20:32:19 +0200 + +udev (0.024-7) unstable; urgency=high + + * Fixed the permissions of /dev. (Closes: #245073) + * Added Czech debconf template translation. (Closes: #244423) + * Minor preinst improvements. (Closes: #245154) + * Fixed the permissions of /dev/st*. (Closes: #244239) + * Added rules for the tun/tap devices. (Closes: #244025) + * Moved the permissions file to /etc/udev/permissions.d/. (Closes: #243949) + + -- Marco d'Itri Thu, 22 Apr 2004 01:53:33 +0200 + +udev (0.024-6) unstable; urgency=high + + * Make postinst detect correctly if dbus is installed. (Closes: #243817) + + -- Marco d'Itri Thu, 15 Apr 2004 19:36:49 +0200 + +udev (0.024-5) unstable; urgency=medium + + * Ignore broken links when updating /etc/udev/rules.d/. (Closes: #243249) + * Use invoke-rc.d to restart d-bus. (Closes: #243336) + * If devfs is being used, use devfs-style names by default. (Closes: #243164) + * Added support for IDE floppy drives. (Closes: #243093) + * Added French debconf template translation. (Closes: #242890) + * Conflict with lvm-common < 1.5.13. (Closes: #236346) + * Let's try to only Recommend dbus and see what happens. (Closes: #240500) + + -- Marco d'Itri Wed, 14 Apr 2004 14:44:43 +0200 + +udev (0.024-4) unstable; urgency=high + + * Fix the names of USB printers. (Closes: #242512) + * Added a new rules file compat-full.rules. (Closes: #241364) + * udev-devfs.rules and udev-compat.rules have been renamed, the preinst + script tries to fix the /etc/udev/rules.d/ symlinks, if any exists. + It cannot recognize some corner cases, so please check your system + after the upgrade. + + -- Marco d'Itri Thu, 8 Apr 2004 02:07:43 +0200 + +udev (0.024-3) unstable; urgency=high + + * Fixed SCSI CD names in udev.rules. (Closes: #242443) + + -- Marco d'Itri Tue, 6 Apr 2004 20:43:40 +0200 + +udev (0.024-2) unstable; urgency=high + + * New patch devnode_to_devname.patch to fix broken udev_dbus, + courtesy of Sjoerd Simons. (Closes: #242283, #242374) + * Added rules to set the permissions of rfcomm[0-9]* and hd[a-s]. + (Closes: #242306) + * New debconf template: pt_BR. (Closes: #242089) + * Read the permissions of /dev/pts/ from /etc/defaults/devpts. + (Closes: #242054) + + -- Marco d'Itri Tue, 6 Apr 2004 18:21:30 +0200 + +udev (0.024-1) unstable; urgency=high + + * New upstream release. + "high" urgency because the package currently in testing sucks too much. + * Removed patch ide-devfs_fix_no_media, which has been merged upstream. + * Clarify README.Debian. (Closes: #241318) + + -- Marco d'Itri Sat, 3 Apr 2004 14:23:09 +0200 + +udev (0.023-3) unstable; urgency=medium + + * Changed again the default rules source: now udev.conf will default to + reading all files in /etc/udev/rules.d/. If the directory is empty, + postinst will create in it a symlink to ../udev.rules. + Please double check that it's the rules set you really want to use. + * Depends on libselinux1-dev. (Closes: #240755) + * Fixed the permissions of /dev/rtc. (Closes: #240905) + * Let's try moving /sbin/udev_dbus to /usr/sbin/. (See #240500) + + -- Marco d'Itri Wed, 31 Mar 2004 17:18:51 +0200 + +udev (0.023-2) unstable; urgency=medium + + * Fixed cdrom group permissions. (Closes: #240521) + * Fixed symlinks in /etc/dev.d/. (Closes: #240517) + * Allow db_input calls to fail. (Closes: #240520) + + -- Marco d'Itri Sun, 28 Mar 2004 19:16:59 +0200 + +udev (0.023-1) unstable; urgency=medium + + * New upstream release. + * Enabled SE Linux support. Untested. + * I wonder if I should make the package not depend on the dbus and + selinux libraries, as they are only used by the little programs + in /etc/dev.d/. I encourage comments. + * New patch extras_no_logging: needed to make the dbus and selinux + helpers compile. Side effect: disables logging for them. + * Removed patch udev022_namedev_symlink_fix.patch, merged upstream. + * Removed patch run_usr_sbin_udev which is not needed anymore. + * Use tmpfs instead of ramfs. (Closes: #239941) + * Use debconf to print the reboot notice and a warning for devfs users, + patch courtesy of Scott Robinson . (Closes: #240291) + * Make sure that all cdrom drives are recognized in udev.rules. + (Closes: #239877) + * Make sg* devices of CD drives owned by the cdrom group. (Closes: #240315) + * Modified the init script to unmount /dev/pts and remount it on the + tmpfs. + + -- Marco d'Itri Sat, 27 Mar 2004 14:49:37 +0100 + +udev (0.022-1) unstable; urgency=medium + + * The "millions of flies cannot be wrong" release. + * Switched the default /dev layout to traditional style. + (Closes: #237482, #237484) + * Removed the patches udevstart_no_retval and strip_trailing_blanks + because they have been merged upstream. + * New patch run_usr_sbin_udev: first try to run /usr/sbin/udev and then + /sbin/udev if the first does not exist. This is useful to support + D-BUS without moving all the related libraries in /lib. + * New patch udev022_namedev_symlink_fix.patch, upstream bugfix. + * Make the MAKEDEV wrapper smarter by checking if something has really + been mounted over /etc/udev/.dev. + * Depends on sysvinit (>= 2.85-10) to use the already mounted /proc + and /sys. + * Limit the /dev ramfs size to 1 MB, I hope this will be enough for + any reasonable system. + * Cleaned up the init script. (Closes: #237243) + * New patch ide-devfs_fix_no_media: make ide-devfs.sh check if + /proc/ide/*/media really exists before using it. + * Updated udev.rules and udev.permissions. + (Closes: #236708, #236602, #237478) + * Added partial and untested support for SCSI tapes to scsi-devfs.sh. + (Closes: #238825) + + -- Marco d'Itri Sun, 21 Mar 2004 13:31:02 +0100 + +udev (0.021-1) unstable; urgency=medium + + * New upstream release. + * New patch udevstart_no_retval makes udevsend always return success. + * New patch strip_trailing_blanks makes comparisons of sysfs fields + ignore trailing blanks. + * Removed patches fix_expr, man-dashes.diff, no_error_on_enoent, + udev019_symlink.patch because they have been merged upstream. + + -- Marco d'Itri Thu, 4 Mar 2004 02:25:35 +0100 + +udev (0.019-3) unstable; urgency=low + + * Initial release. (Closes: #221915) + * kill udevd on upgrade. + * Removed support for multiple files in $udev_rules, now all files matching + /etc/udev/*.rules will be parsed. + * Make the ide/*/cd devices owned by cdrom group. + * Added default aliases for ttyN, ttySN and lpN. + * New patch: man-dashes.diff, fixes unescaped dashes in the man pages + (by Philipp Matthias Hahn). + * Added an updated scsi-devfs.sh from Daniel Mueller . + + -- Marco d'Itri Tue, 2 Mar 2004 19:37:30 +0100 --- udev-079.orig/debian/udev.init +++ udev-079/debian/udev.init @@ -0,0 +1,107 @@ +#!/bin/sh -e +# init script for udev + +# Check the package is still installed +[ -x /sbin/udevd ] || exit 0 + +# Get LSB functions +. /lib/lsb/init-functions +. /etc/default/rcS + + +case "$1" in + start) + # We need the uevent support introduced in 2.6.15, bail out if we + # don't have it and fall back to a static /dev + if [ ! -f /sys/class/mem/null/uevent ]; then + if mountpoint -q /dev; then + # uh-oh, initramfs made some kind of /dev, get rid of it + umount -l /dev/.static/dev + umount -l /dev + fi + exit 1 + fi + + if ! mountpoint -q /dev; then + # initramfs didn't mount /dev, so we'll need to do that + mount -n --bind /dev /etc/udev + mount -n -t tmpfs -o mode=0755 udev /dev + mkdir -m 0700 -p /dev/.static/dev + mount -n --move /etc/udev /dev/.static/dev + fi + + # Copy over default device tree + cp -a -f /lib/udev/devices/* /dev + + # It's all over netlink now + echo "" > /proc/sys/kernel/hotplug + + # Start udevd + log_begin_msg "Starting kernel event manager..." + if start-stop-daemon --start --quiet --exec /sbin/udevd -- --daemon; then + log_end_msg 0 + else + log_end_msg $? + fi + + # This next bit can take a while + if type usplash_write >/dev/null 2>&1; then + usplash_write "TIMEOUT 360" + trap "usplash_write 'TIMEOUT 15'" 0 + fi + + # Log things that udevplug does (won't work on seb's machine) + if [ -x /usr/sbin/udevmonitor ]; then + /usr/sbin/udevmonitor -e >/dev/.udev.log & + UDEV_MONITOR_PID=$! + fi + + # Fix permissions and missing symlinks/programs for devices made in + # initramfs, and catch up on everything we missed + log_begin_msg "Loading hardware drivers..." + if /sbin/udevplug; then + log_end_msg 0 + else + log_end_msg $? + fi + + # Kill the udevmonitor again + if [ -n "$UDEV_MONITOR_PID" ]; then + kill $UDEV_MONITOR_PID + fi + ;; + stop) + log_begin_msg "Stopping kernel event manager..." + if start-stop-daemon --stop --quiet --oknodo --exec /sbin/udevd; then + log_end_msg 0 + else + log_end_msg $? + fi + umount -l /dev/.static/dev + umount -l /dev + ;; + restart) + cp -au /lib/udev/devices/* /dev + + log_begin_msg "Loading additional hardware drivers..." + if /sbin/udevplug; then + log_end_msg 0 + else + log_end_msg $? + fi + ;; + reload|force-reload) + log_begin_msg "Reloading kernel event manager..." + if start-stop-daemon --stop --signal 1 --exec /sbin/udevd; then + log_end_msg 0 + else + log_end_msg $? + fi + ;; +*) + echo "Usage: /etc/init.d/udev {start|stop|restart|reload|force-reload}" + exit 1 + ;; +esac + +exit 0 --- udev-079.orig/debian/control +++ udev-079/debian/control @@ -0,0 +1,29 @@ +Source: udev +Section: admin +Priority: important +Maintainer: Scott James Remnant +Standards-Version: 3.6.2.1 +Build-Depends: debhelper (>= 4.1), libselinux1-dev (>= 1.28-1), libsepol1-dev + +Package: udev +Architecture: any +Depends: ${shlibs:Depends}, module-init-tools (>= 3.2.1-0ubuntu3), initramfs-tools (>= 0.040ubuntu25), grepmap (>= 1.1.0-1) +Conflicts: hotplug +Replaces: hotplug, initramfs-tools (<< 0.040ubuntu1), ifrename +Description: rule-based device node and kernel event manager + udev is a collection of tools and a daemon to manage events received from + the kernel and deal with them in user-space. Primarily this involves + creating and removing device nodes in /dev when hardware is discovered or + removed from the system. + . + Events are received via kernel netlink messaged and processed according to + rules in /etc/udev/rules.d, altering the name of the device node, creating + additional symlinks or calling other tools and programs including those to + load kernel modules and initialise the device. + +Package: udev-udeb +XC-Package-Type: udeb +Section: debian-installer +Architecture: any +Depends: ${shlibs:Depends}, grepmap-udeb +Description: rule-based device node and kernel event manager --- udev-079.orig/debian/udev.initramfs-premount +++ udev-079/debian/udev.initramfs-premount @@ -0,0 +1,37 @@ +#!/bin/sh -e +# initramfs premount script for udev + +PREREQ="" + +# Output pre-requisites +prereqs() +{ + echo "$PREREQ" +} + +case "$1" in + prereqs) + prereqs + exit 0 + ;; +esac + + +# It's all over netlink now +echo "" > /proc/sys/kernel/hotplug + +# Start the udev daemon to process events +/sbin/udevd --daemon + +# Each call to udevplug can take up to three minutes +if [ -x /sbin/usplash_write ]; then + /sbin/usplash_write "TIMEOUT 180" + trap "/sbin/usplash_write 'TIMEOUT 15'" 0 +fi + +# We need to get all the basic /dev devices in place, and deal with +# the elmos of the world who've compiled various bus drivers into the +# kernel already. On normal systems these buses won't even exist at this +# point. +/sbin/udevplug -Bide -Bscsi -Bi2o -Busb -Bieee1394 \ + -Cscsi_device -Cusb_host -Cusb_device -Cmem -Cmisc -Ctty -Cvc -b --- udev-079.orig/debian/udev.initramfs-local +++ udev-079/debian/udev.initramfs-local @@ -0,0 +1,42 @@ +#!/bin/sh -e +# initramfs local-top script for udev + +PREREQ="" + +# Output pre-requisites +prereqs() +{ + echo "$PREREQ" +} + +case "$1" in + prereqs) + prereqs + exit 0 + ;; +esac + + +# Each call to udevplug can take up to three minutes +if [ -x /sbin/usplash_write ]; then + /sbin/usplash_write "TIMEOUT 540" + trap "/sbin/usplash_write 'TIMEOUT 15'" 0 +fi + +# Load drivers for storage controllers found on the PCI bus; these +# show up the same for both IDE and SCSI so there's no point +# differentiating between the two. Do it in serial to try and +# provide some predictability for which wins each time. +/sbin/udevplug -s -Bpci -Iclass=0x01* + +# We also need to load drivers for bridges (0x06), docking stations +# (0x0a), input devices (0x09), serial devices (0x0c) and "intelligent" +# devices (0x0e). This is both to support filesystems on the end and +# just in case there's a keyboard on the end and things go wrong. +/sbin/udevplug -Bpci -Iclass=0x0[69ace]* + +# If we're booting from IDE, it might not be a PCI controller, +# but might be an old fashioned ISA controller; in which case +# we need to load ide-generic. +/sbin/modprobe -Qb ide-generic +/sbin/udevplug -W --- udev-079.orig/debian/udev.initramfs-bottom +++ udev-079/debian/udev.initramfs-bottom @@ -0,0 +1,34 @@ +#!/bin/sh -e +# initramfs premount script for udev + +PREREQ="" + +# Output pre-requisites +prereqs() +{ + echo "$PREREQ" +} + +case "$1" in + prereqs) + prereqs + exit 0 + ;; +esac + + +# Stop udevd, we'll miss a few events while we run init, but we catch up +for proc in /proc/[0-9]*; do + [ -x $proc/exe ] || continue + [ $(readlink $proc/exe) != /sbin/udevd ] || kill ${proc#/proc/} +done + +# udevd might have been in the middle of something when we killed it, +# but it doesn't matter because we'll do everything again in userspace +rm -rf /dev/.udev/queue + +# Move the real filesystem's /dev to beneath our tmpfs, then move it all +# to the real filesystem +mkdir -m 0700 -p /dev/.static/dev +mount -n -o bind ${rootmnt}/dev /dev/.static/dev +mount -n -o move /dev ${rootmnt}/dev --- udev-079.orig/debian/udev.initramfs-nfs +++ udev-079/debian/udev.initramfs-nfs @@ -0,0 +1,36 @@ +#!/bin/sh -e +# initramfs nfs-top script for udev + +PREREQ="" + +# Output pre-requisites +prereqs() +{ + echo "$PREREQ" +} + +case "$1" in + prereqs) + prereqs + exit 0 + ;; +esac + + +# Each call to udevplug can take up to three minutes +if [ -x /sbin/usplash_write ]; then + /sbin/usplash_write "TIMEOUT 360" + trap "/sbin/usplash_write 'TIMEOUT 15'" 0 +fi + +# All we need to do is load drivers for any network card on the PCI +# bus, and hopefully we'll have one that can be used to boot +# afterwards; load them in PCI bus order to try and produce some kind +# of sanity. +/sbin/udevplug -s -Bpci -Iclass=0x02* + +# Finally we need to load drivers for bridges (0x06), +# docking stations (0x0a), input devices (0x09), serial devices (0x0c) +# and "intelligent" devices (0x0e). Just in case there's a keyboard +# on the end and things go wrong. +/sbin/udevplug -Bpci -Iclass=0x0[69ace]* --- udev-079.orig/debian/udev.dirs +++ udev-079/debian/udev.dirs @@ -0,0 +1,7 @@ +/lib/firmware +/lib/udev +/usr/share/initramfs-tools/hooks +/usr/share/initramfs-tools/scripts/init-premount +/usr/share/initramfs-tools/scripts/local-top +/usr/share/initramfs-tools/scripts/nfs-top +/usr/share/initramfs-tools/scripts/init-bottom --- udev-079.orig/debian/rules +++ udev-079/debian/rules @@ -0,0 +1,243 @@ +#!/usr/bin/make -f +# debian/rules for the udev package. +# Copyright © 2006 Canonical Ltd. +# Author: Scott James Remnant + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +export DH_OPTIONS + +# Disable optimisations if noopt found in $DEB_BUILD_OPTIONS +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + OPTFLAGS=-O0 +else + OPTFLAGS=-Os +endif + +# Extra tools that come with udev that we want to build +EXTRAS = extras/ata_id extras/cdrom_id extras/dasd_id extras/edd_id \ + extras/scsi_id extras/usb_id extras/volume_id \ + extras/dvb_device_name extras/usb_device_name extras/ide_media \ + extras/vio_type extras/pnp_modules extras/firmware extras/floppy \ + extras/iftab + + +# Apply patches to the package +patch: patch-stamp +patch-stamp: + dh_testdir + @patches=debian/patches/*.patch; for patch in $$patches; do \ + test -f $$patch || continue; \ + echo "Applying $$patch"; \ + patch -stuN -p1 < $$patch || exit 1; \ + done + touch $@ + +# Remove patches from the package +unpatch: + dh_testdir + @if test -f patch-stamp; then \ + patches=debian/patches/*.patch; \ + for patch in $$patches; do \ + reversepatches="$$patch $$reversepatches"; \ + done; \ + for patch in $$reversepatches; do \ + test -f $$patch || continue; \ + echo "Reversing $$patch"; \ + patch -suRf -p1 < $$patch || exit 1; \ + done; \ + rm -f patch-stamp; \ + fi + + +# Build the package +build: patch-stamp build-stamp +build-stamp: + dh_testdir + + test -d udeb || mkdir udeb + find -print0 | cpio -pdm0l udeb + + $(MAKE) V=true USE_SELINUX=true EXTRAS="$(EXTRAS)" \ + OPTFLAGS="$(OPTFLAGS)" STRIPCMD= + + $(MAKE) -C udeb V=true USE_SELINUX=false EXTRAS="$(EXTRAS)" \ + OPTFLAGS="$(OPTFLAGS)" STRIPCMD= + + touch $@ + +# Install files into the deb +install-deb: DH_OPTIONS=-pudev +install-deb: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + dh_install + + $(MAKE) install V=true EXTRAS="$(EXTRAS)" DESTDIR=$(CURDIR)/debian/udev + + # Shipped in examples + rm -f debian/udev/etc/scsi_id.config + + # We use udevplug instead of these programs + rm -f debian/udev/sbin/udev + rm -f debian/udev/sbin/udevstart \ + debian/udev/usr/share/man/man8/udevstart.8 + + # Hook into initramfs-tools + install -m 755 -o root -g root debian/udev.initramfs-hook \ + debian/udev/usr/share/initramfs-tools/hooks/udev + install -m 755 -o root -g root debian/udev.initramfs-premount \ + debian/udev/usr/share/initramfs-tools/scripts/init-premount/udev + install -m 755 -o root -g root debian/udev.initramfs-local \ + debian/udev/usr/share/initramfs-tools/scripts/local-top/udev + + install -D -m 755 -o root -g root debian/udev.initramfs-local \ + debian/udev/usr/share/initramfs-tools/scripts/casper-premount/udev + + install -m 755 -o root -g root debian/udev.initramfs-nfs \ + debian/udev/usr/share/initramfs-tools/scripts/nfs-top/udev + install -m 755 -o root -g root debian/udev.initramfs-bottom \ + debian/udev/usr/share/initramfs-tools/scripts/init-bottom/udev + + # Construct the initial device tree (things udev doesn't provide) + install -d debian/udev/lib/udev/devices + install -d debian/udev/lib/udev/devices/net + install -d debian/udev/lib/udev/devices/pts + install -d debian/udev/lib/udev/devices/shm + install -d debian/udev/lib/udev/devices/loop + + ln -sn /proc/self/fd debian/udev/lib/udev/devices/fd + ln -sn /proc/self/fd/0 debian/udev/lib/udev/devices/stdin + ln -sn /proc/self/fd/1 debian/udev/lib/udev/devices/stdout + ln -sn /proc/self/fd/2 debian/udev/lib/udev/devices/stderr + ln -sn /proc/kcore debian/udev/lib/udev/devices/core + ln -sn /proc/asound/oss/sndstat debian/udev/lib/udev/devices/sndstat + ln -sn /sbin/MAKEDEV debian/udev/lib/udev/devices/MAKEDEV + + mknod -m 600 debian/udev/lib/udev/devices/ppp c 108 0 + mknod -m 600 debian/udev/lib/udev/devices/loop/0 b 7 0 + mknod -m 600 debian/udev/lib/udev/devices/net/tun c 10 200 + mknod -m 640 debian/udev/lib/udev/devices/kmem c 1 2 + chgrp kmem debian/udev/lib/udev/devices/kmem + + # Add devices we need to start udevd itself + mknod -m 600 debian/udev/lib/udev/devices/console c 5 1 + mknod -m 600 debian/udev/lib/udev/devices/null c 1 3 + + # Copy across all of the rules + @rules=debian/rules.d/*.rules; set -x; for rule in $$rules; do \ + install -m 644 -o root -g root $$rule \ + debian/udev/etc/udev/rules.d || exit 1; \ + done + + # Also copy across the persistent rules, removing the /sbin/ bit + sed -e "s,/sbin/,," debian/udev/etc/udev/rules.d/65-persistent-disk.rules + chown root:root debian/udev/etc/udev/rules.d/65-persistent-disk.rules + chmod 0644 debian/udev/etc/udev/rules.d/65-persistent-disk.rules + +# Install files into the udeb +install-udeb: DH_OPTIONS=-pudev-udeb +install-udeb: install-deb + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Copy binaries that we want + cp -a udeb/udevd debian/udev-udeb/sbin + cp -a udeb/udevplug debian/udev-udeb/sbin + cp -a udeb/udevinfo debian/udev-udeb/usr/bin + cp -a udeb/udevmonitor debian/udev-udeb/usr/sbin + + # Copy helpers that we want + cp -a udeb/extras/usb_device_name/usb_device_name debian/udev-udeb/lib/udev + cp -a udeb/extras/dvb_device_name/dvb_device_name debian/udev-udeb/lib/udev + cp -a udeb/extras/pnp_modules/pnp_modules debian/udev-udeb/lib/udev + cp -a udeb/extras/ide_media/ide_media debian/udev-udeb/lib/udev + cp -a udeb/extras/vio_type/vio_type debian/udev-udeb/lib/udev + cp -a udeb/extras/firmware/firmware_helper debian/udev-udeb/lib/udev + cp -a udeb/extras/ata_id/ata_id debian/udev-udeb/lib/udev + cp -a udeb/extras/edd_id/edd_id debian/udev-udeb/lib/udev + cp -a udeb/extras/usb_id/usb_id debian/udev-udeb/lib/udev + cp -a udeb/extras/volume_id/vol_id debian/udev-udeb/lib/udev + cp -a udeb/extras/dasd_id/dasd_id debian/udev-udeb/lib/udev + cp -a udeb/extras/scsi_id/scsi_id debian/udev-udeb/lib/udev + cp -a udeb/extras/path_id debian/udev-udeb/lib/udev + + # Copy the storage_enum helper + install -m 755 -o root -g root udeb/extras/storage_enum.sh \ + debian/udev-udeb/lib/udev/storage_enum + + # Copy all of the default devices from the deb + cp -a debian/udev/lib/udev/devices debian/udev-udeb/lib/udev + + # Copy across the configuration file from the deb + cp -a debian/udev/etc/udev/udev.conf debian/udev-udeb/etc/udev + + # Copy across all of the installer rules + @rules=debian/installer-rules.d/*.rules; \ + set -x; for rule in $$rules; do \ + install -m 644 -o root -g root $$rule \ + debian/udev-udeb/etc/udev/rules.d || exit 1; \ + done + + # Copy across standard rules we want too + install -m 644 -o root -g root debian/rules.d/00-init.rules \ + debian/udev-udeb/etc/udev/rules.d + install -m 644 -o root -g root debian/rules.d/20-names.rules \ + debian/udev-udeb/etc/udev/rules.d + install -m 644 -o root -g root debian/udev/etc/udev/rules.d/65-persistent-disk.rules \ + debian/udev-udeb/etc/udev/rules.d + install -m 644 -o root -g root debian/rules.d/80-programs.rules \ + debian/udev-udeb/etc/udev/rules.d + install -m 644 -o root -g root debian/rules.d/90-modprobe.rules \ + debian/udev-udeb/etc/udev/rules.d + + # Startup script + install -m 755 -o root -g root debian/udev.installer-startup \ + debian/udev-udeb/lib/debian-installer-startup.d/S02udev + +binary: binary-indep binary-arch + +# Build architecture-independent files here. +binary-indep: +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: DH_OPTIONS=-a +binary-arch: build install-deb install-udeb + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_installexamples + dh_installinit --no-start -- start 10 S . + dh_link + dh_strip + dh_compress + dh_fixperms -X/lib/udev/devices/ + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + + +# Clean up the mess we made +clean: clean-source unpatch +clean-source: + dh_testdir + rm -f build-stamp + + rm -rf udeb + -$(MAKE) clean V=true EXTRAS="$(EXTRAS)" + + dh_clean + + +.PHONY: patch unpatch build install-deb install-udeb \ + binary-indep binary-arch binary clean clean-source