From c83da77762ab229af2704f0edf420790dc07804fc1c7d01e87730589023fc96b Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 3 Feb 2016 09:19:12 +0000 Subject: [PATCH 1/4] Accepting request 353460 from Base:System 1 OBS-URL: https://build.opensuse.org/request/show/353460 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=228 --- ...unt-units-pulled-by-RequiresMountsFo.patch | 49 ------ ...s390_con3270_disable_ANSI_colour_esc.patch | 131 +++++----------- ...sh-for-reboot-or-hddown-for-poweroff.patch | 38 ++--- ...network-device-after-NFS-mount-units.patch | 57 +++---- 0001-bnc888612-logind-polkit-acpi.patch | 30 ++-- ...-do-not-allow-overlong-machine-names.patch | 37 +++++ ...ting-for-unit-termination-in-certain.patch | 140 ------------------ 0014-journald-with-journaling-FS.patch | 33 +++-- ...pletion-smart-to-be-able-to-redirect.patch | 90 +++++------ ...enable-by_path-links-for-ata-devices.patch | 99 ------------- ...-increase-maximum-number-of-children.patch | 14 +- ...s-for-valve-steam-controller-to-work.patch | 34 +++++ Correct_assert_on_unexpected_error_code.patch | 10 +- avoid-divide-by-zero-sigtrap.patch | 22 +-- ...plock-and-compose_table-and-kbd_rate.patch | 28 ++-- ...lock-value-in-etc-sysconfig-keyboard.patch | 56 ++++--- ...lang-value-in-etc-sysconfig-language.patch | 24 +-- insserv-generator.patch | 27 ++-- macros.systemd.upstream | 12 +- ...f-ARM-based-Chromebook-as-a-power-sw.patch | 18 --- set-and-use-default-logconsole.patch | 65 ++++---- suse-sysv-bootd-support.diff | 33 ++--- systemd-add-user-keep.patch | 36 ++--- systemd-mini.changes | 72 +++++++++ systemd-mini.spec | 71 +++++---- systemd-pam_config.patch | 34 +++-- systemd-sysv-install | 2 +- systemd-tmp-safe-defaults.patch | 16 +- systemd.changes | 78 ++++++++++ systemd.spec | 76 ++++++---- tty-ask-password-agent-on-console.patch | 73 +++++---- ...addentropy-ioctl-to-load-random-seed.patch | 35 +++-- v224.tar.gz | 3 - v228.tar.gz | 3 + watch_resolv.conf_for_become_changed.patch | 34 ++--- 35 files changed, 739 insertions(+), 841 deletions(-) delete mode 100644 0001-Make-sure-the-mount-units-pulled-by-RequiresMountsFo.patch create mode 100644 0001-nss-mymachines-do-not-allow-overlong-machine-names.patch delete mode 100644 0002-units-enable-waiting-for-unit-termination-in-certain.patch delete mode 100644 1001-re-enable-by_path-links-for-ata-devices.patch create mode 100644 1099-Add-default-rules-for-valve-steam-controller-to-work.patch delete mode 100644 rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch delete mode 100644 v224.tar.gz create mode 100644 v228.tar.gz diff --git a/0001-Make-sure-the-mount-units-pulled-by-RequiresMountsFo.patch b/0001-Make-sure-the-mount-units-pulled-by-RequiresMountsFo.patch deleted file mode 100644 index 5161b8ca..00000000 --- a/0001-Make-sure-the-mount-units-pulled-by-RequiresMountsFo.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 6a102f90a2ee50e43998d64819e8bd4ee241c22b Mon Sep 17 00:00:00 2001 -From: Franck Bui -Date: Thu, 8 Oct 2015 19:06:06 +0200 -Subject: [PATCH 1/2] Make sure the mount units pulled by 'RequiresMountsFor=' - are loaded (if they exist) - -We should make sure that mount units involved by 'RequiresMountsFor=' -directives are really loaded if not required by any others units so -that Requires= dependencies on the mount units are applied and thus -the mount unit dependencies are started. - -(cherry picked from commit 9b3757e9c8c8d6e161481193c4ef60e425a9ae41) ---- - src/core/unit.c | 14 ++++++++++++-- - 1 file changed, 12 insertions(+), 2 deletions(-) - -diff --git a/src/core/unit.c b/src/core/unit.c -index dd5e801..dc7bc5a 100644 ---- a/src/core/unit.c -+++ b/src/core/unit.c -@@ -1141,13 +1141,23 @@ static int unit_add_mount_dependencies(Unit *u) { - char prefix[strlen(*i) + 1]; - - PATH_FOREACH_PREFIX_MORE(prefix, *i) { -+ _cleanup_free_ char *p = NULL; - Unit *m; - -- r = manager_get_unit_by_path(u->manager, prefix, ".mount", &m); -+ r = unit_name_from_path(prefix, ".mount", &p); - if (r < 0) - return r; -- if (r == 0) -+ -+ m = manager_get_unit(u->manager, p); -+ if (!m) { -+ /* Make sure to load the mount unit if -+ * it exists. If so the dependencies -+ * on this unit will be added later -+ * during the loading of the mount -+ * unit. */ -+ (void) manager_load_unit_prepare(u->manager, p, NULL, NULL, &m); - continue; -+ } - if (m == u) - continue; - --- -2.6.0 - diff --git a/0001-On_s390_con3270_disable_ANSI_colour_esc.patch b/0001-On_s390_con3270_disable_ANSI_colour_esc.patch index 9756786c..3dd400a3 100644 --- a/0001-On_s390_con3270_disable_ANSI_colour_esc.patch +++ b/0001-On_s390_con3270_disable_ANSI_colour_esc.patch @@ -1,15 +1,15 @@ --- - rules/99-systemd.rules.in | 2 - src/basic/terminal-util.c | 99 ++++++++++++++++++++++++++++++++++++++++++++-- + rules/99-systemd.rules.in | 2 - + src/basic/terminal-util.c | 55 ++++++++++++++++++++++++++++++++++++++++++++-- src/basic/terminal-util.h | 1 - src/core/manager.c | 24 ++++++++--- - 4 files changed, 116 insertions(+), 10 deletions(-) + src/core/manager.c | 24 +++++++++++++++----- + 4 files changed, 74 insertions(+), 8 deletions(-) -Index: systemd-221/rules/99-systemd.rules.in +Index: systemd-228/rules/99-systemd.rules.in =================================================================== ---- systemd-221.orig/rules/99-systemd.rules.in -+++ systemd-221/rules/99-systemd.rules.in +--- systemd-228.orig/rules/99-systemd.rules.in ++++ systemd-228/rules/99-systemd.rules.in @@ -7,7 +7,7 @@ ACTION=="remove", GOTO="systemd_end" @@ -19,76 +19,11 @@ Index: systemd-221/rules/99-systemd.rules.in KERNEL=="vport*", TAG+="systemd" SUBSYSTEM=="block", TAG+="systemd" -Index: systemd-221/src/basic/terminal-util.c +Index: systemd-228/src/basic/terminal-util.c =================================================================== ---- systemd-221.orig/src/basic/terminal-util.c -+++ systemd-221/src/basic/terminal-util.c -@@ -647,6 +647,7 @@ int status_vprintf(const char *status, b - struct iovec iovec[6] = {}; - int n = 0; - static bool prev_ephemeral; -+ static int is_ansi_console = -1; - - assert(format); - -@@ -660,6 +661,41 @@ int status_vprintf(const char *status, b - if (fd < 0) - return fd; - -+ if (_unlikely_(is_ansi_console < 0)) -+ is_ansi_console = ansi_console(fd); -+ -+ if (status && !is_ansi_console) { -+ const char *esc, *ptr; -+ esc = strchr(status, 0x1B); -+ if (esc && (ptr = strpbrk(esc, "SOFDTI*"))) { -+ switch(*ptr) { -+ case 'S': -+ status = " SKIP "; -+ break; -+ case 'O': -+ status = " OK "; -+ break; -+ case 'F': -+ status = "FAILED"; -+ break; -+ case 'D': -+ status = "DEPEND"; -+ break; -+ case 'T': -+ status = " TIME "; -+ break; -+ case 'I': -+ status = " INFO "; -+ break; -+ case '*': -+ status = " BUSY "; -+ break; -+ default: -+ break; -+ } -+ } -+ } -+ - if (ellipse) { - char *e; - size_t emax, sl; -@@ -682,8 +718,12 @@ int status_vprintf(const char *status, b - } - } - -- if (prev_ephemeral) -- IOVEC_SET_STRING(iovec[n++], "\r" ANSI_ERASE_TO_END_OF_LINE); -+ if (prev_ephemeral) { -+ if (is_ansi_console) -+ IOVEC_SET_STRING(iovec[n++], "\r" ANSI_ERASE_TO_END_OF_LINE); -+ else -+ IOVEC_SET_STRING(iovec[n++], "\r"); -+ } - prev_ephemeral = ephemeral; - - if (status) { -@@ -807,10 +847,47 @@ bool tty_is_vc_resolve(const char *tty) +--- systemd-228.orig/src/basic/terminal-util.c ++++ systemd-228/src/basic/terminal-util.c +@@ -717,10 +717,47 @@ bool tty_is_vc_resolve(const char *tty) return tty_is_vc(tty); } @@ -137,7 +72,7 @@ Index: systemd-221/src/basic/terminal-util.c } int fd_columns(int fd) { -@@ -890,8 +967,22 @@ void columns_lines_cache_reset(int signu +@@ -800,8 +837,22 @@ void columns_lines_cache_reset(int signu bool on_tty(void) { static int cached_on_tty = -1; @@ -161,59 +96,59 @@ Index: systemd-221/src/basic/terminal-util.c return cached_on_tty; } -Index: systemd-221/src/basic/terminal-util.h +Index: systemd-228/src/basic/terminal-util.h =================================================================== ---- systemd-221.orig/src/basic/terminal-util.h -+++ systemd-221/src/basic/terminal-util.h -@@ -77,6 +77,7 @@ unsigned lines(void); +--- systemd-228.orig/src/basic/terminal-util.h ++++ systemd-228/src/basic/terminal-util.h +@@ -78,6 +78,7 @@ unsigned lines(void); void columns_lines_cache_reset(int _unused_ signum); bool on_tty(void); +bool ansi_console(int fd); - static inline const char *ansi_highlight(void) { - return on_tty() ? ANSI_HIGHLIGHT_ON : ""; -Index: systemd-221/src/core/manager.c + static inline const char *ansi_underline(void) { + return on_tty() ? ANSI_UNDERLINE : ""; +Index: systemd-228/src/core/manager.c =================================================================== ---- systemd-221.orig/src/core/manager.c -+++ systemd-221/src/core/manager.c -@@ -113,7 +113,7 @@ static void manager_watch_jobs_in_progre +--- systemd-228.orig/src/core/manager.c ++++ systemd-228/src/core/manager.c +@@ -126,7 +126,7 @@ static void manager_watch_jobs_in_progre - #define CYLON_BUFFER_EXTRA (2*(sizeof(ANSI_RED_ON)-1) + sizeof(ANSI_HIGHLIGHT_RED_ON)-1 + 2*(sizeof(ANSI_HIGHLIGHT_OFF)-1)) + #define CYLON_BUFFER_EXTRA (2*(sizeof(ANSI_RED)-1) + sizeof(ANSI_HIGHLIGHT_RED)-1 + 2*(sizeof(ANSI_NORMAL)-1)) -static void draw_cylon(char buffer[], size_t buflen, unsigned width, unsigned pos) { +static void draw_cylon(char buffer[], size_t buflen, unsigned width, unsigned pos, bool ansi_console) { char *p = buffer; assert(buflen >= CYLON_BUFFER_EXTRA + width + 1); -@@ -122,12 +122,14 @@ static void draw_cylon(char buffer[], si +@@ -135,12 +135,14 @@ static void draw_cylon(char buffer[], si if (pos > 1) { if (pos > 2) p = mempset(p, ' ', pos-2); -- p = stpcpy(p, ANSI_RED_ON); +- p = stpcpy(p, ANSI_RED); + if (ansi_console) -+ p = stpcpy(p, ANSI_RED_ON); ++ p = stpcpy(p, ANSI_RED); *p++ = '*'; } if (pos > 0 && pos <= width) { -- p = stpcpy(p, ANSI_HIGHLIGHT_RED_ON); +- p = stpcpy(p, ANSI_HIGHLIGHT_RED); + if (ansi_console) -+ p = stpcpy(p, ANSI_HIGHLIGHT_RED_ON); ++ p = stpcpy(p, ANSI_HIGHLIGHT_RED); *p++ = '*'; } -@@ -138,7 +140,8 @@ static void draw_cylon(char buffer[], si +@@ -151,7 +153,8 @@ static void draw_cylon(char buffer[], si *p++ = '*'; if (pos < width-1) p = mempset(p, ' ', width-1-pos); -- strcpy(p, ANSI_HIGHLIGHT_OFF); +- strcpy(p, ANSI_NORMAL); + if (ansi_console) -+ strcpy(p, ANSI_HIGHLIGHT_OFF); ++ strcpy(p, ANSI_NORMAL); } } -@@ -155,6 +158,7 @@ void manager_flip_auto_status(Manager *m +@@ -168,6 +171,7 @@ void manager_flip_auto_status(Manager *m } static void manager_print_jobs_in_progress(Manager *m) { @@ -221,7 +156,7 @@ Index: systemd-221/src/core/manager.c _cleanup_free_ char *job_of_n = NULL; Iterator i; Job *j; -@@ -180,10 +184,20 @@ static void manager_print_jobs_in_progre +@@ -193,10 +197,20 @@ static void manager_print_jobs_in_progre assert(counter == print_nr + 1); assert(j); diff --git a/0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch b/0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch index ea7eeafa..f370239f 100644 --- a/0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch +++ b/0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch @@ -3,11 +3,11 @@ src/systemctl/systemctl.c | 18 ++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) -Index: systemd-221/src/core/shutdown.c +Index: systemd-227/src/core/shutdown.c =================================================================== ---- systemd-221.orig/src/core/shutdown.c -+++ systemd-221/src/core/shutdown.c -@@ -396,6 +396,10 @@ int main(int argc, char *argv[]) { +--- systemd-227.orig/src/core/shutdown.c ++++ systemd-227/src/core/shutdown.c +@@ -418,6 +418,10 @@ int main(int argc, char *argv[]) { } reboot(cmd); @@ -18,11 +18,11 @@ Index: systemd-221/src/core/shutdown.c if (errno == EPERM && in_container) { /* If we are in a container, and we lacked * CAP_SYS_BOOT just exit, this will kill our -Index: systemd-221/src/systemctl/systemctl.c +Index: systemd-227/src/systemctl/systemctl.c =================================================================== ---- systemd-221.orig/src/systemctl/systemctl.c -+++ systemd-221/src/systemctl/systemctl.c -@@ -93,6 +93,7 @@ static bool arg_no_pager = false; +--- systemd-227.orig/src/systemctl/systemctl.c ++++ systemd-227/src/systemctl/systemctl.c +@@ -94,6 +94,7 @@ static bool arg_no_pager = false; static bool arg_no_wtmp = false; static bool arg_no_wall = false; static bool arg_no_reload = false; @@ -30,7 +30,7 @@ Index: systemd-221/src/systemctl/systemctl.c static bool arg_show_types = false; static bool arg_ignore_inhibitors = false; static bool arg_dry = false; -@@ -6636,6 +6637,7 @@ static int halt_parse_argv(int argc, cha +@@ -6938,6 +6939,7 @@ static int halt_parse_argv(int argc, cha { "reboot", no_argument, NULL, ARG_REBOOT }, { "force", no_argument, NULL, 'f' }, { "wtmp-only", no_argument, NULL, 'w' }, @@ -38,7 +38,7 @@ Index: systemd-221/src/systemctl/systemctl.c { "no-wtmp", no_argument, NULL, 'd' }, { "no-wall", no_argument, NULL, ARG_NO_WALL }, {} -@@ -6688,10 +6690,13 @@ static int halt_parse_argv(int argc, cha +@@ -6990,10 +6992,13 @@ static int halt_parse_argv(int argc, cha case 'i': case 'h': @@ -53,32 +53,32 @@ Index: systemd-221/src/systemctl/systemctl.c case '?': return -EINVAL; -@@ -7291,7 +7296,8 @@ static int halt_now(enum action a) { +@@ -7506,7 +7511,8 @@ static int halt_now(enum action a) { /* The kernel will automaticall flush ATA disks and suchlike * on reboot(), but the file systems need to be synce'd * explicitly in advance. */ -- sync(); +- (void) sync(); + if (!arg_no_sync) -+ sync(); ++ (void) sync(); /* Make sure C-A-D is handled by the kernel from this point * on... */ -@@ -7299,14 +7305,14 @@ static int halt_now(enum action a) { +@@ -7514,14 +7520,13 @@ static int halt_now(enum action a) { switch (a) { - case ACTION_HALT: - log_info("Halting."); -- reboot(RB_HALT_SYSTEM); +- (void) reboot(RB_HALT_SYSTEM); - return -errno; - +- case ACTION_POWEROFF: log_info("Powering off."); - reboot(RB_POWER_OFF); + (void) reboot(RB_POWER_OFF); + /* fall-through */ + case ACTION_HALT: + log_info("Halting."); -+ reboot(RB_HALT_SYSTEM); ++ (void) reboot(RB_HALT_SYSTEM); return -errno; - case ACTION_REBOOT: { + case ACTION_KEXEC: diff --git a/0001-add-network-device-after-NFS-mount-units.patch b/0001-add-network-device-after-NFS-mount-units.patch index 955314ff..dc30e64f 100644 --- a/0001-add-network-device-after-NFS-mount-units.patch +++ b/0001-add-network-device-after-NFS-mount-units.patch @@ -5,17 +5,16 @@ NFS share is added as "After=" dependency to the .mount. --- Makefile.am | 2 - src/basic/util.c | 1 src/core/mount-iface.c | 173 +++++++++++++++++++++++++++++++++++++++++++++++++ src/core/mount-iface.h | 25 +++++++ src/core/mount.c | 35 +++++++++ - 5 files changed, 234 insertions(+), 2 deletions(-) + 4 files changed, 233 insertions(+), 2 deletions(-) -Index: systemd-221/Makefile.am +Index: systemd-228/Makefile.am =================================================================== ---- systemd-221.orig/Makefile.am -+++ systemd-221/Makefile.am -@@ -1164,6 +1164,8 @@ libcore_la_SOURCES = \ +--- systemd-228.orig/Makefile.am ++++ systemd-228/Makefile.am +@@ -1223,6 +1223,8 @@ libcore_la_SOURCES = \ src/core/machine-id-setup.h \ src/core/mount-setup.c \ src/core/mount-setup.h \ @@ -24,22 +23,10 @@ Index: systemd-221/Makefile.am src/core/kmod-setup.c \ src/core/kmod-setup.h \ src/core/loopback-setup.h \ -Index: systemd-221/src/basic/util.c -=================================================================== ---- systemd-221.orig/src/basic/util.c -+++ systemd-221/src/basic/util.c -@@ -1478,6 +1478,7 @@ bool fstype_is_network(const char *fstyp - "ncp\0" - "nfs\0" - "nfs4\0" -+ "afs\0" - "gfs\0" - "gfs2\0" - "glusterfs\0"; -Index: systemd-221/src/core/mount-iface.c +Index: systemd-228/src/core/mount-iface.c =================================================================== --- /dev/null -+++ systemd-221/src/core/mount-iface.c ++++ systemd-228/src/core/mount-iface.c @@ -0,0 +1,173 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + @@ -214,10 +201,10 @@ Index: systemd-221/src/core/mount-iface.c + freeifaddrs(ifa_list); + ifa_list = NULL; +} -Index: systemd-221/src/core/mount-iface.h +Index: systemd-228/src/core/mount-iface.h =================================================================== --- /dev/null -+++ systemd-221/src/core/mount-iface.h ++++ systemd-228/src/core/mount-iface.h @@ -0,0 +1,25 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + @@ -244,19 +231,19 @@ Index: systemd-221/src/core/mount-iface.h + +char *host2iface(const char *ip); +void freeroutes(void); -Index: systemd-221/src/core/mount.c +Index: systemd-228/src/core/mount.c =================================================================== ---- systemd-221.orig/src/core/mount.c -+++ systemd-221/src/core/mount.c -@@ -35,6 +35,7 @@ +--- systemd-228.orig/src/core/mount.c ++++ systemd-228/src/core/mount.c +@@ -36,6 +36,7 @@ + #include "manager.h" #include "mkdir.h" - #include "path-util.h" #include "mount-setup.h" +#include "mount-iface.h" - #include "unit-name.h" - #include "dbus-mount.h" - #include "special.h" -@@ -1332,8 +1333,9 @@ static int mount_setup_unit( + #include "mount-util.h" + #include "mount.h" + #include "parse-util.h" +@@ -1344,8 +1345,9 @@ static int mount_setup_unit( _cleanup_free_ char *e = NULL, *w = NULL, *o = NULL, *f = NULL; bool load_extras = false; MountParameters *p; @@ -267,7 +254,7 @@ Index: systemd-221/src/core/mount.c int r; assert(m); -@@ -1358,6 +1360,8 @@ static int mount_setup_unit( +@@ -1370,6 +1372,8 @@ static int mount_setup_unit( if (r < 0) return r; @@ -276,7 +263,7 @@ Index: systemd-221/src/core/mount.c u = manager_get_unit(m, e); if (!u) { delete = true; -@@ -1385,7 +1389,7 @@ static int mount_setup_unit( +@@ -1397,7 +1401,7 @@ static int mount_setup_unit( if (m->running_as == MANAGER_SYSTEM) { const char* target; @@ -285,7 +272,7 @@ Index: systemd-221/src/core/mount.c r = unit_add_dependency_by_name(u, UNIT_BEFORE, target, NULL, true); if (r < 0) goto fail; -@@ -1471,6 +1475,32 @@ static int mount_setup_unit( +@@ -1483,6 +1487,32 @@ static int mount_setup_unit( goto fail; } @@ -318,7 +305,7 @@ Index: systemd-221/src/core/mount.c if (changed) unit_add_to_dbus_queue(u); -@@ -1537,6 +1567,7 @@ static int mount_load_proc_self_mountinf +@@ -1549,6 +1579,7 @@ static int mount_load_proc_self_mountinf if (r == 0 && k < 0) r = k; } diff --git a/0001-bnc888612-logind-polkit-acpi.patch b/0001-bnc888612-logind-polkit-acpi.patch index 505e1791..8729f452 100644 --- a/0001-bnc888612-logind-polkit-acpi.patch +++ b/0001-bnc888612-logind-polkit-acpi.patch @@ -3,10 +3,10 @@ src/login/logind-dbus.c | 31 +++++++++++++++++++++++-------- 2 files changed, 28 insertions(+), 8 deletions(-) -Index: systemd-221/src/login/logind-action.c +Index: systemd-227/src/login/logind-action.c =================================================================== ---- systemd-221.orig/src/login/logind-action.c -+++ systemd-221/src/login/logind-action.c +--- systemd-227.orig/src/login/logind-action.c ++++ systemd-227/src/login/logind-action.c @@ -85,6 +85,11 @@ int manager_handle_action( /* If the key handling is inhibited, don't do anything */ @@ -19,11 +19,11 @@ Index: systemd-221/src/login/logind-action.c if (manager_is_inhibited(m, inhibit_key, INHIBIT_BLOCK, NULL, true, false, 0, NULL)) { log_debug("Refusing operation, %s is inhibited.", inhibit_what_to_string(inhibit_key)); return 0; -Index: systemd-221/src/login/logind-dbus.c +Index: systemd-227/src/login/logind-dbus.c =================================================================== ---- systemd-221.orig/src/login/logind-dbus.c -+++ systemd-221/src/login/logind-dbus.c -@@ -1625,12 +1625,13 @@ static int verify_shutdown_creds( +--- systemd-227.orig/src/login/logind-dbus.c ++++ systemd-227/src/login/logind-dbus.c +@@ -1646,12 +1646,13 @@ static int verify_shutdown_creds( const char *action, const char *action_multiple_sessions, const char *action_ignore_inhibit, @@ -40,7 +40,7 @@ Index: systemd-221/src/login/logind-dbus.c assert(m); assert(message); -@@ -1652,7 +1653,19 @@ static int verify_shutdown_creds( +@@ -1673,7 +1674,19 @@ static int verify_shutdown_creds( multiple_sessions = r > 0; blocked = manager_is_inhibited(m, w, INHIBIT_BLOCK, NULL, false, true, uid, NULL); @@ -58,29 +58,29 @@ Index: systemd-221/src/login/logind-dbus.c + + if (multiple_sessions && action_multiple_sessions && + !shutdown_through_acpi) { - r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_multiple_sessions, interactive, UID_INVALID, &m->polkit_registry, error); + r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_multiple_sessions, NULL, interactive, UID_INVALID, &m->polkit_registry, error); if (r < 0) return r; -@@ -1660,7 +1673,7 @@ static int verify_shutdown_creds( +@@ -1681,7 +1694,7 @@ static int verify_shutdown_creds( return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */ } - if (blocked && action_ignore_inhibit) { + if (blocked && action_ignore_inhibit && !shutdown_through_acpi) { - r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_ignore_inhibit, interactive, UID_INVALID, &m->polkit_registry, error); + r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_ignore_inhibit, NULL, interactive, UID_INVALID, &m->polkit_registry, error); if (r < 0) return r; -@@ -1668,7 +1681,8 @@ static int verify_shutdown_creds( +@@ -1689,7 +1702,8 @@ static int verify_shutdown_creds( return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */ } - if (!multiple_sessions && !blocked && action) { + if (!multiple_sessions && !blocked && action && + !shutdown_through_acpi) { - r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action, interactive, UID_INVALID, &m->polkit_registry, error); + r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action, NULL, interactive, UID_INVALID, &m->polkit_registry, error); if (r < 0) return r; -@@ -1716,7 +1730,7 @@ static int method_do_shutdown_or_sleep( +@@ -1737,7 +1751,7 @@ static int method_do_shutdown_or_sleep( } r = verify_shutdown_creds(m, message, w, interactive, action, action_multiple_sessions, @@ -89,7 +89,7 @@ Index: systemd-221/src/login/logind-dbus.c if (r != 0) return r; -@@ -1896,7 +1910,8 @@ static int method_schedule_shutdown(sd_b +@@ -1931,7 +1945,8 @@ static int method_schedule_shutdown(sd_b return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Unsupported shutdown type"); r = verify_shutdown_creds(m, message, INHIBIT_SHUTDOWN, false, diff --git a/0001-nss-mymachines-do-not-allow-overlong-machine-names.patch b/0001-nss-mymachines-do-not-allow-overlong-machine-names.patch new file mode 100644 index 00000000..f6af8080 --- /dev/null +++ b/0001-nss-mymachines-do-not-allow-overlong-machine-names.patch @@ -0,0 +1,37 @@ +From cb31827d62066a04b02111df3052949fda4b6888 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Mon, 23 Nov 2015 13:59:43 -0500 +Subject: [PATCH] nss-mymachines: do not allow overlong machine names + +https://github.com/systemd/systemd/issues/2002 +--- + src/nss-mymachines/nss-mymachines.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c +index 969fa96..c98a959 100644 +--- a/src/nss-mymachines/nss-mymachines.c ++++ b/src/nss-mymachines/nss-mymachines.c +@@ -416,6 +416,9 @@ enum nss_status _nss_mymachines_getpwnam_r( + if (!e || e == p) + goto not_found; + ++ if (e - p > HOST_NAME_MAX - 1) /* -1 for the last dash */ ++ goto not_found; ++ + r = parse_uid(e + 1, &uid); + if (r < 0) + goto not_found; +@@ -573,6 +576,9 @@ enum nss_status _nss_mymachines_getgrnam_r( + if (!e || e == p) + goto not_found; + ++ if (e - p > HOST_NAME_MAX - 1) /* -1 for the last dash */ ++ goto not_found; ++ + r = parse_gid(e + 1, &gid); + if (r < 0) + goto not_found; +-- +2.1.4 + diff --git a/0002-units-enable-waiting-for-unit-termination-in-certain.patch b/0002-units-enable-waiting-for-unit-termination-in-certain.patch deleted file mode 100644 index 4cad2861..00000000 --- a/0002-units-enable-waiting-for-unit-termination-in-certain.patch +++ /dev/null @@ -1,140 +0,0 @@ -From d7f920bfcb0296fed214d4d3a21d64de09a68521 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Tue, 1 Sep 2015 17:25:59 +0200 -Subject: [PATCH 2/2] units: enable waiting for unit termination in certain - cases - -The legacy cgroup hierarchy does not support reliable empty -notifications in containers and if there are left-over subgroups in a -cgroup. This makes it hard to correctly wait for them running empty, and -thus we previously disabled this logic entirely. - -With this change we explicitly check for the container case, and whether -the unit is a "delegation" unit (i.e. one where programs may create -their own subgroups). If we are neither in a container, nor operating on -a delegation unit cgroup empty notifications become reliable and thus we -start waiting for the empty notifications again. - -This doesn't really fix the general problem around cgroup notifications -but reduces the effect around it. - -(This also reorders #include lines by their focus, as suggsted in -CODING_STYLE. We have to add "virt.h", so let's do that at the right -place.) - -Also see #317. - -(cherry picked from commit e9db43d5910717a1084924c512bf85e2b8265375) ---- - src/core/cgroup.c | 12 ++++++++++++ - src/core/cgroup.h | 2 ++ - src/core/unit.c | 40 +++++++++++++++++++++++----------------- - 3 files changed, 37 insertions(+), 17 deletions(-) - -diff --git a/src/core/cgroup.c b/src/core/cgroup.c -index 6474e08..65af351 100644 ---- a/src/core/cgroup.c -+++ b/src/core/cgroup.c -@@ -1127,6 +1127,18 @@ int unit_reset_cpu_usage(Unit *u) { - return 0; - } - -+bool unit_cgroup_delegate(Unit *u) { -+ CGroupContext *c; -+ -+ assert(u); -+ -+ c = unit_get_cgroup_context(u); -+ if (!c) -+ return false; -+ -+ return c->delegate; -+} -+ - static const char* const cgroup_device_policy_table[_CGROUP_DEVICE_POLICY_MAX] = { - [CGROUP_AUTO] = "auto", - [CGROUP_CLOSED] = "closed", -diff --git a/src/core/cgroup.h b/src/core/cgroup.h -index 869ddae..7b38d21 100644 ---- a/src/core/cgroup.h -+++ b/src/core/cgroup.h -@@ -130,5 +130,7 @@ int unit_get_memory_current(Unit *u, uint64_t *ret); - int unit_get_cpu_usage(Unit *u, nsec_t *ret); - int unit_reset_cpu_usage(Unit *u); - -+bool unit_cgroup_delegate(Unit *u); -+ - const char* cgroup_device_policy_to_string(CGroupDevicePolicy i) _const_; - CGroupDevicePolicy cgroup_device_policy_from_string(const char *s) _pure_; -diff --git a/src/core/unit.c b/src/core/unit.c -index dc7bc5a..275f567 100644 ---- a/src/core/unit.c -+++ b/src/core/unit.c -@@ -28,26 +28,28 @@ - #include "sd-id128.h" - #include "sd-messages.h" - #include "set.h" --#include "unit.h" - #include "macro.h" - #include "strv.h" - #include "path-util.h" --#include "load-fragment.h" --#include "load-dropin.h" - #include "log.h" --#include "unit-name.h" --#include "dbus-unit.h" --#include "special.h" - #include "cgroup-util.h" - #include "missing.h" - #include "mkdir.h" - #include "fileio-label.h" -+#include "formats-util.h" -+#include "process-util.h" -+#include "virt.h" - #include "bus-common-errors.h" -+#include "bus-util.h" -+#include "dropin.h" -+#include "unit-name.h" -+#include "special.h" -+#include "unit.h" -+#include "load-fragment.h" -+#include "load-dropin.h" - #include "dbus.h" -+#include "dbus-unit.h" - #include "execute.h" --#include "dropin.h" --#include "formats-util.h" --#include "process-util.h" - - const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX] = { - [UNIT_SERVICE] = &service_vtable, -@@ -3535,14 +3537,18 @@ int unit_kill_context( - } else if (r > 0) { - - /* FIXME: For now, we will not wait for the -- * cgroup members to die, simply because -- * cgroup notification is unreliable. It -- * doesn't work at all in containers, and -- * outside of containers it can be confused -- * easily by leaving directories in the -- * cgroup. */ -- -- /* wait_for_exit = true; */ -+ * cgroup members to die if we are running in -+ * a container or if this is a delegation -+ * unit, simply because cgroup notification is -+ * unreliable in these cases. It doesn't work -+ * at all in containers, and outside of -+ * containers it can be confused easily by -+ * left-over directories in the cgroup -- -+ * which however should not exist in -+ * non-delegated units. */ -+ -+ if (detect_container(NULL) == 0 && !unit_cgroup_delegate(u)) -+ wait_for_exit = true; - - if (c->send_sighup && k != KILL_KILL) { - set_free(pid_set); --- -2.6.0 - diff --git a/0014-journald-with-journaling-FS.patch b/0014-journald-with-journaling-FS.patch index a8255ab5..00577b3d 100644 --- a/0014-journald-with-journaling-FS.patch +++ b/0014-journald-with-journaling-FS.patch @@ -13,27 +13,27 @@ No word on compression… src/journal/journald-server.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) -Index: systemd-221/src/journal/journald-server.c +Index: systemd-227/src/journal/journald-server.c =================================================================== ---- systemd-221.orig/src/journal/journald-server.c -+++ systemd-221/src/journal/journald-server.c -@@ -21,6 +21,7 @@ - - #include +--- systemd-227.orig/src/journal/journald-server.c ++++ systemd-227/src/journal/journald-server.c +@@ -24,6 +24,7 @@ + #include + #endif #include +#include - #include - #include #include -@@ -918,6 +919,38 @@ finish: - dispatch_message_real(s, iovec, n, m, ucred, tv, label, label_len, unit_id, priority, object_pid); + #include + #include +@@ -861,6 +862,39 @@ void server_driver_message(Server *s, sd + dispatch_message_real(s, iovec, n, ELEMENTSOF(iovec), &ucred, NULL, NULL, 0, NULL, LOG_INFO, 0); } +/* + * On journaling and/or compressing file systems, avoid doubling the efforts + * for the system, that is, set NOCOW and NOCOMP inode flags. Check for every + * single flag, as otherwise, some of the file systems may return EOPNOTSUPP on -+ * a single unkown flag (like BtrFS does). ++ * a single unkown flag (like Btrfs does). + * + * …but src/journal/journal-file.c already sets NOCOW too…⸘ + */ @@ -61,12 +61,13 @@ Index: systemd-221/src/journal/journald-server.c + } + close(fd); +} ++ + void server_dispatch_message( + Server *s, + struct iovec *iovec, unsigned n, unsigned m, +@@ -948,6 +982,7 @@ static int system_journal_open(Server *s - static int system_journal_open(Server *s, bool flush_requested) { - int r; -@@ -947,6 +980,7 @@ static int system_journal_open(Server *s - - fn = strjoina("/var/log/journal/", ids); + fn = strjoina("/var/log/journal/", SERVER_MACHINE_ID(s)); (void) mkdir(fn, 0755); + disable_cow(fn, s); diff --git a/0019-make-completion-smart-to-be-able-to-redirect.patch b/0019-make-completion-smart-to-be-able-to-redirect.patch index ca3a4b0c..c8ab5fa7 100644 --- a/0019-make-completion-smart-to-be-able-to-redirect.patch +++ b/0019-make-completion-smart-to-be-able-to-redirect.patch @@ -12,10 +12,10 @@ shell-completion/bash/udevadm | 6 +++++- 11 files changed, 70 insertions(+), 11 deletions(-) -Index: systemd-221/shell-completion/bash/coredumpctl +Index: systemd-228/shell-completion/bash/coredumpctl =================================================================== ---- systemd-221.orig/shell-completion/bash/coredumpctl -+++ systemd-221/shell-completion/bash/coredumpctl +--- systemd-228.orig/shell-completion/bash/coredumpctl ++++ systemd-228/shell-completion/bash/coredumpctl @@ -44,6 +44,10 @@ _coredumpctl() { [DUMP]='dump gdb' ) @@ -33,10 +33,10 @@ Index: systemd-221/shell-completion/bash/coredumpctl -complete -F _coredumpctl coredumpctl +complete -o default -o bashdefault -F _coredumpctl coredumpctl -Index: systemd-221/shell-completion/bash/hostnamectl +Index: systemd-228/shell-completion/bash/hostnamectl =================================================================== ---- systemd-221.orig/shell-completion/bash/hostnamectl -+++ systemd-221/shell-completion/bash/hostnamectl +--- systemd-228.orig/shell-completion/bash/hostnamectl ++++ systemd-228/shell-completion/bash/hostnamectl @@ -30,6 +30,10 @@ _hostnamectl() { local OPTS='-h --help --version --transient --static --pretty --no-ask-password -H --host --machine' @@ -54,12 +54,12 @@ Index: systemd-221/shell-completion/bash/hostnamectl -complete -F _hostnamectl hostnamectl +complete -o default -o bashdefault -F _hostnamectl hostnamectl -Index: systemd-221/shell-completion/bash/journalctl +Index: systemd-228/shell-completion/bash/journalctl =================================================================== ---- systemd-221.orig/shell-completion/bash/journalctl -+++ systemd-221/shell-completion/bash/journalctl -@@ -55,6 +55,10 @@ _journalctl() { - --root --machine' +--- systemd-228.orig/shell-completion/bash/journalctl ++++ systemd-228/shell-completion/bash/journalctl +@@ -56,6 +56,10 @@ _journalctl() { + --root -M --machine' ) + if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then @@ -69,16 +69,16 @@ Index: systemd-221/shell-completion/bash/journalctl if __contains_word "$prev" ${OPTS[ARG]} ${OPTS[ARGUNKNOWN]}; then case $prev in --boot|--this-boot|-b) -@@ -120,4 +124,4 @@ _journalctl() { +@@ -121,4 +125,4 @@ _journalctl() { fi } -complete -F _journalctl journalctl +complete -o default -o bashdefault -F _journalctl journalctl -Index: systemd-221/shell-completion/bash/kernel-install +Index: systemd-228/shell-completion/bash/kernel-install =================================================================== ---- systemd-221.orig/shell-completion/bash/kernel-install -+++ systemd-221/shell-completion/bash/kernel-install +--- systemd-228.orig/shell-completion/bash/kernel-install ++++ systemd-228/shell-completion/bash/kernel-install @@ -18,11 +18,22 @@ # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see . @@ -108,10 +108,10 @@ Index: systemd-221/shell-completion/bash/kernel-install -complete -F _kernel_install kernel-install +complete -o default -o bashdefault -F _kernel_install kernel-install -Index: systemd-221/shell-completion/bash/localectl +Index: systemd-228/shell-completion/bash/localectl =================================================================== ---- systemd-221.orig/shell-completion/bash/localectl -+++ systemd-221/shell-completion/bash/localectl +--- systemd-228.orig/shell-completion/bash/localectl ++++ systemd-228/shell-completion/bash/localectl @@ -36,6 +36,10 @@ _localectl() { local OPTS='-h --help --version --no-convert --no-pager --no-ask-password -H --host --machine' @@ -129,10 +129,10 @@ Index: systemd-221/shell-completion/bash/localectl -complete -F _localectl localectl +complete -o default -o bashdefault -F _localectl localectl -Index: systemd-221/shell-completion/bash/loginctl +Index: systemd-228/shell-completion/bash/loginctl =================================================================== ---- systemd-221.orig/shell-completion/bash/loginctl -+++ systemd-221/shell-completion/bash/loginctl +--- systemd-228.orig/shell-completion/bash/loginctl ++++ systemd-228/shell-completion/bash/loginctl @@ -38,6 +38,10 @@ _loginctl () { [ARG]='--host -H --kill-who --property -p --signal -s --machine' ) @@ -150,12 +150,12 @@ Index: systemd-221/shell-completion/bash/loginctl -complete -F _loginctl loginctl +complete -o default -o bashdefault -F _loginctl loginctl -Index: systemd-221/shell-completion/bash/systemctl.in +Index: systemd-228/shell-completion/bash/systemctl.in =================================================================== ---- systemd-221.orig/shell-completion/bash/systemctl.in -+++ systemd-221/shell-completion/bash/systemctl.in -@@ -96,6 +96,10 @@ _systemctl () { - [ARG]='--host -H --kill-who --property -p --signal -s --type -t --state --job-mode --root' +--- systemd-228.orig/shell-completion/bash/systemctl.in ++++ systemd-228/shell-completion/bash/systemctl.in +@@ -104,6 +104,10 @@ _systemctl () { + --preset-mode -n --lines -o --output -M --machine' ) + if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then @@ -164,17 +164,17 @@ Index: systemd-221/shell-completion/bash/systemctl.in + if __contains_word "--user" ${COMP_WORDS[*]}; then mode=--user - else -@@ -268,4 +272,4 @@ _systemctl () { + elif __contains_word "--global" ${COMP_WORDS[*]}; then +@@ -280,4 +284,4 @@ _systemctl () { return 0 } -complete -F _systemctl systemctl +complete -o default -o bashdefault -F _systemctl systemctl -Index: systemd-221/shell-completion/bash/systemd-analyze +Index: systemd-228/shell-completion/bash/systemd-analyze =================================================================== ---- systemd-221.orig/shell-completion/bash/systemd-analyze -+++ systemd-221/shell-completion/bash/systemd-analyze +--- systemd-228.orig/shell-completion/bash/systemd-analyze ++++ systemd-228/shell-completion/bash/systemd-analyze @@ -47,6 +47,10 @@ _systemd_analyze() { [VERIFY]='verify' ) @@ -192,10 +192,10 @@ Index: systemd-221/shell-completion/bash/systemd-analyze -complete -F _systemd_analyze systemd-analyze +complete -o default -o bashdefault -F _systemd_analyze systemd-analyze -Index: systemd-221/shell-completion/bash/systemd-run +Index: systemd-228/shell-completion/bash/systemd-run =================================================================== ---- systemd-221.orig/shell-completion/bash/systemd-run -+++ systemd-221/shell-completion/bash/systemd-run +--- systemd-228.orig/shell-completion/bash/systemd-run ++++ systemd-228/shell-completion/bash/systemd-run @@ -17,6 +17,13 @@ # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see . @@ -210,7 +210,7 @@ Index: systemd-221/shell-completion/bash/systemd-run __systemctl() { local mode=$1; shift 1 systemctl $mode --full --no-legend "$@" -@@ -38,6 +45,11 @@ _systemd_run() { +@@ -40,6 +47,11 @@ _systemd_run() { local mode=--system local i @@ -219,19 +219,19 @@ Index: systemd-221/shell-completion/bash/systemd-run + return 0 + fi + - for (( i=1; i <= COMP_CWORD; i++ )); do - if [[ ${COMP_WORDS[i]} != -* ]]; then - local root_command=${COMP_WORDS[i]} -@@ -98,4 +110,4 @@ _systemd_run() { + local opts_with_values=( + --unit --description --slice --service-type -H --host -M --machine -p --property --on-active + --on-boot --on-startup --on-unit-active --on-unit-inactive --on-calendar --timer-property +@@ -114,4 +126,4 @@ _systemd_run() { return 0 } -complete -F _systemd_run systemd-run +complete -o default -o bashdefault -F _systemd_run systemd-run -Index: systemd-221/shell-completion/bash/timedatectl +Index: systemd-228/shell-completion/bash/timedatectl =================================================================== ---- systemd-221.orig/shell-completion/bash/timedatectl -+++ systemd-221/shell-completion/bash/timedatectl +--- systemd-228.orig/shell-completion/bash/timedatectl ++++ systemd-228/shell-completion/bash/timedatectl @@ -30,6 +30,10 @@ _timedatectl() { local OPTS='-h --help --version --adjust-system-clock --no-pager --no-ask-password -H --host --machine' @@ -249,10 +249,10 @@ Index: systemd-221/shell-completion/bash/timedatectl -complete -F _timedatectl timedatectl +complete -o default -o bashdefault -F _timedatectl timedatectl -Index: systemd-221/shell-completion/bash/udevadm +Index: systemd-228/shell-completion/bash/udevadm =================================================================== ---- systemd-221.orig/shell-completion/bash/udevadm -+++ systemd-221/shell-completion/bash/udevadm +--- systemd-228.orig/shell-completion/bash/udevadm ++++ systemd-228/shell-completion/bash/udevadm @@ -36,6 +36,10 @@ _udevadm() { local verbs=(info trigger settle control monitor hwdb test-builtin test) diff --git a/1001-re-enable-by_path-links-for-ata-devices.patch b/1001-re-enable-by_path-links-for-ata-devices.patch deleted file mode 100644 index 5520c601..00000000 --- a/1001-re-enable-by_path-links-for-ata-devices.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 5cf46aa4339670afac386b1b0e630b739f3621c7 Mon Sep 17 00:00:00 2001 -From: Robert Milasan -Date: Thu, 12 Jul 2012 15:56:34 +0000 -Subject: [PATCH] Persistent by_path links for ata devices - -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 | 53 ++++++++++++++++++++++++++++++---------- - 1 file changed, 41 insertions(+), 12 deletions(-) - -Index: systemd-221/src/udev/udev-builtin-path_id.c -=================================================================== ---- systemd-221.orig/src/udev/udev-builtin-path_id.c -+++ systemd-221/src/udev/udev-builtin-path_id.c -@@ -447,6 +447,46 @@ static struct udev_device *handle_scsi_h - return parent; - } - -+static struct udev_device *handle_ata(struct udev_device *parent, char **path) -+{ -+ 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) -+ return NULL; -+ -+ name = udev_device_get_sysname(parent); -+ if (sscanf(name, "%d:%d:%d:%d", &host, &bus, &target, &lun) != 4) -+ return 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; -+ -+ /* 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; -+ } -+ 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: -+ udev_device_unref(portdev); -+ return hostdev; -+} -+ - static struct udev_device *handle_scsi(struct udev_device *parent, char **path, bool *supported_parent) { - const char *devtype; - const char *name; -@@ -486,19 +526,8 @@ static struct udev_device *handle_scsi(s - goto out; - } - -- /* -- * We do not support the ATA transport class, it uses global counters -- * to name the ata devices which numbers spread across multiple -- * controllers. -- * -- * The real link numbers are not exported. Also, possible chains of ports -- * behind port multipliers cannot be composed that way. -- * -- * Until all that is solved at the kernel level, there are no by-path/ -- * links for ATA devices. -- */ - if (strstr(name, "/ata") != NULL) { -- parent = NULL; -+ parent = handle_ata(parent, path); - goto out; - } - diff --git a/1097-udevd-increase-maximum-number-of-children.patch b/1097-udevd-increase-maximum-number-of-children.patch index 6693d757..f71c96a4 100644 --- a/1097-udevd-increase-maximum-number-of-children.patch +++ b/1097-udevd-increase-maximum-number-of-children.patch @@ -2,11 +2,11 @@ src/udev/udevd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -Index: systemd-221/src/udev/udevd.c +Index: systemd-227/src/udev/udevd.c =================================================================== ---- systemd-221.orig/src/udev/udevd.c -+++ systemd-221/src/udev/udevd.c -@@ -569,7 +569,7 @@ static void event_run(Manager *manager, +--- systemd-227.orig/src/udev/udevd.c ++++ systemd-227/src/udev/udevd.c +@@ -568,7 +568,7 @@ static void event_run(Manager *manager, if (hashmap_size(manager->workers) >= arg_children_max) { if (arg_children_max > 1) @@ -15,12 +15,12 @@ Index: systemd-221/src/udev/udevd.c return; } -@@ -1641,7 +1641,7 @@ int main(int argc, char *argv[]) { +@@ -1672,7 +1672,7 @@ int main(int argc, char *argv[]) { arg_children_max = 8; - if (sched_getaffinity(0, sizeof (cpu_set), &cpu_set) == 0) { + if (sched_getaffinity(0, sizeof(cpu_set), &cpu_set) == 0) - arg_children_max += CPU_COUNT(&cpu_set) * 2; + arg_children_max += CPU_COUNT(&cpu_set) * 64; - } log_debug("set children_max to %u", arg_children_max); + } diff --git a/1099-Add-default-rules-for-valve-steam-controller-to-work.patch b/1099-Add-default-rules-for-valve-steam-controller-to-work.patch new file mode 100644 index 00000000..6078c4cc --- /dev/null +++ b/1099-Add-default-rules-for-valve-steam-controller-to-work.patch @@ -0,0 +1,34 @@ +From e3effecf928405cdd477ae554e2276fb8a7288c4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= +Date: Mon, 30 Nov 2015 14:35:15 +0100 +Subject: [PATCH] Add default rules for valve steam controler to work + +--- + Makefile.am | 1 + + rules/72-valve-steam-controler.rules | 2 ++ + 2 files changed, 3 insertions(+) + create mode 100644 rules/72-valve-steam-controler.rules + +diff --git a/Makefile.am b/Makefile.am +index db206ae..803912c 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -3524,6 +3524,7 @@ dist_udevrules_DATA += \ + rules/60-serial.rules \ + rules/64-btrfs.rules \ + rules/70-mouse.rules \ ++ rules/72-valve-steam-controler.rules \ + rules/75-net-description.rules \ + rules/78-sound-card.rules \ + rules/80-net-setup-link.rules +diff --git a/rules/72-valve-steam-controler.rules b/rules/72-valve-steam-controler.rules +new file mode 100644 +index 0000000..f676972 +--- /dev/null ++++ b/rules/72-valve-steam-controler.rules +@@ -0,0 +1,2 @@ ++# for basic functionality of the controller in Steam and keyboard/mouse emulation ++SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="1142", TAG+="uaccess" +-- +2.6.3 + diff --git a/Correct_assert_on_unexpected_error_code.patch b/Correct_assert_on_unexpected_error_code.patch index 535170b4..43e686ca 100644 --- a/Correct_assert_on_unexpected_error_code.patch +++ b/Correct_assert_on_unexpected_error_code.patch @@ -2,10 +2,12 @@ src/login/pam_systemd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) ---- src/login/pam_systemd.c -+++ src/login/pam_systemd.c 2015-07-29 08:52:20.762018565 +0000 -@@ -507,7 +507,11 @@ _public_ PAM_EXTERN int pam_sm_open_sess - r = pam_set_data(handle, "systemd.session-fd", INT_TO_PTR(session_fd+1), NULL); +Index: systemd-228/src/login/pam_systemd.c +=================================================================== +--- systemd-228.orig/src/login/pam_systemd.c ++++ systemd-228/src/login/pam_systemd.c +@@ -515,7 +515,11 @@ _public_ PAM_EXTERN int pam_sm_open_sess + r = pam_set_data(handle, "systemd.session-fd", FD_TO_PTR(session_fd), NULL); if (r != PAM_SUCCESS) { pam_syslog(handle, LOG_ERR, "Failed to install session fd."); - safe_close(session_fd); diff --git a/avoid-divide-by-zero-sigtrap.patch b/avoid-divide-by-zero-sigtrap.patch index 8a8c3caa..60e42c9e 100644 --- a/avoid-divide-by-zero-sigtrap.patch +++ b/avoid-divide-by-zero-sigtrap.patch @@ -1,28 +1,28 @@ -Nasty bug reported on bnc#867663 +Nasty bug reported on boo#867663 --- src/basic/def.h | 2 +- src/core/manager.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) -Index: systemd-221/src/basic/def.h +Index: systemd-228/src/basic/def.h =================================================================== ---- systemd-221.orig/src/basic/def.h -+++ systemd-221/src/basic/def.h -@@ -37,7 +37,7 @@ +--- systemd-228.orig/src/basic/def.h ++++ systemd-228/src/basic/def.h +@@ -40,7 +40,7 @@ - #define SYSTEMD_CGROUP_CONTROLLER "systemd" + #define SYSTEMD_CGROUP_CONTROLLER "name=systemd" -#define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT +#define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT,SIGTRAP,SIGSYS #define SIGNALS_IGNORE SIGPIPE - #define DIGITS "0123456789" -Index: systemd-221/src/core/manager.c + #define REBOOT_PARAM_FILE "/run/systemd/reboot-param" +Index: systemd-228/src/core/manager.c =================================================================== ---- systemd-221.orig/src/core/manager.c -+++ systemd-221/src/core/manager.c -@@ -1991,7 +1991,8 @@ static int manager_dispatch_jobs_in_prog +--- systemd-228.orig/src/core/manager.c ++++ systemd-228/src/core/manager.c +@@ -2003,7 +2003,8 @@ static int manager_dispatch_jobs_in_prog assert(m); assert(source); diff --git a/handle-disable_caplock-and-compose_table-and-kbd_rate.patch b/handle-disable_caplock-and-compose_table-and-kbd_rate.patch index 865322fb..d7c4477f 100644 --- a/handle-disable_caplock-and-compose_table-and-kbd_rate.patch +++ b/handle-disable_caplock-and-compose_table-and-kbd_rate.patch @@ -9,20 +9,20 @@ Date: Fri Jun 19 21:36:27 CEST 2015 src/vconsole/vconsole-setup.c | 151 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 147 insertions(+), 4 deletions(-) -Index: systemd-221/src/vconsole/vconsole-setup.c +Index: systemd-228/src/vconsole/vconsole-setup.c =================================================================== ---- systemd-221.orig/src/vconsole/vconsole-setup.c -+++ systemd-221/src/vconsole/vconsole-setup.c -@@ -35,6 +35,8 @@ - #include "log.h" - #include "virt.h" +--- systemd-228.orig/src/vconsole/vconsole-setup.c ++++ systemd-228/src/vconsole/vconsole-setup.c +@@ -34,6 +34,8 @@ + #include "alloc-util.h" + #include "fd-util.h" #include "fileio.h" +#include "macro.h" +#include "strv.h" - #include "process-util.h" - #include "terminal-util.h" - #include "signal-util.h" -@@ -99,8 +101,10 @@ static int enable_utf8(int fd) { + #include "io-util.h" + #include "locale-util.h" + #include "log.h" +@@ -104,8 +106,10 @@ static int enable_utf8(int fd) { return r; } @@ -35,7 +35,7 @@ Index: systemd-221/src/vconsole/vconsole-setup.c int i = 0, r; pid_t pid; -@@ -117,6 +121,8 @@ static int keyboard_load_and_wait(const +@@ -122,6 +126,8 @@ static int keyboard_load_and_wait(const args[i++] = map; if (map_toggle) args[i++] = map_toggle; @@ -44,7 +44,7 @@ Index: systemd-221/src/vconsole/vconsole-setup.c args[i++] = NULL; pid = fork(); -@@ -246,11 +252,117 @@ static void font_copy_to_all_vcs(int fd) +@@ -251,11 +257,117 @@ static void font_copy_to_all_vcs(int fd) } } @@ -162,7 +162,7 @@ Index: systemd-221/src/vconsole/vconsole-setup.c _cleanup_close_ int fd = -1; bool utf8, font_copy = false, font_ok, keyboard_ok; int r = EXIT_FAILURE; -@@ -281,6 +393,31 @@ int main(int argc, char **argv) { +@@ -286,6 +398,31 @@ int main(int argc, char **argv) { utf8 = is_locale_utf8(); @@ -194,7 +194,7 @@ Index: systemd-221/src/vconsole/vconsole-setup.c r = parse_env_file("/etc/vconsole.conf", NEWLINE, "KEYMAP", &vc_keymap, "KEYMAP_TOGGLE", &vc_keymap_toggle, -@@ -312,11 +449,17 @@ int main(int argc, char **argv) { +@@ -317,11 +454,17 @@ int main(int argc, char **argv) { (void) disable_utf8(fd); font_ok = font_load_and_wait(vc, vc_font, vc_font_map, vc_font_unimap) > 0; diff --git a/handle-numlock-value-in-etc-sysconfig-keyboard.patch b/handle-numlock-value-in-etc-sysconfig-keyboard.patch index db480a34..18fd4f61 100644 --- a/handle-numlock-value-in-etc-sysconfig-keyboard.patch +++ b/handle-numlock-value-in-etc-sysconfig-keyboard.patch @@ -9,14 +9,16 @@ Cristian Rodríguez --- Makefile.am | 13 ++++++++++ rules/73-seat-numlock.rules | 8 ++++++ - src/login/numlock-on.c | 34 +++++++++++++++++++++++++++ - src/vconsole/vconsole-setup.c | 40 ++++++++++++++++++++++++++++++-- + src/login/numlock-on.c | 34 ++++++++++++++++++++++++++ + src/vconsole/vconsole-setup.c | 41 ++++++++++++++++++++++++++++++-- units/systemd-vconsole-setup.service.in | 2 - - 5 files changed, 94 insertions(+), 3 deletions(-) + 5 files changed, 95 insertions(+), 3 deletions(-) ---- systemd-222.orig/Makefile.am -+++ systemd-222/Makefile.am -@@ -3805,6 +3805,19 @@ dist_udevrules_DATA += \ +Index: systemd-228/Makefile.am +=================================================================== +--- systemd-228.orig/Makefile.am ++++ systemd-228/Makefile.am +@@ -3825,6 +3825,19 @@ dist_udevrules_DATA += \ rules/60-persistent-v4l.rules # ------------------------------------------------------------------------------ @@ -36,8 +38,10 @@ Cristian Rodríguez mtd_probe_SOURCES = \ src/udev/mtd_probe/mtd_probe.c \ src/udev/mtd_probe/mtd_probe.h \ +Index: systemd-228/rules/73-seat-numlock.rules +=================================================================== --- /dev/null -+++ systemd-222/rules/73-seat-numlock.rules ++++ systemd-228/rules/73-seat-numlock.rules @@ -0,0 +1,8 @@ +# This file is part of SUSE customization of systemd. +# @@ -47,8 +51,10 @@ Cristian Rodríguez +# (at your option) any later version. + +SUBSYSTEM=="tty", ACTION=="add", KERNEL=="tty[0-9]|tty1[0-2]", TEST=="/run/numlock-on", RUN+="numlock-on $env{DEVNAME}" +Index: systemd-228/src/login/numlock-on.c +=================================================================== --- /dev/null -+++ systemd-222/src/login/numlock-on.c ++++ systemd-228/src/login/numlock-on.c @@ -0,0 +1,34 @@ +/* + * numlock-on.c: Turn numlock-on @@ -84,11 +90,21 @@ Cristian Rodríguez + + exit(0); +} ---- systemd-222.orig/src/vconsole/vconsole-setup.c -+++ systemd-222/src/vconsole/vconsole-setup.c -@@ -41,6 +41,10 @@ - #include "terminal-util.h" - #include "signal-util.h" +Index: systemd-228/src/vconsole/vconsole-setup.c +=================================================================== +--- systemd-228.orig/src/vconsole/vconsole-setup.c ++++ systemd-228/src/vconsole/vconsole-setup.c +@@ -36,6 +36,7 @@ + #include "fileio.h" + #include "macro.h" + #include "strv.h" ++#include "fs-util.h" + #include "io-util.h" + #include "locale-util.h" + #include "log.h" +@@ -46,6 +47,10 @@ + #include "util.h" + #include "virt.h" +#define BIOS_DATA_AREA 0x400 +#define BDA_KEYBOARD_STATUS_FLAGS_4 0x97 @@ -97,7 +113,7 @@ Cristian Rodríguez static bool is_vconsole(int fd) { unsigned char data[1]; -@@ -359,9 +363,10 @@ int main(int argc, char **argv) { +@@ -364,9 +369,10 @@ int main(int argc, char **argv) { #ifdef HAVE_SYSV_COMPAT _cleanup_free_ char *vc_kbd_delay = NULL, *vc_kbd_rate = NULL, @@ -110,7 +126,7 @@ Cristian Rodríguez bool comp_ok, rate_ok; _cleanup_close_ int fd = -1; bool utf8, font_copy = false, font_ok, keyboard_ok; -@@ -399,6 +404,7 @@ int main(int argc, char **argv) { +@@ -404,6 +410,7 @@ int main(int argc, char **argv) { "KBD_DELAY", &vc_kbd_delay, "KBD_RATE", &vc_kbd_rate, "KBD_DISABLE_CAPS_LOCK", &vc_kbd_disable_caps_lock, @@ -118,7 +134,7 @@ Cristian Rodríguez "COMPOSETABLE", &vc_compose_table, NULL); if (r < 0 && r != -ENOENT) -@@ -416,6 +422,32 @@ int main(int argc, char **argv) { +@@ -421,6 +428,32 @@ int main(int argc, char **argv) { disable_capslock = vc_kbd_disable_caps_lock && strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0; @@ -151,7 +167,7 @@ Cristian Rodríguez #endif /* HAVE_SYSV_COMPAT */ r = parse_env_file("/etc/vconsole.conf", NEWLINE, -@@ -451,6 +483,10 @@ int main(int argc, char **argv) { +@@ -456,6 +489,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; @@ -162,8 +178,10 @@ Cristian Rodríguez #ifdef HAVE_SYSV_COMPAT comp_ok = compose_load_and_wait(vc, vc_compose_table); rate_ok = kbdrate_set_and_wait(vc, vc_kbd_rate, vc_kbd_delay); ---- systemd-222.orig/units/systemd-vconsole-setup.service.in -+++ systemd-222/units/systemd-vconsole-setup.service.in +Index: systemd-228/units/systemd-vconsole-setup.service.in +=================================================================== +--- systemd-228.orig/units/systemd-vconsole-setup.service.in ++++ systemd-228/units/systemd-vconsole-setup.service.in @@ -10,7 +10,7 @@ Description=Setup Virtual Console Documentation=man:systemd-vconsole-setup.service(8) man:vconsole.conf(5) DefaultDependencies=no diff --git a/handle-root_uses_lang-value-in-etc-sysconfig-language.patch b/handle-root_uses_lang-value-in-etc-sysconfig-language.patch index 520c7bbe..118f333d 100644 --- a/handle-root_uses_lang-value-in-etc-sysconfig-language.patch +++ b/handle-root_uses_lang-value-in-etc-sysconfig-language.patch @@ -2,16 +2,22 @@ From: Frederic Crozat Date: Tue, 4 Dec 2012 16:51:32 +0000 Subject: handle root_uses_lang value in /etc/sysconfig/language -handle ROOT_USES_LANG=ctype (bnc#792182). +handle ROOT_USES_LANG=ctype (boo#792182). --- - src/core/locale-setup.c | 26 ++++++++++++++++++++++++++ - 1 file changed, 26 insertions(+) + src/core/locale-setup.c | 40 ++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 40 insertions(+) -Index: systemd-221/src/core/locale-setup.c +Index: systemd-228/src/core/locale-setup.c =================================================================== ---- systemd-221.orig/src/core/locale-setup.c -+++ systemd-221/src/core/locale-setup.c -@@ -34,6 +34,10 @@ int locale_setup(char ***environment) { +--- systemd-228.orig/src/core/locale-setup.c ++++ systemd-228/src/core/locale-setup.c +@@ -30,11 +30,16 @@ + #include "strv.h" + #include "util.h" + #include "virt.h" ++#include "alloc-util.h" + + int locale_setup(char ***environment) { char **add; char *variables[_VARIABLE_LC_MAX] = {}; int r = 0, i; @@ -20,9 +26,9 @@ Index: systemd-221/src/core/locale-setup.c + char _cleanup_free_ *root_uses_lang = NULL; +#endif - if (detect_container(NULL) <= 0) { + if (detect_container() <= 0) { r = parse_env_file("/proc/cmdline", WHITESPACE, -@@ -80,6 +85,41 @@ int locale_setup(char ***environment) { +@@ -81,6 +86,41 @@ int locale_setup(char ***environment) { if (r < 0 && r != -ENOENT) log_warning_errno(r, "Failed to read /etc/locale.conf: %m"); } diff --git a/insserv-generator.patch b/insserv-generator.patch index 9e5afdbc..833d0d66 100644 --- a/insserv-generator.patch +++ b/insserv-generator.patch @@ -8,16 +8,16 @@ systemd unit drop-in files to add dependencies --- Makefile.am | 9 src/insserv-generator/Makefile | 28 ++ - src/insserv-generator/insserv-generator.c | 316 ++++++++++++++++++++++++++++++ - 3 files changed, 352 insertions(+), 1 deletion(-) + src/insserv-generator/insserv-generator.c | 319 ++++++++++++++++++++++++++++++ + 3 files changed, 355 insertions(+), 1 deletion(-) create mode 100644 src/insserv-generator/Makefile create mode 100644 src/insserv-generator/insserv-generator.c -Index: systemd-224/Makefile.am +Index: systemd-228/Makefile.am =================================================================== ---- systemd-224.orig/Makefile.am -+++ systemd-224/Makefile.am -@@ -617,7 +617,8 @@ nodist_systemunit_DATA += \ +--- systemd-228.orig/Makefile.am ++++ systemd-228/Makefile.am +@@ -626,7 +626,8 @@ nodist_systemunit_DATA += \ systemgenerator_PROGRAMS += \ systemd-sysv-generator \ @@ -27,7 +27,7 @@ Index: systemd-224/Makefile.am endif EXTRA_DIST += \ -@@ -2556,6 +2557,12 @@ $(systemd_boot): $(systemd_boot_solib) +@@ -2682,6 +2683,12 @@ $(systemd_boot): $(systemd_boot_solib) endif endif @@ -40,10 +40,10 @@ Index: systemd-224/Makefile.am # ------------------------------------------------------------------------------ stub_headers = \ src/boot/efi/util.h \ -Index: systemd-224/src/insserv-generator/Makefile +Index: systemd-228/src/insserv-generator/Makefile =================================================================== --- /dev/null -+++ systemd-224/src/insserv-generator/Makefile ++++ systemd-228/src/insserv-generator/Makefile @@ -0,0 +1,28 @@ +# This file is part of systemd. +# @@ -73,11 +73,11 @@ Index: systemd-224/src/insserv-generator/Makefile + $(MAKE) -C .. clean + +.PHONY: all clean -Index: systemd-224/src/insserv-generator/insserv-generator.c +Index: systemd-228/src/insserv-generator/insserv-generator.c =================================================================== --- /dev/null -+++ systemd-224/src/insserv-generator/insserv-generator.c -@@ -0,0 +1,316 @@ ++++ systemd-228/src/insserv-generator/insserv-generator.c +@@ -0,0 +1,319 @@ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ + +/*** @@ -112,6 +112,9 @@ Index: systemd-224/src/insserv-generator/insserv-generator.c +#include "path-util.h" +#include "util.h" +#include "strv.h" ++#include "alloc-util.h" ++#include "string-util.h" ++#include "fd-util.h" + +static const char *arg_dest = "/tmp"; + diff --git a/macros.systemd.upstream b/macros.systemd.upstream index 8c2e84f6..2ba0ff05 100644 --- a/macros.systemd.upstream +++ b/macros.systemd.upstream @@ -1,4 +1,4 @@ -# -*- Mode: makefile; indent-tabs-mode: t -*- */ +# -*- Mode: rpm-spec; indent-tabs-mode: nil -*- */ # # This file is part of systemd. # @@ -39,7 +39,7 @@ Requires(postun): systemd \ %systemd_post() \ if [ $1 -eq 1 ] ; then \ # Initial installation \ - systemctl preset %{?*} >/dev/null 2>&1 || : \ + systemctl --no-reload preset %{?*} >/dev/null 2>&1 || : \ fi \ %{nil} @@ -48,8 +48,7 @@ fi \ %systemd_preun() \ if [ $1 -eq 0 ] ; then \ # Package removal, not upgrade \ - systemctl --no-reload disable %{?*} > /dev/null 2>&1 || : \ - systemctl stop %{?*} > /dev/null 2>&1 || : \ + systemctl --no-reload disable --now %{?*} > /dev/null 2>&1 || : \ fi \ %{nil} @@ -60,14 +59,11 @@ if [ $1 -eq 0 ] ; then \ fi \ %{nil} -%systemd_postun() \ -systemctl daemon-reload >/dev/null 2>&1 || : \ -%{nil} +%systemd_postun() %{nil} %systemd_user_postun() %{nil} %systemd_postun_with_restart() \ -systemctl daemon-reload >/dev/null 2>&1 || : \ if [ $1 -ge 1 ] ; then \ # Package upgrade, not uninstall \ systemctl try-restart %{?*} >/dev/null 2>&1 || : \ diff --git a/rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch b/rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch deleted file mode 100644 index b6859af1..00000000 --- a/rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch +++ /dev/null @@ -1,18 +0,0 @@ -From: Robert Schweikert -Date: Fri, 12 Apr 2013 12:08:16 -0400 -Subject: rules: add lid switch of ARM based Chromebook as a power switch to - logind - ---- - src/login/70-power-switch.rules | 1 + - 1 file changed, 1 insertion(+) - ---- a/src/login/70-power-switch.rules -+++ b/src/login/70-power-switch.rules -@@ -11,5 +11,6 @@ SUBSYSTEM=="input", KERNEL=="event*", SU - SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="thinkpad_acpi", TAG+="power-switch" - SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="twl4030_pwrbutton", TAG+="power-switch" - SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="tps65217_pwr_but", TAG+="power-switch" -+SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="gpio-keys.8", TAG+="power-switch" - - LABEL="power_switch_end" diff --git a/set-and-use-default-logconsole.patch b/set-and-use-default-logconsole.patch index c00f8623..e6474d8d 100644 --- a/set-and-use-default-logconsole.patch +++ b/set-and-use-default-logconsole.patch @@ -3,29 +3,29 @@ Use and set default logging console for both journald and kernel messages --- src/journal/journald-console.c | 100 +++++++++++++++++++++++++++++++++++++++++ src/journal/journald-console.h | 3 + - src/journal/journald-server.c | 6 ++ - 3 files changed, 109 insertions(+) + src/journal/journald-server.c | 5 ++ + 3 files changed, 108 insertions(+) -Index: systemd-221/src/journal/journald-console.c +Index: systemd-228/src/journal/journald-console.c =================================================================== ---- systemd-221.orig/src/journal/journald-console.c -+++ systemd-221/src/journal/journald-console.c +--- systemd-228.orig/src/journal/journald-console.c ++++ systemd-228/src/journal/journald-console.c @@ -22,6 +22,14 @@ - #include #include #include + #include +#ifdef HAVE_SYSV_COMPAT -+# include -+# include -+# include -+# include -+# include -+# include "util.h" ++# include ++# include ++# include ++# include ++# include ++# include "string-util.h" +#endif - #include "fileio.h" - #include "journald-server.h" -@@ -45,6 +53,76 @@ static bool prefix_timestamp(void) { + #include "alloc-util.h" + #include "fd-util.h" +@@ -50,6 +58,76 @@ static bool prefix_timestamp(void) { return cached_printk_time; } @@ -102,7 +102,7 @@ Index: systemd-221/src/journal/journald-console.c void server_forward_console( Server *s, int priority, -@@ -66,6 +144,12 @@ void server_forward_console( +@@ -71,6 +149,12 @@ void server_forward_console( if (LOG_PRI(priority) > s->max_level_console) return; @@ -115,10 +115,10 @@ Index: systemd-221/src/journal/journald-console.c /* First: timestamp */ if (prefix_timestamp()) { assert_se(clock_gettime(CLOCK_MONOTONIC, &ts) == 0); -@@ -102,7 +186,23 @@ void server_forward_console( +@@ -107,7 +191,23 @@ void server_forward_console( fd = open_terminal(tty, O_WRONLY|O_NOCTTY|O_CLOEXEC); if (fd < 0) { - log_debug_errno(errno, "Failed to open %s for logging: %m", tty); + log_debug_errno(fd, "Failed to open %s for logging: %m", tty); +#ifdef HAVE_SYSV_COMPAT + if (fd != -ENOENT && fd != -ENODEV) + return; @@ -139,10 +139,10 @@ Index: systemd-221/src/journal/journald-console.c } if (writev(fd, iovec, n) < 0) -Index: systemd-221/src/journal/journald-console.h +Index: systemd-228/src/journal/journald-console.h =================================================================== ---- systemd-221.orig/src/journal/journald-console.h -+++ systemd-221/src/journal/journald-console.h +--- systemd-228.orig/src/journal/journald-console.h ++++ systemd-228/src/journal/journald-console.h @@ -24,3 +24,6 @@ #include "journald-server.h" @@ -150,19 +150,19 @@ Index: systemd-221/src/journal/journald-console.h + +void klogconsole(Server *s); +void default_tty_path(Server *s); -Index: systemd-221/src/journal/journald-server.c +Index: systemd-228/src/journal/journald-server.c =================================================================== ---- systemd-221.orig/src/journal/journald-server.c -+++ systemd-221/src/journal/journald-server.c -@@ -52,6 +52,7 @@ - #include "journal-internal.h" - #include "journal-vacuum.h" - #include "journal-authenticate.h" +--- systemd-228.orig/src/journal/journald-server.c ++++ systemd-228/src/journal/journald-server.c +@@ -55,6 +55,7 @@ + #include "journald-audit.h" + #include "journald-kmsg.h" + #include "journald-native.h" +#include "journald-console.h" #include "journald-rate-limit.h" - #include "journald-kmsg.h" - #include "journald-syslog.h" -@@ -1514,6 +1515,11 @@ int server_init(Server *s) { + #include "journald-server.h" + #include "journald-stream.h" +@@ -1751,6 +1752,10 @@ int server_init(Server *s) { server_parse_config_file(s); server_parse_proc_cmdline(s); @@ -170,7 +170,6 @@ Index: systemd-221/src/journal/journald-server.c + + if (s->tty_path) + klogconsole(s); -+ + if (!!s->rate_limit_interval ^ !!s->rate_limit_burst) { log_debug("Setting both rate limit interval and burst from "USEC_FMT",%u to 0,0", - s->rate_limit_interval, s->rate_limit_burst); diff --git a/suse-sysv-bootd-support.diff b/suse-sysv-bootd-support.diff index 45253b12..ce772aac 100644 --- a/suse-sysv-bootd-support.diff +++ b/suse-sysv-bootd-support.diff @@ -7,12 +7,14 @@ This reverts commit 3cdebc217c42c8529086f2965319b6a48eaaeabe. [Implementation note: currently, the unit is generated, but not activated even if symlinks exist in boot.d. Hmmm... -jengelh@inai.de] --- - src/sysv-generator/sysv-generator.c | 21 +++++++++++++++------ - 1 file changed, 15 insertions(+), 6 deletions(-) + src/sysv-generator/sysv-generator.c | 20 +++++++++++++++----- + 1 file changed, 15 insertions(+), 5 deletions(-) ---- systemd-222.orig/src/sysv-generator/sysv-generator.c -+++ systemd-222/src/sysv-generator/sysv-generator.c -@@ -39,7 +39,8 @@ +Index: systemd-228/src/sysv-generator/sysv-generator.c +=================================================================== +--- systemd-228.orig/src/sysv-generator/sysv-generator.c ++++ systemd-228/src/sysv-generator/sysv-generator.c +@@ -46,7 +46,8 @@ typedef enum RunlevelType { RUNLEVEL_UP, @@ -22,7 +24,7 @@ activated even if symlinks exist in boot.d. Hmmm... -jengelh@inai.de] } RunlevelType; static const struct { -@@ -47,6 +48,9 @@ static const struct { +@@ -54,6 +55,9 @@ static const struct { const char *target; const RunlevelType type; } rcnd_table[] = { @@ -32,7 +34,7 @@ activated even if symlinks exist in boot.d. Hmmm... -jengelh@inai.de] /* Standard SysV runlevels for start-up */ { "rc1.d", SPECIAL_RESCUE_TARGET, RUNLEVEL_UP }, { "rc2.d", SPECIAL_MULTI_USER_TARGET, RUNLEVEL_UP }, -@@ -62,10 +66,10 @@ static const struct { +@@ -69,10 +73,10 @@ static const struct { directories in this order, and we want to make sure that sysv_start_priority is known when we first load the unit. And that value we only know from S links. Hence @@ -45,7 +47,7 @@ activated even if symlinks exist in boot.d. Hmmm... -jengelh@inai.de] typedef struct SysvStub { char *name; -@@ -243,6 +247,10 @@ static char *sysv_translate_name(const c +@@ -261,6 +265,10 @@ static char *sysv_translate_name(const c _cleanup_free_ char *c = NULL; char *res; @@ -56,21 +58,18 @@ activated even if symlinks exist in boot.d. Hmmm... -jengelh@inai.de] c = strdup(name); if (!c) return NULL; -@@ -859,10 +867,10 @@ static int set_dependencies_from_rcnd(co +@@ -882,7 +890,8 @@ static int set_dependencies_from_rcnd(co if (de->d_name[0] == 'S') { -- if (rcnd_table[i].type == RUNLEVEL_UP) { +- if (rcnd_table[i].type == RUNLEVEL_UP) + if (rcnd_table[i].type == RUNLEVEL_UP || + rcnd_table[i].type == RUNLEVEL_SYSINIT) - service->sysv_start_priority = - MAX(a*10 + b, service->sysv_start_priority); -- } + service->sysv_start_priority = MAX(a*10 + b, service->sysv_start_priority); r = set_ensure_allocated(&runlevel_services[i], NULL); - if (r < 0) -@@ -873,7 +881,8 @@ static int set_dependencies_from_rcnd(co - goto finish; +@@ -898,7 +907,8 @@ static int set_dependencies_from_rcnd(co + } } else if (de->d_name[0] == 'K' && - (rcnd_table[i].type == RUNLEVEL_DOWN)) { @@ -78,4 +77,4 @@ activated even if symlinks exist in boot.d. Hmmm... -jengelh@inai.de] + rcnd_table[i].type == RUNLEVEL_SYSINIT)) { r = set_ensure_allocated(&shutdown_services, NULL); - if (r < 0) + if (r < 0) { diff --git a/systemd-add-user-keep.patch b/systemd-add-user-keep.patch index a67fa47f..bc7985dc 100644 --- a/systemd-add-user-keep.patch +++ b/systemd-add-user-keep.patch @@ -1,35 +1,35 @@ --- man/tmpfiles.d.xml | 3 +++ - src/tmpfiles/tmpfiles.c | 47 ++++++++++++++++++++++++++++++++++++++++------- - 2 files changed, 43 insertions(+), 7 deletions(-) + src/tmpfiles/tmpfiles.c | 46 ++++++++++++++++++++++++++++++++++++++++------ + 2 files changed, 43 insertions(+), 6 deletions(-) -Index: systemd-221/man/tmpfiles.d.xml +Index: systemd-228/man/tmpfiles.d.xml =================================================================== ---- systemd-221.orig/man/tmpfiles.d.xml -+++ systemd-221/man/tmpfiles.d.xml -@@ -528,6 +528,9 @@ +--- systemd-228.orig/man/tmpfiles.d.xml ++++ systemd-228/man/tmpfiles.d.xml +@@ -599,6 +599,9 @@ f, F, and - w may be used to specify a short string that + w, the argument may be used to specify a short string that is written to the file, suffixed by a newline. For + x, X, a comma separated list of + usernames. If given, only paths belonging to these users will be excluded + during directory cleanup. Ignored for all other lines. For C, specifies the source file or - directory. For t, T + directory. For t and T, determines extended attributes to be set. For -Index: systemd-221/src/tmpfiles/tmpfiles.c +Index: systemd-228/src/tmpfiles/tmpfiles.c =================================================================== ---- systemd-221.orig/src/tmpfiles/tmpfiles.c -+++ systemd-221/src/tmpfiles/tmpfiles.c +--- systemd-228.orig/src/tmpfiles/tmpfiles.c ++++ systemd-228/src/tmpfiles/tmpfiles.c @@ -37,6 +37,7 @@ - #include #include - #include + #include + #include +#include - #include "log.h" - #include "util.h" -@@ -358,6 +359,7 @@ static int dir_cleanup( + #include "acl-util.h" + #include "alloc-util.h" +@@ -378,6 +379,7 @@ static int dir_cleanup( struct timespec times[2]; bool deleted = false; int r = 0; @@ -37,7 +37,7 @@ Index: systemd-221/src/tmpfiles/tmpfiles.c while ((dent = readdir(d))) { struct stat s; -@@ -408,14 +410,45 @@ static int dir_cleanup( +@@ -428,14 +430,46 @@ static int dir_cleanup( } /* Is there an item configured for this path? */ @@ -50,7 +50,7 @@ Index: systemd-221/src/tmpfiles/tmpfiles.c + found_glob = true; + found = find_glob(globs, sub_path); } -- + - if (find_glob(globs, sub_path)) { - log_debug("Ignoring \"%s\": a separate glob exists.", sub_path); - continue; diff --git a/systemd-mini.changes b/systemd-mini.changes index 4724b61e..0bc6aacf 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,75 @@ +------------------------------------------------------------------- +Sat Jan 9 22:46:21 UTC 2016 - afaerber@suse.de + +- systemd-sysv-install: Fix chkconfig argument for disable op + +------------------------------------------------------------------- +Thu Jan 7 08:01:07 UTC 2016 - olaf@aepfle.de + +- Create groups adm,input,tape in fixed order (boo#944660) + +------------------------------------------------------------------- +Mon Dec 21 16:25:44 UTC 2015 - fbui@suse.com + +- Make sure we don't use tmpfs on /tmp by default (bsc#940522) + +------------------------------------------------------------------- +Mon Dec 21 10:07:38 UTC 2015 - jengelh@inai.de + +- Avoid enabling readahead services; they have been removed. +- In %install, only process kbd-model-map.xkb-generated if it + exists. Resolves a build failure in 13.2/42.1. + +------------------------------------------------------------------- +Wed Dec 9 15:12:30 UTC 2015 - crrodriguez@opensuse.org + +- spec: update minimum kernel version to 3.11 +- Update minimum util-linux version to 2.27.1 + +------------------------------------------------------------------- +Mon Nov 30 13:59:52 UTC 2015 - thomas.blume@suse.com + +- fix CVE-2015-7510: Stack overflow in nss-mymachines (boo#956712) + Add 0001-nss-mymachines-do-not-allow-overlong-machine-names.patch + +------------------------------------------------------------------- +Wed Nov 18 14:17:05 UTC 2015 - jengelh@inai.de + +- Update to new upstream release 228 +* The various memory-related resource limit settings (such as + LimitAS=) now understand the usual K, M, G, ... suffixes to + the base of 1024 (IEC). Similar, the time-related settings + understand the usual min, h, day, ... suffixes now. +* CPUAffinity= now takes CPU index ranges in addition to just + individual indexes. +* A number of properties previously only settable in unit + files are now also available as properties to set when + creating transient units programmatically via the bus. +- Remove 0001-Make-sure-the-mount-units-pulled-by-RequiresMountsFo.patch + (merged upstream) + +------------------------------------------------------------------- +Fri Nov 13 00:00:12 UTC 2015 - sor.alexei@meowr.ru + +- Update to 227. +- Rebase systemd-pam_config.patch, + handle-root_uses_lang-value-in-etc-sysconfig-language.patch, + 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch, + 0001-On_s390_con3270_disable_ANSI_colour_esc.patch, + 0014-journald-with-journaling-FS.patch, + 0019-make-completion-smart-to-be-able-to-redirect.patch, + avoid-divide-by-zero-sigtrap.patch, systemd-add-user-keep.patch, + set-and-use-default-logconsole.patch, + tty-ask-password-agent-on-console.patch, + 0001-bnc888612-logind-polkit-acpi.patch, + watch_resolv.conf_for_become_changed.patch, + 1097-udevd-increase-maximum-number-of-children.patch. +- Remove + 0002-units-enable-waiting-for-unit-termination-in-certain.patch, + 1001-re-enable-by_path-links-for-ata-devices.patch, + rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch: + fixed upstream. + ------------------------------------------------------------------- Thu Nov 12 09:56:36 UTC 2015 - werner@suse.de diff --git a/systemd-mini.spec b/systemd-mini.spec index 84245e76..9a6c9af5 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -1,7 +1,7 @@ # # spec file for package systemd-mini # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -21,7 +21,7 @@ ##### WARNING: please do not edit this auto generated spec file. Use the systemd.spec! ##### %define mini -mini %define real systemd -%define min_kernel_version 3.7 +%define min_kernel_version 3.11 %bcond_without bash_completion %bcond_without networkd @@ -42,7 +42,7 @@ Name: systemd-mini Url: http://www.freedesktop.org/wiki/Software/systemd -Version: 224 +Version: 228 Release: 0 Summary: A System and Session Manager License: LGPL-2.1+ @@ -71,7 +71,8 @@ BuildRequires: pkgconfig(blkid) >= 2.26 BuildRequires: pkgconfig(libkmod) >= 15 BuildRequires: pkgconfig(liblzma) BuildRequires: pkgconfig(libpci) >= 3 -BuildRequires: pkgconfig(mount) >= 2.26 +#XXX: change to 2.27.1 when pkgconfig file is fixed upstream +BuildRequires: pkgconfig(mount) >= 2.27 %ifarch aarch64 %ix86 x86_64 x32 %arm ppc64le s390x BuildRequires: pkgconfig(libseccomp) %endif @@ -112,7 +113,7 @@ BuildRequires: pam-config >= 0.79-5 Requires: pwdutils Requires: systemd-presets-branding Requires: sysvinit-tools -Requires: util-linux >= 2.26 +Requires: util-linux >= 2.27.1 Requires(post): coreutils Requires(post): findutils Requires(post): pam-config >= 0.79-5 @@ -176,16 +177,10 @@ Patch42: systemd-pam_config.patch # Never add any patches to this package without the upstream commit id # in the patch. Any patches added here without a very good reason to make # an exception will be silently removed with the next version update. -# PATCH-FIX-UPSTREAM rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch rjschwei@suse.com -- add lid switch of ARM based Chromebook as a power switch to logind -Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.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 Patch86: 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch -# PATCH-FIX-UPSTREAM (boo#949574) -Patch87: 0001-Make-sure-the-mount-units-pulled-by-RequiresMountsFo.patch -# PATCH-FIX-UPSTREAM (bsc#932284) -Patch88: 0002-units-enable-waiting-for-unit-termination-in-certain.patch # PATCH-FIX-SUSE 0001-On_s390_con3270_disable_ANSI_colour_esc.patch Patch90: 0001-On_s390_con3270_disable_ANSI_colour_esc.patch # PATCH-FIX-SUSE plymouth-quit-and-wait-for-emergency-service.patch -- Make sure that no plymouthd is locking the tty @@ -251,6 +246,8 @@ Patch521: kbd-model-map.patch Patch522: Correct_assert_on_unexpected_error_code.patch # PATCH-FIX-SUSE Do not stress the kernel's vc ioctls (boo#904214) Patch523: let-vconsole-setup-get-properties-only-once-to-copy-them.patch +# PATCH-FIX-UPSTREAM (bsc#956712) +Patch524: 0001-nss-mymachines-do-not-allow-overlong-machine-names.patch # UDEV PATCHES # ============ @@ -260,8 +257,6 @@ Patch523: let-vconsole-setup-get-properties-only-once-to-copy-them.patch # as it's not changing the code of udev and libudev, then is not a udev # patch. Further patches which add and/or changes udev rules. -# 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 Patch1002: 1002-rules-create-by-id-scsi-links-for-ATA-devices.patch # PATCH-FIX-OPENSUSE 1003-udev-netlink-null-rules.patch @@ -557,8 +552,6 @@ cp %{SOURCE7} m4/ %patch42 -p1 %patch84 -p1 %patch86 -p1 -%patch87 -p1 -%patch88 -p1 %patch90 -p1 %patch91 -p1 %patch120 -p1 @@ -587,17 +580,14 @@ cp %{SOURCE7} m4/ %patch386 -p1 %patch430 -p1 %patch475 -p1 -%ifarch %arm -%patch38 -p1 -%endif %patch490 -p1 %patch520 -p1 %patch521 -p1 -%patch522 -p0 +%patch522 -p1 %patch523 -p0 +%patch524 -p1 # udev patches -%patch1001 -p1 %patch1002 -p1 %patch1003 -p1 %patch1005 -p1 @@ -726,7 +716,7 @@ make %{?_smp_mflags} update-man-list man %endif %install -make install DESTDIR="%buildroot" +%make_install install -pm0755 "%_sourcedir/systemd-sysv-install" "%buildroot/%_prefix/lib/systemd/" # move to %{_lib} @@ -767,8 +757,11 @@ ln -s ../usr/bin/systemctl %{buildroot}/sbin/runlevel rm -rf %{buildroot}/etc/systemd/system/*.target.wants rm -f %{buildroot}/etc/systemd/system/default.target -# don't mount /tmp as tmpfs for now +# We keep a copy of tmp.mount because it may be removed if not used +# (see %post): we want to be sure tmpfs won't be used for /tmp by +# default on Suse distros. rm %{buildroot}/%{_prefix}/lib/systemd/system/local-fs.target.wants/tmp.mount +cp %{buildroot}/%{_prefix}/lib/systemd/system/tmp.mount %{buildroot}/%{_datadir}/systemd/ # don't enable wall ask password service, it spams every console (bnc#747783) rm %{buildroot}%{_prefix}/lib/systemd/system/multi-user.target.wants/systemd-ask-password-wall.path @@ -899,8 +892,10 @@ done # add entries for xkeyboard-config converted keymaps; mappings, # which already exist in original systemd mapping table are being # ignored though, i.e. not overwritten -cat /usr/share/systemd/kbd-model-map.xkb-generated \ - >> %{buildroot}//usr/share/systemd/kbd-model-map +if [ -f /usr/share/systemd/kbd-model-map.xkb-generated ]; then + cat /usr/share/systemd/kbd-model-map.xkb-generated \ + >>"%buildroot/usr/share/systemd/kbd-model-map" +fi %find_lang systemd @@ -910,6 +905,11 @@ do getent group systemd-$name >/dev/null && continue groupadd -r systemd-$name || : done +for name in adm input tape +do + getent group $name >/dev/null && continue + groupadd -r $name || : +done for name in timesync network resolve bus-proxy do getent passwd systemd-$name >/dev/null && continue @@ -956,12 +956,13 @@ fi # Create default config in /etc at first install. # Later package updates should not overwrite these settings. if [ "$1" -eq 1 ]; then - # Enable these services by default. - /usr/bin/systemctl enable \ - getty@tty1.service \ - systemd-readahead-collect.service \ - systemd-readahead-replay.service \ - remote-fs.target || : + # Enable these services by default. + # Specifying multiple units can cause the entire operation to not + # execute if one of them is missing, so run systemctl with one unit + # at a time only. + for i in getty@tty1.service remote-fs.target; do + /usr/bin/systemctl enable "$i" || : + done fi # since v207 /etc/sysctl.conf is no longer parsed, however @@ -976,6 +977,16 @@ for f in $(find /etc/systemd/system -type l -xtype l); do [ -f "$new_target" ] && ln -s -f $new_target $f || : done +# Keep tmp.mount if it's been enabled explicitly by the user otherwise +# make sure it wont be activated since it's the default for Suse +# distros. This unit can be pulled (implicitely) in various ways +# (private /tmp, etc..) and it's required by the basic.target +# explicitly since v220. +case $(/usr/bin/systemctl is-enabled tmp.mount 2>/dev/null) in +enabled) ;; +*) rm -f %{_prefix}/lib/systemd/system/tmp.mount +esac + %postun /sbin/ldconfig if [ $1 -ge 1 ]; then diff --git a/systemd-pam_config.patch b/systemd-pam_config.patch index 469004d3..7850822e 100644 --- a/systemd-pam_config.patch +++ b/systemd-pam_config.patch @@ -1,16 +1,32 @@ ---- - src/login/systemd-user | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: systemd-221/src/login/systemd-user +Index: systemd-227/factory/etc/pam.d/other =================================================================== ---- systemd-221.orig/src/login/systemd-user -+++ systemd-221/src/login/systemd-user -@@ -2,5 +2,5 @@ +--- systemd-227.orig/factory/etc/pam.d/other ++++ systemd-227/factory/etc/pam.d/other +@@ -1,6 +1,6 @@ + # This file is part of systemd. + +-auth include system-auth +-account include system-auth +-password include system-auth +-session include system-auth ++auth include common-auth ++account include common-account ++password include common-password ++session include common-session +Index: systemd-227/src/login/systemd-user.m4 +=================================================================== +--- systemd-227.orig/src/login/systemd-user.m4 ++++ systemd-227/src/login/systemd-user.m4 +@@ -2,10 +2,10 @@ # # Used by systemd --user instances. -account include system-auth --session include system-auth +account include common-account + + m4_ifdef(`HAVE_SELINUX', + session required pam_selinux.so close + session required pam_selinux.so nottys open + )m4_dnl +-session include system-auth +session include common-session diff --git a/systemd-sysv-install b/systemd-sysv-install index d116728e..4c985a55 100644 --- a/systemd-sysv-install +++ b/systemd-sysv-install @@ -20,7 +20,7 @@ ROOT="${ROOT:+--root=$ROOT}" [ -n "$NAME" ] || usage case "$1" in enable) chkconfig $ROOT -a "$NAME" ;; - disable) chkconfig $ROOT -r "$NAME" ;; + disable) chkconfig $ROOT -d "$NAME" ;; is-enabled) chkconfig $ROOT -t "$NAME" ;; *) usage ;; esac diff --git a/systemd-tmp-safe-defaults.patch b/systemd-tmp-safe-defaults.patch index e114231e..1233b3b2 100644 --- a/systemd-tmp-safe-defaults.patch +++ b/systemd-tmp-safe-defaults.patch @@ -8,19 +8,19 @@ SUSE policy is to not clean /tmp by default. tmpfiles.d/tmp.conf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -Index: systemd-221/tmpfiles.d/tmp.conf +Index: systemd-228/tmpfiles.d/tmp.conf =================================================================== ---- systemd-221.orig/tmpfiles.d/tmp.conf -+++ systemd-221/tmpfiles.d/tmp.conf +--- systemd-228.orig/tmpfiles.d/tmp.conf ++++ systemd-228/tmpfiles.d/tmp.conf @@ -8,8 +8,9 @@ # See tmpfiles.d(5) for details # Clear tmp directories separately, to make them easier to override --v /tmp 1777 root root 10d --v /var/tmp 1777 root root 30d -+# SUSE policy: we don't clean those directories -+v /tmp 1777 root root - -+v /var/tmp 1777 root root - +-q /tmp 1777 root root 10d +-q /var/tmp 1777 root root 30d ++# SUSE policy: we do not clean these directories ++q /tmp 1777 root root - ++q /var/tmp 1777 root root - # Exclude namespace mountpoints created with PrivateTmp=yes x /tmp/systemd-private-%b-* diff --git a/systemd.changes b/systemd.changes index 4724b61e..3be3a5fe 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,81 @@ +------------------------------------------------------------------- +Sat Jan 9 22:46:21 UTC 2016 - afaerber@suse.de + +- systemd-sysv-install: Fix chkconfig argument for disable op + +------------------------------------------------------------------- +Thu Jan 7 08:01:07 UTC 2016 - olaf@aepfle.de + +- Create groups adm,input,tape in fixed order (boo#944660) + +------------------------------------------------------------------- +Mon Dec 21 16:25:44 UTC 2015 - fbui@suse.com + +- Make sure we don't use tmpfs on /tmp by default (bsc#940522) + +------------------------------------------------------------------- +Mon Dec 21 10:07:38 UTC 2015 - jengelh@inai.de + +- Avoid enabling readahead services; they have been removed. +- In %install, only process kbd-model-map.xkb-generated if it + exists. Resolves a build failure in 13.2/42.1. + +------------------------------------------------------------------- +Wed Dec 9 15:12:30 UTC 2015 - crrodriguez@opensuse.org + +- spec: update minimum kernel version to 3.11 +- Update minimum util-linux version to 2.27.1 + +------------------------------------------------------------------- +Thu Dec 3 15:33:27 UTC 2015 - tchvatal@suse.com + +- Add patch to enable working steam controller: + * 1099-Add-default-rules-for-valve-steam-controller-to-work.patch + +------------------------------------------------------------------- +Mon Nov 30 13:59:52 UTC 2015 - thomas.blume@suse.com + +- fix CVE-2015-7510: Stack overflow in nss-mymachines (boo#956712) + Add 0001-nss-mymachines-do-not-allow-overlong-machine-names.patch + +------------------------------------------------------------------- +Wed Nov 18 14:17:05 UTC 2015 - jengelh@inai.de + +- Update to new upstream release 228 +* The various memory-related resource limit settings (such as + LimitAS=) now understand the usual K, M, G, ... suffixes to + the base of 1024 (IEC). Similar, the time-related settings + understand the usual min, h, day, ... suffixes now. +* CPUAffinity= now takes CPU index ranges in addition to just + individual indexes. +* A number of properties previously only settable in unit + files are now also available as properties to set when + creating transient units programmatically via the bus. +- Remove 0001-Make-sure-the-mount-units-pulled-by-RequiresMountsFo.patch + (merged upstream) + +------------------------------------------------------------------- +Fri Nov 13 00:00:12 UTC 2015 - sor.alexei@meowr.ru + +- Update to 227. +- Rebase systemd-pam_config.patch, + handle-root_uses_lang-value-in-etc-sysconfig-language.patch, + 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch, + 0001-On_s390_con3270_disable_ANSI_colour_esc.patch, + 0014-journald-with-journaling-FS.patch, + 0019-make-completion-smart-to-be-able-to-redirect.patch, + avoid-divide-by-zero-sigtrap.patch, systemd-add-user-keep.patch, + set-and-use-default-logconsole.patch, + tty-ask-password-agent-on-console.patch, + 0001-bnc888612-logind-polkit-acpi.patch, + watch_resolv.conf_for_become_changed.patch, + 1097-udevd-increase-maximum-number-of-children.patch. +- Remove + 0002-units-enable-waiting-for-unit-termination-in-certain.patch, + 1001-re-enable-by_path-links-for-ata-devices.patch, + rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch: + fixed upstream. + ------------------------------------------------------------------- Thu Nov 12 09:56:36 UTC 2015 - werner@suse.de diff --git a/systemd.spec b/systemd.spec index 674e6fc6..52c9e1d6 100644 --- a/systemd.spec +++ b/systemd.spec @@ -1,7 +1,7 @@ # # spec file for package systemd # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,7 +19,7 @@ %define bootstrap 0 %define mini %nil %define real systemd -%define min_kernel_version 3.7 +%define min_kernel_version 3.11 %bcond_without bash_completion %bcond_without networkd @@ -40,7 +40,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd -Version: 224 +Version: 228 Release: 0 Summary: A System and Session Manager License: LGPL-2.1+ @@ -66,7 +66,8 @@ BuildRequires: pkgconfig(blkid) >= 2.26 BuildRequires: pkgconfig(libkmod) >= 15 BuildRequires: pkgconfig(liblzma) BuildRequires: pkgconfig(libpci) >= 3 -BuildRequires: pkgconfig(mount) >= 2.26 +#XXX: change to 2.27.1 when pkgconfig file is fixed upstream +BuildRequires: pkgconfig(mount) >= 2.27 %ifarch aarch64 %ix86 x86_64 x32 %arm ppc64le s390x BuildRequires: pkgconfig(libseccomp) %endif @@ -107,7 +108,7 @@ BuildRequires: pam-config >= 0.79-5 Requires: pwdutils Requires: systemd-presets-branding Requires: sysvinit-tools -Requires: util-linux >= 2.26 +Requires: util-linux >= 2.27.1 Requires(post): coreutils Requires(post): findutils Requires(post): pam-config >= 0.79-5 @@ -171,16 +172,10 @@ Patch42: systemd-pam_config.patch # Never add any patches to this package without the upstream commit id # in the patch. Any patches added here without a very good reason to make # an exception will be silently removed with the next version update. -# PATCH-FIX-UPSTREAM rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch rjschwei@suse.com -- add lid switch of ARM based Chromebook as a power switch to logind -Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.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 Patch86: 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch -# PATCH-FIX-UPSTREAM (boo#949574) -Patch87: 0001-Make-sure-the-mount-units-pulled-by-RequiresMountsFo.patch -# PATCH-FIX-UPSTREAM (bsc#932284) -Patch88: 0002-units-enable-waiting-for-unit-termination-in-certain.patch # PATCH-FIX-SUSE 0001-On_s390_con3270_disable_ANSI_colour_esc.patch Patch90: 0001-On_s390_con3270_disable_ANSI_colour_esc.patch # PATCH-FIX-SUSE plymouth-quit-and-wait-for-emergency-service.patch -- Make sure that no plymouthd is locking the tty @@ -246,6 +241,8 @@ Patch521: kbd-model-map.patch Patch522: Correct_assert_on_unexpected_error_code.patch # PATCH-FIX-SUSE Do not stress the kernel's vc ioctls (boo#904214) Patch523: let-vconsole-setup-get-properties-only-once-to-copy-them.patch +# PATCH-FIX-UPSTREAM (bsc#956712) +Patch524: 0001-nss-mymachines-do-not-allow-overlong-machine-names.patch # UDEV PATCHES # ============ @@ -255,8 +252,6 @@ Patch523: let-vconsole-setup-get-properties-only-once-to-copy-them.patch # as it's not changing the code of udev and libudev, then is not a udev # patch. Further patches which add and/or changes udev rules. -# 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 Patch1002: 1002-rules-create-by-id-scsi-links-for-ATA-devices.patch # PATCH-FIX-OPENSUSE 1003-udev-netlink-null-rules.patch @@ -289,8 +284,10 @@ Patch1096: 1096-new-udev-root-symlink-generator.patch Patch1097: 1097-udevd-increase-maximum-number-of-children.patch # PATCH-FIX-OPENSUSE 1098-systemd-networkd-alias-network-service.patch Patch1098: 1098-systemd-networkd-alias-network-service.patch +# PATCH-FIX-OPENSUSE 1099-Add-default-rules-for-valve-steam-controller-to-work.patch +Patch1099: 1099-Add-default-rules-for-valve-steam-controller-to-work.patch # PATCH-FIX-OPENSUSE hostname-NULL.patch - fix crash on xen build hosts in OBS Marcus Meissner -Patch1099: hostname-NULL.patch +Patch1100: hostname-NULL.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -552,8 +549,6 @@ cp %{SOURCE7} m4/ %patch42 -p1 %patch84 -p1 %patch86 -p1 -%patch87 -p1 -%patch88 -p1 %patch90 -p1 %patch91 -p1 %patch120 -p1 @@ -582,17 +577,14 @@ cp %{SOURCE7} m4/ %patch386 -p1 %patch430 -p1 %patch475 -p1 -%ifarch %arm -%patch38 -p1 -%endif %patch490 -p1 %patch520 -p1 %patch521 -p1 -%patch522 -p0 +%patch522 -p1 %patch523 -p0 +%patch524 -p1 # udev patches -%patch1001 -p1 %patch1002 -p1 %patch1003 -p1 %patch1005 -p1 @@ -612,6 +604,7 @@ cp %{SOURCE7} m4/ %patch1097 -p1 %patch1098 -p1 %patch1099 -p1 +%patch1100 -p1 # # In combination with Patch352 set-and-use-default-logconsole.patch @@ -721,7 +714,7 @@ make %{?_smp_mflags} update-man-list man %endif %install -make install DESTDIR="%buildroot" +%make_install install -pm0755 "%_sourcedir/systemd-sysv-install" "%buildroot/%_prefix/lib/systemd/" # move to %{_lib} @@ -762,8 +755,11 @@ ln -s ../usr/bin/systemctl %{buildroot}/sbin/runlevel rm -rf %{buildroot}/etc/systemd/system/*.target.wants rm -f %{buildroot}/etc/systemd/system/default.target -# don't mount /tmp as tmpfs for now +# We keep a copy of tmp.mount because it may be removed if not used +# (see %post): we want to be sure tmpfs won't be used for /tmp by +# default on Suse distros. rm %{buildroot}/%{_prefix}/lib/systemd/system/local-fs.target.wants/tmp.mount +cp %{buildroot}/%{_prefix}/lib/systemd/system/tmp.mount %{buildroot}/%{_datadir}/systemd/ # don't enable wall ask password service, it spams every console (bnc#747783) rm %{buildroot}%{_prefix}/lib/systemd/system/multi-user.target.wants/systemd-ask-password-wall.path @@ -894,8 +890,10 @@ done # add entries for xkeyboard-config converted keymaps; mappings, # which already exist in original systemd mapping table are being # ignored though, i.e. not overwritten -cat /usr/share/systemd/kbd-model-map.xkb-generated \ - >> %{buildroot}//usr/share/systemd/kbd-model-map +if [ -f /usr/share/systemd/kbd-model-map.xkb-generated ]; then + cat /usr/share/systemd/kbd-model-map.xkb-generated \ + >>"%buildroot/usr/share/systemd/kbd-model-map" +fi %find_lang systemd @@ -905,6 +903,11 @@ do getent group systemd-$name >/dev/null && continue groupadd -r systemd-$name || : done +for name in adm input tape +do + getent group $name >/dev/null && continue + groupadd -r $name || : +done for name in timesync network resolve bus-proxy do getent passwd systemd-$name >/dev/null && continue @@ -951,12 +954,13 @@ fi # Create default config in /etc at first install. # Later package updates should not overwrite these settings. if [ "$1" -eq 1 ]; then - # Enable these services by default. - /usr/bin/systemctl enable \ - getty@tty1.service \ - systemd-readahead-collect.service \ - systemd-readahead-replay.service \ - remote-fs.target || : + # Enable these services by default. + # Specifying multiple units can cause the entire operation to not + # execute if one of them is missing, so run systemctl with one unit + # at a time only. + for i in getty@tty1.service remote-fs.target; do + /usr/bin/systemctl enable "$i" || : + done fi # since v207 /etc/sysctl.conf is no longer parsed, however @@ -971,6 +975,16 @@ for f in $(find /etc/systemd/system -type l -xtype l); do [ -f "$new_target" ] && ln -s -f $new_target $f || : done +# Keep tmp.mount if it's been enabled explicitly by the user otherwise +# make sure it wont be activated since it's the default for Suse +# distros. This unit can be pulled (implicitely) in various ways +# (private /tmp, etc..) and it's required by the basic.target +# explicitly since v220. +case $(/usr/bin/systemctl is-enabled tmp.mount 2>/dev/null) in +enabled) ;; +*) rm -f %{_prefix}/lib/systemd/system/tmp.mount +esac + %postun /sbin/ldconfig if [ $1 -ge 1 ]; then diff --git a/tty-ask-password-agent-on-console.patch b/tty-ask-password-agent-on-console.patch index 9490adc2..f96fc24b 100644 --- a/tty-ask-password-agent-on-console.patch +++ b/tty-ask-password-agent-on-console.patch @@ -26,13 +26,13 @@ Spwan for each device of the system console /dev/console a own process. Replace the system call wait() with with system call waitid(). --- - src/tty-ask-password-agent.c | 264 ++++++++++++++++++++- - 1 file changed, 255 insertions(+), 9 deletions(-) + src/tty-ask-password-agent/tty-ask-password-agent.c | 264 +++++++++++++++++++- + 1 file changed, 254 insertions(+), 10 deletions(-) -diff --git src/tty-ask-password-agent/tty-ask-password-agent.c src/tty-ask-password-agent/tty-ask-password-agent.c -index 4630eb9..df4bada 100644 ---- a/src/tty-ask-password-agent/tty-ask-password-agent.c -+++ b/src/tty-ask-password-agent/tty-ask-password-agent.c +Index: systemd-228/src/tty-ask-password-agent/tty-ask-password-agent.c +=================================================================== +--- systemd-228.orig/src/tty-ask-password-agent/tty-ask-password-agent.c ++++ systemd-228/src/tty-ask-password-agent/tty-ask-password-agent.c @@ -4,6 +4,7 @@ This file is part of systemd. @@ -41,26 +41,26 @@ index 4630eb9..df4bada 100644 systemd is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by -@@ -31,6 +32,9 @@ - #include - #include +@@ -21,6 +22,9 @@ + + #include #include +#include +#include +#include - - #include "util.h" - #include "mkdir.h" -@@ -45,6 +49,8 @@ - #include "process-util.h" + #include + #include + #include +@@ -49,6 +53,8 @@ #include "terminal-util.h" - #include "signal-util.h" + #include "util.h" + #include "utmp-wtmp.h" +#include "fileio.h" +#include "macro.h" static enum { ACTION_LIST, -@@ -53,8 +59,21 @@ static enum { +@@ -57,8 +63,21 @@ static enum { ACTION_WALL } arg_action = ACTION_QUERY; @@ -82,8 +82,8 @@ index 4630eb9..df4bada 100644 static int ask_password_plymouth( const char *message, -@@ -211,6 +230,80 @@ static int ask_password_plymouth( - return 0; +@@ -240,6 +259,80 @@ finish: + return r; } +static void free_consoles(struct console *con, unsigned int num) { @@ -162,17 +162,17 @@ index 4630eb9..df4bada 100644 + static int parse_password(const char *filename, char **wall) { _cleanup_free_ char *socket_name = NULL, *message = NULL, *packet = NULL; - uint64_t not_after = 0; -@@ -311,7 +404,7 @@ static int parse_password(const char *fi - _cleanup_free_ char *password = NULL; + bool accept_cached = false, echo = false; +@@ -340,7 +433,7 @@ static int parse_password(const char *fi + int tty_fd = -1; if (arg_console) { - tty_fd = acquire_terminal("/dev/console", false, false, false, USEC_INFINITY); + tty_fd = acquire_terminal(current_dev, false, false, false, USEC_INFINITY); if (tty_fd < 0) - return tty_fd; - } -@@ -554,7 +647,7 @@ static int parse_argv(int argc, char *ar + return log_error_errno(tty_fd, "Failed to acquire /dev/console: %m"); + +@@ -601,7 +694,7 @@ static int parse_argv(int argc, char *ar { "watch", no_argument, NULL, ARG_WATCH }, { "wall", no_argument, NULL, ARG_WALL }, { "plymouth", no_argument, NULL, ARG_PLYMOUTH }, @@ -181,7 +181,7 @@ index 4630eb9..df4bada 100644 {} }; -@@ -598,6 +691,10 @@ static int parse_argv(int argc, char *ar +@@ -643,6 +736,10 @@ static int parse_argv(int argc, char *ar case ARG_CONSOLE: arg_console = true; @@ -192,7 +192,7 @@ index 4630eb9..df4bada 100644 break; case '?': -@@ -612,9 +709,143 @@ static int parse_argv(int argc, char *ar +@@ -657,9 +754,143 @@ static int parse_argv(int argc, char *ar return -EINVAL; } @@ -336,16 +336,16 @@ index 4630eb9..df4bada 100644 int main(int argc, char *argv[]) { int r; -@@ -628,15 +859,28 @@ int main(int argc, char *argv[]) { +@@ -673,16 +904,29 @@ int main(int argc, char *argv[]) { if (r <= 0) goto finish; - if (arg_console) { -- setsid(); -- release_terminal(); +- (void) setsid(); +- (void) release_terminal(); + if (arg_console && !arg_device) + /* -+ * Spwan for each console device a own process ++ * Spawn for each console device a own process + */ + r = ask_on_consoles(argc, argv); + else { @@ -365,15 +365,12 @@ index 4630eb9..df4bada 100644 + else + r = show_passwords(); } -- + - if (IN_SET(arg_action, ACTION_WATCH, ACTION_WALL)) - r = watch_passwords(); - else - r = show_passwords(); - - if (r < 0) - log_error_errno(r, "Error: %m"); - --- -2.2.0 - +- + finish: + return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; + } diff --git a/use-rndaddentropy-ioctl-to-load-random-seed.patch b/use-rndaddentropy-ioctl-to-load-random-seed.patch index 8df39ad4..2e655400 100644 --- a/use-rndaddentropy-ioctl-to-load-random-seed.patch +++ b/use-rndaddentropy-ioctl-to-load-random-seed.patch @@ -8,21 +8,20 @@ Related to bnc#892096 src/random-seed/random-seed.c | 71 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 61 insertions(+), 10 deletions(-) -Index: systemd-221/src/random-seed/random-seed.c +Index: systemd-228/src/random-seed/random-seed.c =================================================================== ---- systemd-221.orig/src/random-seed/random-seed.c -+++ systemd-221/src/random-seed/random-seed.c -@@ -22,7 +22,9 @@ - #include - #include - #include -+#include +--- systemd-228.orig/src/random-seed/random-seed.c ++++ systemd-228/src/random-seed/random-seed.c +@@ -24,6 +24,8 @@ #include -+#include #include + #include ++#include ++#include - #include "log.h" -@@ -32,8 +34,8 @@ + #include "alloc-util.h" + #include "fd-util.h" +@@ -36,8 +38,8 @@ #define POOL_SIZE_MIN 512 int main(int argc, char *argv[]) { @@ -33,7 +32,7 @@ Index: systemd-221/src/random-seed/random-seed.c size_t buf_size = 0; ssize_t k; int r; -@@ -65,11 +67,12 @@ int main(int argc, char *argv[]) { +@@ -68,11 +70,12 @@ int main(int argc, char *argv[]) { if (buf_size <= POOL_SIZE_MIN) buf_size = POOL_SIZE_MIN; @@ -48,7 +47,7 @@ Index: systemd-221/src/random-seed/random-seed.c r = mkdir_parents_label(RANDOM_SEED, 0755); if (r < 0) { -@@ -83,6 +86,23 @@ int main(int argc, char *argv[]) { +@@ -86,6 +89,23 @@ int main(int argc, char *argv[]) { if (streq(argv[1], "load")) { @@ -72,7 +71,7 @@ Index: systemd-221/src/random-seed/random-seed.c seed_fd = open(RANDOM_SEED, O_RDWR|O_CLOEXEC|O_NOCTTY|O_CREAT, 0600); if (seed_fd < 0) { seed_fd = open(RANDOM_SEED, O_RDONLY|O_CLOEXEC|O_NOCTTY); -@@ -103,7 +123,7 @@ int main(int argc, char *argv[]) { +@@ -106,7 +126,7 @@ int main(int argc, char *argv[]) { } } @@ -81,7 +80,7 @@ Index: systemd-221/src/random-seed/random-seed.c if (k < 0) r = log_error_errno(k, "Failed to read seed from " RANDOM_SEED ": %m"); else if (k == 0) -@@ -111,13 +131,29 @@ int main(int argc, char *argv[]) { +@@ -114,13 +134,29 @@ int main(int argc, char *argv[]) { else { (void) lseek(seed_fd, 0, SEEK_SET); @@ -114,7 +113,7 @@ Index: systemd-221/src/random-seed/random-seed.c seed_fd = open(RANDOM_SEED, O_WRONLY|O_CLOEXEC|O_NOCTTY|O_CREAT, 0600); if (seed_fd < 0) { r = log_error_errno(errno, "Failed to open " RANDOM_SEED ": %m"); -@@ -130,6 +166,21 @@ int main(int argc, char *argv[]) { +@@ -133,6 +169,21 @@ int main(int argc, char *argv[]) { goto finish; } @@ -136,7 +135,7 @@ Index: systemd-221/src/random-seed/random-seed.c } else { log_error("Unknown verb '%s'.", argv[1]); r = -EINVAL; -@@ -144,7 +195,7 @@ int main(int argc, char *argv[]) { +@@ -147,7 +198,7 @@ int main(int argc, char *argv[]) { (void) fchmod(seed_fd, 0600); (void) fchown(seed_fd, 0, 0); @@ -145,7 +144,7 @@ Index: systemd-221/src/random-seed/random-seed.c if (k < 0) { r = log_error_errno(k, "Failed to read new seed from /dev/urandom: %m"); goto finish; -@@ -155,7 +206,7 @@ int main(int argc, char *argv[]) { +@@ -158,7 +209,7 @@ int main(int argc, char *argv[]) { goto finish; } diff --git a/v224.tar.gz b/v224.tar.gz deleted file mode 100644 index d4d491a2..00000000 --- a/v224.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0d7ac1532a57639fbc828f8a5051a090883c6ad2908618a7a13ab386db831bfc -size 3868075 diff --git a/v228.tar.gz b/v228.tar.gz new file mode 100644 index 00000000..84f9e59d --- /dev/null +++ b/v228.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd124ff561a07e6439ed2b3713f38ca914df7747f110ce86deea17b56d245ae6 +size 4034401 diff --git a/watch_resolv.conf_for_become_changed.patch b/watch_resolv.conf_for_become_changed.patch index fcc01432..e6df8c6e 100644 --- a/watch_resolv.conf_for_become_changed.patch +++ b/watch_resolv.conf_for_become_changed.patch @@ -3,19 +3,19 @@ src/core/manager.h | 5 ++ 2 files changed, 98 insertions(+) -Index: systemd-221/src/core/manager.c +Index: systemd-227/src/core/manager.c =================================================================== ---- systemd-221.orig/src/core/manager.c -+++ systemd-221/src/core/manager.c +--- systemd-227.orig/src/core/manager.c ++++ systemd-227/src/core/manager.c @@ -32,6 +32,7 @@ - #include - #include #include + #include + #include +#include #ifdef HAVE_AUDIT #include -@@ -308,6 +309,91 @@ static int manager_check_ask_password(Ma +@@ -294,6 +295,91 @@ static int manager_check_ask_password(Ma return m->have_ask_password; } @@ -107,15 +107,15 @@ Index: systemd-221/src/core/manager.c static int manager_watch_idle_pipe(Manager *m) { int r; -@@ -585,6 +671,7 @@ int manager_new(ManagerRunningAs running - m->pin_cgroupfs_fd = m->notify_fd = m->signal_fd = m->time_change_fd = m->dev_autofs_fd = m->private_listen_fd = m->kdbus_fd = m->utab_inotify_fd = -1; +@@ -576,6 +662,7 @@ int manager_new(ManagerRunningAs running + m->current_job_id = 1; /* start as id #1, so that we can leave #0 around as "null-like" value */ + m->resolv_conf_inotify_fd = -1; m->ask_password_inotify_fd = -1; m->have_ask_password = -EINVAL; /* we don't know */ - -@@ -651,6 +738,10 @@ int manager_new(ManagerRunningAs running + m->first_boot = -1; +@@ -637,6 +724,10 @@ int manager_new(ManagerRunningAs running if (r < 0) goto fail; @@ -126,7 +126,7 @@ Index: systemd-221/src/core/manager.c m->udev = udev_new(); if (!m->udev) { r = -ENOMEM; -@@ -929,6 +1020,8 @@ Manager* manager_free(Manager *m) { +@@ -914,6 +1005,8 @@ Manager* manager_free(Manager *m) { if (!m) return NULL; @@ -135,13 +135,13 @@ Index: systemd-221/src/core/manager.c manager_clear_jobs_and_units(m); for (c = 0; c < _UNIT_TYPE_MAX; c++) -Index: systemd-221/src/core/manager.h +Index: systemd-227/src/core/manager.h =================================================================== ---- systemd-221.orig/src/core/manager.h -+++ systemd-221/src/core/manager.h -@@ -181,6 +181,11 @@ struct Manager { - int utab_inotify_fd; - sd_event_source *mount_utab_event_source; +--- systemd-227.orig/src/core/manager.h ++++ systemd-227/src/core/manager.h +@@ -180,6 +180,11 @@ struct Manager { + struct libmnt_monitor *mount_monitor; + sd_event_source *mount_event_source; + /* Watch out any change of /etc/resolv.conf */ + int resolv_conf_inotify_fd; From e3627545a26ab14ddf877e5002985524d137ee371e98348687c27acd24b633a6 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 16 Mar 2016 09:23:42 +0000 Subject: [PATCH 2/4] Accepting request 368139 from Base:System Automatic submission by obs-autosubmit OBS-URL: https://build.opensuse.org/request/show/368139 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=229 --- ...-.slice-units-from-systemctl-isolate.patch | 54 +++++++++++++++++++ systemd-mini.changes | 14 +++++ systemd-mini.spec | 8 ++- systemd.changes | 8 +++ systemd.spec | 3 ++ 5 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 0001-core-exclude-.slice-units-from-systemctl-isolate.patch diff --git a/0001-core-exclude-.slice-units-from-systemctl-isolate.patch b/0001-core-exclude-.slice-units-from-systemctl-isolate.patch new file mode 100644 index 00000000..62717048 --- /dev/null +++ b/0001-core-exclude-.slice-units-from-systemctl-isolate.patch @@ -0,0 +1,54 @@ +From 1b4cd0cf11feb7d41f2eff17f86fa55b31bb6841 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Thu, 18 Feb 2016 22:51:23 +0100 +Subject: [PATCH] core: exclude .slice units from "systemctl isolate" + +Fixes: #1969 +--- + src/core/scope.c | 3 +-- + src/core/slice.c | 8 ++++++++ + 2 files changed, 9 insertions(+), 2 deletions(-) + +diff --git src/core/scope.c src/core/scope.c +index c5d0ece..361695c 100644 +--- src/core/scope.c ++++ src/core/scope.c +@@ -50,8 +50,7 @@ static void scope_init(Unit *u) { + assert(u->load_state == UNIT_STUB); + + s->timeout_stop_usec = u->manager->default_timeout_stop_usec; +- +- UNIT(s)->ignore_on_isolate = true; ++ u->ignore_on_isolate = true; + } + + 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 +@@ -34,6 +34,13 @@ static const UnitActiveState state_translation_table[_SLICE_STATE_MAX] = { + [SLICE_ACTIVE] = UNIT_ACTIVE + }; + ++static void slice_init(Unit *u) { ++ assert(u); ++ assert(u->load_state == UNIT_STUB); ++ ++ u->ignore_on_isolate = true; ++} ++ + static void slice_set_state(Slice *t, SliceState state) { + SliceState old_state; + assert(t); +@@ -305,6 +312,7 @@ const UnitVTable slice_vtable = { + .no_instances = true, + .can_transient = true, + ++ .init = slice_init, + .load = slice_load, + + .coldplug = slice_coldplug, +-- +2.6.2 + diff --git a/systemd-mini.changes b/systemd-mini.changes index 0bc6aacf..85ab0ea5 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Mar 1 09:16:08 UTC 2016 - werner@suse.de + +- Add upstream patch + 0001-core-exclude-.slice-units-from-systemctl-isolate.patch + this fixes forced logouts on isolate target aka changing runlevel + (boo#966535) + ------------------------------------------------------------------- Sat Jan 9 22:46:21 UTC 2016 - afaerber@suse.de @@ -26,6 +34,12 @@ Wed Dec 9 15:12:30 UTC 2015 - crrodriguez@opensuse.org - spec: update minimum kernel version to 3.11 - Update minimum util-linux version to 2.27.1 +------------------------------------------------------------------- +Thu Dec 3 15:33:27 UTC 2015 - tchvatal@suse.com + +- Add patch to enable working steam controller: + * 1099-Add-default-rules-for-valve-steam-controller-to-work.patch + ------------------------------------------------------------------- Mon Nov 30 13:59:52 UTC 2015 - thomas.blume@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index 9a6c9af5..04091633 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -248,6 +248,8 @@ Patch522: Correct_assert_on_unexpected_error_code.patch Patch523: let-vconsole-setup-get-properties-only-once-to-copy-them.patch # PATCH-FIX-UPSTREAM (bsc#956712) 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 # UDEV PATCHES # ============ @@ -289,8 +291,10 @@ Patch1096: 1096-new-udev-root-symlink-generator.patch Patch1097: 1097-udevd-increase-maximum-number-of-children.patch # PATCH-FIX-OPENSUSE 1098-systemd-networkd-alias-network-service.patch Patch1098: 1098-systemd-networkd-alias-network-service.patch +# PATCH-FIX-OPENSUSE 1099-Add-default-rules-for-valve-steam-controller-to-work.patch +Patch1099: 1099-Add-default-rules-for-valve-steam-controller-to-work.patch # PATCH-FIX-OPENSUSE hostname-NULL.patch - fix crash on xen build hosts in OBS Marcus Meissner -Patch1099: hostname-NULL.patch +Patch1100: hostname-NULL.patch %description Systemd is a system and service manager, compatible with SysV and LSB @@ -586,6 +590,7 @@ cp %{SOURCE7} m4/ %patch522 -p1 %patch523 -p0 %patch524 -p1 +%patch525 -p0 # udev patches %patch1002 -p1 @@ -607,6 +612,7 @@ cp %{SOURCE7} m4/ %patch1097 -p1 %patch1098 -p1 %patch1099 -p1 +%patch1100 -p1 # # In combination with Patch352 set-and-use-default-logconsole.patch diff --git a/systemd.changes b/systemd.changes index 3be3a5fe..85ab0ea5 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Mar 1 09:16:08 UTC 2016 - werner@suse.de + +- Add upstream patch + 0001-core-exclude-.slice-units-from-systemctl-isolate.patch + this fixes forced logouts on isolate target aka changing runlevel + (boo#966535) + ------------------------------------------------------------------- Sat Jan 9 22:46:21 UTC 2016 - afaerber@suse.de diff --git a/systemd.spec b/systemd.spec index 52c9e1d6..37cb1be1 100644 --- a/systemd.spec +++ b/systemd.spec @@ -243,6 +243,8 @@ Patch522: Correct_assert_on_unexpected_error_code.patch Patch523: let-vconsole-setup-get-properties-only-once-to-copy-them.patch # PATCH-FIX-UPSTREAM (bsc#956712) 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 # UDEV PATCHES # ============ @@ -583,6 +585,7 @@ cp %{SOURCE7} m4/ %patch522 -p1 %patch523 -p0 %patch524 -p1 +%patch525 -p0 # udev patches %patch1002 -p1 From d6cba9d3bbdd7a84c2960a390a0e0b906e9db65137c94d3200fd4c8e8829caf6 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Sun, 3 Apr 2016 21:06:56 +0000 Subject: [PATCH 3/4] Accepting request 381543 from Base:System - 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 - 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. - use %make_build instead of 'make %{?_smp_mflags}' - be more strict on own lib version requirements - systemd should require udev with the exact same version - 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) - 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 OBS-URL: https://build.opensuse.org/request/show/381543 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=230 --- ...-.slice-units-from-systemctl-isolate.patch | 8 +- ...e-synchronization-after-daemon-reloa.patch | 193 ++++++++++++++++++ ...-name-list-after-deserializing-durin.patch | 74 +++++++ ...lock-value-in-etc-sysconfig-keyboard.patch | 19 +- ...et-properties-only-once-to-copy-them.patch | 4 +- ...nal-linking-non-fatal-in-try-and-auto.diff | 116 +++++++++++ systemd-mini.changes | 57 ++++++ systemd-mini.spec | 87 ++++---- systemd.changes | 57 ++++++ systemd.spec | 87 ++++---- 10 files changed, 598 insertions(+), 104 deletions(-) create mode 100644 0001-core-fix-bus-name-synchronization-after-daemon-reloa.patch create mode 100644 0001-core-re-sync-bus-name-list-after-deserializing-durin.patch create mode 100644 systemd-228-nspawn-make-journal-linking-non-fatal-in-try-and-auto.diff 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 From f5333b0407547df449f9c8cc220e332f61a41171937b1fedc40c6e0813f9f3ae Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Mon, 4 Apr 2016 19:43:57 +0000 Subject: [PATCH 4/4] Accepting request 384213 from openSUSE:Factory Revert to previous working version (see https://bugzilla.opensuse.org/show_bug.cgi?id=973907 ) OBS-URL: https://build.opensuse.org/request/show/384213 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=231 --- ...-.slice-units-from-systemctl-isolate.patch | 8 +- ...e-synchronization-after-daemon-reloa.patch | 193 ------------------ ...-name-list-after-deserializing-durin.patch | 74 ------- ...lock-value-in-etc-sysconfig-keyboard.patch | 19 +- ...et-properties-only-once-to-copy-them.patch | 4 +- ...nal-linking-non-fatal-in-try-and-auto.diff | 116 ----------- systemd-mini.changes | 57 ------ systemd-mini.spec | 87 ++++---- systemd.changes | 57 ------ systemd.spec | 87 ++++---- 10 files changed, 104 insertions(+), 598 deletions(-) delete mode 100644 0001-core-fix-bus-name-synchronization-after-daemon-reloa.patch delete mode 100644 0001-core-re-sync-bus-name-list-after-deserializing-durin.patch delete mode 100644 systemd-228-nspawn-make-journal-linking-non-fatal-in-try-and-auto.diff diff --git a/0001-core-exclude-.slice-units-from-systemctl-isolate.patch b/0001-core-exclude-.slice-units-from-systemctl-isolate.patch index c954427f..62717048 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 ---- a/src/core/scope.c -+++ b/src/core/scope.c +--- src/core/scope.c ++++ 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 ---- a/src/core/slice.c -+++ b/src/core/slice.c +--- src/core/slice.c ++++ 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 deleted file mode 100644 index b1a18d36..00000000 --- a/0001-core-fix-bus-name-synchronization-after-daemon-reloa.patch +++ /dev/null @@ -1,193 +0,0 @@ -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 deleted file mode 100644 index 11b6a99f..00000000 --- a/0001-core-re-sync-bus-name-list-after-deserializing-durin.patch +++ /dev/null @@ -1,74 +0,0 @@ -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 e3d7c312..18fd4f61 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,35 @@ int main(int argc, char **argv) { +@@ -421,6 +428,32 @@ int main(int argc, char **argv) { disable_capslock = vc_kbd_disable_caps_lock && strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0; @@ -146,31 +146,28 @@ Index: systemd-228/src/vconsole/vconsole-setup.c + + fdmem = open ("/dev/mem", O_RDONLY); + if (fdmem < 0) { -+ log_warning_errno(errno, "Failed to open /dev/mem: %m"); -+ goto finish; ++ log_error("Failed to open /dev/mem: %m"); ++ return EXIT_FAILURE; + } + + if (lseek(fdmem, BIOS_DATA_AREA + BDA_KEYBOARD_STATUS_FLAGS_4, SEEK_SET) == (off_t) -1) { -+ log_warning_errno(errno, "Failed to seek /dev/mem: %m"); -+ goto finish; ++ log_error("Failed to seek /dev/mem: %m"); ++ return EXIT_FAILURE; + } + + if (read(fdmem, &c, sizeof(char)) == -1) { -+ log_warning_errno(errno, "Failed to read /dev/mem: %m"); -+ goto finish; ++ log_error("Failed to read /dev/mem: %m"); ++ return EXIT_FAILURE; + } + + 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 +492,10 @@ int main(int argc, char **argv) { +@@ -456,6 +489,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 22c45e4d..b106fc22 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(-) ---- a/src/vconsole/vconsole-setup.c -+++ b/src/vconsole/vconsole-setup.c 2015-09-23 12:34:33.854018750 +0000 +--- src/vconsole/vconsole-setup.c ++++ 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 deleted file mode 100644 index 17a09a8a..00000000 --- a/systemd-228-nspawn-make-journal-linking-non-fatal-in-try-and-auto.diff +++ /dev/null @@ -1,116 +0,0 @@ -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 b1a32521..85ab0ea5 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,46 +1,3 @@ -------------------------------------------------------------------- -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 @@ -49,20 +6,6 @@ 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 f6b00696..04091633 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -92,9 +92,6 @@ 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 @@ -105,7 +102,7 @@ BuildRequires: pkgconfig(libqrencode) BuildRequires: pkgconfig(usbutils) >= 0.82 # the buildignore is important for bootstrapping #!BuildIgnore: udev -Requires: udev = %{version}-%{release} +Requires: udev >= 172 Recommends: %{name}-bash-completion Requires: dbus-1 >= 1.4.0 Requires: kbd @@ -253,12 +250,6 @@ 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 # ============ @@ -333,7 +324,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}-%{release} +Requires: libsystemd0%{?mini} = %version Requires: systemd-rpm-macros %if 0%{?bootstrap} Provides: systemd-devel = %version-%release @@ -347,7 +338,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}-%{release} +Requires: %{name} = %{version} Provides: sbin_init Conflicts: otherproviders(sbin_init) Provides: sysvinit:/sbin/init @@ -597,12 +588,9 @@ cp %{SOURCE7} m4/ %patch520 -p1 %patch521 -p1 %patch522 -p1 -%patch523 -p1 +%patch523 -p0 %patch524 -p1 -%patch525 -p1 -%patch526 -p1 -%patch527 -p1 -%patch528 -p1 +%patch525 -p0 # udev patches %patch1002 -p1 @@ -635,6 +623,38 @@ 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 # @@ -646,19 +666,17 @@ 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 - -# 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 -# +cflags -pipe CFLAGS +cflags -Wl,-O2 LDFLAGS +cflags -Wl,--hash-size=8599 LDFLAGS # 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" \ @@ -668,12 +686,10 @@ export CFLAGS="%{optflags}" --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} @@ -700,10 +716,9 @@ export CFLAGS="%{optflags}" --disable-resolved \ %endif --disable-kdbus - -%make_build V=e +make %{?_smp_mflags} %if ! 0%{?bootstrap} -%make_build V=e update-man-list man +make %{?_smp_mflags} update-man-list man %endif %install @@ -832,10 +847,7 @@ 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 -> %{buildroot}%{_localstatedir}/lib/systemd/random-seed - -# machined -mkdir -p %{buildroot}%{_localstatedir}/lib/machines +mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/random-seed %fdupes -s %{buildroot}%{_mandir} @@ -1297,7 +1309,6 @@ 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 @@ -1404,7 +1415,6 @@ 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 @@ -1412,13 +1422,6 @@ 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 b1a32521..85ab0ea5 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,46 +1,3 @@ -------------------------------------------------------------------- -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 @@ -49,20 +6,6 @@ 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 c2162ef0..37cb1be1 100644 --- a/systemd.spec +++ b/systemd.spec @@ -87,9 +87,6 @@ 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 @@ -100,7 +97,7 @@ BuildRequires: pkgconfig(libqrencode) BuildRequires: pkgconfig(usbutils) >= 0.82 # the buildignore is important for bootstrapping #!BuildIgnore: udev -Requires: udev = %{version}-%{release} +Requires: udev >= 172 Recommends: %{name}-bash-completion Requires: dbus-1 >= 1.4.0 Requires: kbd @@ -248,12 +245,6 @@ 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 # ============ @@ -328,7 +319,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}-%{release} +Requires: libsystemd0%{?mini} = %version Requires: systemd-rpm-macros %if 0%{?bootstrap} Provides: systemd-devel = %version-%release @@ -342,7 +333,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}-%{release} +Requires: %{name} = %{version} Provides: sbin_init Conflicts: otherproviders(sbin_init) Provides: sysvinit:/sbin/init @@ -592,12 +583,9 @@ cp %{SOURCE7} m4/ %patch520 -p1 %patch521 -p1 %patch522 -p1 -%patch523 -p1 +%patch523 -p0 %patch524 -p1 -%patch525 -p1 -%patch526 -p1 -%patch527 -p1 -%patch528 -p1 +%patch525 -p0 # udev patches %patch1002 -p1 @@ -630,6 +618,38 @@ 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 # @@ -641,19 +661,17 @@ 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 - -# 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 -# +cflags -pipe CFLAGS +cflags -Wl,-O2 LDFLAGS +cflags -Wl,--hash-size=8599 LDFLAGS # 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" \ @@ -663,12 +681,10 @@ export CFLAGS="%{optflags}" --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} @@ -695,10 +711,9 @@ export CFLAGS="%{optflags}" --disable-resolved \ %endif --disable-kdbus - -%make_build V=e +make %{?_smp_mflags} %if ! 0%{?bootstrap} -%make_build V=e update-man-list man +make %{?_smp_mflags} update-man-list man %endif %install @@ -827,10 +842,7 @@ 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 -> %{buildroot}%{_localstatedir}/lib/systemd/random-seed - -# machined -mkdir -p %{buildroot}%{_localstatedir}/lib/machines +mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/random-seed %fdupes -s %{buildroot}%{_mandir} @@ -1292,7 +1304,6 @@ 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 @@ -1399,7 +1410,6 @@ 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 @@ -1407,13 +1417,6 @@ 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