]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
udev: update to 141 and cleanup rules.
authorArne Fitzenreiter <arne_f@ipfire.org>
Tue, 30 Oct 2012 13:25:33 +0000 (14:25 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Tue, 30 Oct 2012 13:25:33 +0000 (14:25 +0100)
13 files changed:
config/rootfiles/common/compat-wireless
config/rootfiles/common/udev
config/rootfiles/packages/bluetooth
config/udev/10-dvb.rules [deleted file]
config/udev/55-scsi-cdrom.rules [deleted file]
config/udev/dvb.sh [deleted file]
lfs/bluetooth
lfs/compat-wireless
lfs/udev
src/patches/udev-125-netif_rename.patch [deleted file]
src/patches/udev-141_no_netif_rename.patch [new file with mode: 0644]
src/patches/udev-config-6.2_persistent-storage-fix.patch [deleted file]
src/patches/udev-config-6.2_remove-lfs-usb-rule.patch [deleted file]

index 80018c84d1a323a95040a7d3a4684fc9447a36fd..5a562d282527dd9d19892920ce4e61805efa0de4 100644 (file)
@@ -1,2 +1,2 @@
-etc/udev/rules.d/50-compat_firmware.rules
+lib/udev/rules.d/50-compat_firmware.rules
 lib/udev/compat_firmware.sh
index 58df07cee369c530e81351195cb94f1a45b5c17b..0d513f6ddd5414283cabc1481def295c14480fad 100644 (file)
@@ -1,25 +1,18 @@
 etc/modprobe.d/blacklist
 etc/scsi_id.config
 etc/udev
-#etc/udev/dvb.sh
 #etc/udev/rules.d
-#etc/udev/rules.d/05-udev-early.rules
-#etc/udev/rules.d/10-dvb.rules
-#etc/udev/rules.d/25-lfs.rules
-#etc/udev/rules.d/26-modprobe.rules
-#etc/udev/rules.d/27-firmware.rules
 #etc/udev/rules.d/30-persistent-network.rules
-#etc/udev/rules.d/55-scsi-cdrom.rules
-#etc/udev/rules.d/60-persistent-storage.rules
-#etc/udev/rules.d/81-cdrom.rules
 #etc/udev/udev.conf
 #lib/firmware
-lib/firmware/dirinfo
-lib/libvolume_id.so.0
-lib/libvolume_id.so.0.85.0
+lib/libudev.so.0
+lib/libudev.so.0.2.0
+lib/libvolume_id.so.1
+lib/libvolume_id.so.1.1.0
 lib/udev
 #lib/udev/ata_id
 #lib/udev/cdrom_id
+#lib/udev/collect
 #lib/udev/create_floppy_devices
 #lib/udev/devices
 #lib/udev/devices/core
@@ -33,27 +26,36 @@ lib/udev
 #lib/udev/edd_id
 #lib/udev/enable_codel
 #lib/udev/firmware.sh
+#lib/udev/fstab_import
 #lib/udev/path_id
+#lib/udev/rule_generator.functions
 #lib/udev/rules.d
+#lib/udev/rules.d/50-firmware.rules
 #lib/udev/rules.d/50-udev-default.rules
 #lib/udev/rules.d/60-cdrom_id.rules
 #lib/udev/rules.d/60-persistent-input.rules
+#lib/udev/rules.d/60-persistent-serial.rules
 #lib/udev/rules.d/60-persistent-storage-tape.rules
 #lib/udev/rules.d/60-persistent-storage.rules
 #lib/udev/rules.d/60-persistent-v4l.rules
 #lib/udev/rules.d/61-persistent-storage-edd.rules
+#lib/udev/rules.d/75-cd-aliases-generator.rules
+#lib/udev/rules.d/79-fstab_import.rules
 #lib/udev/rules.d/80-drivers.rules
 #lib/udev/rules.d/95-udev-late.rules
 #lib/udev/rules.d/99-codel.rules
 #lib/udev/scsi_id
 #lib/udev/usb_id
 #lib/udev/vol_id
+#lib/udev/write_cd_rules
+#lib/udev/write_net_rules
 sbin/udevadm
 sbin/udevd
-sbin/udevsettle
-usr/bin/udevinfo
+#usr/include/libudev.h
 #usr/include/libvolume_id.h
+usr/lib/libudev.so
 usr/lib/libvolume_id.so
+#usr/lib/pkgconfig/libudev.pc
 #usr/lib/pkgconfig/libvolume_id.pc
 #usr/share/man/man7/udev.7
 #usr/share/man/man8/ata_id.8
@@ -64,4 +66,5 @@ usr/lib/libvolume_id.so
 #usr/share/man/man8/scsi_id.8
 #usr/share/man/man8/udevadm.8
 #usr/share/man/man8/udevd.8
+#usr/share/man/man8/usb_id.8
 #usr/share/man/man8/vol_id.8
index 278cbea28771a6713cb3589ddce4f813396dba20..267e40ea1af3338a4fdaf3a25057cfe92117a32c 100644 (file)
@@ -6,7 +6,7 @@ etc/bluetooth/main.conf
 etc/bluetooth/network.conf
 etc/bluetooth/rfcomm.conf
 etc/dbus-1/system.d/bluetooth.conf
-etc/udev/rules.d/24-bluetooth.rules
+#lib/udev/rules.d/24-bluetooth.rules
 lib/firmware/BCM-LEGAL.txt
 lib/firmware/BCM2033-FW.bin
 lib/firmware/BCM2033-MD.hex
diff --git a/config/udev/10-dvb.rules b/config/udev/10-dvb.rules
deleted file mode 100644 (file)
index 5bcd40e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# Create DVB Devices
-KERNEL=="dvb*", PROGRAM="/etc/udev/dvb.sh %k", NAME="%c"
diff --git a/config/udev/55-scsi-cdrom.rules b/config/udev/55-scsi-cdrom.rules
deleted file mode 100644 (file)
index f7ad37d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# SCSI devices
-BUS=="scsi", KERNEL=="sr[0-9]*",       NAME="scd%n", SYMLINK+="sr%n"
diff --git a/config/udev/dvb.sh b/config/udev/dvb.sh
deleted file mode 100755 (executable)
index 5405ffa..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-/bin/echo $1 | /bin/sed -e 's,dvb\([0-9]\)\.\([^0-9]*\)\([0-9]\),dvb/adapter\1/\2\3,'
index ca3176d0f9fdce9506196353ba1429922e01cf9c..33e126cfaaea42a272f2d4b077d5a1cc6ca12ef4 100644 (file)
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
+# Copyright (C) 2007-2012  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # 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        #
@@ -108,7 +108,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
            --sysconfdir=/etc --localstatedir=/var --libexecdir=/lib
        cd $(DIR_SRC)/bluez-hcidump-1.42 && make $(MAKETUNING)
        cd $(DIR_SRC)/bluez-hcidump-1.42 && make install
-       mv -f /etc/udev/bluetooth.rules /etc/udev/rules.d/24-bluetooth.rules
+       mv -f /etc/udev/bluetooth.rules /lib/udev/rules.d/24-bluetooth.rules
        # Change bluetooth peername to Hostname-devicenumber
        sed -i -e 's|name "BlueZ (%d)";|name "%h-%d";|g' /etc/bluetooth/hcid.conf
        # Create empty config files
index d51f2d0e938ca5cdf27fe149851831d360c98f31..4f94fe8a2dbbd0da3fe61fdb51f4aee63eaf0baf 100644 (file)
@@ -117,7 +117,7 @@ endif
                KMODPATH_ARG='INSTALL_MOD_PATH=' KMODDIR=kernel install-modules
 
        # Install firmware udev files...
-       cd $(DIR_APP)/udev && install -m 644 50-compat_firmware.rules /etc/udev/rules.d/
+       cd $(DIR_APP)/udev && install -m 644 50-compat_firmware.rules /lib/udev/rules.d/
        cd $(DIR_APP)/udev && install -m 755 compat_firmware.sh /lib/udev/
 
        -rm -rf $(DIR_APP)
index 6e31c90750ca4a3a72e9ce4d7ac4ba2efb781663..a16ba6fbff2236b342b2f6881199530e9f93ce72 100644 (file)
--- a/lfs/udev
+++ b/lfs/udev
 
 include Config
 
-VER        = 125
+VER        = 141
 
 THISAPP    = udev-$(VER)
-DL_FILE    = $(THISAPP).tar.gz
+DL_FILE    = $(THISAPP).tar.bz2
 DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
@@ -36,13 +36,11 @@ TARGET     = $(DIR_INFO)/$(THISAPP)
 # Top-level Rules
 ###############################################################################
 
-objects = $(DL_FILE) udev-config-6.2.tar.bz2
+objects = $(DL_FILE)
 
 $(DL_FILE) = $(DL_FROM)/$(DL_FILE)
-udev-config-6.2.tar.bz2 = $(DL_FROM)/udev-config-6.2.tar.bz2
 
-$(DL_FILE)_MD5 = be98e04cefdd9ca76b8fe7e92735ce29
-udev-config-6.2.tar.bz2_MD5 = 9ff2667ab0f7bfe8182966ef690078a0
+$(DL_FILE)_MD5 = 1670fe81cabf5161319c52084cf81134
 
 install : $(TARGET)
 
@@ -71,35 +69,32 @@ $(subst %,%_MD5,$(objects)) :
 
 $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        @$(PREBUILD)
-       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE)
-       cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/udev-125-netif_rename.patch
+       @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar axf $(DIR_DL)/$(DL_FILE)
+       cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/udev-141_no_netif_rename.patch
        cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/udev-125-ext4_wo_journal.patch
        rm -rf /lib/udev/devices
