.gear/rules | 2 + .../tags/a48d2cddb812a9bb9e9bd349c5c4734789baa814 | 23 + .gear/tags/list | 1 + Makefile.am | 28 +- configure.ac | 2 +- rules/altlinux/40-ignore-remove.rules | 7 + rules/rules.d/50-udev-default.rules | 8 +- scripts/udevd | 312 ++++++++ scripts/udevd-final | 87 +++ src/extras/cdrom_id/cdrom_id.c | 1 + src/extras/floppy/create_floppy_devices.c | 1 + src/extras/keymap/keyboard-force-release.sh.in | 2 +- src/extras/keymap/keymap.c | 2 +- src/extras/mtd_probe/mtd_probe.h | 1 + src/extras/scsi_id/scsi_id.config | 17 + src/extras/scsi_id/scsi_serial.c | 1 + src/libudev-device-private.c | 1 + src/libudev-device.c | 1 + src/libudev-enumerate.c | 1 + src/libudev-util-private.c | 6 + src/udev-builtin-input_id.c | 4 + src/udev-event.c | 1 + src/udev-node.c | 1 + src/udev-rules.c | 1 + src/udevadm-info.c | 1 + src/udevd.c | 34 + udev.spec | 802 +++++++++++++++++++++ 27 files changed, 1329 insertions(+), 19 deletions(-) diff --git a/.gear/rules b/.gear/rules new file mode 100644 index 00000000..52923ebb --- /dev/null +++ b/.gear/rules @@ -0,0 +1,2 @@ +tar: @version@:. +diff: @version@:. . name=@name@-@version@-alt.patch diff --git a/.gear/tags/a48d2cddb812a9bb9e9bd349c5c4734789baa814 b/.gear/tags/a48d2cddb812a9bb9e9bd349c5c4734789baa814 new file mode 100644 index 00000000..8ebb9133 --- /dev/null +++ b/.gear/tags/a48d2cddb812a9bb9e9bd349c5c4734789baa814 @@ -0,0 +1,23 @@ +object 3b2e525a5621784287601573dbf8b55d76cbe407 +type commit +tag 181 +tagger Kay Sievers 1328576339 +0100 + +udev 181 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.12 (GNU/Linux) + +iQIcBAABAgAGBQJPMHdTAAoJEKnBdsx/rH1WVHcP/2dy9jfYk2IJaktaOSwL5hjf +h+LwbkOKuj0PixPgVXQ8eWc6lJdwNXtCqN+F8bN3Y+jRkB57Z7TkpqcMZDYSG6Jq +XAjCYT5W6GMU9k1FbcoAIYPJyMORrrG6086Ughi065VmHg/voVpSPl//nGIyqLy4 +4SOzyOG2dWOc6P5ouKslFstyk8AlHfednfa2PC5jLh2OdOF0szlYpWsbhZy8b3cK +3n02Qn22RwCnv1BkQ+pnhrmmOE9rjOIfqvsVoLcEnUQ2NqT6MLMS4aFSQNkEbfDy +oRLaG1BxJt0Ba57fVstzja0J61K0zmaKfKGrUmk2AI/R9PYTs/wJk9QJnwvrbtfI +jzRUth2utvYG1uuohBhTwiY00gsI3SBcP2JlEPJag/T9Oy1JuQiRc+u/2xUuYIAV +n7beop9Ez5X4VML+0+VQ1pJoTD8Y2Lb0lfKb8/JcVYtEvUMxt78CsHNvfaEXmcpH +fcXco++wCBI5YIbtSyKWnDXclxFPiaUtO/g1YNRfYNj55Ibhe8dSMdcHc1HEhZiG +ddXzXgANgFx2GJmQ/bjfGsSWywh4DFhoJ4wgr7h00krqyIyAkIRVGAw/7sQpPXZw +mUz/w4x53Q5JTr9BRkQEanT6KIVpeyLIDZvmcLKEhG8QegwCFhfs24Ewx0LXcflk +xKnUO1PLT/CmMpOmpxke +=Ce+9 +-----END PGP SIGNATURE----- diff --git a/.gear/tags/list b/.gear/tags/list new file mode 100644 index 00000000..3c388482 --- /dev/null +++ b/.gear/tags/list @@ -0,0 +1 @@ +a48d2cddb812a9bb9e9bd349c5c4734789baa814 181 diff --git a/Makefile.am b/Makefile.am index 08431f36..cbe6ad9f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -114,9 +114,11 @@ src_libudev_private_la_SOURCES =\ src/libudev-device-private.c \ src/libudev-queue-private.c +src_libudev_private_la_LIBADD = -lrt + if WITH_SELINUX src_libudev_private_la_SOURCES += src/libudev-selinux-private.c -src_libudev_private_la_LIBADD = $(SELINUX_LIBS) +src_libudev_private_la_LIBADD += $(SELINUX_LIBS) endif pkgconfigdir = $(libdir)/pkgconfig @@ -166,7 +168,8 @@ dist_udevrules_DATA = \ rules/rules.d/75-tty-description.rules \ rules/rules.d/78-sound-card.rules \ rules/rules.d/80-drivers.rules \ - rules/rules.d/95-udev-late.rules + rules/rules.d/95-udev-late.rules \ + rules/altlinux/40-ignore-remove.rules udevconfdir = $(sysconfdir)/udev dist_udevconf_DATA = src/udev.conf @@ -266,6 +269,13 @@ src_udevadm_CFLAGS = $(udev_common_CFLAGS) src_udevadm_LDADD = $(udev_common_LDADD) src_udevadm_CPPFLAGS = $(udev_common_CPPFLAGS) +# ------------------------------------------------------------------------------ +# Init scripts +# ------------------------------------------------------------------------------ +udevinitdir = $(sysconfdir)/rc.d/init.d +udevinit_SCRIPTS = scripts/udevd scripts/udevd-final +sysconf_DATA = src/extras/scsi_id/scsi_id.config + # ------------------------------------------------------------------------------ # udev man pages # ------------------------------------------------------------------------------ @@ -340,13 +350,6 @@ src_extras_cdrom_id_cdrom_id_LDADD = src/libudev-private.la pkglibexec_PROGRAMS += src/extras/cdrom_id/cdrom_id dist_udevrules_DATA += src/extras/cdrom_id/60-cdrom_id.rules -# ------------------------------------------------------------------------------ -# collect - trigger action when a collection of devices appeared -# ------------------------------------------------------------------------------ -src_extras_collect_collect_SOURCES = src/extras/collect/collect.c -src_extras_collect_collect_LDADD = src/libudev-private.la -pkglibexec_PROGRAMS += src/extras/collect/collect - # ------------------------------------------------------------------------------ # scsi_id - SCSI inquiry to get various serial numbers # ------------------------------------------------------------------------------ @@ -628,7 +631,7 @@ dist_udevkeymapforcerel_DATA = \ src/extras/keymap/force-release-maps/samsung-other \ src/extras/keymap/force-release-maps/common-volume-keys -src/extras/keymap/keys.txt: $(INCLUDE_PREFIX)/linux/input.h +src/extras/keymap/keys.txt: $(INCLUDE_PREFIX)/linux-default/include/linux/input-event-codes.h $(AM_V_at)mkdir -p src/extras/keymap $(AM_V_GEN)$(AWK) '/^#define.*KEY_[^ ]+[ \t]+[0-9]/ { if ($$2 != "KEY_MAX") { print $$2 } }' < $< | sed 's/^KEY_COFFEE$$/KEY_SCREENLOCK/' > $@ @@ -655,6 +658,7 @@ src_extras_mtd_probe_mtd_probe_SOURCES = \ src/extras/mtd_probe/mtd_probe.h \ src/extras/mtd_probe/probe_smartmedia.c src_extras_mtd_probe_mtd_probe_CPPFLAGS = $(AM_CPPFLAGS) +src_extras_mtd_probe_mtd_probe_CFLAGS = -I$(includedir)/linux-default/include dist_udevrules_DATA += src/extras/mtd_probe/75-probe_mtd.rules pkglibexec_PROGRAMS += src/extras/mtd_probe/mtd_probe endif @@ -686,8 +690,8 @@ dist_udevrules_DATA += src/extras/udev-acl/70-udev-acl.rules pkglibexec_PROGRAMS += src/udev-acl udevacl-install-hook: - mkdir -p $(DESTDIR)$(prefix)/lib/ConsoleKit/run-seat.d - ln -sf $(libexecdir)/udev/udev-acl $(DESTDIR)$(prefix)/lib/ConsoleKit/run-seat.d/udev-acl.ck + mkdir -p $(DESTDIR)$(prefix)/libexec/ConsoleKit/run-seat.d + ln -sf $(libexecdir)/udev/udev-acl $(DESTDIR)$(prefix)/libexec/ConsoleKit/run-seat.d/udev-acl.ck INSTALL_EXEC_HOOKS += udevacl-install-hook endif diff --git a/configure.ac b/configure.ac index e7c10d5c..b0619d47 100644 --- a/configure.ac +++ b/configure.ac @@ -77,7 +77,7 @@ AS_IF([test "x$with_selinux" = "xyes"], [ [], AC_MSG_ERROR([SELinux selected but libselinux not found])) LIBS=$LIBS_save - SELINUX_LIBS="-lselinux -lsepol" + SELINUX_LIBS="-lselinux" AC_DEFINE(WITH_SELINUX, [1] ,[SELinux support.]) ]) AC_SUBST([SELINUX_LIBS]) diff --git a/rules/altlinux/40-ignore-remove.rules b/rules/altlinux/40-ignore-remove.rules new file mode 100644 index 00000000..79546381 --- /dev/null +++ b/rules/altlinux/40-ignore-remove.rules @@ -0,0 +1,7 @@ +# do not edit this file, it will be overwritten on update + +# keep devices after driver unload +KERNEL=="ppp", OPTIONS+="ignore_remove" +KERNEL=="tun", OPTIONS+="ignore_remove" +KERNEL=="fuse", OPTIONS+="ignore_remove" +KERNEL=="cuse", OPTIONS+="ignore_remove" diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules index 5ad787fc..863c3a8a 100644 --- a/rules/rules.d/50-udev-default.rules +++ b/rules/rules.d/50-udev-default.rules @@ -8,9 +8,9 @@ KERNEL=="tty[0-9]*", GROUP="tty", MODE="0620" KERNEL=="vcs|vcs[0-9]*|vcsa|vcsa[0-9]*", GROUP="tty" # serial -KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout" -KERNEL=="mwave", GROUP="dialout" -KERNEL=="hvc*|hvsi*", GROUP="dialout" +KERNEL=="tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="uucp" +KERNEL=="mwave", GROUP="uucp" +KERNEL=="hvc*|hvsi*", GROUP="uucp" # virtio serial / console ports KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}" @@ -36,7 +36,7 @@ KERNEL=="agpgart", GROUP="video" KERNEL=="pmu", GROUP="video" KERNEL=="nvidia*|nvidiactl*", GROUP="video" SUBSYSTEM=="graphics", GROUP="video" -SUBSYSTEM=="drm", GROUP="video" +SUBSYSTEM=="drm", GROUP="xgrp" # sound SUBSYSTEM=="sound", GROUP="audio", \ diff --git a/scripts/udevd b/scripts/udevd new file mode 100644 index 00000000..0e6ef3fb --- /dev/null +++ b/scripts/udevd @@ -0,0 +1,312 @@ +#! /bin/sh +# +# udevd init script to setup /dev +# +# chkconfig: 2345 02 95 +# description: manage user-space device nodes in /dev +# processname: udevd +# pidfile: /run/udev/udevd.pid +# config: /etc/udev/udev.conf + +WITHOUT_RC_COMPAT=1 + +. /etc/init.d/functions + +SourceIfNotEmpty /etc/udev/udev.conf + +: ${udev_root:=/dev} +: ${udev_tmpfs:=1} + +udev_root=${udev_root%/} + +prog=udevd +sysfs_dir=/sys +udevd=/sbin/udevd + +LOCKFILE=/var/lock/subsys/udevd +RETVAL=0 + +PIDFILE=/dev/.udev/udevd.pid +! test -d /run/udev || PIDFILE=/run/udev/udevd.pid + +RESTORECON=/sbin/restorecon +[ -x "$RESTORECON" ] && mountpoint -q /selinux || + RESTORECON= + +restore_context() +{ + [ -n "$RESTORECON" ] || return 0 + "$RESTORECON" -R "$@" +} + +# If running from rc.sysinit, need to use mount -n (mtab is not yet writable) +mount_n="${RUN_FROM_SYSINIT:+-n}" + +get_pts_attributes() +{ + # Warning: /dev/null is not present when this function is called. + + local rc line opts + line=`grep -s "[[:space:]]$udev_root/pts[[:space:]]" /proc/mounts | head -1` + test -n "$line" || line=`grep -s "[[:space:]]$udev_root/pts[[:space:]]" /etc/fstab | head -1` + test -n "$line" || return 1 + set -- $line '' + opts=$4 + echo $opts + return 0 +} + +attach_pts_filesystem() +{ + # Warning: /dev/null is not present when this function is called. + + test -f /proc/mounts || return 0 + local RETVAL opts rc + opts="`get_pts_attributes`" + rc=$? + RETVAL=0 + if test $rc = 0; then + mkdir -p "$udev_root"/pts || return $? + if grep -q "[[:space:]]$udev_root/pts[[:space:]]" /proc/mounts; then + mount -n --move pts "$udev_root"/pts + else + mount $mount_n -t devpts -o $opts \ + devpts "$udev_root"/pts + fi + RETVAL=$? + fi + return $RETVAL +} + +attach_shm_filesystem() +{ + # Warning: /dev/null is not present when this function is called. + + test -f /proc/mounts || return 0 + mkdir -p "$udev_root"/shm || return $? + if grep -q "[[:space:]]$udev_root/shm[[:space:]]" /proc/mounts; then + # Already mounted - move to overmounted /dev. + mount -n --move shm "$udev_root"/shm + elif egrep -q "^[^#][^[:space:]]*[[:space:]]+$udev_root/shm[[:space:]]" /etc/fstab; then + # Listed in fstab - use options from there. + # If run from rc.sysinit, defer mount to the later step in + # rc.sysinit to get correct mtab entry. + if [ -z "$RUN_FROM_SYSINIT" ]; then + mount $mount_n "$udev_root"/shm + fi + else + # Not listed in fstab - mount with default options. + mount $mount_n -t tmpfs shmfs "$udev_root"/shm + fi + local RETVAL=$? + return $RETVAL +} + +startup_failure() +{ + msg_starting "udevd" + printf "%s" "$1" + failure "udevd startup" + echo +} + +prepare_filesystem() +{ + local RETVAL mounted + + # Check system before trying to start udev + [ -d /sys/devices ] || { + startup_failure "/sys is not mounted" + return 1 + } + [ -w /sys/class/mem/null/uevent ] || { + startup_failure "kernel too old - no /sys/class/mem/null/uevent" + return 1 + } + [ -r /sys/kernel/uevent_seqnum ] || { + startup_failure "kernel too old - no /sys/kernel/uevent_seqnum" + return 1 + } + + if [ ! -d $udev_root ]; then + mkdir -p $udev_root || return 1 + fi + + # Check if udevd is already running + if start-stop-daemon --stop --exec $udevd --pidfile "$PIDFILE" \ + --user root --test >/dev/null; then + [ -n "$RUN_FROM_SYSINIT" ] || touch "$LOCKFILE" + return 0 + fi + + # Check if we should mount a tmpfs to $udev_root + if [ "x$udev_tmpfs" != "x1" ]; then + /sbin/udevadm control --property="STARTUP=1" + /sbin/udevadm trigger + /sbin/udevadm settle + /sbin/udevadm control --property="STARTUP=" + RETVAL=$? + return $RETVAL + fi + + cd "$udev_root" + RETVAL=$[$RETVAL+$?] + [ $RETVAL -ne 0 ] && return $RETVAL + if test -d /run; then + if ! mountpoint -q /run; then + mount $mount_n -t tmpfs -o mode=755,$tmpfs_options runfs /run + RETVAL=$[$RETVAL+$?] + fi + mkdir -p /run/udev 2>/dev/null + fi + if ! mountpoint -q $udev_root; then + mounted=0 + devfs=tmpfs + ! grep -q "^nodev[[:space:]]*devtmpfs" /proc/filesystems || devfs=devtmpfs + mount $mount_n -t $devfs -o mode=755,$tmpfs_options udevfs $udev_root + RETVAL=$[$RETVAL+$?] + else + mounted=1 + RETVAL=0 + fi + + attach_pts_filesystem && attach_shm_filesystem + + if [ $RETVAL = 0 ]; then + # $udev_root is partially populated already, + # so set SELinux context for it now. + restore_context "$udev_root" + + # We want to start udevd ourselves if it isn't already running. + # This lets udevd run at a sane nice level... + if [ -z "$RUN_FROM_SYSINIT" ]; then + start_daemon --lockfile "$LOCKFILE" --expect-user root --pidfile "$PIDFILE" -- $udevd --daemon + else + start_daemon --expect-user root --pidfile "$PIDFILE" -- $udevd --daemon + fi + RETVAL=$[$RETVAL+$?] + [ "$RETVAL" == "0" ] && echo "" >/proc/sys/kernel/hotplug + /sbin/udevadm control --property="STARTUP=1" + /sbin/udevadm trigger + action "Populating /dev:" /sbin/udevadm settle + /sbin/udevadm control --property="STARTUP=" + RETVAL=$[$RETVAL+$?] + + if [ -z "$RUN_FROM_SYSINIT" ]; then + mount -o remount,$tmpfs_options $udev_root + RETVAL=$[$RETVAL+$?] + if test -d /run; then + mount -o remount,$tmpfs_options /run + RETVAL=$[$RETVAL+$?] + fi + fi + fi + + [ $RETVAL != 0 -a $mounted = 0 ] && detach_filesystem + return $RETVAL +} + +detach_pts_filesystem() +{ + local opts + opts="`get_pts_attributes`" + if test $? = 0; then + umount $udev_root/pts 2>/dev/null + umount -l $udev_root/pts 2>/dev/null + fi + return 0 +} + +detach_filesystem() +{ + # Check if we had to mount a tmpfs to $udev_root + [ "x$udev_tmpfs" = "x1" ] || return 0 + umount $udev_root/shm + detach_pts_filesystem + umount -l $udev_root + attach_pts_filesystem +} + +start() +{ + # don't use udev if sysfs is not mounted. + [ ! -d $sysfs_dir/block ] && exit 1 + + prepare_filesystem + RETVAL=$? + return $RETVAL +} + + +stop() +{ + stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" $udevd || + RETVAL=$? + return $RETVAL +} + +umount_dev() +{ + stop + echo -n $"Removing udev device nodes: " + detach_filesystem + echo_success + echo +} + +start_udevd_only() +{ + start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" \ + --expect-user root -- $udevd --daemon || + RETVAL=$? + return $RETVAL +} + +restart() +{ + stop + start_udevd_only + return $RETVAL +} + +case "$1" in + start) + start + ;; + start_udevd_only) + start_udevd_only + ;; + stop) + stop + ;; + status) + status --pidfile "$PIDFILE" -- $prog + exit $? + ;; + condrestart) + if [ -e "$LOCKFILE" ]; then + restart + fi + ;; + condstop) + msg=`status --pidfile "$PIDFILE" -- $prog` + RETVAL=$? + if [ $RETVAL -eq 0 ]; then + stop + fi + ;; + restart) + restart + ;; + reload) + # nothing to do here + ;; + umount) + umount_dev + ;; + *) + echo "Usage: $0 {start|stop|status|restart|condrestart|condstop|umount}" + exit 1 +esac + +exit $RETVAL diff --git a/scripts/udevd-final b/scripts/udevd-final new file mode 100644 index 00000000..50fdf685 --- /dev/null +++ b/scripts/udevd-final @@ -0,0 +1,87 @@ +#!/bin/sh +# +# udevd-final Perform final udevd startup steps. +# +# chkconfig: 2345 32 69 +# description: Retries udev events which could not be processed earlier \ +# during startup. + +# Do not load RH compatibility interface. +WITHOUT_RC_COMPAT=1 + +# Source function library. +. /etc/init.d/functions + +LOCKFILE=/var/lock/subsys/udevd-final +RETVAL=0 + +start() +{ + local f t udev_root + udev_root=$(udevadm info --run 2>/dev/null) + [ -w /etc/udev/rules.d/ -a -n "$udev_root" ] && + for f in $udev_root/tmp-rules--*; do + [ -s "$f" ] || continue + t="${f##*/}" + t="${t#tmp-rules--}" + [ -n "$t" ] || continue + cat "$f" >>/etc/udev/rules.d/"$t" + done + action "Handling remaining udev events:" udevadm trigger --type=failed \ + && touch "$LOCKFILE" + RETVAL=$? + return $RETVAL +} + +stop() +{ + rm -f "$LOCKFILE" +} + +restart() +{ + stop + start +} + +status() +{ + if [ -f "$LOCKFILE" ]; then + echo "This service was last time (re-)started at $(LANG=C LANGUAGE=C /bin/ls -l --time-style='+%Y-%m-%d %H:%M:%S %z' "$LOCKFILE" |tr -s ' ' |cut --fields 6-8 -d' ')." + echo "No other status information available." + else + echo "This service hasn't been started since stopped last time." + fi +} + +# See how we were called. +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + ;; + condstop) + if [ -e "$LOCKFILE" ]; then + stop + fi + ;; + condrestart|condreload) + # "condrestart" is called during package upgrade. + # Nothing to do here - this is not a normal service. + ;; + status) + status + ;; + *) + msg_usage "${0##*/} {start|stop|restart|reload|status|condrestart|condreload|condstop}" + RETVAL=1 +esac + +exit $RETVAL diff --git a/src/extras/cdrom_id/cdrom_id.c b/src/extras/cdrom_id/cdrom_id.c index f90d52ec..64b4a0ea 100644 --- a/src/extras/cdrom_id/cdrom_id.c +++ b/src/extras/cdrom_id/cdrom_id.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include "libudev.h" diff --git a/src/extras/floppy/create_floppy_devices.c b/src/extras/floppy/create_floppy_devices.c index f71ef0d8..3ac51f32 100644 --- a/src/extras/floppy/create_floppy_devices.c +++ b/src/extras/floppy/create_floppy_devices.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/src/extras/keymap/keyboard-force-release.sh.in b/src/extras/keymap/keyboard-force-release.sh.in index dd040ceb..597a3a69 100755 --- a/src/extras/keymap/keyboard-force-release.sh.in +++ b/src/extras/keymap/keyboard-force-release.sh.in @@ -1,4 +1,4 @@ -#!@rootprefix@/bin/sh -e +#!/bin/sh -e # read list of scancodes, convert hex to decimal and # append to the atkbd force_release sysfs attribute # $1 sysfs devpath for serioX diff --git a/src/extras/keymap/keymap.c b/src/extras/keymap/keymap.c index 92ec67b3..a159aa61 100644 --- a/src/extras/keymap/keymap.c +++ b/src/extras/keymap/keymap.c @@ -36,7 +36,7 @@ #include #include -const struct key* lookup_key (const char *str, unsigned int len); +const struct key* lookup_key (const char *str, size_t len); #include "keys-from-name.h" #include "keys-to-name.h" diff --git a/src/extras/mtd_probe/mtd_probe.h b/src/extras/mtd_probe/mtd_probe.h index 2a37ede5..49c19183 100644 --- a/src/extras/mtd_probe/mtd_probe.h +++ b/src/extras/mtd_probe/mtd_probe.h @@ -18,6 +18,7 @@ */ #include +#include /* Full oob structure as written on the flash */ struct sm_oob { diff --git a/src/extras/scsi_id/scsi_id.config b/src/extras/scsi_id/scsi_id.config new file mode 100644 index 00000000..d2a10a5f --- /dev/null +++ b/src/extras/scsi_id/scsi_id.config @@ -0,0 +1,17 @@ +# +# scsi_id configuration +# +# lower or upper case has no effect on the left side. Quotes (") are +# required for spaces in values. Model is the same as the SCSI +# INQUIRY product identification field. Per the SCSI INQUIRY, the vendor +# is limited to 8 bytes, model to 16 bytes. +# +# The first matching line found is used. Short matches match longer ones, +# if you do not want such a match space fill the extra bytes. If no model +# is specified, only the vendor string need match. +# +# options= +# vendor=string[,model=string],options= + +# some libata drives require vpd page 0x80 +vendor="ATA",options=-p 0x80 diff --git a/src/extras/scsi_id/scsi_serial.c b/src/extras/scsi_id/scsi_serial.c index f1d63f40..dac2d024 100644 --- a/src/extras/scsi_id/scsi_serial.c +++ b/src/extras/scsi_id/scsi_serial.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/src/libudev-device-private.c b/src/libudev-device-private.c index 13fdb8eb..561e29c7 100644 --- a/src/libudev-device-private.c +++ b/src/libudev-device-private.c @@ -18,6 +18,7 @@ #include #include #include +#include #include "libudev.h" #include "libudev-private.h" diff --git a/src/libudev-device.c b/src/libudev-device.c index 10f28b8c..948c0822 100644 --- a/src/libudev-device.c +++ b/src/libudev-device.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include "libudev.h" diff --git a/src/libudev-enumerate.c b/src/libudev-enumerate.c index 034d96fe..1c83c381 100644 --- a/src/libudev-enumerate.c +++ b/src/libudev-enumerate.c @@ -20,6 +20,7 @@ #include #include #include +#include #include "libudev.h" #include "libudev-private.h" diff --git a/src/libudev-util-private.c b/src/libudev-util-private.c index 08f0ba22..9b3c8bf0 100644 --- a/src/libudev-util-private.c +++ b/src/libudev-util-private.c @@ -115,6 +115,9 @@ int util_delete_path(struct udev *udev, const char *path) uid_t util_lookup_user(struct udev *udev, const char *user) { + if (getenv("RUN_INITRD") != NULL) + return 0; + char *endptr; size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX); char buf[buflen]; @@ -140,6 +143,9 @@ uid_t util_lookup_user(struct udev *udev, const char *user) gid_t util_lookup_group(struct udev *udev, const char *group) { + if (getenv("RUN_INITRD") != NULL) + return 0; + char *endptr; size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX); char *buf; diff --git a/src/udev-builtin-input_id.c b/src/udev-builtin-input_id.c index a062ef7c..26398529 100644 --- a/src/udev-builtin-input_id.c +++ b/src/udev-builtin-input_id.c @@ -30,6 +30,10 @@ #include "udev.h" +#ifndef BTN_TRIGGER_HAPPY +#define BTN_TRIGGER_HAPPY 0x2c0 +#endif + /* we must use this kernel-compatible implementation */ #define BITS_PER_LONG (sizeof(unsigned long) * 8) #define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1) diff --git a/src/udev-event.c b/src/udev-event.c index 45dd77ba..a2b0d110 100644 --- a/src/udev-event.c +++ b/src/udev-event.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include "udev.h" diff --git a/src/udev-node.c b/src/udev-node.c index 7a01a479..e90aec12 100644 --- a/src/udev-node.c +++ b/src/udev-node.c @@ -28,6 +28,7 @@ #include #include #include +#include #include "udev.h" diff --git a/src/udev-rules.c b/src/udev-rules.c index a5b4b730..13a93975 100644 --- a/src/udev-rules.c +++ b/src/udev-rules.c @@ -29,6 +29,7 @@ #include #include #include +#include #include "udev.h" diff --git a/src/udevadm-info.c b/src/udevadm-info.c index ee9b59fe..ddac651e 100644 --- a/src/udevadm-info.c +++ b/src/udevadm-info.c @@ -28,6 +28,7 @@ #include #include #include +#include #include "udev.h" diff --git a/src/udevd.c b/src/udevd.c index 17022179..2ed050e3 100644 --- a/src/udevd.c +++ b/src/udevd.c @@ -43,10 +43,13 @@ #include #include #include +#include #include "udev.h" #include "sd-daemon.h" +#define UDEVD_PID_FILE "udevd.pid" + static bool debug; void udev_main_log(struct udev *udev, int priority, @@ -1184,6 +1187,32 @@ static bool check_rules_timestamp(struct udev *udev) return changed; } +static void create_pidfile(struct udev *udev) +{ + char filename[UTIL_PATH_SIZE]; + int fd; + char buf[32]; + + snprintf(buf, sizeof(buf), "%ld\n", (long)getpid()); + strlcpy(filename, udev_get_run_path(udev), sizeof(filename)); + strlcat(filename, "/"UDEVD_PID_FILE, sizeof(filename)); + util_create_path(udev, filename); + fd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, 0644); + if (fd >= 0) { + write(fd, buf, strlen(buf)); + close(fd); + } +} + +static void remove_pidfile(struct udev *udev) +{ + char filename[UTIL_PATH_SIZE]; + + strlcpy(filename, udev_get_run_path(udev), sizeof(filename)); + strlcat(filename, "/"UDEVD_PID_FILE, sizeof(filename)); + unlink(filename); +} + int main(int argc, char *argv[]) { struct udev *udev; @@ -1407,6 +1436,8 @@ int main(int argc, char *argv[]) pid = fork(); switch (pid) { case 0: + dbg(udev, "daemonized fork running\n"); + create_pidfile(udev); break; case -1: err(udev, "fork of daemon failed: %m\n"); @@ -1723,6 +1754,9 @@ exit: udev_queue_export_cleanup(udev_queue_export); udev_ctrl_cleanup(udev_ctrl); exit_daemonize: + if (daemonize) + remove_pidfile(udev); + if (fd_ep >= 0) close(fd_ep); worker_list_cleanup(udev); diff --git a/udev.spec b/udev.spec new file mode 100644 index 00000000..6faa28b0 --- /dev/null +++ b/udev.spec @@ -0,0 +1,802 @@ +%define systemdsystemunitdir /lib/systemd/system +%define firmwaredir /lib/firmware + +Name: libudev0 +Version: 181 +Release: alt9 + +Summary: Shared library to access udev device information +License: LGPLv2.1+ +Group: System/Legacy libraries + +Url: http://kernel.org/pub/linux/utils/kernel/hotplug/ +Source: %name-%version.tar +Patch: %name-%version-alt.patch + +Provides: libudev = %version-%release +Obsoletes: libudev < %version-%release + +BuildRequires: autoconf_2.60 +BuildRequires: glib2-devel gobject-introspection-devel gperf gtk-doc pciids usbids +BuildRequires: libacl-devel libusb-compat-devel usbutils libselinux-devel +BuildRequires: kmod-devel >= 5 libblkid-devel >= 2.20 + +%description +This package provides shared library to access udev device information + +%prep +%setup +%patch -p1 + +%build +%set_autoconf_version 2.60 +%autoreconf +%configure \ + --enable-floppy \ + --enable-edd \ + --enable-udev_acl \ + --enable-rule_generator \ + --enable-introspection \ + %{subst_with selinux} \ +%if_with bootstrap + --disable-gtk-doc \ +%endif + --disable-gudev \ + --disable-introspection \ + --sbindir=/sbin \ + --bindir=/sbin \ + --libexecdir=/lib \ + --with-rootlibdir=/%_lib \ + --with-firmware-path=%firmwaredir/updates:%firmwaredir \ + --with-systemdsystemunitdir=%systemdsystemunitdir \ + --with-usb-ids-path=/usr/share/misc/usb.ids \ + --disable-silent-rules +%make_build + +%install +%makeinstall_std + +%files +/%_lib/libudev.so.* + +%changelog +* Tue Sep 05 2023 Andrew A. Vasilyev 181-alt9 +- FTBFS: build with autoconf 2.60 + +* Sun Aug 16 2020 Michael Shigorin 181-alt8 +- fixed ftbfs (sys/sysmacros.h) + +* Wed Jan 24 2018 Aleksei Nikiforov 181-alt7 +- Fixed build. + +* Wed Feb 03 2016 Michael Shigorin 181-alt6.1 +- BOOTSTRAP: define BTN_TRIGGER_HAPPY, disable selinux/gtk-doc + +* Thu Jun 05 2014 Alexey Shabalin 181-alt6 +- build to sisyphus + +* Mon Jul 02 2012 Dmitry V. Levin 181-alt5 +- Added an "Obsoletes" tag (closes: #27448). + +* Wed Jun 20 2012 Alexey Shabalin 181-alt4 +- add Provides: libudev + +* Wed Jun 13 2012 Alexey Shabalin 181-alt3 +- build as legacy libraries "libudev0" for compat + +* Mon May 28 2012 Dmitry V. Levin 181-alt2 +- Reintroduced udev-rule-generator package and udevd-final startup + script by reverting commit 180-alt1~4-g289489b which was erroneously + pushed to Sisyphus few days ago. + +* Fri Feb 10 2012 Valery Inozemtsev 181-alt1 +- 181 + +* Mon Jan 30 2012 Valery Inozemtsev 180-alt1 +- 180 + +* Fri Nov 11 2011 Valery Inozemtsev 175-alt1 +- 175 + +* Thu Oct 20 2011 Valery Inozemtsev 174-alt1 +- 174 + +* Wed Aug 03 2011 Valery Inozemtsev 173-alt1 +- 173 + +* Mon Jul 11 2011 Valery Inozemtsev 172-alt2 +- udev-rules: added provides /lib/udev/rules.d + +* Mon Jul 11 2011 Valery Inozemtsev 172-alt1 +- 172 + +* Fri May 27 2011 Valery Inozemtsev 171-alt1 +- 171 + +* Fri May 20 2011 Valery Inozemtsev 170-alt1 +- 170 + +* Thu May 19 2011 Valery Inozemtsev 169-alt1 +- 169 + +* Thu May 05 2011 Valery Inozemtsev 168-alt2 +- removed /lib/udev/devices/loop[0-3] (requires losetup >= 2.19.1) +- added conflicts to systemd < 25 (closes: #25552) + +* Tue Apr 26 2011 Valery Inozemtsev 168-alt1 +- 168 + +* Fri Apr 01 2011 Valery Inozemtsev 167-alt2 +- initscripts: mount /run on tmpfs if directory exists +- added loop[0-3] + +* Wed Mar 30 2011 Valery Inozemtsev 167-alt1 +- 167 +- initscripts: removed create_static_inodes + +* Thu Feb 10 2011 Valery Inozemtsev 166-alt1 +- 166 + +* Tue Feb 08 2011 Valery Inozemtsev 165-alt2 +- add systemd service files (closes: #24990) + +* Thu Dec 16 2010 Valery Inozemtsev 165-alt1 +- 165 + +* Sun Nov 28 2010 Valery Inozemtsev 164-alt2 +- initscript: + + fixed mount shm/pts filesystems + + removed unused /etc/udev/devices + +* Sat Oct 23 2010 Valery Inozemtsev 164-alt1 +- 164 + +* Thu Oct 07 2010 Valery Inozemtsev 163-alt1 +- 163 + +* Sat Sep 25 2010 Valery Inozemtsev 162-alt4 +- udev-extras: required pciids, usbids + +* Sun Sep 19 2010 Valery Inozemtsev 162-alt3 +- set SELinux context after mounting tmpfs on /dev (by Mikhail Efremov) + +* Fri Sep 17 2010 Dmitry V. Levin 162-alt2 +- Fixed SELinux context setting for the static nodes (by Mikhail Efremov). + This fixes regression introduced by faulty merge 161-alt2. + The original change made in 150-alt9 was correct, + the bug was introduced by that buggy merge. +- Merged some minor specfile fixes from 150-alt9. + +* Sat Sep 04 2010 Valery Inozemtsev 162-alt1 +- 162 +- initscripts: added devtmpfs support + +* Sat Aug 28 2010 Valery Inozemtsev 161-alt2 +- added and enabled SELinux support (by Mikhail Efremov and Dmitry V. Levin) + +* Wed Aug 11 2010 Valery Inozemtsev 161-alt1 +- 161 + +* Sun Jul 25 2010 Valery Inozemtsev 160-alt1 +- new upstream release (160) + +* Wed Jul 07 2010 Valery Inozemtsev 159-alt1 +- new upstream release (159) + +* Thu Jun 24 2010 Valery Inozemtsev 158-alt1 +- new upstream release (158) + +* Wed Jun 02 2010 Valery Inozemtsev 157-alt1 +- new upstream release (157) + +* Tue May 25 2010 Valery Inozemtsev 156-alt1 +- new upstream release (156) + +* Tue May 25 2010 Valery Inozemtsev 155-alt1 +- new upstream release (155) + +* Wed May 12 2010 Valery Inozemtsev 154-alt2 +- postrelease fises + +* Wed May 12 2010 Valery Inozemtsev 154-alt1 +- new upstream release (154) +- removed rule for compatibility with kernels 2.6.31 below + +* Wed Apr 21 2010 Valery Inozemtsev 153-alt1 +- new upstream release (153) + +* Tue Apr 20 2010 Valery Inozemtsev 152-alt1 +- new upstream release (152) + +* Sun Apr 04 2010 Valery Inozemtsev 151-alt4 +- rebuild + +* Mon Mar 15 2010 Valery Inozemtsev 151-alt3 +- udev-final: check for rules.d/ writeability (Michael Shigorin) +- device-mapper want property STARTUP to be set to 1 on coldplug (Kirill A. Shutemov) + +* Tue Mar 09 2010 Valery Inozemtsev 151-alt2 +- removed net-agent + +* Wed Jan 27 2010 Valery Inozemtsev 151-alt1 +- new upstream release (151) + +* Sun Jan 10 2010 Valery Inozemtsev 150-alt2 +- removed klibc support +- removed udev-initramfs subpackage + +* Thu Jan 07 2010 Valery Inozemtsev 150-alt1 +- new upstream release (150) + +* Tue Dec 15 2009 Valery Inozemtsev 149-alt2 +- firmware.c: upstream version + +* Thu Dec 03 2009 Valery Inozemtsev 149-alt1 +- new upstream release (149) + +* Wed Dec 02 2009 Valery Inozemtsev 148-alt1 +- new upstream release (148) + +* Fri Nov 20 2009 Valery Inozemtsev 147-alt3 +- udev-acl: migrated to ConsoleKit 0.4.1 + +* Mon Nov 16 2009 Valery Inozemtsev 147-alt2 +- new libgudev-gir{,-devel} subpackages + +* Tue Nov 10 2009 Valery Inozemtsev 147-alt1 +- New upstream release (147) + +* Tue Nov 10 2009 Valery Inozemtsev 146-alt4 +- rebuild with latest klibc + +* Sun Sep 27 2009 Valery Inozemtsev 146-alt3 +- make raw USB printer devices accessible for lp + +* Mon Aug 31 2009 Valery Inozemtsev 146-alt2 +- gudev: build introspection library + +* Fri Aug 14 2009 Valery Inozemtsev 146-alt1 +- New upstream release (146) + +* Tue Jul 21 2009 Valery Inozemtsev 145-alt1 +- New upstream release (145) + +* Thu Jul 16 2009 Valery Inozemtsev 141-alt9 +- packaged libudev.a + +* Fri Jun 19 2009 Dmitry V. Levin 141-alt8 +- udevd-final (start): Append tmp rules instead of replacing. + +* Thu Jun 18 2009 Dmitry V. Levin 141-alt7 +- udevd-final (start): Move tmp rules + from /dev/.udev/ to /etc/udev/rules.d/. +- 75-persistent-net-generator.rules: Allow to use + "locally administered" MAC address. + +* Thu Jun 18 2009 Valery Inozemtsev 141-alt6 +- rule_generator.functions (choose_rules_file): Print header to empty rules file + as well as to just created rules file (Dmitry V. Levin) + +* Mon Jun 15 2009 Valery Inozemtsev 141-alt5 +- net-agent: ignore hostapd interface mon.* + +* Wed Jun 03 2009 Valery Inozemtsev 141-alt4 +- packaged rule-generator + +* Thu May 07 2009 Valery Inozemtsev 141-alt3 +- net-agent: ignore pan[0-9]* + +* Thu Apr 16 2009 Valery Inozemtsev 141-alt2 +- deleted 94-pam-console.rules + +* Thu Apr 09 2009 Valery Inozemtsev 141-alt1 +- New upstream release (141) + +* Fri Mar 13 2009 Valery Inozemtsev 140-alt1 +- New upstream release (140) + +* Thu Mar 12 2009 Valery Inozemtsev 139-alt3 +- fixed device-mapper support + +* Tue Mar 03 2009 Valery Inozemtsev 139-alt2 +- volume_id: ntfs - fixed uuid setting + +* Fri Feb 27 2009 Valery Inozemtsev 139-alt1 +- New upstream release (139) + +* Tue Feb 24 2009 Valery Inozemtsev 138-alt3 +- init: removed convert_udev_db_from_initramfs calls + +* Fri Feb 20 2009 Valery Inozemtsev 138-alt2 +- rules: updated device-mapper/md-raid + +* Thu Feb 19 2009 Valery Inozemtsev 138-alt1 +- New upstream release (138) + +* Fri Jan 23 2009 Valery Inozemtsev 137-alt1 +- New upstream release (137) + +* Tue Jan 20 2009 Valery Inozemtsev 136-alt2 +- added "tape" group +- convert firmware.sh/net.agent to C + +* Wed Jan 07 2009 Valery Inozemtsev 136-alt1 +- New upstream release (136) + +* Mon Jan 05 2009 Valery Inozemtsev 135-alt2 +- rebuild with klibc-1.5.15 + +* Tue Dec 02 2008 Valery Inozemtsev 135-alt1 +- New upstream release (135). + +* Thu Nov 27 2008 Valery Inozemtsev 134-alt1 +- New upstream release (134). + +* Sat Nov 15 2008 Sergey Vlasov 130-alt6 +- udevadm: fixed option parsing breakage with klibc introduced in + version 128. Fixes random reordering of modules included in + initramfs ("udevadm trigger" options were ignored, causing modules + for all detected devices to be loaded in undefined order before + processing the module list built by mkinitrd). + +* Sun Oct 19 2008 Valery Inozemtsev 130-alt5 +- fixed /dev/dri/card* permissions + +* Thu Oct 09 2008 Valery Inozemtsev 130-alt4 +- libvolume_id-devel/libudev-devel: fixed libdir in pc files + +* Wed Oct 08 2008 Valery Inozemtsev 130-alt3 +- fixed unmet on x86_64 + +* Wed Oct 08 2008 Valery Inozemtsev 130-alt2 +- fixed build for x86_64 + +* Wed Oct 08 2008 Valery Inozemtsev 130-alt1 +- New upstream release (130). + +* Tue Sep 02 2008 Valery Inozemtsev 127-alt4 +- udev-initramfs: + + drop udev{settle,trigger} link (close #16959) + + requires mkinitrd-initramfs >= 1:3.0.8-alt1 + +* Mon Sep 01 2008 Valery Inozemtsev 127-alt3 +- firmware.sh: lookup kernel provided firmware directory + +* Mon Sep 01 2008 Valery Inozemtsev 127-alt2 +- fixed %%_libdir for x86_64 + +* Mon Sep 01 2008 Valery Inozemtsev 127-alt1 +- New upstream release (127). + +* Mon Aug 04 2008 Valery Inozemtsev 126-alt3 +- fixed %%_libdir for x86_64 + +* Mon Aug 04 2008 Valery Inozemtsev 126-alt2 +- fixed change mode bits for CDROM + +* Sun Aug 03 2008 Valery Inozemtsev 126-alt1 +- New upstream release (126). + +* Sun Aug 03 2008 Valery Inozemtsev 125-alt3 +- updated rules + +* Sat Aug 02 2008 Valery Inozemtsev 125-alt2 +- rules cleanup + +* Sat Aug 02 2008 Valery Inozemtsev 125-alt1 +- New upstream release (125). + +* Tue Jul 08 2008 Valery Inozemtsev 124-alt3 +- drop 80-bluetooth.rules + +* Mon Jul 07 2008 Valery Inozemtsev 124-alt2 +- scsi_id: fix fallback to sg v3 for sg nodes +- path_id: suppress trailing '-' like 'ID_PATH=pci-0000:05:01.0-' +- rules: fix cciss rules for partition numbers > 9 + +* Fri Jun 13 2008 Valery Inozemtsev 124-alt1 +- New upstream release (124). + +* Fri Jun 13 2008 Valery Inozemtsev 122-alt3 +- added provides hotplug = 2004_09_23-alt18 +- added firmware directory + +* Thu Jun 12 2008 Valery Inozemtsev 122-alt2 +- fixed persistent storage rules +- returned /sbin/udevcontrol + +* Wed Jun 11 2008 Valery Inozemtsev 122-alt1 +- New upstream release (122). +- Drop sound.agent + +* Tue Apr 01 2008 Sergey Vlasov 118-alt1 +- New upstream release (118). +- Applied post-118 upstream changes (3f91a27d16cf5440f0cb1db7c5972b4924a41d01): + + update mailing list address in documentation + + do not skip RUN execution if device node removal fails + + volume_id: fix UUID raw buffer usage + + volume_id: add prefix=, exec_prefix= + + volume_id: fix typo in function documentation + + volume_id: update ext detection +- Updated udevd initscript: + + if use_initramfs_dev="1" is set, convert udev database created in initramfs + to the current format +- udevconvertdb: Add support for 111 -> 112 conversion (udev database format + has changed again in release 112). +- Updated udev rules: + + major resync with upstream + + add usbfs rule for kernels >= 2.6.22 + + disable device file removal for /dev/ppp and /dev/net/tun + + remove obsolete devfs-style /dev/misc/rtc symlink to /dev/rtc + + if new-style /dev/rtc0 is present, symlink it to /dev/rtc + + use ata_id to create persistent links for libata devices (fixes possible + truncation, but only with kernels >= 2.6.21); old links from SCSI emulation + info still kept for compatibility + + do not create by-uuid/by-label links for whole disk devices (such links + would not be updated properly after media change) + + use encoded label in persistent links instead of dropping unsafe characters + + add ENV{REMOVE_CMD} invocation on remove events + + fix names for bsg and aoe devices + + ignore modprobe errors when using modalias + + add rules to autoload tifm_sd, tifm_ms, memstick modules + + remove broken rules for Tascam USB soundcards (should be moved to + alsa-firmware after fixing) + + remove call to nonexistent /etc/alsa.d/udev-soundfont for emu10k1 + + remove broken "/usr/sbin/alsactl -F restore %%n" invocation (#13592) + + update persistent link creation for device mapper devices: + + fix symlink priorities for snapshots (previously the symlink would point + at the original device directly, which would cause snapshot corruption + if used for writing) + + add /dev/disk/by-id/dm-name-*, /dev/disk/by-id/dm-uuid-* symlinks + +* Wed Nov 28 2007 Sergey Vlasov 108-alt2 +- Applied post-108 upstream changes (0809c264e9878cdd1c61d9fb0e077972bc596ef8): + + make ACTION!="add|change" working (now "!=" is really the inverse of "==") + + udevinfo: export all information stored in database + + udevtest: export ACTION string if given as option + + udevtest: import uevent variables if possible +- Updated udevd initscript: + + fixed check for /dev/shm entry in fstab +- Updated udev rules: + + added /dev/js* compat symlinks for /dev/input/js* (#7669) + +* Thu Mar 29 2007 Sergey Vlasov 108-alt1 +- New upstream release (108). +- Note: udev_run_devd and udev_run_hotplugd utilities were removed from udev + by upstream developers (their usage in rules was removed in 105-alt1). +- Reverted create_floppy_devices change from 0.77-alt3 which was adding the + "-g " option (in udev-106 the "-G " option was added). +- Updated udevd initscript: + + added "start_udev_only" action for use during package upgrade; + + removed setting kernel.hotplug to /sbin/hotplug on stop. +- Updated udev rules: + + updated create_floppy_devices options for new implementation in udev-106; + + removed useless dasd support (s390 only); + + added persistent symlinks for SCSI tapes and medium changer devices; + + fixed WAIT_FOR_SYSFS for SCSI devices; + + fixed wrong rule for raw devices (/dev/raw/raw[0-9]*); + + added -b option to all modprobe invocations; + + disabled MODALIAS autoload for the i82365 module (Debian bug #398962); + + added SUBSYSTEM and ACTION checks to rules for ALSA devices; + + added checks to avoid normal rules for net devices (Gentoo bug #166652); + + added rules to create /dev/disk/{by-uuid,by-label}/* links for md devices + (63-md.rules); these rules are also copied to initramfs (#11190). +- Added /usr/sbin/udevconvertdb utility to convert udev database to the new + format used since udev-107; updated %%pre and %%post scripts to convert the + database during upgrade. + +* Mon Feb 19 2007 Sergey Vlasov 105-alt3 +- Added conflicts with old udev packages to the udev-rules subpackage + (prevents attempts to install udev-rules together with old releases of + udev which had rule files in the main package). +- Updated udevd initscript: + + removed broken code which tried to remove old udev database on start; + + fixed compatibility with startup-0.9.8.9-alt1: + + pass -n option to mount when running from rc.sysinit; + + do not try to start another copy of udevd if already running; + + use $tmpfs_options when mounting /dev initially; + + do not try to remount /dev when running from rc.sysinit; + + do not unmount /dev on stop (this time "service udevd umount" added + for use during dev package upgrade). + + fix double /dev/shm mounting if it is listed in fstab +- Updated net.agent: + + check for ignored interface name first (fixes useless failure during + early startup of interfaces like "lo"). + +* Sun Feb 11 2007 Sergey Vlasov 105-alt2 +- Fixed net.agent to avoid unwanted dependency on etcnet; now net-scripts + should be usable again. +- Moved module-init-tools, dmsetup, libvolume_id from Requires to PreReq + (these packages should be installed before udev to keep rules working). +- Moved rule files to a separate udev-rules package; replaced dependency of + udev-initramfs on udev with udev-rules (now installing new mkinitrd with + initramfs support does not require the main udev package). +- Added Provides: /etc/udev/rules.d, /etc/udev/initramfs-rules.d to the + udev-rules subpackage to be used by other packages with udev rules. +- Updated udevd initscript: + + do not invoke udevtrigger during restart (avoids bad side effects with + some devices, but events which happen during restart will be lost) + + unmount /dev on stop again (reverts the change made in 105-alt1; + workaround for upgrading the dev package); unmount is not performed on + restart and condrestart +- Updated udev rules: + + removed rule for loading the pcmcia module (already in pcmciautils) + +* Thu Feb 08 2007 Sergey Vlasov 105-alt1 +- New upstream release (105). +- Dropped git-scsi_id-garbage patch (fixed upstream). +- Replaced old package build system with a new one based on the upstream git + repository, rewritten spec file for the new layout: + + applied all old patches as commits in the package git repository + + placed udev rules in etc/udev/altlinux/ + + placed udevd initscript in etc/init.d/ + + placed dm_helper in extras/dm_helper/ +- Added udev-initramfs subpackage which contains udev built with klibc for + use in initramfs images created by mkinitrd. +- Added /etc/udev/initramfs-rules.d directory containing symlinks to rule + files which need to be copied to initramfs. +- Disabled recursive substititions in udev_rules_apply_format() (this feature + is dubious, dangerous if used improperly (e.g., there is no protection from + infinite loops) and does not seem to be documented properly). +- libvolume_id: Fixed possible buffer overruns when handling romfs and + ntfs filesystems, and other filesystems with too long labels. +- Updated udev rules: + + moved rules for ignoring of "drivers" and "module" events from + 20-hotplugd.rules to 05-udev-early.rules + + fixed rule for removable IDE avoidance to use ATTR{removable} instead of + ATTRS{removable} + + added rules to create /dev/disk/{by-uuid,by-label}/* links for devices + managed by the device mapper driver (64-device-mapper.rules) + + added rule to invoke /sbin/pam_console_apply in 94-pam-console.rules + (fixes wrong permissions for devices managed by pam_console if these + devices appeared after login, or if udevtrigger was rerun) + + removed callouts to the hotplug package - now modprobe by modalias is + used to load kernel modules, and other actions are handled by scripts + included in the udev package (currently net.agent and sound.agent). +- Updated udevd initscript: + + do not unmount /dev on stop (breaks too much to be useful) + + implement condrestart instead of ignoring it (now udevd will be + restarted during package upgrade, like all other daemons) +- Added udevd-final service to perform final steps of udev initialization + when other parts of the system have been initialized. + +* Sun Dec 17 2006 Sergey Vlasov 103-alt1 +- Added patches: + + git-scsi_id-garbage: scsi_id: remove trailing garbage from ID_SERIAL_SHORT +- Updated udev rules: + + restore lost rules for firmware loading + + kill useless NAME="%%k" assignments + + resync 50-udev-default.rules with SUSE: + + create /dev/pilot symlink also for Handspring Treo devices + + create all possible partitions for ide-floppy devices + + load mmc_block module for MMC devices + + fix device names for (obsolete) raw devices (/dev/raw/rawN) + + check for ACTION=="add" when creating /dev/bus/usb/** devices + + fix permissions for floppy devices (GROUP="floppy", MODE="0660") + + resync 60-persistent-storage.rules with SUSE: + + add /dev/disk/by-id/ata-* symlinks for libata and other SAT devices + + add /dev/disk/by-id/mmc-* symlinks for MMC block devices + + replace DRIVER key with DRIVERS + +* Thu Oct 26 2006 Anton Farygin 103-alt0.1 +- Updated patches to new version +- removed patches: + udev-097-alt-nogroup.patch (included to mainstream) + +* Fri Sep 01 2006 Sergey Vlasov 097-alt2 +- Added patches: + + alt-init-pipe-before-fork: udevd: init signal pipe before forking to + background + + alt-udevd-pidfile: udevd: add pid file support (/dev/.udev/udevd.pid) +- Updated udevd initscript: + + use pid file in /dev/.udev/udevd.pid + + daemonize with "udevd --daemon" instead of "start_daemon --make-pidfile" + (should really fix startup race with udevsettle - #9881) + + revert broken fix for #9881 added in 097-alt1 + +* Mon Aug 28 2006 Sergey Vlasov 097-alt1 +- New version (097). +- Dropped alt-compile-warnings patch (obsolete). +- Removed obsolete "--with klibc" build support from spec (upstream developers + removed klibc support from udev 097). +- Removed obsolete "--with system_sysfs" build support from spec (udev does not + use libsysfs for a long time). +- Tightened udev package dependency on libvolume_id due to unstable ABI. +- Removed tmpfs_options example with "helper" from udev.conf (the corresponding + kernel patch was dropped long ago). +- Added alt-nogroup patch: vol_id: replace "nogroup" group name with "nobody" + (partially fixes #9871). +- Replaced logger-path patch with alt-firmware-initlog patch: use /sbin/initlog + instead of logger (which is in /usr/bin). +- Added alt-firmware-dirs patch: add /usr/lib/hotplug/firmware to firmware + search path (to avoid regressions when firmware loading is switched from + hotplug to udev). +- Updated udevd initscript: + + fixed udevsettle race (#9881); removed broken workaround added in 091-alt3 + + add "-n" option to "mount --move" to fix duplication of /etc/mtab entries + (#7758) + + check that all required kernel features (/sys/class/mem/null/uevent, + /sys/kernel/uevent_seqnum) are present before trying to start udevd + + removed code for handling udevd started from hotplug (udev does not support + this for a long time) + + removed useless $mountcmd indirection from attach_pts_filesystem and + attach_shm_filesystem + + fixed /dev/null redirections in make_extra_nodes, removed /dev/null usage + from places where /dev/null is not yet available +- Updated udev rules: + + moved all WAIT_FOR_SYSFS rules to 05-udev-early.rules + + moved firmware loading rules to 05-udev-early.rules, so that they are used + before hotplug (previously both hotplug and udev were trying to load + firmware; now all firmware loading is handled through udev) + + removed useless rule which "renamed" eth* network interfaces to the same + name + + added joystick support to 60-persistent-input.rules + + added crypto container support to 60-persistent-storage.rules + + removed fuse rule (#9871) + + removed /dev/tpm* rule with "tss" user/group (#9871) + + removed /dev/ucm*, /dev/uverbs* rules with "rdma" group (#9871) + + removed rules for SCSI scanners with "scanner" group (#9871) + + removed /dev/nvram rule with "nvram" group (#9871) + + replaced "tape" group with "disk", removed some rules which were setting + the "tape" group for devices which already had the "disk" group from other + rules (#9871) + + removed "video" group from agpgart, DRI and framebuffer devices (now this + group is used only for video capture devices) +- Create "video" group in %%pre (#9871). + +* Mon Jul 10 2006 Anton Farygin 096-alt1 +- new version + +* Tue Jun 20 2006 Anton Farygin 094-alt1 +- new version + +* Thu Jun 01 2006 Anton Farygin 093-alt3 +- fixed SUBSYSTEM and SYSFS errors in rules + +* Tue May 30 2006 Anton Farygin 093-alt2 +- fixed logger unmet + +* Mon May 29 2006 Anton Farygin 093-alt1 +- new version +- updated rules for new firmware loader + +* Thu May 18 2006 Anton Farygin 092-alt1 +- new version +- added lvm support (#7369, Nick S. Grechukh) + +* Tue May 16 2006 Anton Farygin 091-alt3 +- added workaround (sync) for tmpfs files creation race in initscript + +* Sat May 06 2006 Anton Farygin 091-alt2 +- package adopted to gear +- added patch from mainstream for creating parent directories for seqnum + +* Fri Apr 28 2006 Anton Farygin 091-alt1 +- new version + +* Fri Apr 21 2006 Anton Farygin 090-alt2 +- added sleep after udevtrigger + +* Sun Apr 16 2006 Anton Farygin 090-alt1 +- new version + +* Fri Apr 14 2006 Anton Farygin 089.git20060414-alt0.3 +- updated from git +- added udevsettle to initscript + +* Wed Apr 12 2006 Anton Farygin 089-alt0.2 +- path_id added + +* Tue Apr 11 2006 Anton Farygin 089-alt0.1 +- new version +- all rules changed for new udev policy + +* Mon Mar 13 2006 Anton Farygin 0.77-alt3 +- added rule for floppy devices creation (#9129) +- Zaptel devices removed from rules (#8753) +- Firmware loading fixed (thnx , lioka) +- fixed typo in initscript + +* Tue Feb 21 2006 Anton Farygin 0.77-alt2 +- fixed /dev/pts start and restart + +* Wed Dec 14 2005 Anton Farygin 0.77-alt1 +- new version +- use new regexp for initscript (#8061) +- fixed /dev premissions + +* Tue Nov 15 2005 Anton Farygin 0.75-alt1 +- next version + +* Mon Sep 19 2005 Anton Farygin 0.70-alt1 +- new version +- added rule for ttyACM +- fixed rule for /dev/tty (#8026) + +* Wed Aug 31 2005 Anton Farygin 0.68-alt2 +- fixed double /dev/pts mounting (#6974) + +* Fri Aug 19 2005 Anton Farygin 0.68-alt1 +- new version + +* Mon Aug 08 2005 Anton Farygin 0.65-alt1 +- updated to new version +- fixed typo in rules (#7394) + +* Sun Jul 17 2005 Anton Farygin 0.63-alt2 +- removed patch1 (included to mainstream) +- removed patch0 (use OPTIONS="ignore_device" for ACTION=="remove") +- requries to udev_static_addon added +- fixed rules for vizor (#7394) + +* Wed Jul 13 2005 Anton Farygin 0.62-alt5 +- fixed some bugs in rules + +* Wed Jul 13 2005 Anton Farygin 0.62-alt4 +- rules format updated + +* Wed Jul 13 2005 Anton Farygin 0.62-alt3 +- added rule for running scripts from hotplug.d and dev.d +- udev initscript remove hotplug execution from /proc/sys/kernel/hotplug + +* Tue Jul 12 2005 Anton Farygin 0.62-alt2 +- updated to 062 + +* Wed Mar 30 2005 Alexey Morozov 0.50-alt5 +- Fixes for init script for empty and r/o /dev + +* Tue Mar 29 2005 Alexey Morozov 0.50-alt4 +- init script fixes +- udev lsb rules fixes (#6232, #6297, #6338, and probably #6337) +- built w/ syslog (#5850) +- possible integration w/ udev_static-* + +* Sat Jan 22 2005 Alexey Morozov 0.50-alt3 +- fixed typo in udevd.init (now service should start w/o complaining + even if no devices in /etc/udev/devices can be found) +- udevd is forced to stop, even if it was launched not by init startup + script +- added patch to skip unknown (new) options from udev.conf throughout + C code (udevinfo, udev etc). Bug was reported by vk@. + +* Fri Jan 14 2005 Alexey Morozov 0.50-alt2 +- Use syslog by default (#5850) +- Added udevinfo prints patch from ML +- Preliminary support of modules_lookup +- Actual use of tmpfs_options +- Added directory %_sysconfdir/udev/devices as a workaround for + "missing devices" problem. One can create required device inodes + with /sbin/MAKEDEV -d /etc/udev/devices , and all these + inodes will be copied as is to /dev upon udev startup. +- DO_TRADITIONAL and PREFER_TRADITIONAL removed from cd-names.sh + Traditional names if needed now should be specified right in udev rules + +* Tue Jan 4 2005 Alexey Morozov 0.50-alt1 +- New version (0.50) + +* Tue Dec 28 2004 Alexey Morozov 0.46-alt3 +- extended modifiers are fixed [hopefully] +- ide-names.sh replaced by drive-names.sh which can be used for SCSI disks (only sd*) + as well as as for IDE drives (either IDE hard disks, CD-ROMs, or IDE floppies) + +* Tue Dec 14 2004 Alexey Morozov 0.46-alt2 +- Fixed CD-ROMs / CD-RWs etc permissions + +* Tue Dec 14 2004 Alexey Morozov 0.46-alt1 +- version 0.46 (046) +- service init script greatly improved. Now it passes multiple start/stop etc cycles almost seamlessly +- permissions and device naming rules also improved (mostly taked from Mdk w/ certain Debian stuff + and home-made ide-names.sh and cd-names.sh). Device naming rules are still subject for improvement and + bugfixing though... +- Added patches for %%N and %%U rules keys (see 'man 8 udev' for description) +- Fixes for %%e +- TODO: write a SCSI-oriented companion for ide-names.sh. Contrubutors are welcome ;-) + +* Thu Nov 11 2004 Alexey Morozov 0.43-alt1 +- New version (0.43) +- Spec and patches are re-worked a bit (now it can be correctly build w/ and w/o + system sysfs) + +* Thu Sep 16 2004 Alexey Morozov 0.32-alt1 +- Initial build for ALT Linux +