From 82b609ecce972e236c2ce887ecd55ec30e2874a7 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 18 May 2011 22:46:11 +0000 Subject: Wed May 18 22:46:11 UTC 2011 --- core/udev/01-settle.patch | 68 +++++++++++++++++++++++++++++++++++++++++++++++ core/udev/02-settle.patch | 29 ++++++++++++++++++++ core/udev/PKGBUILD | 23 ++++++++++------ 3 files changed, 112 insertions(+), 8 deletions(-) create mode 100644 core/udev/01-settle.patch create mode 100644 core/udev/02-settle.patch (limited to 'core/udev') diff --git a/core/udev/01-settle.patch b/core/udev/01-settle.patch new file mode 100644 index 000000000..88e23d2a2 --- /dev/null +++ b/core/udev/01-settle.patch @@ -0,0 +1,68 @@ +From 2738ec2cf721db0c0deac2ba0abdc73cf7739e9f Mon Sep 17 00:00:00 2001 +From: Kay Sievers +Date: Mon, 16 May 2011 13:17:48 +0200 +Subject: [PATCH 1/7] udevd: create queue file before daemonizing to reliably + block 'settle' + +--- + udev/udevd.c | 22 ++++++++++++---------- + 1 files changed, 12 insertions(+), 10 deletions(-) + +diff --git a/udev/udevd.c b/udev/udevd.c +index be4b071..258d787 100644 +--- a/udev/udevd.c ++++ b/udev/udevd.c +@@ -1408,6 +1408,13 @@ int main(int argc, char *argv[]) + + udev_monitor_set_receive_buffer_size(monitor, 128*1024*1024); + ++ /* create queue file before signalling 'ready', to make sure we block 'settle' */ ++ udev_queue_export = udev_queue_export_new(udev); ++ if (udev_queue_export == NULL) { ++ err(udev, "error creating queue file\n"); ++ goto exit; ++ } ++ + if (daemonize) { + pid_t pid; + int fd; +@@ -1421,8 +1428,8 @@ int main(int argc, char *argv[]) + rc = 4; + goto exit; + default: +- rc = 0; +- goto exit; ++ rc = EXIT_SUCCESS; ++ goto exit_keep_queue; + } + + setsid(); +@@ -1521,12 +1528,6 @@ int main(int argc, char *argv[]) + goto exit; + } + +- udev_queue_export = udev_queue_export_new(udev); +- if (udev_queue_export == NULL) { +- err(udev, "error creating queue file\n"); +- goto exit; +- } +- + memset(&ep_ctrl, 0, sizeof(struct epoll_event)); + ep_ctrl.events = EPOLLIN; + ep_ctrl.data.fd = fd_ctrl; +@@ -1708,9 +1709,10 @@ int main(int argc, char *argv[]) + } + } + +- udev_queue_export_cleanup(udev_queue_export); +- rc = 0; ++ rc = EXIT_SUCCESS; + exit: ++ udev_queue_export_cleanup(udev_queue_export); ++exit_keep_queue: + if (fd_ep >= 0) + close(fd_ep); + worker_list_cleanup(udev); +-- +1.7.5.1 + diff --git a/core/udev/02-settle.patch b/core/udev/02-settle.patch new file mode 100644 index 000000000..4bcb7fdde --- /dev/null +++ b/core/udev/02-settle.patch @@ -0,0 +1,29 @@ +From 12f79fb0b9c919787d8a7d4307895d3d6b4b029b Mon Sep 17 00:00:00 2001 +From: Nix +Date: Mon, 16 May 2011 22:51:38 +0200 +Subject: [PATCH 7/7] libudev: queue - accept NULL passed into + udev_queue_export_cleanup() + +--- + libudev/libudev-queue-private.c | 3 ++- + 1 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/libudev/libudev-queue-private.c b/libudev/libudev-queue-private.c +index 0dcf9b0..6e13d8a 100644 +--- a/libudev/libudev-queue-private.c ++++ b/libudev/libudev-queue-private.c +@@ -104,9 +104,10 @@ void udev_queue_export_cleanup(struct udev_queue_export *udev_queue_export) + { + char filename[UTIL_PATH_SIZE]; + ++ if (udev_queue_export == NULL) ++ return; + util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev_queue_export->udev), "/queue.tmp", NULL); + unlink(filename); +- + util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev_queue_export->udev), "/queue.bin", NULL); + unlink(filename); + } +-- +1.7.5.1 + diff --git a/core/udev/PKGBUILD b/core/udev/PKGBUILD index 44c2cf9d7..d596361c9 100644 --- a/core/udev/PKGBUILD +++ b/core/udev/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 123587 2011-05-11 16:38:57Z tomegun $ +# $Id: PKGBUILD 124183 2011-05-17 13:17:56Z tomegun $ # Maintainer: Aaron Griffin # Maintainer: Tobias Powalowski # Maintainer: Thomas Bächler @@ -7,7 +7,7 @@ pkgbase="udev" pkgname=('udev' 'udev-compat') pkgver=168 -pkgrel=1 +pkgrel=2 arch=(i686 x86_64) url="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" license=('GPL') @@ -19,10 +19,15 @@ source=(http://www.kernel.org/pub/linux/utils/kernel/hotplug/$pkgbase-$pkgver.ta 80-drivers.rules 81-arch.rules load-modules.sh - cdsymlinks.sh) + cdsymlinks.sh + 01-settle.patch + 02-settle.patch) build() { cd $srcdir/$pkgbase-$pkgver + # fix https://bugs.archlinux.org/task/24288 + patch -Np1 -i ../01-settle.patch + patch -Np1 -i ../02-settle.patch ./configure --sysconfdir=/etc --with-rootlibdir=/lib --libexecdir=/lib/udev\ --sbindir=/sbin --with-systemdsystemunitdir=/lib/systemd/system make @@ -109,8 +114,10 @@ package_udev-compat() { install -d -m755 ${pkgdir}/lib/${pkgbase}/rules.d install -D -m644 ${srcdir}/${pkgbase}-${pkgver}/rules/misc/30-kernel-compat.rules ${pkgdir}/lib/udev/rules.d/30-kernel-compat.rules } -md5sums=('4a466078532ab5dd5c35acc3ea2ec9a1' - '4427855146513a4703ab5c7eb8a0156e' - 'f17c99779173ddc79f866cf3a5de5e68' - 'f91fddc67609b45b244a624977c4247b' - '2e808ee78d237c478b57af2a68d43769') +sha256sums=('9ddc43173cf7b397c8cc01d26d644932ff2c2259b3a5eea7be90db96a28080e2' + '0cb99cc7cea92238dd6b19a4c104c3b9e9f744c6b9d6b4382c7cd22be18c98f9' + '377c13f20de32776107dddc8324f599f31320e8dd1185e3282856aee5cb08499' + 'c6b41afb24e8f496064d8baad844697a6515cea1b7e0389054cd8a2053477377' + 'cc0d281926bf2f1ac816c0060a2afc59444ddf0f8dab6e2d9924a2a7c8de4a13' + '70d2fd079901bf9940c4811ec91634da0d8b3425ebcdbffeba5a73cb616be650' + 'fe9d1aafb1a620108790d82960577de4eb757450c35a146475aed3f5e9356f1a') -- cgit v1.2.3-54-g00ecf