From 74bf6f2e1dec6b607d9c5e8b3be6a26fba4af2418aab731b4bd8bd0ab244c94a Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 18 Mar 2014 15:21:15 +0000 Subject: [PATCH] Accepting request 225960 from Base:System - Add patch getty-generator-with-serial-3270-tty.patch to avoid harmless error messages on not existing getty@3270 files - 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) - 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 - Don't require non-existing binutils-gold - Avoid file conflict between udev and systemd (bnc#868230) - Modify patch module-load-handle-SUSE-etc-sysconfig-kernel-module-list.patch to ignore if /etc/sysconfig/kernel does not exist (bnc#865834) - Add patch systemd-big-endian-reply-matching.patch make sure that systemd can talk with dbus-daemon even on big endian systems (bnc#866732) ----------------------------------------------------------------- - 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. OBS-URL: https://build.opensuse.org/request/show/225960 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=178 --- ...-lookup-string-for-BUSNAME_FAILURE_S.patch | 29 +++ ...k-for-a-64bit-value-when-we-only-hav.patch | 181 ++++++++++++++++++ 0002-make-209-working-on-older-dist.patch | 65 +++++++ ...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 | 66 +++++++ ...ep-modes-are-to-be-separated-by-whit.patch | 36 ++++ ...enable-by_path-links-for-ata-devices.patch | 120 +++++------- 1016-support-powerfail-with-powerstatus.patch | 90 --------- getty-generator-with-serial-3270-tty.patch | 34 ++++ ...linker-find-libudev-for-libdevmapper.patch | 37 ++++ ...USE-etc-sysconfig-kernel-module-list.patch | 4 +- pre_checkin.sh | 12 ++ systemd-dbus-system-bus-address.patch | 24 +++ systemd-mini.changes | 85 ++++++++ systemd-mini.spec | 112 +++++++++-- systemd-powerd-initctl-support.patch | 125 ++++++++++++ systemd-powerfail | 28 --- systemd.changes | 85 ++++++++ systemd.spec | 112 +++++++++-- 23 files changed, 1212 insertions(+), 211 deletions(-) create mode 100644 0001-core-busname-add-lookup-string-for-BUSNAME_FAILURE_S.patch 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 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 delete mode 100644 1016-support-powerfail-with-powerstatus.patch create mode 100644 getty-generator-with-serial-3270-tty.patch create mode 100644 let-linker-find-libudev-for-libdevmapper.patch create mode 100644 systemd-dbus-system-bus-address.patch create mode 100644 systemd-powerd-initctl-support.patch delete mode 100644 systemd-powerfail 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 00000000..b8989aef --- /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/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 00000000..47dbcce3 --- /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 00000000..502c6a44 --- /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/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 00000000..39ca371c --- /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 00000000..37b7bd5c --- /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 00000000..9b718e05 --- /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 00000000..69cf61a6 --- /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 00000000..ce18d6c5 --- /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 00000000..c4051609 --- /dev/null +++ b/0007-dbus-suppress-duplicate-and-misleading-messages.patch @@ -0,0 +1,66 @@ +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 +@@ -1357,8 +1357,11 @@ static int reply_unit_file_changes_and_f + unsigned i; + int r; + +- if (n_changes > 0) +- bus_manager_foreach_client(m, send_unit_files_changed, NULL); ++ if (n_changes > 0) { ++ r = bus_manager_foreach_client(m, 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 + +--- src/core/dbus-manager.c ++++ src/core/dbus-manager.c 2014-03-11 11:05:44.350235568 +0000 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 00000000..b43a43c1 --- /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/1001-re-enable-by_path-links-for-ata-devices.patch b/1001-re-enable-by_path-links-for-ata-devices.patch index 8d9594ad..58bb7b25 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/1016-support-powerfail-with-powerstatus.patch b/1016-support-powerfail-with-powerstatus.patch deleted file mode 100644 index c59f6828..00000000 --- a/1016-support-powerfail-with-powerstatus.patch +++ /dev/null @@ -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/getty-generator-with-serial-3270-tty.patch b/getty-generator-with-serial-3270-tty.patch new file mode 100644 index 00000000..41a2e278 --- /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/let-linker-find-libudev-for-libdevmapper.patch b/let-linker-find-libudev-for-libdevmapper.patch new file mode 100644 index 00000000..e2bbdda1 --- /dev/null +++ b/let-linker-find-libudev-for-libdevmapper.patch @@ -0,0 +1,37 @@ +--- 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 +@@ -156,10 +156,6 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CF + -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 4037a743..4f557c54 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/pre_checkin.sh b/pre_checkin.sh index 18706301..69373260 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-dbus-system-bus-address.patch b/systemd-dbus-system-bus-address.patch new file mode 100644 index 00000000..cede24c9 --- /dev/null +++ b/systemd-dbus-system-bus-address.patch @@ -0,0 +1,24 @@ +--- 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 +--- 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 4ef46a16..80282770 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,88 @@ +------------------------------------------------------------------- +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 + +- 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 + +- 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 + +- 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 systemd-big-endian-reply-matching.patch + make sure that systemd can talk with dbus-daemon even on big + endian systems (bnc#866732) + +----------------------------------------------------------------- +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: + 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 + +- 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 diff --git a/systemd-mini.spec b/systemd-mini.spec index 2d9fb3c2..c554b30a 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -40,10 +40,12 @@ 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: dbus-1 BuildRequires: docbook-xsl-stylesheets %endif BuildRequires: fdupes @@ -72,7 +74,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} @@ -144,12 +145,26 @@ 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 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 @@ -169,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 @@ -204,6 +221,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: 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 @@ -218,6 +237,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 @@ -274,6 +294,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) @@ -282,8 +316,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 @@ -292,11 +324,19 @@ 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 +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 +# 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 @@ -309,7 +349,7 @@ 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 +# PATCH-FIX-OPENSUSE 1008-add-msft-compability-rules.patch -- for code base <= 1310 Patch1008: 1008-add-msft-compability-rules.patch %description @@ -331,6 +371,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. @@ -519,14 +560,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 @@ -536,8 +581,11 @@ cp %{SOURCE7} m4/ %patch14 -p1 %patch15 -p1 %patch16 -p1 +%if ! 0%{?bootstrap} %patch17 -p1 +%endif %patch18 -p1 +%patch19 -p1 %patch20 -p1 %patch21 -p1 %patch22 -p1 @@ -556,14 +604,21 @@ cp %{SOURCE7} m4/ %patch41 -p1 %patch42 -p1 %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 @@ -580,7 +635,9 @@ cp %{SOURCE7} m4/ %patch131 -p0 %patch132 -p0 %patch133 -p0 +%if ! 0%{?bootstrap} %patch134 -p0 +%endif %patch135 -p0 %patch136 -p0 %patch137 -p0 @@ -593,18 +650,34 @@ 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 %patch1014 -p1 -%patch1016 -p1 %patch1018 -p1 %patch1019 -p1 +%if ! 0%{?bootstrap} %patch1020 -p1 +%endif %patch1022 -p1 +%patch1023 -p1 +%if ! 0%{?bootstrap} %patch1999 -p1 +%endif +%patch2000 -p1 +%if ! 0%{?bootstrap} +%patch2001 -p1 +%endif # udev patches %patch1034 -p0 +%patch1035 -p0 %patch1001 -p1 %patch1002 -p1 %patch1003 -p1 @@ -613,14 +686,20 @@ cp %{SOURCE7} m4/ # don't apply when bootstrapping to not modify Makefile.am %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 @@ -628,6 +707,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 \ @@ -658,6 +741,7 @@ export V=1 %if %{without networkd} --disable-networkd \ %endif + --disable-kdbus \ CFLAGS="%{optflags}" make %{?_smp_mflags} @@ -803,11 +887,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 @@ -826,7 +906,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 @@ -1077,6 +1157,7 @@ exit 0 %dir %{_prefix}/lib/systemd/system %exclude %{_prefix}/lib/systemd/system/systemd-udev*.* %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 @@ -1124,7 +1205,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 @@ -1147,7 +1230,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-powerd-initctl-support.patch b/systemd-powerd-initctl-support.patch new file mode 100644 index 00000000..bc0e3ca4 --- /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 deleted file mode 100644 index 797fb7d2..00000000 --- a/systemd-powerfail +++ /dev/null @@ -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 4ef46a16..80282770 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,88 @@ +------------------------------------------------------------------- +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 + +- 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 + +- 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 + +- 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 systemd-big-endian-reply-matching.patch + make sure that systemd can talk with dbus-daemon even on big + endian systems (bnc#866732) + +----------------------------------------------------------------- +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: + 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 + +- 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 diff --git a/systemd.spec b/systemd.spec index 4340cc00..7be75e0f 100644 --- a/systemd.spec +++ b/systemd.spec @@ -35,10 +35,12 @@ 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: dbus-1 BuildRequires: docbook-xsl-stylesheets %endif BuildRequires: fdupes @@ -67,7 +69,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} @@ -139,12 +140,26 @@ 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 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 @@ -164,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 @@ -199,6 +216,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: 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 @@ -213,6 +232,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 @@ -269,6 +289,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) @@ -277,8 +311,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 @@ -287,11 +319,19 @@ 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 +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 +# 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 @@ -304,7 +344,7 @@ 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 +# PATCH-FIX-OPENSUSE 1008-add-msft-compability-rules.patch -- for code base <= 1310 Patch1008: 1008-add-msft-compability-rules.patch %description @@ -326,6 +366,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. @@ -514,14 +555,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 @@ -531,8 +576,11 @@ cp %{SOURCE7} m4/ %patch14 -p1 %patch15 -p1 %patch16 -p1 +%if ! 0%{?bootstrap} %patch17 -p1 +%endif %patch18 -p1 +%patch19 -p1 %patch20 -p1 %patch21 -p1 %patch22 -p1 @@ -551,14 +599,21 @@ cp %{SOURCE7} m4/ %patch41 -p1 %patch42 -p1 %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 @@ -575,7 +630,9 @@ cp %{SOURCE7} m4/ %patch131 -p0 %patch132 -p0 %patch133 -p0 +%if ! 0%{?bootstrap} %patch134 -p0 +%endif %patch135 -p0 %patch136 -p0 %patch137 -p0 @@ -588,18 +645,34 @@ 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 %patch1014 -p1 -%patch1016 -p1 %patch1018 -p1 %patch1019 -p1 +%if ! 0%{?bootstrap} %patch1020 -p1 +%endif %patch1022 -p1 +%patch1023 -p1 +%if ! 0%{?bootstrap} %patch1999 -p1 +%endif +%patch2000 -p1 +%if ! 0%{?bootstrap} +%patch2001 -p1 +%endif # udev patches %patch1034 -p0 +%patch1035 -p0 %patch1001 -p1 %patch1002 -p1 %patch1003 -p1 @@ -608,14 +681,20 @@ cp %{SOURCE7} m4/ # don't apply when bootstrapping to not modify Makefile.am %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 @@ -623,6 +702,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 \ @@ -653,6 +736,7 @@ export V=1 %if %{without networkd} --disable-networkd \ %endif + --disable-kdbus \ CFLAGS="%{optflags}" make %{?_smp_mflags} @@ -798,11 +882,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 @@ -821,7 +901,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 @@ -1072,6 +1152,7 @@ exit 0 %dir %{_prefix}/lib/systemd/system %exclude %{_prefix}/lib/systemd/system/systemd-udev*.* %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 @@ -1119,7 +1200,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 @@ -1142,7 +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 %{_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