From 3a9ea8f8a3f41bf2f721df51bd4e6569a51c5303981052f6dc210831460c927b Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 2 Dec 2015 15:45:15 +0000 Subject: [PATCH 1/4] Accepting request 345072 from home:jengelh:d5 - Update to new upstream release 227+228 tested boot-on-cryptoroot OBS-URL: https://build.opensuse.org/request/show/345072 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=920 --- ...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 ++-- ...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 +- 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 | 38 +++++ systemd-mini.spec | 22 +-- systemd-pam_config.patch | 34 +++-- systemd-tmp-safe-defaults.patch | 16 +- systemd.changes | 38 +++++ systemd.spec | 22 +-- 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 ++--- 32 files changed, 515 insertions(+), 815 deletions(-) delete mode 100644 0001-Make-sure-the-mount-units-pulled-by-RequiresMountsFo.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 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/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/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..86af604d 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,41 @@ +------------------------------------------------------------------- +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..d8c7fae1 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -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+ @@ -112,7 +112,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 Requires(post): coreutils Requires(post): findutils Requires(post): pam-config >= 0.79-5 @@ -176,16 +176,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 @@ -260,8 +254,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 +549,6 @@ cp %{SOURCE7} m4/ %patch42 -p1 %patch84 -p1 %patch86 -p1 -%patch87 -p1 -%patch88 -p1 %patch90 -p1 %patch91 -p1 %patch120 -p1 @@ -587,17 +577,13 @@ 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 # udev patches -%patch1001 -p1 %patch1002 -p1 %patch1003 -p1 %patch1005 -p1 @@ -726,7 +712,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} 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-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..86af604d 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,41 @@ +------------------------------------------------------------------- +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..5f3d6e87 100644 --- a/systemd.spec +++ b/systemd.spec @@ -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+ @@ -107,7 +107,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 Requires(post): coreutils Requires(post): findutils Requires(post): pam-config >= 0.79-5 @@ -171,16 +171,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 @@ -255,8 +249,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 @@ -552,8 +544,6 @@ cp %{SOURCE7} m4/ %patch42 -p1 %patch84 -p1 %patch86 -p1 -%patch87 -p1 -%patch88 -p1 %patch90 -p1 %patch91 -p1 %patch120 -p1 @@ -582,17 +572,13 @@ 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 # udev patches -%patch1001 -p1 %patch1002 -p1 %patch1003 -p1 %patch1005 -p1 @@ -721,7 +707,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} 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 2e1f7c4ae0ffbc5cbbe8d3fcb1a907cfbfe7ce93ea37f7e010a64dbe5027a60c Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 2 Dec 2015 15:48:26 +0000 Subject: [PATCH 2/4] Accepting request 346999 from home:tsaupe:branches:Base:System:bsc956712-systemd fix CVE-2015-7510: Stack overflow in nss-mymachines (boo#956712) OBS-URL: https://build.opensuse.org/request/show/346999 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=921 --- ...-do-not-allow-overlong-machine-names.patch | 37 +++++++++++++++++++ systemd-mini.changes | 6 +++ systemd-mini.spec | 3 ++ systemd.changes | 6 +++ systemd.spec | 3 ++ 5 files changed, 55 insertions(+) create mode 100644 0001-nss-mymachines-do-not-allow-overlong-machine-names.patch 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/systemd-mini.changes b/systemd-mini.changes index 86af604d..36949b52 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +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 diff --git a/systemd-mini.spec b/systemd-mini.spec index d8c7fae1..581173e5 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -245,6 +245,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 # ============ @@ -582,6 +584,7 @@ cp %{SOURCE7} m4/ %patch521 -p1 %patch522 -p1 %patch523 -p0 +%patch524 -p1 # udev patches %patch1002 -p1 diff --git a/systemd.changes b/systemd.changes index 86af604d..36949b52 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +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 diff --git a/systemd.spec b/systemd.spec index 5f3d6e87..97f7e0e9 100644 --- a/systemd.spec +++ b/systemd.spec @@ -240,6 +240,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 # ============ @@ -577,6 +579,7 @@ cp %{SOURCE7} m4/ %patch521 -p1 %patch522 -p1 %patch523 -p0 +%patch524 -p1 # udev patches %patch1002 -p1 From 642fe32ebf69cd92d86b87a9b8f96f8c0068d94e3ed0cd4154d73c48599cb561 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Tue, 22 Dec 2015 10:31:01 +0000 Subject: [PATCH 3/4] Accepting request 350220 from home:fbui:branches:Base:System:disable-tmpfs-on-tmp OBS-URL: https://build.opensuse.org/request/show/350220 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=922 --- systemd-mini.changes | 5 +++++ systemd-mini.spec | 15 ++++++++++++++- systemd.changes | 5 +++++ systemd.spec | 15 ++++++++++++++- 4 files changed, 38 insertions(+), 2 deletions(-) diff --git a/systemd-mini.changes b/systemd-mini.changes index 36949b52..c8c21bf6 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +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 Nov 30 13:59:52 UTC 2015 - thomas.blume@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index 581173e5..723c88fe 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -756,8 +756,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 @@ -965,6 +968,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.changes b/systemd.changes index 36949b52..c8c21bf6 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +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 Nov 30 13:59:52 UTC 2015 - thomas.blume@suse.com diff --git a/systemd.spec b/systemd.spec index 97f7e0e9..45a74271 100644 --- a/systemd.spec +++ b/systemd.spec @@ -751,8 +751,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 @@ -960,6 +963,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 From 1c807b5d9917875bd6e492563fbfced2b53f75acbf083307641f17fc53e850c4 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Tue, 22 Dec 2015 13:43:00 +0000 Subject: [PATCH 4/4] Accepting request 350196 from home:jengelh:d5 - Avoid enabling readahead services; they have been removed. [fixes getty-tty1 not appearing in openqa] - In %install, only process kbd-model-map.xkb-generated if it exists. Resolves a build failure in 13.2/42.1. OBS-URL: https://build.opensuse.org/request/show/350196 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=923 --- systemd-mini.changes | 7 +++++++ systemd-mini.spec | 19 +++++++++++-------- systemd.changes | 7 +++++++ systemd.spec | 19 +++++++++++-------- 4 files changed, 36 insertions(+), 16 deletions(-) diff --git a/systemd-mini.changes b/systemd-mini.changes index c8c21bf6..a7adef16 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -3,6 +3,13 @@ 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. + ------------------------------------------------------------------- Mon Nov 30 13:59:52 UTC 2015 - thomas.blume@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index 723c88fe..28262652 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -891,8 +891,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 @@ -948,12 +950,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 diff --git a/systemd.changes b/systemd.changes index c8c21bf6..a7adef16 100644 --- a/systemd.changes +++ b/systemd.changes @@ -3,6 +3,13 @@ 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. + ------------------------------------------------------------------- Mon Nov 30 13:59:52 UTC 2015 - thomas.blume@suse.com diff --git a/systemd.spec b/systemd.spec index 45a74271..e3224592 100644 --- a/systemd.spec +++ b/systemd.spec @@ -886,8 +886,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 @@ -943,12 +945,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