diff --git a/1033-udev-really-exclude-device-mapper-from-block-device.patch b/1033-udev-really-exclude-device-mapper-from-block-device.patch new file mode 100644 index 0000000..594331c --- /dev/null +++ b/1033-udev-really-exclude-device-mapper-from-block-device.patch @@ -0,0 +1,39 @@ +From 638ca89c53e2b897cfb3f627f4acbc7d09af2f4c Mon Sep 17 00:00:00 2001 +From: Christian Hesse +Date: Tue, 10 Jun 2014 15:51:15 +0200 +Subject: [PATCH] udev: really exclude device-mapper from block device + ownership event locking + +Arguments were wrong order, no? +This fixes commits: + +e918a1b5a94f270186dca59156354acd2a596494 +3d06f4183470d42361303086ed9dedd29c0ffc1b + +Signed-off-by: Robert Milasan +--- + src/udev/udevd.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +Index: systemd-210/src/udev/udevd.c +=================================================================== +--- systemd-210.orig/src/udev/udevd.c ++++ systemd-210/src/udev/udevd.c +@@ -304,7 +304,7 @@ static void worker_new(struct event *eve + * IMHO this sounds like a good plan for this moment + */ + if (streq_ptr("block", udev_device_get_subsystem(dev)) && +- !startswith("dm-", udev_device_get_sysname(dev))) { ++ !startswith(udev_device_get_sysname(dev), "dm-")) { + struct udev_device *d = dev; + + if (streq_ptr("partition", udev_device_get_devtype(d))) +@@ -744,7 +744,7 @@ static int synthesize_change(struct udev + + if (streq_ptr("block", udev_device_get_subsystem(dev)) && + streq_ptr("disk", udev_device_get_devtype(dev)) && +- !startswith("dm-", udev_device_get_sysname(dev))) { ++ !startswith(udev_device_get_sysname(dev), "dm-")) { + bool part_table_read = false; + bool has_partitions = false; + int fd; diff --git a/1034-udev-check-the-return-value-from-udev_enumerate_scan.patch b/1034-udev-check-the-return-value-from-udev_enumerate_scan.patch new file mode 100644 index 0000000..c2a21fc --- /dev/null +++ b/1034-udev-check-the-return-value-from-udev_enumerate_scan.patch @@ -0,0 +1,26 @@ +From 47a3fa0f7679521b85f7aeba9e245c52cc7bb2cb Mon Sep 17 00:00:00 2001 +From: Thomas Hindoe Paaboel Andersen +Date: Wed, 4 Jun 2014 23:40:43 +0200 +Subject: [PATCH] udev: check the return value from udev_enumerate_scan_devices + +The return value from udev_enumerate_scan_devices was stored but +never used. I assume this was meant to be checked. + +Signed-off-by: Robert Milasan +--- + src/udev/udevd.c | 2 ++ + 1 file changed, 2 insertions(+) + +Index: systemd-210/src/udev/udevd.c +=================================================================== +--- systemd-210.orig/src/udev/udevd.c ++++ systemd-210/src/udev/udevd.c +@@ -783,6 +783,8 @@ static int synthesize_change(struct udev + return r; + + r = udev_enumerate_scan_devices(e); ++ if (r < 0) ++ return r; + + udev_list_entry_foreach(item, udev_enumerate_get_list_entry(e)) { + _cleanup_udev_device_unref_ struct udev_device *d = NULL; diff --git a/systemd-mini.changes b/systemd-mini.changes index c1a3987..cf1ac9f 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jun 10 19:58:56 UTC 2014 - rmilasan@suse.com + +- Add upstream patches + 1033-udev-really-exclude-device-mapper-from-block-device.patch + 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch + ------------------------------------------------------------------- Tue Jun 10 15:29:49 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 61787e8..336e49e 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -612,6 +612,10 @@ Patch1030: 1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch Patch1031: 1031-udev-make-sure-we-always-get-change-for-the-disk.patch # PATCH-FIX-UPSTREAM 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch Patch1032: 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch +# PATCH-FIX-UPSTREAM 1033-udev-really-exclude-device-mapper-from-block-device.patch +Patch1033: 1033-udev-really-exclude-device-mapper-from-block-device.patch +# PATCH-FIX-UPSTREAM 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch +Patch1034: 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -1076,12 +1080,15 @@ cp %{SOURCE7} m4/ %patch1030 -p1 %patch1031 -p1 %patch1032 -p1 +%patch1033 -p1 +%patch1034 -p1 # ensure generate files are removed rm -f units/emergency.service # disable "-l" option for fsck if it does not support new locking scheme # compare with commit c343be283b7152554bac0c02493a4e1759c163f7 +PATH=${PATH}:/sbin:/usr/sbin PATH_FSCK=$(type -p fsck) if grep -q /run/fsck/%%s\\.lock $PATH_FSCK then diff --git a/systemd.changes b/systemd.changes index c1a3987..cf1ac9f 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jun 10 19:58:56 UTC 2014 - rmilasan@suse.com + +- Add upstream patches + 1033-udev-really-exclude-device-mapper-from-block-device.patch + 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch + ------------------------------------------------------------------- Tue Jun 10 15:29:49 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index b4f9688..10039fd 100644 --- a/systemd.spec +++ b/systemd.spec @@ -607,6 +607,10 @@ Patch1030: 1030-udev-guard-REREADP-logic-with-open-O_ECXL.patch Patch1031: 1031-udev-make-sure-we-always-get-change-for-the-disk.patch # PATCH-FIX-UPSTREAM 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch Patch1032: 1032-udev-guard-REREADPT-by-exclusive-lock-instead-of-O_E.patch +# PATCH-FIX-UPSTREAM 1033-udev-really-exclude-device-mapper-from-block-device.patch +Patch1033: 1033-udev-really-exclude-device-mapper-from-block-device.patch +# PATCH-FIX-UPSTREAM 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch +Patch1034: 1034-udev-check-the-return-value-from-udev_enumerate_scan.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -1071,6 +1075,8 @@ cp %{SOURCE7} m4/ %patch1030 -p1 %patch1031 -p1 %patch1032 -p1 +%patch1033 -p1 +%patch1034 -p1 # ensure generate files are removed rm -f units/emergency.service