-       cd $(DIR_APP) && tar jxf $(DIR_DL)/udev-config-6.2.tar.bz2
-       cd $(DIR_APP) && patch -Np0 -i $(DIR_SRC)/src/patches/udev-config-6.2_persistent-storage-fix.patch
-       cd $(DIR_APP) && patch -Np0 -i $(DIR_SRC)/src/patches/udev-config-6.2_remove-lfs-usb-rule.patch
        install -dv /lib/{firmware,udev/devices/{pts,shm}}
-       echo "Put device firmwares here ..." > /lib/firmware/dirinfo
        mknod -m0666 /lib/udev/devices/null c 1 3
        ln -sv /proc/self/fd /lib/udev/devices/fd
        ln -sv /proc/self/fd/0 /lib/udev/devices/stdin
        ln -sv /proc/self/fd/1 /lib/udev/devices/stdout
        ln -sv /proc/self/fd/2 /lib/udev/devices/stderr
        ln -sv /proc/kcore /lib/udev/devices/core
+       cd $(DIR_APP) && ./configure --disable-introspection --sbindir=/sbin --sysconfdir=/etc --libexecdir=/lib/udev
        cd $(DIR_APP) && make $(MAKETUNING) EXTRAS="extras/ata_id extras/cdrom_id extras/edd_id \
                                        extras/firmware extras/floppy extras/path_id \
                                        extras/scsi_id extras/usb_id extras/volume_id"
        cd $(DIR_APP) && make DESTDIR=/ EXTRAS="extras/ata_id extras/cdrom_id extras/edd_id \
                                        extras/firmware extras/floppy extras/path_id \
                                        extras/scsi_id extras/usb_id extras/volume_id" install
