From a4cc02351c0a42041dcaae4c69c8125e6d642aee46adea65f64df446b0b0a29f Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 8 Jan 2013 20:14:07 +0000 Subject: [PATCH] Accepting request 147543 from Base:System - udevd: add missing ':' to getopt_long 'e'. add: 1007-udevd-add-missing-to-getopt_long-e.patch - clean up systemd.spec, make it easy to see which are udev and systemd patches. - make 'reload' and 'force-reload' LSB compliant (bnc#793936). - udevd: add missing ':' to getopt_long 'e'. add: 1007-udevd-add-missing-to-getopt_long-e.patch - clean up systemd.spec, make it easy to see which are udev and systemd patches. - make 'reload' and 'force-reload' LSB compliant (bnc#793936). OBS-URL: https://build.opensuse.org/request/show/147543 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=119 --- ...h => 1001-Reinstate-TIMEOUT-handling.patch | 0 ...enable-by_path-links-for-ata-devices.patch | 0 ...ate-by-id-scsi-links-for-ATA-devices.patch | 0 ...atch => 1004-udev-netlink-null-rules.patch | 0 ...1005-udev-fix-sg-autoload-regression.patch | 0 ...fix.patch => 1006-fix-devname-prefix.patch | 0 1007-udevd-add-missing-to-getopt_long-e.patch | 27 +++++++++++ boot.udev | 41 +++++++---------- systemd-mini.changes | 9 ++++ systemd-mini.spec | 45 ++++++++++--------- systemd.changes | 9 ++++ systemd.spec | 45 ++++++++++--------- 12 files changed, 112 insertions(+), 64 deletions(-) rename 0001-Reinstate-TIMEOUT-handling.patch => 1001-Reinstate-TIMEOUT-handling.patch (100%) rename 0013-re-enable-by_path-links-for-ata-devices.patch => 1002-re-enable-by_path-links-for-ata-devices.patch (100%) rename 0014-rules-create-by-id-scsi-links-for-ATA-devices.patch => 1003-rules-create-by-id-scsi-links-for-ATA-devices.patch (100%) rename 0026-udev-netlink-null-rules.patch => 1004-udev-netlink-null-rules.patch (100%) rename 0027-udev-fix-sg-autoload-regression.patch => 1005-udev-fix-sg-autoload-regression.patch (100%) rename fix-devname-prefix.patch => 1006-fix-devname-prefix.patch (100%) create mode 100644 1007-udevd-add-missing-to-getopt_long-e.patch diff --git a/0001-Reinstate-TIMEOUT-handling.patch b/1001-Reinstate-TIMEOUT-handling.patch similarity index 100% rename from 0001-Reinstate-TIMEOUT-handling.patch rename to 1001-Reinstate-TIMEOUT-handling.patch diff --git a/0013-re-enable-by_path-links-for-ata-devices.patch b/1002-re-enable-by_path-links-for-ata-devices.patch similarity index 100% rename from 0013-re-enable-by_path-links-for-ata-devices.patch rename to 1002-re-enable-by_path-links-for-ata-devices.patch diff --git a/0014-rules-create-by-id-scsi-links-for-ATA-devices.patch b/1003-rules-create-by-id-scsi-links-for-ATA-devices.patch similarity index 100% rename from 0014-rules-create-by-id-scsi-links-for-ATA-devices.patch rename to 1003-rules-create-by-id-scsi-links-for-ATA-devices.patch diff --git a/0026-udev-netlink-null-rules.patch b/1004-udev-netlink-null-rules.patch similarity index 100% rename from 0026-udev-netlink-null-rules.patch rename to 1004-udev-netlink-null-rules.patch diff --git a/0027-udev-fix-sg-autoload-regression.patch b/1005-udev-fix-sg-autoload-regression.patch similarity index 100% rename from 0027-udev-fix-sg-autoload-regression.patch rename to 1005-udev-fix-sg-autoload-regression.patch diff --git a/fix-devname-prefix.patch b/1006-fix-devname-prefix.patch similarity index 100% rename from fix-devname-prefix.patch rename to 1006-fix-devname-prefix.patch diff --git a/1007-udevd-add-missing-to-getopt_long-e.patch b/1007-udevd-add-missing-to-getopt_long-e.patch new file mode 100644 index 00000000..209f5d86 --- /dev/null +++ b/1007-udevd-add-missing-to-getopt_long-e.patch @@ -0,0 +1,27 @@ +From 5bbbe461fd4d133eac49f41210e2fd4846f577d8 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Wed, 19 Dec 2012 13:12:26 +0100 +Subject: [PATCH] udevd: add missing ':' to getopt_long 'e' + +Parameter -e is set without additional argument in getopt +and this leads to segfault when calling 'systemd-udevd -e'. +--- + src/udev/udevd.c | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/udev/udevd.c b/src/udev/udevd.c +index ebd601e..ffc48a0 100644 +--- a/src/udev/udevd.c ++++ b/src/udev/udevd.c +@@ -1097,7 +1097,7 @@ int main(int argc, char *argv[]) + for (;;) { + int option; + +- option = getopt_long(argc, argv, "c:deDtN:hV", options, NULL); ++ option = getopt_long(argc, argv, "c:de:DtN:hV", options, NULL); + if (option == -1) + break; + +-- +1.7.7 + diff --git a/boot.udev b/boot.udev index 82ea2399..4fa0bd63 100644 --- a/boot.udev +++ b/boot.udev @@ -14,19 +14,22 @@ . /etc/rc.status -PATH="/sbin:/bin" +PATH="/sbin:/bin:/usr/sbin:/usr/bin" +DAEMON="@@SYSTEMD@@/systemd-udevd" +UDEVADM="@@BINDIR@@/udevadm" +WRITERULE="@@PREFIX@@/write_dev_root_rule" udev_timeout=180 case "$1" in start) # create /dev/root symlink with dynamic rule - if [ -x /lib/udev/write_dev_root_rule ]; then - /lib/udev/write_dev_root_rule + if [ -x ${WRITERULE} ]; then + ${WRITERULE} >/dev/null 2>&1 || true fi # start udevd echo -n "Starting udevd: " - /sbin/udevd --daemon + ${DAEMON} --daemon if [ $? -ne 0 ]; then rc_status -v rc_exit @@ -35,42 +38,32 @@ case "$1" in # trigger events for all devices echo -n "Loading drivers, configuring devices: " - /sbin/udevadm trigger --type=subsystems --action=add - /sbin/udevadm trigger --type=devices --action=add + ${UDEVADM} trigger --type=subsystems --action=add + ${UDEVADM} trigger --type=devices --action=add # wait for events to finish - /sbin/udevadm settle --timeout=$udev_timeout + ${UDEVADM} settle --timeout=$udev_timeout rc_status -v ;; stop) echo -n "Stopping udevd: " - killproc /sbin/udevd + killproc ${DAEMON} rc_status -v ;; restart) echo -n "Restarting udevd: " - killproc /sbin/udevd - /sbin/udevd --daemon + killproc ${DAEMON} + ${DAEMON} --daemon rc_status -v ;; status) echo -n "Checking for udevd: " - checkproc /sbin/udevd + checkproc ${DAEMON} rc_status -v ;; - reload) - echo -n "Reloading udev rules: " - /sbin/udevadm control --reload-rules - rc_status -v - ;; - force-reload) - echo -n "Restarting udev and reconfiguring all devices: " - killproc /sbin/udevd - rm -rf /dev/.udev /dev/disk - root_symlink_rule - /sbin/udevd --daemon - /sbin/udevadm trigger --action=add - /sbin/udevadm settle --timeout=$udev_timeout + reload|force-reload) + echo -n "Reloading udevd: " + killproc -G -HUP ${DAEMON} rc_status -v ;; *) diff --git a/systemd-mini.changes b/systemd-mini.changes index 7b9830f6..27ae0040 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Jan 8 12:47:43 UTC 2013 - rmilasan@suse.com + +- udevd: add missing ':' to getopt_long 'e'. + add: 1007-udevd-add-missing-to-getopt_long-e.patch +- clean up systemd.spec, make it easy to see which are udev and + systemd patches. +- make 'reload' and 'force-reload' LSB compliant (bnc#793936). + ------------------------------------------------------------------- Tue Dec 11 00:22:50 UTC 2012 - crrodriguez@opensuse.org diff --git a/systemd-mini.spec b/systemd-mini.spec index dac1ea23..b7be3679 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -1,7 +1,7 @@ # # spec file for package systemd-mini # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -164,19 +164,20 @@ Patch74: detect-btrfs-ssd.patch Patch75: timedated-donot-close-bogus-dbus-connection.patch # udev patches -# PATCH-FIX-OPENSUSE 0001-Reinstate-TIMEOUT-handling.patch -Patch1001: 0001-Reinstate-TIMEOUT-handling.patch -# PATCH-FIX-OPENSUSE 0013-re-enable-by_path-links-for-ata-devices.patch -Patch1013: 0013-re-enable-by_path-links-for-ata-devices.patch -# PATCH-FIX-OPENSUSE 0014-rules-create-by-id-scsi-links-for-ATA-devices.patch -Patch1014: 0014-rules-create-by-id-scsi-links-for-ATA-devices.patch - -# PATCH-FIX-OPENSUSE 0026-udev-netlink-null-rules.patch -Patch1026: 0026-udev-netlink-null-rules.patch -# PATCH-FIX-OPENSUSE 0027-udev-fix-sg-autoload-regression.patch -Patch1027: 0027-udev-fix-sg-autoload-regression.patch -# PATCH-FIX-OPENSUSE fix-devname-prefix.patch fcrozat@suse.com -- fix modules.devname path, it isn't in /usr -Patch1028: fix-devname-prefix.patch +# PATCH-FIX-OPENSUSE 1001-Reinstate-TIMEOUT-handling.patch +Patch1001: 1001-Reinstate-TIMEOUT-handling.patch +# PATCH-FIX-OPENSUSE 1002-re-enable-by_path-links-for-ata-devices.patch +Patch1002: 1002-re-enable-by_path-links-for-ata-devices.patch +# PATCH-FIX-OPENSUSE 1003-rules-create-by-id-scsi-links-for-ATA-devices.patch +Patch1003: 1003-rules-create-by-id-scsi-links-for-ATA-devices.patch +# PATCH-FIX-OPENSUSE 1004-udev-netlink-null-rules.patch +Patch1004: 1004-udev-netlink-null-rules.patch +# PATCH-FIX-OPENSUSE 1005-udev-fix-sg-autoload-regression.patch +Patch1005: 1005-udev-fix-sg-autoload-regression.patch +# PATCH-FIX-OPENSUSE 1007-fix-devname-prefix.patch fcrozat@suse.com -- fix modules.devname path, it isn't in /usr +Patch1006: 1006-fix-devname-prefix.patch +# PATCH-FIX-UPSTREAM 1007-udevd-add-missing-to-getopt_long-e.patch +Patch1007: 1007-udevd-add-missing-to-getopt_long-e.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -338,11 +339,12 @@ cp %{SOURCE7} m4/ #udev %patch1001 -p1 -%patch1013 -p1 -%patch1014 -p1 -%patch1026 -p1 -%patch1027 -p1 -%patch1028 -p1 +%patch1002 -p1 +%patch1003 -p1 +%patch1004 -p1 +%patch1005 -p1 +%patch1006 -p1 +%patch1007 -p1 #systemd %patch1 -p1 @@ -422,13 +424,16 @@ ln -sf /lib/firmware $RPM_BUILD_ROOT/usr/lib/firmware install -m755 -D %{S:8} $RPM_BUILD_ROOT/etc/init.d/systemd-journald %endif +sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1060} +sed -ie "s|@@SYSTEMD@@|%{_prefix}/lib/systemd|g" %{S:1060} +sed -ie "s|@@BINDIR@@|%{_bindir}|g" %{S:1060} install -m755 -D %{S:1060} $RPM_BUILD_ROOT/etc/init.d/boot.udev ln -s systemd-udevd.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/udev.service sed -ie "s|@@PREFIX@@|%{_bindir}|g" %{S:1061} install -m755 -D %{S:1061} $RPM_BUILD_ROOT/%{_prefix}/lib/udev/write_dev_root_rule sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1062} install -m644 -D %{S:1062} $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/udev-root-symlink.service -mkdir -p $RPM_BUILD_ROOT/lib/systemd/system/basic.target.wants +mkdir -p $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants ln -sf ../udev-root-symlink.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants #workaround for 716939 diff --git a/systemd.changes b/systemd.changes index 7b9830f6..3d94cc4f 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Tue Jan 8 12:47:43 UTC 2013 - rmilasan@suse.com + +- udevd: add missing ':' to getopt_long 'e'. + add: 1007-udevd-add-missing-to-getopt_long-e.patch +- clean up systemd.spec, make it easy to see which are udev and + systemd patches. +- make 'reload' and 'force-reload' LSB compliant (bnc#793936). + ------------------------------------------------------------------- Tue Dec 11 00:22:50 UTC 2012 - crrodriguez@opensuse.org diff --git a/systemd.spec b/systemd.spec index 05c3fcd3..55c77bdb 100644 --- a/systemd.spec +++ b/systemd.spec @@ -1,7 +1,7 @@ # # spec file for package systemd # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -159,19 +159,20 @@ Patch74: detect-btrfs-ssd.patch Patch75: timedated-donot-close-bogus-dbus-connection.patch # udev patches -# PATCH-FIX-OPENSUSE 0001-Reinstate-TIMEOUT-handling.patch -Patch1001: 0001-Reinstate-TIMEOUT-handling.patch -# PATCH-FIX-OPENSUSE 0013-re-enable-by_path-links-for-ata-devices.patch -Patch1013: 0013-re-enable-by_path-links-for-ata-devices.patch -# PATCH-FIX-OPENSUSE 0014-rules-create-by-id-scsi-links-for-ATA-devices.patch -Patch1014: 0014-rules-create-by-id-scsi-links-for-ATA-devices.patch - -# PATCH-FIX-OPENSUSE 0026-udev-netlink-null-rules.patch -Patch1026: 0026-udev-netlink-null-rules.patch -# PATCH-FIX-OPENSUSE 0027-udev-fix-sg-autoload-regression.patch -Patch1027: 0027-udev-fix-sg-autoload-regression.patch -# PATCH-FIX-OPENSUSE fix-devname-prefix.patch fcrozat@suse.com -- fix modules.devname path, it isn't in /usr -Patch1028: fix-devname-prefix.patch +# PATCH-FIX-OPENSUSE 1001-Reinstate-TIMEOUT-handling.patch +Patch1001: 1001-Reinstate-TIMEOUT-handling.patch +# PATCH-FIX-OPENSUSE 1002-re-enable-by_path-links-for-ata-devices.patch +Patch1002: 1002-re-enable-by_path-links-for-ata-devices.patch +# PATCH-FIX-OPENSUSE 1003-rules-create-by-id-scsi-links-for-ATA-devices.patch +Patch1003: 1003-rules-create-by-id-scsi-links-for-ATA-devices.patch +# PATCH-FIX-OPENSUSE 1004-udev-netlink-null-rules.patch +Patch1004: 1004-udev-netlink-null-rules.patch +# PATCH-FIX-OPENSUSE 1005-udev-fix-sg-autoload-regression.patch +Patch1005: 1005-udev-fix-sg-autoload-regression.patch +# PATCH-FIX-OPENSUSE 1007-fix-devname-prefix.patch fcrozat@suse.com -- fix modules.devname path, it isn't in /usr +Patch1006: 1006-fix-devname-prefix.patch +# PATCH-FIX-UPSTREAM 1007-udevd-add-missing-to-getopt_long-e.patch +Patch1007: 1007-udevd-add-missing-to-getopt_long-e.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -333,11 +334,12 @@ cp %{SOURCE7} m4/ #udev %patch1001 -p1 -%patch1013 -p1 -%patch1014 -p1 -%patch1026 -p1 -%patch1027 -p1 -%patch1028 -p1 +%patch1002 -p1 +%patch1003 -p1 +%patch1004 -p1 +%patch1005 -p1 +%patch1006 -p1 +%patch1007 -p1 #systemd %patch1 -p1 @@ -417,13 +419,16 @@ ln -sf /lib/firmware $RPM_BUILD_ROOT/usr/lib/firmware install -m755 -D %{S:8} $RPM_BUILD_ROOT/etc/init.d/systemd-journald %endif +sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1060} +sed -ie "s|@@SYSTEMD@@|%{_prefix}/lib/systemd|g" %{S:1060} +sed -ie "s|@@BINDIR@@|%{_bindir}|g" %{S:1060} install -m755 -D %{S:1060} $RPM_BUILD_ROOT/etc/init.d/boot.udev ln -s systemd-udevd.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/udev.service sed -ie "s|@@PREFIX@@|%{_bindir}|g" %{S:1061} install -m755 -D %{S:1061} $RPM_BUILD_ROOT/%{_prefix}/lib/udev/write_dev_root_rule sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1062} install -m644 -D %{S:1062} $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/udev-root-symlink.service -mkdir -p $RPM_BUILD_ROOT/lib/systemd/system/basic.target.wants +mkdir -p $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants ln -sf ../udev-root-symlink.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/basic.target.wants #workaround for 716939