From 0a4d9e42e9593444355db630a7df1262385ce66b64b6a66b5bfce2c8d97da949 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 11 Mar 2014 07:49:28 +0000 Subject: [PATCH 01/22] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=541 --- systemd-mini.changes | 5 +++++ systemd-mini.spec | 4 +++- systemd.changes | 5 +++++ systemd.spec | 4 +++- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/systemd-mini.changes b/systemd-mini.changes index 4ef46a1..908a88b 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Mar 11 07:47:55 UTC 2014 - werner@suse.de + +- Make compeletion file parser work (bnc#867664) + ------------------------------------------------------------------- Fri Mar 7 09:25:53 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 2d9fb3c..ba647a8 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -658,6 +658,8 @@ export V=1 %if %{without networkd} --disable-networkd \ %endif + --disable-kdbus \ + --enable-dbus \ CFLAGS="%{optflags}" make %{?_smp_mflags} @@ -826,7 +828,7 @@ for f in %{buildroot}%{_datadir}/bash-completion/completions/* do test -e "$f" || break grep -q _init_completion "$f" || continue - echo "%exclude %{_datadir}/bash-completion/completions/${f##*}" + echo "%exclude %{_datadir}/bash-completion/completions/${f##*/}" done > files.completion %else > files.completion diff --git a/systemd.changes b/systemd.changes index 4ef46a1..908a88b 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Mar 11 07:47:55 UTC 2014 - werner@suse.de + +- Make compeletion file parser work (bnc#867664) + ------------------------------------------------------------------- Fri Mar 7 09:25:53 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index 4340cc0..ca307aa 100644 --- a/systemd.spec +++ b/systemd.spec @@ -653,6 +653,8 @@ export V=1 %if %{without networkd} --disable-networkd \ %endif + --disable-kdbus \ + --enable-dbus \ CFLAGS="%{optflags}" make %{?_smp_mflags} @@ -821,7 +823,7 @@ for f in %{buildroot}%{_datadir}/bash-completion/completions/* do test -e "$f" || break grep -q _init_completion "$f" || continue - echo "%exclude %{_datadir}/bash-completion/completions/${f##*}" + echo "%exclude %{_datadir}/bash-completion/completions/${f##*/}" done > files.completion %else > files.completion From ac8d00f52bcc4948fda46242df0d00be7fce0e5d10edf490f554f58a974c0df2 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 11 Mar 2014 11:03:08 +0000 Subject: [PATCH 02/22] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=543 --- ...-lookup-string-for-BUSNAME_FAILURE_S.patch | 29 +++++++++ ...emory-stream-before-using-the-buffer.patch | 45 +++++++++++++ ...-drop-service-from-the-result-string.patch | 25 ++++++++ ...y-one-error-in-array-index-assertion.patch | 35 ++++++++++ 0005-logind-fix-policykit-checks.patch | 43 +++++++++++++ ...device-as-SYSTEMD_READY-0-if-no-file.patch | 30 +++++++++ ...ss-duplicate-and-misleading-messages.patch | 64 +++++++++++++++++++ ...ep-modes-are-to-be-separated-by-whit.patch | 36 +++++++++++ systemd-mini.changes | 13 ++++ systemd-mini.spec | 24 +++++++ systemd.changes | 13 ++++ systemd.spec | 24 +++++++ 12 files changed, 381 insertions(+) create mode 100644 0001-core-busname-add-lookup-string-for-BUSNAME_FAILURE_S.patch create mode 100644 0002-manager-flush-memory-stream-before-using-the-buffer.patch create mode 100644 0003-busname-don-t-drop-service-from-the-result-string.patch create mode 100644 0004-fix-off-by-one-error-in-array-index-assertion.patch create mode 100644 0005-logind-fix-policykit-checks.patch create mode 100644 0006-rules-mark-loop-device-as-SYSTEMD_READY-0-if-no-file.patch create mode 100644 0007-dbus-suppress-duplicate-and-misleading-messages.patch create mode 100644 0008-man-multiple-sleep-modes-are-to-be-separated-by-whit.patch diff --git a/0001-core-busname-add-lookup-string-for-BUSNAME_FAILURE_S.patch b/0001-core-busname-add-lookup-string-for-BUSNAME_FAILURE_S.patch new file mode 100644 index 0000000..b8989ae --- /dev/null +++ b/0001-core-busname-add-lookup-string-for-BUSNAME_FAILURE_S.patch @@ -0,0 +1,29 @@ +From 36d239dbdaf94ba2d96bb60ac45ecfc58624b1eb Mon Sep 17 00:00:00 2001 +From: Daniel Mack +Date: Fri, 7 Mar 2014 11:41:18 +0100 +Subject: [PATCH] core/busname: add lookup string for + BUSNAME_FAILURE_SERVICE_FAILED_PERMANENT + +When a busname unit enters BUSNAME_FAILURE_SERVICE_FAILED_PERMANENT, the +serialization will not be able to look up the result as string via +busname_result_to_string(). This leads to an assertion trap during +daemon-reexec. +--- + src/core/busname.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git src/core/busname.c src/core/busname.c +index 4c34538..237011a 100644 +--- src/core/busname.c ++++ src/core/busname.c +@@ -548,6 +548,7 @@ DEFINE_STRING_TABLE_LOOKUP(busname_state, BusNameState); + static const char* const busname_result_table[_BUSNAME_RESULT_MAX] = { + [BUSNAME_SUCCESS] = "success", + [BUSNAME_FAILURE_RESOURCES] = "resources", ++ [BUSNAME_FAILURE_SERVICE_FAILED_PERMANENT] = "failed-permanent", + }; + + DEFINE_STRING_TABLE_LOOKUP(busname_result, BusNameResult); +-- +1.7.9.2 + diff --git a/0002-manager-flush-memory-stream-before-using-the-buffer.patch b/0002-manager-flush-memory-stream-before-using-the-buffer.patch new file mode 100644 index 0000000..39ca371 --- /dev/null +++ b/0002-manager-flush-memory-stream-before-using-the-buffer.patch @@ -0,0 +1,45 @@ +From b2cdc6664ef6b56e47d38649d69b9943d9f9f5d0 Mon Sep 17 00:00:00 2001 +From: Daniel Mack +Date: Fri, 7 Mar 2014 14:43:59 +0100 +Subject: [PATCH] manager: flush memory stream before using the buffer + +When the manager receives a SIGUSR2 signal, it opens a memory stream +with open_memstream(), uses the returned file handle for logging, and +dumps the logged content with log_dump(). + +However, the char* buffer is only safe to use after the file handle has +been flushed with fflush, as the man pages states: + + When the stream is closed (fclose(3)) or flushed (fflush(3)), the + locations pointed to by ptr and sizeloc are updated to contain, + respectively, a pointer to the buffer and the current size of the + buffer. + These values remain valid only as long as the caller performs no + further output on the stream. If further output is performed, then the + stream must again be flushed before trying to access these variables. + +Without that call, dump remains NULL and the daemon crashes in +log_dump(). +--- + src/core/manager.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git src/core/manager.c src/core/manager.c +index 27a1cc6..78f4f3d 100644 +--- src/core/manager.c ++++ src/core/manager.c +@@ -1621,6 +1621,11 @@ static int manager_dispatch_signal_fd(sd_event_source *source, int fd, uint32_t + break; + } + ++ if (fflush(f)) { ++ log_warning("Failed to flush status stream"); ++ break; ++ } ++ + log_dump(LOG_INFO, dump); + break; + } +-- +1.7.9.2 + diff --git a/0003-busname-don-t-drop-service-from-the-result-string.patch b/0003-busname-don-t-drop-service-from-the-result-string.patch new file mode 100644 index 0000000..37b7bd5 --- /dev/null +++ b/0003-busname-don-t-drop-service-from-the-result-string.patch @@ -0,0 +1,25 @@ +From 700ff4d97311902a440109a2c081731ab6ae8a20 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Fri, 7 Mar 2014 17:29:16 +0100 +Subject: [PATCH] busname: don't drop 'service' from the result string + +--- + src/core/busname.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git src/core/busname.c src/core/busname.c +index 237011a..bca2145 100644 +--- src/core/busname.c ++++ src/core/busname.c +@@ -548,7 +548,7 @@ DEFINE_STRING_TABLE_LOOKUP(busname_state, BusNameState); + static const char* const busname_result_table[_BUSNAME_RESULT_MAX] = { + [BUSNAME_SUCCESS] = "success", + [BUSNAME_FAILURE_RESOURCES] = "resources", +- [BUSNAME_FAILURE_SERVICE_FAILED_PERMANENT] = "failed-permanent", ++ [BUSNAME_FAILURE_SERVICE_FAILED_PERMANENT] = "service-failed-permanent", + }; + + DEFINE_STRING_TABLE_LOOKUP(busname_result, BusNameResult); +-- +1.7.9.2 + diff --git a/0004-fix-off-by-one-error-in-array-index-assertion.patch b/0004-fix-off-by-one-error-in-array-index-assertion.patch new file mode 100644 index 0000000..9b718e0 --- /dev/null +++ b/0004-fix-off-by-one-error-in-array-index-assertion.patch @@ -0,0 +1,35 @@ +From 26abdc73a212b90f7c4b71808a1028d2e87ab09f Mon Sep 17 00:00:00 2001 +From: Dave Reisner +Date: Sat, 8 Mar 2014 17:32:53 -0500 +Subject: [PATCH] fix off by one error in array index assertion + +Since the index is already post-incremented when the array is appended +to, this assertion can be wrongly reached when the array is at capacity +(with the NULL terminator). The bug is reproducible on shutdown with +the following settings in /etc/systemd/system.conf: + + LogTarget=journal-or-kmsg + LogColor=yes + LogLocation=yes + +Reported by Thermi on IRC. +--- + src/core/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git src/core/main.c src/core/main.c +index 6ebfe64..f1b06d8 100644 +--- src/core/main.c ++++ src/core/main.c +@@ -1994,7 +1994,7 @@ finish: + if (log_get_show_location()) + command_line[pos++] = "--log-location"; + +- assert(pos + 1 < ELEMENTSOF(command_line)); ++ assert(pos < ELEMENTSOF(command_line)); + + if (arm_reboot_watchdog && arg_shutdown_watchdog > 0) { + char *e; +-- +1.7.9.2 + diff --git a/0005-logind-fix-policykit-checks.patch b/0005-logind-fix-policykit-checks.patch new file mode 100644 index 0000000..69cf61a --- /dev/null +++ b/0005-logind-fix-policykit-checks.patch @@ -0,0 +1,43 @@ +From 055d406624cb9e01963558767420b71e5f75d2d3 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Mon, 10 Mar 2014 08:25:15 -0400 +Subject: [PATCH] logind: fix policykit checks + +--- + src/login/logind-dbus.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git src/login/logind-dbus.c src/login/logind-dbus.c +index c9c58f3..235b131 100644 +--- src/login/logind-dbus.c ++++ src/login/logind-dbus.c +@@ -1480,6 +1480,8 @@ static int method_do_shutdown_or_sleep( + action_multiple_sessions, interactive, error, method, m); + if (r < 0) + return r; ++ if (r == 0) ++ return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */ + } + + if (blocked) { +@@ -1487,6 +1489,8 @@ static int method_do_shutdown_or_sleep( + action_ignore_inhibit, interactive, error, method, m); + if (r < 0) + return r; ++ if (r == 0) ++ return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */ + } + + if (!multiple_sessions && !blocked) { +@@ -1494,6 +1498,8 @@ static int method_do_shutdown_or_sleep( + action, interactive, error, method, m); + if (r < 0) + return r; ++ if (r == 0) ++ return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */ + } + + r = bus_manager_shutdown_or_sleep_now_or_later(m, unit_name, w, error); +-- +1.7.9.2 + diff --git a/0006-rules-mark-loop-device-as-SYSTEMD_READY-0-if-no-file.patch b/0006-rules-mark-loop-device-as-SYSTEMD_READY-0-if-no-file.patch new file mode 100644 index 0000000..ce18d6c --- /dev/null +++ b/0006-rules-mark-loop-device-as-SYSTEMD_READY-0-if-no-file.patch @@ -0,0 +1,30 @@ +From ebc54302d7fc70927d5dc119e178ff03f6a911ed Mon Sep 17 00:00:00 2001 +From: Peter Rajnoha +Date: Mon, 10 Mar 2014 22:58:14 +0100 +Subject: [PATCH] rules: mark loop device as SYSTEMD_READY=0 if no file is + attached + +Check existence of loop/backing_file in sysfs and mark loop devices with +SYSTEMD_READY if missing. Such loop files is uninitialized and it's not +ready for use yet (there's no file attached). +--- + rules/99-systemd.rules.in | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git rules/99-systemd.rules.in rules/99-systemd.rules.in +index 021359a..04a59c4 100644 +--- rules/99-systemd.rules.in ++++ rules/99-systemd.rules.in +@@ -22,6 +22,9 @@ SUBSYSTEM=="block", KERNEL!="ram*", ENV{DM_UUID}=="CRYPT-*", ENV{ID_PART_TABLE_T + SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", TEST!="md/array_state", ENV{SYSTEMD_READY}="0" + SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0" + ++# Ignore loop devices that don't have any file attached ++SUBSYSTEM=="block", KERNEL=="loop[0-9]*", TEST!="loop/backing_file", ENV{SYSTEMD_READY}="0" ++ + # Ignore nbd devices in the "add" event, with "change" the nbd is ready + ACTION=="add", SUBSYSTEM=="block", KERNEL=="nbd*", ENV{SYSTEMD_READY}="0" + +-- +1.7.9.2 + diff --git a/0007-dbus-suppress-duplicate-and-misleading-messages.patch b/0007-dbus-suppress-duplicate-and-misleading-messages.patch new file mode 100644 index 0000000..e9d1f5b --- /dev/null +++ b/0007-dbus-suppress-duplicate-and-misleading-messages.patch @@ -0,0 +1,64 @@ +From fe7f06f142cf42928e419d8578afd75bf1439672 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Tue, 11 Mar 2014 04:10:19 +0100 +Subject: [PATCH] dbus: suppress duplicate and misleading messages + +When we try to send a signal on a connection we didn't hae the time to +process the Disconnected message yet, don't generate multiple warning +messages, but only a single debug message. + +https://bugs.freedesktop.org/show_bug.cgi?id=75874 +--- + src/core/dbus-manager.c | 7 +++++-- + src/core/dbus-unit.c | 12 ++---------- + 2 files changed, 7 insertions(+), 12 deletions(-) + +diff --git src/core/dbus-manager.c src/core/dbus-manager.c +index 34ef1f5..30f28b6 100644 +--- src/core/dbus-manager.c ++++ src/core/dbus-manager.c +@@ -1386,8 +1386,11 @@ static int reply_unit_file_changes_and_free( + unsigned i; + int r; + +- if (n_changes > 0) +- bus_foreach_bus(m, NULL, send_unit_files_changed, NULL); ++ if (n_changes > 0) { ++ r = bus_foreach_bus(m, NULL, send_unit_files_changed, NULL); ++ if (r < 0) ++ log_debug("Failed to send UnitFilesChanged signal: %s", strerror(-r)); ++ } + + r = sd_bus_message_new_method_return(message, &reply); + if (r < 0) +diff --git src/core/dbus-unit.c src/core/dbus-unit.c +index 515ac8b..07e7f20 100644 +--- src/core/dbus-unit.c ++++ src/core/dbus-unit.c +@@ -638,21 +638,13 @@ static int send_changed_signal(sd_bus *bus, void *userdata) { + bus, p, + UNIT_VTABLE(u)->bus_interface, + NULL); +- if (r < 0) { +- log_warning("Failed to send out specific PropertiesChanged signal for %s: %s", u->id, strerror(-r)); ++ if (r < 0) + return r; +- } + +- r = sd_bus_emit_properties_changed_strv( ++ return sd_bus_emit_properties_changed_strv( + bus, p, + "org.freedesktop.systemd1.Unit", + NULL); +- if (r < 0) { +- log_warning("Failed to send out generic PropertiesChanged signal for %s: %s", u->id, strerror(-r)); +- return r; +- } +- +- return 0; + } + + void bus_unit_send_change_signal(Unit *u) { +-- +1.7.9.2 + diff --git a/0008-man-multiple-sleep-modes-are-to-be-separated-by-whit.patch b/0008-man-multiple-sleep-modes-are-to-be-separated-by-whit.patch new file mode 100644 index 0000000..b43a43c --- /dev/null +++ b/0008-man-multiple-sleep-modes-are-to-be-separated-by-whit.patch @@ -0,0 +1,36 @@ +From 252094eb05c58270a0bc35b14ad30a126ddbb3bb Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Tue, 11 Mar 2014 05:23:39 +0100 +Subject: [PATCH] man: multiple sleep modes are to be separated by whitespace, + not commas + +As pointed out by Jason A. Donenfeld. +--- + man/systemd-sleep.conf.xml | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git man/systemd-sleep.conf.xml man/systemd-sleep.conf.xml +index a917f4d..d0ea6d8 100644 +--- man/systemd-sleep.conf.xml ++++ man/systemd-sleep.conf.xml +@@ -128,7 +128,7 @@ along with systemd; If not, see . + systemd-hibernate.service8, or + systemd-hybrid-sleep.service8. + More than one value can be specified by separating +- multiple values with commas. They will be tried ++ multiple values with whitespace. They will be tried + in turn, until one is written without error. If + neither succeeds, the operation will be aborted. + +@@ -146,7 +146,7 @@ along with systemd; If not, see . + systemd-hibernate.service8, or + systemd-hybrid-sleep.service8. + More than one value can be specified by separating +- multiple values with commas. They will be tried ++ multiple values with whitespace. They will be tried + in turn, until one is written without error. If + neither succeeds, the operation will be aborted. + +-- +1.7.9.2 + diff --git a/systemd-mini.changes b/systemd-mini.changes index 908a88b..87fe0de 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Tue Mar 11 11:01:53 UTC 2014 - werner@suse.de + +- Add or port upstream bugfix patches: + 0001-core-busname-add-lookup-string-for-BUSNAME_FAILURE_S.patch + 0002-manager-flush-memory-stream-before-using-the-buffer.patch + 0003-busname-don-t-drop-service-from-the-result-string.patch + 0004-fix-off-by-one-error-in-array-index-assertion.patch + 0005-logind-fix-policykit-checks.patch + 0006-rules-mark-loop-device-as-SYSTEMD_READY-0-if-no-file.patch + 0007-dbus-suppress-duplicate-and-misleading-messages.patch + 0008-man-multiple-sleep-modes-are-to-be-separated-by-whit.patch + ------------------------------------------------------------------- Tue Mar 11 07:47:55 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index ba647a8..408bb97 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -274,6 +274,20 @@ Patch144: 0011-man-systemd-bootchart-fix-spacing-in-command.patch Patch145: 0012-man-add-missing-comma.patch # PATCH-FIX-USTREAM added at 2014/03/07 Patch146: 0013-units-Do-not-unescape-instance-name-in-systemd-backl.patch +# PATCH-FIX-USTREAM added at 2014/03/11 +Patch147: 0001-core-busname-add-lookup-string-for-BUSNAME_FAILURE_S.patch +# PATCH-FIX-USTREAM added at 2014/03/11 +Patch148: 0002-manager-flush-memory-stream-before-using-the-buffer.patch +# PATCH-FIX-USTREAM added at 2014/03/11 +Patch149: 0003-busname-don-t-drop-service-from-the-result-string.patch +# PATCH-FIX-USTREAM added at 2014/03/11 +Patch150: 0004-fix-off-by-one-error-in-array-index-assertion.patch +# PATCH-FIX-USTREAM added at 2014/03/11 +Patch151: 0005-logind-fix-policykit-checks.patch +# PATCH-FIX-USTREAM added at 2014/03/11 +Patch152: 0006-rules-mark-loop-device-as-SYSTEMD_READY-0-if-no-file.patch +# PATCH-FIX-USTREAM added at 2014/03/11 +Patch153: 0008-man-multiple-sleep-modes-are-to-be-separated-by-whit.patch # PATCH-FIX-OPENSUSE 1009-make-xsltproc-use-correct-ROFF-links.patch -- Make ROFF links working again in manual pages (bnc#842844) Patch1009: 1009-make-xsltproc-use-correct-ROFF-links.patch # PATCH-FIX-OPENSUSE 1010-do-not-install-sulogin-unit-with-poweroff.patch -- Avoid installing console-shell.service (bnc#849071) @@ -297,6 +311,8 @@ Patch1999: systemd-install-compat_pkgconfig-always.patch # udev patches # PATCH-FIX-USTREAM added at 2014/03/03 Patch1034: 0013-cdrom_id-use-the-old-MMC-fallback.patch +# PATCH-FIX-USTREAM added at 2014/03/11 +Patch1035: 0007-dbus-suppress-duplicate-and-misleading-messages.patch # PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch Patch1001: 1001-re-enable-by_path-links-for-ata-devices.patch # PATCH-FIX-OPENSUSE 1002-rules-create-by-id-scsi-links-for-ATA-devices.patch @@ -593,6 +609,13 @@ cp %{SOURCE7} m4/ %patch144 -p0 %patch145 -p0 %patch146 -p0 +%patch147 -p0 +%patch148 -p0 +%patch149 -p0 +%patch150 -p0 +%patch151 -p0 +%patch152 -p0 +%patch153 -p0 %patch1009 -p1 %patch1010 -p1 %patch1012 -p1 @@ -605,6 +628,7 @@ cp %{SOURCE7} m4/ %patch1999 -p1 # udev patches %patch1034 -p0 +%patch1035 -p0 %patch1001 -p1 %patch1002 -p1 %patch1003 -p1 diff --git a/systemd.changes b/systemd.changes index 908a88b..87fe0de 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Tue Mar 11 11:01:53 UTC 2014 - werner@suse.de + +- Add or port upstream bugfix patches: + 0001-core-busname-add-lookup-string-for-BUSNAME_FAILURE_S.patch + 0002-manager-flush-memory-stream-before-using-the-buffer.patch + 0003-busname-don-t-drop-service-from-the-result-string.patch + 0004-fix-off-by-one-error-in-array-index-assertion.patch + 0005-logind-fix-policykit-checks.patch + 0006-rules-mark-loop-device-as-SYSTEMD_READY-0-if-no-file.patch + 0007-dbus-suppress-duplicate-and-misleading-messages.patch + 0008-man-multiple-sleep-modes-are-to-be-separated-by-whit.patch + ------------------------------------------------------------------- Tue Mar 11 07:47:55 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index ca307aa..77202e0 100644 --- a/systemd.spec +++ b/systemd.spec @@ -269,6 +269,20 @@ Patch144: 0011-man-systemd-bootchart-fix-spacing-in-command.patch Patch145: 0012-man-add-missing-comma.patch # PATCH-FIX-USTREAM added at 2014/03/07 Patch146: 0013-units-Do-not-unescape-instance-name-in-systemd-backl.patch +# PATCH-FIX-USTREAM added at 2014/03/11 +Patch147: 0001-core-busname-add-lookup-string-for-BUSNAME_FAILURE_S.patch +# PATCH-FIX-USTREAM added at 2014/03/11 +Patch148: 0002-manager-flush-memory-stream-before-using-the-buffer.patch +# PATCH-FIX-USTREAM added at 2014/03/11 +Patch149: 0003-busname-don-t-drop-service-from-the-result-string.patch +# PATCH-FIX-USTREAM added at 2014/03/11 +Patch150: 0004-fix-off-by-one-error-in-array-index-assertion.patch +# PATCH-FIX-USTREAM added at 2014/03/11 +Patch151: 0005-logind-fix-policykit-checks.patch +# PATCH-FIX-USTREAM added at 2014/03/11 +Patch152: 0006-rules-mark-loop-device-as-SYSTEMD_READY-0-if-no-file.patch +# PATCH-FIX-USTREAM added at 2014/03/11 +Patch153: 0008-man-multiple-sleep-modes-are-to-be-separated-by-whit.patch # PATCH-FIX-OPENSUSE 1009-make-xsltproc-use-correct-ROFF-links.patch -- Make ROFF links working again in manual pages (bnc#842844) Patch1009: 1009-make-xsltproc-use-correct-ROFF-links.patch # PATCH-FIX-OPENSUSE 1010-do-not-install-sulogin-unit-with-poweroff.patch -- Avoid installing console-shell.service (bnc#849071) @@ -292,6 +306,8 @@ Patch1999: systemd-install-compat_pkgconfig-always.patch # udev patches # PATCH-FIX-USTREAM added at 2014/03/03 Patch1034: 0013-cdrom_id-use-the-old-MMC-fallback.patch +# PATCH-FIX-USTREAM added at 2014/03/11 +Patch1035: 0007-dbus-suppress-duplicate-and-misleading-messages.patch # PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch Patch1001: 1001-re-enable-by_path-links-for-ata-devices.patch # PATCH-FIX-OPENSUSE 1002-rules-create-by-id-scsi-links-for-ATA-devices.patch @@ -588,6 +604,13 @@ cp %{SOURCE7} m4/ %patch144 -p0 %patch145 -p0 %patch146 -p0 +%patch147 -p0 +%patch148 -p0 +%patch149 -p0 +%patch150 -p0 +%patch151 -p0 +%patch152 -p0 +%patch153 -p0 %patch1009 -p1 %patch1010 -p1 %patch1012 -p1 @@ -600,6 +623,7 @@ cp %{SOURCE7} m4/ %patch1999 -p1 # udev patches %patch1034 -p0 +%patch1035 -p0 %patch1001 -p1 %patch1002 -p1 %patch1003 -p1 From dc6304205d5ecdb741f958ec7374e05d84ff302d354e08f7c4dfec8ed021b9c7 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 11 Mar 2014 11:07:39 +0000 Subject: [PATCH 03/22] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=544 --- ...us-suppress-duplicate-and-misleading-messages.patch | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/0007-dbus-suppress-duplicate-and-misleading-messages.patch b/0007-dbus-suppress-duplicate-and-misleading-messages.patch index e9d1f5b..c405160 100644 --- a/0007-dbus-suppress-duplicate-and-misleading-messages.patch +++ b/0007-dbus-suppress-duplicate-and-misleading-messages.patch @@ -17,16 +17,16 @@ diff --git src/core/dbus-manager.c src/core/dbus-manager.c index 34ef1f5..30f28b6 100644 --- src/core/dbus-manager.c +++ src/core/dbus-manager.c -@@ -1386,8 +1386,11 @@ static int reply_unit_file_changes_and_free( +@@ -1357,8 +1357,11 @@ static int reply_unit_file_changes_and_f unsigned i; int r; - if (n_changes > 0) -- bus_foreach_bus(m, NULL, send_unit_files_changed, NULL); +- bus_manager_foreach_client(m, send_unit_files_changed, NULL); + if (n_changes > 0) { -+ r = bus_foreach_bus(m, NULL, send_unit_files_changed, NULL); ++ r = bus_manager_foreach_client(m, send_unit_files_changed, NULL); + if (r < 0) -+ log_debug("Failed to send UnitFilesChanged signal: %s", strerror(-r)); ++ log_debug("Failed to send UnitFilesChanged signal: %s", strerror(-r)); + } r = sd_bus_message_new_method_return(message, &reply); @@ -62,3 +62,5 @@ index 515ac8b..07e7f20 100644 -- 1.7.9.2 +--- src/core/dbus-manager.c ++++ src/core/dbus-manager.c 2014-03-11 11:05:44.350235568 +0000 From b3833d45e8ce47adfc2091a3ee731ecc66b884ab3e42db08eb40c8a24f851ef2 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Tue, 11 Mar 2014 11:12:39 +0000 Subject: [PATCH 04/22] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=545 --- systemd-mini.spec | 1 + systemd.spec | 1 + 2 files changed, 2 insertions(+) diff --git a/systemd-mini.spec b/systemd-mini.spec index 408bb97..6ce765e 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -347,6 +347,7 @@ Requires: bash %if %{with bash_completion} Requires: bash-completion %endif +BuildArch: noarch %description bash-completion Some systemd commands offer bash completion, but it's an optional dependency. diff --git a/systemd.spec b/systemd.spec index 77202e0..4e7314e 100644 --- a/systemd.spec +++ b/systemd.spec @@ -342,6 +342,7 @@ Requires: bash %if %{with bash_completion} Requires: bash-completion %endif +BuildArch: noarch %description bash-completion Some systemd commands offer bash completion, but it's an optional dependency. From ca3a0f8e76809362013dcb8ee729faff9314b72e2179581fb11debd4347507b1 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 12 Mar 2014 13:12:18 +0000 Subject: [PATCH 05/22] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=546 --- systemd-dbus-system-bus-address.patch | 11 +++++++++++ systemd-mini.spec | 3 +++ systemd.spec | 3 +++ 3 files changed, 17 insertions(+) create mode 100644 systemd-dbus-system-bus-address.patch diff --git a/systemd-dbus-system-bus-address.patch b/systemd-dbus-system-bus-address.patch new file mode 100644 index 0000000..8ebd5f7 --- /dev/null +++ b/systemd-dbus-system-bus-address.patch @@ -0,0 +1,11 @@ +--- systemd-210/src/shared/def.h ++++ systemd-210/src/shared/def.h 2014-03-12 13:11:06.502235254 +0000 +@@ -61,7 +61,7 @@ + "/usr/lib/kbd/keymaps/\0" + #endif + +-#define UNIX_SYSTEM_BUS_PATH "unix:path=/var/run/dbus/system_bus_socket" ++#define UNIX_SYSTEM_BUS_PATH "unix:path=/run/dbus/system_bus_socket" + #define KERNEL_SYSTEM_BUS_PATH "kernel:path=/dev/kdbus/0-system/bus" + + #ifdef ENABLE_KDBUS diff --git a/systemd-mini.spec b/systemd-mini.spec index 6ce765e..2be3d2b 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -308,6 +308,8 @@ Patch1020: 0001-add-network-device-after-NFS-mount-units.patch Patch1022: 1022-systemd-tmpfiles-ownerkeep.patch # PATCH-FIX-SUSE systemd-install-compat_pkgconfig-always.patch Patch1999: systemd-install-compat_pkgconfig-always.patch +# PATCH-FIX-OPENSUSE systemd-dbus-system-bus-address.patch always use /run/dbus not /var/run +Patch2000: systemd-dbus-system-bus-address.patch # udev patches # PATCH-FIX-USTREAM added at 2014/03/03 Patch1034: 0013-cdrom_id-use-the-old-MMC-fallback.patch @@ -627,6 +629,7 @@ cp %{SOURCE7} m4/ %patch1020 -p1 %patch1022 -p1 %patch1999 -p1 +%patch2000 -p1 # udev patches %patch1034 -p0 %patch1035 -p0 diff --git a/systemd.spec b/systemd.spec index 4e7314e..56da69a 100644 --- a/systemd.spec +++ b/systemd.spec @@ -303,6 +303,8 @@ Patch1020: 0001-add-network-device-after-NFS-mount-units.patch Patch1022: 1022-systemd-tmpfiles-ownerkeep.patch # PATCH-FIX-SUSE systemd-install-compat_pkgconfig-always.patch Patch1999: systemd-install-compat_pkgconfig-always.patch +# PATCH-FIX-OPENSUSE systemd-dbus-system-bus-address.patch always use /run/dbus not /var/run +Patch2000: systemd-dbus-system-bus-address.patch # udev patches # PATCH-FIX-USTREAM added at 2014/03/03 Patch1034: 0013-cdrom_id-use-the-old-MMC-fallback.patch @@ -622,6 +624,7 @@ cp %{SOURCE7} m4/ %patch1020 -p1 %patch1022 -p1 %patch1999 -p1 +%patch2000 -p1 # udev patches %patch1034 -p0 %patch1035 -p0 From f46c8785cc07a6b77f02ad340d5181ce8100e2220aee8fdc870eee2f9037677a Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 12 Mar 2014 14:31:57 +0000 Subject: [PATCH 06/22] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=547 --- systemd-dbus-system-bus-address.patch | 13 +++++++++++++ systemd-mini.changes | 10 +++++++++- systemd-mini.spec | 5 +++-- systemd.changes | 10 +++++++++- systemd.spec | 5 +++-- ...rrect-size-4-reply_cookie-4-bigendian.patch | 18 ++++++++++++++++++ 6 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 use-correct-size-4-reply_cookie-4-bigendian.patch diff --git a/systemd-dbus-system-bus-address.patch b/systemd-dbus-system-bus-address.patch index 8ebd5f7..cede24c 100644 --- a/systemd-dbus-system-bus-address.patch +++ b/systemd-dbus-system-bus-address.patch @@ -9,3 +9,16 @@ #define KERNEL_SYSTEM_BUS_PATH "kernel:path=/dev/kdbus/0-system/bus" #ifdef ENABLE_KDBUS +--- systemd-210/src/libsystemd/sd-bus/sd-bus.c ++++ systemd-210/src/libsystemd/sd-bus/sd-bus.c 2014-03-12 14:31:09.966736492 +0000 +@@ -794,8 +794,8 @@ static int parse_container_unix_address( + machine = NULL; + + b->sockaddr.un.sun_family = AF_UNIX; +- strncpy(b->sockaddr.un.sun_path, "/var/run/dbus/system_bus_socket", sizeof(b->sockaddr.un.sun_path)); +- b->sockaddr_size = offsetof(struct sockaddr_un, sun_path) + strlen("/var/run/dbus/system_bus_socket"); ++ strncpy(b->sockaddr.un.sun_path, "/run/dbus/system_bus_socket", sizeof(b->sockaddr.un.sun_path)); ++ b->sockaddr_size = offsetof(struct sockaddr_un, sun_path) + strlen("/run/dbus/system_bus_socket"); + + return 0; + } diff --git a/systemd-mini.changes b/systemd-mini.changes index 87fe0de..7b7822f 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,4 +1,12 @@ -------------------------------------------------------------------- +----------------------------------------------------------------- +Tue Mar 11 11:32:37 UTC 2014 - hrvoje.senjan@gmail.com + +- Due to previous reason, resurrect systemd-dbus-system-bus-address.patch +- Removed pkgconfig(dbus-1) BuildRequires - with 209 and newer, itis only + needed for quering default DBus directories, which we nowpass to configure. + This also unbreaks libdbus <-> systemd-miniBuild Cycle + +----------------------------------------------------------------- Tue Mar 11 11:01:53 UTC 2014 - werner@suse.de - Add or port upstream bugfix patches: diff --git a/systemd-mini.spec b/systemd-mini.spec index 2be3d2b..fb85285 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -72,7 +72,6 @@ BuildRequires: systemd-rpm-macros BuildRequires: tcpd-devel BuildRequires: xz BuildRequires: pkgconfig(blkid) >= 2.20 -BuildRequires: pkgconfig(dbus-1) >= 1.3.2 %if ! 0%{?bootstrap} BuildRequires: libgcrypt-devel %if %{with python} @@ -204,6 +203,8 @@ Patch25: Forward-suspend-hibernate-calls-to-pm-utils.patch Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch # PATCH-FIX-OPENSUSE use-usr-sbin-sulogin-for-emergency-service.patch arvidjaar@gmail.com -- fix path to sulogin Patch46: use-usr-sbin-sulogin-for-emergency-service.patch +# PATCH-FIX-OPENSUSE Make systemd talk with dbus-daemon even on big endian +Patch47: use-correct-size-4-reply_cookie-4-bigendian.patch # PATCH-FIX-OPENSUSE make-emergency.service-conflict-with-syslog.socket.patch (bnc#852232) Patch84: make-emergency.service-conflict-with-syslog.socket.patch # PATCH-FIX-SUSE 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch @@ -575,6 +576,7 @@ cp %{SOURCE7} m4/ %patch41 -p1 %patch42 -p1 %patch46 -p1 +%patch47 -p1 %patch84 -p1 %patch86 -p1 %patch90 -p1 @@ -687,7 +689,6 @@ export V=1 --disable-networkd \ %endif --disable-kdbus \ - --enable-dbus \ CFLAGS="%{optflags}" make %{?_smp_mflags} diff --git a/systemd.changes b/systemd.changes index 87fe0de..7b7822f 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,4 +1,12 @@ -------------------------------------------------------------------- +----------------------------------------------------------------- +Tue Mar 11 11:32:37 UTC 2014 - hrvoje.senjan@gmail.com + +- Due to previous reason, resurrect systemd-dbus-system-bus-address.patch +- Removed pkgconfig(dbus-1) BuildRequires - with 209 and newer, itis only + needed for quering default DBus directories, which we nowpass to configure. + This also unbreaks libdbus <-> systemd-miniBuild Cycle + +----------------------------------------------------------------- Tue Mar 11 11:01:53 UTC 2014 - werner@suse.de - Add or port upstream bugfix patches: diff --git a/systemd.spec b/systemd.spec index 56da69a..5c3322c 100644 --- a/systemd.spec +++ b/systemd.spec @@ -67,7 +67,6 @@ BuildRequires: systemd-rpm-macros BuildRequires: tcpd-devel BuildRequires: xz BuildRequires: pkgconfig(blkid) >= 2.20 -BuildRequires: pkgconfig(dbus-1) >= 1.3.2 %if ! 0%{?bootstrap} BuildRequires: libgcrypt-devel %if %{with python} @@ -199,6 +198,8 @@ Patch25: Forward-suspend-hibernate-calls-to-pm-utils.patch Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch # PATCH-FIX-OPENSUSE use-usr-sbin-sulogin-for-emergency-service.patch arvidjaar@gmail.com -- fix path to sulogin Patch46: use-usr-sbin-sulogin-for-emergency-service.patch +# PATCH-FIX-OPENSUSE Make systemd talk with dbus-daemon even on big endian +Patch47: use-correct-size-4-reply_cookie-4-bigendian.patch # PATCH-FIX-OPENSUSE make-emergency.service-conflict-with-syslog.socket.patch (bnc#852232) Patch84: make-emergency.service-conflict-with-syslog.socket.patch # PATCH-FIX-SUSE 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch @@ -570,6 +571,7 @@ cp %{SOURCE7} m4/ %patch41 -p1 %patch42 -p1 %patch46 -p1 +%patch47 -p1 %patch84 -p1 %patch86 -p1 %patch90 -p1 @@ -682,7 +684,6 @@ export V=1 --disable-networkd \ %endif --disable-kdbus \ - --enable-dbus \ CFLAGS="%{optflags}" make %{?_smp_mflags} diff --git a/use-correct-size-4-reply_cookie-4-bigendian.patch b/use-correct-size-4-reply_cookie-4-bigendian.patch new file mode 100644 index 0000000..6021f60 --- /dev/null +++ b/use-correct-size-4-reply_cookie-4-bigendian.patch @@ -0,0 +1,18 @@ +From: Olaf Kirch +Date: Date: Wed, 12 Mar 2014 13:52:50 +0000 +Subject: [PATCH] Let systemd talk with dbus-daemon even on big endian + +Related to bug #866732 that is to help systemd to talk with dbus-daemon +on s390x. + +--- systemd-210/src/libsystemd/sd-bus/bus-message.h ++++ systemd-210/src/libsystemd/sd-bus/bus-message.h 2014-03-12 14:06:54.862235499 +0000 +@@ -84,7 +84,7 @@ struct sd_bus_message { + + sd_bus *bus; + +- uint32_t reply_cookie; ++ uint64_t reply_cookie; + + const char *path; + const char *interface; From 99600d47c512bdfeca65abd18fc66596b0cdcf978bba6628611defb256d3babc Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 12 Mar 2014 14:36:19 +0000 Subject: [PATCH 07/22] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=548 --- systemd-mini.changes | 7 +++++++ systemd.changes | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/systemd-mini.changes b/systemd-mini.changes index 7b7822f..443d5f9 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Mar 12 14:35:10 UTC 2014 - werner@suse.de + +- Add patch use-correct-size-4-reply_cookie-4-bigendian.patch to + make sure that systemd can talk with dbus-daemon even on big + endian systems (bnc#867888) + ----------------------------------------------------------------- Tue Mar 11 11:32:37 UTC 2014 - hrvoje.senjan@gmail.com diff --git a/systemd.changes b/systemd.changes index 7b7822f..443d5f9 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Mar 12 14:35:10 UTC 2014 - werner@suse.de + +- Add patch use-correct-size-4-reply_cookie-4-bigendian.patch to + make sure that systemd can talk with dbus-daemon even on big + endian systems (bnc#867888) + ----------------------------------------------------------------- Tue Mar 11 11:32:37 UTC 2014 - hrvoje.senjan@gmail.com From 24da852755740929abaa6cc633624898f97bc2539a638e4932e925da37041519 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 12 Mar 2014 14:55:28 +0000 Subject: [PATCH 08/22] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=549 --- systemd.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/systemd.spec b/systemd.spec index 5c3322c..31955fd 100644 --- a/systemd.spec +++ b/systemd.spec @@ -38,7 +38,6 @@ BuildRequires: audit-devel BuildRequires: binutils-gold %endif %if ! 0%{?bootstrap} -BuildRequires: dbus-1 BuildRequires: docbook-xsl-stylesheets %endif BuildRequires: fdupes @@ -653,6 +652,10 @@ export V=1 %configure \ --docdir=%{_docdir}/systemd \ --with-pamlibdir=/%{_lib}/security \ + --with-dbuspolicydir=%{_sysconfdir}/dbus-1/system.d \ + --with-dbussessionservicedir=%{_datadir}/dbus-1/services \ + --with-dbussystemservicedir=%{_datadir}/dbus-1/system-services \ + --with-dbusinterfacedir=%{_datadir}/dbus-1/interfaces \ %if 0%{?bootstrap} --disable-gudev \ --disable-myhostname \ @@ -1173,7 +1176,12 @@ exit 0 %dir %{_sysconfdir}/systemd/system %dir %{_sysconfdir}/systemd/user %dir %{_sysconfdir}/xdg/systemd +%dir %{_sysconfdir}/dbus-1 +%dir %{_sysconfdir}/dbus-1/system.d %{_sysconfdir}/xdg/systemd/user +%dir %{_datadir}/dbus-1 +%dir %{_datadir}/dbus-1/services +%dir %{_datadir}/dbus-1/system-services %config(noreplace) %{_sysconfdir}/systemd/bootchart.conf %config(noreplace) %{_sysconfdir}/systemd/system.conf %config(noreplace) %{_sysconfdir}/systemd/logind.conf From 07ec1297b14469115962cd7effda3912ce0529379a199d32d90219ee369bf257 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 12 Mar 2014 15:08:08 +0000 Subject: [PATCH 09/22] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=550 --- systemd-big-endian-reply-matching.patch | 36 +++++++++++++++++++ systemd-mini.spec | 12 +++++-- systemd.spec | 2 +- ...rect-size-4-reply_cookie-4-bigendian.patch | 18 ---------- 4 files changed, 47 insertions(+), 21 deletions(-) create mode 100644 systemd-big-endian-reply-matching.patch delete mode 100644 use-correct-size-4-reply_cookie-4-bigendian.patch diff --git a/systemd-big-endian-reply-matching.patch b/systemd-big-endian-reply-matching.patch new file mode 100644 index 0000000..bc45656 --- /dev/null +++ b/systemd-big-endian-reply-matching.patch @@ -0,0 +1,36 @@ +From: Olaf Kirch +Date: Date: Wed, 12 Mar 2014 13:52:50 +0000 +Subject: [PATCH] systemd big endian reply matching + +Reply matching on big endian architectures is broken in the dbus code. + +The hashmap functions, which are used to store and retrieves the reply_callback +structures of asynchronous calls, take a uint64_t pointer for the key argument. +However, the reply_cookie of the sd_bus_message is stored in a 32bit variable. + +This works nicely on x86-64, because (a) it's little endian, and (b) the struct +is padded to the next 8 byte boundary because reply_cookie is wedged between +two pointers. + +On s390x, this fails badly thanks to being big endian. + +Unfortunately, this results in complete failure of any communication +between systemd daemons and the dbus-daemon, because it never gets +past the initial Hello handshake - which is sent as an asynchronous +message. + +Signed-off-by: Olaf Kirch + +Index: systemd-210/src/libsystemd/sd-bus/bus-message.h +=================================================================== +--- systemd-210/src/libsystemd/sd-bus/bus-message.h ++++ systemd-210/src/libsystemd/sd-bus/bus-message.h +@@ -84,7 +84,7 @@ struct sd_bus_message { + + sd_bus *bus; + +- uint32_t reply_cookie; ++ uint64_t reply_cookie; + + const char *path; + const char *interface; diff --git a/systemd-mini.spec b/systemd-mini.spec index fb85285..83eed94 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -43,7 +43,6 @@ BuildRequires: audit-devel BuildRequires: binutils-gold %endif %if ! 0%{?bootstrap} -BuildRequires: dbus-1 BuildRequires: docbook-xsl-stylesheets %endif BuildRequires: fdupes @@ -204,7 +203,7 @@ Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch # PATCH-FIX-OPENSUSE use-usr-sbin-sulogin-for-emergency-service.patch arvidjaar@gmail.com -- fix path to sulogin Patch46: use-usr-sbin-sulogin-for-emergency-service.patch # PATCH-FIX-OPENSUSE Make systemd talk with dbus-daemon even on big endian -Patch47: use-correct-size-4-reply_cookie-4-bigendian.patch +Patch47: systemd-big-endian-reply-matching.patch # PATCH-FIX-OPENSUSE make-emergency.service-conflict-with-syslog.socket.patch (bnc#852232) Patch84: make-emergency.service-conflict-with-syslog.socket.patch # PATCH-FIX-SUSE 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch @@ -658,6 +657,10 @@ export V=1 %configure \ --docdir=%{_docdir}/systemd \ --with-pamlibdir=/%{_lib}/security \ + --with-dbuspolicydir=%{_sysconfdir}/dbus-1/system.d \ + --with-dbussessionservicedir=%{_datadir}/dbus-1/services \ + --with-dbussystemservicedir=%{_datadir}/dbus-1/system-services \ + --with-dbusinterfacedir=%{_datadir}/dbus-1/interfaces \ %if 0%{?bootstrap} --disable-gudev \ --disable-myhostname \ @@ -1178,7 +1181,12 @@ exit 0 %dir %{_sysconfdir}/systemd/system %dir %{_sysconfdir}/systemd/user %dir %{_sysconfdir}/xdg/systemd +%dir %{_sysconfdir}/dbus-1 +%dir %{_sysconfdir}/dbus-1/system.d %{_sysconfdir}/xdg/systemd/user +%dir %{_datadir}/dbus-1 +%dir %{_datadir}/dbus-1/services +%dir %{_datadir}/dbus-1/system-services %config(noreplace) %{_sysconfdir}/systemd/bootchart.conf %config(noreplace) %{_sysconfdir}/systemd/system.conf %config(noreplace) %{_sysconfdir}/systemd/logind.conf diff --git a/systemd.spec b/systemd.spec index 31955fd..1797e01 100644 --- a/systemd.spec +++ b/systemd.spec @@ -198,7 +198,7 @@ Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch # PATCH-FIX-OPENSUSE use-usr-sbin-sulogin-for-emergency-service.patch arvidjaar@gmail.com -- fix path to sulogin Patch46: use-usr-sbin-sulogin-for-emergency-service.patch # PATCH-FIX-OPENSUSE Make systemd talk with dbus-daemon even on big endian -Patch47: use-correct-size-4-reply_cookie-4-bigendian.patch +Patch47: systemd-big-endian-reply-matching.patch # PATCH-FIX-OPENSUSE make-emergency.service-conflict-with-syslog.socket.patch (bnc#852232) Patch84: make-emergency.service-conflict-with-syslog.socket.patch # PATCH-FIX-SUSE 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch diff --git a/use-correct-size-4-reply_cookie-4-bigendian.patch b/use-correct-size-4-reply_cookie-4-bigendian.patch deleted file mode 100644 index 6021f60..0000000 --- a/use-correct-size-4-reply_cookie-4-bigendian.patch +++ /dev/null @@ -1,18 +0,0 @@ -From: Olaf Kirch -Date: Date: Wed, 12 Mar 2014 13:52:50 +0000 -Subject: [PATCH] Let systemd talk with dbus-daemon even on big endian - -Related to bug #866732 that is to help systemd to talk with dbus-daemon -on s390x. - ---- systemd-210/src/libsystemd/sd-bus/bus-message.h -+++ systemd-210/src/libsystemd/sd-bus/bus-message.h 2014-03-12 14:06:54.862235499 +0000 -@@ -84,7 +84,7 @@ struct sd_bus_message { - - sd_bus *bus; - -- uint32_t reply_cookie; -+ uint64_t reply_cookie; - - const char *path; - const char *interface; From 6f7c9f10e7137e84f2961e3db26435ee2e69ccbe80cd7b9e553edf8054c5df15 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 13 Mar 2014 13:46:47 +0000 Subject: [PATCH 10/22] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=551 --- ...linker-find-libudev-for-libdevmapper.patch | 43 +++++++++++++++++++ ...USE-etc-sysconfig-kernel-module-list.patch | 4 +- systemd-mini.changes | 7 +++ systemd.changes | 9 +++- systemd.spec | 3 ++ 5 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 let-linker-find-libudev-for-libdevmapper.patch diff --git a/let-linker-find-libudev-for-libdevmapper.patch b/let-linker-find-libudev-for-libdevmapper.patch new file mode 100644 index 0000000..d1cdc59 --- /dev/null +++ b/let-linker-find-libudev-for-libdevmapper.patch @@ -0,0 +1,43 @@ +--- systemd-210/Makefile.am ++++ systemd-210/Makefile.am 2014-03-13 08:54:36.010736086 +0000 +@@ -3691,6 +3691,10 @@ systemd_cryptsetup_CFLAGS = \ + $(AM_CFLAGS) \ + $(LIBCRYPTSETUP_CFLAGS) + ++systemd_cryptsetup_LDFLAGS = \ ++ $(AM_LDFLAGS) \ ++ -Wl,-rpath-link=$(top_srcdir)/.libs ++ + systemd_cryptsetup_LDADD = \ + libsystemd-label.la \ + libudev-internal.la \ +--- systemd-210/Makefile.in ++++ systemd-210/Makefile.in 2014-03-13 09:19:48.950238725 +0000 +@@ -8964,7 +8964,7 @@ src/cryptsetup/systemd_cryptsetup-crypts + + systemd-cryptsetup$(EXEEXT): $(systemd_cryptsetup_OBJECTS) $(systemd_cryptsetup_DEPENDENCIES) $(EXTRA_systemd_cryptsetup_DEPENDENCIES) + @rm -f systemd-cryptsetup$(EXEEXT) +- $(AM_V_CCLD)$(systemd_cryptsetup_LINK) $(systemd_cryptsetup_OBJECTS) $(systemd_cryptsetup_LDADD) $(LIBS) ++ $(AM_V_CCLD)$(systemd_cryptsetup_LINK) $(systemd_cryptsetup_OBJECTS) $(systemd_cryptsetup_LDFLAGS) $(systemd_cryptsetup_LDADD) $(LIBS) + src/cryptsetup/cryptsetup-generator.$(OBJEXT): \ + src/cryptsetup/$(am__dirstamp) \ + src/cryptsetup/$(DEPDIR)/$(am__dirstamp) +--- systemd-210/configure.ac ++++ systemd-210/configure.ac 2014-03-13 13:46:24.394235954 +0000 +@@ -151,16 +151,11 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CF + -fno-common \ + -fdiagnostics-show-option \ + -fdiagnostics-color \ +- -fno-strict-aliasing \ + -fvisibility=hidden \ + -ffunction-sections \ + -fdata-sections \ + -fstack-protector \ + --param=ssp-buffer-size=4]) +-AS_CASE([$CFLAGS], [*-O[[12345\ ]]*], +- [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ +- -flto])], +- [AC_MSG_RESULT([skipping -flto, optimization not enabled])]) + AC_SUBST([OUR_CFLAGS], "$with_cflags $address_sanitizer_cflags") + + AS_CASE([$CFLAGS], [*-O[[12345\ ]]*], diff --git a/module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch b/module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch index 4037a74..4f557c5 100644 --- a/module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch +++ b/module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch @@ -19,7 +19,7 @@ Subject: module-load: handle SUSE /etc/sysconfig/kernel module list r = parse_argv(argc, argv); if (r <= 0) -@@ -318,7 +321,29 @@ int main(int argc, char *argv[]) { +@@ -318,7 +321,31 @@ int main(int argc, char *argv[]) { r = k; } } @@ -31,6 +31,8 @@ Subject: module-load: handle SUSE /etc/sysconfig/kernel module list + NULL)) < 0) { + if (r != -ENOENT) + log_warning("Failed to read /etc/sysconfig/kernel: %s", strerror(-r)); ++ else ++ r = EXIT_SUCCESS; + } else + r = EXIT_SUCCESS; + if (modules_on_boot) { diff --git a/systemd-mini.changes b/systemd-mini.changes index 443d5f9..943c744 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Wed Mar 12 16:52:09 UTC 2014 - werner@suse.de + +- Modify patch + module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch + to ignore if /etc/sysconfig/kernel does not exist (bnc#865834) + ------------------------------------------------------------------- Wed Mar 12 14:35:10 UTC 2014 - werner@suse.de diff --git a/systemd.changes b/systemd.changes index 443d5f9..faabfaf 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,7 +1,14 @@ +------------------------------------------------------------------- +Wed Mar 12 16:52:09 UTC 2014 - werner@suse.de + +- Modify patch + module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch + to ignore if /etc/sysconfig/kernel does not exist (bnc#865834) + ------------------------------------------------------------------- Wed Mar 12 14:35:10 UTC 2014 - werner@suse.de -- Add patch use-correct-size-4-reply_cookie-4-bigendian.patch to +- Add patch systemd-big-endian-reply-matching.patch make sure that systemd can talk with dbus-daemon even on big endian systems (bnc#867888) diff --git a/systemd.spec b/systemd.spec index 1797e01..acf1ee8 100644 --- a/systemd.spec +++ b/systemd.spec @@ -305,6 +305,8 @@ Patch1022: 1022-systemd-tmpfiles-ownerkeep.patch Patch1999: systemd-install-compat_pkgconfig-always.patch # PATCH-FIX-OPENSUSE systemd-dbus-system-bus-address.patch always use /run/dbus not /var/run Patch2000: systemd-dbus-system-bus-address.patch +# PATCH-FIX-SUSE During linkage of systemd-cryptsetup let linker find libudev for libdevmapper +Patch2001: let-linker-find-libudev-for-libdevmapper.patch # udev patches # PATCH-FIX-USTREAM added at 2014/03/03 Patch1034: 0013-cdrom_id-use-the-old-MMC-fallback.patch @@ -626,6 +628,7 @@ cp %{SOURCE7} m4/ %patch1022 -p1 %patch1999 -p1 %patch2000 -p1 +%patch2001 -p1 # udev patches %patch1034 -p0 %patch1035 -p0 From 435c773720bbc77b2608f20109b2d45c7a7ccc91da7b7bcc8a484471d20f762c Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 13 Mar 2014 13:49:36 +0000 Subject: [PATCH 11/22] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=552 --- systemd-mini.changes | 2 +- systemd-mini.spec | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/systemd-mini.changes b/systemd-mini.changes index 943c744..faabfaf 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -8,7 +8,7 @@ Wed Mar 12 16:52:09 UTC 2014 - werner@suse.de ------------------------------------------------------------------- Wed Mar 12 14:35:10 UTC 2014 - werner@suse.de -- Add patch use-correct-size-4-reply_cookie-4-bigendian.patch to +- Add patch systemd-big-endian-reply-matching.patch make sure that systemd can talk with dbus-daemon even on big endian systems (bnc#867888) diff --git a/systemd-mini.spec b/systemd-mini.spec index 83eed94..89e1827 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -310,6 +310,8 @@ Patch1022: 1022-systemd-tmpfiles-ownerkeep.patch Patch1999: systemd-install-compat_pkgconfig-always.patch # PATCH-FIX-OPENSUSE systemd-dbus-system-bus-address.patch always use /run/dbus not /var/run Patch2000: systemd-dbus-system-bus-address.patch +# PATCH-FIX-SUSE During linkage of systemd-cryptsetup let linker find libudev for libdevmapper +Patch2001: let-linker-find-libudev-for-libdevmapper.patch # udev patches # PATCH-FIX-USTREAM added at 2014/03/03 Patch1034: 0013-cdrom_id-use-the-old-MMC-fallback.patch @@ -631,6 +633,7 @@ cp %{SOURCE7} m4/ %patch1022 -p1 %patch1999 -p1 %patch2000 -p1 +%patch2001 -p1 # udev patches %patch1034 -p0 %patch1035 -p0 From 17495bfa7f938d8b7423f250c326ad66ef0fd0ec43534c659e3cd0dbd3e38af1 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 13 Mar 2014 14:14:59 +0000 Subject: [PATCH 12/22] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=553 --- ...enable-by_path-links-for-ata-devices.patch | 120 ++++++++--------- 1008-add-msft-compability-rules.patch | 25 ---- 1016-support-powerfail-with-powerstatus.patch | 90 ------------- systemd-mini.changes | 11 ++ systemd-mini.spec | 14 +- systemd-powerd-initctl-support.patch | 125 ++++++++++++++++++ systemd-powerfail | 28 ---- systemd.changes | 11 ++ systemd.spec | 14 +- 9 files changed, 205 insertions(+), 233 deletions(-) create mode 100644 systemd-powerd-initctl-support.patch diff --git a/1001-re-enable-by_path-links-for-ata-devices.patch b/1001-re-enable-by_path-links-for-ata-devices.patch index 8d9594a..58bb7b2 100644 --- a/1001-re-enable-by_path-links-for-ata-devices.patch +++ b/1001-re-enable-by_path-links-for-ata-devices.patch @@ -1,28 +1,44 @@ +From 5cf46aa4339670afac386b1b0e630b739f3621c7 Mon Sep 17 00:00:00 2001 From: Robert Milasan Date: Thu, 12 Jul 2012 15:56:34 +0000 -Subject: re-enable by_path links for ata devices +Subject: [PATCH] Persistent by_path links for ata devices -Fix by-path links for ATA transport (bnc#770910) +With newer kernel we have the 'port_no' attribute, +which allows us to construct a valid ata by-path link. + +With this patch ATA links of the form + +ata-.[01] + +(for master/slave devices) or + +ata-..0 + +(for devices behind port multipliers) +are generated. + +References: bnc#770910,FATE#317063 + +Signed-off-by: Robert Milasan +Signed-off-by: Hannes Reinecke --- - src/udev/udev-builtin-path_id.c | 92 +++++++++++++++++++++++++++++++++++------ - 1 file changed, 80 insertions(+), 12 deletions(-) + src/udev/udev-builtin-path_id.c | 53 +++++++++++++++++++++++++++++++---------- + 1 file changed, 41 insertions(+), 12 deletions(-) ---- systemd-206.orig/src/udev/udev-builtin-path_id.c -+++ systemd-206/src/udev/udev-builtin-path_id.c -@@ -338,6 +338,85 @@ static struct udev_device *handle_scsi_h +diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c +index 0599980..fbd3fda 100644 +--- a/src/udev/udev-builtin-path_id.c ++++ b/src/udev/udev-builtin-path_id.c +@@ -339,6 +339,46 @@ static struct udev_device *handle_scsi_hyperv(struct udev_device *parent, char * return parent; } +static struct udev_device *handle_ata(struct udev_device *parent, char **path) +{ -+ struct udev_device *hostdev; -+ int host, bus, target, lun; -+ const char *name; -+ char *base; -+ char *pos; -+ DIR *dir; -+ struct dirent *dent; -+ int basenum, len; ++ struct udev *udev = udev_device_get_udev(parent); ++ struct udev_device *hostdev, *portdev; ++ int host, bus, target, lun, port_no; ++ const char *name, *atahost, *port; + + hostdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_host"); + if (hostdev == NULL) @@ -32,70 +48,35 @@ Fix by-path links for ATA transport (bnc#770910) + if (sscanf(name, "%d:%d:%d:%d", &host, &bus, &target, &lun) != 4) + return NULL; + -+ /* rebase ata offset to get the local relative number */ -+ basenum = -1; -+ base = strdup(udev_device_get_syspath(hostdev)); -+ if (base == NULL) ++ /* The ata port is the parent of the SCSI host */ ++ hostdev = udev_device_get_parent(hostdev); ++ atahost = udev_device_get_sysname(hostdev); ++ if (strncmp(atahost, "ata", 3)) + return NULL; -+ pos = strrchr(base, '/'); -+ if (pos == NULL) { -+ parent = NULL; -+ goto out; -+ } -+ pos[0] = '\0'; -+ len = strlen(base) - 5; -+ if (len <= 0) { -+ parent = NULL; -+ goto out; -+ } -+ base[len] = '\0'; -+ dir = opendir(base); -+ if (dir == NULL) { -+ parent = NULL; -+ goto out; -+ } -+ for (dent = readdir(dir); dent != NULL; dent = readdir(dir)) { -+ char *rest; -+ int i; + -+ if (dent->d_name[0] == '.') -+ continue; -+ if (dent->d_type != DT_DIR && dent->d_type != DT_LNK) -+ continue; -+ if (strncmp(dent->d_name, "ata", 3) != 0) -+ continue; -+ i = strtoul(&dent->d_name[3], &rest, 10); -+ -+ /* ata devices start with 1, so decrease by 1 if i is bigger then 0 */ -+ if (i > 0) -+ i--; -+ if (rest[0] != '\0') -+ continue; -+ /* -+ * find the smallest number; the host really needs to export its -+ * own instance number per parent device; relying on the global host -+ * enumeration and plainly rebasing the numbers sounds unreliable -+ */ -+ if (basenum == -1 || i < basenum) -+ basenum = i; -+ } -+ closedir(dir); -+ if (basenum == -1) { -+ parent = NULL; ++ /* ATA port number is found in 'port_no' attribute */ ++ portdev = udev_device_new_from_subsystem_sysname(udev, "ata_port", ++ atahost); ++ port = udev_device_get_sysattr_value(portdev, "port_no"); ++ if (!port || sscanf(port, "%d", &port_no) != 1) { ++ hostdev = NULL; + goto out; + } -+ host -= basenum; -+ -+ path_prepend(path, "scsi-%u:%u:%u:%u", host, bus, target, lun); ++ if (bus != 0) ++ /* Devices behind port multiplier have a bus != 0*/ ++ path_prepend(path, "ata-%u.%u.0", port_no, bus); ++ else ++ /* Master/slave are distinguished by target id */ ++ path_prepend(path, "ata-%u.%u", port_no, target); +out: -+ free(base); ++ udev_device_unref(portdev); + return hostdev; +} + static struct udev_device *handle_scsi(struct udev_device *parent, char **path) { const char *devtype; -@@ -374,19 +453,8 @@ static struct udev_device *handle_scsi(s +@@ -375,19 +415,8 @@ static struct udev_device *handle_scsi(struct udev_device *parent, char **path) goto out; } @@ -116,3 +97,6 @@ Fix by-path links for ATA transport (bnc#770910) goto out; } +-- +1.8.1.4 + diff --git a/1008-add-msft-compability-rules.patch b/1008-add-msft-compability-rules.patch index d011737..473a0f4 100644 --- a/1008-add-msft-compability-rules.patch +++ b/1008-add-msft-compability-rules.patch @@ -1,25 +0,0 @@ ---- systemd-206.orig/Makefile.am -+++ systemd-206/Makefile.am -@@ -2484,6 +2484,10 @@ dist_udevrules_DATA += \ - rules/80-hotplug-cpu-mem.rules - - # ------------------------------------------------------------------------------ -+dist_udevrules_DATA += \ -+ rules/61-msft.rules -+ -+# ------------------------------------------------------------------------------ - if ENABLE_GUDEV - if ENABLE_GTK_DOC - SUBDIRS += \ ---- /dev/null -+++ systemd-206/rules/61-msft.rules -@@ -0,0 +1,9 @@ -+# MSFT compability rules -+ACTION!="add|change", GOTO="msft_end" -+ -+ENV{DEVTYPE}=="partition", IMPORT{parent}="SCSI_IDENT_*" -+KERNEL=="sd*[!0-9]|sr*", ENV{SCSI_IDENT_LUN_T10}!="?*", IMPORT{program}="/usr/bin/sg_inq -p di --export $tempnode" -+KERNEL=="sd*|sr*", ENV{DEVTYPE}=="disk", ENV{SCSI_IDENT_LUN_T10}=="?*", SYMLINK+="disk/by-id/scsi-1$env{SCSI_IDENT_LUN_T10}" -+KERNEL=="sd*", ENV{DEVTYPE}=="partition", ENV{SCSI_IDENT_LUN_T10}=="?*", SYMLINK+="disk/by-id/scsi-1$env{SCSI_IDENT_LUN_T10}-part%n" -+ -+LABEL="msft_end" diff --git a/1016-support-powerfail-with-powerstatus.patch b/1016-support-powerfail-with-powerstatus.patch index c59f682..473a0f4 100644 --- a/1016-support-powerfail-with-powerstatus.patch +++ b/1016-support-powerfail-with-powerstatus.patch @@ -1,90 +0,0 @@ ---- systemd-208/units/sigpwr.target -+++ systemd-208/units/sigpwr.target 2014-01-14 15:53:32.878735762 +0000 -@@ -8,3 +8,5 @@ - [Unit] - Description=Power Failure - Documentation=man:systemd.special(7) -+BindsTo=powerfail.service -+DefaultDependencies=no -+RefuseManualStart=yes ---- systemd-208/units/powerfail.service -+++ systemd-208/units/powerfail.service 2014-01-14 16:11:41.802235712 +0000 -@@ -0,0 +1,21 @@ -+# This file is part of systemd. -+# -+# Copyright (c) 2014 SUSE LINUX Products GmbH, Germany. -+# Author: Werner Fink -+# Please send feedback to http://www.suse.de/feedback -+# -+# Description: -+# -+# Used to start the systemd-powerfail.service -+# -+ -+[Unit] -+Description=powerfail handling -+BindsTo=sigpwr.target -+DefaultDependencies=no -+RefuseManualStart=yes -+ -+[Service] -+Type=oneshot -+ExecStart=/usr/lib/systemd/systemd-powerfail -+RemainAfterExit=false ---- systemd-208/man/systemd-powerfail.service.8 -+++ systemd-208/man/systemd-powerfail.service.8 2014-01-14 18:22:21.286735810 +0000 -@@ -0,0 +1,54 @@ -+'\" t -+.TH "SYSTEMD\-POWERFAIL\&.SERVICE" "8" "" "systemd 208" "systemd-powerfail.service" -+.\" ----------------------------------------------------------------- -+.\" * Define some portability stuff -+.\" ----------------------------------------------------------------- -+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+.\" http://bugs.debian.org/507673 -+.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html -+.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -+.ie \n(.g .ds Aq \(aq -+.el .ds Aq ' -+.\" ----------------------------------------------------------------- -+.\" * set default formatting -+.\" ----------------------------------------------------------------- -+.\" disable hyphenation -+.nh -+.\" disable justification (adjust text to left margin only) -+.ad l -+.\" ----------------------------------------------------------------- -+.\" * MAIN CONTENT STARTS HERE * -+.\" ----------------------------------------------------------------- -+.SH "NAME" -+systemd-powerfail.service, systemd-powerfail \- Power Fail signal handling -+.SH "SYNOPSIS" -+.PP -+systemd\-powerfail\&.service -+.PP -+/usr/lib/systemd/systemd\-powerfail -+.SH "DESCRIPTION" -+.PP -+systemd\-powerfail -+is a system service that is used to evaulate the content of -+\fI/var/run/powerstatus\fR. Based on the content of this -+file: -+.IP F(AIL) -+Power is failing, UPS is providing the power. The -+systemd\-powerfail -+is now doing a timed shutdown. -+.IP O(K) -+The power has been restored, and pending shutdown -+will be cancled. -+.IP L(OW) -+The power is failing and the UPS has a low battery. -+The -+systemd\-powerfail -+is doing an immediate shutdown. -+.PP -+If \fI/var/run/powerstatus\fR doesn't exist or contains anything else then the letters -+F, O or L, systemd\-powerfail will behave as if it has read the letter F. -+.PP -+.SH "SEE ALSO" -+.PP -+\fBshutdown\fR(8), -+\fBpowerd\fR(8) diff --git a/systemd-mini.changes b/systemd-mini.changes index faabfaf..fbecc1c 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -62,6 +62,17 @@ Fri Mar 7 08:00:31 UTC 2014 - werner@suse.de - Add linker scripts as place holder of the old systemd shared libraries now all included in libsystemd.so (bnc#867128) +------------------------------------------------------------------- +Fri Mar 7 14:50:39 CET 2014 - hare@suse.de + +- Integrate powerd handling in initctl service + + Remove 1016-support-powerfail-with-powerstatus.patch + + Remove systemd-powerfail + + Add systemd-powerd-initctl-support.patch +- Remove 61-msft.rules; superseded by sg3_utils (bnc#866933) +- Persistent by-path links for ATA devices (FATE#317063) + + Update 1001-re-enable-by_path-links-for-ata-devices.patch + ------------------------------------------------------------------- Tue Mar 4 10:37:02 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 89e1827..4f4f796 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -142,7 +142,6 @@ Source8: systemd-journald.init Source9: nss-myhostname-config Source10: macros.systemd.upstream Source11: after-local.service -Source12: systemd-powerfail Source1060: boot.udev Source1061: write_dev_root_rule @@ -296,8 +295,6 @@ Patch1010: 1010-do-not-install-sulogin-unit-with-poweroff.patch Patch1012: 0001-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch # PATCH-FIX-OPENSUSE 1014-journald-with-journaling-FS.patch Patch1014: 1014-journald-with-journaling-FS.patch -# PATCH-FIX-SUSE 1016-support-powerfail-with-powerstatus.patch -Patch1016: 1016-support-powerfail-with-powerstatus.patch # PATCH-FIX-SUSE 1018-Make-LSB-Skripts-know-about-Required-and-Should.patch Patch1018: 1018-Make-LSB-Skripts-know-about-Required-and-Should.patch # PATCH-FIX-SUSE 1019-make-completion-smart-to-be-able-to-redirect.patch @@ -306,6 +303,8 @@ Patch1019: 1019-make-completion-smart-to-be-able-to-redirect.patch Patch1020: 0001-add-network-device-after-NFS-mount-units.patch # PATCH-FIX-SUSE 1022-systemd-tmpfiles-ownerkeep.patch Patch1022: 1022-systemd-tmpfiles-ownerkeep.patch +# PATCH-FIX-SUSE systemd-powerd-initctl-support.patch +Patch1023: systemd-powerd-initctl-support.patch # PATCH-FIX-SUSE systemd-install-compat_pkgconfig-always.patch Patch1999: systemd-install-compat_pkgconfig-always.patch # PATCH-FIX-OPENSUSE systemd-dbus-system-bus-address.patch always use /run/dbus not /var/run @@ -329,8 +328,6 @@ Patch1005: 1005-create-default-links-for-primary-cd_dvd-drive.patch Patch1006: 1006-udev-always-rename-network.patch # PATCH-FIX-OPENSUSE 1007-physical-hotplug-cpu-and-memory.patch Patch1007: 1007-physical-hotplug-cpu-and-memory.patch -# PATCH-FIX-OPENSUSE 1008-add-msft-compability-rules.patch -Patch1008: 1008-add-msft-compability-rules.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -626,11 +623,11 @@ cp %{SOURCE7} m4/ %patch1010 -p1 %patch1012 -p1 %patch1014 -p1 -%patch1016 -p1 %patch1018 -p1 %patch1019 -p1 %patch1020 -p1 %patch1022 -p1 +%patch1023 -p1 %patch1999 -p1 %patch2000 -p1 %patch2001 -p1 @@ -645,7 +642,6 @@ cp %{SOURCE7} m4/ # don't apply when bootstrapping to not modify Makefile.am %if ! 0%{?bootstrap} %patch1007 -p1 -%patch1008 -p1 %endif # ensure generate files are removed @@ -840,11 +836,7 @@ EOF install -m 644 %{S:11} %{buildroot}/%{_prefix}/lib/systemd/system/ ln -s ../after-local.service %{buildroot}/%{_prefix}/lib/systemd/system/multi-user.target.wants/ -# support for SIGPWR handling with /var/run/powerstatus of e.g. powerd -install -m 755 %{S:12} %{buildroot}/%{_prefix}/lib/systemd/ -install -m 644 units/powerfail.service %{buildroot}/%{_prefix}/lib/systemd/system/ %if ! 0%{?bootstrap} -install -m 644 man/systemd-powerfail.service.8 %{buildroot}/%{_mandir}/man8/ %if %{without python} for man in systemd.directives.7 systemd.index.7 do diff --git a/systemd-powerd-initctl-support.patch b/systemd-powerd-initctl-support.patch new file mode 100644 index 0000000..bc0e3ca --- /dev/null +++ b/systemd-powerd-initctl-support.patch @@ -0,0 +1,125 @@ +From 7b8b1ca177a532a6673e5795af867b3631622391 Mon Sep 17 00:00:00 2001 +From: Hannes Reinecke +Date: Fri, 7 Mar 2014 14:04:58 +0100 +Subject: [PATCH] systemd: powerd initctl support + +Old versions of powerd will be using the initctl fifo to signal +state changes. To maintain backward compability systemd should +be interpreting these messages, too. + +Signed-off-by: Hannes Reinecke +--- + src/initctl/initctl.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 70 insertions(+), 1 deletion(-) + +diff --git a/src/initctl/initctl.c b/src/initctl/initctl.c +index 468df35..d4794a6 100644 +--- a/src/initctl/initctl.c ++++ b/src/initctl/initctl.c +@@ -32,8 +32,11 @@ + #include + #include + #include ++#include ++#include + + #include "sd-daemon.h" ++#include "sd-shutdown.h" + #include "sd-bus.h" + + #include "util.h" +@@ -44,6 +47,7 @@ + #include "bus-util.h" + #include "bus-error.h" + #include "def.h" ++#include "socket-util.h" + + #define SERVER_FD_MAX 16 + #define TIMEOUT_MSEC ((int) (DEFAULT_EXIT_USEC/USEC_PER_MSEC)) +@@ -141,7 +145,53 @@ static void change_runlevel(Server *s, int runlevel) { + } + } + ++static int send_shutdownd(unsigned delay, char mode, const char *message) { ++ usec_t t = now(CLOCK_REALTIME) + delay * USEC_PER_MINUTE; ++ struct sd_shutdown_command c = { ++ .usec = t, ++ .mode = mode, ++ .dry_run = false, ++ .warn_wall = true, ++ }; ++ ++ union sockaddr_union sockaddr = { ++ .un.sun_family = AF_UNIX, ++ .un.sun_path = "/run/systemd/shutdownd", ++ }; ++ ++ struct iovec iovec[2] = {{ ++ .iov_base = (char*) &c, ++ .iov_len = offsetof(struct sd_shutdown_command, wall_message), ++ }}; ++ ++ struct msghdr msghdr = { ++ .msg_name = &sockaddr, ++ .msg_namelen = offsetof(struct sockaddr_un, sun_path) ++ + sizeof("/run/systemd/shutdownd") - 1, ++ .msg_iov = iovec, ++ .msg_iovlen = 1, ++ }; ++ ++ _cleanup_close_ int fd; ++ ++ fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0); ++ if (fd < 0) ++ return -errno; ++ ++ if (!isempty(message)) { ++ iovec[1].iov_base = (char*) message; ++ iovec[1].iov_len = strlen(message); ++ msghdr.msg_iovlen++; ++ } ++ ++ if (sendmsg(fd, &msghdr, MSG_NOSIGNAL) < 0) ++ return -errno; ++ ++ return 0; ++} ++ + static void request_process(Server *s, const struct init_request *req) { ++ int r; + assert(s); + assert(req); + +@@ -184,9 +234,28 @@ static void request_process(Server *s, const struct init_request *req) { + return; + + case INIT_CMD_POWERFAIL: ++ r = send_shutdownd(2, SD_SHUTDOWN_POWEROFF, ++ "THE POWER IS FAILED! SYSTEM GOING DOWN! PLEASE LOG OFF NOW!"); ++ if (r < 0) { ++ log_warning("Failed to talk to shutdownd, shutdown cancelled: %s", strerror(-r)); ++ } ++ return; + case INIT_CMD_POWERFAILNOW: ++ r = send_shutdownd(0, SD_SHUTDOWN_POWEROFF, ++ "THE POWER IS FAILED! LOW BATTERY - EMERGENCY SYSTEM SHUTDOWN!"); ++ if (r < 0) { ++ log_warning("Failed to talk to shutdownd, proceeding with immediate shutdown: %s", strerror(-r)); ++ reboot(RB_ENABLE_CAD); ++ reboot(RB_POWER_OFF); ++ } ++ return; ++ + case INIT_CMD_POWEROK: +- log_warning("Received UPS/power initctl request. This is not implemented in systemd. Upgrade your UPS daemon!"); ++ r = send_shutdownd(0, SD_SHUTDOWN_NONE, ++ "THE POWER IS BACK"); ++ if (r < 0) { ++ log_warning("Failed to talk to shutdownd, proceeding with shutdown: %s", strerror(-r)); ++ } + return; + + case INIT_CMD_CHANGECONS: +-- +1.8.1.4 + diff --git a/systemd-powerfail b/systemd-powerfail index 797fb7d..473a0f4 100644 --- a/systemd-powerfail +++ b/systemd-powerfail @@ -1,28 +0,0 @@ -#!/bin/bash -# -# /usr/lib/systemd/systemd-powerfail -# -# Copyright (c) 2014 SUSE LINUX Products GmbH, Germany. -# Author: Werner Fink -# Please send feedback to http://www.suse.de/feedback -# -# Description: -# -# Used to evaluate the status of /var/run/powerstatus -# - -trap "echo" SIGINT SIGSEGV SIGTERM - - POWERFAIL='THE POWER IS FAILED! SYSTEM GOING DOWN! PLEASE LOG OFF NOW!' -POWERFAILNOW='THE POWER IS FAILED! LOW BATTERY - EMERGENCY SYSTEM SHUTDOWN!' - POWERISBACK='THE POWER IS BACK' - -typeset pwrstat=0 -test -s /var/run/powerstatus && read pwrstat < /var/run/powerstatus -rm -f /var/run/powerstatus - -case "$pwrstat" in -O*) exec /sbin/shutdown -c +0 "$POWERISBACK" ;; -L*) exec /sbin/shutdown -P +0 "$POWERFAILNOW" ;; -*) exec /sbin/shutdown -P +2 "$POWERFAIL" ;; -esac diff --git a/systemd.changes b/systemd.changes index faabfaf..fbecc1c 100644 --- a/systemd.changes +++ b/systemd.changes @@ -62,6 +62,17 @@ Fri Mar 7 08:00:31 UTC 2014 - werner@suse.de - Add linker scripts as place holder of the old systemd shared libraries now all included in libsystemd.so (bnc#867128) +------------------------------------------------------------------- +Fri Mar 7 14:50:39 CET 2014 - hare@suse.de + +- Integrate powerd handling in initctl service + + Remove 1016-support-powerfail-with-powerstatus.patch + + Remove systemd-powerfail + + Add systemd-powerd-initctl-support.patch +- Remove 61-msft.rules; superseded by sg3_utils (bnc#866933) +- Persistent by-path links for ATA devices (FATE#317063) + + Update 1001-re-enable-by_path-links-for-ata-devices.patch + ------------------------------------------------------------------- Tue Mar 4 10:37:02 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index acf1ee8..90eb3c3 100644 --- a/systemd.spec +++ b/systemd.spec @@ -137,7 +137,6 @@ Source8: systemd-journald.init Source9: nss-myhostname-config Source10: macros.systemd.upstream Source11: after-local.service -Source12: systemd-powerfail Source1060: boot.udev Source1061: write_dev_root_rule @@ -291,8 +290,6 @@ Patch1010: 1010-do-not-install-sulogin-unit-with-poweroff.patch Patch1012: 0001-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch # PATCH-FIX-OPENSUSE 1014-journald-with-journaling-FS.patch Patch1014: 1014-journald-with-journaling-FS.patch -# PATCH-FIX-SUSE 1016-support-powerfail-with-powerstatus.patch -Patch1016: 1016-support-powerfail-with-powerstatus.patch # PATCH-FIX-SUSE 1018-Make-LSB-Skripts-know-about-Required-and-Should.patch Patch1018: 1018-Make-LSB-Skripts-know-about-Required-and-Should.patch # PATCH-FIX-SUSE 1019-make-completion-smart-to-be-able-to-redirect.patch @@ -301,6 +298,8 @@ Patch1019: 1019-make-completion-smart-to-be-able-to-redirect.patch Patch1020: 0001-add-network-device-after-NFS-mount-units.patch # PATCH-FIX-SUSE 1022-systemd-tmpfiles-ownerkeep.patch Patch1022: 1022-systemd-tmpfiles-ownerkeep.patch +# PATCH-FIX-SUSE systemd-powerd-initctl-support.patch +Patch1023: systemd-powerd-initctl-support.patch # PATCH-FIX-SUSE systemd-install-compat_pkgconfig-always.patch Patch1999: systemd-install-compat_pkgconfig-always.patch # PATCH-FIX-OPENSUSE systemd-dbus-system-bus-address.patch always use /run/dbus not /var/run @@ -324,8 +323,6 @@ Patch1005: 1005-create-default-links-for-primary-cd_dvd-drive.patch Patch1006: 1006-udev-always-rename-network.patch # PATCH-FIX-OPENSUSE 1007-physical-hotplug-cpu-and-memory.patch Patch1007: 1007-physical-hotplug-cpu-and-memory.patch -# PATCH-FIX-OPENSUSE 1008-add-msft-compability-rules.patch -Patch1008: 1008-add-msft-compability-rules.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -621,11 +618,11 @@ cp %{SOURCE7} m4/ %patch1010 -p1 %patch1012 -p1 %patch1014 -p1 -%patch1016 -p1 %patch1018 -p1 %patch1019 -p1 %patch1020 -p1 %patch1022 -p1 +%patch1023 -p1 %patch1999 -p1 %patch2000 -p1 %patch2001 -p1 @@ -640,7 +637,6 @@ cp %{SOURCE7} m4/ # don't apply when bootstrapping to not modify Makefile.am %if ! 0%{?bootstrap} %patch1007 -p1 -%patch1008 -p1 %endif # ensure generate files are removed @@ -835,11 +831,7 @@ EOF install -m 644 %{S:11} %{buildroot}/%{_prefix}/lib/systemd/system/ ln -s ../after-local.service %{buildroot}/%{_prefix}/lib/systemd/system/multi-user.target.wants/ -# support for SIGPWR handling with /var/run/powerstatus of e.g. powerd -install -m 755 %{S:12} %{buildroot}/%{_prefix}/lib/systemd/ -install -m 644 units/powerfail.service %{buildroot}/%{_prefix}/lib/systemd/system/ %if ! 0%{?bootstrap} -install -m 644 man/systemd-powerfail.service.8 %{buildroot}/%{_mandir}/man8/ %if %{without python} for man in systemd.directives.7 systemd.index.7 do From 738fd16fabd1085f2ed65336d6d830f0e3af638e5c09ca16405aadd59411653e Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 13 Mar 2014 14:17:45 +0000 Subject: [PATCH 13/22] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=554 --- systemd-big-endian-reply-matching.patch | 112 +++++++++++++++++------- 1 file changed, 81 insertions(+), 31 deletions(-) diff --git a/systemd-big-endian-reply-matching.patch b/systemd-big-endian-reply-matching.patch index bc45656..a9d0b97 100644 --- a/systemd-big-endian-reply-matching.patch +++ b/systemd-big-endian-reply-matching.patch @@ -1,36 +1,86 @@ -From: Olaf Kirch -Date: Date: Wed, 12 Mar 2014 13:52:50 +0000 -Subject: [PATCH] systemd big endian reply matching +--- + src/libsystemd/sd-bus/sd-bus.c | 36 +++++++++++++++++++++++++++++++----- + 1 file changed, 31 insertions(+), 5 deletions(-) -Reply matching on big endian architectures is broken in the dbus code. - -The hashmap functions, which are used to store and retrieves the reply_callback -structures of asynchronous calls, take a uint64_t pointer for the key argument. -However, the reply_cookie of the sd_bus_message is stored in a 32bit variable. - -This works nicely on x86-64, because (a) it's little endian, and (b) the struct -is padded to the next 8 byte boundary because reply_cookie is wedged between -two pointers. - -On s390x, this fails badly thanks to being big endian. - -Unfortunately, this results in complete failure of any communication -between systemd daemons and the dbus-daemon, because it never gets -past the initial Hello handshake - which is sent as an asynchronous -message. - -Signed-off-by: Olaf Kirch - -Index: systemd-210/src/libsystemd/sd-bus/bus-message.h +Index: systemd-210/src/libsystemd/sd-bus/sd-bus.c =================================================================== ---- systemd-210/src/libsystemd/sd-bus/bus-message.h -+++ systemd-210/src/libsystemd/sd-bus/bus-message.h -@@ -84,7 +84,7 @@ struct sd_bus_message { +--- systemd-210.orig/src/libsystemd/sd-bus/sd-bus.c ++++ systemd-210/src/libsystemd/sd-bus/sd-bus.c +@@ -358,6 +358,29 @@ _public_ int sd_bus_set_name(sd_bus *bus + return 0; + } - sd_bus *bus; ++/* ++ * Wrap the hashmap lookups in helper functions to ensure that the ++ * cookie pointer is always cast to 64bit before passing it to any of the ++ * hashmap functions ++ */ ++static inline int bus_add_reply_callback(sd_bus *bus, struct reply_callback *c, uint64_t cookie) ++{ ++ return hashmap_put(bus->reply_callbacks, &cookie, c); ++} ++ ++static inline struct reply_callback *bus_get_reply_callback(sd_bus *bus, uint64_t cookie) ++{ ++ return hashmap_remove(bus->reply_callbacks, &cookie); ++} ++ ++static inline void bus_drop_reply_callback(sd_bus *bus, const struct reply_callback *c) ++{ ++ struct reply_callback *cc; ++ ++ cc = bus_get_reply_callback(bus, c->cookie); ++ assert(cc == NULL || cc == c); ++} ++ + static int hello_callback(sd_bus *bus, sd_bus_message *reply, void *userdata, sd_bus_error *error) { + const char *s; + int r; +@@ -1757,7 +1780,7 @@ _public_ int sd_bus_call_async( + c->cookie = BUS_MESSAGE_COOKIE(m); + c->timeout = calc_elapse(m->timeout); -- uint32_t reply_cookie; -+ uint64_t reply_cookie; +- r = hashmap_put(bus->reply_callbacks, &c->cookie, c); ++ r = bus_add_reply_callback(bus, c, c->cookie); + if (r < 0) { + free(c); + return r; +@@ -1788,7 +1811,7 @@ _public_ int sd_bus_call_async_cancel(sd + assert_return(cookie != 0, -EINVAL); + assert_return(!bus_pid_changed(bus), -ECHILD); - const char *path; - const char *interface; +- c = hashmap_remove(bus->reply_callbacks, &cookie); ++ c = bus_get_reply_callback(bus, cookie); + if (!c) + return 0; + +@@ -2062,7 +2085,7 @@ static int process_timeout(sd_bus *bus) + return r; + + assert_se(prioq_pop(bus->reply_callbacks_prioq) == c); +- hashmap_remove(bus->reply_callbacks, &c->cookie); ++ bus_drop_reply_callback(bus, c->cookie); + + bus->current = m; + bus->iteration_counter ++; +@@ -2110,7 +2133,9 @@ static int process_reply(sd_bus *bus, sd + m->header->type != SD_BUS_MESSAGE_METHOD_ERROR) + return 0; + +- c = hashmap_remove(bus->reply_callbacks, &m->reply_cookie); ++ /* caveat emptor: reply_cookie is 32bit, but the hashmap lookup uses a 64bit ++ * cookie pointer - without type checking, */ ++ c = bus_get_reply_callback(bus, m->reply_cookie); + if (!c) + return 0; + +@@ -2370,7 +2395,8 @@ static int process_closing(sd_bus *bus, + if (c->timeout != 0) + prioq_remove(bus->reply_callbacks_prioq, c, &c->prioq_idx); + +- hashmap_remove(bus->reply_callbacks, &c->cookie); ++ /* Remove callback from reply_callbacks hashmap */ ++ bus_drop_reply_callback(bus, c->cookie); + + bus->current = m; + bus->iteration_counter++; From 333871ca0c0c91e0a7423cb0b34f54f3a30544cb1c480b22f29a8f1a7fd64cb8 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 13 Mar 2014 14:18:27 +0000 Subject: [PATCH 14/22] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=555 --- systemd-big-endian-reply-matching.patch | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/systemd-big-endian-reply-matching.patch b/systemd-big-endian-reply-matching.patch index a9d0b97..8759f43 100644 --- a/systemd-big-endian-reply-matching.patch +++ b/systemd-big-endian-reply-matching.patch @@ -27,10 +27,10 @@ Index: systemd-210/src/libsystemd/sd-bus/sd-bus.c + +static inline void bus_drop_reply_callback(sd_bus *bus, const struct reply_callback *c) +{ -+ struct reply_callback *cc; ++ struct reply_callback *cc; + -+ cc = bus_get_reply_callback(bus, c->cookie); -+ assert(cc == NULL || cc == c); ++ cc = bus_get_reply_callback(bus, c->cookie); ++ assert(cc == NULL || cc == c); +} + static int hello_callback(sd_bus *bus, sd_bus_message *reply, void *userdata, sd_bus_error *error) { @@ -41,7 +41,7 @@ Index: systemd-210/src/libsystemd/sd-bus/sd-bus.c c->timeout = calc_elapse(m->timeout); - r = hashmap_put(bus->reply_callbacks, &c->cookie, c); -+ r = bus_add_reply_callback(bus, c, c->cookie); ++ r = bus_add_reply_callback(bus, c, c->cookie); if (r < 0) { free(c); return r; @@ -59,7 +59,7 @@ Index: systemd-210/src/libsystemd/sd-bus/sd-bus.c assert_se(prioq_pop(bus->reply_callbacks_prioq) == c); - hashmap_remove(bus->reply_callbacks, &c->cookie); -+ bus_drop_reply_callback(bus, c->cookie); ++ bus_drop_reply_callback(bus, c); bus->current = m; bus->iteration_counter ++; @@ -68,8 +68,8 @@ Index: systemd-210/src/libsystemd/sd-bus/sd-bus.c return 0; - c = hashmap_remove(bus->reply_callbacks, &m->reply_cookie); -+ /* caveat emptor: reply_cookie is 32bit, but the hashmap lookup uses a 64bit -+ * cookie pointer - without type checking, */ ++ /* caveat emptor: reply_cookie is 32bit, but the hashmap lookup uses a 64bit ++ * cookie pointer - without type checking, */ + c = bus_get_reply_callback(bus, m->reply_cookie); if (!c) return 0; @@ -79,8 +79,8 @@ Index: systemd-210/src/libsystemd/sd-bus/sd-bus.c prioq_remove(bus->reply_callbacks_prioq, c, &c->prioq_idx); - hashmap_remove(bus->reply_callbacks, &c->cookie); -+ /* Remove callback from reply_callbacks hashmap */ -+ bus_drop_reply_callback(bus, c->cookie); ++ /* Remove callback from reply_callbacks hashmap */ ++ bus_drop_reply_callback(bus, c); bus->current = m; bus->iteration_counter++; From 9dd13ca82626f5b7569de905e0155c95c37db0f9ac80272756c97fbdcb9544f4 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 13 Mar 2014 15:00:06 +0000 Subject: [PATCH 15/22] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=556 --- let-linker-find-libudev-for-libdevmapper.patch | 8 +------- systemd-mini.changes | 2 +- systemd.changes | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/let-linker-find-libudev-for-libdevmapper.patch b/let-linker-find-libudev-for-libdevmapper.patch index d1cdc59..e2bbdda 100644 --- a/let-linker-find-libudev-for-libdevmapper.patch +++ b/let-linker-find-libudev-for-libdevmapper.patch @@ -24,13 +24,7 @@ src/cryptsetup/$(DEPDIR)/$(am__dirstamp) --- systemd-210/configure.ac +++ systemd-210/configure.ac 2014-03-13 13:46:24.394235954 +0000 -@@ -151,16 +151,11 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CF - -fno-common \ - -fdiagnostics-show-option \ - -fdiagnostics-color \ -- -fno-strict-aliasing \ - -fvisibility=hidden \ - -ffunction-sections \ +@@ -156,10 +156,6 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CF -fdata-sections \ -fstack-protector \ --param=ssp-buffer-size=4]) diff --git a/systemd-mini.changes b/systemd-mini.changes index fbecc1c..ffb3d9d 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -10,7 +10,7 @@ Wed Mar 12 14:35:10 UTC 2014 - werner@suse.de - Add patch systemd-big-endian-reply-matching.patch make sure that systemd can talk with dbus-daemon even on big - endian systems (bnc#867888) + endian systems (bnc#866732) ----------------------------------------------------------------- Tue Mar 11 11:32:37 UTC 2014 - hrvoje.senjan@gmail.com diff --git a/systemd.changes b/systemd.changes index fbecc1c..ffb3d9d 100644 --- a/systemd.changes +++ b/systemd.changes @@ -10,7 +10,7 @@ Wed Mar 12 14:35:10 UTC 2014 - werner@suse.de - Add patch systemd-big-endian-reply-matching.patch make sure that systemd can talk with dbus-daemon even on big - endian systems (bnc#867888) + endian systems (bnc#866732) ----------------------------------------------------------------- Tue Mar 11 11:32:37 UTC 2014 - hrvoje.senjan@gmail.com From 371238a95d6d012a9f8901964a012e62800bb6b99c81eb16c15dc79f044161b2 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 13 Mar 2014 16:12:50 +0000 Subject: [PATCH 16/22] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=557 --- systemd-mini.changes | 6 ++++++ systemd-mini.spec | 2 +- systemd.changes | 6 ++++++ systemd.spec | 5 +++-- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/systemd-mini.changes b/systemd-mini.changes index ffb3d9d..aa4dc95 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Mar 13 15:43:19 UTC 2014 - werner@suse.de + +- Avoid file conflict between udev and systemd (bnc# 868230) + + ------------------------------------------------------------------- Wed Mar 12 16:52:09 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 4f4f796..d253f72 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -1105,7 +1105,7 @@ exit 0 %dir %{_prefix}/lib/systemd/user %dir %{_prefix}/lib/systemd/system %exclude %{_prefix}/lib/systemd/system/systemd-udev*.* -%exclude %{_prefix}/lib/systemd/system/udev.service +%exclude %{_prefix}/lib/systemd/system/*udev*.service %exclude %{_prefix}/lib/systemd/system/systemd-udev-root-symlink.service %exclude %{_prefix}/lib/systemd/system/*.target.wants/systemd-udev*.* %exclude %{_prefix}/lib/systemd/system/basic.target.wants/systemd-udev-root-symlink.service diff --git a/systemd.changes b/systemd.changes index ffb3d9d..aa4dc95 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Mar 13 15:43:19 UTC 2014 - werner@suse.de + +- Avoid file conflict between udev and systemd (bnc# 868230) + + ------------------------------------------------------------------- Wed Mar 12 16:52:09 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index 90eb3c3..77d3e29 100644 --- a/systemd.spec +++ b/systemd.spec @@ -625,7 +625,8 @@ cp %{SOURCE7} m4/ %patch1023 -p1 %patch1999 -p1 %patch2000 -p1 -%patch2001 -p1 +## DISABLED ... does not work even on little endian +##%patch2001 -p1 # udev patches %patch1034 -p0 %patch1035 -p0 @@ -1100,7 +1101,7 @@ exit 0 %dir %{_prefix}/lib/systemd/user %dir %{_prefix}/lib/systemd/system %exclude %{_prefix}/lib/systemd/system/systemd-udev*.* -%exclude %{_prefix}/lib/systemd/system/udev.service +%exclude %{_prefix}/lib/systemd/system/*udev*.service %exclude %{_prefix}/lib/systemd/system/systemd-udev-root-symlink.service %exclude %{_prefix}/lib/systemd/system/*.target.wants/systemd-udev*.* %exclude %{_prefix}/lib/systemd/system/basic.target.wants/systemd-udev-root-symlink.service From 566e46c980dbeec0f344e467fc26ac2efacc0f6ec6cf90c3bd00457e41446142 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Thu, 13 Mar 2014 16:12:59 +0000 Subject: [PATCH 17/22] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=558 --- systemd-mini.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/systemd-mini.spec b/systemd-mini.spec index d253f72..8aa0943 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -630,7 +630,8 @@ cp %{SOURCE7} m4/ %patch1023 -p1 %patch1999 -p1 %patch2000 -p1 -%patch2001 -p1 +## DISABLED ... does not work even on little endian +##%patch2001 -p1 # udev patches %patch1034 -p0 %patch1035 -p0 From c390c8ff73e4aa62a456936b461733474a54d991f0d1e97c99e191820c22fac8 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 14 Mar 2014 11:02:35 +0000 Subject: [PATCH 18/22] - Don't require non-existing binutils-gold OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=559 --- systemd-mini.changes | 6 +++++- systemd-mini.spec | 3 +++ systemd.changes | 6 +++++- systemd.spec | 3 +++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/systemd-mini.changes b/systemd-mini.changes index aa4dc95..cd85ff1 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,8 +1,12 @@ +------------------------------------------------------------------- +Thu Mar 13 17:35:11 UTC 2014 - schwab@linux-m68k.org + +- Don't require non-existing binutils-gold + ------------------------------------------------------------------- Thu Mar 13 15:43:19 UTC 2014 - werner@suse.de - Avoid file conflict between udev and systemd (bnc# 868230) - ------------------------------------------------------------------- Wed Mar 12 16:52:09 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 8aa0943..ed8e893 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -40,8 +40,11 @@ Provides: %{real} = %{version}-%{release} BuildRequires: audit-devel %if %{with compat_libs} +# See gold_archs in binutils.spec +%ifarch %ix86 %arm x86_64 ppc ppc64 ppc64le %sparc BuildRequires: binutils-gold %endif +%endif %if ! 0%{?bootstrap} BuildRequires: docbook-xsl-stylesheets %endif diff --git a/systemd.changes b/systemd.changes index aa4dc95..cd85ff1 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,8 +1,12 @@ +------------------------------------------------------------------- +Thu Mar 13 17:35:11 UTC 2014 - schwab@linux-m68k.org + +- Don't require non-existing binutils-gold + ------------------------------------------------------------------- Thu Mar 13 15:43:19 UTC 2014 - werner@suse.de - Avoid file conflict between udev and systemd (bnc# 868230) - ------------------------------------------------------------------- Wed Mar 12 16:52:09 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index 77d3e29..f3a591a 100644 --- a/systemd.spec +++ b/systemd.spec @@ -35,8 +35,11 @@ Group: System/Base BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: audit-devel %if %{with compat_libs} +# See gold_archs in binutils.spec +%ifarch %ix86 %arm x86_64 ppc ppc64 ppc64le %sparc BuildRequires: binutils-gold %endif +%endif %if ! 0%{?bootstrap} BuildRequires: docbook-xsl-stylesheets %endif From a828b1963d8797a399b7e9be34ef7c9ce1fb2a0bab1a59320f24df8963af17d0 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 14 Mar 2014 11:10:20 +0000 Subject: [PATCH 19/22] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=560 --- ...k-for-a-64bit-value-when-we-only-hav.patch | 181 ++++++++++++++++++ 0002-make-209-working-on-older-dist.patch | 65 +++++++ 1008-add-msft-compability-rules.patch | 25 +++ 1016-support-powerfail-with-powerstatus.patch | 0 pre_checkin.sh | 12 ++ systemd-big-endian-reply-matching.patch | 86 --------- systemd-mini.changes | 20 +- systemd-mini.spec | 63 +++++- systemd-powerfail | 0 systemd.changes | 20 +- systemd.spec | 63 +++++- 11 files changed, 429 insertions(+), 106 deletions(-) create mode 100644 0001-sd-bus-don-t-look-for-a-64bit-value-when-we-only-hav.patch create mode 100644 0002-make-209-working-on-older-dist.patch delete mode 100644 1016-support-powerfail-with-powerstatus.patch delete mode 100644 systemd-big-endian-reply-matching.patch delete mode 100644 systemd-powerfail diff --git a/0001-sd-bus-don-t-look-for-a-64bit-value-when-we-only-hav.patch b/0001-sd-bus-don-t-look-for-a-64bit-value-when-we-only-hav.patch new file mode 100644 index 0000000..47dbcce --- /dev/null +++ b/0001-sd-bus-don-t-look-for-a-64bit-value-when-we-only-hav.patch @@ -0,0 +1,181 @@ +From 42c4ebcbd4cbd7b27667eb8081ee4dc46f9ece17 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Thu, 13 Mar 2014 20:33:22 +0100 +Subject: [PATCH] sd-bus: don't look for a 64bit value when we only have 32bit + value on reply cookie hash table access + +This broke hashtable lookups for the message cookies on s390x, which is +a 64bit BE machine where accessing 32bit values as 64bit and vice versa +will explode. + +Also, while we are at it, be a bit more careful when dealing with the +64bit cookies we expose and the 32bit serial numbers dbus uses in its +payload. + +Problem identified by Fridrich Strba. +--- + src/libsystemd/sd-bus/bus-dump.c | 4 ++-- + src/libsystemd/sd-bus/bus-kernel.c | 2 +- + src/libsystemd/sd-bus/bus-message.c | 15 ++++++++++----- + src/libsystemd/sd-bus/bus-message.h | 5 +++-- + src/libsystemd/sd-bus/sd-bus.c | 12 ++++++------ + 5 files changed, 22 insertions(+), 16 deletions(-) + +diff --git a/src/libsystemd/sd-bus/bus-dump.c b/src/libsystemd/sd-bus/bus-dump.c +index 0e41549..ea81644 100644 +--- a/src/libsystemd/sd-bus/bus-dump.c ++++ b/src/libsystemd/sd-bus/bus-dump.c +@@ -69,10 +69,10 @@ int bus_message_dump(sd_bus_message *m, FILE *f, bool with_header) { + if (BUS_MESSAGE_COOKIE(m) == 0xFFFFFFFFULL) + fprintf(f, " Cookie=-1"); + else +- fprintf(f, " Cookie=%lu", (unsigned long) BUS_MESSAGE_COOKIE(m)); ++ fprintf(f, " Cookie=%" PRIu64, BUS_MESSAGE_COOKIE(m)); + + if (m->reply_cookie != 0) +- fprintf(f, " ReplyCookie=%lu", (unsigned long) m->reply_cookie); ++ fprintf(f, " ReplyCookie=%" PRIu64, m->reply_cookie); + + fputs("\n", f); + +diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c +index 8a2ca02..80ef15b 100644 +--- a/src/libsystemd/sd-bus/bus-kernel.c ++++ b/src/libsystemd/sd-bus/bus-kernel.c +@@ -266,7 +266,7 @@ static int bus_message_setup_kmsg(sd_bus *b, sd_bus_message *m) { + well_known ? 0 : + m->destination ? unique : KDBUS_DST_ID_BROADCAST; + m->kdbus->payload_type = KDBUS_PAYLOAD_DBUS; +- m->kdbus->cookie = m->header->serial; ++ m->kdbus->cookie = (uint64_t) m->header->serial; + m->kdbus->priority = m->priority; + + if (m->header->flags & BUS_MESSAGE_NO_REPLY_EXPECTED) +diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c +index fb894ef..97ab0e3 100644 +--- a/src/libsystemd/sd-bus/bus-message.c ++++ b/src/libsystemd/sd-bus/bus-message.c +@@ -617,7 +617,7 @@ static int message_new_reply( + t->header->flags |= BUS_MESSAGE_NO_REPLY_EXPECTED; + t->reply_cookie = BUS_MESSAGE_COOKIE(call); + +- r = message_append_field_uint32(t, BUS_MESSAGE_HEADER_REPLY_SERIAL, t->reply_cookie); ++ r = message_append_field_uint32(t, BUS_MESSAGE_HEADER_REPLY_SERIAL, (uint32_t) t->reply_cookie); + if (r < 0) + goto fail; + +@@ -752,7 +752,7 @@ int bus_message_new_synthetic_error( + t->header->flags |= BUS_MESSAGE_NO_REPLY_EXPECTED; + t->reply_cookie = cookie; + +- r = message_append_field_uint32(t, BUS_MESSAGE_HEADER_REPLY_SERIAL, t->reply_cookie); ++ r = message_append_field_uint32(t, BUS_MESSAGE_HEADER_REPLY_SERIAL, (uint32_t) t->reply_cookie); + if (r < 0) + goto fail; + +@@ -5075,21 +5075,26 @@ int bus_message_parse_fields(sd_bus_message *m) { + break; + } + +- case BUS_MESSAGE_HEADER_REPLY_SERIAL: ++ case BUS_MESSAGE_HEADER_REPLY_SERIAL: { ++ uint32_t serial; ++ + if (m->reply_cookie != 0) + return -EBADMSG; + + if (!streq(signature, "u")) + return -EBADMSG; + +- r = message_peek_field_uint32(m, &ri, item_size, &m->reply_cookie); ++ r = message_peek_field_uint32(m, &ri, item_size, &serial); + if (r < 0) + return r; + ++ m->reply_cookie = serial; ++ + if (m->reply_cookie == 0) + return -EBADMSG; + + break; ++ } + + case BUS_MESSAGE_HEADER_UNIX_FDS: + if (unix_fds != 0) +@@ -5489,7 +5494,7 @@ int bus_message_remarshal(sd_bus *bus, sd_bus_message **m) { + return -ENOMEM; + + n->reply_cookie = (*m)->reply_cookie; +- r = message_append_field_uint32(n, BUS_MESSAGE_HEADER_REPLY_SERIAL, n->reply_cookie); ++ r = message_append_field_uint32(n, BUS_MESSAGE_HEADER_REPLY_SERIAL, (uint32_t) n->reply_cookie); + if (r < 0) + return r; + +diff --git a/src/libsystemd/sd-bus/bus-message.h b/src/libsystemd/sd-bus/bus-message.h +index 5fbe3e6..df79294 100644 +--- a/src/libsystemd/sd-bus/bus-message.h ++++ b/src/libsystemd/sd-bus/bus-message.h +@@ -84,7 +84,7 @@ struct sd_bus_message { + + sd_bus *bus; + +- uint32_t reply_cookie; ++ uint64_t reply_cookie; + + const char *path; + const char *interface; +@@ -162,7 +162,8 @@ static inline uint64_t BUS_MESSAGE_BSWAP64(sd_bus_message *m, uint64_t u) { + return BUS_MESSAGE_NEED_BSWAP(m) ? bswap_64(u) : u; + } + +-static inline uint32_t BUS_MESSAGE_COOKIE(sd_bus_message *m) { ++static inline uint64_t BUS_MESSAGE_COOKIE(sd_bus_message *m) { ++ /* Note that we return the serial converted to a 64bit value here */ + return BUS_MESSAGE_BSWAP32(m, m->header->serial); + } + +diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c +index ca7c428..8e44e50 100644 +--- a/src/libsystemd/sd-bus/sd-bus.c ++++ b/src/libsystemd/sd-bus/sd-bus.c +@@ -1486,15 +1486,15 @@ static int bus_write_message(sd_bus *bus, sd_bus_message *m, bool hint_sync_call + return r; + + if (bus->is_kernel || *idx >= BUS_MESSAGE_SIZE(m)) +- log_debug("Sent message type=%s sender=%s destination=%s object=%s interface=%s member=%s cookie=%lu reply_cookie=%lu error=%s", ++ log_debug("Sent message type=%s sender=%s destination=%s object=%s interface=%s member=%s cookie=%" PRIu64 " reply_cookie=%" PRIu64 " error=%s", + bus_message_type_to_string(m->header->type), + strna(sd_bus_message_get_sender(m)), + strna(sd_bus_message_get_destination(m)), + strna(sd_bus_message_get_path(m)), + strna(sd_bus_message_get_interface(m)), + strna(sd_bus_message_get_member(m)), +- (unsigned long) BUS_MESSAGE_COOKIE(m), +- (unsigned long) m->reply_cookie, ++ BUS_MESSAGE_COOKIE(m), ++ m->reply_cookie, + strna(m->error.message)); + + return r; +@@ -2253,15 +2253,15 @@ static int process_message(sd_bus *bus, sd_bus_message *m) { + bus->current = m; + bus->iteration_counter++; + +- log_debug("Got message type=%s sender=%s destination=%s object=%s interface=%s member=%s cookie=%lu reply_cookie=%lu error=%s", ++ log_debug("Got message type=%s sender=%s destination=%s object=%s interface=%s member=%s cookie=%" PRIu64 " reply_cookie=%" PRIu64 " error=%s", + bus_message_type_to_string(m->header->type), + strna(sd_bus_message_get_sender(m)), + strna(sd_bus_message_get_destination(m)), + strna(sd_bus_message_get_path(m)), + strna(sd_bus_message_get_interface(m)), + strna(sd_bus_message_get_member(m)), +- (unsigned long) BUS_MESSAGE_COOKIE(m), +- (unsigned long) m->reply_cookie, ++ BUS_MESSAGE_COOKIE(m), ++ m->reply_cookie, + strna(m->error.message)); + + r = process_hello(bus, m); +-- +1.9.0 + diff --git a/0002-make-209-working-on-older-dist.patch b/0002-make-209-working-on-older-dist.patch new file mode 100644 index 0000000..502c6a4 --- /dev/null +++ b/0002-make-209-working-on-older-dist.patch @@ -0,0 +1,65 @@ +--- systemd-209/units/kmod-static-nodes.service.in ++++ systemd-209/units/kmod-static-nodes.service.in 2014-02-27 15:04:30.378236539 +0000 +@@ -15,4 +15,5 @@ ConditionPathExists=/lib/modules/%v/modu + [Service] + Type=oneshot + RemainAfterExit=yes ++ExecStartPre=@MKDIR_P@ /run/tmpfiles.d + ExecStart=@KMOD@ static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf +--- systemd-209/configure ++++ systemd-209/configure 2014-02-28 17:13:50.770735397 +0000 +@@ -15999,12 +15999,12 @@ if test -n "$KMOD_CFLAGS"; then + pkg_cv_KMOD_CFLAGS="$KMOD_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" libkmod >= 15 \""; } >&5 +- ($PKG_CONFIG --exists --print-errors " libkmod >= 15 ") 2>&5 ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" libkmod >= 14 \""; } >&5 ++ ($PKG_CONFIG --exists --print-errors " libkmod >= 14 ") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_KMOD_CFLAGS=`$PKG_CONFIG --cflags " libkmod >= 15 " 2>/dev/null` ++ pkg_cv_KMOD_CFLAGS=`$PKG_CONFIG --cflags " libkmod >= 14 " 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes +@@ -16016,12 +16016,12 @@ if test -n "$KMOD_LIBS"; then + pkg_cv_KMOD_LIBS="$KMOD_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ +- { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" libkmod >= 15 \""; } >&5 +- ($PKG_CONFIG --exists --print-errors " libkmod >= 15 ") 2>&5 ++ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" libkmod >= 14 \""; } >&5 ++ ($PKG_CONFIG --exists --print-errors " libkmod >= 14 ") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then +- pkg_cv_KMOD_LIBS=`$PKG_CONFIG --libs " libkmod >= 15 " 2>/dev/null` ++ pkg_cv_KMOD_LIBS=`$PKG_CONFIG --libs " libkmod >= 14 " 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes + else + pkg_failed=yes +@@ -16042,18 +16042,18 @@ else + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- KMOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " libkmod >= 15 " 2>&1` ++ KMOD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " libkmod >= 14 " 2>&1` + else +- KMOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " libkmod >= 15 " 2>&1` ++ KMOD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " libkmod >= 14 " 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$KMOD_PKG_ERRORS" >&5 + +- as_fn_error $? "*** kmod version >= 15 not found" "$LINENO" 5 ++ as_fn_error $? "*** kmod version >= 14 not found" "$LINENO" 5 + elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 + $as_echo "no" >&6; } +- as_fn_error $? "*** kmod version >= 15 not found" "$LINENO" 5 ++ as_fn_error $? "*** kmod version >= 14 not found" "$LINENO" 5 + else + KMOD_CFLAGS=$pkg_cv_KMOD_CFLAGS + KMOD_LIBS=$pkg_cv_KMOD_LIBS diff --git a/1008-add-msft-compability-rules.patch b/1008-add-msft-compability-rules.patch index 473a0f4..d011737 100644 --- a/1008-add-msft-compability-rules.patch +++ b/1008-add-msft-compability-rules.patch @@ -0,0 +1,25 @@ +--- systemd-206.orig/Makefile.am ++++ systemd-206/Makefile.am +@@ -2484,6 +2484,10 @@ dist_udevrules_DATA += \ + rules/80-hotplug-cpu-mem.rules + + # ------------------------------------------------------------------------------ ++dist_udevrules_DATA += \ ++ rules/61-msft.rules ++ ++# ------------------------------------------------------------------------------ + if ENABLE_GUDEV + if ENABLE_GTK_DOC + SUBDIRS += \ +--- /dev/null ++++ systemd-206/rules/61-msft.rules +@@ -0,0 +1,9 @@ ++# MSFT compability rules ++ACTION!="add|change", GOTO="msft_end" ++ ++ENV{DEVTYPE}=="partition", IMPORT{parent}="SCSI_IDENT_*" ++KERNEL=="sd*[!0-9]|sr*", ENV{SCSI_IDENT_LUN_T10}!="?*", IMPORT{program}="/usr/bin/sg_inq -p di --export $tempnode" ++KERNEL=="sd*|sr*", ENV{DEVTYPE}=="disk", ENV{SCSI_IDENT_LUN_T10}=="?*", SYMLINK+="disk/by-id/scsi-1$env{SCSI_IDENT_LUN_T10}" ++KERNEL=="sd*", ENV{DEVTYPE}=="partition", ENV{SCSI_IDENT_LUN_T10}=="?*", SYMLINK+="disk/by-id/scsi-1$env{SCSI_IDENT_LUN_T10}-part%n" ++ ++LABEL="msft_end" diff --git a/1016-support-powerfail-with-powerstatus.patch b/1016-support-powerfail-with-powerstatus.patch deleted file mode 100644 index 473a0f4..0000000 diff --git a/pre_checkin.sh b/pre_checkin.sh index 1870630..6937326 100644 --- a/pre_checkin.sh +++ b/pre_checkin.sh @@ -4,6 +4,18 @@ # create a -mini spec for systemd for bootstrapping ORIG_SPEC=systemd +for patch in $(grep -lE 'Makefile.(am|in)|configure\.ac' *.patch) +do + sed -rn 's/^Patch([0-9]+):\s+'${patch}'/patch\1/p' $ORIG_SPEC.spec +done | while read patch +do + grep -1E '^%'${patch}'[^0-9]' $ORIG_SPEC.spec | grep -q bootstrap + if ((${PIPESTATUS[1]} != 0)) + then + echo Patch ${patch} does trigger 'auto(re)configure' 1>&2 + exit 1 + fi +done EDIT_WARNING="##### WARNING: please do not edit this auto generated spec file. Use the ${ORIG_SPEC}.spec! #####\n" sed "s/^%define bootstrap.*$/${EDIT_WARNING}%define bootstrap 1/; s/^%define udevpkgname.*$/${EDIT_WARNING}%define udevpkgname udev-mini/; diff --git a/systemd-big-endian-reply-matching.patch b/systemd-big-endian-reply-matching.patch deleted file mode 100644 index 8759f43..0000000 --- a/systemd-big-endian-reply-matching.patch +++ /dev/null @@ -1,86 +0,0 @@ ---- - src/libsystemd/sd-bus/sd-bus.c | 36 +++++++++++++++++++++++++++++++----- - 1 file changed, 31 insertions(+), 5 deletions(-) - -Index: systemd-210/src/libsystemd/sd-bus/sd-bus.c -=================================================================== ---- systemd-210.orig/src/libsystemd/sd-bus/sd-bus.c -+++ systemd-210/src/libsystemd/sd-bus/sd-bus.c -@@ -358,6 +358,29 @@ _public_ int sd_bus_set_name(sd_bus *bus - return 0; - } - -+/* -+ * Wrap the hashmap lookups in helper functions to ensure that the -+ * cookie pointer is always cast to 64bit before passing it to any of the -+ * hashmap functions -+ */ -+static inline int bus_add_reply_callback(sd_bus *bus, struct reply_callback *c, uint64_t cookie) -+{ -+ return hashmap_put(bus->reply_callbacks, &cookie, c); -+} -+ -+static inline struct reply_callback *bus_get_reply_callback(sd_bus *bus, uint64_t cookie) -+{ -+ return hashmap_remove(bus->reply_callbacks, &cookie); -+} -+ -+static inline void bus_drop_reply_callback(sd_bus *bus, const struct reply_callback *c) -+{ -+ struct reply_callback *cc; -+ -+ cc = bus_get_reply_callback(bus, c->cookie); -+ assert(cc == NULL || cc == c); -+} -+ - static int hello_callback(sd_bus *bus, sd_bus_message *reply, void *userdata, sd_bus_error *error) { - const char *s; - int r; -@@ -1757,7 +1780,7 @@ _public_ int sd_bus_call_async( - c->cookie = BUS_MESSAGE_COOKIE(m); - c->timeout = calc_elapse(m->timeout); - -- r = hashmap_put(bus->reply_callbacks, &c->cookie, c); -+ r = bus_add_reply_callback(bus, c, c->cookie); - if (r < 0) { - free(c); - return r; -@@ -1788,7 +1811,7 @@ _public_ int sd_bus_call_async_cancel(sd - assert_return(cookie != 0, -EINVAL); - assert_return(!bus_pid_changed(bus), -ECHILD); - -- c = hashmap_remove(bus->reply_callbacks, &cookie); -+ c = bus_get_reply_callback(bus, cookie); - if (!c) - return 0; - -@@ -2062,7 +2085,7 @@ static int process_timeout(sd_bus *bus) - return r; - - assert_se(prioq_pop(bus->reply_callbacks_prioq) == c); -- hashmap_remove(bus->reply_callbacks, &c->cookie); -+ bus_drop_reply_callback(bus, c); - - bus->current = m; - bus->iteration_counter ++; -@@ -2110,7 +2133,9 @@ static int process_reply(sd_bus *bus, sd - m->header->type != SD_BUS_MESSAGE_METHOD_ERROR) - return 0; - -- c = hashmap_remove(bus->reply_callbacks, &m->reply_cookie); -+ /* caveat emptor: reply_cookie is 32bit, but the hashmap lookup uses a 64bit -+ * cookie pointer - without type checking, */ -+ c = bus_get_reply_callback(bus, m->reply_cookie); - if (!c) - return 0; - -@@ -2370,7 +2395,8 @@ static int process_closing(sd_bus *bus, - if (c->timeout != 0) - prioq_remove(bus->reply_callbacks_prioq, c, &c->prioq_idx); - -- hashmap_remove(bus->reply_callbacks, &c->cookie); -+ /* Remove callback from reply_callbacks hashmap */ -+ bus_drop_reply_callback(bus, c); - - bus->current = m; - bus->iteration_counter++; diff --git a/systemd-mini.changes b/systemd-mini.changes index cd85ff1..1ab95ff 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Fri Mar 14 11:07:29 UTC 2014 - werner@suse.de + +- Replace systemd-big-endian-reply-matching.patch with upstream + 0001-sd-bus-don-t-look-for-a-64bit-value-when-we-only-hav.patch + to solve broken systemd communication with and over dbus (bnc#866732) + +------------------------------------------------------------------- +Fri Mar 14 08:30:57 UTC 2014 - werner@suse.de + +- Readd patch 1008-add-msft-compability-rules.patch for + older code base as 13.1 +- Modify pre_checkin.sh to throw an error if a patch will be + applied which modifies one of Makefile.am, Makefile.in, or + configiure.ac as this breaks bootstrapping +- Add second version of make-209-working-on-older-dist.patch + to be able to apply for bootstrapping version + ------------------------------------------------------------------- Thu Mar 13 17:35:11 UTC 2014 - schwab@linux-m68k.org @@ -6,7 +24,7 @@ Thu Mar 13 17:35:11 UTC 2014 - schwab@linux-m68k.org ------------------------------------------------------------------- Thu Mar 13 15:43:19 UTC 2014 - werner@suse.de -- Avoid file conflict between udev and systemd (bnc# 868230) +- Avoid file conflict between udev and systemd (bnc#868230) ------------------------------------------------------------------- Wed Mar 12 16:52:09 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index ed8e893..69cd07c 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -150,6 +150,21 @@ Source1060: boot.udev Source1061: write_dev_root_rule Source1062: systemd-udev-root-symlink +############################################################################## +# +# WARNING: For the case of for bootstrapping patch should not affect +# the files +# +# Makefile.am, Makefile.in, and configure.ac +# +# as this triggers an (re)autoconfigure. Please check patches with the command +# +# grep -lE 'Makefile.(am|in)|configure\.ac' *.patch +# +# to surround them with %if ! 0%{?bootstrap} ... %endif +# +############################################################################## +# # PATCH-FIX-UPSTREAM avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch lnussel@suse.com bnc#791101 -- avoid assertion if invalid address familily is passed to gethostbyaddr_r Patch0: avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch # PATCH-FIX-UPSTREAM optionally-warn-if-nss-myhostname-is-called.patch lnussel@suse.com -- optionally warn if nss-myhostname is called @@ -205,7 +220,7 @@ Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch # PATCH-FIX-OPENSUSE use-usr-sbin-sulogin-for-emergency-service.patch arvidjaar@gmail.com -- fix path to sulogin Patch46: use-usr-sbin-sulogin-for-emergency-service.patch # PATCH-FIX-OPENSUSE Make systemd talk with dbus-daemon even on big endian -Patch47: systemd-big-endian-reply-matching.patch +Patch47: 0001-sd-bus-don-t-look-for-a-64bit-value-when-we-only-hav.patch # PATCH-FIX-OPENSUSE make-emergency.service-conflict-with-syslog.socket.patch (bnc#852232) Patch84: make-emergency.service-conflict-with-syslog.socket.patch # PATCH-FIX-SUSE 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch @@ -220,6 +235,7 @@ Patch93: 0001-Don-t-snprintf-a-potentially-NULL-pointer.patch Patch114: 0001-systemd-empty-sigmask-on-reexec.patch # PATCH-FIX-SUSE 0001-make-209-working-on-older-dist.patch werner@suse.com Patch117: 0001-make-209-working-on-older-dist.patch +Patch118: 0002-make-209-working-on-older-dist.patch # PATCH-FIX-SUSE 0001-make-fortify-happy-with-ppoll.patch werner@suse.com Patch119: 0001-make-fortify-happy-with-ppoll.patch # PATCH-FIX-SUSE 0001-avoid-abort-due-timeout-at-user-service.patch werner@suse.com @@ -331,6 +347,8 @@ Patch1005: 1005-create-default-links-for-primary-cd_dvd-drive.patch Patch1006: 1006-udev-always-rename-network.patch # PATCH-FIX-OPENSUSE 1007-physical-hotplug-cpu-and-memory.patch Patch1007: 1007-physical-hotplug-cpu-and-memory.patch +# PATCH-FIX-OPENSUSE 1008-add-msft-compability-rules.patch -- for code base <= 1310 +Patch1008: 1008-add-msft-compability-rules.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -540,14 +558,18 @@ cp %{SOURCE7} m4/ # systemd patches %patch0 -p1 +%if ! 0%{?bootstrap} %patch1 -p1 +%endif %patch3 -p1 # don't apply when bootstrapping to not modify configure.in %if ! 0%{?bootstrap} %patch4 -p1 %endif %patch5 -p1 +%if ! 0%{?bootstrap} %patch6 -p1 +%endif %patch7 -p1 %patch8 -p1 %patch9 -p1 @@ -557,7 +579,9 @@ cp %{SOURCE7} m4/ %patch14 -p1 %patch15 -p1 %patch16 -p1 +%if ! 0%{?bootstrap} %patch17 -p1 +%endif %patch18 -p1 %patch20 -p1 %patch21 -p1 @@ -579,13 +603,19 @@ cp %{SOURCE7} m4/ %patch46 -p1 %patch47 -p1 %patch84 -p1 +%if ! 0%{?bootstrap} %patch86 -p1 +%endif %patch90 -p1 %patch91 -p1 %patch93 -p1 %patch114 -p0 %if 0%{?suse_version} <= 1310 +%if ! 0%{?bootstrap} %patch117 -p1 +%else +%patch118 -p1 +%endif %endif %patch119 -p1 %patch120 -p1 @@ -602,7 +632,9 @@ cp %{SOURCE7} m4/ %patch131 -p0 %patch132 -p0 %patch133 -p0 +%if ! 0%{?bootstrap} %patch134 -p0 +%endif %patch135 -p0 %patch136 -p0 %patch137 -p0 @@ -628,13 +660,18 @@ cp %{SOURCE7} m4/ %patch1014 -p1 %patch1018 -p1 %patch1019 -p1 +%if ! 0%{?bootstrap} %patch1020 -p1 +%endif %patch1022 -p1 %patch1023 -p1 +%if ! 0%{?bootstrap} %patch1999 -p1 +%endif %patch2000 -p1 -## DISABLED ... does not work even on little endian -##%patch2001 -p1 +%if ! 0%{?bootstrap} +%patch2001 -p1 +%endif # udev patches %patch1034 -p0 %patch1035 -p0 @@ -647,12 +684,19 @@ cp %{SOURCE7} m4/ %if ! 0%{?bootstrap} %patch1007 -p1 %endif +%if 0%{?suse_version} <= 1310 +%if ! 0%{?bootstrap} +%patch1008 -p1 +%endif +%endif # ensure generate files are removed rm -f units/emergency.service %build +%if ! 0%{?bootstrap} autoreconf -fiv +%endif # prevent pre-generated and distributed files from re-building find . -name "*.[1-8]" -exec touch '{}' '+'; export V=1 @@ -1109,7 +1153,8 @@ exit 0 %dir %{_prefix}/lib/systemd/user %dir %{_prefix}/lib/systemd/system %exclude %{_prefix}/lib/systemd/system/systemd-udev*.* -%exclude %{_prefix}/lib/systemd/system/*udev*.service +%exclude %{_prefix}/lib/systemd/system/udev.service +%exclude %{_prefix}/lib/systemd/system/initrd-udevadm-cleanup-db.service %exclude %{_prefix}/lib/systemd/system/systemd-udev-root-symlink.service %exclude %{_prefix}/lib/systemd/system/*.target.wants/systemd-udev*.* %exclude %{_prefix}/lib/systemd/system/basic.target.wants/systemd-udev-root-symlink.service @@ -1180,12 +1225,12 @@ exit 0 %dir %{_sysconfdir}/systemd/system %dir %{_sysconfdir}/systemd/user %dir %{_sysconfdir}/xdg/systemd -%dir %{_sysconfdir}/dbus-1 -%dir %{_sysconfdir}/dbus-1/system.d +%exclude %dir %{_sysconfdir}/dbus-1 +%exclude %dir %{_sysconfdir}/dbus-1/system.d %{_sysconfdir}/xdg/systemd/user -%dir %{_datadir}/dbus-1 -%dir %{_datadir}/dbus-1/services -%dir %{_datadir}/dbus-1/system-services +%exclude %dir %{_datadir}/dbus-1 +%exclude %dir %{_datadir}/dbus-1/services +%exclude %dir %{_datadir}/dbus-1/system-services %config(noreplace) %{_sysconfdir}/systemd/bootchart.conf %config(noreplace) %{_sysconfdir}/systemd/system.conf %config(noreplace) %{_sysconfdir}/systemd/logind.conf diff --git a/systemd-powerfail b/systemd-powerfail deleted file mode 100644 index 473a0f4..0000000 diff --git a/systemd.changes b/systemd.changes index cd85ff1..1ab95ff 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Fri Mar 14 11:07:29 UTC 2014 - werner@suse.de + +- Replace systemd-big-endian-reply-matching.patch with upstream + 0001-sd-bus-don-t-look-for-a-64bit-value-when-we-only-hav.patch + to solve broken systemd communication with and over dbus (bnc#866732) + +------------------------------------------------------------------- +Fri Mar 14 08:30:57 UTC 2014 - werner@suse.de + +- Readd patch 1008-add-msft-compability-rules.patch for + older code base as 13.1 +- Modify pre_checkin.sh to throw an error if a patch will be + applied which modifies one of Makefile.am, Makefile.in, or + configiure.ac as this breaks bootstrapping +- Add second version of make-209-working-on-older-dist.patch + to be able to apply for bootstrapping version + ------------------------------------------------------------------- Thu Mar 13 17:35:11 UTC 2014 - schwab@linux-m68k.org @@ -6,7 +24,7 @@ Thu Mar 13 17:35:11 UTC 2014 - schwab@linux-m68k.org ------------------------------------------------------------------- Thu Mar 13 15:43:19 UTC 2014 - werner@suse.de -- Avoid file conflict between udev and systemd (bnc# 868230) +- Avoid file conflict between udev and systemd (bnc#868230) ------------------------------------------------------------------- Wed Mar 12 16:52:09 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index f3a591a..78afff0 100644 --- a/systemd.spec +++ b/systemd.spec @@ -145,6 +145,21 @@ Source1060: boot.udev Source1061: write_dev_root_rule Source1062: systemd-udev-root-symlink +############################################################################## +# +# WARNING: For the case of for bootstrapping patch should not affect +# the files +# +# Makefile.am, Makefile.in, and configure.ac +# +# as this triggers an (re)autoconfigure. Please check patches with the command +# +# grep -lE 'Makefile.(am|in)|configure\.ac' *.patch +# +# to surround them with %if ! 0%{?bootstrap} ... %endif +# +############################################################################## +# # PATCH-FIX-UPSTREAM avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch lnussel@suse.com bnc#791101 -- avoid assertion if invalid address familily is passed to gethostbyaddr_r Patch0: avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch # PATCH-FIX-UPSTREAM optionally-warn-if-nss-myhostname-is-called.patch lnussel@suse.com -- optionally warn if nss-myhostname is called @@ -200,7 +215,7 @@ Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch # PATCH-FIX-OPENSUSE use-usr-sbin-sulogin-for-emergency-service.patch arvidjaar@gmail.com -- fix path to sulogin Patch46: use-usr-sbin-sulogin-for-emergency-service.patch # PATCH-FIX-OPENSUSE Make systemd talk with dbus-daemon even on big endian -Patch47: systemd-big-endian-reply-matching.patch +Patch47: 0001-sd-bus-don-t-look-for-a-64bit-value-when-we-only-hav.patch # PATCH-FIX-OPENSUSE make-emergency.service-conflict-with-syslog.socket.patch (bnc#852232) Patch84: make-emergency.service-conflict-with-syslog.socket.patch # PATCH-FIX-SUSE 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch @@ -215,6 +230,7 @@ Patch93: 0001-Don-t-snprintf-a-potentially-NULL-pointer.patch Patch114: 0001-systemd-empty-sigmask-on-reexec.patch # PATCH-FIX-SUSE 0001-make-209-working-on-older-dist.patch werner@suse.com Patch117: 0001-make-209-working-on-older-dist.patch +Patch118: 0002-make-209-working-on-older-dist.patch # PATCH-FIX-SUSE 0001-make-fortify-happy-with-ppoll.patch werner@suse.com Patch119: 0001-make-fortify-happy-with-ppoll.patch # PATCH-FIX-SUSE 0001-avoid-abort-due-timeout-at-user-service.patch werner@suse.com @@ -326,6 +342,8 @@ Patch1005: 1005-create-default-links-for-primary-cd_dvd-drive.patch Patch1006: 1006-udev-always-rename-network.patch # PATCH-FIX-OPENSUSE 1007-physical-hotplug-cpu-and-memory.patch Patch1007: 1007-physical-hotplug-cpu-and-memory.patch +# PATCH-FIX-OPENSUSE 1008-add-msft-compability-rules.patch -- for code base <= 1310 +Patch1008: 1008-add-msft-compability-rules.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -535,14 +553,18 @@ cp %{SOURCE7} m4/ # systemd patches %patch0 -p1 +%if ! 0%{?bootstrap} %patch1 -p1 +%endif %patch3 -p1 # don't apply when bootstrapping to not modify configure.in %if ! 0%{?bootstrap} %patch4 -p1 %endif %patch5 -p1 +%if ! 0%{?bootstrap} %patch6 -p1 +%endif %patch7 -p1 %patch8 -p1 %patch9 -p1 @@ -552,7 +574,9 @@ cp %{SOURCE7} m4/ %patch14 -p1 %patch15 -p1 %patch16 -p1 +%if ! 0%{?bootstrap} %patch17 -p1 +%endif %patch18 -p1 %patch20 -p1 %patch21 -p1 @@ -574,13 +598,19 @@ cp %{SOURCE7} m4/ %patch46 -p1 %patch47 -p1 %patch84 -p1 +%if ! 0%{?bootstrap} %patch86 -p1 +%endif %patch90 -p1 %patch91 -p1 %patch93 -p1 %patch114 -p0 %if 0%{?suse_version} <= 1310 +%if ! 0%{?bootstrap} %patch117 -p1 +%else +%patch118 -p1 +%endif %endif %patch119 -p1 %patch120 -p1 @@ -597,7 +627,9 @@ cp %{SOURCE7} m4/ %patch131 -p0 %patch132 -p0 %patch133 -p0 +%if ! 0%{?bootstrap} %patch134 -p0 +%endif %patch135 -p0 %patch136 -p0 %patch137 -p0 @@ -623,13 +655,18 @@ cp %{SOURCE7} m4/ %patch1014 -p1 %patch1018 -p1 %patch1019 -p1 +%if ! 0%{?bootstrap} %patch1020 -p1 +%endif %patch1022 -p1 %patch1023 -p1 +%if ! 0%{?bootstrap} %patch1999 -p1 +%endif %patch2000 -p1 -## DISABLED ... does not work even on little endian -##%patch2001 -p1 +%if ! 0%{?bootstrap} +%patch2001 -p1 +%endif # udev patches %patch1034 -p0 %patch1035 -p0 @@ -642,12 +679,19 @@ cp %{SOURCE7} m4/ %if ! 0%{?bootstrap} %patch1007 -p1 %endif +%if 0%{?suse_version} <= 1310 +%if ! 0%{?bootstrap} +%patch1008 -p1 +%endif +%endif # ensure generate files are removed rm -f units/emergency.service %build +%if ! 0%{?bootstrap} autoreconf -fiv +%endif # prevent pre-generated and distributed files from re-building find . -name "*.[1-8]" -exec touch '{}' '+'; export V=1 @@ -1104,7 +1148,8 @@ exit 0 %dir %{_prefix}/lib/systemd/user %dir %{_prefix}/lib/systemd/system %exclude %{_prefix}/lib/systemd/system/systemd-udev*.* -%exclude %{_prefix}/lib/systemd/system/*udev*.service +%exclude %{_prefix}/lib/systemd/system/udev.service +%exclude %{_prefix}/lib/systemd/system/initrd-udevadm-cleanup-db.service %exclude %{_prefix}/lib/systemd/system/systemd-udev-root-symlink.service %exclude %{_prefix}/lib/systemd/system/*.target.wants/systemd-udev*.* %exclude %{_prefix}/lib/systemd/system/basic.target.wants/systemd-udev-root-symlink.service @@ -1175,12 +1220,12 @@ exit 0 %dir %{_sysconfdir}/systemd/system %dir %{_sysconfdir}/systemd/user %dir %{_sysconfdir}/xdg/systemd -%dir %{_sysconfdir}/dbus-1 -%dir %{_sysconfdir}/dbus-1/system.d +%exclude %dir %{_sysconfdir}/dbus-1 +%exclude %dir %{_sysconfdir}/dbus-1/system.d %{_sysconfdir}/xdg/systemd/user -%dir %{_datadir}/dbus-1 -%dir %{_datadir}/dbus-1/services -%dir %{_datadir}/dbus-1/system-services +%exclude %dir %{_datadir}/dbus-1 +%exclude %dir %{_datadir}/dbus-1/services +%exclude %dir %{_datadir}/dbus-1/system-services %config(noreplace) %{_sysconfdir}/systemd/bootchart.conf %config(noreplace) %{_sysconfdir}/systemd/system.conf %config(noreplace) %{_sysconfdir}/systemd/logind.conf From 31a8a62b3057e998259b4ec598389ce92bcdb449b3ffa04bf9e1cd20353cc4dc Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 14 Mar 2014 11:25:48 +0000 Subject: [PATCH 20/22] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=561 --- systemd-mini.spec | 2 ++ systemd.spec | 2 ++ 2 files changed, 4 insertions(+) diff --git a/systemd-mini.spec b/systemd-mini.spec index 69cd07c..15b3982 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -1202,7 +1202,9 @@ exit 0 %{_prefix}/lib/systemd/system-generators/systemd-rc-local-generator %{_prefix}/lib/systemd/system-generators/systemd-fstab-generator %{_prefix}/lib/systemd/system-generators/systemd-system-update-generator +%if ! 0%{?bootstrap} %{_prefix}/lib/systemd/system-generators/systemd-insserv-generator +%endif %{_prefix}/lib/systemd/system-generators/systemd-gpt-auto-generator /%{_lib}/security/pam_systemd.so /etc/pam.d/systemd-user diff --git a/systemd.spec b/systemd.spec index 78afff0..3c3869f 100644 --- a/systemd.spec +++ b/systemd.spec @@ -1197,7 +1197,9 @@ exit 0 %{_prefix}/lib/systemd/system-generators/systemd-rc-local-generator %{_prefix}/lib/systemd/system-generators/systemd-fstab-generator %{_prefix}/lib/systemd/system-generators/systemd-system-update-generator +%if ! 0%{?bootstrap} %{_prefix}/lib/systemd/system-generators/systemd-insserv-generator +%endif %{_prefix}/lib/systemd/system-generators/systemd-gpt-auto-generator /%{_lib}/security/pam_systemd.so /etc/pam.d/systemd-user From ea5dacd8b3cf482cf11e20bf12b74d91d6df941174cf38f038d9aa4fcab5a672 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 14 Mar 2014 11:36:31 +0000 Subject: [PATCH 21/22] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=562 --- systemd-mini.spec | 10 +++++----- systemd.spec | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/systemd-mini.spec b/systemd-mini.spec index 15b3982..0525b79 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -1227,12 +1227,12 @@ exit 0 %dir %{_sysconfdir}/systemd/system %dir %{_sysconfdir}/systemd/user %dir %{_sysconfdir}/xdg/systemd -%exclude %dir %{_sysconfdir}/dbus-1 -%exclude %dir %{_sysconfdir}/dbus-1/system.d +%dir %{_sysconfdir}/dbus-1 +%dir %{_sysconfdir}/dbus-1/system.d %{_sysconfdir}/xdg/systemd/user -%exclude %dir %{_datadir}/dbus-1 -%exclude %dir %{_datadir}/dbus-1/services -%exclude %dir %{_datadir}/dbus-1/system-services +%dir %{_datadir}/dbus-1 +%dir %{_datadir}/dbus-1/services +%dir %{_datadir}/dbus-1/system-services %config(noreplace) %{_sysconfdir}/systemd/bootchart.conf %config(noreplace) %{_sysconfdir}/systemd/system.conf %config(noreplace) %{_sysconfdir}/systemd/logind.conf diff --git a/systemd.spec b/systemd.spec index 3c3869f..a813ce8 100644 --- a/systemd.spec +++ b/systemd.spec @@ -1222,12 +1222,12 @@ exit 0 %dir %{_sysconfdir}/systemd/system %dir %{_sysconfdir}/systemd/user %dir %{_sysconfdir}/xdg/systemd -%exclude %dir %{_sysconfdir}/dbus-1 -%exclude %dir %{_sysconfdir}/dbus-1/system.d +%dir %{_sysconfdir}/dbus-1 +%dir %{_sysconfdir}/dbus-1/system.d %{_sysconfdir}/xdg/systemd/user -%exclude %dir %{_datadir}/dbus-1 -%exclude %dir %{_datadir}/dbus-1/services -%exclude %dir %{_datadir}/dbus-1/system-services +%dir %{_datadir}/dbus-1 +%dir %{_datadir}/dbus-1/services +%dir %{_datadir}/dbus-1/system-services %config(noreplace) %{_sysconfdir}/systemd/bootchart.conf %config(noreplace) %{_sysconfdir}/systemd/system.conf %config(noreplace) %{_sysconfdir}/systemd/logind.conf From cf71eb338c0e38eb81020bb627c955937654e9c7da5b177b44c63bf3ad879768 Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 14 Mar 2014 14:27:16 +0000 Subject: [PATCH 22/22] . OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=563 --- getty-generator-with-serial-3270-tty.patch | 34 ++++++++++++++++++++++ systemd-mini.changes | 28 +++++++++++------- systemd-mini.spec | 3 ++ systemd.changes | 28 +++++++++++------- systemd.spec | 3 ++ 5 files changed, 74 insertions(+), 22 deletions(-) create mode 100644 getty-generator-with-serial-3270-tty.patch diff --git a/getty-generator-with-serial-3270-tty.patch b/getty-generator-with-serial-3270-tty.patch new file mode 100644 index 0000000..41a2e27 --- /dev/null +++ b/getty-generator-with-serial-3270-tty.patch @@ -0,0 +1,34 @@ +The path for the serial 3270 console looks like (dev/)3270/tty1 which +causes trouble in the systemd-getty-generator as the add_symlink() +tries to make directories for each slash even for the slash after +the @ symbol in the final link name. + +--- + getty-generator.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- systemd-210/src/getty-generator/getty-generator.c ++++ systemd-210/src/getty-generator/getty-generator.c 2014-03-14 14:13:09.296463091 +0000 +@@ -67,6 +67,7 @@ static int add_symlink(const char *fserv + + static int add_serial_getty(const char *tty) { + _cleanup_free_ char *n = NULL; ++ char *at; + + assert(tty); + +@@ -76,6 +77,14 @@ static int add_serial_getty(const char * + if (!n) + return log_oom(); + ++ if ((at = strchr(n, '@'))) { ++ char *sl; ++ while (*(++at) && (sl = strchr(at, '/'))) { ++ *sl = '-'; ++ at = sl; ++ } ++ } ++ + return add_symlink("serial-getty@.service", n); + } + diff --git a/systemd-mini.changes b/systemd-mini.changes index 1ab95ff..8028277 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Mar 14 14:24:56 UTC 2014 - werner@suse.de + +- Add patch getty-generator-with-serial-3270-tty.patch to avoid + harmless error messages on not existing getty@3270 files + ------------------------------------------------------------------- Fri Mar 14 11:07:29 UTC 2014 - werner@suse.de @@ -66,6 +72,17 @@ Tue Mar 11 07:47:55 UTC 2014 - werner@suse.de - Make compeletion file parser work (bnc#867664) +------------------------------------------------------------------- +Fri Mar 7 14:50:39 CET 2014 - hare@suse.de + +- Integrate powerd handling in initctl service + + Remove 1016-support-powerfail-with-powerstatus.patch + + Remove systemd-powerfail + + Add systemd-powerd-initctl-support.patch +- Remove 61-msft.rules; superseded by sg3_utils (bnc#866933) +- Persistent by-path links for ATA devices (FATE#317063) + + Update 1001-re-enable-by_path-links-for-ata-devices.patch + ------------------------------------------------------------------- Fri Mar 7 09:25:53 UTC 2014 - werner@suse.de @@ -90,17 +107,6 @@ Fri Mar 7 08:00:31 UTC 2014 - werner@suse.de - Add linker scripts as place holder of the old systemd shared libraries now all included in libsystemd.so (bnc#867128) -------------------------------------------------------------------- -Fri Mar 7 14:50:39 CET 2014 - hare@suse.de - -- Integrate powerd handling in initctl service - + Remove 1016-support-powerfail-with-powerstatus.patch - + Remove systemd-powerfail - + Add systemd-powerd-initctl-support.patch -- Remove 61-msft.rules; superseded by sg3_utils (bnc#866933) -- Persistent by-path links for ATA devices (FATE#317063) - + Update 1001-re-enable-by_path-links-for-ata-devices.patch - ------------------------------------------------------------------- Tue Mar 4 10:37:02 UTC 2014 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 0525b79..c554b30 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -184,6 +184,8 @@ Patch15: timedate-add-support-for-openSUSE-version-of-etc-sysconfig.patch Patch16: fix-support-for-boot-prefixed-initscript-bnc-746506.patch Patch17: restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch Patch18: fix-owner-of-var-log-btmp.patch +# PATCH-FIX-SUSE Avoid error message about not existing getty@3270 file +Patch19: getty-generator-with-serial-3270-tty.patch # PATCH-FIX-OPENSUSE ensure-ask-password-wall-starts-after-getty-tty1.patch -- don't start getty on tty1 until all password request are done Patch5: ensure-ask-password-wall-starts-after-getty-tty1.patch @@ -583,6 +585,7 @@ cp %{SOURCE7} m4/ %patch17 -p1 %endif %patch18 -p1 +%patch19 -p1 %patch20 -p1 %patch21 -p1 %patch22 -p1 diff --git a/systemd.changes b/systemd.changes index 1ab95ff..8028277 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Mar 14 14:24:56 UTC 2014 - werner@suse.de + +- Add patch getty-generator-with-serial-3270-tty.patch to avoid + harmless error messages on not existing getty@3270 files + ------------------------------------------------------------------- Fri Mar 14 11:07:29 UTC 2014 - werner@suse.de @@ -66,6 +72,17 @@ Tue Mar 11 07:47:55 UTC 2014 - werner@suse.de - Make compeletion file parser work (bnc#867664) +------------------------------------------------------------------- +Fri Mar 7 14:50:39 CET 2014 - hare@suse.de + +- Integrate powerd handling in initctl service + + Remove 1016-support-powerfail-with-powerstatus.patch + + Remove systemd-powerfail + + Add systemd-powerd-initctl-support.patch +- Remove 61-msft.rules; superseded by sg3_utils (bnc#866933) +- Persistent by-path links for ATA devices (FATE#317063) + + Update 1001-re-enable-by_path-links-for-ata-devices.patch + ------------------------------------------------------------------- Fri Mar 7 09:25:53 UTC 2014 - werner@suse.de @@ -90,17 +107,6 @@ Fri Mar 7 08:00:31 UTC 2014 - werner@suse.de - Add linker scripts as place holder of the old systemd shared libraries now all included in libsystemd.so (bnc#867128) -------------------------------------------------------------------- -Fri Mar 7 14:50:39 CET 2014 - hare@suse.de - -- Integrate powerd handling in initctl service - + Remove 1016-support-powerfail-with-powerstatus.patch - + Remove systemd-powerfail - + Add systemd-powerd-initctl-support.patch -- Remove 61-msft.rules; superseded by sg3_utils (bnc#866933) -- Persistent by-path links for ATA devices (FATE#317063) - + Update 1001-re-enable-by_path-links-for-ata-devices.patch - ------------------------------------------------------------------- Tue Mar 4 10:37:02 UTC 2014 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index a813ce8..7be75e0 100644 --- a/systemd.spec +++ b/systemd.spec @@ -179,6 +179,8 @@ Patch15: timedate-add-support-for-openSUSE-version-of-etc-sysconfig.patch Patch16: fix-support-for-boot-prefixed-initscript-bnc-746506.patch Patch17: restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch Patch18: fix-owner-of-var-log-btmp.patch +# PATCH-FIX-SUSE Avoid error message about not existing getty@3270 file +Patch19: getty-generator-with-serial-3270-tty.patch # PATCH-FIX-OPENSUSE ensure-ask-password-wall-starts-after-getty-tty1.patch -- don't start getty on tty1 until all password request are done Patch5: ensure-ask-password-wall-starts-after-getty-tty1.patch @@ -578,6 +580,7 @@ cp %{SOURCE7} m4/ %patch17 -p1 %endif %patch18 -p1 +%patch19 -p1 %patch20 -p1 %patch21 -p1 %patch22 -p1