Compare commits

...
This repository has been archived on 2026-09-10. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.

24 commits

Author SHA1 Message Date
Harald Hoyer
6432dc01e2 - fix /dev/systty
Resolves: rhbz#654935
2010-11-19 09:03:32 +01:00
Harald Hoyer
43b305ff9c - fixed SELinux contexts on "add" events
- backported keymaps
- backported cdrom_id
2010-09-22 14:02:53 +02:00
Harald Hoyer
92e3355c96 - fixed SELinux contexts on "add" events
- backported keymaps
- backported cdrom_id
2010-09-22 13:58:14 +02:00
Harald Hoyer
b5e470b956 * Fri Aug 13 2010 Harald Hoyer <harald@redhat.com> 153-3
- revert the default trigger to "add"
2010-08-13 10:30:02 +02:00
Harald Hoyer
43b3a39d3c * Wed Aug 04 2010 Harald Hoyer <harald@redhat.com> 153-1.0.test.1
- trigger with action==add
- add rd_NO_MDIMSM on noiswmd kernel cmdline option
Resolves: rhbz#589774
- fix console switching and ACLs
Resolves: rhbz#608712
- fix key mapping for Samsung N210
Resolves: rhbz#606302
- fix for blank or audio CDs
Resolves: rhbz#606285
- fix for scsi changer
Resolves: rhbz#600983
2010-08-04 15:59:39 +02:00
Harald Hoyer
24924749ea * Wed Aug 04 2010 Harald Hoyer <harald@redhat.com> 153-1.0.test.1
- trigger with action==add
- add rd_NO_MDIMSM on noiswmd kernel cmdline option
Resolves: rhbz#589774
- fix console switching and ACLs
Resolves: rhbz#608712
- fix key mapping for Samsung N210
Resolves: rhbz#606302
- fix for blank or audio CDs
Resolves: rhbz#606285
- fix for scsi changer
Resolves: rhbz#600983
2010-08-04 15:42:31 +02:00
Harald Hoyer
90c26960fb fix console switching and ACLs 2010-08-04 15:02:15 +02:00
Harald Hoyer
3e4cfcfce0 start_udev: add rd_NO_MDIMSM on noiswmd kernel cmdline option 2010-08-04 15:00:53 +02:00
Harald Hoyer
57475b8536 start_udev: trigger with action==add 2010-08-04 14:59:43 +02:00
Harald Hoyer
f714968249 * Mon Aug 02 2010 Harald Hoyer <harald@redhat.com> 153-1
- version 153, because device-mapper needs IMPORT{db}
- do not remove udev database
Resolves: rhbz#610925
2010-08-02 20:14:04 +02:00
Harald Hoyer
b2bfe88396 * Mon Aug 02 2010 Harald Hoyer <harald@redhat.com> 151-11
- do not remove udev database
Resolves: rhbz#610925
2010-08-02 18:50:58 +02:00
Fedora Release Engineering
e4e1196b9f dist-git conversion 2010-07-29 14:37:42 +00:00
c79a4d6abd - Revert patch for hid2hci rules, fixes keyboards not going into HCI
(Bluetooth) mode after being plugged in (#595178)
2010-06-10 13:08:14 +00:00
b8ad91fd93 - more cdrom_id bugfixes to prevent autoclosing 2010-04-27 10:41:44 +00:00
e542609413 - more cdrom_id bugfixes for buggy cdroms and CD burning (bug #577659) 2010-04-13 15:29:13 +00:00
cc9477b6ac - only correct the timestamp, if UTC=="no" 2010-03-22 14:24:27 +00:00
4041a2a8e4 - only correct the timestamp, if UTC=="no" 2010-03-22 14:21:43 +00:00
9165231177 - only correct the timestamp, if UTC=="no" 2010-03-22 14:19:53 +00:00
f693b0743f - only correct the timestamp, if UTC=="no" 2010-03-22 14:18:48 +00:00
e418dca65a - touch with "--no-create", will not use open() and trigger devs/watchdogs
(bug #575417)
2010-03-22 13:35:22 +00:00
164998caba - fixed return code of touching the device nodes [FAIL] -> [OK] 2010-03-22 10:09:06 +00:00
cd81212d7e add "-D" to gperf call 2010-03-19 13:12:23 +00:00
e8b3267692 - add patch for virtio-ports (#569700)
- own libgudev dirs (#561319)
- minor udev startup script improvements (#549518)
- create /dev/hugepages subdir in start_udev (#541998)
- remove GPL COPYING file from LGPL subpackages (#536843)
- removed symlinks to udevadm
- touch all device nodes after udev settled for the timezone timestamp
    (#569335)
- add some upstream bugfixes
2010-03-19 12:49:37 +00:00
Jesse Keating
66d65ff607 Initialize branch F-13 for udev 2010-02-17 03:22:54 +00:00
28 changed files with 2113 additions and 118 deletions

View file

@ -1 +0,0 @@
udev-151.tar.bz2

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
udev-151.tar.bz2
udev-153.tar.bz2
udev-153.tar.bz2.sign

View file

@ -0,0 +1,35 @@
From 326c5fc3ea684825629eccaf33a548759162a539 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers@vrfy.org>
Date: Tue, 31 Aug 2010 21:29:21 +0200
Subject: [PATCH] set SELinux context on 'add' but not on 'change' events
---
udev/udev-node.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/udev/udev-node.c b/udev/udev-node.c
index 228b3eb..c8113f1 100644
--- a/udev/udev-node.c
+++ b/udev/udev-node.c
@@ -56,10 +56,17 @@ int udev_node_mknod(struct udev_device *dev, const char *file, mode_t mode, uid_
info(udev, "set permissions %s, %#o, uid=%u, gid=%u\n", file, mode, uid, gid);
chmod(file, mode);
chown(file, uid, gid);
- udev_selinux_lsetfilecon(udev, file, mode);
} else {
info(udev, "preserve permissions %s, %#o, uid=%u, gid=%u\n", file, mode, uid, gid);
}
+ /*
+ * Set initial selinux file context only on add events.
+ * We set the proper context on bootup (triger) or for newly
+ * added devices, but we don't change it later, in case
+ * something else has set a custom context in the meantime.
+ */
+ if (strcmp(udev_device_get_action(dev), "add") == 0)
+ udev_selinux_lsetfilecon(udev, file, mode);
/* always update timestamp when we re-use the node, like on media change events */
utimensat(AT_FDCWD, file, NULL, 0);
} else {
--
1.7.2.3

View file

@ -0,0 +1,52 @@
From 939cc18afc49ee8479572c14c7fa777646fd4add Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay.sievers@vrfy.org>
Date: Tue, 3 Aug 2010 15:09:46 +0200
Subject: [PATCH 17/18] udev-acl: properly handle CK change events for root user
mschmidt@redhat.com writes:
> since root is treated specially, it does not do anything!
> udev-acl may want to prevent removing ACLs from root, but
> it must not stop the ACLs being granted to the user of the
> new session.
https://bugzilla.redhat.com/show_bug.cgi?id=608712
---
extras/udev-acl/udev-acl.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/extras/udev-acl/udev-acl.c b/extras/udev-acl/udev-acl.c
index ff04ec6..f2b5005 100644
--- a/extras/udev-acl/udev-acl.c
+++ b/extras/udev-acl/udev-acl.c
@@ -224,14 +224,10 @@ static int consolekit_called(const char *ck_action, uid_t *uid, uid_t *uid2, con
if (s == NULL)
return -1;
u = strtoul(s, NULL, 10);
- if (u == 0)
- return 0;
s = getenv("CK_SEAT_SESSION_USER_UID");
if (s == NULL)
return -1;
u2 = strtoul(s, NULL, 10);
- if (u2 == 0)
- return 0;
s = getenv("CK_SEAT_OLD_SESSION_IS_LOCAL");
s2 = getenv("CK_SEAT_SESSION_IS_LOCAL");
@@ -263,12 +259,11 @@ static int consolekit_called(const char *ck_action, uid_t *uid, uid_t *uid2, con
a = ACTION_ADD;
u = u2;
}
-
break;
case ACTION_NONE:
break;
default:
- g_assert_not_reached ();
+ g_assert_not_reached();
break;
}
--
1.7.2

View file

@ -0,0 +1,125 @@
From 9ac90ae153accdfcb56c24c5748690933ad219b2 Mon Sep 17 00:00:00 2001
From: Michal Schmidt <mschmidt@redhat.com>
Date: Wed, 4 Aug 2010 11:53:25 +0200
Subject: [PATCH 18/18] udev-acl: really fix ACL assignment in CK events
The previous fix for udev-acl was incomplete. The ACL were not properly
assigned to the new user when switching from root's session because of
the test for 'uid != 0'.
Centralize the special handling of root to a single place (in set_facl).
https://bugzilla.redhat.com/show_bug.cgi?id=608712
---
extras/udev-acl/udev-acl.c | 37 +++++++++++++++++++------------------
1 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/extras/udev-acl/udev-acl.c b/extras/udev-acl/udev-acl.c
index f2b5005..31e9991 100644
--- a/extras/udev-acl/udev-acl.c
+++ b/extras/udev-acl/udev-acl.c
@@ -12,20 +12,18 @@
* General Public License for more details:
*/
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <inttypes.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
+#include <acl/libacl.h>
+#include <sys/stat.h>
#include <errno.h>
#include <getopt.h>
-#include <sys/stat.h>
#include <glib.h>
-#include <acl/libacl.h>
+#include <inttypes.h>
#include <libudev.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
static int debug;
@@ -45,6 +43,10 @@ static int set_facl(const char* filename, uid_t uid, int add)
acl_permset_t permset;
int ret;
+ /* don't touch ACLs for root */
+ if (uid == 0)
+ return 0;
+
/* read current record */
acl = acl_get_file(filename, ACL_TYPE_ACCESS);
if (!acl)
@@ -190,8 +192,6 @@ static int consolekit_called(const char *ck_action, uid_t *uid, uid_t *uid2, con
if (s == NULL)
return -1;
u = strtoul(s, NULL, 10);
- if (u == 0)
- return 0;
s = getenv("CK_SEAT_SESSION_IS_LOCAL");
if (s == NULL)
@@ -205,8 +205,6 @@ static int consolekit_called(const char *ck_action, uid_t *uid, uid_t *uid2, con
if (s == NULL)
return -1;
u = strtoul(s, NULL, 10);
- if (u == 0)
- return 0;
s = getenv("CK_SEAT_OLD_SESSION_IS_LOCAL");
if (s == NULL)
@@ -331,6 +329,7 @@ int main (int argc, char* argv[])
};
int action = -1;
const char *device = NULL;
+ bool uid_given = false;
uid_t uid = 0;
uid_t uid2 = 0;
const char* remove_session_id = NULL;
@@ -357,6 +356,7 @@ int main (int argc, char* argv[])
device = optarg;
break;
case 'u':
+ uid_given = true;
uid = strtoul(optarg, NULL, 10);
break;
case 'd':
@@ -369,8 +369,9 @@ int main (int argc, char* argv[])
}
}
- if (action < 0 && device == NULL && uid == 0)
- consolekit_called(argv[optind], &uid, &uid2, &remove_session_id, &action);
+ if (action < 0 && device == NULL && !uid_given)
+ if (!consolekit_called(argv[optind], &uid, &uid2, &remove_session_id, &action))
+ uid_given = true;
if (action < 0) {
fprintf(stderr, "missing action\n\n");
@@ -378,13 +379,13 @@ int main (int argc, char* argv[])
goto out;
}
- if (device != NULL && uid != 0) {
+ if (device != NULL && uid_given) {
fprintf(stderr, "only one option, --device=DEVICEFILE or --user=UID expected\n\n");
rc = 3;
goto out;
}
- if (uid != 0) {
+ if (uid_given) {
switch (action) {
case ACTION_ADD:
/* Add ACL for given uid to all matching devices. */
--
1.7.2

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,26 @@
From 155e313bfda594b3d8e2a31d48f341765bdfa75d Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Tue, 27 Apr 2010 12:22:42 +0200
Subject: [PATCH 110/110] cdrom_id: only mark sr[0-9]* as ID_CDROM
we cannot be sure for xvd*
---
extras/cdrom_id/60-cdrom_id.rules | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/extras/cdrom_id/60-cdrom_id.rules b/extras/cdrom_id/60-cdrom_id.rules
index 16b3af9..b3109f1 100644
--- a/extras/cdrom_id/60-cdrom_id.rules
+++ b/extras/cdrom_id/60-cdrom_id.rules
@@ -5,7 +5,7 @@ SUBSYSTEM!="block", GOTO="cdrom_end"
KERNEL!="sr[0-9]*|xvd*", GOTO="cdrom_end"
ENV{DEVTYPE}!="disk", GOTO="cdrom_end"
-ENV{ID_CDROM}="1"
+KERNEL=="sr[0-9]*", ENV{ID_CDROM}="1"
IMPORT{program}="cdrom_id --export $tempnode"
LABEL="cdrom_end"
--
1.7.0.1

4
40-ia64.rules Normal file
View file

@ -0,0 +1,4 @@
# do not edit this file, it will be overwritten on update
KERNEL=="sgi_*", MODE="0666"

4
40-isdn.rules Normal file
View file

@ -0,0 +1,4 @@
# do not edit this file, it will be overwritten on update
SUBSYSTEM=="capi", KERNEL=="capi", NAME="capi20", GROUP="dialout"
SUBSYSTEM=="tty", KERNEL=="capi[0-9]*", NAME="capi/%n"

6
40-ppc.rules Normal file
View file

@ -0,0 +1,6 @@
# do not edit this file, it will be overwritten on update
KERNEL=="iseries/ibmsis*", GROUP="disk"
KERNEL=="iseries/nvt*", GROUP="disk"
KERNEL=="iseries/vt*", GROUP="disk"
KERNEL=="iseries/vtty*, GROUP="dialout"

4
40-s390.rules Normal file
View file

@ -0,0 +1,4 @@
# do not edit this file, it will be overwritten on update
KERNEL=="z90crypt", MODE="0666"

4
64-device-mapper.rules Normal file
View file

@ -0,0 +1,4 @@
# do not edit this file, it will be overwritten on update
KERNEL=="device-mapper", NAME="mapper/control"

36
64-md-raid.rules Normal file
View file

@ -0,0 +1,36 @@
# do not edit this file, it will be overwritten on update
SUBSYSTEM!="block", GOTO="md_end"
ACTION!="add|change", GOTO="md_end"
# import data from a raid member and activate it
#ENV{ID_FS_TYPE}=="linux_raid_member", IMPORT{program}="/sbin/mdadm --examine --export $tempnode", RUN+="/sbin/mdadm --incremental $env{DEVNAME}"
# import data from a raid set
KERNEL!="md*", GOTO="md_end"
# partitions have no md/{array_state,metadata_version}
ENV{DEVTYPE}=="partition", GOTO="md_ignore_state"
# container devices have a metadata version of e.g. 'external:ddf' and
# never leave state 'inactive'
ATTR{md/metadata_version}=="external:[A-Za-z]*", ATTR{md/array_state}=="inactive", GOTO="md_ignore_state"
TEST!="md/array_state", GOTO="md_end"
ATTR{md/array_state}=="|clear|inactive", GOTO="md_end"
LABEL="md_ignore_state"
IMPORT{program}="/sbin/mdadm --detail --export $tempnode"
ENV{DEVTYPE}=="disk", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}", OPTIONS+="string_escape=replace"
ENV{DEVTYPE}=="disk", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}"
ENV{DEVTYPE}=="disk", ENV{MD_DEVNAME}=="?*", SYMLINK+="md/$env{MD_DEVNAME}"
ENV{DEVTYPE}=="partition", ENV{MD_NAME}=="?*", SYMLINK+="disk/by-id/md-name-$env{MD_NAME}-part%n", OPTIONS+="string_escape=replace"
ENV{DEVTYPE}=="partition", ENV{MD_UUID}=="?*", SYMLINK+="disk/by-id/md-uuid-$env{MD_UUID}-part%n"
ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[^0-9]", SYMLINK+="md/$env{MD_DEVNAME}%n"
ENV{DEVTYPE}=="partition", ENV{MD_DEVNAME}=="*[0-9]", SYMLINK+="md/$env{MD_DEVNAME}p%n"
IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
OPTIONS+="link_priority=100"
OPTIONS+="watch"
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"
LABEL="md_end"

View file

@ -1,22 +0,0 @@
# Makefile for source rpm: udev
# $Id: Makefile,v 1.3 2007/10/15 19:29:11 notting Exp $
NAME := udev
SPECFILE = $(firstword $(wildcard *.spec))
UPSTREAM_CHECKS = sign
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attempt a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View file

@ -1,6 +1,6 @@
Patch:
@for i in 00*.patch; do n=$$[$$(echo $$i|cut -f 1 -d '-'|sed -e 's#^0*##')]; echo "Patch$$n: $$i";done
@for i in 0*.patch; do n=$$[$$(echo $$i|cut -f 1 -d '-'|sed -e 's#^0*##')]; echo "Patch$$n: $$i";done
patch:
@for i in 00*.patch; do n=$$[$$(echo $$i|cut -f 1 -d '-'|sed -e 's#^0*##')]; echo "%patch$$n -p1 -b .git$$n";done
@for i in 0*.patch; do n=$$[$$(echo $$i|cut -f 1 -d '-'|sed -e 's#^0*##')]; echo "%patch$$n -p1 -b .git$$n";done

View file

@ -1 +1,2 @@
aeae0e6273dcbec246c3c1b9868ebed1 udev-151.tar.bz2
76d12a9d97c3409e9ef60a4288227e8f udev-153.tar.bz2
962e6d9b7fcf45432b361e3116923a3a udev-153.tar.bz2.sign

View file

@ -55,8 +55,16 @@ if [ -n "$selinuxfs" ] && [ "`cat /proc/self/attr/current`" != "kernel" ]; then
SELINUX_STATE=1
fi
fi
[ -c /dev/systty ] && ln -fs tty0 /dev/systty
touch_recursive() {
( cd $1;
for i in *; do
[[ -c "$i" || -b "$i" ]] && touch --no-create "$i"
[ -d "$i" ] && touch_recursive "$i"
done )
return 0
}
xargs_simple () {
if [ "$1" = "-n" ]; then
@ -94,10 +102,11 @@ make_extra_nodes () {
[ -d $udev_root/pts ] || mkdir -m 0755 $udev_root/pts
[ -d $udev_root/shm ] || mkdir -m 0755 $udev_root/shm
[ -d $udev_root/hugepages ] || mkdir -m 0755 $udev_root/hugepages
[ -a /dev/MAKEDEV ] || ln -s $MAKEDEV /dev/MAKEDEV;
USE_MD5="false"
[ -x /usr/bin/md5sum -a "$UDEV_USE_MAKEDEV_CACHE" == "yes" ] && USE_MD5="true"
[[ "$UDEV_USE_MAKEDEV_CACHE" == "yes" && -x /usr/bin/md5sum ]] && USE_MD5="true"
for i in 0 1 2 3 4 5 6 7; do
[ -b /dev/loop$i ] || /bin/mknod -m 0640 /dev/loop$i b 7 $i
@ -157,9 +166,11 @@ make_extra_nodes () {
if [ "$1" != "*" ]; then
#echo "Warning: $devdir is deprecated. Please use /etc/udev/makedev.d/."
cp -ar "$@" $udev_root/
pushd "$udev_root" &> "$udev_root/null"
[ -x /sbin/restorecon ] && /sbin/restorecon "$@"
popd &> "$udev_root/null"
if [ -x /sbin/restorecon ]; then
pushd "$udev_root" &> "$udev_root/null"
/sbin/restorecon "$@"
popd &> "$udev_root/null"
fi
fi
popd &> "$udev_root/null"
done
@ -224,11 +235,11 @@ echo -n "$STRING"
# mount the tmpfs on ${udev_root%/}, if not already done
LANG=C awk "\$2 == \"${udev_root%/}\" && ( \$3 == \"devtmpfs\" || \$3 == \"tmpfs\" ) { exit 1 }" /proc/mounts && {
if LANG=C fgrep -q "none ${udev_root%/}/pts " /proc/mounts; then
if LANG=C grep -Fq "none ${udev_root%/}/pts " /proc/mounts; then
PTSDIR=$(mktemp -d)
mount --move $udev_root/pts "$PTSDIR"
fi
if LANG=C fgrep -q "none ${udev_root%/}/shm " /proc/mounts; then
if LANG=C grep -Fq "none ${udev_root%/}/shm " /proc/mounts; then
SHMDIR=$(mktemp -d)
mount --move $udev_root/shm "$SHMDIR"
fi
@ -250,15 +261,14 @@ LANG=C awk "\$2 == \"${udev_root%/}\" && ( \$3 == \"devtmpfs\" || \$3 == \"tmpfs
}
make_extra_nodes
cmdline=$(cat /proc/cmdline)
kill_udevd > "$udev_root/null" 2>&1
rm -fr $udev_root/.udev > "$udev_root/null" 2>&1
mkdir -p $udev_root/.udev > "$udev_root/null" 2>&1
UDEV_OPTS=""
if [ -f "/sys/class/tty/console/uevent" ]; then
# trigger the sorted events
echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
cmdline=$(cat /proc/cmdline)
if strstr "$cmdline" udevtrace; then
UDEV_OPTS="$UDEV_OPTS --debug-trace"
fi
@ -284,6 +294,9 @@ if [ -f "/sys/class/tty/console/uevent" ]; then
if strstr "$cmdline" udevchilds; then
/sbin/udevadm control --max-childs=$(getval udevchilds $cmdline)
fi
if strstr "$cmdline" noiswmd; then
/sbin/udevadm control --env=rd_NO_MDIMSM=1
fi
/sbin/udevadm control --env=STARTUP=1
@ -301,20 +314,26 @@ if [ -f "/sys/class/tty/console/uevent" ]; then
echo "Triggering Rest"
fi
/sbin/udevadm trigger
/sbin/udevadm trigger --action=add
ret=$[$ret + $?]
wait_for_queue $udevtimeout
ret=$[$ret + $?]
wait
ret=$[$ret + $?]
/sbin/udevadm control --env=STARTUP=
# touch all device files for timezone glitches
# "find" is in /usr/bin and might not be available
if [ -f /etc/sysconfig/clock ]; then
. /etc/sysconfig/clock
[[ "$UTC" == "false" || "$UTC" == "no" ]] \
&& touch_recursive /dev > "$udev_root/null" 2>&1
fi
else
echo -n " kernel too old for this udev version "
/sbin/udevd -d $UDEV_OPTS
ret=10
fi
ret=$[$ret + $?]
[ $ret -eq 0 ] && success $"$STRING" || failure $"$STRING"
echo
exit 0

View file

@ -1,8 +0,0 @@
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: See http://www.kernel.org/signature.html for info
iD8DBQBKWxhnyGugalF9Dw4RAvvjAJ9ed+RMRi8gXcFyTPxXsHZpbLSROgCfdpCc
lr5nSwsGGO9e0+wBbD7WDoc=
=5/z0
-----END PGP SIGNATURE-----

13
udev-151-gperf.patch Normal file
View file

@ -0,0 +1,13 @@
diff -up udev-151/extras/keymap/keys-from-name.gperf udev-151/extras/keymap/keys-from-name
diff -up udev-151/Makefile.am.gperf udev-151/Makefile.am
--- udev-151/Makefile.am.gperf 2010-03-19 14:04:36.000000000 +0100
+++ udev-151/Makefile.am 2010-03-19 14:04:52.000000000 +0100
@@ -550,7 +550,7 @@ extras/keymap/keys-from-name.gperf: extr
$(AM_V_GEN)$(AWK) 'BEGIN{ print "struct key { const char* name; unsigned short id; };"; print "%null-strings"; print "%%";} { print $$1 ", " $$1 }' < $< > $@
extras/keymap/keys-from-name.h: extras/keymap/keys-from-name.gperf Makefile
- $(AM_V_GEN)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_key -H hash_key_name -p -C < $< > $@
+ $(AM_V_GEN)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_key -H hash_key_name -p -C -D < $< > $@
extras/keymap/keys-to-name.h: extras/keymap/keys.txt Makefile
$(AM_V_GEN)$(AWK) 'BEGIN{ print "const char* const key_names[KEY_CNT] = { "} { print "[" $$1 "] = \"" $$1 "\"," } END{print "};"}' < $< > $@

30
udev-151-virtio.patch Normal file
View file

@ -0,0 +1,30 @@
From 764304885705e51ef3eb1d078eed3cf6604c4684 Mon Sep 17 00:00:00 2001
From: Amit Shah <amit.shah@redhat.com>
Date: Fri, 26 Feb 2010 14:02:51 +0530
Subject: [PATCH] Fix virtio-ports rule to use $attr instead of $ATTR
Newer udev versions don't understand $ATTR.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
rules/rules.d/50-udev-default.rules | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
Changed by Harald Hoyer <harald@redhat.com>
diff --git a/rules/rules.d/50-udev-default.rules b/rules/rules.d/50-udev-default.rules
index f8556d1..da1535f 100644
--- a/rules/rules.d/50-udev-default.rules
+++ b/rules/rules.d/50-udev-default.rules
@@ -18,7 +18,7 @@ KERNEL=="mwave", GROUP="dialout"
KERNEL=="hvc*|hvsi*", GROUP="dialout"
# virtio serial / console ports
-KERNEL=="vport*", SYMLINK+="virtio-ports/$attr{name}"
+KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-ports/$attr{name}"
# mem
KERNEL=="null|zero|full|random|urandom", MODE="0666"
--
1.6.2.5

View file

@ -0,0 +1,246 @@
diff -ur udev-153-orig/extras/cdrom_id/cdrom_id.c udev-153/extras/cdrom_id/cdrom_id.c
--- udev-153-orig/extras/cdrom_id/cdrom_id.c 2010-04-17 19:29:58.000000000 +0200
+++ udev-153/extras/cdrom_id/cdrom_id.c 2010-08-31 10:35:41.000000000 +0200
@@ -85,6 +85,8 @@
static unsigned int cd_media_dvd_rom = 0;
static unsigned int cd_media_dvd_r = 0;
static unsigned int cd_media_dvd_rw = 0;
+static unsigned int cd_media_dvd_rw_ro = 0; /* restricted overwrite mode */
+static unsigned int cd_media_dvd_rw_seq = 0; /* sequential mode */
static unsigned int cd_media_dvd_ram = 0;
static unsigned int cd_media_dvd_plus_r = 0;
static unsigned int cd_media_dvd_plus_rw = 0;
@@ -348,6 +350,39 @@
return 0;
}
+static int cd_profiles_old_mmc(struct udev *udev, int fd)
+{
+ struct scsi_cmd sc;
+ int err;
+
+ unsigned char header[32];
+
+ scsi_cmd_init(udev, &sc, header, sizeof(header));
+ scsi_cmd_set(udev, &sc, 0, 0x51);
+ scsi_cmd_set(udev, &sc, 8, sizeof(header));
+ scsi_cmd_set(udev, &sc, 9, 0);
+ err = scsi_cmd_run(udev, &sc, fd, header, sizeof(header));
+ if ((err != 0)) {
+ info_scsi_cmd_err(udev, "READ DISC INFORMATION", err);
+ info(udev, "no current profile, assuming no media\n");
+ return -1;
+ };
+
+ cd_media = 1;
+
+ if (header[2] & 16) {
+ cd_media_cd_rw = 1;
+ info(udev, "profile 0x0a media_cd_rw\n");
+ } else if ((header[2] & 3) < 2 && cd_cd_r) {
+ cd_media_cd_r = 1;
+ info(udev, "profile 0x09 media_cd_r\n");
+ } else {
+ cd_media_cd_rom = 1;
+ info(udev, "profile 0x08 media_cd_rom\n");
+ }
+ return 0;
+}
+
static int cd_profiles(struct udev *udev, int fd)
{
struct scsi_cmd sc;
@@ -365,6 +400,12 @@
err = scsi_cmd_run(udev, &sc, fd, features, sizeof(features));
if ((err != 0)) {
info_scsi_cmd_err(udev, "GET CONFIGURATION", err);
+ /* handle pre-MMC2 drives which do not support GET CONFIGURATION */
+ if (SK(err) == 0x5 && ASC(err) == 0x20) {
+ info(udev, "drive is pre-MMC2 and does not support 46h get configuration command\n");
+ info(udev, "trying to work around the problem\n");
+ return cd_profiles_old_mmc(udev, fd);
+ }
return -1;
}
@@ -440,10 +481,16 @@
cd_media_dvd_ram = 1;
break;
case 0x13:
+ info(udev, "profile 0x%02x media_dvd_rw_ro\n", cur_profile);
+ cd_media = 1;
+ cd_media_dvd_rw = 1;
+ cd_media_dvd_rw_ro = 1;
+ break;
case 0x14:
- info(udev, "profile 0x%02x media_dvd_rw\n", cur_profile);
+ info(udev, "profile 0x%02x media_dvd_rw_seq\n", cur_profile);
cd_media = 1;
cd_media_dvd_rw = 1;
+ cd_media_dvd_rw_seq = 1;
break;
case 0x1B:
info(udev, "profile 0x%02x media_dvd_plus_r\n", cur_profile);
@@ -527,12 +574,126 @@
cd_media = 1;
info(udev, "disk type %02x\n", header[8]);
+ info(udev, "hardware reported media status: %s\n", media_status[header[2] & 3]);
/* exclude plain CDROM, some fake cdroms return 0 for "blank" media here */
if (!cd_media_cd_rom)
cd_media_state = media_status[header[2] & 3];
- if ((header[2] & 3) != 2)
+ /* fresh DVD-RW in restricted overwite mode reports itself as
+ * "appendable"; change it to "blank" to make it consistent with what
+ * gets reported after blanking, and what userspace expects */
+ if (cd_media_dvd_rw_ro && (header[2] & 3) == 1)
+ cd_media_state = media_status[0];
+
+ /* DVD+RW discs (and DVD-RW in restricted mode) once formatted are
+ * always "complete", DVD-RAM are "other" or "complete" if the disc is
+ * write protected; we need to check the contents if it is blank */
+ if ((cd_media_dvd_rw_ro || cd_media_dvd_plus_rw || cd_media_dvd_plus_rw_dl || cd_media_dvd_ram) && (header[2] & 3) > 1) {
+ unsigned char buffer[32 * 2048];
+ unsigned char result, len;
+ int block, offset;
+
+ if (cd_media_dvd_ram) {
+ /* a write protected dvd-ram may report "complete" status */
+
+ unsigned char dvdstruct[8];
+ unsigned char format[12];
+
+ scsi_cmd_init(udev, &sc, dvdstruct, sizeof(dvdstruct));
+ scsi_cmd_set(udev, &sc, 0, 0xAD);
+ scsi_cmd_set(udev, &sc, 7, 0xC0);
+ scsi_cmd_set(udev, &sc, 9, sizeof(dvdstruct));
+ scsi_cmd_set(udev, &sc, 11, 0);
+ err = scsi_cmd_run(udev, &sc, fd, dvdstruct, sizeof(dvdstruct));
+ if ((err != 0)) {
+ info_scsi_cmd_err(udev, "READ DVD STRUCTURE", err);
+ return -1;
+ }
+ if (dvdstruct[4] & 0x02) {
+ cd_media_state = media_status[2];
+ info(udev, "write-protected DVD-RAM media inserted\n");
+ goto determined;
+ }
+
+ /* let's make sure we don't try to read unformatted media */
+ scsi_cmd_init(udev, &sc, format, sizeof(format));
+ scsi_cmd_set(udev, &sc, 0, 0x23);
+ scsi_cmd_set(udev, &sc, 8, sizeof(format));
+ scsi_cmd_set(udev, &sc, 9, 0);
+ err = scsi_cmd_run(udev, &sc, fd, format, sizeof(format));
+ if ((err != 0)) {
+ info_scsi_cmd_err(udev, "READ DVD FORMAT CAPACITIES", err);
+ return -1;
+ }
+
+ len = format[3];
+ if (len & 7 || len < 16) {
+ info(udev, "invalid format capacities length\n");
+ return -1;
+ }
+
+ switch(format[8] & 3) {
+ case 1:
+ info(udev, "unformatted DVD-RAM media inserted\n");
+ /* This means that last format was interrupted
+ * or failed, blank dvd-ram discs are factory
+ * formatted. Take no action here as it takes
+ * quite a while to reformat a dvd-ram and it's
+ * not automatically started */
+ goto determined;
+
+ case 2:
+ info(udev, "formatted DVD-RAM media inserted\n");
+ break;
+
+ case 3:
+ cd_media = 0; //return no media
+ info(udev, "format capacities returned no media\n");
+ return -1;
+ }
+ }
+
+ /* Take a closer look at formatted media (unformatted DVD+RW
+ * has "blank" status", DVD-RAM was examined earlier) and check
+ * for ISO and UDF PVDs or a fs superblock presence and do it
+ * in one ioctl (we need just sectors 0 and 16) */
+ scsi_cmd_init(udev, &sc, buffer, sizeof(buffer));
+ scsi_cmd_set(udev, &sc, 0, 0x28);
+ scsi_cmd_set(udev, &sc, 5, 0);
+ scsi_cmd_set(udev, &sc, 8, 32);
+ scsi_cmd_set(udev, &sc, 9, 0);
+ err = scsi_cmd_run(udev, &sc, fd, buffer, sizeof(buffer));
+ if ((err != 0)) {
+ info_scsi_cmd_err(udev, "READ FIRST 32 BLOCKS", err);
+ return -1;
+ }
+
+ /* if any non-zero data is found in sector 16 (iso and udf) or
+ * eventually 0 (fat32 boot sector, ext2 superblock, etc), disc
+ * is assumed non-blank */
+ result = 0;
+
+ for (block = 32768; block >= 0 && !result; block -= 32768) {
+ offset = block;
+ while (offset < (block + 2048) && !result) {
+ result = buffer [offset];
+ offset++;
+ }
+ }
+
+ if (!result) {
+ cd_media_state = media_status[0];
+ info(udev, "no data in blocks 0 or 16, assuming blank\n");
+ } else {
+ info(udev, "data in blocks 0 or 16, assuming complete\n");
+ }
+ }
+
+determined:
+ /* "other" is e. g. DVD-RAM, can't append sessions there; DVDs in
+ * restricted overwrite mode can never append, only in sequential mode */
+ if ((header[2] & 3) < 2 && !cd_media_dvd_rw_ro)
cd_media_session_next = header[10] << 8 | header[5];
cd_media_session_count = header[9] << 8 | header[4];
cd_media_track_count = header[11] << 8 | header[6];
@@ -710,13 +871,11 @@
if (cd_profiles(udev, fd) < 0)
goto print;
- /* get writable media state */
- if (cd_media_info(udev, fd) < 0)
- goto print;
-
/* get session/track info */
- if (cd_media_toc(udev, fd) < 0)
- goto print;
+ cd_media_toc(udev, fd);
+
+ /* get writable media state */
+ cd_media_info(udev, fd);
print:
printf("ID_CDROM=1\n");
@@ -810,14 +969,14 @@
printf("ID_CDROM_MEDIA_SESSION_NEXT=%d\n", cd_media_session_next);
if (cd_media_session_count > 0)
printf("ID_CDROM_MEDIA_SESSION_COUNT=%d\n", cd_media_session_count);
+ if (cd_media_session_count > 1 && cd_media_session_last_offset > 0)
+ printf("ID_CDROM_MEDIA_SESSION_LAST_OFFSET=%llu\n", cd_media_session_last_offset);
if (cd_media_track_count > 0)
printf("ID_CDROM_MEDIA_TRACK_COUNT=%d\n", cd_media_track_count);
if (cd_media_track_count_audio > 0)
printf("ID_CDROM_MEDIA_TRACK_COUNT_AUDIO=%d\n", cd_media_track_count_audio);
if (cd_media_track_count_data > 0)
printf("ID_CDROM_MEDIA_TRACK_COUNT_DATA=%d\n", cd_media_track_count_data);
- if (cd_media_session_last_offset > 0)
- printf("ID_CDROM_MEDIA_SESSION_LAST_OFFSET=%llu\n", cd_media_session_last_offset);
exit:
if (fd >= 0)
close(fd);

25
udev-153-changer.patch Normal file
View file

@ -0,0 +1,25 @@
diff -up udev-153/rules/redhat/40-redhat.rules.changer udev-153/rules/redhat/40-redhat.rules
--- udev-153/rules/redhat/40-redhat.rules.changer 2010-08-04 15:32:00.000000000 +0200
+++ udev-153/rules/redhat/40-redhat.rules 2010-08-04 15:35:27.000000000 +0200
@@ -5,17 +5,17 @@ KERNEL=="hd*[0-9]", ATTRS{media}=="flopp
KERNEL=="fw*", PROGRAM="fw_unit_symlinks.sh %k %n", SYMLINK+="$result"
-ACTION=="add", KERNEL=="sg[0-9]*", SUBSYSTEM=="scsi_device", ATTRS{type}=="3|6", SYMLINK+="scanner scanner-%k", MODE="0660"
+ACTION=="add", KERNEL=="sg[0-9]*", SUBSYSTEM=="scsi_generic", ATTRS{type}=="3|6", SYMLINK+="scanner scanner-%k", MODE="0660"
-ACTION=="add", KERNEL=="sg[0-9]*", SUBSYSTEM=="scsi_device", ATTRS{type}=="8", SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk"
+ACTION=="add", KERNEL=="sg[0-9]*", SUBSYSTEM=="scsi_generic", ATTRS{type}=="8", SYMLINK+="changer changer-%k", MODE="0660", GROUP="disk"
SUBSYSTEM=="usb", KERNEL=="sd*", ATTRS{bInterfaceClass}=="08", ATTRS{bInterfaceSubClass}=="04", GROUP="floppy", MODE="0660", SYMLINK+="floppy floppy-%k"
KERNEL=="fd[0-9]*", SYMLINK+="floppy floppy-%k"
-ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="0|7|14", \
+ACTION=="add", SUBSYSTEM=="scsi_generic", ATTRS{type}=="0|7|14", \
RUN+="/sbin/modprobe sd_mod"
-ACTION=="add", SUBSYSTEM=="scsi_device", ATTRS{type}=="[45]", \
+ACTION=="add", SUBSYSTEM=="scsi_generic", ATTRS{type}=="[45]", \
RUN+="/sbin/modprobe sr_mod"
KERNEL=="vcs", OWNER="vcsa", GROUP="tty"

View file

@ -0,0 +1,194 @@
diff -urN udev-153-orig/extras/keymap/95-keyboard-force-release.rules udev-153/extras/keymap/95-keyboard-force-release.rules
--- udev-153-orig/extras/keymap/95-keyboard-force-release.rules 2010-09-21 13:52:31.000000000 +0200
+++ udev-153/extras/keymap/95-keyboard-force-release.rules 2010-08-04 14:23:27.000000000 +0200
@@ -19,7 +19,7 @@
ENV{DMI_VENDOR}="$attr{[dmi/id]sys_vendor}"
-ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*N128*|*N130*|*N140*|*N210*|*SR70S/SR71S*|*Q210/P210*", RUN+="keyboard-force-release.sh $devpath samsung-other"
+ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*E252*|*N120*|*N128*|*N130*|*N140*|*N148/N208*|*N150*|*N150/N210/N220*|*N220*|*N308*|*N310*|*N510*|*NB30*|*NC10/N110*|*ND10*|*Q210/P210*|*R410P*|*R425/R525*|*R428/P428*|*R460*|*R463*|*R468/R418*|*R480/R431/R481*|*R509*|*R518*|*R519/R719*|*R520/R522/R620*|*R528/R728*|*R530/R730*|*R530/R730/P590*|*R560*|*R580*|*R580/R590*|*R59/R60/R61*|*R59P/R60P/R61P*|*R710*|*R720*|*R780/R778*|*SR58P*|*SR700*|*SR70S/SR71S*|*SX22S*|*X118*|*X120*|*X460*", RUN+="keyboard-force-release.sh $devpath samsung-other"
ENV{DMI_VENDOR}=="Dell Inc.", ATTR{[dmi/id]product_name}=="Studio 1557|Studio 1558", RUN+="keyboard-force-release.sh $devpath common-volume-keys"
@@ -29,4 +29,10 @@
ENV{DMI_VENDOR}=="MTC", ATTR{[dmi/id]product_version}=="A0", RUN+="keyboard-force-release.sh $devpath common-volume-keys"
+ENV{DMI_VENDOR}=="PEGATRON CORP.", ATTR{[dmi/id]product_name}=="Spring Peak", RUN+="keyboard-force-release.sh $devpath common-volume-keys"
+
+ENV{DMI_VENDOR}=="TOSHIBA", ATTR{[dmi/id]product_name}=="Satellite U300|Satellite Pro U300|Satellite U305", RUN+="keyboard-force-release.sh $devpath common-volume-keys"
+
+ENV{DMI_VENDOR}=="Viooo Corporation", ATTR{[dmi/id]product_name}=="PT17", RUN+="keyboard-force-release.sh $devpath common-volume-keys"
+
LABEL="force_release_end"
diff -urN udev-153-orig/extras/keymap/95-keymap.rules udev-153/extras/keymap/95-keymap.rules
--- udev-153-orig/extras/keymap/95-keymap.rules 2010-09-21 13:52:31.000000000 +0200
+++ udev-153/extras/keymap/95-keymap.rules 2010-09-21 12:02:18.000000000 +0200
@@ -21,7 +21,11 @@
ENV{ID_VENDOR}=="Logitech*", ATTRS{name}=="Logitech USB Multimedia Keyboard", RUN+="keymap $name logitech-wave"
ENV{ID_VENDOR}=="Logitech*", ATTRS{name}=="Logitech USB Receiver", RUN+="keymap $name logitech-wave-cordless"
+# Logitech Cordless Wave Pro looks slightly weird; some hotkeys are coming through the mouse interface
+ENV{ID_VENDOR_ID}=="046d", ENV{ID_MODEL_ID}=="c529", ATTRS{name}=="Logitech USB Receiver", RUN+="keymap $name logitech-wave-pro-cordless"
+
ENV{ID_VENDOR}=="Lite-On_Technology_Corp*", ATTRS{name}=="Lite-On Technology Corp. ThinkPad USB Keyboard with TrackPoint", RUN+="keymap $name lenovo-thinkpad-usb-keyboard-trackpoint"
+ENV{ID_VENDOR_ID}=="04b3", ENV{ID_MODEL_ID}=="301[89]", RUN+="keymap $name ibm-thinkpad-usb-keyboard-trackpoint"
GOTO="keyboard_end"
@@ -37,11 +41,12 @@
ENV{DMI_VENDOR}=="IBM*", KERNELS=="input*", ATTRS{name}=="ThinkPad Extra Buttons", RUN+="keymap $name module-ibm"
ENV{DMI_VENDOR}=="LENOVO*", KERNELS=="input*", ATTRS{name}=="ThinkPad Extra Buttons", RUN+="keymap $name module-lenovo"
+ENV{DMI_VENDOR}=="LENOVO*", KERNELS=="input*", ATTRS{name}=="Lenovo ThinkPad SL Series extra buttons", RUN+="keymap $name 0x0E bluetooth"
ENV{DMI_VENDOR}=="ASUS*", KERNELS=="input*", ATTRS{name}=="Asus Extra Buttons", ATTR{[dmi/id]product_name}=="W3J", RUN+="keymap $name module-asus-w3j"
ENV{DMI_VENDOR}=="Sony*", KERNELS=="input*", ATTRS{name}=="Sony Vaio Keys", RUN+="keymap $name module-sony"
# Older Vaios have some different keys
-ENV{DMI_VENDOR}=="Sony*", ATTR{[dmi/id]product_name}=="*PCG-C1*|*PCG-K25*|*PCG-F1*|*PCG-F2*|*PCG-F3*|*PCG-F4*|*PCG-F5*|*PCG-F6*|*PCG-FX*|*PCG-FRV*|*PCG-GR*|*PCG-TR*|*PCG-NV*|*PCG-Z*|*VGN-S360*|*VGN-SZ2HP_B*", ATTRS{name}=="Sony Vaio Keys", RUN+="keymap $name module-sony-old"
+ENV{DMI_VENDOR}=="Sony*", ATTR{[dmi/id]product_name}=="*PCG-C1*|*PCG-K25*|*PCG-F1*|*PCG-F2*|*PCG-F3*|*PCG-F4*|*PCG-F5*|*PCG-F6*|*PCG-FX*|*PCG-FRV*|*PCG-GR*|*PCG-TR*|*PCG-NV*|*PCG-Z*|*VGN-S360*", ATTRS{name}=="Sony Vaio Keys", RUN+="keymap $name module-sony-old"
#
# The following rules belong to standard i8042 AT keyboard with high key codes.
@@ -53,19 +58,22 @@
LABEL="keyboard_vendorcheck"
ENV{DMI_VENDOR}=="Dell*", RUN+="keymap $name dell"
-ENV{DMI_VENDOR}=="Dell*", ATTR{[dmi/id]product_name}=="Inspiron 1011", RUN+="keymap $name 0x84 wlan"
+ENV{DMI_VENDOR}=="Dell*", ATTR{[dmi/id]product_name}=="Inspiron 910|Inspiron 1010|Inspiron 1011|Inspiron 1012|Inspiron 1110|Inspiron 1210", RUN+="keymap $name 0x84 wlan"
ENV{DMI_VENDOR}=="Compaq*", ATTR{[dmi/id]product_name}=="*E500*|*Evo N*", RUN+="keymap $name compaq-e_evo"
ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="*3000*", RUN+="keymap $name lenovo-3000"
ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="ThinkPad X6*", ATTR{[dmi/id]product_version}=="* Tablet" RUN+="keymap $name lenovo-thinkpad_x6_tablet"
ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="ThinkPad X200 Tablet*", ATTR{[dmi/id]product_version}=="* Tablet" RUN+="keymap $name lenovo-thinkpad_x200_tablet"
+ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_version}=="*IdeaPad*", RUN+="keymap $name lenovo-ideapad"
+ENV{DMI_VENDOR}=="LENOVO*", ATTR{[dmi/id]product_name}=="S10-*", RUN+="keymap $name lenovo-ideapad"
+ENV{DMI_VENDOR}=="LENOVO", ATTR{[dmi/id]product_version}=="*IdeaPad Y550*", RUN+="keymap $name 0x95 media 0xA3 play"
ENV{DMI_VENDOR}=="Hewlett-Packard*", RUN+="keymap $name hewlett-packard"
ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[tT][aA][bB][lL][eE][tT]*", RUN+="keymap $name hewlett-packard-tablet"
ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[pP][aA][vV][iI][lL][iI][oO][nN]*", RUN+="keymap $name hewlett-packard-pavilion"
ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*Compaq*|*EliteBook*|*2230s*", RUN+="keymap $name hewlett-packard-compaq_elitebook"
-ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*2510p*|*2530p*", RUN+="keymap $name hewlett-packard-2510p_2530p"
+ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*2510p*|*2530p*|HP G60 Notebook PC", RUN+="keymap $name hewlett-packard-2510p_2530p"
ENV{DMI_VENDOR}=="Hewlett-Packard*", ATTR{[dmi/id]product_name}=="*[tT][xX]2*", RUN+="keymap $name hewlett-packard-tx2"
ENV{DMI_VENDOR}=="Hewlett-Packard", ATTR{[dmi/id]product_name}=="Presario 2100*", RUN+="keymap $name hewlett-packard-presario-2100"
# HP Pavillion dv6315ea has empty DMI_VENDOR
@@ -77,7 +85,8 @@
ENV{DMI_VENDOR}=="Acer*", RUN+="keymap $name acer"
ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Extensa*", ATTR{[dmi/id]product_name}=="*5210*|*5220*|*5610*|*5620*|*5720*", RUN+="keymap $name 0xEE screenlock"
ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*C300*", RUN+="keymap $name acer-travelmate_c300"
-ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*6292*|TravelMate*8471*|Aspire 1810T*|AO751h|AO531h", RUN+="keymap $name 0xD9 bluetooth"
+ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*6292*|TravelMate*8471*|TravelMate*4720*|Aspire 1810T*|AO751h|AO531h", RUN+="keymap $name 0xD9 bluetooth"
+ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate*4720*", RUN+="keymap $name 0xB2 www 0xEE screenlock"
ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="TravelMate 6593|Aspire 1640", RUN+="keymap $name 0xB2 www 0xEE screenlock"
ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 6920", RUN+="keymap $name acer-aspire_6920"
ENV{DMI_VENDOR}=="Acer*", ATTR{[dmi/id]product_name}=="Aspire 5920G", RUN+="keymap $name acer-aspire_5920g"
@@ -110,7 +119,7 @@
ENV{DMI_VENDOR}=="MAXDATA", ATTR{[dmi/id]product_name}=="Pro 7000*", RUN+="keymap $name maxdata-pro_7000"
-ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*NC10*|*NC20*|*N128*|*N130*|*N210*|*SP55S*|*SQ45S70S*|*SX60P*|*SX22S*|*SX30S*|*R59P/R60P/R61P*|*SR70S/SR71S*|*Q210*|*Q310*|*X05*|*P560*|*R560*", RUN+="keymap $name samsung-other"
+ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", RUN+="keymap $name samsung-other"
ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*SX20S*", RUN+="keymap $name samsung-sx20s"
ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="SQ1US", RUN+="keymap $name samsung-sq1us"
@@ -120,6 +129,8 @@
ENV{DMI_VENDOR}=="OQO Inc.*", ATTR{[dmi/id]product_name}=="OQO Model 2*", RUN+="keymap $name oqo-model2"
+ENV{DMI_VENDOR}=="ONKYO CORPORATION", ATTR{[dmi/id]product_name}=="ONKYOPC", RUN+="keymap $name onkyo"
+
ENV{DMI_VENDOR}=="ASUS", RUN+="keymap $name asus"
ENV{DMI_VENDOR}=="VIA", ATTR{[dmi/id]product_name}=="K8N800", ATTR{[dmi/id]product_version}=="VT8204B", RUN+="keymap $name 0x81 prog1"
diff -urN udev-153-orig/extras/keymap/findkeyboards udev-153/extras/keymap/findkeyboards
--- udev-153-orig/extras/keymap/findkeyboards 2009-12-15 12:49:25.000000000 +0100
+++ udev-153/extras/keymap/findkeyboards 2010-07-08 11:37:47.000000000 +0200
@@ -34,6 +34,8 @@
# modules
module=`udevadm trigger --verbose --dry-run --subsystem-match=input --attr-match=name='*Extra Buttons'`
module="$module
+`udevadm trigger --verbose --dry-run --subsystem-match=input --attr-match=name='*extra buttons'`"
+ module="$module
`udevadm trigger --verbose --dry-run --subsystem-match=input --attr-match=name='Sony Vaio Keys'`"
for m in $module; do
evdev=`ls -d $m/event* 2>/dev/null`
diff -urN udev-153-orig/extras/keymap/.gitignore udev-153/extras/keymap/.gitignore
--- udev-153-orig/extras/keymap/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ udev-153/extras/keymap/.gitignore 2010-03-18 16:44:52.000000000 +0100
@@ -0,0 +1,6 @@
+keymap
+keys-from-name.gperf
+keys-from-name.h
+keys-to-name.h
+keys.txt
+
diff -urN udev-153-orig/extras/keymap/keymaps/ibm-thinkpad-usb-keyboard-trackpoint udev-153/extras/keymap/keymaps/ibm-thinkpad-usb-keyboard-trackpoint
--- udev-153-orig/extras/keymap/keymaps/ibm-thinkpad-usb-keyboard-trackpoint 1970-01-01 01:00:00.000000000 +0100
+++ udev-153/extras/keymap/keymaps/ibm-thinkpad-usb-keyboard-trackpoint 2010-07-07 10:58:29.000000000 +0200
@@ -0,0 +1,7 @@
+0x900f0 screenlock
+0x900f1 wlan
+0x900f2 switchvideomode
+0x900f3 suspend
+0x900f4 brightnessup
+0x900f5 brightnessdown
+0x900f8 zoom
diff -urN udev-153-orig/extras/keymap/keymaps/lenovo-ideapad udev-153/extras/keymap/keymaps/lenovo-ideapad
--- udev-153-orig/extras/keymap/keymaps/lenovo-ideapad 1970-01-01 01:00:00.000000000 +0100
+++ udev-153/extras/keymap/keymaps/lenovo-ideapad 2010-08-17 16:31:27.000000000 +0200
@@ -0,0 +1,7 @@
+# Key codes observed on S10-3, assumed valid on other IdeaPad models
+0x81 rfkill # does nothing in BIOS
+0x83 display_off # BIOS toggles screen state
+0xB9 brightnessup # does nothing in BIOS
+0xBA brightnessdown # does nothing in BIOS
+0xF1 camera # BIOS toggles camera power
+0xf2 unknown # trackpad enable/disable (does nothing in BIOS)
diff -urN udev-153-orig/extras/keymap/keymaps/logitech-wave-pro-cordless udev-153/extras/keymap/keymaps/logitech-wave-pro-cordless
--- udev-153-orig/extras/keymap/keymaps/logitech-wave-pro-cordless 1970-01-01 01:00:00.000000000 +0100
+++ udev-153/extras/keymap/keymaps/logitech-wave-pro-cordless 2010-07-07 10:58:29.000000000 +0200
@@ -0,0 +1,12 @@
+0xC01B6 camera
+0xC0183 media
+0xC0184 wordprocessor
+0xC0186 spreadsheet
+0xC018E calendar
+0xC0223 homepage
+0xC01BC messenger
+0xC018A mail
+0xC0221 search
+0xC00B8 ejectcd
+0xC022D zoomin
+0xC022E zoomout
diff -urN udev-153-orig/extras/keymap/keymaps/micro-star udev-153/extras/keymap/keymaps/micro-star
--- udev-153-orig/extras/keymap/keymaps/micro-star 2009-12-03 13:45:03.000000000 +0100
+++ udev-153/extras/keymap/keymaps/micro-star 2010-06-11 10:52:56.000000000 +0200
@@ -6,6 +6,7 @@
0xE2 bluetooth # satellite dish2
0xE4 f22 # Fn-F3 Touchpad disable
0xEC email # envelope button
+0xEE camera # Fn-F6 camera disable
0xF6 wlan # satellite dish1
0xF7 brightnessdown # Fn-F4
0xF8 brightnessup # Fn-F5
diff -urN udev-153-orig/extras/keymap/keymaps/onkyo udev-153/extras/keymap/keymaps/onkyo
--- udev-153-orig/extras/keymap/keymaps/onkyo 1970-01-01 01:00:00.000000000 +0100
+++ udev-153/extras/keymap/keymaps/onkyo 2010-08-31 10:35:41.000000000 +0200
@@ -0,0 +1,14 @@
+0xA0 mute # Fn+D
+0xAE volumedown # Fn+F
+0xB0 volumeup # Fn+G
+0xDF sleep # Fn+W
+0xE0 bluetooth # Fn+H
+0xE2 cyclewindows # Fn+Esc
+0xEE battery # Fn+Q
+0xF0 media # Fn+R
+0xF5 switchvideomode # Fn+E
+0xF6 camera # Fn+T
+0xF7 f22 # Fn+Y (touchpad toggle)
+0xF8 brightnessup # Fn+S
+0xF9 brightnessdown # Fn+A
+0xFB wlan # Fn+J

24
udev-153-n210.patch Normal file
View file

@ -0,0 +1,24 @@
diff -up udev-153/extras/keymap/95-keyboard-force-release.rules.n210 udev-153/extras/keymap/95-keyboard-force-release.rules
--- udev-153/extras/keymap/95-keyboard-force-release.rules.n210 2010-08-04 15:55:56.000000000 +0200
+++ udev-153/extras/keymap/95-keyboard-force-release.rules 2010-08-04 15:57:54.000000000 +0200
@@ -19,7 +19,7 @@ DRIVER!="atkbd", GOTO="force_release_end
ENV{DMI_VENDOR}="$attr{[dmi/id]sys_vendor}"
-ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*N130*|*N140*|*SR70S/SR71S*|*Q210/P210*", RUN+="keyboard-force-release.sh $devpath samsung-other"
+ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*N128*|*N130*|*N140*|*N210*|*SR70S/SR71S*|*Q210/P210*", RUN+="keyboard-force-release.sh $devpath samsung-other"
ENV{DMI_VENDOR}=="Dell Inc.", ATTR{[dmi/id]product_name}=="Studio 1557|Studio 1558", RUN+="keyboard-force-release.sh $devpath common-volume-keys"
diff -up udev-153/extras/keymap/95-keymap.rules.n210 udev-153/extras/keymap/95-keymap.rules
--- udev-153/extras/keymap/95-keymap.rules.n210 2010-08-04 15:57:23.000000000 +0200
+++ udev-153/extras/keymap/95-keymap.rules 2010-08-04 15:57:52.000000000 +0200
@@ -110,7 +110,7 @@ ENV{DMI_VENDOR}=="INVENTEC", ATTR{[dmi/i
ENV{DMI_VENDOR}=="MAXDATA", ATTR{[dmi/id]product_name}=="Pro 7000*", RUN+="keymap $name maxdata-pro_7000"
-ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*NC10*|*NC20*|*N130*|*SP55S*|*SQ45S70S*|*SX60P*|*SX22S*|*SX30S*|*R59P/R60P/R61P*|*SR70S/SR71S*|*Q210*|*Q310*|*X05*|*P560*|*R560*", RUN+="keymap $name samsung-other"
+ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*NC10*|*NC20*|*N128*|*N130*|*N210*|*SP55S*|*SQ45S70S*|*SX60P*|*SX22S*|*SX30S*|*R59P/R60P/R61P*|*SR70S/SR71S*|*Q210*|*Q310*|*X05*|*P560*|*R560*", RUN+="keymap $name samsung-other"
ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="*SX20S*", RUN+="keymap $name samsung-sx20s"
ENV{DMI_VENDOR}=="[sS][aA][mM][sS][uU][nN][gG]*", ATTR{[dmi/id]product_name}=="SQ1US", RUN+="keymap $name samsung-sq1us"

22
udev-153-trigger.patch Normal file
View file

@ -0,0 +1,22 @@
diff --git a/udev/udevadm-trigger.c b/udev/udevadm-trigger.c
index 03aa534..dbcaee3 100644
--- a/udev/udevadm-trigger.c
+++ b/udev/udevadm-trigger.c
@@ -110,7 +110,7 @@ int udevadm_trigger(struct udev *udev, int argc, char *argv[])
TYPE_SUBSYSTEMS,
TYPE_FAILED,
} device_type = TYPE_DEVICES;
- const char *action = "change";
+ const char *action = "add";
struct udev_enumerate *udev_enumerate;
int rc = 0;
@@ -184,7 +184,7 @@ int udevadm_trigger(struct udev *udev, int argc, char *argv[])
" subsystems sys subsystems and drivers\n"
" failed trigger only the events which have been\n"
" marked as failed during a previous run\n"
- " --action=<action> event action value, default is \"change\"\n"
+ " --action=<action> event action value, default is \"add\"\n"
" --subsystem-match=<subsystem> trigger devices from a matching subsystem\n"
" --subsystem-nomatch=<subsystem> exclude devices from a matching subsystem\n"
" --attr-match=<file[=<value>]> trigger devices with a matching attribute\n"

View file

@ -0,0 +1,27 @@
commit 484e1b2d11b9b89418589d885a625e647881933b
Author: Kay Sievers <kay.sievers@vrfy.org>
Date: Tue May 25 09:54:14 2010 +0200
rules: optical drives - use ID_CDROM_MEDIA_TRACK_COUNT_DATA
We should not access non-data optical media, ans skip things
like blkid. It will cause errors for some drives.
https://bugzilla.kernel.org/show_bug.cgi?id=15757
diff --git a/rules/rules.d/60-persistent-storage.rules b/rules/rules.d/60-persistent-storage.rules
index d9f8003..1f46041 100644
--- a/rules/rules.d/60-persistent-storage.rules
+++ b/rules/rules.d/60-persistent-storage.rules
@@ -52,9 +52,9 @@ ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PA
ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end"
# probe filesystem metadata of optical drives which have a media inserted
-KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode"
+KERNEL=="sr*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode"
# single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET
-KERNEL=="sr*", ENV{ID_CDROM_MEDIA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode"
+KERNEL=="sr*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode"
# probe filesystem metadata of disks
KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"

View file

@ -26,7 +26,7 @@ case "$1" in
[ -w /var/lock/subsys ] || exit 4
STRING=$"Retrigger failed udev events"
echo -n $STRING
/sbin/udevadm trigger --type=failed
/sbin/udevadm trigger --type=failed --action=add
success "$STRING"
echo
@ -58,8 +58,8 @@ case "$1" in
STRING=$"Generating udev makedev cache file"
MAKEDEV="/sbin/MAKEDEV"
USE_MD5="false"
[ -x /usr/bin/md5sum -a "$UDEV_USE_MAKEDEV_CACHE" == "yes" ] && USE_MD5="true"
if [ "$USE_MD5" == "true" -a -x "$MAKEDEV" ]; then
[[ "$UDEV_USE_MAKEDEV_CACHE" == "yes" && -x /usr/bin/md5sum ]] && USE_MD5="true"
if [[ "$USE_MD5" == "true" && -x "$MAKEDEV" ]]; then
for i in /etc/udev/makedev.d/*.nodes; do
if [ -f "$i" ]; then
# use a little caching to speedup things

225
udev.spec
View file

@ -4,8 +4,8 @@
Summary: A userspace implementation of devfs
Name: udev
Version: 151
Release: 3%{?dist}
Version: 153
Release: 5%{?dist}
License: GPLv2
Group: System Environment/Base
Provides: udev-persistent = %{version}-%{release}
@ -13,14 +13,33 @@ Obsoletes: udev-persistent < 0:030-5
Obsoletes: udev-extras < 20090618
Provides: udev-extras = 20090618-1
Source: ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/%{name}-%{version}.tar.bz2
Patch1: udev-151-rules.patch
Patch2: udev-86a7a2f-fix-missing-firmware.patch
Patch17: 0017-udev-acl-properly-handle-CK-change-events-for-root-u.patch
Patch18: 0018-udev-acl-really-fix-ACL-assignment-in-CK-events.patch
Patch34: 0034-add-LGPL-COPYING-to-libudev-and-GUdev.patch
Patch110: 0110-cdrom_id-only-mark-sr-0-9-as-ID_CDROM.patch
Patch101: udev-151-rules.patch
Patch102: udev-153-n210.patch
Patch103: udev-151-gperf.patch
Patch104: udev-git484e1b2d11b9b89418589d885a625e647881933b.patch
Patch105: udev-153-changer.patch
Patch106: udev-153-trigger.patch
Patch200: 0001-set-SELinux-context-on-add-but-not-on-change-events.patch
Patch300: udev-153-keymap-backport.patch
Patch301: udev-153-cdrom_id-backport.patch
Source1: start_udev
Source3: udev-post.init
Source4: fw_unit_symlinks.sh
Source5: udev.sysconfig
Source12: 40-isdn.rules
Source13: 64-md-raid.rules
Source14: 64-device-mapper.rules
Source15: 40-ia64.rules
Source16: 40-s390.rules
Source17: 40-ppc.rules
ExclusiveOS: Linux
URL: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -110,17 +129,34 @@ glib-based applications using libudev functionality.
%prep
%setup -q
%patch1 -p1
%patch2 -p1
%patch17 -p1 -b .git17
%patch18 -p1 -b .git18
%patch34 -p1 -b .git34
%patch110 -p1 -b .git110
%patch101 -p1
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch200 -p1
%patch300 -p1
%patch301 -p1
%build
autoreconf -i
automake
# get rid of rpath
libtoolize -f -c
%configure --with-selinux --prefix=%{_prefix} --exec-prefix="" \
--sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} \
--sbindir="/sbin" --libexecdir=%{udev_scriptdir} \
--with-rootlibdir=/%{_lib} --enable-introspection \
--disable-rpath --enable-debug
--sysconfdir=%{_sysconfdir} --with-libdir-name=%{_lib} \
--sbindir="/sbin" --libexecdir=%{udev_scriptdir} \
--with-rootlibdir=/%{_lib} --enable-introspection \
--disable-rpath --enable-debug
make %{?_smp_mflags}
@ -143,32 +179,24 @@ touch $RPM_BUILD_ROOT%{_sysconfdir}/scsi_id.config
# force relative symlinks
ln -sf ..%{udev_scriptdir}/scsi_id $RPM_BUILD_ROOT/sbin/scsi_id
ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevinfo
ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_bindir}/udevtest
ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT%{_sbindir}/udevmonitor
ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevtrigger
ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevsettle
ln -sf ../../sbin/udevadm $RPM_BUILD_ROOT/sbin/udevcontrol
for i in \
rules/redhat/40-redhat.rules \
rules/redhat/40-redhat.rules \
%ifarch ia64
rules/packages/40-ia64.rules \
%{SOURCE15} \
%endif
%ifarch ppc ppc64
rules/packages/40-ppc.rules \
%{SOURCE17} \
%endif
%ifarch s390 s390x
rules/packages/40-s390.rules \
%{SOURCE16} \
%endif
rules/packages/40-isdn.rules \
rules/packages/64-md-raid.rules \
rules/packages/64-device-mapper.rules \
; do
install -m 0644 "$i" "$RPM_BUILD_ROOT%{udev_scriptdir}/rules.d/${i##*/}"
%{SOURCE12} \
%{SOURCE13} \
%{SOURCE14} \
; do
install -m 0644 "$i" "$RPM_BUILD_ROOT%{udev_scriptdir}/rules.d/${i##*/}"
done
mkdir -p $RPM_BUILD_ROOT%{udev_scriptdir}/{,devices}
install -m 0755 %{SOURCE4} $RPM_BUILD_ROOT%{udev_scriptdir}/fw_unit_symlinks.sh
@ -188,16 +216,16 @@ mkdir -p $RPM_BUILD_ROOT/var/lib/udev/makedev.d
%preun
if [ "$1" -eq 0 -a -f %{_initrddir}/udev ]; then
if [ -x /sbin/pidof ]; then
pid=$(/sbin/pidof -c udevd)
if [ -n "$pid" ]; then
kill $pid
fi
fi
/sbin/chkconfig --del udev
if [ -x /sbin/pidof ]; then
pid=$(/sbin/pidof -c udevd)
if [ -n "$pid" ]; then
kill $pid
fi
fi
/sbin/chkconfig --del udev
fi
if [ "$1" -eq 0 ]; then
/sbin/chkconfig --del udev-post
/sbin/chkconfig --del udev-post
fi
exit 0
@ -212,29 +240,33 @@ getent group dialout >/dev/null || /usr/sbin/groupadd -g 18 dialout || :
# kill daemon if we are not in a chroot
if test -f /proc/1/exe -a -d /proc/1/root; then
if test -x /usr/bin/stat -a "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then
if test -x /sbin/udevd -a -x /sbin/pidof ; then
/sbin/udevadm control --stop-exec-queue
pid=$(/sbin/pidof -c udevd)
while [ -n "$pid" ]; do
for p in $pid; do
kill $hard $p;
done
pid=$(/sbin/pidof -c udevd)
hard="-9"
done
fi
fi
if test -x /usr/bin/stat -a "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then
if test -x /sbin/udevd -a -x /sbin/pidof ; then
/sbin/udevadm control --stop-exec-queue
pid=$(/sbin/pidof -c udevd)
while [ -n "$pid" ]; do
for p in $pid; do
kill $hard $p;
done
pid=$(/sbin/pidof -c udevd)
hard="-9"
done
fi
fi
fi
exit 0
%triggerpostun -- udev < 153-5
[ -c /dev/systty ] && ln -fs tty0 /dev/systty
:
%post
# start daemon if we are not in a chroot
if test -f /proc/1/exe -a -d /proc/1/root; then
if test "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then
/sbin/udevd -d
/sbin/udevadm control --start-exec-queue
fi
if test "$(/usr/bin/stat -Lc '%%D-%%i' /)" = "$(/usr/bin/stat -Lc '%%D-%%i' /proc/1/root)"; then
/sbin/udevd -d
/sbin/udevadm control --start-exec-queue
fi
fi
/sbin/chkconfig --add udev-post
@ -259,9 +291,6 @@ rm -rf $RPM_BUILD_ROOT
%defattr(0644, root, root, 0755)
%doc NEWS COPYING README TODO ChangeLog extras/keymap/README.keymap.txt
%attr(0755,root,root) /sbin/udevadm
%attr(0755,root,root) /sbin/udevsettle
%attr(0755,root,root) /sbin/udevtrigger
%attr(0755,root,root) /sbin/udevcontrol
%attr(0755,root,root) /sbin/udevd
%attr(0755,root,root) /sbin/start_udev
%attr(0755,root,root) /sbin/scsi_id
@ -286,9 +315,6 @@ rm -rf $RPM_BUILD_ROOT
%attr(0755,root,root) %dir %{udev_scriptdir}/rules.d/
%attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/udev-post
%attr(0755,root,root) %{_bindir}/udevtest
%attr(0755,root,root) %{_bindir}/udevinfo
%attr(0755,root,root) %{_sbindir}/udevmonitor
%attr(0755,root,root) %dir %{_sysconfdir}/udev/
%attr(0755,root,root) %dir %{_sysconfdir}/udev/rules.d/
%attr(0755,root,root) %dir %{udev_scriptdir}/
@ -315,26 +341,26 @@ rm -rf $RPM_BUILD_ROOT
%ghost %dir %{_sysconfdir}/udev/devices/
%ghost %dir %{_sysconfdir}/dev.d/
%attr(0755,root,root) %{udev_scriptdir}/modem-modeswitch
%attr(0755,root,root) %{udev_scriptdir}/mobile-action-modeswitch
%attr(0755,root,root) %{udev_scriptdir}/pci-db
%attr(0755,root,root) %{udev_scriptdir}/usb-db
%attr(0755,root,root) %{udev_scriptdir}/keymap
%attr(0755,root,root) %{udev_scriptdir}/udev-acl
%attr(0755,root,root) %{udev_scriptdir}/v4l_id
%attr(0755,root,root) %{udev_scriptdir}/findkeyboards
%dir %attr(0755,root,root) %{udev_scriptdir}/keymaps
%attr(0644,root,root) %{udev_scriptdir}/keymaps/*
%dir %{udev_scriptdir}/keymaps
%{udev_scriptdir}/keymaps/*
%attr(0644,root,root) %{_prefix}/lib/ConsoleKit/run-seat.d/udev-acl.ck
%files -n libudev
%defattr(0644, root, root, 0755)
%doc COPYING
%doc libudev/COPYING
%attr(0755,root,root) /%{_lib}/libudev.so.*
%files -n libudev-devel
%defattr(0644, root, root, 0755)
%doc COPYING libudev/docs/html/*
%doc libudev/COPYING libudev/docs/html/*
%{_includedir}/libudev.h
%{_libdir}/libudev.so
%{_libdir}/pkgconfig/libudev.pc
@ -343,14 +369,16 @@ rm -rf $RPM_BUILD_ROOT
%files -n libgudev1
%defattr(0644, root, root, 0755)
%doc COPYING
%doc extras/gudev/COPYING
%attr(0755,root,root) %{_libdir}/libgudev-1.0.so.*
%attr(0644,root,root) %{_libdir}/girepository-1.0/GUdev-1.0.typelib
%files -n libgudev1-devel
%defattr(0644, root, root, 0755)
%doc COPYING extras/gudev/docs/html/*
%doc extras/gudev/COPYING extras/gudev/docs/html/*
%attr(0755,root,root) %{_libdir}/libgudev-1.0.so
%dir %attr(0755,root,root) %{_includedir}/gudev-1.0
%dir %attr(0755,root,root) %{_includedir}/gudev-1.0/gudev
%attr(0644,root,root) %{_includedir}/gudev-1.0/gudev/*.h
%attr(0644,root,root) %{_datadir}/gir-1.0/GUdev-1.0.gir
%dir %{_datadir}/gtk-doc/html/gudev
@ -358,6 +386,69 @@ rm -rf $RPM_BUILD_ROOT
%attr(0644,root,root) %{_libdir}/pkgconfig/gudev-1.0*
%changelog
* Thu Nov 18 2010 Harald Hoyer <harald@redhat.com> 153-5
- fix /dev/systty
Resolves: rhbz#654935
* Wed Sep 22 2010 Harald Hoyer <harald@redhat.com> 153-4
- fixed SELinux contexts on "add" events
- backported keymaps
- backported cdrom_id
* Fri Aug 13 2010 Harald Hoyer <harald@redhat.com> 153-3
- revert the default trigger to "add"
* Wed Aug 04 2010 Harald Hoyer <harald@redhat.com> 153-2
- trigger with action==add
- add rd_NO_MDIMSM on noiswmd kernel cmdline option
Resolves: rhbz#589774
- fix console switching and ACLs
Resolves: rhbz#608712
- fix key mapping for Samsung N210
Resolves: rhbz#606302
- fix for blank or audio CDs
Resolves: rhbz#606285
- fix for scsi changer
Resolves: rhbz#600983
* Mon Aug 02 2010 Harald Hoyer <harald@redhat.com> 153-1
- version 153, because device-mapper needs IMPORT{db}
- do not remove udev database
Resolves: rhbz#610925
* Thu Jun 10 2010 Bastien Nocera <bnocera@redhat.com> 151-10
- Revert patch for hid2hci rules, fixes keyboards not going
into HCI (Bluetooth) mode after being plugged in (#595178)
* Tue Apr 27 2010 Harald Hoyer <harald@redhat.com> 151-9
- more cdrom_id bugfixes to prevent autoclosing
* Tue Apr 13 2010 Harald Hoyer <harald@redhat.com> 151-8
- more cdrom_id bugfixes for buggy cdroms and CD burning
(bug #577659)
* Mon Mar 22 2010 Harald Hoyer <harald@redhat.com> 151-7
- only correct the timestamp, if UTC=="no"
* Mon Mar 22 2010 Harald Hoyer <harald@redhat.com> 151-6
- touch with "--no-create", will not use open()
and trigger devs/watchdogs (bug #575417)
* Mon Mar 22 2010 Harald Hoyer <harald@redhat.com> 151-5
- fixed return code of touching the device nodes [FAIL] -> [OK]
* Fri Mar 19 2010 Harald Hoyer <harald@redhat.com> 151-4
- add patch for virtio-ports (#569700)
- own libgudev dirs (#561319)
- minor udev startup script improvements (#549518)
- create /dev/hugepages subdir in start_udev (#541998)
- remove GPL COPYING file from LGPL subpackages (#536843)
- removed symlinks to udevadm
- touch all device nodes after udev settled for the timezone
timestamp (#569335)
- add some upstream bugfixes
- add "-D" to gperf call
* Sun Feb 07 2010 Kyle McMartin <kyle@redhat.com> 151-3
- udev-86a7a2f-fix-missing-firmware.patch: fix hang when loading
microcode (since microcode_intel tries to probe firmware which does
@ -445,7 +536,7 @@ rm -rf $RPM_BUILD_ROOT
- git fix: rule-generator: cd - skip by-path links if we create by-id links
- git fix: fix possible endless loop for GOTO to non-existent LABEL
- git fix: cdrom_id: suppress ID_CDROM_MEDIA_STATE=blank for plain non-writable
CDROM media
CDROM media
* Thu Jun 08 2009 Harald Hoyer <harald@redhat.com> 142-3
- delay device-mapper changes