-       cd $(DIR_APP) && cp -v udev-config-6.2/[0-9]* /etc/udev/rules.d/
-       cp -rf $(DIR_SRC)/config/udev/10-dvb.rules /etc/udev/rules.d/
-       cp -rf $(DIR_SRC)/config/udev/55-scsi-cdrom.rules /etc/udev/rules.d/
-       chmod 644 /etc/udev/rules.d/10-dvb.rules
-       chmod 644 /etc/udev/rules.d/55-scsi-cdrom.rules
-       cp -rf $(DIR_SRC)/config/udev/dvb.sh /etc/udev/
-       chmod 755 /etc/udev/dvb.sh
+
+       # Disable net generator rule. This does not work with the setup.
+       rm -f /lib/udev/rules.d/75-persistent-net-generator.rules
+
+       # Create rule file for the setup
        touch /etc/udev/rules.d/30-persistent-network.rules
+
+       # Blacklist some modules
        cp -vf $(DIR_SRC)/config/udev/blacklist /etc/modprobe.d/blacklist
 
        # Install codel rules.
diff --git a/src/patches/udev-125-netif_rename.patch b/src/patches/udev-125-netif_rename.patch
deleted file mode 100644 (file)
index c80b05a..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-diff -Nur udev-125.vanilla/udev_device.c udev-125/udev_device.c
---- udev-125.vanilla/udev_device.c     2008-07-18 16:26:55.000000000 +0200
-+++ udev-125/udev_device.c     2010-07-25 18:15:12.289242450 +0200
-@@ -123,42 +123,7 @@
-       if (retval == 0)
-               kernel_log(ifr);
-       else {
--              int loop;
--
--              /* see if the destination interface name already exists */
--              if (errno != EEXIST) {
--                      err("error changing netif name %s to %s: %s\n", ifr.ifr_name, ifr.ifr_newname, strerror(errno));
--                      goto exit;
--              }
--
--              /* free our own name, another process may wait for us */
--              strlcpy(ifr.ifr_newname, udev->dev->kernel, IFNAMSIZ);
--              strlcat(ifr.ifr_newname, "_rename", IFNAMSIZ);
--              retval = ioctl(sk, SIOCSIFNAME, &ifr);
--              if (retval != 0) {
--                      err("error changing netif name %s to %s: %s\n", ifr.ifr_name, ifr.ifr_newname, strerror(errno));
--                      goto exit;
--              }
--
--              /* wait 30 seconds for our target to become available */
--              strlcpy(ifr.ifr_name, ifr.ifr_newname, IFNAMSIZ);
--              strlcpy(ifr.ifr_newname, udev->name, IFNAMSIZ);
--              loop = 30 * 20;
--              while (loop--) {
--                      retval = ioctl(sk, SIOCSIFNAME, &ifr);
--                      if (retval == 0) {
--                              kernel_log(ifr);
--                              break;
--                      }
--
--                      if (errno != EEXIST) {
--                              err("error changing net interface name %s to %s: %s\n",
--                                  ifr.ifr_name, ifr.ifr_newname, strerror(errno));
--                              break;
--                      }
--                      dbg("wait for netif '%s' to become free, loop=%i\n", udev->name, (30 * 20) - loop);
--                      usleep(1000 * 1000 / 20);
--              }
-+              err("error changing netif name %s to %s: %s\n", ifr.ifr_name, ifr.ifr_newname, strerror(errno));
-       }
- exit:
diff --git a/src/patches/udev-141_no_netif_rename.patch b/src/patches/udev-141_no_netif_rename.patch
new file mode 100644 (file)
index 0000000..fcc5009
--- /dev/null
@@ -0,0 +1,50 @@
+diff -Naur udev-141.org/udev/udev-event.c udev-141/udev/udev-event.c
+--- udev-141.org/udev/udev-event.c     2009-02-24 15:08:35.000000000 +0100
++++ udev-141/udev/udev-event.c 2012-10-30 12:27:00.262833136 +0100
+@@ -486,45 +486,8 @@
+       if (err == 0)
+               rename_netif_kernel_log(ifr);
+       else {
+-              int loop;
+-
+-              /* see if the destination interface name already exists */
+-              if (errno != EEXIST) {
+-                      err(event->udev, "error changing netif name %s to %s: %m\n",
+-                          ifr.ifr_name, ifr.ifr_newname);
+-                      goto exit;
+-              }
+-
+-              /* free our own name, another process may wait for us */
+-              util_strlcpy(ifr.ifr_newname, udev_device_get_sysname(dev), IFNAMSIZ);
+-              util_strlcat(ifr.ifr_newname, "_rename", IFNAMSIZ);
+-              err = ioctl(sk, SIOCSIFNAME, &ifr);
+-              if (err != 0) {
+-                      err(event->udev, "error changing netif name %s to %s: %m\n",
++              err(event->udev, "error changing netif name %s to %s: %m\n",
+                           ifr.ifr_name, ifr.ifr_newname);
+-                      goto exit;
+-              }
+-
+-              /* wait 90 seconds for our target to become available */
+-              util_strlcpy(ifr.ifr_name, ifr.ifr_newname, IFNAMSIZ);
+-              util_strlcpy(ifr.ifr_newname, event->name, IFNAMSIZ);
+-              loop = 90 * 20;
+-              while (loop--) {
+-                      err = ioctl(sk, SIOCSIFNAME, &ifr);
+-                      if (err == 0) {
+-                              rename_netif_kernel_log(ifr);
+-                              break;
+-                      }
+-
+-                      if (errno != EEXIST) {
+-                              err(event->udev, "error changing net interface name %s to %s: %m\n",
+-                                  ifr.ifr_name, ifr.ifr_newname);
+-                              break;
+-                      }
+-                      dbg(event->udev, "wait for netif '%s' to become free, loop=%i\n",
+-                          event->name, (90 * 20) - loop);
+-                      usleep(1000 * 1000 / 20);
+-              }
+       }
+ exit:
+       close(sk);
diff --git a/src/patches/udev-config-6.2_persistent-storage-fix.patch b/src/patches/udev-config-6.2_persistent-storage-fix.patch
deleted file mode 100644 (file)
index 172091a..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Naur udev-config-6.2.org/60-persistent-storage.rules udev-config-6.2/60-persistent-storage.rules
---- udev-config-6.2.org/60-persistent-storage.rules    2006-05-13 01:03:13.000000000 +0200
-+++ udev-config-6.2/60-persistent-storage.rules        2010-08-14 11:08:35.000000000 +0200
-@@ -9,7 +9,7 @@
- # never access removable ide devices, the drivers are causing event loops on open()
- KERNEL=="hd*[!0-9]", SYSFS{removable}=="1", DRIVER=="ide-cs|ide-floppy", GOTO="persistent_storage_end"
--KERNEL=="hd*[0-9]", SYSFS{../removable}=="1", GOTO="persistent_storage_end"
-+KERNEL=="hd*[0-9]", SYSFS{removable}=="1", GOTO="persistent_storage_end"
- # for partitions import parent information
- KERNEL=="*[0-9]", IMPORT{parent}=="ID_*"
diff --git a/src/patches/udev-config-6.2_remove-lfs-usb-rule.patch b/src/patches/udev-config-6.2_remove-lfs-usb-rule.patch
deleted file mode 100644 (file)
index ef02bf7..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-diff -Naur udev-config-6.2.org/25-lfs.rules udev-config-6.2/25-lfs.rules
---- udev-config-6.2.org/25-lfs.rules   2006-07-14 23:29:28.000000000 +0200
-+++ udev-config-6.2/25-lfs.rules       2010-12-21 18:55:40.375602794 +0100
-@@ -84,7 +84,6 @@
- # USB devices go in their own subdirectory
--SUBSYSTEM=="usb_device", PROGRAM="/bin/sh -c 'X=%k; X=$${X#usbdev}; B=$${X%%%%.*} D=$${X#*.}; echo bus/usb/$$B/$$D'", NAME="%c"
- KERNEL=="hiddev*",          NAME="usb/%k"
- KERNEL=="auer*",            NAME="usb/%k"
- KERNEL=="legousbtower*",    NAME="usb/%k"