diff --git a/0001-core-exclude-.slice-units-from-systemctl-isolate.patch b/0001-core-exclude-.slice-units-from-systemctl-isolate.patch index 62717048..c954427f 100644 --- a/0001-core-exclude-.slice-units-from-systemctl-isolate.patch +++ b/0001-core-exclude-.slice-units-from-systemctl-isolate.patch @@ -11,8 +11,8 @@ Fixes: #1969 diff --git src/core/scope.c src/core/scope.c index c5d0ece..361695c 100644 ---- src/core/scope.c -+++ src/core/scope.c +--- a/src/core/scope.c ++++ b/src/core/scope.c @@ -50,8 +50,7 @@ static void scope_init(Unit *u) { assert(u->load_state == UNIT_STUB); @@ -25,8 +25,8 @@ index c5d0ece..361695c 100644 static void scope_done(Unit *u) { diff --git src/core/slice.c src/core/slice.c index d65364c..667f61b 100644 ---- src/core/slice.c -+++ src/core/slice.c +--- a/src/core/slice.c ++++ b/src/core/slice.c @@ -34,6 +34,13 @@ static const UnitActiveState state_translation_table[_SLICE_STATE_MAX] = { [SLICE_ACTIVE] = UNIT_ACTIVE }; diff --git a/0001-core-fix-bus-name-synchronization-after-daemon-reloa.patch b/0001-core-fix-bus-name-synchronization-after-daemon-reloa.patch new file mode 100644 index 00000000..b1a18d36 --- /dev/null +++ b/0001-core-fix-bus-name-synchronization-after-daemon-reloa.patch @@ -0,0 +1,193 @@ +From d8ccf5fdc91c46ab5d0ae86e38c206bc508d4188 Mon Sep 17 00:00:00 2001 [> v228] +From: Daniel Mack +Date: Fri, 18 Dec 2015 17:28:15 +0100 +Subject: [PATCH] core: fix bus name synchronization after daemon-reload + +During daemon-reload, PID1 temporarly loses its DBus connection, so there's +a small window in which all signals sent by dbus-daemon are lost. + +This is a problem, since we rely on the NameOwnerChanged signals in order to +consider a service with Type=dbus fully started or terminated, respectively. + +In order to fix this, a rewrite of bus_list_names() is necessary. We used +to walk the current list of names on the bus, and blindly triggered the +bus_name_owner_change() callback on each service, providing the actual name +as current owner. This implementation has a number of problems: + +* We cannot detect if the the name was moved from one owner to the other + while we were reloading + +* We don't notify services which missed the name loss signal + +* Providing the actual name as current owner is a hack, as the comment also + admits. + +To fix this, this patch carries the following changes: + +* Track the name of the current bus name owner, and (de-)serialize it + during reload. This way, we can detect changes. + +* In bus_list_names(), walk the list of bus names we're interested in + first, and then see if the name is active on the bus. If it is, + check it it's still the same as it used to be, and synthesize + NameOwnerChanged signals for the name add and/or loss. + +This should fully synchronize the current name list with the internal +state of all services. +--- + src/core/dbus.c | 64 +++++++++++++++++++++++++++++++++++++++++++++--------- + src/core/service.c | 14 ++++++++++++ + src/core/service.h | 1 + + 3 files changed, 69 insertions(+), 10 deletions(-) + +diff --git a/src/core/dbus.c b/src/core/dbus.c +index e7ee216..58069f5 100644 +--- a/src/core/dbus.c ++++ b/src/core/dbus.c +@@ -736,7 +736,9 @@ static int bus_on_connection(sd_event_source *s, int fd, uint32_t revents, void + + static int bus_list_names(Manager *m, sd_bus *bus) { + _cleanup_strv_free_ char **names = NULL; +- char **i; ++ const char *name; ++ Iterator i; ++ Unit *u; + int r; + + assert(m); +@@ -746,15 +748,55 @@ static int bus_list_names(Manager *m, sd_bus *bus) { + if (r < 0) + return log_error_errno(r, "Failed to get initial list of names: %m"); + +- /* This is a bit hacky, we say the owner of the name is the +- * name itself, because we don't want the extra traffic to +- * figure out the real owner. */ +- STRV_FOREACH(i, names) { +- Unit *u; ++ /* We have to synchronize the current bus names with the ++ * list of active services. To do this, walk the list of ++ * all units with bus names. */ ++ HASHMAP_FOREACH_KEY(u, name, m->watch_bus, i) { ++ Service *s = SERVICE(u); ++ ++ assert(s); + +- u = hashmap_get(m->watch_bus, *i); +- if (u) +- UNIT_VTABLE(u)->bus_name_owner_change(u, *i, NULL, *i); ++ if (!streq_ptr(s->bus_name, name)) { ++ log_unit_warning(u, "Bus name has changed from %s → %s, ignoring.", s->bus_name, name); ++ continue; ++ } ++ ++ /* Check if a service's bus name is in the list of currently ++ * active names */ ++ if (strv_contains(names, name)) { ++ _cleanup_(sd_bus_creds_unrefp) sd_bus_creds *creds = NULL; ++ const char *unique; ++ ++ /* If it is, determine its current owner */ ++ r = sd_bus_get_name_creds(bus, name, SD_BUS_CREDS_UNIQUE_NAME, &creds); ++ if (r < 0) { ++ log_error_errno(r, "Failed to get bus name owner %s: %m", name); ++ continue; ++ } ++ ++ r = sd_bus_creds_get_unique_name(creds, &unique); ++ if (r < 0) { ++ log_error_errno(r, "Failed to get unique name for %s: %m", name); ++ continue; ++ } ++ ++ /* Now, let's compare that to the previous bus owner, and ++ * if it's still the same, all is fine, so just don't ++ * bother the service. Otherwise, the name has apparently ++ * changed, so synthesize a name owner changed signal. */ ++ ++ if (!streq_ptr(unique, s->bus_name_owner)) ++ UNIT_VTABLE(u)->bus_name_owner_change(u, name, s->bus_name_owner, unique); ++ } else { ++ /* So, the name we're watching is not on the bus. ++ * This either means it simply hasn't appeared yet, ++ * or it was lost during the daemon reload. ++ * Check if the service has a stored name owner, ++ * and synthesize a name loss signal in this case. */ ++ ++ if (s->bus_name_owner) ++ UNIT_VTABLE(u)->bus_name_owner_change(u, name, s->bus_name_owner, NULL); ++ } + } + + return 0; +@@ -808,7 +850,9 @@ static int bus_setup_api(Manager *m, sd_bus *bus) { + if (r < 0) + return log_error_errno(r, "Failed to register name: %m"); + +- bus_list_names(m, bus); ++ r = bus_list_names(m, bus); ++ if (r < 0) ++ return r; + + log_debug("Successfully connected to API bus."); + return 0; +diff --git a/src/core/service.c b/src/core/service.c +index 41a729c..c5b689a 100644 +--- a/src/core/service.c ++++ b/src/core/service.c +@@ -323,6 +323,8 @@ static void service_done(Unit *u) { + s->bus_name = mfree(s->bus_name); + } + ++ s->bus_name_owner = mfree(s->bus_name_owner); ++ + s->bus_endpoint_fd = safe_close(s->bus_endpoint_fd); + service_close_socket_fd(s); + service_connection_unref(s); +@@ -2122,6 +2124,7 @@ static int service_serialize(Unit *u, FILE *f, FDSet *fds) { + + unit_serialize_item(u, f, "main-pid-known", yes_no(s->main_pid_known)); + unit_serialize_item(u, f, "bus-name-good", yes_no(s->bus_name_good)); ++ unit_serialize_item(u, f, "bus-name-owner", s->bus_name_owner); + + r = unit_serialize_item_escaped(u, f, "status-text", s->status_text); + if (r < 0) +@@ -2249,6 +2252,10 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value, + log_unit_debug(u, "Failed to parse bus-name-good value: %s", value); + else + s->bus_name_good = b; ++ } else if (streq(key, "bus-name-owner")) { ++ r = free_and_strdup(&s->bus_name_owner, value); ++ if (r < 0) ++ log_unit_error_errno(u, r, "Unable to deserialize current bus owner %s: %m", value); + } else if (streq(key, "status-text")) { + char *t; + +@@ -3134,6 +3141,13 @@ static void service_bus_name_owner_change( + + s->bus_name_good = !!new_owner; + ++ /* Track the current owner, so we can reconstruct changes after a daemon reload */ ++ r = free_and_strdup(&s->bus_name_owner, new_owner); ++ if (r < 0) { ++ log_unit_error_errno(u, r, "Unable to set new bus name owner %s: %m", new_owner); ++ return; ++ } ++ + if (s->type == SERVICE_DBUS) { + + /* service_enter_running() will figure out what to +diff --git a/src/core/service.h b/src/core/service.h +index d0faad8..19efbcc 100644 +--- a/src/core/service.h ++++ b/src/core/service.h +@@ -172,6 +172,7 @@ struct Service { + bool reset_cpu_usage:1; + + char *bus_name; ++ char *bus_name_owner; /* unique name of the current owner */ + + char *status_text; + int status_errno; +-- +2.6.2 + diff --git a/0001-core-re-sync-bus-name-list-after-deserializing-durin.patch b/0001-core-re-sync-bus-name-list-after-deserializing-durin.patch new file mode 100644 index 00000000..11b6a99f --- /dev/null +++ b/0001-core-re-sync-bus-name-list-after-deserializing-durin.patch @@ -0,0 +1,74 @@ +From 8936a5e34dbfa9274348f3fef99f7c9f9327ddf9 Mon Sep 17 00:00:00 2001 [> v228] +From: Daniel Mack +Date: Tue, 22 Dec 2015 11:37:09 +0100 +Subject: [PATCH] core: re-sync bus name list after deserializing during + daemon-reload + +When the daemon reloads, it doesn not actually give up its DBus connection, +as wrongly stated in an earlier commit. However, even though the bus +connection stays open, the daemon flushes out all its internal state. + +Hence, if there is a NameOwnerChanged signal after the flush and before the +deserialization, it cannot be matched against any pending unit. + +To fix this, rename bus_list_names() to manager_sync_bus_names() and call +it explicitly at the end of the daemon reload operation. +--- + src/core/dbus.c | 4 ++-- + src/core/dbus.h | 2 ++ + src/core/manager.c | 4 ++++ + 3 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/src/core/dbus.c b/src/core/dbus.c +index 58069f5..1d89b9e 100644 +--- a/src/core/dbus.c ++++ b/src/core/dbus.c +@@ -734,7 +734,7 @@ static int bus_on_connection(sd_event_source *s, int fd, uint32_t revents, void + return 0; + } + +-static int bus_list_names(Manager *m, sd_bus *bus) { ++int manager_sync_bus_names(Manager *m, sd_bus *bus) { + _cleanup_strv_free_ char **names = NULL; + const char *name; + Iterator i; +@@ -850,7 +850,7 @@ static int bus_setup_api(Manager *m, sd_bus *bus) { + if (r < 0) + return log_error_errno(r, "Failed to register name: %m"); + +- r = bus_list_names(m, bus); ++ r = manager_sync_bus_names(m, bus); + if (r < 0) + return r; + +diff --git a/src/core/dbus.h b/src/core/dbus.h +index 4f06ad1..ff76166 100644 +--- a/src/core/dbus.h ++++ b/src/core/dbus.h +@@ -34,6 +34,8 @@ void bus_track_serialize(sd_bus_track *t, FILE *f); + int bus_track_deserialize_item(char ***l, const char *line); + int bus_track_coldplug(Manager *m, sd_bus_track **t, char ***l); + ++int manager_sync_bus_names(Manager *m, sd_bus *bus); ++ + int bus_foreach_bus(Manager *m, sd_bus_track *subscribed2, int (*send_message)(sd_bus *bus, void *userdata), void *userdata); + + int bus_verify_manage_units_async(Manager *m, sd_bus_message *call, sd_bus_error *error); +diff --git a/src/core/manager.c b/src/core/manager.c +index e65616a..ffe27be 100644 +--- a/src/core/manager.c ++++ b/src/core/manager.c +@@ -2574,6 +2574,10 @@ int manager_reload(Manager *m) { + /* Third, fire things up! */ + manager_coldplug(m); + ++ /* Sync current state of bus names with our set of listening units */ ++ if (m->api_bus) ++ manager_sync_bus_names(m, m->api_bus); ++ + assert(m->n_reloading > 0); + m->n_reloading--; + +-- +2.6.2 + diff --git a/handle-numlock-value-in-etc-sysconfig-keyboard.patch b/handle-numlock-value-in-etc-sysconfig-keyboard.patch index 18fd4f61..e3d7c312 100644 --- a/handle-numlock-value-in-etc-sysconfig-keyboard.patch +++ b/handle-numlock-value-in-etc-sysconfig-keyboard.patch @@ -134,7 +134,7 @@ Index: systemd-228/src/vconsole/vconsole-setup.c "COMPOSETABLE", &vc_compose_table, NULL); if (r < 0 && r != -ENOENT) -@@ -421,6 +428,32 @@ int main(int argc, char **argv) { +@@ -421,6 +428,35 @@ int main(int argc, char **argv) { disable_capslock = vc_kbd_disable_caps_lock && strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0; @@ -146,28 +146,31 @@ Index: systemd-228/src/vconsole/vconsole-setup.c + + fdmem = open ("/dev/mem", O_RDONLY); + if (fdmem < 0) { -+ log_error("Failed to open /dev/mem: %m"); -+ return EXIT_FAILURE; ++ log_warning_errno(errno, "Failed to open /dev/mem: %m"); ++ goto finish; + } + + if (lseek(fdmem, BIOS_DATA_AREA + BDA_KEYBOARD_STATUS_FLAGS_4, SEEK_SET) == (off_t) -1) { -+ log_error("Failed to seek /dev/mem: %m"); -+ return EXIT_FAILURE; ++ log_warning_errno(errno, "Failed to seek /dev/mem: %m"); ++ goto finish; + } + + if (read(fdmem, &c, sizeof(char)) == -1) { -+ log_error("Failed to read /dev/mem: %m"); -+ return EXIT_FAILURE; ++ log_warning_errno(errno, "Failed to read /dev/mem: %m"); ++ goto finish; + } + + if (c & BDA_KSF4_NUMLOCK_MASK) + numlock = true; ++ finish: ++ if (fdmem >= 0) ++ close(fdmem); + } +#endif /* x86 */ #endif /* HAVE_SYSV_COMPAT */ r = parse_env_file("/etc/vconsole.conf", NEWLINE, -@@ -456,6 +489,10 @@ int main(int argc, char **argv) { +@@ -456,6 +492,10 @@ int main(int argc, char **argv) { font_ok = font_load_and_wait(vc, vc_font, vc_font_map, vc_font_unimap) > 0; keyboard_ok = keyboard_load_and_wait(vc, vc_keymap, vc_keymap_toggle, utf8, disable_capslock) > 0; diff --git a/let-vconsole-setup-get-properties-only-once-to-copy-them.patch b/let-vconsole-setup-get-properties-only-once-to-copy-them.patch index b106fc22..22c45e4d 100644 --- a/let-vconsole-setup-get-properties-only-once-to-copy-them.patch +++ b/let-vconsole-setup-get-properties-only-once-to-copy-them.patch @@ -9,8 +9,8 @@ for the virtual consoles (boo#904214) src/vconsole/vconsole-setup.c | 39 +++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) ---- src/vconsole/vconsole-setup.c -+++ src/vconsole/vconsole-setup.c 2015-09-23 12:34:33.854018750 +0000 +--- a/src/vconsole/vconsole-setup.c ++++ b/src/vconsole/vconsole-setup.c 2015-09-23 12:34:33.854018750 +0000 @@ -202,8 +202,13 @@ static void font_copy_to_all_vcs(int fd) unsigned short map16[E_TABSZ]; struct unimapdesc unimapd; diff --git a/systemd-228-nspawn-make-journal-linking-non-fatal-in-try-and-auto.diff b/systemd-228-nspawn-make-journal-linking-non-fatal-in-try-and-auto.diff new file mode 100644 index 00000000..17a09a8a --- /dev/null +++ b/systemd-228-nspawn-make-journal-linking-non-fatal-in-try-and-auto.diff @@ -0,0 +1,116 @@ +From 84d816c48b57b43e833e2917bbd278c116816fcf Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Thu, 28 Jan 2016 20:15:49 +0100 +Subject: [PATCH] nspawn: make journal linking non-fatal in try and auto modes + +Fixes #2091 +--- + src/nspawn/nspawn.c | 39 ++++++++++++++++++++------------------- + 1 file changed, 20 insertions(+), 19 deletions(-) + +diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c +index f6a2c03..97ea51a 100644 +--- a/src/nspawn/nspawn.c ++++ b/src/nspawn/nspawn.c +@@ -1338,6 +1338,7 @@ static int setup_journal(const char *directory) { + sd_id128_t machine_id, this_id; + _cleanup_free_ char *b = NULL, *d = NULL; + const char *etc_machine_id, *p, *q; ++ bool try; + char *id; + int r; + +@@ -1345,16 +1346,21 @@ static int setup_journal(const char *directory) { + if (arg_ephemeral) + return 0; + ++ if (arg_link_journal == LINK_NO) ++ return 0; ++ ++ try = arg_link_journal_try || arg_link_journal == LINK_AUTO; ++ + etc_machine_id = prefix_roota(directory, "/etc/machine-id"); + + r = read_one_line_file(etc_machine_id, &b); +- if (r == -ENOENT && arg_link_journal == LINK_AUTO) ++ if (r == -ENOENT && try) + return 0; + else if (r < 0) + return log_error_errno(r, "Failed to read machine ID from %s: %m", etc_machine_id); + + id = strstrip(b); +- if (isempty(id) && arg_link_journal == LINK_AUTO) ++ if (isempty(id) && try) + return 0; + + /* Verify validity */ +@@ -1367,16 +1373,13 @@ static int setup_journal(const char *directory) { + return log_error_errno(r, "Failed to retrieve machine ID: %m"); + + if (sd_id128_equal(machine_id, this_id)) { +- log_full(arg_link_journal == LINK_AUTO ? LOG_WARNING : LOG_ERR, ++ log_full(try ? LOG_WARNING : LOG_ERR, + "Host and machine ids are equal (%s): refusing to link journals", id); +- if (arg_link_journal == LINK_AUTO) ++ if (try) + return 0; + return -EEXIST; + } + +- if (arg_link_journal == LINK_NO) +- return 0; +- + r = userns_mkdir(directory, "/var", 0755, 0, 0); + if (r < 0) + return log_error_errno(r, "Failed to create /var: %m"); +@@ -1393,21 +1396,19 @@ static int setup_journal(const char *directory) { + q = prefix_roota(directory, p); + + if (path_is_mount_point(p, 0) > 0) { +- if (arg_link_journal != LINK_AUTO) { +- log_error("%s: already a mount point, refusing to use for journal", p); +- return -EEXIST; +- } ++ if (try) ++ return 0; + +- return 0; ++ log_error("%s: already a mount point, refusing to use for journal", p); ++ return -EEXIST; + } + + if (path_is_mount_point(q, 0) > 0) { +- if (arg_link_journal != LINK_AUTO) { +- log_error("%s: already a mount point, refusing to use for journal", q); +- return -EEXIST; +- } ++ if (try) ++ return 0; + +- return 0; ++ log_error("%s: already a mount point, refusing to use for journal", q); ++ return -EEXIST; + } + + r = readlink_and_make_absolute(p, &d); +@@ -1441,7 +1442,7 @@ static int setup_journal(const char *directory) { + if (arg_link_journal == LINK_GUEST) { + + if (symlink(q, p) < 0) { +- if (arg_link_journal_try) { ++ if (try) { + log_debug_errno(errno, "Failed to symlink %s to %s, skipping journal setup: %m", q, p); + return 0; + } else +@@ -1459,7 +1460,7 @@ static int setup_journal(const char *directory) { + * permanent journal set up, don't force it here */ + r = mkdir(p, 0755); + if (r < 0) { +- if (arg_link_journal_try) { ++ if (try) { + log_debug_errno(errno, "Failed to create %s, skipping journal setup: %m", p); + return 0; + } else +-- +2.7.0 + diff --git a/systemd-mini.changes b/systemd-mini.changes index 85ab0ea5..b1a32521 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,46 @@ +------------------------------------------------------------------- +Sat Mar 26 15:59:36 UTC 2016 - jengelh@inai.de + +- Add two patches which address logind/networkd disappearing from + dbus (and busctl) even while the units and processes continue + running. + 0001-core-fix-bus-name-synchronization-after-daemon-reloa.patch + 0001-core-re-sync-bus-name-list-after-deserializing-durin.patch + +------------------------------------------------------------------- +Mon Mar 14 18:04:10 UTC 2016 - fbui@suse.com + +- drop all compiler/linker option customizations: + - -pipe option is used by default since day 0 + - get rid of cflags() function which is not needed + - --hash-size has no impact specially in runtime + + IOW, use the default options for the compiler and the linker, + there's no point in making systemd different from other package in + this regards. + +------------------------------------------------------------------- +Mon Mar 14 17:26:00 UTC 2016 - fbui@suse.com + +- use %make_build instead of 'make %{?_smp_mflags}' + +------------------------------------------------------------------- +Mon Mar 14 16:36:32 UTC 2016 - fbui@suse.com + +- be more strict on own lib version requirements + +------------------------------------------------------------------- +Mon Mar 14 16:11:49 UTC 2016 - fbui@suse.com + +- systemd should require udev with the exact same version + +------------------------------------------------------------------- +Thu Mar 10 08:01:57 UTC 2016 - werner@suse.de + +- Modify patch handle-numlock-value-in-etc-sysconfig-keyboard.patch + to allow that open, seek, and read of /dev/mem may fail e.g. + on XEN based virtual guests (bsc#961120) + ------------------------------------------------------------------- Tue Mar 1 09:16:08 UTC 2016 - werner@suse.de @@ -6,6 +49,20 @@ Tue Mar 1 09:16:08 UTC 2016 - werner@suse.de this fixes forced logouts on isolate target aka changing runlevel (boo#966535) +------------------------------------------------------------------- +Thu Feb 4 11:05:37 UTC 2016 - lnussel@suse.de + +- require curl and bzip2 to build importd +- curl also causes building of journal-upload. That one has rather + unusal certificate usage, set it's ca root to /etc/pki/systemd + instead of the built-in default /etc/ssl as journal-remote and + journal-upload think they kan put stuff in /etc/ssl/certs then but + that directory is managed by p11-kit and doesn't serve the purpose + those programs think. +- /var/lib/systemd/random-seed is a file +- own /var/lib/machines +- add systemd-228-nspawn-make-journal-linking-non-fatal-in-try-and-auto.diff + ------------------------------------------------------------------- Sat Jan 9 22:46:21 UTC 2016 - afaerber@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 04091633..f6b00696 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -92,6 +92,9 @@ Conflicts: kiwi BuildRequires: docbook-xsl-stylesheets BuildRequires: libgcrypt-devel BuildRequires: libxslt-tools +# curl and bzip2 are required for building importd +BuildRequires: pkgconfig(bzip2) +BuildRequires: pkgconfig(libcurl) %if %{with python} BuildRequires: python %endif @@ -102,7 +105,7 @@ BuildRequires: pkgconfig(libqrencode) BuildRequires: pkgconfig(usbutils) >= 0.82 # the buildignore is important for bootstrapping #!BuildIgnore: udev -Requires: udev >= 172 +Requires: udev = %{version}-%{release} Recommends: %{name}-bash-completion Requires: dbus-1 >= 1.4.0 Requires: kbd @@ -250,6 +253,12 @@ Patch523: let-vconsole-setup-get-properties-only-once-to-copy-them.patch Patch524: 0001-nss-mymachines-do-not-allow-overlong-machine-names.patch # PATCH-FIX-UPSTREAM (bsc#966535) Patch525: 0001-core-exclude-.slice-units-from-systemctl-isolate.patch +# PATCH-FIX-UPSTREAM -- fixed after 228 +Patch526: systemd-228-nspawn-make-journal-linking-non-fatal-in-try-and-auto.diff +# PATCH-FIX-UPSTREAM -- fixed after 228 +Patch527: 0001-core-fix-bus-name-synchronization-after-daemon-reloa.patch +# PATCH-FIX-UPSTREAM -- fixed after 228 +Patch528: 0001-core-re-sync-bus-name-list-after-deserializing-durin.patch # UDEV PATCHES # ============ @@ -324,7 +333,7 @@ Some systemd commands offer bash completion, but it's an optional dependency. Summary: Development headers for systemd License: LGPL-2.1+ Group: Development/Libraries/C and C++ -Requires: libsystemd0%{?mini} = %version +Requires: libsystemd0%{?mini} = %{version}-%{release} Requires: systemd-rpm-macros %if 0%{?bootstrap} Provides: systemd-devel = %version-%release @@ -338,7 +347,7 @@ Development headers and auxiliary files for developing applications for systemd. Summary: System V init tools License: LGPL-2.1+ Group: System/Base -Requires: %{name} = %{version} +Requires: %{name} = %{version}-%{release} Provides: sbin_init Conflicts: otherproviders(sbin_init) Provides: sysvinit:/sbin/init @@ -588,9 +597,12 @@ cp %{SOURCE7} m4/ %patch520 -p1 %patch521 -p1 %patch522 -p1 -%patch523 -p0 +%patch523 -p1 %patch524 -p1 -%patch525 -p0 +%patch525 -p1 +%patch526 -p1 +%patch527 -p1 +%patch528 -p1 # udev patches %patch1002 -p1 @@ -623,38 +635,6 @@ sed -ri 's:#TTYPath=/dev/console:#TTYPath=/dev/tty10:' src/journal/journald.conf %endif %build -cflags () -{ - local flag=$1; shift - local var=$1; shift - local gold - test -n "${flag}" -a -n "${var}" || return - case "${!var}" in - *${flag}*) return - esac - if type ld.gold > /dev/null 2>&1 ; then - gold=-Wl,-fuse-ld=gold - fi - set -o noclobber - case "$flag" in - -Wl,*) - if echo 'int main () { return 0; }' | \ - ${CC:-gcc} -Werror $gold $flag -o /dev/null -xc - > /dev/null 2>&1 ; then - eval $var=\${$var:+\$$var\ }$flag - fi - rm -f ldtest.c - ;; - *) - if ${CC:-gcc} -Werror $gold $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then - eval $var=\${$var:+\$$var\ }$flag - fi - if ${CXX:-g++} -Werror $gold $flag -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1 ; then - eval $var=\${$var:+\$$var\ }$flag - fi - esac - set +o noclobber -} - # # Be sure that fresh build libudev is linked as otherwise no errors are found # @@ -666,17 +646,19 @@ systemd_cryptsetup_LDFLAGS = \\\ }' Makefile.am sh autogen.sh -export V=e export CFLAGS="%{optflags}" -export LDFLAGS %if 0%{?suse_version} == 1315 CFLAGS="$CFLAGS -DNET_IFNAMES=1" %else CFLAGS="$CFLAGS -DNET_IFNAMES=0" %endif -cflags -pipe CFLAGS -cflags -Wl,-O2 LDFLAGS -cflags -Wl,--hash-size=8599 LDFLAGS + +# certificate-root is set to /etc/pki/systemd instead of the +# built-in default /etc/ssl as journal-remote and journal-upload +# think they kan put stuff in /etc/ssl/certs then but that +# directory is managed by p11-kit and doesn't serve the purpose +# those programs think +# # keep split-usr until all packages have moved their systemd rules to /usr %configure \ --with-ntp-servers="0.opensuse.pool.ntp.org 1.opensuse.pool.ntp.org 2.opensuse.pool.ntp.org 3.opensuse.pool.ntp.org" \ @@ -686,10 +668,12 @@ cflags -Wl,--hash-size=8599 LDFLAGS --with-dbussessionservicedir=%{_datadir}/dbus-1/services \ --with-dbussystemservicedir=%{_datadir}/dbus-1/system-services \ --with-dbusinterfacedir=%{_datadir}/dbus-1/interfaces \ + --with-certificate-root=/etc/pki/systemd \ %if 0%{?bootstrap} --disable-myhostname \ --disable-manpages \ --disable-machined \ + --disable-importd \ %else --enable-manpages \ %if %{with python} @@ -716,9 +700,10 @@ cflags -Wl,--hash-size=8599 LDFLAGS --disable-resolved \ %endif --disable-kdbus -make %{?_smp_mflags} + +%make_build V=e %if ! 0%{?bootstrap} -make %{?_smp_mflags} update-man-list man +%make_build V=e update-man-list man %endif %install @@ -847,7 +832,10 @@ install -m 644 %{S:11} %{buildroot}/%{_prefix}/lib/systemd/system/ ln -s ../after-local.service %{buildroot}/%{_prefix}/lib/systemd/system/multi-user.target.wants/ mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/backlight -mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/random-seed +> %{buildroot}%{_localstatedir}/lib/systemd/random-seed + +# machined +mkdir -p %{buildroot}%{_localstatedir}/lib/machines %fdupes -s %{buildroot}%{_mandir} @@ -1309,6 +1297,7 @@ exit 0 %config(noreplace) %{_sysconfdir}/systemd/coredump.conf %if !0%{?bootstrap} %config(noreplace) %{_sysconfdir}/systemd/journal-remote.conf +%config(noreplace) %{_sysconfdir}/systemd/journal-upload.conf %endif %config(noreplace) %{_sysconfdir}/systemd/timesyncd.conf %config(noreplace) %{_sysconfdir}/systemd/system.conf @@ -1415,6 +1404,7 @@ exit 0 %{_datadir}/zsh/site-functions/* %ghost %{_localstatedir}/lib/systemd/backlight %ghost %{_localstatedir}/lib/systemd/random-seed +%dir %{_localstatedir}/lib/machines %if %{with resolved} %{_sysconfdir}/dbus-1/system.d/org.freedesktop.resolve1.conf %{_sysconfdir}/systemd/resolved.conf @@ -1422,6 +1412,13 @@ exit 0 %{_datadir}/dbus-1/system-services/org.freedesktop.resolve1.service %{_prefix}/lib/systemd/system/org.freedesktop.resolve1.busname %endif +%if ! 0%{?bootstrap} +%{_sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf +%{_prefix}/lib/systemd/import-pubring.gpg +%{_prefix}/lib/systemd/system/org.freedesktop.import1.busname +%{_datadir}/dbus-1/system-services/org.freedesktop.import1.service +%{_datadir}/polkit-1/actions/org.freedesktop.import1.policy +%endif %if ! 0%{?bootstrap} %files bash-completion -f files.completion diff --git a/systemd.changes b/systemd.changes index 85ab0ea5..b1a32521 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,46 @@ +------------------------------------------------------------------- +Sat Mar 26 15:59:36 UTC 2016 - jengelh@inai.de + +- Add two patches which address logind/networkd disappearing from + dbus (and busctl) even while the units and processes continue + running. + 0001-core-fix-bus-name-synchronization-after-daemon-reloa.patch + 0001-core-re-sync-bus-name-list-after-deserializing-durin.patch + +------------------------------------------------------------------- +Mon Mar 14 18:04:10 UTC 2016 - fbui@suse.com + +- drop all compiler/linker option customizations: + - -pipe option is used by default since day 0 + - get rid of cflags() function which is not needed + - --hash-size has no impact specially in runtime + + IOW, use the default options for the compiler and the linker, + there's no point in making systemd different from other package in + this regards. + +------------------------------------------------------------------- +Mon Mar 14 17:26:00 UTC 2016 - fbui@suse.com + +- use %make_build instead of 'make %{?_smp_mflags}' + +------------------------------------------------------------------- +Mon Mar 14 16:36:32 UTC 2016 - fbui@suse.com + +- be more strict on own lib version requirements + +------------------------------------------------------------------- +Mon Mar 14 16:11:49 UTC 2016 - fbui@suse.com + +- systemd should require udev with the exact same version + +------------------------------------------------------------------- +Thu Mar 10 08:01:57 UTC 2016 - werner@suse.de + +- Modify patch handle-numlock-value-in-etc-sysconfig-keyboard.patch + to allow that open, seek, and read of /dev/mem may fail e.g. + on XEN based virtual guests (bsc#961120) + ------------------------------------------------------------------- Tue Mar 1 09:16:08 UTC 2016 - werner@suse.de @@ -6,6 +49,20 @@ Tue Mar 1 09:16:08 UTC 2016 - werner@suse.de this fixes forced logouts on isolate target aka changing runlevel (boo#966535) +------------------------------------------------------------------- +Thu Feb 4 11:05:37 UTC 2016 - lnussel@suse.de + +- require curl and bzip2 to build importd +- curl also causes building of journal-upload. That one has rather + unusal certificate usage, set it's ca root to /etc/pki/systemd + instead of the built-in default /etc/ssl as journal-remote and + journal-upload think they kan put stuff in /etc/ssl/certs then but + that directory is managed by p11-kit and doesn't serve the purpose + those programs think. +- /var/lib/systemd/random-seed is a file +- own /var/lib/machines +- add systemd-228-nspawn-make-journal-linking-non-fatal-in-try-and-auto.diff + ------------------------------------------------------------------- Sat Jan 9 22:46:21 UTC 2016 - afaerber@suse.de diff --git a/systemd.spec b/systemd.spec index 37cb1be1..c2162ef0 100644 --- a/systemd.spec +++ b/systemd.spec @@ -87,6 +87,9 @@ Conflicts: kiwi BuildRequires: docbook-xsl-stylesheets BuildRequires: libgcrypt-devel BuildRequires: libxslt-tools +# curl and bzip2 are required for building importd +BuildRequires: pkgconfig(bzip2) +BuildRequires: pkgconfig(libcurl) %if %{with python} BuildRequires: python %endif @@ -97,7 +100,7 @@ BuildRequires: pkgconfig(libqrencode) BuildRequires: pkgconfig(usbutils) >= 0.82 # the buildignore is important for bootstrapping #!BuildIgnore: udev -Requires: udev >= 172 +Requires: udev = %{version}-%{release} Recommends: %{name}-bash-completion Requires: dbus-1 >= 1.4.0 Requires: kbd @@ -245,6 +248,12 @@ Patch523: let-vconsole-setup-get-properties-only-once-to-copy-them.patch Patch524: 0001-nss-mymachines-do-not-allow-overlong-machine-names.patch # PATCH-FIX-UPSTREAM (bsc#966535) Patch525: 0001-core-exclude-.slice-units-from-systemctl-isolate.patch +# PATCH-FIX-UPSTREAM -- fixed after 228 +Patch526: systemd-228-nspawn-make-journal-linking-non-fatal-in-try-and-auto.diff +# PATCH-FIX-UPSTREAM -- fixed after 228 +Patch527: 0001-core-fix-bus-name-synchronization-after-daemon-reloa.patch +# PATCH-FIX-UPSTREAM -- fixed after 228 +Patch528: 0001-core-re-sync-bus-name-list-after-deserializing-durin.patch # UDEV PATCHES # ============ @@ -319,7 +328,7 @@ Some systemd commands offer bash completion, but it's an optional dependency. Summary: Development headers for systemd License: LGPL-2.1+ Group: Development/Libraries/C and C++ -Requires: libsystemd0%{?mini} = %version +Requires: libsystemd0%{?mini} = %{version}-%{release} Requires: systemd-rpm-macros %if 0%{?bootstrap} Provides: systemd-devel = %version-%release @@ -333,7 +342,7 @@ Development headers and auxiliary files for developing applications for systemd. Summary: System V init tools License: LGPL-2.1+ Group: System/Base -Requires: %{name} = %{version} +Requires: %{name} = %{version}-%{release} Provides: sbin_init Conflicts: otherproviders(sbin_init) Provides: sysvinit:/sbin/init @@ -583,9 +592,12 @@ cp %{SOURCE7} m4/ %patch520 -p1 %patch521 -p1 %patch522 -p1 -%patch523 -p0 +%patch523 -p1 %patch524 -p1 -%patch525 -p0 +%patch525 -p1 +%patch526 -p1 +%patch527 -p1 +%patch528 -p1 # udev patches %patch1002 -p1 @@ -618,38 +630,6 @@ sed -ri 's:#TTYPath=/dev/console:#TTYPath=/dev/tty10:' src/journal/journald.conf %endif %build -cflags () -{ - local flag=$1; shift - local var=$1; shift - local gold - test -n "${flag}" -a -n "${var}" || return - case "${!var}" in - *${flag}*) return - esac - if type ld.gold > /dev/null 2>&1 ; then - gold=-Wl,-fuse-ld=gold - fi - set -o noclobber - case "$flag" in - -Wl,*) - if echo 'int main () { return 0; }' | \ - ${CC:-gcc} -Werror $gold $flag -o /dev/null -xc - > /dev/null 2>&1 ; then - eval $var=\${$var:+\$$var\ }$flag - fi - rm -f ldtest.c - ;; - *) - if ${CC:-gcc} -Werror $gold $flag -S -o /dev/null -xc /dev/null > /dev/null 2>&1 ; then - eval $var=\${$var:+\$$var\ }$flag - fi - if ${CXX:-g++} -Werror $gold $flag -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1 ; then - eval $var=\${$var:+\$$var\ }$flag - fi - esac - set +o noclobber -} - # # Be sure that fresh build libudev is linked as otherwise no errors are found # @@ -661,17 +641,19 @@ systemd_cryptsetup_LDFLAGS = \\\ }' Makefile.am sh autogen.sh -export V=e export CFLAGS="%{optflags}" -export LDFLAGS %if 0%{?suse_version} == 1315 CFLAGS="$CFLAGS -DNET_IFNAMES=1" %else CFLAGS="$CFLAGS -DNET_IFNAMES=0" %endif -cflags -pipe CFLAGS -cflags -Wl,-O2 LDFLAGS -cflags -Wl,--hash-size=8599 LDFLAGS + +# certificate-root is set to /etc/pki/systemd instead of the +# built-in default /etc/ssl as journal-remote and journal-upload +# think they kan put stuff in /etc/ssl/certs then but that +# directory is managed by p11-kit and doesn't serve the purpose +# those programs think +# # keep split-usr until all packages have moved their systemd rules to /usr %configure \ --with-ntp-servers="0.opensuse.pool.ntp.org 1.opensuse.pool.ntp.org 2.opensuse.pool.ntp.org 3.opensuse.pool.ntp.org" \ @@ -681,10 +663,12 @@ cflags -Wl,--hash-size=8599 LDFLAGS --with-dbussessionservicedir=%{_datadir}/dbus-1/services \ --with-dbussystemservicedir=%{_datadir}/dbus-1/system-services \ --with-dbusinterfacedir=%{_datadir}/dbus-1/interfaces \ + --with-certificate-root=/etc/pki/systemd \ %if 0%{?bootstrap} --disable-myhostname \ --disable-manpages \ --disable-machined \ + --disable-importd \ %else --enable-manpages \ %if %{with python} @@ -711,9 +695,10 @@ cflags -Wl,--hash-size=8599 LDFLAGS --disable-resolved \ %endif --disable-kdbus -make %{?_smp_mflags} + +%make_build V=e %if ! 0%{?bootstrap} -make %{?_smp_mflags} update-man-list man +%make_build V=e update-man-list man %endif %install @@ -842,7 +827,10 @@ install -m 644 %{S:11} %{buildroot}/%{_prefix}/lib/systemd/system/ ln -s ../after-local.service %{buildroot}/%{_prefix}/lib/systemd/system/multi-user.target.wants/ mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/backlight -mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/random-seed +> %{buildroot}%{_localstatedir}/lib/systemd/random-seed + +# machined +mkdir -p %{buildroot}%{_localstatedir}/lib/machines %fdupes -s %{buildroot}%{_mandir} @@ -1304,6 +1292,7 @@ exit 0 %config(noreplace) %{_sysconfdir}/systemd/coredump.conf %if !0%{?bootstrap} %config(noreplace) %{_sysconfdir}/systemd/journal-remote.conf +%config(noreplace) %{_sysconfdir}/systemd/journal-upload.conf %endif %config(noreplace) %{_sysconfdir}/systemd/timesyncd.conf %config(noreplace) %{_sysconfdir}/systemd/system.conf @@ -1410,6 +1399,7 @@ exit 0 %{_datadir}/zsh/site-functions/* %ghost %{_localstatedir}/lib/systemd/backlight %ghost %{_localstatedir}/lib/systemd/random-seed +%dir %{_localstatedir}/lib/machines %if %{with resolved} %{_sysconfdir}/dbus-1/system.d/org.freedesktop.resolve1.conf %{_sysconfdir}/systemd/resolved.conf @@ -1417,6 +1407,13 @@ exit 0 %{_datadir}/dbus-1/system-services/org.freedesktop.resolve1.service %{_prefix}/lib/systemd/system/org.freedesktop.resolve1.busname %endif +%if ! 0%{?bootstrap} +%{_sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf +%{_prefix}/lib/systemd/import-pubring.gpg +%{_prefix}/lib/systemd/system/org.freedesktop.import1.busname +%{_datadir}/dbus-1/system-services/org.freedesktop.import1.service +%{_datadir}/polkit-1/actions/org.freedesktop.import1.policy +%endif %if ! 0%{?bootstrap} %files bash-completion -f files.completion