From 44f09bc3adc697f0c349bef49bf7d7e795ab784de6efbbe668b46aaed6b3cb0e Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Fri, 14 Mar 2014 11:10:20 +0000 Subject: [PATCH] . 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 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/1008-add-msft-compability-rules.patch b/1008-add-msft-compability-rules.patch index 473a0f4c..d0117371 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 473a0f4c..00000000 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-big-endian-reply-matching.patch b/systemd-big-endian-reply-matching.patch deleted file mode 100644 index 8759f43f..00000000 --- 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 cd85ff1f..1ab95ff7 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 ed8e8932..69cd07c3 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 473a0f4c..00000000 diff --git a/systemd.changes b/systemd.changes index cd85ff1f..1ab95ff7 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 f3a591aa..78afff09 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