From 12f7177ed6c67ff8341dfe3fbc0b1cd43d73089080b63e5b582448dd57c1177c Mon Sep 17 00:00:00 2001 From: Thomas Blume Date: Wed, 26 Oct 2016 14:59:15 +0000 Subject: [PATCH] Accepting request 437403 from home:fbui:systemd:Factory - Own a couple of directories even if they don't belong to systemd otherwise the build system will complain. Some directories (owned by others packages) are simply used by systemd to ship some scripts or config files to customize others *optional* components. Since thos components are not build required by systemd those directories are not owned by any packages and the BS complains... - Import commit 15ea716 journal-remote: change owner of /var/log/journal/remote and create /var/lib/systemd/journal-upload (bsc#1006372) - %sysusers_create and %tmpfiles_create must be called in %post Calling %pre is broken since the respective conf files are not yet installed. - %{_libexecdir}/{tmpfiles.d,sysusers.d}/systemd-remote.conf are part of systemd-journal-remote package (only). - systemd-journal-{gatewayd,remote,upload} units are only part of "systemd-journal-remote" package. So exclude them from the main package. - Import commit a1c145e6ad6588555dca64402f9103fb1e02b1a0 7f34037 man: explain that *KeyIgnoreInhibited only apply to a subset of locks df5798b Revert "logind: really handle *KeyIgnoreInhibited options in logind.conf" (bsc#1001790 bsc#1005404) f79fee7 Revert "kbd-model-map: add more mappings offered by Yast" 3760c10 manager: tighten incoming notification message checks d6efd71 core: only warn on short reads on signal fd 6eebd91 manager: be stricter with incomining notifications, warn properly about too large ones OBS-URL: https://build.opensuse.org/request/show/437403 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=959 --- ...ion-message-length-is-0-ignore-the-m.patch | 32 - ...s390_con3270_disable_ANSI_colour_esc.patch | 180 --- ...sh-for-reboot-or-hddown-for-poweroff.patch | 84 -- ...network-device-after-NFS-mount-units.patch | 315 ---- ...id-abort-due-timeout-at-user-service.patch | 21 - 0001-bnc888612-logind-polkit-acpi.patch | 101 -- ...-.slice-units-from-systemctl-isolate.patch | 54 - ...e-synchronization-after-daemon-reloa.patch | 193 --- ...-name-list-after-deserializing-durin.patch | 74 - ...-calculation-when-appending-a-data-o.patch | 54 - ...E_ARCHIVED-as-part-of-offlining-2740.patch | 93 -- ...n-we-fail-to-append-a-tag-to-a-journ.patch | 36 - ...systemctl-completion-ignore-at-names.patch | 17 - ...-do-not-allow-overlong-machine-names.patch | 37 - ...XDG_RUNTIME_DIR_of_the_original_user.patch | 43 - ...n-any-error-in-manager_dispatch_noti.patch | 51 - ...ative-error-message-for-ignored-noti.patch | 38 - ...o-length-notification-messages-again.patch | 82 - ...ck-add-support-for-pmem-devices-3683.patch | 51 - ...o-not-warn-about-missing-install-inf.patch | 121 -- ...t-install-sulogin-unit-with-poweroff.patch | 19 - 0014-journald-with-journaling-FS.patch | 75 - ...pletion-smart-to-be-able-to-redirect.patch | 272 ---- ...ate-by-id-scsi-links-for-ATA-devices.patch | 24 - 1003-udev-netlink-null-rules.patch | 22 - ...fault-links-for-primary-cd_dvd-drive.patch | 24 - 1006-udev-always-rename-network.patch | 77 - 1007-physical-hotplug-cpu-and-memory.patch | 37 - ...kip-btrfs-check-if-devices-are-not-r.patch | 24 - ...device-link-creation-on-multipath-de.patch | 40 - ...-Ignore-devices-with-SYSTEMD_READY-0.patch | 29 - ...dev-exclude-cd-dvd-from-block-device.patch | 20 - ...fault-permissions-for-GenWQE-devices.patch | 15 - ...lity-links-for-truncated-by-id-links.patch | 175 --- ...t-ssd-disk-to-use-deadline-scheduler.patch | 33 - 1096-new-udev-root-symlink-generator.patch | 108 -- ...-increase-maximum-number-of-children.patch | 26 - ...stemd-networkd-alias-network-service.patch | 14 - ...s-for-valve-steam-controller-to-work.patch | 23 - Correct_assert_on_unexpected_error_code.patch | 21 - ...es-permissions-to-follow-openSUSE-po.patch | 40 - allow-multiple-sulogin-to-be-started.patch | 47 - apply-ACL-for-nvidia-device-nodes.patch | 31 - apply-ACL-for-nvidia-uvm-device-node.patch | 23 - avoid-divide-by-zero-sigtrap.patch | 34 - ...andom-hangs-on-timeouts-due-lost-cwd.patch | 29 - boot-local-start.patch | 17 - ...assword-wall-starts-after-getty-tty1.patch | 25 - ...rtname-is-set-as-hostname-bnc-820213.patch | 31 - ...-boot-prefixed-initscript-bnc-746506.patch | 38 - ...plock-and-compose_table-and-kbd_rate.patch | 216 --- ...lock-value-in-etc-sysconfig-keyboard.patch | 191 --- ...lang-value-in-etc-sysconfig-language.patch | 72 - hostname-NULL.patch | 13 - insserv-generator.patch | 399 ----- journald-advice-about-use-of-memory.patch | 138 -- kbd-model-map.legacy | 10 + kbd-model-map.patch | 28 - ...linker-find-libudev-for-libdevmapper.patch | 19 - ...et-properties-only-once-to-copy-them.patch | 84 -- ....service-conflict-with-syslog.socket.patch | 25 - parse-crypttab-for-noauto-option.patch | 67 - ...-quit-and-wait-for-emergency-service.patch | 46 - portmap-wants-rpcbind-socket.patch | 13 - pre_checkin.sh | 3 +- rescue-emergency-target-conflicts.patch | 29 - respect-nfs-bg-option.patch | 22 - ...r-lock-bind-mount-if-they-aren-t-sym.patch | 87 -- set-and-use-default-logconsole.patch | 175 --- shut-up-rpmlint-on-var-log-journal.patch | 25 - suse-sysv-bootd-support.diff | 80 - systemctl-set-default-target.patch | 30 - ...nal-linking-non-fatal-in-try-and-auto.diff | 116 -- systemd-228.tar.xz | 3 + ...use-new-fstype-for-unified-hierarchy.patch | 87 -- systemd-add-user-keep.patch | 92 -- systemd-dbus-system-bus-address.patch | 33 - systemd-install-compat_pkgconfig-always.patch | 34 - systemd-mini.changes | 258 ++++ systemd-mini.spec | 1342 +++++++---------- systemd-pam_config.patch | 32 - systemd-sysv-convert | 14 +- systemd-sysv-install | 43 +- systemd-tmp-safe-defaults.patch | 26 - systemd.changes | 258 ++++ systemd.spec | 1339 +++++++--------- tomcat6-var-lock-subsys-legacy.patch | 20 - tty-ask-password-agent-on-console.patch | 376 ----- systemd-remount-tmpfs => udev-remount-tmpfs | 0 ...addentropy-ioctl-to-load-random-seed.patch | 155 -- v228.tar.gz | 3 - vhangup-on-all-consoles.patch | 40 - watch_resolv.conf_for_become_changed.patch | 153 -- 93 files changed, 1592 insertions(+), 7674 deletions(-) delete mode 100644 0001-If-the-notification-message-length-is-0-ignore-the-m.patch delete mode 100644 0001-On_s390_con3270_disable_ANSI_colour_esc.patch delete mode 100644 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch delete mode 100644 0001-add-network-device-after-NFS-mount-units.patch delete mode 100644 0001-avoid-abort-due-timeout-at-user-service.patch delete mode 100644 0001-bnc888612-logind-polkit-acpi.patch delete mode 100644 0001-core-exclude-.slice-units-from-systemctl-isolate.patch delete mode 100644 0001-core-fix-bus-name-synchronization-after-daemon-reloa.patch delete mode 100644 0001-core-re-sync-bus-name-list-after-deserializing-durin.patch delete mode 100644 0001-journal-fix-HMAC-calculation-when-appending-a-data-o.patch delete mode 100644 0001-journal-set-STATE_ARCHIVED-as-part-of-offlining-2740.patch delete mode 100644 0001-journal-warn-when-we-fail-to-append-a-tag-to-a-journ.patch delete mode 100644 0001-let-systemctl-completion-ignore-at-names.patch delete mode 100644 0001-nss-mymachines-do-not-allow-overlong-machine-names.patch delete mode 100644 0001-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch delete mode 100644 0001-pid1-don-t-return-any-error-in-manager_dispatch_noti.patch delete mode 100644 0001-pid1-more-informative-error-message-for-ignored-noti.patch delete mode 100644 0001-pid1-process-zero-length-notification-messages-again.patch delete mode 100644 0001-rules-block-add-support-for-pmem-devices-3683.patch delete mode 100644 0001-systemctl-pid1-do-not-warn-about-missing-install-inf.patch delete mode 100644 0010-do-not-install-sulogin-unit-with-poweroff.patch delete mode 100644 0014-journald-with-journaling-FS.patch delete mode 100644 0019-make-completion-smart-to-be-able-to-redirect.patch delete mode 100644 1002-rules-create-by-id-scsi-links-for-ATA-devices.patch delete mode 100644 1003-udev-netlink-null-rules.patch delete mode 100644 1005-create-default-links-for-primary-cd_dvd-drive.patch delete mode 100644 1006-udev-always-rename-network.patch delete mode 100644 1007-physical-hotplug-cpu-and-memory.patch delete mode 100644 1011-64-btrfs.rules-skip-btrfs-check-if-devices-are-not-r.patch delete mode 100644 1012-Skip-persistent-device-link-creation-on-multipath-de.patch delete mode 100644 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch delete mode 100644 1037-udev-exclude-cd-dvd-from-block-device.patch delete mode 100644 1062-rules-set-default-permissions-for-GenWQE-devices.patch delete mode 100644 1066-udev-add-compatibility-links-for-truncated-by-id-links.patch delete mode 100644 1095-set-ssd-disk-to-use-deadline-scheduler.patch delete mode 100644 1096-new-udev-root-symlink-generator.patch delete mode 100644 1097-udevd-increase-maximum-number-of-children.patch delete mode 100644 1098-systemd-networkd-alias-network-service.patch delete mode 100644 1099-Add-default-rules-for-valve-steam-controller-to-work.patch delete mode 100644 Correct_assert_on_unexpected_error_code.patch delete mode 100644 Fix-run-lock-directories-permissions-to-follow-openSUSE-po.patch delete mode 100644 allow-multiple-sulogin-to-be-started.patch delete mode 100644 apply-ACL-for-nvidia-device-nodes.patch delete mode 100644 apply-ACL-for-nvidia-uvm-device-node.patch delete mode 100644 avoid-divide-by-zero-sigtrap.patch delete mode 100644 avoid-random-hangs-on-timeouts-due-lost-cwd.patch delete mode 100644 boot-local-start.patch delete mode 100644 ensure-ask-password-wall-starts-after-getty-tty1.patch delete mode 100644 ensure-shortname-is-set-as-hostname-bnc-820213.patch delete mode 100644 fix-support-for-boot-prefixed-initscript-bnc-746506.patch delete mode 100644 handle-disable_caplock-and-compose_table-and-kbd_rate.patch delete mode 100644 handle-numlock-value-in-etc-sysconfig-keyboard.patch delete mode 100644 handle-root_uses_lang-value-in-etc-sysconfig-language.patch delete mode 100644 hostname-NULL.patch delete mode 100644 insserv-generator.patch delete mode 100644 journald-advice-about-use-of-memory.patch create mode 100644 kbd-model-map.legacy delete mode 100644 kbd-model-map.patch delete mode 100644 let-linker-find-libudev-for-libdevmapper.patch delete mode 100644 let-vconsole-setup-get-properties-only-once-to-copy-them.patch delete mode 100644 make-emergency.service-conflict-with-syslog.socket.patch delete mode 100644 parse-crypttab-for-noauto-option.patch delete mode 100644 plymouth-quit-and-wait-for-emergency-service.patch delete mode 100644 portmap-wants-rpcbind-socket.patch delete mode 100644 rescue-emergency-target-conflicts.patch delete mode 100644 respect-nfs-bg-option.patch delete mode 100644 restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch delete mode 100644 set-and-use-default-logconsole.patch delete mode 100644 shut-up-rpmlint-on-var-log-journal.patch delete mode 100644 suse-sysv-bootd-support.diff delete mode 100644 systemctl-set-default-target.patch delete mode 100644 systemd-228-nspawn-make-journal-linking-non-fatal-in-try-and-auto.diff create mode 100644 systemd-228.tar.xz delete mode 100644 systemd-230-cgroup2-use-new-fstype-for-unified-hierarchy.patch delete mode 100644 systemd-add-user-keep.patch delete mode 100644 systemd-dbus-system-bus-address.patch delete mode 100644 systemd-install-compat_pkgconfig-always.patch delete mode 100644 systemd-pam_config.patch delete mode 100644 systemd-tmp-safe-defaults.patch delete mode 100644 tomcat6-var-lock-subsys-legacy.patch delete mode 100644 tty-ask-password-agent-on-console.patch rename systemd-remount-tmpfs => udev-remount-tmpfs (100%) delete mode 100644 use-rndaddentropy-ioctl-to-load-random-seed.patch delete mode 100644 v228.tar.gz delete mode 100644 vhangup-on-all-consoles.patch delete mode 100644 watch_resolv.conf_for_become_changed.patch diff --git a/0001-If-the-notification-message-length-is-0-ignore-the-m.patch b/0001-If-the-notification-message-length-is-0-ignore-the-m.patch deleted file mode 100644 index 688f4785..00000000 --- a/0001-If-the-notification-message-length-is-0-ignore-the-m.patch +++ /dev/null @@ -1,32 +0,0 @@ -From ddcd0b726adfd78260ec3d6a446800d85980069e Mon Sep 17 00:00:00 2001 -From: Jorge Niedbalski -Date: Wed, 28 Sep 2016 18:25:50 -0300 -Subject: [PATCH 1/1] If the notification message length is 0, ignore the - message (#4237) - -Fixes #4234. - -Signed-off-by: Jorge Niedbalski -(cherry picked from commit 531ac2b2349da02acc9c382849758e07eb92b020) ---- - src/core/manager.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/core/manager.c b/src/core/manager.c -index 229cb31..56ca9cf 100644 ---- a/src/core/manager.c -+++ b/src/core/manager.c -@@ -1565,6 +1565,10 @@ static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t - - return -errno; - } -+ if (n == 0) { -+ log_debug("Got zero-length notification message. Ignoring."); -+ return 0; -+ } - - CMSG_FOREACH(cmsg, &msghdr) { - if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) { --- -2.10.0 - diff --git a/0001-On_s390_con3270_disable_ANSI_colour_esc.patch b/0001-On_s390_con3270_disable_ANSI_colour_esc.patch deleted file mode 100644 index 3dd400a3..00000000 --- a/0001-On_s390_con3270_disable_ANSI_colour_esc.patch +++ /dev/null @@ -1,180 +0,0 @@ ---- - 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, 74 insertions(+), 8 deletions(-) - - -Index: systemd-228/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" - --SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270/tty[0-9]*", TAG+="systemd" -+SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270/tty*", TAG+="systemd" - KERNEL=="vport*", TAG+="systemd" - - SUBSYSTEM=="block", TAG+="systemd" -Index: systemd-228/src/basic/terminal-util.c -=================================================================== ---- 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); - } - -+bool ansi_console(int fd) { -+ static int cached_ansi_console = -1; -+ -+ if (_likely_(cached_ansi_console >= 0)) -+ return cached_ansi_console; -+ -+ cached_ansi_console = isatty(fd) > 0; -+#if defined(__s390__) || defined(__s390x__) -+ if (cached_ansi_console) { -+ const char *e = getenv("TERM"); -+ if (e != NULL && (streq(e, "dumb") || strneq(e, "ibm3", 4))) { -+ _cleanup_free_ char *mode = NULL; -+ int r = parse_env_file("/proc/cmdline", WHITESPACE, -+ "conmode", &mode, NULL); -+ if (r < 0 || mode == NULL || !streq(mode, "3270")) -+ cached_ansi_console = 0; -+ } -+ } -+#endif -+ return cached_ansi_console; -+} -+ - const char *default_term_for_tty(const char *tty) { - assert(tty); - -- return tty_is_vc_resolve(tty) ? "TERM=linux" : "TERM=vt220"; -+ if (tty_is_vc_resolve(tty)) -+ return "TERM=linux"; -+ if (startswith(tty, "/dev/")) -+ tty += 5; -+#if defined (__s390__) || defined (__s390x__) -+ if (streq(tty, "ttyS0")) { -+ _cleanup_free_ char *mode = NULL; -+ int r = parse_env_file("/proc/cmdline", WHITESPACE, "conmode", -+ &mode, NULL); -+ if (r < 0 || mode == NULL || !streq(mode, "3270")) -+ return "TERM=dumb"; -+ if (streq(mode, "3270")) -+ return "TERM=ibm327x"; -+ } -+#endif -+ return "TERM=vt220"; - } - - int fd_columns(int fd) { -@@ -800,8 +837,22 @@ void columns_lines_cache_reset(int signu - bool on_tty(void) { - static int cached_on_tty = -1; - -- if (_unlikely_(cached_on_tty < 0)) -+ if (_unlikely_(cached_on_tty < 0)) { - cached_on_tty = isatty(STDOUT_FILENO) > 0; -+#if defined (__s390__) || defined (__s390x__) -+ if (cached_on_tty) { -+ const char *e = getenv("TERM"); -+ if (!e) -+ return cached_on_tty; -+ if (streq(e, "dumb") || strneq(e, "ibm3", 4)) { -+ char *mode = NULL; -+ int r = parse_env_file("/proc/cmdline", WHITESPACE, "conmode", &mode, NULL); -+ if (r < 0 || !mode || !streq(mode, "3270")) -+ cached_on_tty = 0; -+ } -+ } -+#endif -+ } - - return cached_on_tty; - } -Index: systemd-228/src/basic/terminal-util.h -=================================================================== ---- 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_underline(void) { - return on_tty() ? ANSI_UNDERLINE : ""; -Index: systemd-228/src/core/manager.c -=================================================================== ---- 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)-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); -@@ -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); -+ if (ansi_console) -+ p = stpcpy(p, ANSI_RED); - *p++ = '*'; - } - - if (pos > 0 && pos <= width) { -- p = stpcpy(p, ANSI_HIGHLIGHT_RED); -+ if (ansi_console) -+ p = stpcpy(p, ANSI_HIGHLIGHT_RED); - *p++ = '*'; - } - -@@ -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_NORMAL); -+ if (ansi_console) -+ strcpy(p, ANSI_NORMAL); - } - } - -@@ -168,6 +171,7 @@ void manager_flip_auto_status(Manager *m - } - - static void manager_print_jobs_in_progress(Manager *m) { -+ static int is_ansi_console = -1; - _cleanup_free_ char *job_of_n = NULL; - Iterator i; - Job *j; -@@ -193,10 +197,20 @@ static void manager_print_jobs_in_progre - assert(counter == print_nr + 1); - assert(j); - -+ if (_unlikely_(is_ansi_console < 0)) { -+ int fd = open_terminal("/dev/console", O_RDONLY|O_NOCTTY|O_CLOEXEC); -+ if (fd < 0) -+ is_ansi_console = 0; -+ else { -+ is_ansi_console = (int)ansi_console(fd); -+ close(fd); -+ } -+ } -+ - cylon_pos = m->jobs_in_progress_iteration % 14; - if (cylon_pos >= 8) - cylon_pos = 14 - cylon_pos; -- draw_cylon(cylon, sizeof(cylon), 6, cylon_pos); -+ draw_cylon(cylon, sizeof(cylon), 6, cylon_pos, (bool)is_ansi_console); - - m->jobs_in_progress_iteration++; - diff --git a/0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch b/0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch deleted file mode 100644 index f370239f..00000000 --- a/0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch +++ /dev/null @@ -1,84 +0,0 @@ ---- - src/core/shutdown.c | 4 ++++ - src/systemctl/systemctl.c | 18 ++++++++++++------ - 2 files changed, 16 insertions(+), 6 deletions(-) - -Index: systemd-227/src/core/shutdown.c -=================================================================== ---- 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); -+ -+ if (cmd == (int)RB_POWER_OFF) -+ reboot(RB_HALT_SYSTEM); -+ - 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-227/src/systemctl/systemctl.c -=================================================================== ---- 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; -+static bool arg_no_sync = false; - static bool arg_show_types = false; - static bool arg_ignore_inhibitors = false; - static bool arg_dry = false; -@@ -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' }, -+ { "no-sync", no_argument, NULL, 'n' }, - { "no-wtmp", no_argument, NULL, 'd' }, - { "no-wall", no_argument, NULL, ARG_NO_WALL }, - {} -@@ -6990,10 +6992,13 @@ static int halt_parse_argv(int argc, cha - - case 'i': - case 'h': -- case 'n': - /* Compatibility nops */ - break; - -+ case 'n': -+ arg_no_sync = true; -+ break; -+ - case '?': - return -EINVAL; - -@@ -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. */ -- (void) sync(); -+ if (!arg_no_sync) -+ (void) sync(); - - /* Make sure C-A-D is handled by the kernel from this point - * on... */ -@@ -7514,14 +7520,13 @@ static int halt_now(enum action a) { - - switch (a) { - -- case ACTION_HALT: -- log_info("Halting."); -- (void) reboot(RB_HALT_SYSTEM); -- return -errno; -- - case ACTION_POWEROFF: - log_info("Powering off."); - (void) reboot(RB_POWER_OFF); -+ /* fall-through */ -+ case ACTION_HALT: -+ log_info("Halting."); -+ (void) reboot(RB_HALT_SYSTEM); - return -errno; - - 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 deleted file mode 100644 index dc30e64f..00000000 --- a/0001-add-network-device-after-NFS-mount-units.patch +++ /dev/null @@ -1,315 +0,0 @@ -Avoid possible race on NFS shares in which may that the network devices disappears -before the associated NFS share becomes unmounted (bug #861489). -To do this make sure that sys-subsystem-net-devices-.device used for the -NFS share is added as "After=" dependency to the .mount. - ---- - Makefile.am | 2 - src/core/mount-iface.c | 173 +++++++++++++++++++++++++++++++++++++++++++++++++ - src/core/mount-iface.h | 25 +++++++ - src/core/mount.c | 35 +++++++++ - 4 files changed, 233 insertions(+), 2 deletions(-) - -Index: systemd-228/Makefile.am -=================================================================== ---- 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 \ -+ src/core/mount-iface.c \ -+ src/core/mount-iface.h \ - src/core/kmod-setup.c \ - src/core/kmod-setup.h \ - src/core/loopback-setup.h \ -Index: systemd-228/src/core/mount-iface.c -=================================================================== ---- /dev/null -+++ systemd-228/src/core/mount-iface.c -@@ -0,0 +1,173 @@ -+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -+ -+/*** -+ This file is part of systemd. -+ -+ Copyright 2014 Werner Fink -+ -+ 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 -+ the Free Software Foundation; either version 2.1 of the License, or -+ (at your option) any later version. -+ -+ systemd is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public License -+ along with systemd; If not, see . -+***/ -+ -+/* -+ * Find the name of the network interface to which a IP address belongs to. -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "log.h" -+#include "def.h" -+#include "mount-iface.h" -+ -+static struct ifaddrs *ifa_list; -+ -+_pure_ static unsigned int mask2prefix(const void* ipv6) -+{ -+ unsigned int nippels = 0; -+ unsigned int i; -+ -+ assert(ipv6); -+ -+ for (i = 0; i < sizeof(struct in6_addr); i++) { -+ uint8_t byte = ((const uint8_t*)ipv6)[i]; -+ if (byte == 0xFF) { -+ nippels += sizeof(uint8_t); -+ continue; -+ } -+ while (byte & 0x80) { -+ nippels++; -+ byte <<= 1; -+ } -+ break; -+ } -+ -+ return nippels; -+} -+ -+static void netmask(unsigned int prefix, const void* in6, void* out6) -+{ -+ unsigned int nippels; -+ unsigned int i; -+ -+ assert(in6); -+ assert(out6); -+ -+ for (i = 0; i < sizeof(struct in6_addr); i++) { -+ nippels = (prefix < sizeof(uint8_t)) ? prefix : sizeof(uint8_t); -+ ((uint8_t*)out6)[i] = ((const uint8_t*)in6)[i] & (0xFF00>>nippels); -+ prefix -= nippels; -+ } -+} -+ -+char *host2iface(const char *ip) -+{ -+ const struct ifaddrs *ifa; -+ uint32_t ip4 = 0; -+ char *ret = NULL; -+ struct search { -+ union { -+ struct in_addr addr; -+ struct in6_addr addr6; -+ }; -+ int family; -+ } host; -+ int r; -+ -+ if (!ifa_list && (getifaddrs(&ifa_list) < 0)) { -+ log_oom(); -+ goto err; -+ } -+ -+ if (strchr(ip, ':')) { -+ r = inet_pton(AF_INET6, ip, &host.addr6); -+ host.family = AF_INET6; -+ } else { -+ r = inet_pton(AF_INET, ip, &host.addr); -+ host.family = AF_INET; -+ } -+ -+ if (r < 0) { -+ log_error("Failed to convert IP address %s from text to binary: %m", ip); -+ goto err; -+ } -+ -+ for (ifa = ifa_list; ifa != NULL; ifa = ifa->ifa_next) { -+ -+ if (!ifa->ifa_addr) -+ continue; -+ if (ifa->ifa_flags & IFF_POINTOPOINT) -+ continue; -+ if (!ifa->ifa_addr) -+ continue; -+ if (!ifa->ifa_netmask) -+ continue; -+ -+ if (ifa->ifa_addr->sa_family == AF_INET) { -+ uint32_t addr, dest, mask; -+ -+ if (host.family != AF_INET) -+ continue; -+ if (!ifa->ifa_broadaddr) -+ continue; -+ -+ if (!ip4) -+ ip4 = (uint32_t)ntohl(host.addr.s_addr); -+ -+ addr = (uint32_t)ntohl(((struct sockaddr_in*)ifa->ifa_addr)->sin_addr.s_addr); -+ if ((addr & 0xFF000000) == 0x7F000000) /* IPV4 loopback */ -+ continue; -+ -+ mask = (uint32_t)ntohl(((struct sockaddr_in*)ifa->ifa_netmask)->sin_addr.s_addr); -+ dest = (uint32_t)ntohl(((struct sockaddr_in*)ifa->ifa_broadaddr)->sin_addr.s_addr); -+ if ((ip4 & mask) != (dest & mask)) -+ continue; -+ -+ ret = ifa->ifa_name; -+ break; -+ } else if (ifa->ifa_addr->sa_family == AF_INET6) { -+ struct in6_addr *addr, *mask, dest, ip6; -+ unsigned int prefix; -+ -+ if (host.family != AF_INET6) -+ continue; -+ -+ addr = &((struct sockaddr_in6*)ifa->ifa_addr)->sin6_addr; -+ mask = &((struct sockaddr_in6*)ifa->ifa_netmask)->sin6_addr; -+ prefix = mask2prefix(mask); -+ -+ netmask(prefix, addr, &dest); -+ netmask(prefix, &host.addr6, &ip6); -+ -+ if (memcmp(&dest, &ip6, sizeof(struct in6_addr)) != 0) -+ continue; -+ -+ ret = ifa->ifa_name; -+ break; -+ } -+ } -+err: -+ return ret; -+} -+ -+void freeroutes(void) -+{ -+ if (ifa_list) -+ freeifaddrs(ifa_list); -+ ifa_list = NULL; -+} -Index: systemd-228/src/core/mount-iface.h -=================================================================== ---- /dev/null -+++ systemd-228/src/core/mount-iface.h -@@ -0,0 +1,25 @@ -+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -+ -+#pragma once -+ -+/*** -+ This file is part of systemd. -+ -+ Copyright 2014 Werner Fink -+ -+ 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 -+ the Free Software Foundation; either version 2.1 of the License, or -+ (at your option) any later version. -+ -+ systemd is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public License -+ along with systemd; If not, see . -+***/ -+ -+char *host2iface(const char *ip); -+void freeroutes(void); -Index: systemd-228/src/core/mount.c -=================================================================== ---- systemd-228.orig/src/core/mount.c -+++ systemd-228/src/core/mount.c -@@ -36,6 +36,7 @@ - #include "manager.h" - #include "mkdir.h" - #include "mount-setup.h" -+#include "mount-iface.h" - #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; -- bool delete, changed = false; -+ bool delete, changed = false, isnetwork; - Unit *u; -+ char *c; - int r; - - assert(m); -@@ -1370,6 +1372,8 @@ static int mount_setup_unit( - if (r < 0) - return r; - -+ isnetwork = fstype_is_network(fstype); -+ - u = manager_get_unit(m, e); - if (!u) { - delete = true; -@@ -1397,7 +1401,7 @@ static int mount_setup_unit( - if (m->running_as == MANAGER_SYSTEM) { - const char* target; - -- target = mount_needs_network(options, fstype) ? SPECIAL_REMOTE_FS_TARGET : SPECIAL_LOCAL_FS_TARGET; -+ target = isnetwork ? SPECIAL_REMOTE_FS_TARGET : SPECIAL_LOCAL_FS_TARGET; - r = unit_add_dependency_by_name(u, UNIT_BEFORE, target, NULL, true); - if (r < 0) - goto fail; -@@ -1483,6 +1487,32 @@ static int mount_setup_unit( - goto fail; - } - -+ if (isnetwork && (c = strrchr(p->what, ':')) && *(c+1) == '/') { -+ _cleanup_free_ char *opt = strdup(p->options); -+ char *addr; -+ -+ if (opt && (addr = strstr(opt, ",addr="))) { -+ char *colon, *iface; -+ -+ addr += 6; -+ if ((colon = strchr(addr, ','))) -+ *colon = '\0'; -+ -+ iface = host2iface(addr); -+ if (iface) { -+ _cleanup_free_ char* target = NULL; -+ if (asprintf(&target, "sys-subsystem-net-devices-%s.device", iface) < 0) -+ log_oom(); -+ else { -+ r = unit_add_dependency_by_name(u, UNIT_AFTER, target, NULL, true); -+ if (r < 0) -+ log_unit_error(u, "Failed to add dependency on %s, ignoring: %s", -+ target, strerror(-r)); -+ } -+ } -+ } -+ } -+ - if (changed) - unit_add_to_dbus_queue(u); - -@@ -1549,6 +1579,7 @@ static int mount_load_proc_self_mountinf - if (r == 0 && k < 0) - r = k; - } -+ freeroutes(); /* Just in case of using the routing table with host2iface() */ - - return r; - } diff --git a/0001-avoid-abort-due-timeout-at-user-service.patch b/0001-avoid-abort-due-timeout-at-user-service.patch deleted file mode 100644 index af7fed5d..00000000 --- a/0001-avoid-abort-due-timeout-at-user-service.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- - src/login/logind-session.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -Index: systemd-221/src/login/logind-session.c -=================================================================== ---- systemd-221.orig/src/login/logind-session.c -+++ systemd-221/src/login/logind-session.c -@@ -548,6 +548,12 @@ int session_start(Session *s) { - if (r < 0) - return r; - -+ if (!s->user->slice) { -+ if (errno) -+ return -errno; -+ return -ESTALE; -+ } -+ - /* Create cgroup */ - r = session_start_scope(s); - if (r < 0) diff --git a/0001-bnc888612-logind-polkit-acpi.patch b/0001-bnc888612-logind-polkit-acpi.patch deleted file mode 100644 index 8729f452..00000000 --- a/0001-bnc888612-logind-polkit-acpi.patch +++ /dev/null @@ -1,101 +0,0 @@ ---- - src/login/logind-action.c | 5 +++++ - src/login/logind-dbus.c | 31 +++++++++++++++++++++++-------- - 2 files changed, 28 insertions(+), 8 deletions(-) - -Index: systemd-227/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 */ - if (inhibit_key > 0) { -+ if (inhibit_key == INHIBIT_HANDLE_POWER_KEY) { -+ int fd; -+ fd = open("/run/systemd/acpi-shutdown", O_CREAT|O_WRONLY|O_TRUNC, S_IRUSR); -+ close(fd); -+ } - 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-227/src/login/logind-dbus.c -=================================================================== ---- 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, -- sd_bus_error *error) { -+ sd_bus_error *error, const char *sleep_verb) { - - _cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL; -- bool multiple_sessions, blocked; -+ bool multiple_sessions, blocked, shutdown_through_acpi; - uid_t uid; -- int r; -+ int r, fd; -+ struct stat buf; - - assert(m); - assert(message); -@@ -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); - -- if (multiple_sessions && action_multiple_sessions) { -+ fd = open ("/run/systemd/acpi-shutdown", O_NOFOLLOW|O_PATH|O_CLOEXEC); -+ if (fd >= 0) { -+ shutdown_through_acpi = fstat(fd, &buf) == 0 && -+ time(NULL) - buf.st_mtime <= 65 && -+ sleep_verb == NULL; -+ close(fd); -+ unlink ("/run/systemd/acpi-shutdown"); -+ } -+ else -+ shutdown_through_acpi = false; -+ -+ if (multiple_sessions && action_multiple_sessions && -+ !shutdown_through_acpi) { - 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; -@@ -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, NULL, interactive, UID_INVALID, &m->polkit_registry, error); - if (r < 0) - return r; -@@ -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, NULL, interactive, UID_INVALID, &m->polkit_registry, error); - if (r < 0) - return r; -@@ -1737,7 +1751,7 @@ static int method_do_shutdown_or_sleep( - } - - r = verify_shutdown_creds(m, message, w, interactive, action, action_multiple_sessions, -- action_ignore_inhibit, error); -+ action_ignore_inhibit, error, sleep_verb); - if (r != 0) - return r; - -@@ -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, -- action, action_multiple_sessions, action_ignore_inhibit, error); -+ action, action_multiple_sessions, -+ action_ignore_inhibit, error, "UNUSED"); - if (r != 0) - return r; - diff --git a/0001-core-exclude-.slice-units-from-systemctl-isolate.patch b/0001-core-exclude-.slice-units-from-systemctl-isolate.patch deleted file mode 100644 index c954427f..00000000 --- a/0001-core-exclude-.slice-units-from-systemctl-isolate.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 1b4cd0cf11feb7d41f2eff17f86fa55b31bb6841 Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Thu, 18 Feb 2016 22:51:23 +0100 -Subject: [PATCH] core: exclude .slice units from "systemctl isolate" - -Fixes: #1969 ---- - src/core/scope.c | 3 +-- - src/core/slice.c | 8 ++++++++ - 2 files changed, 9 insertions(+), 2 deletions(-) - -diff --git src/core/scope.c src/core/scope.c -index c5d0ece..361695c 100644 ---- a/src/core/scope.c -+++ b/src/core/scope.c -@@ -50,8 +50,7 @@ static void scope_init(Unit *u) { - assert(u->load_state == UNIT_STUB); - - s->timeout_stop_usec = u->manager->default_timeout_stop_usec; -- -- UNIT(s)->ignore_on_isolate = true; -+ u->ignore_on_isolate = true; - } - - static void scope_done(Unit *u) { -diff --git src/core/slice.c src/core/slice.c -index d65364c..667f61b 100644 ---- a/src/core/slice.c -+++ b/src/core/slice.c -@@ -34,6 +34,13 @@ static const UnitActiveState state_translation_table[_SLICE_STATE_MAX] = { - [SLICE_ACTIVE] = UNIT_ACTIVE - }; - -+static void slice_init(Unit *u) { -+ assert(u); -+ assert(u->load_state == UNIT_STUB); -+ -+ u->ignore_on_isolate = true; -+} -+ - static void slice_set_state(Slice *t, SliceState state) { - SliceState old_state; - assert(t); -@@ -305,6 +312,7 @@ const UnitVTable slice_vtable = { - .no_instances = true, - .can_transient = true, - -+ .init = slice_init, - .load = slice_load, - - .coldplug = slice_coldplug, --- -2.6.2 - diff --git a/0001-core-fix-bus-name-synchronization-after-daemon-reloa.patch b/0001-core-fix-bus-name-synchronization-after-daemon-reloa.patch deleted file mode 100644 index b1a18d36..00000000 --- a/0001-core-fix-bus-name-synchronization-after-daemon-reloa.patch +++ /dev/null @@ -1,193 +0,0 @@ -From d8ccf5fdc91c46ab5d0ae86e38c206bc508d4188 Mon Sep 17 00:00:00 2001 [> v228] -From: Daniel Mack -Date: Fri, 18 Dec 2015 17:28:15 +0100 -Subject: [PATCH] core: fix bus name synchronization after daemon-reload - -During daemon-reload, PID1 temporarly loses its DBus connection, so there's -a small window in which all signals sent by dbus-daemon are lost. - -This is a problem, since we rely on the NameOwnerChanged signals in order to -consider a service with Type=dbus fully started or terminated, respectively. - -In order to fix this, a rewrite of bus_list_names() is necessary. We used -to walk the current list of names on the bus, and blindly triggered the -bus_name_owner_change() callback on each service, providing the actual name -as current owner. This implementation has a number of problems: - -* We cannot detect if the the name was moved from one owner to the other - while we were reloading - -* We don't notify services which missed the name loss signal - -* Providing the actual name as current owner is a hack, as the comment also - admits. - -To fix this, this patch carries the following changes: - -* Track the name of the current bus name owner, and (de-)serialize it - during reload. This way, we can detect changes. - -* In bus_list_names(), walk the list of bus names we're interested in - first, and then see if the name is active on the bus. If it is, - check it it's still the same as it used to be, and synthesize - NameOwnerChanged signals for the name add and/or loss. - -This should fully synchronize the current name list with the internal -state of all services. ---- - src/core/dbus.c | 64 +++++++++++++++++++++++++++++++++++++++++++++--------- - src/core/service.c | 14 ++++++++++++ - src/core/service.h | 1 + - 3 files changed, 69 insertions(+), 10 deletions(-) - -diff --git a/src/core/dbus.c b/src/core/dbus.c -index e7ee216..58069f5 100644 ---- a/src/core/dbus.c -+++ b/src/core/dbus.c -@@ -736,7 +736,9 @@ static int bus_on_connection(sd_event_source *s, int fd, uint32_t revents, void - - static int bus_list_names(Manager *m, sd_bus *bus) { - _cleanup_strv_free_ char **names = NULL; -- char **i; -+ const char *name; -+ Iterator i; -+ Unit *u; - int r; - - assert(m); -@@ -746,15 +748,55 @@ static int bus_list_names(Manager *m, sd_bus *bus) { - if (r < 0) - return log_error_errno(r, "Failed to get initial list of names: %m"); - -- /* This is a bit hacky, we say the owner of the name is the -- * name itself, because we don't want the extra traffic to -- * figure out the real owner. */ -- STRV_FOREACH(i, names) { -- Unit *u; -+ /* We have to synchronize the current bus names with the -+ * list of active services. To do this, walk the list of -+ * all units with bus names. */ -+ HASHMAP_FOREACH_KEY(u, name, m->watch_bus, i) { -+ Service *s = SERVICE(u); -+ -+ assert(s); - -- u = hashmap_get(m->watch_bus, *i); -- if (u) -- UNIT_VTABLE(u)->bus_name_owner_change(u, *i, NULL, *i); -+ if (!streq_ptr(s->bus_name, name)) { -+ log_unit_warning(u, "Bus name has changed from %s → %s, ignoring.", s->bus_name, name); -+ continue; -+ } -+ -+ /* Check if a service's bus name is in the list of currently -+ * active names */ -+ if (strv_contains(names, name)) { -+ _cleanup_(sd_bus_creds_unrefp) sd_bus_creds *creds = NULL; -+ const char *unique; -+ -+ /* If it is, determine its current owner */ -+ r = sd_bus_get_name_creds(bus, name, SD_BUS_CREDS_UNIQUE_NAME, &creds); -+ if (r < 0) { -+ log_error_errno(r, "Failed to get bus name owner %s: %m", name); -+ continue; -+ } -+ -+ r = sd_bus_creds_get_unique_name(creds, &unique); -+ if (r < 0) { -+ log_error_errno(r, "Failed to get unique name for %s: %m", name); -+ continue; -+ } -+ -+ /* Now, let's compare that to the previous bus owner, and -+ * if it's still the same, all is fine, so just don't -+ * bother the service. Otherwise, the name has apparently -+ * changed, so synthesize a name owner changed signal. */ -+ -+ if (!streq_ptr(unique, s->bus_name_owner)) -+ UNIT_VTABLE(u)->bus_name_owner_change(u, name, s->bus_name_owner, unique); -+ } else { -+ /* So, the name we're watching is not on the bus. -+ * This either means it simply hasn't appeared yet, -+ * or it was lost during the daemon reload. -+ * Check if the service has a stored name owner, -+ * and synthesize a name loss signal in this case. */ -+ -+ if (s->bus_name_owner) -+ UNIT_VTABLE(u)->bus_name_owner_change(u, name, s->bus_name_owner, NULL); -+ } - } - - return 0; -@@ -808,7 +850,9 @@ static int bus_setup_api(Manager *m, sd_bus *bus) { - if (r < 0) - return log_error_errno(r, "Failed to register name: %m"); - -- bus_list_names(m, bus); -+ r = bus_list_names(m, bus); -+ if (r < 0) -+ return r; - - log_debug("Successfully connected to API bus."); - return 0; -diff --git a/src/core/service.c b/src/core/service.c -index 41a729c..c5b689a 100644 ---- a/src/core/service.c -+++ b/src/core/service.c -@@ -323,6 +323,8 @@ static void service_done(Unit *u) { - s->bus_name = mfree(s->bus_name); - } - -+ s->bus_name_owner = mfree(s->bus_name_owner); -+ - s->bus_endpoint_fd = safe_close(s->bus_endpoint_fd); - service_close_socket_fd(s); - service_connection_unref(s); -@@ -2122,6 +2124,7 @@ static int service_serialize(Unit *u, FILE *f, FDSet *fds) { - - unit_serialize_item(u, f, "main-pid-known", yes_no(s->main_pid_known)); - unit_serialize_item(u, f, "bus-name-good", yes_no(s->bus_name_good)); -+ unit_serialize_item(u, f, "bus-name-owner", s->bus_name_owner); - - r = unit_serialize_item_escaped(u, f, "status-text", s->status_text); - if (r < 0) -@@ -2249,6 +2252,10 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value, - log_unit_debug(u, "Failed to parse bus-name-good value: %s", value); - else - s->bus_name_good = b; -+ } else if (streq(key, "bus-name-owner")) { -+ r = free_and_strdup(&s->bus_name_owner, value); -+ if (r < 0) -+ log_unit_error_errno(u, r, "Unable to deserialize current bus owner %s: %m", value); - } else if (streq(key, "status-text")) { - char *t; - -@@ -3134,6 +3141,13 @@ static void service_bus_name_owner_change( - - s->bus_name_good = !!new_owner; - -+ /* Track the current owner, so we can reconstruct changes after a daemon reload */ -+ r = free_and_strdup(&s->bus_name_owner, new_owner); -+ if (r < 0) { -+ log_unit_error_errno(u, r, "Unable to set new bus name owner %s: %m", new_owner); -+ return; -+ } -+ - if (s->type == SERVICE_DBUS) { - - /* service_enter_running() will figure out what to -diff --git a/src/core/service.h b/src/core/service.h -index d0faad8..19efbcc 100644 ---- a/src/core/service.h -+++ b/src/core/service.h -@@ -172,6 +172,7 @@ struct Service { - bool reset_cpu_usage:1; - - char *bus_name; -+ char *bus_name_owner; /* unique name of the current owner */ - - char *status_text; - int status_errno; --- -2.6.2 - diff --git a/0001-core-re-sync-bus-name-list-after-deserializing-durin.patch b/0001-core-re-sync-bus-name-list-after-deserializing-durin.patch deleted file mode 100644 index 11b6a99f..00000000 --- a/0001-core-re-sync-bus-name-list-after-deserializing-durin.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 8936a5e34dbfa9274348f3fef99f7c9f9327ddf9 Mon Sep 17 00:00:00 2001 [> v228] -From: Daniel Mack -Date: Tue, 22 Dec 2015 11:37:09 +0100 -Subject: [PATCH] core: re-sync bus name list after deserializing during - daemon-reload - -When the daemon reloads, it doesn not actually give up its DBus connection, -as wrongly stated in an earlier commit. However, even though the bus -connection stays open, the daemon flushes out all its internal state. - -Hence, if there is a NameOwnerChanged signal after the flush and before the -deserialization, it cannot be matched against any pending unit. - -To fix this, rename bus_list_names() to manager_sync_bus_names() and call -it explicitly at the end of the daemon reload operation. ---- - src/core/dbus.c | 4 ++-- - src/core/dbus.h | 2 ++ - src/core/manager.c | 4 ++++ - 3 files changed, 8 insertions(+), 2 deletions(-) - -diff --git a/src/core/dbus.c b/src/core/dbus.c -index 58069f5..1d89b9e 100644 ---- a/src/core/dbus.c -+++ b/src/core/dbus.c -@@ -734,7 +734,7 @@ static int bus_on_connection(sd_event_source *s, int fd, uint32_t revents, void - return 0; - } - --static int bus_list_names(Manager *m, sd_bus *bus) { -+int manager_sync_bus_names(Manager *m, sd_bus *bus) { - _cleanup_strv_free_ char **names = NULL; - const char *name; - Iterator i; -@@ -850,7 +850,7 @@ static int bus_setup_api(Manager *m, sd_bus *bus) { - if (r < 0) - return log_error_errno(r, "Failed to register name: %m"); - -- r = bus_list_names(m, bus); -+ r = manager_sync_bus_names(m, bus); - if (r < 0) - return r; - -diff --git a/src/core/dbus.h b/src/core/dbus.h -index 4f06ad1..ff76166 100644 ---- a/src/core/dbus.h -+++ b/src/core/dbus.h -@@ -34,6 +34,8 @@ void bus_track_serialize(sd_bus_track *t, FILE *f); - int bus_track_deserialize_item(char ***l, const char *line); - int bus_track_coldplug(Manager *m, sd_bus_track **t, char ***l); - -+int manager_sync_bus_names(Manager *m, sd_bus *bus); -+ - int bus_foreach_bus(Manager *m, sd_bus_track *subscribed2, int (*send_message)(sd_bus *bus, void *userdata), void *userdata); - - int bus_verify_manage_units_async(Manager *m, sd_bus_message *call, sd_bus_error *error); -diff --git a/src/core/manager.c b/src/core/manager.c -index e65616a..ffe27be 100644 ---- a/src/core/manager.c -+++ b/src/core/manager.c -@@ -2574,6 +2574,10 @@ int manager_reload(Manager *m) { - /* Third, fire things up! */ - manager_coldplug(m); - -+ /* Sync current state of bus names with our set of listening units */ -+ if (m->api_bus) -+ manager_sync_bus_names(m, m->api_bus); -+ - assert(m->n_reloading > 0); - m->n_reloading--; - --- -2.6.2 - diff --git a/0001-journal-fix-HMAC-calculation-when-appending-a-data-o.patch b/0001-journal-fix-HMAC-calculation-when-appending-a-data-o.patch deleted file mode 100644 index 99e9c6cb..00000000 --- a/0001-journal-fix-HMAC-calculation-when-appending-a-data-o.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 6dac79e09ec1b45f05b3e9a5f1f445859b6eefd2 Mon Sep 17 00:00:00 2001 -From: Franck Bui -Date: Fri, 23 Sep 2016 13:33:01 +0200 -Subject: [PATCH 1/1] journal: fix HMAC calculation when appending a data - object - -Since commit 5996c7c295e073ce21d41305169132c8aa993ad0 (v190 !), the -calculation of the HMAC is broken because the hash for a data object -including a field is done in the wrong order: the field object is -hashed before the data object is. - -However during verification, the hash is done in the opposite order as -objects are scanned sequentially. - -(cherry picked from commit 33685a5a3a98c6ded64d0cc25e37d0180ceb0a6a) - -[fbui: fixes bsc#1000435] ---- - src/journal/journal-file.c | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c -index a9882cf..a24d97d 100644 ---- a/src/journal/journal-file.c -+++ b/src/journal/journal-file.c -@@ -1111,6 +1111,12 @@ static int journal_file_append_data( - if (r < 0) - return r; - -+#ifdef HAVE_GCRYPT -+ r = journal_file_hmac_put_object(f, OBJECT_DATA, o, p); -+ if (r < 0) -+ return r; -+#endif -+ - /* The linking might have altered the window, so let's - * refresh our pointer */ - r = journal_file_move_to_object(f, OBJECT_DATA, p, &o); -@@ -1135,12 +1141,6 @@ static int journal_file_append_data( - fo->field.head_data_offset = le64toh(p); - } - --#ifdef HAVE_GCRYPT -- r = journal_file_hmac_put_object(f, OBJECT_DATA, o, p); -- if (r < 0) -- return r; --#endif -- - if (ret) - *ret = o; - --- -2.10.0 - diff --git a/0001-journal-set-STATE_ARCHIVED-as-part-of-offlining-2740.patch b/0001-journal-set-STATE_ARCHIVED-as-part-of-offlining-2740.patch deleted file mode 100644 index 93e158b2..00000000 --- a/0001-journal-set-STATE_ARCHIVED-as-part-of-offlining-2740.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 0d0bad044f8f19c472acb69d10861a66d3d267b6 Mon Sep 17 00:00:00 2001 -From: Vito Caputo -Date: Tue, 26 Apr 2016 23:29:43 -0700 -Subject: [PATCH 1/1] journal: set STATE_ARCHIVED as part of offlining (#2740) - -The only code path which makes a journal durable is via -journal_file_set_offline(). - -When we perform a rotate the journal's header->state is being set to -STATE_ARCHIVED prior to journal_file_set_offline() being called. - -In journal_file_set_offline(), we short-circuit the entire offline when -f->header->state != STATE_ONLINE. - -This all results in none of the journal_file_set_offline() fsync() calls -being reached when rotate archives a journal, so archived journals are -never explicitly made durable. - -What we do now is instead of setting the f->header->state to -STATE_ARCHIVED directly in journal_file_rotate() prior to -journal_file_close(), we set an archive flag in f->archive for the -journal_file_set_offline() machinery to honor by committing -STATE_ARCHIVED instead of STATE_OFFLINE when set. - -Prior to this, rotated journals were never getting fsync() explicitly -performed on them, since journal_file_set_offline() short-circuited. -Obviously this is undesirable, and depends entirely on the underlying -filesystem as to how much durability was achieved when simply closing -the file. - -Note that this problem existed prior to the recent asynchronous fsync -changes, but those changes do facilitate our performing this durable -offline on rotate without blocking, regardless of the underlying -filesystem sync-on-close semantics. - -(cherry picked from commit 8eb851711fd166024297c425e9261200c36f489d) - -[fbui: context adjustment: the asynchronous journal_file_set_offline() - thingie doesn't exist in v228] - -[fbui: this also fixes the case when we wanted to append a tag (for - FSS verification) when closing the journal. Before this patch, - journal_file_append_tag() failed (silently) because re-opening - the journal to write the tag was not possible since it was - already in "archived" mode.] ---- - src/journal/journal-file.c | 10 ++++++++-- - src/journal/journal-file.h | 1 + - 2 files changed, 9 insertions(+), 2 deletions(-) - -diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c -index f9ff954..e7eecad 100644 ---- a/src/journal/journal-file.c -+++ b/src/journal/journal-file.c -@@ -130,7 +130,7 @@ int journal_file_set_offline(JournalFile *f) { - if (mmap_cache_got_sigbus(f->mmap, f->fd)) - return -EIO; - -- f->header->state = STATE_OFFLINE; -+ f->header->state = f->archive ? STATE_ARCHIVED : STATE_OFFLINE; - - if (mmap_cache_got_sigbus(f->mmap, f->fd)) - return -EIO; -@@ -2813,7 +2813,13 @@ int journal_file_rotate(JournalFile **f, bool compress, bool seal) { - if (r < 0 && errno != ENOENT) - return -errno; - -- old_file->header->state = STATE_ARCHIVED; -+ /* Set as archive so offlining commits w/state=STATE_ARCHIVED. -+ * Previously we would set old_file->header->state to STATE_ARCHIVED directly here, -+ * but journal_file_set_offline() short-circuits when state != STATE_ONLINE, which -+ * would result in the rotated journal never getting fsync() called before closing. -+ * Now we simply queue the archive state by setting an archive bit, leaving the state -+ * as STATE_ONLINE so proper offlining occurs. */ -+ old_file->archive = true; - - /* Currently, btrfs is not very good with out write patterns - * and fragments heavily. Let's defrag our journal files when -diff --git a/src/journal/journal-file.h b/src/journal/journal-file.h -index 898d12d..436e5ff 100644 ---- a/src/journal/journal-file.h -+++ b/src/journal/journal-file.h -@@ -76,6 +76,7 @@ typedef struct JournalFile { - bool compress_lz4:1; - bool seal:1; - bool defrag_on_close:1; -+ bool archive:1; - - bool tail_entry_monotonic_valid:1; - --- -2.10.0 - diff --git a/0001-journal-warn-when-we-fail-to-append-a-tag-to-a-journ.patch b/0001-journal-warn-when-we-fail-to-append-a-tag-to-a-journ.patch deleted file mode 100644 index c4dd9e96..00000000 --- a/0001-journal-warn-when-we-fail-to-append-a-tag-to-a-journ.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 9f47fe6b6a9aad001e99f1fdea78a0c54ce8ae55 Mon Sep 17 00:00:00 2001 -From: Franck Bui -Date: Fri, 23 Sep 2016 12:12:13 +0200 -Subject: [PATCH 1/1] journal: warn when we fail to append a tag to a journal - -We shouldn't silently fail when appending the tag to a journal file -since FSS protection will simply be disabled in this case. - -(cherry picked from commit 43cd8794839548a6f332875e8bee8bed2652bf2c) ---- - src/journal/journal-file.c | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c -index e7eecad..a9882cf 100644 ---- a/src/journal/journal-file.c -+++ b/src/journal/journal-file.c -@@ -145,8 +145,13 @@ JournalFile* journal_file_close(JournalFile *f) { - - #ifdef HAVE_GCRYPT - /* Write the final tag */ -- if (f->seal && f->writable) -- journal_file_append_tag(f); -+ if (f->seal && f->writable) { -+ int r; -+ -+ r = journal_file_append_tag(f); -+ if (r < 0) -+ log_error_errno(r, "Failed to append tag when closing journal: %m"); -+ } - #endif - - journal_file_set_offline(f); --- -2.10.0 - diff --git a/0001-let-systemctl-completion-ignore-at-names.patch b/0001-let-systemctl-completion-ignore-at-names.patch deleted file mode 100644 index 4159038e..00000000 --- a/0001-let-systemctl-completion-ignore-at-names.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - shell-completion/bash/systemctl.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: systemd-221/shell-completion/bash/systemctl.in -=================================================================== ---- systemd-221.orig/shell-completion/bash/systemctl.in -+++ systemd-221/shell-completion/bash/systemctl.in -@@ -43,7 +43,7 @@ __filter_units_by_property () { - local units=("$@") - local props - IFS=$'\n' read -rd '' -a props < \ -- <(__systemctl $mode show --property "$property" -- "${units[@]}") -+ <(__systemctl $mode show --property "$property" -- "${units[@]}" 2> /dev/null) - for ((i=0; $i < ${#units[*]}; i++)); do - if [[ "${props[i]}" = "$property=$value" ]]; then - echo " ${units[i]}" diff --git a/0001-nss-mymachines-do-not-allow-overlong-machine-names.patch b/0001-nss-mymachines-do-not-allow-overlong-machine-names.patch deleted file mode 100644 index f6af8080..00000000 --- a/0001-nss-mymachines-do-not-allow-overlong-machine-names.patch +++ /dev/null @@ -1,37 +0,0 @@ -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/0001-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch b/0001-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch deleted file mode 100644 index 0375d595..00000000 --- a/0001-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch +++ /dev/null @@ -1,43 +0,0 @@ -From: Werner Fink -Date: Wed Feb 26 14:36:27 UTC 2014 -Subject: Do not clobber XDG_RUNTIME_DIR if su command preserve environment - -Make sure that even if a su command without option -l or with option -m -is used, the XDG_RUNTIME_DIR will not be clobbered by the new uid. - -This belongs to BNC#852015 and also to BNC#855160 - ---- - src/login/pam_systemd.c | 19 +++++++++++++++++++ - 1 file changed, 19 insertions(+) - -Index: systemd-221/src/login/pam_systemd.c -=================================================================== ---- systemd-221.orig/src/login/pam_systemd.c -+++ systemd-221/src/login/pam_systemd.c -@@ -445,6 +445,25 @@ _public_ PAM_EXTERN int pam_sm_open_sess - r = export_legacy_dbus_address(handle, pw->pw_uid, runtime_path); - if (r != PAM_SUCCESS) - return r; -+ } else if (getenv("XDG_RUNTIME_DIR")) { -+ _cleanup_free_ char *p = NULL; -+ -+ /* Make sure that after running YaST2 or the xdg-su scripts -+ * the runtime directory is not clobbered. Even a normal su -+ * command without -l or with -m may clobber. */ -+ -+ if ((r = asprintf(&p, "/run/user/%lu", (unsigned long)pw->pw_uid)) < 0) -+ return PAM_BUF_ERR; -+ -+ r = pam_misc_setenv(handle, "XDG_RUNTIME_DIR", p, 0); -+ if (r != PAM_SUCCESS) { -+ pam_syslog(handle, LOG_ERR, "Failed to set runtime dir."); -+ return r; -+ } -+ -+ r = export_legacy_dbus_address(handle, pw->pw_uid, p); -+ if (r != PAM_SUCCESS) -+ return r; - } - - if (!isempty(seat)) { diff --git a/0001-pid1-don-t-return-any-error-in-manager_dispatch_noti.patch b/0001-pid1-don-t-return-any-error-in-manager_dispatch_noti.patch deleted file mode 100644 index 73ebf147..00000000 --- a/0001-pid1-don-t-return-any-error-in-manager_dispatch_noti.patch +++ /dev/null @@ -1,51 +0,0 @@ -From c47885438517ac77ee34a30ee3d09e5deb9968f6 Mon Sep 17 00:00:00 2001 -From: Franck Bui -Date: Thu, 29 Sep 2016 19:44:34 +0200 -Subject: [PATCH 1/1] pid1: don't return any error in - manager_dispatch_notify_fd() (#4240) - -If manager_dispatch_notify_fd() fails and returns an error then the handling of -service notifications will be disabled entirely leading to a compromised system. - -For example pid1 won't be able to receive the WATCHDOG messages anymore and -will kill all services supposed to send such messages. -(cherry picked from commit 9987750e7a4c62e0eb8473603150596ba7c3a015) ---- - src/core/manager.c | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) - -diff --git a/src/core/manager.c b/src/core/manager.c -index 56ca9cf..06d78e4 100644 ---- a/src/core/manager.c -+++ b/src/core/manager.c -@@ -1560,10 +1560,14 @@ static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t - - n = recvmsg(m->notify_fd, &msghdr, MSG_DONTWAIT|MSG_CMSG_CLOEXEC); - if (n < 0) { -- if (errno == EAGAIN || errno == EINTR) -- return 0; -+ if (!IN_SET(errno, EAGAIN, EINTR)) -+ log_error("Failed to receive notification message: %m"); - -- return -errno; -+ /* It's not an option to return an error here since it -+ * would disable the notification handler entirely. Services -+ * wouldn't be able to send the WATCHDOG message for -+ * example... */ -+ return 0; - } - if (n == 0) { - log_debug("Got zero-length notification message. Ignoring."); -@@ -1590,7 +1594,8 @@ static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t - r = fdset_new_array(&fds, fd_array, n_fds); - if (r < 0) { - close_many(fd_array, n_fds); -- return log_oom(); -+ log_oom(); -+ return 0; - } - } - --- -2.10.0 - diff --git a/0001-pid1-more-informative-error-message-for-ignored-noti.patch b/0001-pid1-more-informative-error-message-for-ignored-noti.patch deleted file mode 100644 index 6773ccd3..00000000 --- a/0001-pid1-more-informative-error-message-for-ignored-noti.patch +++ /dev/null @@ -1,38 +0,0 @@ -From eb54b43fe31392c9f77505d8f9cd86d1f050b49d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Thu, 29 Sep 2016 16:07:41 +0200 -Subject: [PATCH 1/1] pid1: more informative error message for ignored - notifications - -It's probably easier to diagnose a bad notification message if the -contents are printed. But still, do anything only if debugging is on. - -(cherry picked from commit a86b76753d7868c2d05f046f601bc7dc89fc2203) ---- - src/core/manager.c | 10 ++++++++-- - 1 file changed, 8 insertions(+), 2 deletions(-) - -diff --git a/src/core/manager.c b/src/core/manager.c -index 58d346e..0d0158a 100644 ---- a/src/core/manager.c -+++ b/src/core/manager.c -@@ -1516,8 +1516,14 @@ static void manager_invoke_notify_message(Manager *m, Unit *u, pid_t pid, const - - if (UNIT_VTABLE(u)->notify_message) - UNIT_VTABLE(u)->notify_message(u, pid, tags, fds); -- else -- log_unit_debug(u, "Got notification message for unit. Ignoring."); -+ else if (_unlikely_(log_get_max_level() >= LOG_DEBUG)) { -+ _cleanup_free_ char *x = NULL, *y = NULL; -+ -+ x = cescape(buf); -+ if (x) -+ y = ellipsize(x, 20, 90); -+ log_unit_debug(u, "Got notification message \"%s\", ignoring.", strnull(y)); -+ } - } - - static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t revents, void *userdata) { --- -2.10.0 - diff --git a/0001-pid1-process-zero-length-notification-messages-again.patch b/0001-pid1-process-zero-length-notification-messages-again.patch deleted file mode 100644 index 72e6905f..00000000 --- a/0001-pid1-process-zero-length-notification-messages-again.patch +++ /dev/null @@ -1,82 +0,0 @@ -From 98c4bab7add94bdfb6cc238376c47a9c73a4fe39 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= -Date: Thu, 29 Sep 2016 16:06:02 +0200 -Subject: [PATCH 1/1] pid1: process zero-length notification messages again - -This undoes 531ac2b234. I acked that patch without looking at the code -carefully enough. There are two problems: -- we want to process the fds anyway -- in principle empty notification messages are valid, and we should - process them as usual, including logging using log_unit_debug(). - -(cherry picked from commit 8523bf7dd514a3a2c6114b7b8fb8f308b4f09fc4) - -[fbui: adjust context] ---- - src/core/manager.c | 15 ++++++--------- - 1 file changed, 6 insertions(+), 9 deletions(-) - -diff --git a/src/core/manager.c b/src/core/manager.c -index 06d78e4..58d346e 100644 ---- a/src/core/manager.c -+++ b/src/core/manager.c -@@ -1501,13 +1501,12 @@ static unsigned manager_dispatch_dbus_queue(Manager *m) { - return n; - } - --static void manager_invoke_notify_message(Manager *m, Unit *u, pid_t pid, const char *buf, size_t n, FDSet *fds) { -+static void manager_invoke_notify_message(Manager *m, Unit *u, pid_t pid, const char *buf, FDSet *fds) { - _cleanup_strv_free_ char **tags = NULL; - - assert(m); - assert(u); - assert(buf); -- assert(n > 0); - - tags = strv_split(buf, "\n\r"); - if (!tags) { -@@ -1569,10 +1568,6 @@ static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t - * example... */ - return 0; - } -- if (n == 0) { -- log_debug("Got zero-length notification message. Ignoring."); -- return 0; -- } - - CMSG_FOREACH(cmsg, &msghdr) { - if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) { -@@ -1609,25 +1604,27 @@ static int manager_dispatch_notify_fd(sd_event_source *source, int fd, uint32_t - return 0; - } - -+ /* The message should be a string. Here we make sure it's NUL-terminated, -+ * but only the part until first NUL will be used anyway. */ - buf[n] = 0; - - /* Notify every unit that might be interested, but try - * to avoid notifying the same one multiple times. */ - u1 = manager_get_unit_by_pid_cgroup(m, ucred->pid); - if (u1) { -- manager_invoke_notify_message(m, u1, ucred->pid, buf, n, fds); -+ manager_invoke_notify_message(m, u1, ucred->pid, buf, fds); - found = true; - } - - u2 = hashmap_get(m->watch_pids1, PID_TO_PTR(ucred->pid)); - if (u2 && u2 != u1) { -- manager_invoke_notify_message(m, u2, ucred->pid, buf, n, fds); -+ manager_invoke_notify_message(m, u2, ucred->pid, buf, fds); - found = true; - } - - u3 = hashmap_get(m->watch_pids2, PID_TO_PTR(ucred->pid)); - if (u3 && u3 != u2 && u3 != u1) { -- manager_invoke_notify_message(m, u3, ucred->pid, buf, n, fds); -+ manager_invoke_notify_message(m, u3, ucred->pid, buf, fds); - found = true; - } - --- -2.10.0 - diff --git a/0001-rules-block-add-support-for-pmem-devices-3683.patch b/0001-rules-block-add-support-for-pmem-devices-3683.patch deleted file mode 100644 index 2af5f771..00000000 --- a/0001-rules-block-add-support-for-pmem-devices-3683.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 31ae8c8741ce9595f4053234d6a6b2fb3616fedf Mon Sep 17 00:00:00 2001 -From: bgbhpe -Date: Fri, 8 Jul 2016 11:43:56 -0400 -Subject: [PATCH 1/1] rules: block: add support for pmem devices (#3683) - -Persistent memory devices can be exposed as block devices as /dev/pmemN -and /dev/pmemNs. pmemN is the raw device and is byte-addressable from -within the kernel and when mmapped by applications from a DAX-mounted -file system. pmemNs has the block translation table (BTT) layered on top, -offering atomic sector/block access. Both pmemN and pmemNs are expected -to contain file systems. - -blkid(8) and lsblk(8) seem to correctly report on pmemN and pmemNs. -systemd v219 will populate /dev/disk/by-uuid/ when, for example, mkfs is -used on pmem, but systemd v228 does not. - -Add pmem to the whitelist. -(cherry picked from commit f3bc4ccc2edf5ad2a99d6ba2795b9999fe76c3df) - -[tblume: fixes bsc#988119] ---- - rules/60-block.rules | 2 +- - rules/60-persistent-storage.rules | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/rules/60-block.rules b/rules/60-block.rules -index c74caca..42c7597 100644 ---- a/rules/60-block.rules -+++ b/rules/60-block.rules -@@ -8,4 +8,4 @@ ACTION=="add", SUBSYSTEM=="module", KERNEL=="block", ATTR{parameters/events_dfl_ - ACTION=="change", SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST=="block", ATTR{block/*/uevent}="change" - - # watch metadata changes, caused by tools closing the device node which was opened for writing --ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*", OPTIONS+="watch" -+ACTION!="remove", SUBSYSTEM=="block", KERNEL=="loop*|nvme*|sd*|vd*|xvd*|pmem*", OPTIONS+="watch" -diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules -index ee1fb08f..ef5d205 100644 ---- a/rules/60-persistent-storage.rules -+++ b/rules/60-persistent-storage.rules -@@ -6,7 +6,7 @@ - ACTION=="remove", GOTO="persistent_storage_end" - - SUBSYSTEM!="block", GOTO="persistent_storage_end" --KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*", GOTO="persistent_storage_end" -+KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|pmem*", GOTO="persistent_storage_end" - - # ignore partitions that span the entire disk - TEST=="whole_disk", GOTO="persistent_storage_end" --- -2.10.0 - diff --git a/0001-systemctl-pid1-do-not-warn-about-missing-install-inf.patch b/0001-systemctl-pid1-do-not-warn-about-missing-install-inf.patch deleted file mode 100644 index 8c9d10ab..00000000 --- a/0001-systemctl-pid1-do-not-warn-about-missing-install-inf.patch +++ /dev/null @@ -1,121 +0,0 @@ -From b8d6cc0513adadea9b5048fa320d7f49c10f004b Mon Sep 17 00:00:00 2001 -From: Thomas Blume -Date: Wed, 4 May 2016 08:51:52 +0200 -Subject: [PATCH] systemctl,pid1: do not warn about missing install info with - "preset" - -When "preset" was executed for a unit without install info, we'd warn similarly -as for "enable" and "disable". But "preset" is usually called for all units, -because the preset files are provided by the distribution, and the units are under -control of individual programs, and it's reasonable to call "preset" for all units -rather then try to do it only for the ones that can be installed. -We also don't warn about missing info for "preset-all". Thus it seems reasonable -to silently ignore units w/o install info when presetting. - -(In addition, when more than one unit was specified, we'd issue the warning -only if none of them had install info. But this is probably something to fix -for enable/disable too.) ---- - man/systemctl.xml | 26 +++++++++++++------------- - src/systemctl/systemctl.c | 10 +++++----- - 2 files changed, 18 insertions(+), 18 deletions(-) - -diff --git a/man/systemctl.xml b/man/systemctl.xml -index f342e26..1c2c919 100644 ---- a/man/systemctl.xml -+++ b/man/systemctl.xml -@@ -1082,22 +1082,22 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service - preset NAME... - - -- Reset one or more unit files, as specified on the -- command line, to the defaults configured in the preset -- policy files. This has the same effect as -- disable or enable, -- depending how the unit is listed in the preset files. -+ Reset the enable/disable status one or more unit files, as specified on -+ the command line, to the defaults configured in the preset policy files. This -+ has the same effect as disable or -+ enable, depending how the unit is listed in the preset -+ files. - -- Use to control -- whether units shall be enabled and disabled, or only -- enabled, or only disabled. -+ Use to control whether units shall be -+ enabled and disabled, or only enabled, or only disabled. -+ -+ If the unit carries no install information, it will be silently ignored -+ by this command. - -- For more information on the preset policy format, -- see -+ For more information on the preset policy format, see - systemd.preset5. -- For more information on the concept of presets, please -- consult the Preset -+ For more information on the concept of presets, please consult the -+ Preset - document. - - -diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c -index 1f42d1a..9dc5971 100644 ---- a/src/systemctl/systemctl.c -+++ b/src/systemctl/systemctl.c -@@ -5399,6 +5399,7 @@ static int enable_unit(int argc, char *argv[], void *userdata) { - UnitFileChange *changes = NULL; - unsigned n_changes = 0; - int carries_install_info = -1; -+ bool ignore_carries_install_info = false; - int r; - - if (!argv[1]) -@@ -5412,8 +5413,7 @@ static int enable_unit(int argc, char *argv[], void *userdata) { - if (r < 0) - return r; - -- /* If the operation was fully executed by the SysV compat, -- * let's finish early */ -+ /* If the operation was fully executed by the SysV compat, let's finish early */ - if (strv_isempty(names)) - return 0; - -@@ -5430,7 +5430,6 @@ static int enable_unit(int argc, char *argv[], void *userdata) { - r = unit_file_link(arg_scope, arg_runtime, arg_root, names, arg_force, &changes, &n_changes); - else if (streq(verb, "preset")) { - r = unit_file_preset(arg_scope, arg_runtime, arg_root, names, arg_preset_mode, arg_force, &changes, &n_changes); -- carries_install_info = r; - } else if (streq(verb, "mask")) - r = unit_file_mask(arg_scope, arg_runtime, arg_root, names, arg_force, &changes, &n_changes); - else if (streq(verb, "unmask")) -@@ -5450,7 +5449,7 @@ static int enable_unit(int argc, char *argv[], void *userdata) { - } else { - _cleanup_bus_message_unref_ sd_bus_message *reply = NULL, *m = NULL; - _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL; -- int expect_carries_install_info = false; -+ bool expect_carries_install_info = false; - bool send_force = true, send_preset_mode = false; - const char *method; - sd_bus *bus; -@@ -5481,6 +5480,7 @@ static int enable_unit(int argc, char *argv[], void *userdata) { - method = "PresetUnitFiles"; - - expect_carries_install_info = true; -+ ignore_carries_install_info = true; - } else if (streq(verb, "mask")) - method = "MaskUnitFiles"; - else if (streq(verb, "unmask")) { -@@ -5540,7 +5540,7 @@ static int enable_unit(int argc, char *argv[], void *userdata) { - r = 0; - } - -- if (carries_install_info == 0) -+ if (carries_install_info == 0 && !ignore_carries_install_info) - log_warning("The unit files have no [Install] section. They are not meant to be enabled\n" - "using systemctl.\n" - "Possible reasons for having this kind of units are:\n" --- -2.6.6 - diff --git a/0010-do-not-install-sulogin-unit-with-poweroff.patch b/0010-do-not-install-sulogin-unit-with-poweroff.patch deleted file mode 100644 index af9d7f53..00000000 --- a/0010-do-not-install-sulogin-unit-with-poweroff.patch +++ /dev/null @@ -1,19 +0,0 @@ -| -| Belongs to bnc#849071 that is do not install console-shell.service -| in any system target as this will cause automatic poweroff at boot. -| ---- - units/console-shell.service.m4.in | 3 --- - 1 file changed, 3 deletions(-) - -Index: systemd-221/units/console-shell.service.m4.in -=================================================================== ---- systemd-221.orig/units/console-shell.service.m4.in -+++ systemd-221/units/console-shell.service.m4.in -@@ -28,6 +28,3 @@ StandardError=inherit - KillMode=process - IgnoreSIGPIPE=no - SendSIGHUP=yes -- --[Install] --WantedBy=getty.target diff --git a/0014-journald-with-journaling-FS.patch b/0014-journald-with-journaling-FS.patch deleted file mode 100644 index 00577b3d..00000000 --- a/0014-journald-with-journaling-FS.patch +++ /dev/null @@ -1,75 +0,0 @@ -From: werner@suse.de -Upstream: marked as openSUSE-specific fix originally, but may well - worth be to be sent upstream. - -Original description: - (none) - -Augmented description [jengelh@inai.de]: -Disable COW on journal files, as that is naturally leading to a lot -of unwanted fragmentation on btrfs. -No word on compression… ---- - src/journal/journald-server.c | 34 ++++++++++++++++++++++++++++++++++ - 1 file changed, 34 insertions(+) - -Index: systemd-227/src/journal/journald-server.c -=================================================================== ---- 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 -@@ -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). -+ * -+ * …but src/journal/journal-file.c already sets NOCOW too…⸘ -+ */ -+static void disable_cow(const char *dir, const Server *serv) -+{ -+ unsigned long flags; -+ int fd = open(dir, O_DIRECTORY); -+ -+ if (fd < 0) -+ return; -+ if (ioctl(fd, FS_IOC_GETFLAGS, &flags) == 0) { -+ unsigned long old = flags; -+ if (!(flags & FS_NOATIME_FL) && -+ ioctl(fd, FS_IOC_SETFLAGS, flags | FS_NOATIME_FL) == 0) -+ flags |= FS_NOATIME_FL; -+ if (!(flags & FS_NOCOW_FL) && -+ ioctl(fd, FS_IOC_SETFLAGS, flags | FS_NOCOW_FL) == 0) -+ flags |= FS_NOCOW_FL; -+ if (!(flags & FS_NOCOMP_FL) && serv->compress) { -+ flags &= ~FS_COMPR_FL; -+ flags |= FS_NOCOMP_FL; -+ } -+ if (old != flags) -+ ioctl(fd, FS_IOC_SETFLAGS, flags); -+ } -+ 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 - - fn = strjoina("/var/log/journal/", SERVER_MACHINE_ID(s)); - (void) mkdir(fn, 0755); -+ disable_cow(fn, s); - - fn = strjoina(fn, "/system.journal"); - r = journal_file_open_reliably(fn, O_RDWR|O_CREAT, 0640, s->compress, s->seal, &s->system_metrics, s->mmap, NULL, &s->system_journal); diff --git a/0019-make-completion-smart-to-be-able-to-redirect.patch b/0019-make-completion-smart-to-be-able-to-redirect.patch deleted file mode 100644 index c8ab5fa7..00000000 --- a/0019-make-completion-smart-to-be-able-to-redirect.patch +++ /dev/null @@ -1,272 +0,0 @@ ---- - shell-completion/bash/coredumpctl | 6 +++++- - shell-completion/bash/hostnamectl | 6 +++++- - shell-completion/bash/journalctl | 6 +++++- - shell-completion/bash/kernel-install | 13 ++++++++++++- - shell-completion/bash/localectl | 6 +++++- - shell-completion/bash/loginctl | 6 +++++- - shell-completion/bash/systemctl.in | 6 +++++- - shell-completion/bash/systemd-analyze | 6 +++++- - shell-completion/bash/systemd-run | 14 +++++++++++++- - shell-completion/bash/timedatectl | 6 +++++- - shell-completion/bash/udevadm | 6 +++++- - 11 files changed, 70 insertions(+), 11 deletions(-) - -Index: systemd-228/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' - ) - -+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then -+ return 0 -+ fi -+ - if __contains_word "$prev" '--output -o'; then - comps=$( compgen -A file -- "$cur" ) - compopt -o filenames -@@ -82,4 +86,4 @@ _coredumpctl() { - return 0 - } - --complete -F _coredumpctl coredumpctl -+complete -o default -o bashdefault -F _coredumpctl coredumpctl -Index: systemd-228/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' - -+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then -+ return 0 -+ fi -+ - if [[ $cur = -* ]]; then - COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") ) - return 0 -@@ -61,4 +65,4 @@ _hostnamectl() { - return 0 - } - --complete -F _hostnamectl hostnamectl -+complete -o default -o bashdefault -F _hostnamectl hostnamectl -Index: systemd-228/shell-completion/bash/journalctl -=================================================================== ---- 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 -+ return 0 -+ fi -+ - if __contains_word "$prev" ${OPTS[ARG]} ${OPTS[ARGUNKNOWN]}; then - case $prev in - --boot|--this-boot|-b) -@@ -121,4 +125,4 @@ _journalctl() { - fi - } - --complete -F _journalctl journalctl -+complete -o default -o bashdefault -F _journalctl journalctl -Index: systemd-228/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 . - -+__contains_word () { -+ local w word=$1; shift -+ for w in "$@"; do -+ [[ $w = "$word" ]] && return -+ done -+} -+ - _kernel_install() { - local comps - local MACHINE_ID - local cur=${COMP_WORDS[COMP_CWORD]} - -+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then -+ return 0 -+ fi -+ - case $COMP_CWORD in - 1) - comps="add remove" -@@ -47,4 +58,4 @@ _kernel_install() { - return 0 - } - --complete -F _kernel_install kernel-install -+complete -o default -o bashdefault -F _kernel_install kernel-install -Index: systemd-228/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' - -+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then -+ return 0 -+ fi -+ - if __contains_word "$prev" $OPTS; then - case $prev in - --host|-H) -@@ -89,4 +93,4 @@ _localectl() { - return 0 - } - --complete -F _localectl localectl -+complete -o default -o bashdefault -F _localectl localectl -Index: systemd-228/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' - ) - -+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then -+ return 0 -+ fi -+ - if __contains_word "$prev" ${OPTS[ARG]}; then - case $prev in - --signal|-s) -@@ -107,4 +111,4 @@ _loginctl () { - return 0 - } - --complete -F _loginctl loginctl -+complete -o default -o bashdefault -F _loginctl loginctl -Index: systemd-228/shell-completion/bash/systemctl.in -=================================================================== ---- 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 -+ return 0 -+ fi -+ - if __contains_word "--user" ${COMP_WORDS[*]}; then - mode=--user - 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-228/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' - ) - -+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then -+ return 0 -+ fi -+ - _init_completion || return - - for ((i=0; i < COMP_CWORD; i++)); do -@@ -114,4 +118,4 @@ _systemd_analyze() { - return 0 - } - --complete -F _systemd_analyze systemd-analyze -+complete -o default -o bashdefault -F _systemd_analyze systemd-analyze -Index: systemd-228/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 . - -+__contains_word () { -+ local w word=$1; shift -+ for w in "$@"; do -+ [[ $w = "$word" ]] && return -+ done -+} -+ - __systemctl() { - local mode=$1; shift 1 - systemctl $mode --full --no-legend "$@" -@@ -40,6 +47,11 @@ _systemd_run() { - - local mode=--system - local i -+ -+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then -+ return 0 -+ fi -+ - 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-228/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' - -+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then -+ return 0 -+ fi -+ - if __contains_word "$prev" $OPTS; then - case $prev in - --host|-H) -@@ -73,4 +77,4 @@ _timedatectl() { - return 0 - } - --complete -F _timedatectl timedatectl -+complete -o default -o bashdefault -F _timedatectl timedatectl -Index: systemd-228/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) - -+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then -+ return 0 -+ fi -+ - for ((i=0; i < COMP_CWORD; i++)); do - if __contains_word "${COMP_WORDS[i]}" "${verbs[@]}" && - ! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then -@@ -94,4 +98,4 @@ _udevadm() { - return 0 - } - --complete -F _udevadm udevadm -+complete -o default -o bashdefault -F _udevadm udevadm diff --git a/1002-rules-create-by-id-scsi-links-for-ATA-devices.patch b/1002-rules-create-by-id-scsi-links-for-ATA-devices.patch deleted file mode 100644 index cea9163a..00000000 --- a/1002-rules-create-by-id-scsi-links-for-ATA-devices.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Robert Milasan -Date: Wed, 27 Jun 2012 08:55:59 +0000 -Subject: rules create by id scsi links for ATA devices - -Re-enable creation of by-id scsi links for ATA devices. (bnc#769002) ---- - rules/60-persistent-storage.rules | 4 ++++ - 1 file changed, 4 insertions(+) - -Index: systemd-221/rules/60-persistent-storage.rules -=================================================================== ---- systemd-221.orig/rules/60-persistent-storage.rules -+++ systemd-221/rules/60-persistent-storage.rules -@@ -36,6 +36,10 @@ KERNEL=="cciss*", ENV{DEVTYPE}=="disk", - KERNEL=="sd*|sr*|cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" - KERNEL=="sd*|cciss*", ENV{DEVTYPE}=="partition", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" - -+# scsi compat links for ATA devices -+KERNEL=="sd*[!0-9]", ENV{ID_BUS}=="ata", PROGRAM="scsi_id --whitelisted --replace-whitespace -p0x80 -d $devnode", RESULT=="?*", ENV{ID_SCSI_COMPAT}="$result", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}" -+KERNEL=="sd*[0-9]", ENV{ID_SCSI_COMPAT}=="?*", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}-part%n" -+ - # FireWire - KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}" - KERNEL=="sd*[0-9]", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}-part%n" diff --git a/1003-udev-netlink-null-rules.patch b/1003-udev-netlink-null-rules.patch deleted file mode 100644 index 92bfef99..00000000 --- a/1003-udev-netlink-null-rules.patch +++ /dev/null @@ -1,22 +0,0 @@ -From: Robert Milasan -Date: Mon, 6 Aug 2012 13:35:34 +0000 -Subject: udev netlink null rules - -udevd race for netlink events (bnc#774646) ---- - src/udev/udevd.c | 2 ++ - 1 file changed, 2 insertions(+) - -Index: systemd-221/src/udev/udevd.c -=================================================================== ---- systemd-221.orig/src/udev/udevd.c -+++ systemd-221/src/udev/udevd.c -@@ -917,6 +917,8 @@ static int on_uevent(sd_event_source *s, - dev = udev_monitor_receive_device(manager->monitor); - if (dev) { - udev_device_ensure_usec_initialized(dev, NULL); -+ if (manager->rules == NULL) -+ manager->rules = udev_rules_new(manager->udev, arg_resolve_names); - r = event_queue_insert(manager, dev); - if (r < 0) - udev_device_unref(dev); diff --git a/1005-create-default-links-for-primary-cd_dvd-drive.patch b/1005-create-default-links-for-primary-cd_dvd-drive.patch deleted file mode 100644 index 868247ed..00000000 --- a/1005-create-default-links-for-primary-cd_dvd-drive.patch +++ /dev/null @@ -1,24 +0,0 @@ -From: Robert Milasan -Date: Tue, 12 Feb 2013 09:16:23 +0000 -Subject: create default links for primary cd_dvd drive - -cdrom_id: created links for the default cd/dvd drive (bnc#783054). ---- - rules/60-cdrom_id.rules | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -Index: systemd-221/rules/60-cdrom_id.rules -=================================================================== ---- systemd-221.orig/rules/60-cdrom_id.rules -+++ systemd-221/rules/60-cdrom_id.rules -@@ -20,6 +20,9 @@ IMPORT{program}="cdrom_id --lock-media $ - # stale mounts after ejecting - ENV{DISK_MEDIA_CHANGE}=="?*", ENV{ID_CDROM_MEDIA}!="?*", ENV{SYSTEMD_READY}="0" - --KERNEL=="sr0", SYMLINK+="cdrom", OPTIONS+="link_priority=-100" -+KERNEL=="sr0", ENV{ID_CDROM}=="1", SYMLINK+="cdrom", OPTIONS+="link_priority=-100" -+KERNEL=="sr0", ENV{ID_CDROM_CD_RW}=="1", SYMLINK+="cdrw", OPTIONS+="link_priority=-100" -+KERNEL=="sr0", ENV{ID_CDROM_DVD}=="1", SYMLINK+="dvd", OPTIONS+="link_priority=-100" -+KERNEL=="sr0", ENV{ID_CDROM_DVD_RW}=="1", SYMLINK+="dvdrw", OPTIONS+="link_priority=-100" - - LABEL="cdrom_end" diff --git a/1006-udev-always-rename-network.patch b/1006-udev-always-rename-network.patch deleted file mode 100644 index 36bb93ba..00000000 --- a/1006-udev-always-rename-network.patch +++ /dev/null @@ -1,77 +0,0 @@ -From: Robert Milasan -Cc: Werner Fink -Subject: udev always rename network - -Date: Thu, 28 Mar 2013 09:24:43 +0000 -udev: ensure that the network interfaces are renamed even if they exist (bnc#809843). - -Date: Tue, 4 Mar 2014 10:29:21 +0000 -Port the patch of Robert to systemd v210 and test it out. - ---- - src/udev/udev-event.c | 41 +++++++++++++++++++++++++++++++++++++---- - 1 file changed, 37 insertions(+), 4 deletions(-) - - -Index: systemd-221/src/udev/udev-event.c -=================================================================== ---- systemd-221.orig/src/udev/udev-event.c -+++ systemd-221/src/udev/udev-event.c -@@ -796,20 +796,53 @@ out: - static int rename_netif(struct udev_event *event) { - struct udev_device *dev = event->dev; - char name[IFNAMSIZ]; -+ char interim[IFNAMSIZ], *ptr = &interim[0]; - const char *oldname; -- int r; -+ int r, loop; - - oldname = udev_device_get_sysname(dev); - - strscpy(name, IFNAMSIZ, event->name); - - r = rtnl_set_link_name(&event->rtnl, udev_device_get_ifindex(dev), name); -- if (r < 0) -+ if (r == 0) { -+ log_info("renamed network interface %s to %s\n", oldname, name); -+ return r; -+ } else if (r != -EEXIST) { - return log_error_errno(r, "Error changing net interface name '%s' to '%s': %m", oldname, name); -+ } - -- log_debug("renamed network interface '%s' to '%s'", oldname, name); -+ /* free our own name, another process may wait for us */ -+ strpcpyf(&ptr, IFNAMSIZ, "rename%u", udev_device_get_ifindex(dev)); - -- return 0; -+ r = rtnl_set_link_name(&event->rtnl, udev_device_get_ifindex(dev), interim); -+ if (r < 0) { -+ log_error("error changing net interface name %s to %s: %s", -+ oldname, interim, strerror(-r)); -+ return r; -+ } -+ -+ /* log temporary name */ -+ log_info("renamed network interface %s to %s\n", oldname, interim); -+ -+ loop = 90 * 20; -+ while (loop--) { -+ const struct timespec duration = { 0, 1000 * 1000 * 1000 / 20 }; -+ nanosleep(&duration, NULL); -+ -+ r = rtnl_set_link_name(&event->rtnl, udev_device_get_ifindex(dev), name); -+ if (r == 0) { -+ log_info("renamed network interface %s to %s\n", interim, name); -+ break; -+ } -+ -+ if (r != -EEXIST) { -+ log_error("error changing net interface name %s to %s: %s", -+ interim, name, strerror(-r)); -+ break; -+ } -+ } -+ return r; - } - - void udev_event_execute_rules(struct udev_event *event, diff --git a/1007-physical-hotplug-cpu-and-memory.patch b/1007-physical-hotplug-cpu-and-memory.patch deleted file mode 100644 index 5365f17c..00000000 --- a/1007-physical-hotplug-cpu-and-memory.patch +++ /dev/null @@ -1,37 +0,0 @@ ---- - Makefile.am | 4 ++++ - rules/80-hotplug-cpu-mem.rules | 12 ++++++++++++ - 2 files changed, 16 insertions(+) - -Index: systemd-221/Makefile.am -=================================================================== ---- systemd-221.orig/Makefile.am -+++ systemd-221/Makefile.am -@@ -3841,6 +3841,10 @@ dist_udevrules_DATA += \ - rules/73-seat-numlock.rules - - # ------------------------------------------------------------------------------ -+dist_udevrules_DATA += \ -+ rules/80-hotplug-cpu-mem.rules -+ -+# ------------------------------------------------------------------------------ - mtd_probe_SOURCES = \ - src/udev/mtd_probe/mtd_probe.c \ - src/udev/mtd_probe/mtd_probe.h \ -Index: systemd-221/rules/80-hotplug-cpu-mem.rules -=================================================================== ---- /dev/null -+++ systemd-221/rules/80-hotplug-cpu-mem.rules -@@ -0,0 +1,12 @@ -+# do not edit this file, it will be overwritten on update -+ -+# Hotplug physical CPU -+SUBSYSTEM=="cpu", ACTION=="add", TEST=="online", ATTR{online}=="0", \ -+ ATTR{online}="1" -+ -+# Hotplug physical memory -+SUBSYSTEM=="memory", ACTION=="add", TEST=="state", ATTR{state}=="offline", \ -+ ATTR{state}="online", TAG+="tmpfs" -+ -+# -+TAG=="tmpfs", RUN+="/usr/lib/udev/remount-tmpfs" diff --git a/1011-64-btrfs.rules-skip-btrfs-check-if-devices-are-not-r.patch b/1011-64-btrfs.rules-skip-btrfs-check-if-devices-are-not-r.patch deleted file mode 100644 index 9d5a39f0..00000000 --- a/1011-64-btrfs.rules-skip-btrfs-check-if-devices-are-not-r.patch +++ /dev/null @@ -1,24 +0,0 @@ -From e26a5bb50b8aa741c5b2e57749d576c488e7ab32 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 10 Apr 2014 11:10:41 +0200 -Subject: [PATCH 1/2] 64-btrfs.rules: skip btrfs check if devices are not ready - -If any devices are marked with 'SYSTEMD_READY=0' then -we shouldn't run any btrfs check on them. - ---- - rules/64-btrfs.rules | 1 + - 1 file changed, 1 insertion(+) - -Index: systemd-221/rules/64-btrfs.rules -=================================================================== ---- systemd-221.orig/rules/64-btrfs.rules -+++ systemd-221/rules/64-btrfs.rules -@@ -3,6 +3,7 @@ - SUBSYSTEM!="block", GOTO="btrfs_end" - ACTION=="remove", GOTO="btrfs_end" - ENV{ID_FS_TYPE}!="btrfs", GOTO="btrfs_end" -+ENV{SYSTEMD_READY}=="0", GOTO="btrfs_end" - - # let the kernel know about this btrfs filesystem, and check if it is complete - IMPORT{builtin}="btrfs ready $devnode" diff --git a/1012-Skip-persistent-device-link-creation-on-multipath-de.patch b/1012-Skip-persistent-device-link-creation-on-multipath-de.patch deleted file mode 100644 index c5bd4a13..00000000 --- a/1012-Skip-persistent-device-link-creation-on-multipath-de.patch +++ /dev/null @@ -1,40 +0,0 @@ -From f9e1ee09fadbd4fb146d4f7bb45a6212773dff63 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 10 Apr 2014 11:14:20 +0200 -Subject: [PATCH 2/2] Skip persistent device link creation on multipath device - paths - -When a device is marked as a multipath device path by setting -DM_MULTIPATH_DEVICE_PATH="1" udev should not create any -persistent symlinks to that device. -Otherwise systemd will get confused about which device to use. - ---- - rules/60-persistent-storage.rules | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -Index: systemd-221/rules/60-persistent-storage.rules -=================================================================== ---- systemd-221.orig/rules/60-persistent-storage.rules -+++ systemd-221/rules/60-persistent-storage.rules -@@ -33,8 +33,8 @@ KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}! - # SCSI devices - KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $devnode", ENV{ID_BUS}="scsi" - KERNEL=="cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $devnode", ENV{ID_BUS}="cciss" --KERNEL=="sd*|sr*|cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" --KERNEL=="sd*|cciss*", ENV{DEVTYPE}=="partition", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" -+KERNEL=="sd*|sr*|cciss*", ENV{DEVTYPE}=="disk", ENV{DM_MULTIPATH_DEVICE_PATH}!="1", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" -+KERNEL=="sd*|cciss*", ENV{DEVTYPE}=="partition", ENV{DM_MULTIPATH_DEVICE_PATH}!="1", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" - - # scsi compat links for ATA devices - KERNEL=="sd*[!0-9]", ENV{ID_BUS}=="ata", PROGRAM="scsi_id --whitelisted --replace-whitespace -p0x80 -d $devnode", RESULT=="?*", ENV{ID_SCSI_COMPAT}="$result", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}" -@@ -66,6 +66,9 @@ KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!= - KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", \ - IMPORT{builtin}="blkid --noraid" - -+# Skip blkid on multipath device paths -+ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="persistent_storage_end" -+ - # probe filesystem metadata of disks - KERNEL!="sr*", IMPORT{builtin}="blkid" - diff --git a/1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch b/1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch deleted file mode 100644 index 400cd94d..00000000 --- a/1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch +++ /dev/null @@ -1,29 +0,0 @@ -From c9af1be90db5a29ac86605c67bc2bb4bc5780520 Mon Sep 17 00:00:00 2001 -From: Hannes Reinecke -Date: Thu, 12 Jun 2014 12:25:03 +0200 -Subject: [PATCH] 99-systemd.rules: Ignore devices with 'SYSTEMD_READY=0' - -Whenever a rule sets 'SYSTEMD_READY=0' it tries to indicate -that systemd should ignore this device. So we should not -set the 'systemd' tag in these cases; otherwise systemd -will pick up the device. - -References: bnc#881942 - -Signed-off-by: Hannes Reinecke ---- - rules/99-systemd.rules.in | 1 + - 1 file changed, 1 insertion(+) - -Index: systemd-221/rules/99-systemd.rules.in -=================================================================== ---- systemd-221.orig/rules/99-systemd.rules.in -+++ systemd-221/rules/99-systemd.rules.in -@@ -10,6 +10,7 @@ ACTION=="remove", GOTO="systemd_end" - SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270/tty*", TAG+="systemd" - KERNEL=="vport*", TAG+="systemd" - -+SUBSYSTEM=="block", ENV{SYSTEMD_READY}=="0", GOTO="systemd_end" - SUBSYSTEM=="block", TAG+="systemd" - SUBSYSTEM=="block", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0" - diff --git a/1037-udev-exclude-cd-dvd-from-block-device.patch b/1037-udev-exclude-cd-dvd-from-block-device.patch deleted file mode 100644 index 2b001518..00000000 --- a/1037-udev-exclude-cd-dvd-from-block-device.patch +++ /dev/null @@ -1,20 +0,0 @@ -Exclude cd/dvd as well (bnc#882714) - ---- - src/udev/udevd.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -Index: systemd-221/src/udev/udevd.c -=================================================================== ---- systemd-221.orig/src/udev/udevd.c -+++ systemd-221/src/udev/udevd.c -@@ -1022,7 +1022,8 @@ static int synthesize_change(struct udev - - if (streq_ptr("block", udev_device_get_subsystem(dev)) && - streq_ptr("disk", udev_device_get_devtype(dev)) && -- !startswith(udev_device_get_sysname(dev), "dm-")) { -+ !startswith(udev_device_get_sysname(dev), "dm-") && -+ !startswith(udev_device_get_sysname(dev), "sr")) { - bool part_table_read = false; - bool has_partitions = false; - int fd; diff --git a/1062-rules-set-default-permissions-for-GenWQE-devices.patch b/1062-rules-set-default-permissions-for-GenWQE-devices.patch deleted file mode 100644 index 80c434dc..00000000 --- a/1062-rules-set-default-permissions-for-GenWQE-devices.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- - rules/50-udev-default.rules | 2 ++ - 1 file changed, 2 insertions(+) - -Index: systemd-221/rules/50-udev-default.rules -=================================================================== ---- systemd-221.orig/rules/50-udev-default.rules -+++ systemd-221/rules/50-udev-default.rules -@@ -74,4 +74,6 @@ KERNEL=="tun", MODE="0666", OPTIONS+="st - - KERNEL=="fuse", MODE="0666", OPTIONS+="static_node=fuse" - -+KERNEL=="genwqe*", MODE="0666" -+ - LABEL="default_end" diff --git a/1066-udev-add-compatibility-links-for-truncated-by-id-links.patch b/1066-udev-add-compatibility-links-for-truncated-by-id-links.patch deleted file mode 100644 index 637c2be8..00000000 --- a/1066-udev-add-compatibility-links-for-truncated-by-id-links.patch +++ /dev/null @@ -1,175 +0,0 @@ -From: Jeff Mahoney -Subject: udev: add option to generate old 'buggy' serials -References: bnc#886852 - -Prior to udev 184, scsi_id would truncate the last character of the model -string when generating the ID_SERIAL value. If a system was installed -prior to that fix being available in udev, there may be configuration -information that refers to the truncated link. - -This patch adds a --truncated-serial option and a udev rule will created -the old truncated links. - -Signed-off-by: Jeff Mahoney ---- - rules/60-persistent-storage.rules | 4 ++++ - src/udev/scsi_id/scsi_id.c | 15 ++++++++++++++- - src/udev/scsi_id/scsi_id.h | 1 + - src/udev/scsi_id/scsi_serial.c | 19 +++++++++++++------ - 4 files changed, 32 insertions(+), 7 deletions(-) - -Index: systemd-221/rules/60-persistent-storage.rules -=================================================================== ---- systemd-221.orig/rules/60-persistent-storage.rules -+++ systemd-221/rules/60-persistent-storage.rules -@@ -40,6 +40,10 @@ KERNEL=="sd*|cciss*", ENV{DEVTYPE}=="par - KERNEL=="sd*[!0-9]", ENV{ID_BUS}=="ata", PROGRAM="scsi_id --whitelisted --replace-whitespace -p0x80 -d $devnode", RESULT=="?*", ENV{ID_SCSI_COMPAT}="$result", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}" - KERNEL=="sd*[0-9]", ENV{ID_SCSI_COMPAT}=="?*", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}-part%n" - -+# scsi compat links for ATA devices (for compatibility with udev < 184) -+KERNEL=="sd*[!0-9]", ENV{ID_BUS}=="ata", PROGRAM="scsi_id --truncated-serial --whitelisted --replace-whitespace -p0x80 -d$tempnode", RESULT=="?*", ENV{ID_SCSI_COMPAT_TRUNCATED}="$result", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT_TRUNCATED}" -+KERNEL=="sd*[0-9]", ENV{ID_SCSI_COMPAT_TRUNCATED}=="?*", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT_TRUNCATED}-part%n" -+ - # FireWire - KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}" - KERNEL=="sd*[0-9]", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}-part%n" -Index: systemd-221/src/udev/scsi_id/scsi_id.c -=================================================================== ---- systemd-221.orig/src/udev/scsi_id/scsi_id.c -+++ systemd-221/src/udev/scsi_id/scsi_id.c -@@ -43,6 +43,7 @@ static const struct option options[] = { - { "replace-whitespace", no_argument, NULL, 'u' }, - { "sg-version", required_argument, NULL, 's' }, - { "verbose", no_argument, NULL, 'v' }, -+ { "truncated-serial", no_argument, NULL, '9' }, - { "version", no_argument, NULL, 'V' }, /* don't advertise -V */ - { "export", no_argument, NULL, 'x' }, - { "help", no_argument, NULL, 'h' }, -@@ -54,6 +55,7 @@ static bool dev_specified = false; - static char config_file[MAX_PATH_LEN] = "/etc/scsi_id.config"; - static enum page_code default_page_code = PAGE_UNSPECIFIED; - static int sg_version = 4; -+static bool compat_truncated = false; - static bool reformat_serial = false; - static bool export = false; - static char vendor_str[64]; -@@ -316,6 +318,7 @@ static void help(void) { - " -g --whitelisted Treat device as whitelisted\n" - " -u --replace-whitespace Replace all whitespace by underscores\n" - " -v --verbose Verbose logging\n" -+ " --truncated-serial truncated serial for compatibility with systems configured with by-id links created by udev < 184\n" - " -x --export Print values as environment keys\n" - , program_invocation_short_name); - -@@ -387,6 +390,10 @@ static int set_options(struct udev *udev - log_open(); - break; - -+ case '9': -+ compat_truncated = true; -+ break; -+ - case 'V': - printf("%s\n", VERSION); - exit(0); -@@ -528,6 +535,9 @@ static int scsi_id(struct udev *udev, ch - util_replace_whitespace(dev_scsi.serial, serial_str, sizeof(serial_str)); - util_replace_chars(serial_str, NULL); - printf("ID_SERIAL=%s\n", serial_str); -+ util_replace_whitespace(dev_scsi.serial_compat, serial_str, sizeof(serial_str)); -+ util_replace_chars(serial_str, NULL); -+ printf("ID_SERIAL_COMPAT=%s\n", serial_str); - util_replace_whitespace(dev_scsi.serial_short, serial_str, sizeof(serial_str)); - util_replace_chars(serial_str, NULL); - printf("ID_SERIAL_SHORT=%s\n", serial_str); -@@ -558,7 +568,10 @@ static int scsi_id(struct udev *udev, ch - if (reformat_serial) { - char serial_str[MAX_SERIAL_LEN]; - -- util_replace_whitespace(dev_scsi.serial, serial_str, sizeof(serial_str)); -+ if (compat_truncated) -+ util_replace_whitespace(dev_scsi.serial_compat, serial_str, sizeof(serial_str)); -+ else -+ util_replace_whitespace(dev_scsi.serial, serial_str, sizeof(serial_str)); - util_replace_chars(serial_str, NULL); - printf("%s\n", serial_str); - goto out; -Index: systemd-221/src/udev/scsi_id/scsi_id.h -=================================================================== ---- systemd-221.orig/src/udev/scsi_id/scsi_id.h -+++ systemd-221/src/udev/scsi_id/scsi_id.h -@@ -45,6 +45,7 @@ struct scsi_id_device { - char kernel[64]; - char serial[MAX_SERIAL_LEN]; - char serial_short[MAX_SERIAL_LEN]; -+ char serial_compat[MAX_SERIAL_LEN]; - int use_sg; - - /* Always from page 0x80 e.g. 'B3G1P8500RWT' - may not be unique */ -Index: systemd-221/src/udev/scsi_id/scsi_serial.c -=================================================================== ---- systemd-221.orig/src/udev/scsi_id/scsi_serial.c -+++ systemd-221/src/udev/scsi_id/scsi_serial.c -@@ -97,7 +97,8 @@ static const char hex_str[]="0123456789a - - static int do_scsi_page80_inquiry(struct udev *udev, - struct scsi_id_device *dev_scsi, int fd, -- char *serial, char *serial_short, int max_len); -+ char *serial, char *serial_short, -+ char *serial_compat, int max_len); - - static int sg_err_category_new(struct udev *udev, - int scsi_status, int msg_status, int -@@ -620,7 +621,7 @@ static int do_scsi_page83_inquiry(struct - unsigned char page_83[SCSI_INQ_BUFF_LEN]; - - /* also pick up the page 80 serial number */ -- do_scsi_page80_inquiry(udev, dev_scsi, fd, NULL, unit_serial_number, MAX_SERIAL_LEN); -+ do_scsi_page80_inquiry(udev, dev_scsi, fd, NULL, unit_serial_number, NULL, MAX_SERIAL_LEN); - - memzero(page_83, SCSI_INQ_BUFF_LEN); - retval = scsi_inquiry(udev, dev_scsi, fd, 1, PAGE_83, page_83, -@@ -765,7 +766,8 @@ static int do_scsi_page83_prespc3_inquir - /* Get unit serial number VPD page */ - static int do_scsi_page80_inquiry(struct udev *udev, - struct scsi_id_device *dev_scsi, int fd, -- char *serial, char *serial_short, int max_len) -+ char *serial, char *serial_short, -+ char *serial_compat, int max_len) - { - int retval; - int ser_ind; -@@ -799,9 +801,14 @@ static int do_scsi_page80_inquiry(struct - ser_ind = prepend_vendor_model(udev, dev_scsi, &serial[1]); - if (ser_ind < 0) - return 1; -+ if (serial_compat) -+ strcpy(serial_compat, serial); - ser_ind++; /* for the leading 'S' */ -- for (i = 4; i < len + 4; i++, ser_ind++) -+ for (i = 4; i < len + 4; i++, ser_ind++) { - serial[ser_ind] = buf[i]; -+ if (serial_compat) -+ serial_compat[ser_ind - 1] = buf[i]; -+ } - } - if (serial_short != NULL) { - memcpy(serial_short, &buf[4], len); -@@ -877,7 +884,7 @@ int scsi_get_serial(struct udev *udev, - return 1; - - if (page_code == PAGE_80) { -- if (do_scsi_page80_inquiry(udev, dev_scsi, fd, dev_scsi->serial, dev_scsi->serial_short, len)) { -+ if (do_scsi_page80_inquiry(udev, dev_scsi, fd, dev_scsi->serial, dev_scsi->serial_short, dev_scsi->serial_compat, len)) { - retval = 1; - goto completed; - } else { -@@ -951,7 +958,7 @@ int scsi_get_serial(struct udev *udev, - for (ind = 4; ind <= page0[3] + 3; ind++) - if (page0[ind] == PAGE_80) - if (!do_scsi_page80_inquiry(udev, dev_scsi, fd, -- dev_scsi->serial, dev_scsi->serial_short, len)) { -+ dev_scsi->serial, dev_scsi->serial_short, dev_scsi->serial_compat, len)) { - /* - * Success - */ diff --git a/1095-set-ssd-disk-to-use-deadline-scheduler.patch b/1095-set-ssd-disk-to-use-deadline-scheduler.patch deleted file mode 100644 index 932ea747..00000000 --- a/1095-set-ssd-disk-to-use-deadline-scheduler.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- - Makefile.am | 1 + - rules/60-ssd-scheduler.rules | 11 +++++++++++ - 2 files changed, 12 insertions(+) - -Index: systemd-221/Makefile.am -=================================================================== ---- systemd-221.orig/Makefile.am -+++ systemd-221/Makefile.am -@@ -3501,6 +3501,7 @@ dist_udevrules_DATA += \ - rules/60-persistent-input.rules \ - rules/60-persistent-alsa.rules \ - rules/60-persistent-storage.rules \ -+ rules/60-ssd-scheduler.rules \ - rules/60-serial.rules \ - rules/64-btrfs.rules \ - rules/70-mouse.rules \ -Index: systemd-221/rules/60-ssd-scheduler.rules -=================================================================== ---- /dev/null -+++ systemd-221/rules/60-ssd-scheduler.rules -@@ -0,0 +1,11 @@ -+# do not edit this file, it will be overwritten on update -+ -+ACTION!="add", GOTO="ssd_scheduler_end" -+SUBSYSTEM!="block", GOTO="ssd_scheduler_end" -+ -+IMPORT{cmdline}="elevator" -+ENV{elevator}=="*?", GOTO="ssd_scheduler_end" -+ -+KERNEL=="sd*[!0-9]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="deadline" -+ -+LABEL="ssd_scheduler_end" diff --git a/1096-new-udev-root-symlink-generator.patch b/1096-new-udev-root-symlink-generator.patch deleted file mode 100644 index e6a0c0de..00000000 --- a/1096-new-udev-root-symlink-generator.patch +++ /dev/null @@ -1,108 +0,0 @@ ---- - Makefile.am | 19 +++++ - src/udev/rootsymlink_generator/rootsymlink_generator.c | 57 +++++++++++++++++ - units/systemd-udev-root-symlink.service | 10 ++ - units/systemd-udev-root-symlink.service.in | 10 ++ - 4 files changed, 96 insertions(+) - ---- systemd-222.orig/Makefile.am -+++ systemd-222/Makefile.am -@@ -3759,6 +3759,25 @@ EXTRA_DIST += \ - test/mocks/fsck - - # ------------------------------------------------------------------------------ -+rootsymlink_generator_SOURCES = \ -+ src/udev/rootsymlink_generator/rootsymlink_generator.c -+ -+rootsymlink_generator_CFLAGS = \ -+ $(AM_CFLAGS) -+ -+udevlibexec_PROGRAMS += \ -+ rootsymlink-generator -+ -+nodist_systemunit_DATA += \ -+ units/systemd-udev-root-symlink.service -+ -+SYSINIT_TARGET_WANTS += \ -+ systemd-udev-root-symlink.service -+ -+EXTRA_DIST += \ -+ units/systemd-udev-root-symlink.service.in -+ -+# ------------------------------------------------------------------------------ - ata_id_SOURCES = \ - src/udev/ata_id/ata_id.c - ---- /dev/null -+++ systemd-222/src/udev/rootsymlink_generator/rootsymlink_generator.c -@@ -0,0 +1,57 @@ -+/* -+ * Copyright (C) 2014-2015 Robert Milasan -+ * -+ * This program is free software: you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License as published by -+ * the Free Software Foundation, either version 2 of the License, or -+ * (at your option) any later version. -+ * -+ * This program is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * You should have received a copy of the GNU General Public License -+ * along with this program. If not, see . -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#define BUFFER_SIZE 128 -+ -+#define _ROOTDEV_ "/" -+#define _PATH_ "/run/udev/rules.d" -+#define _FILE_ "10-root-symlink.rules" -+ -+int main(void) -+{ -+ char filename[BUFFER_SIZE], buf[BUFFER_SIZE]; -+ struct stat statbuf; -+ int fd; -+ -+ if (stat(_ROOTDEV_, &statbuf) < 0) -+ return 1; -+ if (major(statbuf.st_dev) <= 0) -+ return 0; -+ if (mkdir(_PATH_, 0755) < 0 && errno != EEXIST) -+ return errno; -+ snprintf(filename, BUFFER_SIZE, "%s/%s", _PATH_, _FILE_); -+ fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0644); -+ if (fd < 0) -+ return errno; -+ snprintf(buf, BUFFER_SIZE, -+ "ACTION==\"add|change\", SUBSYSTEM==\"block\", " -+ "ENV{MAJOR}==\"%d\", ENV{MINOR}==\"%d\", SYMLINK+=\"root\"\n", -+ major(statbuf.st_dev), minor(statbuf.st_dev)); -+ if (write(fd, buf, strlen(buf)) < 0) -+ return errno; -+ if (close(fd) < 0) -+ return errno; -+ return 0; -+} ---- /dev/null -+++ systemd-222/units/systemd-udev-root-symlink.service.in -@@ -0,0 +1,10 @@ -+[Unit] -+Description=Rule generator for /dev/root symlink -+Before=systemd-udevd.service -+DefaultDependencies=no -+ConditionPathIsReadWrite=/run/udev -+ -+[Service] -+Type=oneshot -+RemainAfterExit=yes -+ExecStart=@udevlibexecdir@/rootsymlink-generator diff --git a/1097-udevd-increase-maximum-number-of-children.patch b/1097-udevd-increase-maximum-number-of-children.patch deleted file mode 100644 index f71c96a4..00000000 --- a/1097-udevd-increase-maximum-number-of-children.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- - src/udev/udevd.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: systemd-227/src/udev/udevd.c -=================================================================== ---- 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) -- log_debug("maximum number (%i) of children reached", hashmap_size(manager->workers)); -+ log_error("maximum number (%i) of children reached", hashmap_size(manager->workers)); - return; - } - -@@ -1672,7 +1672,7 @@ int main(int argc, char *argv[]) { - arg_children_max = 8; - - 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/1098-systemd-networkd-alias-network-service.patch b/1098-systemd-networkd-alias-network-service.patch deleted file mode 100644 index a3c666f4..00000000 --- a/1098-systemd-networkd-alias-network-service.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- - units/systemd-networkd.service.m4.in | 1 + - 1 file changed, 1 insertion(+) - -Index: systemd-221/units/systemd-networkd.service.m4.in -=================================================================== ---- systemd-221.orig/units/systemd-networkd.service.m4.in -+++ systemd-221/units/systemd-networkd.service.m4.in -@@ -34,4 +34,5 @@ WatchdogSec=1min - - [Install] - WantedBy=multi-user.target -+Alias=network.service - Also=systemd-networkd.socket diff --git a/1099-Add-default-rules-for-valve-steam-controller-to-work.patch b/1099-Add-default-rules-for-valve-steam-controller-to-work.patch deleted file mode 100644 index 20cf7a81..00000000 --- a/1099-Add-default-rules-for-valve-steam-controller-to-work.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/Makefile.am b/Makefile.am -index db206ae..803912c 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -3524,6 +3524,7 @@ dist_udevrules_DATA += \ - rules/60-serial.rules \ - rules/64-btrfs.rules \ - rules/70-mouse.rules \ -+ rules/72-valve-steam-controler.rules \ - rules/75-net-description.rules \ - rules/78-sound-card.rules \ - rules/80-net-setup-link.rules -diff --git a/rules/72-valve-steam-controler.rules b/rules/72-valve-steam-controler.rules -new file mode 100644 -index 0000000..f676972 ---- /dev/null -+++ b/rules/72-valve-steam-controler.rules -@@ -0,0 +1,3 @@ -+SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="1142", TAG+="uaccess" -+SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", ATTRS{idProduct}=="1102", TAG+="uaccess" -+KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess" --- -2.6.3 diff --git a/Correct_assert_on_unexpected_error_code.patch b/Correct_assert_on_unexpected_error_code.patch deleted file mode 100644 index 43e686ca..00000000 --- a/Correct_assert_on_unexpected_error_code.patch +++ /dev/null @@ -1,21 +0,0 @@ ---- - src/login/pam_systemd.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -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); -+ if (session_fd >= 0) { -+ PROTECT_ERRNO; -+ if (_unlikely_(!(close_nointr(session_fd) != -EBADF))) -+ pam_syslog(handle, LOG_ERR, "Unexpected error code on closing session fd: %m"); -+ } - return r; - } - } diff --git a/Fix-run-lock-directories-permissions-to-follow-openSUSE-po.patch b/Fix-run-lock-directories-permissions-to-follow-openSUSE-po.patch deleted file mode 100644 index d780d327..00000000 --- a/Fix-run-lock-directories-permissions-to-follow-openSUSE-po.patch +++ /dev/null @@ -1,40 +0,0 @@ -From: Frederic Crozat -Date: Wed, 7 Dec 2011 15:15:07 +0000 -Subject: Fix /run/lock directories permissions to follow openSUSE policy - -disable /var/lock/{subsys,lockdev} and change default permissions on -/var/lock (bnc#733523). ---- - tmpfiles.d/legacy.conf | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -Index: systemd-221/tmpfiles.d/legacy.conf -=================================================================== ---- systemd-221.orig/tmpfiles.d/legacy.conf -+++ systemd-221/tmpfiles.d/legacy.conf -@@ -10,13 +10,14 @@ - # These files are considered legacy and are unnecessary on legacy-free - # systems. - --d /run/lock 0755 root root - -+# changed for openSUSE: only /run/lock should be available. -+d /run/lock 0775 root lock - - L /var/lock - - - - ../run/lock - - # /run/lock/subsys is used for serializing SysV service execution, and - # hence without use on SysV-less systems. - --d /run/lock/subsys 0755 root root - -+#d /run/lock/subsys 0755 root root - - - # /run/lock/lockdev is used to serialize access to tty devices via - # LCK..xxx style lock files, For more information see: -@@ -24,7 +25,7 @@ d /run/lock/subsys 0755 root root - - # On modern systems a BSD file lock is a better choice if - # serialization is needed on those devices. - --d /run/lock/lockdev 0775 root lock - -+#d /run/lock/lockdev 0775 root lock - - - # /forcefsck, /fastboot and /forcequotacheck are deprecated in favor of the - # kernel command line options 'fsck.mode=force', 'fsck.mode=skip' and diff --git a/allow-multiple-sulogin-to-be-started.patch b/allow-multiple-sulogin-to-be-started.patch deleted file mode 100644 index 8bc6e24f..00000000 --- a/allow-multiple-sulogin-to-be-started.patch +++ /dev/null @@ -1,47 +0,0 @@ -From: Frederic Crozat -Date: Thu, 10 Jan 2013 15:43:25 +0000 -Subject: allow multiple sulogin to be started - -allows multiple sulogin instance (bnc#793182). ---- - units/getty@.service.m4 | 1 + - units/rescue.target | 1 + - units/serial-getty@.service.m4 | 1 + - 3 files changed, 3 insertions(+) - -Index: systemd-221/units/getty@.service.m4 -=================================================================== ---- systemd-221.orig/units/getty@.service.m4 -+++ systemd-221/units/getty@.service.m4 -@@ -9,6 +9,7 @@ - Description=Getty on %I - Documentation=man:agetty(8) man:systemd-getty-generator(8) - Documentation=http://0pointer.de/blog/projects/serial-console.html -+Conflicts=rescue.service - After=systemd-user-sessions.service plymouth-quit-wait.service - m4_ifdef(`HAVE_SYSV_COMPAT', - After=rc-local.service -Index: systemd-221/units/rescue.target -=================================================================== ---- systemd-221.orig/units/rescue.target -+++ systemd-221/units/rescue.target -@@ -10,6 +10,7 @@ Description=Rescue Mode - Documentation=man:systemd.special(7) - Requires=sysinit.target rescue.service - After=sysinit.target rescue.service -+Conflicts=getty.target - AllowIsolate=yes - - [Install] -Index: systemd-221/units/serial-getty@.service.m4 -=================================================================== ---- systemd-221.orig/units/serial-getty@.service.m4 -+++ systemd-221/units/serial-getty@.service.m4 -@@ -10,6 +10,7 @@ Description=Serial Getty on %I - Documentation=man:agetty(8) man:systemd-getty-generator(8) - Documentation=http://0pointer.de/blog/projects/serial-console.html - BindsTo=dev-%i.device -+Conflicts=rescue.service - After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service - m4_ifdef(`HAVE_SYSV_COMPAT', - After=rc-local.service diff --git a/apply-ACL-for-nvidia-device-nodes.patch b/apply-ACL-for-nvidia-device-nodes.patch deleted file mode 100644 index 257c329b..00000000 --- a/apply-ACL-for-nvidia-device-nodes.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Ludwig Nussel -Date: Mon, 8 Apr 2013 14:51:47 +0200 -Subject: apply ACL for nvidia device nodes - -set ACL on nvidia devices (bnc#808319). ---- - src/login/logind-acl.c | 12 ++++++++++++ - 1 file changed, 12 insertions(+) - -Index: systemd-221/src/login/logind-acl.c -=================================================================== ---- systemd-221.orig/src/login/logind-acl.c -+++ systemd-221/src/login/logind-acl.c -@@ -285,5 +285,17 @@ int devnode_acl_all(struct udev *udev, - r = k; - } - -+ /* only apply ACL on nvidia* if /dev/nvidiactl exists */ -+ if (devnode_acl("/dev/nvidiactl", flush, del, old_uid, add, new_uid) >= 0) { -+ int j; -+ for (j = 0; j <= 256 ; j++) { -+ _cleanup_free_ char *devname = NULL; -+ if (asprintf(&devname, "/dev/nvidia%d", j) < 0) -+ break; -+ if (devnode_acl(devname, flush, del, old_uid, add, new_uid) < 0) -+ break; -+ } -+ } -+ - return r; - } diff --git a/apply-ACL-for-nvidia-uvm-device-node.patch b/apply-ACL-for-nvidia-uvm-device-node.patch deleted file mode 100644 index 00a7c608..00000000 --- a/apply-ACL-for-nvidia-uvm-device-node.patch +++ /dev/null @@ -1,23 +0,0 @@ -From c79437b7967cf5a23faa881bc5da6b88b63a1ada Mon Sep 17 00:00:00 2001 -From: Stefan Dirsch -Date: Tue, 3 Jun 2014 15:05:55 +0200 -Subject: [PATCH] apply ACL for nvidia-uvm device node - -set ACL on nvidia-uvm device (bnc#879767). ---- - src/login/logind-acl.c | 2 ++ - 1 file changed, 2 insertions(+) - -Index: systemd-221/src/login/logind-acl.c -=================================================================== ---- systemd-221.orig/src/login/logind-acl.c -+++ systemd-221/src/login/logind-acl.c -@@ -295,6 +295,8 @@ int devnode_acl_all(struct udev *udev, - if (devnode_acl(devname, flush, del, old_uid, add, new_uid) < 0) - break; - } -+ /* required for additional CUDA support (nvidia-uvm module with appropriate device), bnc#879767 */ -+ devnode_acl("/dev/nvidia-uvm", flush, del, old_uid, add, new_uid); - } - - return r; diff --git a/avoid-divide-by-zero-sigtrap.patch b/avoid-divide-by-zero-sigtrap.patch deleted file mode 100644 index 60e42c9e..00000000 --- a/avoid-divide-by-zero-sigtrap.patch +++ /dev/null @@ -1,34 +0,0 @@ -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-228/src/basic/def.h -=================================================================== ---- systemd-228.orig/src/basic/def.h -+++ systemd-228/src/basic/def.h -@@ -40,7 +40,7 @@ - - #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 REBOOT_PARAM_FILE "/run/systemd/reboot-param" -Index: systemd-228/src/core/manager.c -=================================================================== ---- 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); - -- manager_print_jobs_in_progress(m); -+ if (m->n_running_jobs > 0) -+ manager_print_jobs_in_progress(m); - - next = now(CLOCK_MONOTONIC) + JOBS_IN_PROGRESS_PERIOD_USEC; - r = sd_event_source_set_time(source, next); diff --git a/avoid-random-hangs-on-timeouts-due-lost-cwd.patch b/avoid-random-hangs-on-timeouts-due-lost-cwd.patch deleted file mode 100644 index 45208124..00000000 --- a/avoid-random-hangs-on-timeouts-due-lost-cwd.patch +++ /dev/null @@ -1,29 +0,0 @@ -Found this during debugging an other problem. The issue was that -after ``sudo -i'' and a ``cd /usr/lib/systemd/system/'' followed -later by a shutdown may fail with (journalctl -b -1): - - systemd-exit.service: Failed at step CHDIR spawning: /usr/bin/kill - -which then caused the subsequent fault that umounting the users -home directories done by automount are busy. - ---- - units/user/systemd-exit.service.in | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -Index: systemd-221/units/user/systemd-exit.service.in -=================================================================== ---- systemd-221.orig/units/user/systemd-exit.service.in -+++ systemd-221/units/user/systemd-exit.service.in -@@ -10,8 +10,9 @@ Description=Exit the Session - Documentation=man:systemd.special(7) - DefaultDependencies=no - Requires=shutdown.target --After=shutdown.target -+After=shutdown.target multi-user.target - - [Service] - Type=oneshot --ExecStart=@KILL@ -s 58 $MANAGERPID -+WorkingDirectory=/ -+ExecStart=@KILL@ -s SIGRTMIN+24 $MANAGERPID diff --git a/boot-local-start.patch b/boot-local-start.patch deleted file mode 100644 index 67576b9f..00000000 --- a/boot-local-start.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- - units/rc-local.service.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: systemd-221/units/rc-local.service.in -=================================================================== ---- systemd-221.orig/units/rc-local.service.in -+++ systemd-221/units/rc-local.service.in -@@ -10,7 +10,7 @@ - [Unit] - Description=@RC_LOCAL_SCRIPT_PATH_START@ Compatibility - ConditionFileIsExecutable=@RC_LOCAL_SCRIPT_PATH_START@ --After=network.target -+After=basic.target - - [Service] - Type=forking diff --git a/ensure-ask-password-wall-starts-after-getty-tty1.patch b/ensure-ask-password-wall-starts-after-getty-tty1.patch deleted file mode 100644 index eb2fa9a4..00000000 --- a/ensure-ask-password-wall-starts-after-getty-tty1.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: Frederic Crozat -Cc: Werner Fink -Date: Wed, 24 Aug 2011 13:02:12 +0000 -Subject: ensure ask-password-wall starts after getty@tty1 - -ensure passphrase is handled before starting getty on tty1. - ---- - units/systemd-ask-password-wall.service.in | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -Index: systemd-221/units/systemd-ask-password-wall.service.in -=================================================================== ---- systemd-221.orig/units/systemd-ask-password-wall.service.in -+++ systemd-221/units/systemd-ask-password-wall.service.in -@@ -8,7 +8,8 @@ - [Unit] - Description=Forward Password Requests to Wall - Documentation=man:systemd-ask-password-console.service(8) --After=systemd-user-sessions.service -+Wants=getty.target -+After=systemd-user-sessions.service getty.target - - [Service] - ExecStartPre=-@SYSTEMCTL@ stop systemd-ask-password-console.path systemd-ask-password-console.service systemd-ask-password-plymouth.path systemd-ask-password-plymouth.service diff --git a/ensure-shortname-is-set-as-hostname-bnc-820213.patch b/ensure-shortname-is-set-as-hostname-bnc-820213.patch deleted file mode 100644 index 7771f1c9..00000000 --- a/ensure-shortname-is-set-as-hostname-bnc-820213.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Frederic Crozat -Date: Tue, 28 May 2013 15:17:35 +0200 -Subject: ensure shortname is set as hostname (bnc#820213) - -strip hostname so the domain part isn't set as part of the hostname ---- - src/core/hostname-setup.c | 4 ++++ - 1 file changed, 4 insertions(+) - -Index: systemd-221/src/core/hostname-setup.c -=================================================================== ---- systemd-221.orig/src/core/hostname-setup.c -+++ systemd-221/src/core/hostname-setup.c -@@ -34,6 +34,7 @@ int hostname_setup(void) { - int r; - _cleanup_free_ char *b = NULL; - const char *hn; -+ char *domain; - bool enoent = false; - - r = read_hostname_config("/etc/hostname", &b); -@@ -46,6 +47,9 @@ int hostname_setup(void) { - hn = NULL; - } else - hn = b; -+ /* strip any leftover of a domain name */ -+ if ((domain = strchr(hn, '.')) != NULL) -+ *domain = '\0'; - - if (isempty(hn)) { - /* Don't override the hostname if it is already set diff --git a/fix-support-for-boot-prefixed-initscript-bnc-746506.patch b/fix-support-for-boot-prefixed-initscript-bnc-746506.patch deleted file mode 100644 index ded80983..00000000 --- a/fix-support-for-boot-prefixed-initscript-bnc-746506.patch +++ /dev/null @@ -1,38 +0,0 @@ -From: Frederic Crozat -Date: Thu, 23 Aug 2012 11:08:25 +0200 -Subject: fix support for boot prefixed initscript (bnc#746506) - ---- - src/systemctl/systemctl.c | 18 +++++++++++++++++- - 1 file changed, 17 insertions(+), 1 deletion(-) - -Index: systemd-221/src/systemctl/systemctl.c -=================================================================== ---- systemd-221.orig/src/systemctl/systemctl.c -+++ systemd-221/src/systemctl/systemctl.c -@@ -5165,8 +5165,24 @@ static int enable_sysv_units(const char - - p[strlen(p) - strlen(".service")] = 0; - found_sysv = access(p, F_OK) >= 0; -- if (!found_sysv) -+ if (!found_sysv) { -+#ifdef HAVE_SYSV_COMPAT -+ free(p); -+ p = NULL; -+ if (!isempty(arg_root)) -+ asprintf(&p, "%s/" SYSTEM_SYSVINIT_PATH "/boot.%s", arg_root, name); -+ else -+ asprintf(&p, SYSTEM_SYSVINIT_PATH "/boot.%s", name); -+ if (!p) -+ return -ENOMEM; -+ p[strlen(p) - sizeof(".service") + 1] = 0; -+ found_sysv = access(p, F_OK) >= 0; -+ if (!found_sysv) -+ continue; -+#else - continue; -+#endif -+ } - - if (found_native) - log_info("Synchronizing state of %s with SysV init with %s...", name, argv[0]); diff --git a/handle-disable_caplock-and-compose_table-and-kbd_rate.patch b/handle-disable_caplock-and-compose_table-and-kbd_rate.patch deleted file mode 100644 index d7c4477f..00000000 --- a/handle-disable_caplock-and-compose_table-and-kbd_rate.patch +++ /dev/null @@ -1,216 +0,0 @@ -Original-From: Frederic Crozat -Original-Date: Fri, 19 Aug 2011 15:29:49 +0000 -Subject: handle disable_caplock and compose_table and kbd_rate -References: https://bugzilla.opensuse.org/746595 -Last-Editor: Jan Engelhardt -Date: Fri Jun 19 21:36:27 CEST 2015 - ---- - src/vconsole/vconsole-setup.c | 151 ++++++++++++++++++++++++++++++++++++++++-- - 1 file changed, 147 insertions(+), 4 deletions(-) - -Index: systemd-228/src/vconsole/vconsole-setup.c -=================================================================== ---- 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 "io-util.h" - #include "locale-util.h" - #include "log.h" -@@ -104,8 +106,10 @@ static int enable_utf8(int fd) { - return r; - } - --static int keyboard_load_and_wait(const char *vc, const char *map, const char *map_toggle, bool utf8) { -- const char *args[8]; -+static int keyboard_load_and_wait(const char *vc, const char *map, -+ const char *map_toggle, bool utf8, bool disable_capslock) -+{ -+ const char *args[9]; - int i = 0, r; - pid_t pid; - -@@ -122,6 +126,8 @@ static int keyboard_load_and_wait(const - args[i++] = map; - if (map_toggle) - args[i++] = map_toggle; -+ if (disable_capslock) -+ args[i++] = "disable.capslock"; - args[i++] = NULL; - - pid = fork(); -@@ -251,11 +257,117 @@ static void font_copy_to_all_vcs(int fd) - } - } - -+#ifdef HAVE_SYSV_COMPAT -+static int compose_load_and_wait(const char *vc, const char *compose_table) -+{ -+ const char *args[1024]; -+ unsigned int i = 0, j = 0; -+ int ret; -+ pid_t pid; -+ char **strv_compose_table = NULL; -+ char *to_free[1024]; -+ -+ if (isempty(compose_table)) -+ /* An empty map means no compose table */ -+ return 1; -+ -+ args[i++] = KBD_LOADKEYS; -+ args[i++] = "-q"; -+ args[i++] = "-C"; -+ args[i++] = vc; -+ -+ strv_compose_table = strv_split(compose_table, WHITESPACE); -+ if (strv_compose_table) { -+ bool compose_loaded = false; -+ bool compose_clear = false; -+ char **name; -+ char *arg; -+ -+ STRV_FOREACH(name, strv_compose_table) { -+ if (streq(*name, "-c") || streq(*name, "clear")) { -+ compose_clear = true; -+ continue; -+ } -+ if (!compose_loaded && compose_clear) -+ args[i++] = "-c"; -+ asprintf(&arg, "compose.%s", *name); -+ compose_loaded = true; -+ args[i++] = to_free[j++] = arg; -+ if (i >= ELEMENTSOF(args) - 1) -+ break; -+ } -+ strv_free(strv_compose_table); -+ } -+ args[i++] = NULL; -+ -+ pid = fork(); -+ if (pid < 0) -+ return log_error_errno(errno, "Failed to fork: %m"); -+ if (pid == 0) { -+ reset_all_signal_handlers(); -+ reset_signal_mask(); -+ execv(args[0], (char **) args); -+ _exit(EXIT_FAILURE); -+ } -+ -+ ret = wait_for_terminate_and_warn(args[0], pid, true); -+ for (i = 0; i < j; ++i) -+ free(to_free[i]); -+ if (ret < 0) -+ return ret; -+ return ret == 0; -+} -+#endif -+ -+static int kbdrate_set_and_wait(const char *vc, const char *kbd_rate, -+ const char *kbd_delay) -+{ -+ const char *args[7]; -+ int i = 0, ret; -+ pid_t pid; -+ -+ if (isempty(kbd_rate) && isempty(kbd_delay)) -+ return 1; -+ -+ args[i++] = "/bin/kbdrate"; -+ if (!isempty(kbd_rate)) { -+ args[i++] = "-r"; -+ args[i++] = kbd_rate; -+ } -+ if (!isempty(kbd_delay)) { -+ args[i++] = "-d"; -+ args[i++] = kbd_delay; -+ } -+ args[i++] = "-s"; -+ args[i++] = NULL; -+ -+ pid = fork(); -+ if (pid < 0) -+ return log_error_errno(errno, "Failed to fork: %m"); -+ if (pid == 0) { -+ reset_all_signal_handlers(); -+ reset_signal_mask(); -+ execv(args[0], (char **) args); -+ _exit(EXIT_FAILURE); -+ } -+ ret = wait_for_terminate_and_warn(args[0], pid, true); -+ if (ret < 0) -+ return ret; -+ return ret == 0; -+} -+ - int main(int argc, char **argv) { - const char *vc; - _cleanup_free_ char - *vc_keymap = NULL, *vc_keymap_toggle = NULL, - *vc_font = NULL, *vc_font_map = NULL, *vc_font_unimap = NULL; -+#ifdef HAVE_SYSV_COMPAT -+ _cleanup_free_ char -+ *vc_kbd_delay = NULL, *vc_kbd_rate = NULL, -+ *vc_kbd_disable_caps_lock = NULL, *vc_compose_table = NULL; -+#endif -+ bool disable_capslock = false; -+ bool comp_ok, rate_ok; - _cleanup_close_ int fd = -1; - bool utf8, font_copy = false, font_ok, keyboard_ok; - int r = EXIT_FAILURE; -@@ -286,6 +398,31 @@ int main(int argc, char **argv) { - - utf8 = is_locale_utf8(); - -+#ifdef HAVE_SYSV_COMPAT -+ r = parse_env_file("/etc/sysconfig/keyboard", NEWLINE, -+ "KEYTABLE", &vc_keymap, -+ "KBD_DELAY", &vc_kbd_delay, -+ "KBD_RATE", &vc_kbd_rate, -+ "KBD_DISABLE_CAPS_LOCK", &vc_kbd_disable_caps_lock, -+ "COMPOSETABLE", &vc_compose_table, -+ NULL); -+ if (r < 0 && r != -ENOENT) -+ log_warning("Failed to read /etc/sysconfig/keyboard: %s", -+ strerror(-r)); -+ -+ r = parse_env_file("/etc/sysconfig/console", NEWLINE, -+ "CONSOLE_FONT", &vc_font, -+ "CONSOLE_SCREENMAP", &vc_font_map, -+ "CONSOLE_UNICODEMAP", &vc_font_unimap, -+ NULL); -+ if (r < 0 && r != -ENOENT) -+ log_warning("Failed to read /etc/sysconfig/console: %s", -+ strerror(-r)); -+ -+ disable_capslock = vc_kbd_disable_caps_lock && -+ strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0; -+#endif /* HAVE_SYSV_COMPAT */ -+ - r = parse_env_file("/etc/vconsole.conf", NEWLINE, - "KEYMAP", &vc_keymap, - "KEYMAP_TOGGLE", &vc_keymap_toggle, -@@ -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; -- keyboard_ok = keyboard_load_and_wait(vc, vc_keymap, vc_keymap_toggle, utf8) > 0; -+ keyboard_ok = keyboard_load_and_wait(vc, vc_keymap, vc_keymap_toggle, -+ utf8, disable_capslock) > 0; -+#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); -+#endif - - /* Only copy the font when we executed setfont successfully */ - if (font_copy && font_ok) - (void) font_copy_to_all_vcs(fd); - -- return font_ok && keyboard_ok ? EXIT_SUCCESS : EXIT_FAILURE; -+ return font_ok && keyboard_ok && comp_ok && rate_ok ? -+ EXIT_SUCCESS : EXIT_FAILURE; - } diff --git a/handle-numlock-value-in-etc-sysconfig-keyboard.patch b/handle-numlock-value-in-etc-sysconfig-keyboard.patch deleted file mode 100644 index 54b0c303..00000000 --- a/handle-numlock-value-in-etc-sysconfig-keyboard.patch +++ /dev/null @@ -1,191 +0,0 @@ -Set NumLock according to /etc/sysconfig/keyboard. - -https://bugzilla.novell.com/show_bug.cgi?id=746595 - -Authors: -Stanislav Brabec -Cristian Rodríguez - ---- - Makefile.am | 13 ++++++++++ - rules/73-seat-numlock.rules | 8 ++++++ - src/login/numlock-on.c | 34 ++++++++++++++++++++++++++ - src/vconsole/vconsole-setup.c | 41 ++++++++++++++++++++++++++++++-- - units/systemd-vconsole-setup.service.in | 2 - - 5 files changed, 95 insertions(+), 3 deletions(-) - -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 - - # ------------------------------------------------------------------------------ -+numlock_on_SOURCES = \ -+ src/login/numlock-on.c -+ -+numlock_on_CFLAGS = \ -+ $(AM_CFLAGS) -+ -+udevlibexec_PROGRAMS += \ -+ numlock-on -+ -+dist_udevrules_DATA += \ -+ rules/73-seat-numlock.rules -+ -+# ------------------------------------------------------------------------------ - 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-228/rules/73-seat-numlock.rules -@@ -0,0 +1,8 @@ -+# This file is part of SUSE customization of systemd. -+# -+# systemd is free software; you can redistribute it and/or modify it -+# under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (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-228/src/login/numlock-on.c -@@ -0,0 +1,34 @@ -+/* -+ * numlock-on.c: Turn numlock-on -+ * -+ * This file may be freely copied under the terms of the GNU General -+ * Public License (GPL), version 2, or at your option any later -+ * version. -+ -+ * Copyright (C) 2013 Stanislav Brabec, SUSE -+ * -+ * based on setleds.c, which is -+ * Copyright (C) 1994-1999 Andries E. Brouwer -+ */ -+ -+#include -+#include -+#include -+#include -+ -+int -+main(int argc, char **argv) { -+ char flags; -+ -+ if (ioctl(0, KDGKBLED, &flags)) { -+ perror("KDGKBLED"); -+ exit(1); -+ } -+ -+ if (ioctl(0, KDSKBLED, flags | LED_NUM | (LED_NUM << 4))) { -+ perror("KDSKBLED"); -+ exit(1); -+ } -+ -+ exit(0); -+} -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 -+#define BDA_KSF4_NUMLOCK_MASK 0x02 -+ - static bool is_vconsole(int fd) { - unsigned char data[1]; - -@@ -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, -- *vc_kbd_disable_caps_lock = NULL, *vc_compose_table = NULL; -+ *vc_kbd_disable_caps_lock = NULL, *vc_compose_table = NULL, -+ *vc_kbd_numlock = NULL; - #endif -- bool disable_capslock = false; -+ bool disable_capslock = false, numlock = false; - bool comp_ok, rate_ok; - _cleanup_close_ int fd = -1; - bool utf8, font_copy = false, font_ok, keyboard_ok; -@@ -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, -+ "KBD_NUMLOCK", &vc_kbd_numlock, - "COMPOSETABLE", &vc_compose_table, - NULL); - if (r < 0 && r != -ENOENT) -@@ -421,6 +428,30 @@ int main(int argc, char **argv) { - - disable_capslock = vc_kbd_disable_caps_lock && - strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0; -+ numlock = vc_kbd_numlock && strcaseeq(vc_kbd_numlock, "yes"); -+#if defined(__i386__) || defined(__x86_64__) -+ if (vc_kbd_numlock && strcaseeq(vc_kbd_numlock, "bios")) { -+ int _cleanup_close_ fdmem; -+ char c; -+ -+ errno = 0; -+ fdmem = open ("/dev/mem", O_RDONLY); -+ if (fdmem < 0) -+ goto finish; -+ -+ if (lseek(fdmem, BIOS_DATA_AREA + BDA_KEYBOARD_STATUS_FLAGS_4, SEEK_SET) == (off_t) -1) -+ goto finish; -+ -+ if (read(fdmem, &c, sizeof(char)) == -1) -+ goto finish; -+ -+ if (c & BDA_KSF4_NUMLOCK_MASK) -+ numlock = true; -+ finish: -+ if (errno) -+ log_warning_errno(errno, "Failed to read /dev/mem: %m"); -+ } -+#endif /* x86 */ - #endif /* HAVE_SYSV_COMPAT */ - - r = parse_env_file("/etc/vconsole.conf", NEWLINE, -@@ -456,6 +487,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; -+ if (numlock) -+ touch("/run/numlock-on"); -+ else -+ unlink("/run/numlock-on"); - #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); -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 - Conflicts=shutdown.target --Before=sysinit.target shutdown.target -+Before=sysinit.target shutdown.target systemd-udev-trigger.service - ConditionPathExists=/dev/tty0 - - [Service] diff --git a/handle-root_uses_lang-value-in-etc-sysconfig-language.patch b/handle-root_uses_lang-value-in-etc-sysconfig-language.patch deleted file mode 100644 index 118f333d..00000000 --- a/handle-root_uses_lang-value-in-etc-sysconfig-language.patch +++ /dev/null @@ -1,72 +0,0 @@ -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 (boo#792182). ---- - src/core/locale-setup.c | 40 ++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 40 insertions(+) - -Index: systemd-228/src/core/locale-setup.c -=================================================================== ---- 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; -+#ifdef HAVE_SYSV_COMPAT -+ char _cleanup_free_ *rc_lang = NULL, *rc_lc_ctype = NULL; -+ char _cleanup_free_ *root_uses_lang = NULL; -+#endif - - if (detect_container() <= 0) { - r = parse_env_file("/proc/cmdline", WHITESPACE, -@@ -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"); - } -+#ifdef HAVE_SYSV_COMPAT -+ r = parse_env_file("/etc/sysconfig/language", NEWLINE, -+ "RC_LANG", &rc_lang, -+ "RC_LC_CTYPE", &rc_lc_ctype, -+ "ROOT_USES_LANG", &root_uses_lang, -+ NULL); -+ -+ if (r < 0 && r != -ENOENT) -+ log_warning("Failed to read /etc/sysconfig/language: %s", strerror(-r)); -+ -+ /* -+ * Use the values of the interactive locale configuration in /etc/sysconfig/language -+ * as fallback if /etc/locale.conf does not exist and no locale was specified on the -+ * kernel's command line. The special case ROOT_USES_LANG=ctype allows to set LC_CTYPE -+ * even if LANG for root is set to e.g. POSIX. But do this only if no LC_CTYPE has been -+ * set in /etc/locale.conf and on the kernel's command line. -+ */ -+ if (root_uses_lang) { -+ if (strcaseeq(root_uses_lang, "yes") && !variables[VARIABLE_LANG]) { -+ variables[VARIABLE_LANG] = rc_lang; -+ rc_lang = NULL; -+ } -+ if (strcaseeq(root_uses_lang, "ctype") && !variables[VARIABLE_LC_CTYPE]) { -+ if (variables[VARIABLE_LANG]) -+ variables[VARIABLE_LC_CTYPE] = strdup(variables[VARIABLE_LANG]); -+ else if (rc_lc_ctype && *rc_lc_ctype) { -+ variables[VARIABLE_LC_CTYPE] = rc_lc_ctype; -+ rc_lc_ctype = NULL; -+ } else if (rc_lang && *rc_lang) { -+ variables[VARIABLE_LC_CTYPE] = rc_lang; -+ rc_lang = NULL; -+ } -+ } -+ } -+#endif - - add = NULL; - for (i = 0; i < _VARIABLE_LC_MAX; i++) { diff --git a/hostname-NULL.patch b/hostname-NULL.patch deleted file mode 100644 index ccd9133c..00000000 --- a/hostname-NULL.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: systemd-222/src/core/hostname-setup.c -=================================================================== ---- systemd-222.orig/src/core/hostname-setup.c -+++ systemd-222/src/core/hostname-setup.c -@@ -44,7 +44,7 @@ int hostname_setup(void) { - else - log_warning_errno(r, "Failed to read configured hostname: %m"); - -- hn = NULL; -+ hn = strdup("nohostname.set.site"); - } else - hn = b; - /* strip any leftover of a domain name */ diff --git a/insserv-generator.patch b/insserv-generator.patch deleted file mode 100644 index 833d0d66..00000000 --- a/insserv-generator.patch +++ /dev/null @@ -1,399 +0,0 @@ -From a8cbe79c77836cc2466e3534157864abc98ef3ef Mon Sep 17 00:00:00 2001 -From: Frederic Crozat -Date: Fri, 28 Jun 2013 17:54:41 +0200 -Subject: [PATCH] insserv.conf generator - -parse /etc/insserv.conf.dd content and /etc/insserv.conf and generate -systemd unit drop-in files to add dependencies ---- - Makefile.am | 9 - src/insserv-generator/Makefile | 28 ++ - 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-228/Makefile.am -=================================================================== ---- systemd-228.orig/Makefile.am -+++ systemd-228/Makefile.am -@@ -626,7 +626,8 @@ nodist_systemunit_DATA += \ - - systemgenerator_PROGRAMS += \ - systemd-sysv-generator \ -- systemd-rc-local-generator -+ systemd-rc-local-generator \ -+ systemd-insserv-generator - endif - - EXTRA_DIST += \ -@@ -2682,6 +2683,12 @@ $(systemd_boot): $(systemd_boot_solib) - endif - endif - -+#------------------------------------------------------------------------------- -+systemd_insserv_generator_SOURCES = \ -+ src/insserv-generator/insserv-generator.c -+ -+systemd_insserv_generator_LDADD = libbasic.la -+ - # ------------------------------------------------------------------------------ - stub_headers = \ - src/boot/efi/util.h \ -Index: systemd-228/src/insserv-generator/Makefile -=================================================================== ---- /dev/null -+++ systemd-228/src/insserv-generator/Makefile -@@ -0,0 +1,28 @@ -+# This file is part of systemd. -+# -+# Copyright 2010 Lennart Poettering -+# -+# 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 -+# the Free Software Foundation; either version 2.1 of the License, or -+# (at your option) any later version. -+# -+# systemd is distributed in the hope that it will be useful, but -+# WITHOUT ANY WARRANTY; without even the implied warranty of -+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+# Lesser General Public License for more details. -+# -+# You should have received a copy of the GNU Lesser General Public License -+# along with systemd; If not, see . -+ -+# This file is a dirty trick to simplify compilation from within -+# emacs. This file is not intended to be distributed. So, don't touch -+# it, even better ignore it! -+ -+all: -+ $(MAKE) -C .. -+ -+clean: -+ $(MAKE) -C .. clean -+ -+.PHONY: all clean -Index: systemd-228/src/insserv-generator/insserv-generator.c -=================================================================== ---- /dev/null -+++ systemd-228/src/insserv-generator/insserv-generator.c -@@ -0,0 +1,319 @@ -+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ -+ -+/*** -+ This file is part of systemd. -+ -+ Copyright 2012 Lennart Poettering -+ -+ 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 -+ the Free Software Foundation; either version 2.1 of the License, or -+ (at your option) any later version. -+ -+ systemd is distributed in the hope that it will be useful, but -+ WITHOUT ANY WARRANTY; without even the implied warranty of -+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -+ Lesser General Public License for more details. -+ -+ You should have received a copy of the GNU Lesser General Public License -+ along with systemd; If not, see . -+ ***/ -+ -+#include -+#include -+#include -+#include -+ -+#include "mkdir.h" -+#include "log.h" -+#include "fileio.h" -+#include "unit-name.h" -+#include "special.h" -+#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"; -+ -+static char *sysv_translate_name(const char *name) { -+ char *r; -+ -+ r = new(char, strlen(name) + sizeof(".service")); -+ if (!r) -+ return NULL; -+ -+ if (endswith(name, ".sh")) -+ /* Drop .sh suffix */ -+ strcpy(stpcpy(r, name) - 3, ".service"); -+ if (startswith(name, "boot.")) -+ /* Drop SuSE-style boot. prefix */ -+ strcpy(stpcpy(r, name + 5), ".service"); -+ else -+ /* Normal init script name */ -+ strcpy(stpcpy(r, name), ".service"); -+ -+ return r; -+} -+ -+static int sysv_translate_facility(const char *name, const char *filename, char **_r) { -+ -+ /* We silently ignore the $ prefix here. According to the LSB -+ * spec it simply indicates whether something is a -+ * standardized name or a distribution-specific one. Since we -+ * just follow what already exists and do not introduce new -+ * uses or names we don't care who introduced a new name. */ -+ -+ static const char * const table[] = { -+ /* LSB defined facilities */ -+ "local_fs", NULL, -+ "network", SPECIAL_NETWORK_ONLINE_TARGET, -+ "named", SPECIAL_NSS_LOOKUP_TARGET, -+ "portmap", SPECIAL_RPCBIND_TARGET, -+ "remote_fs", SPECIAL_REMOTE_FS_TARGET, -+ "syslog", NULL, -+ "time", SPECIAL_TIME_SYNC_TARGET, -+ }; -+ -+ unsigned i; -+ char *r; -+ const char *n; -+ int ret; -+ -+ assert(name); -+ assert(_r); -+ -+ n = *name == '$' ? name + 1 : name; -+ -+ for (i = 0; i < ELEMENTSOF(table); i += 2) { -+ -+ if (!streq(table[i], n)) -+ continue; -+ -+ if (!table[i+1]) -+ return 0; -+ -+ r = strdup(table[i+1]); -+ if (!r) -+ return log_oom(); -+ -+ goto finish; -+ } -+ -+ /* If we don't know this name, fallback heuristics to figure -+ * out whether something is a target or a service alias. */ -+ -+ if (*name == '$') { -+ if (!unit_prefix_is_valid(n)) -+ return -EINVAL; -+ -+ /* Facilities starting with $ are most likely targets */ -+ ret = unit_name_build(n, NULL, ".target", &r); -+ if (ret < 0) -+ return ret; -+ } else if (filename && streq(name, filename)) -+ /* Names equaling the file name of the services are redundant */ -+ return 0; -+ else -+ /* Everything else we assume to be normal service names */ -+ r = sysv_translate_name(n); -+ -+ if (!r) -+ return -ENOMEM; -+ -+finish: -+ *_r = r; -+ -+ return 1; -+} -+ -+ -+ -+static int parse_insserv_conf(const char* filename) { -+ _cleanup_fclose_ FILE *f = NULL; -+ int r; -+ -+ if (!(f = fopen(filename, "re"))) { -+ log_debug("Failed to open file %s", filename); -+ r = errno == ENOENT ? 0 : -errno; -+ return r; -+ } -+ -+ while (!feof(f)) { -+ char l[LINE_MAX], *t; -+ _cleanup_strv_free_ char **parsed = NULL; -+ -+ if (!fgets(l, sizeof(l), f)) { -+ if (feof(f)) -+ break; -+ -+ r = -errno; -+ log_error("Failed to read configuration file '%s': %s", filename, strerror(-r)); -+ return -r; -+ } -+ -+ t = strstrip(l); -+ if (*t != '$' && *t != '<') -+ continue; -+ -+ parsed = strv_split(t,WHITESPACE); -+ /* we ignore , not used, equivalent to X-Interactive */ -+ if (parsed && !startswith_no_case (parsed[0], "")) { -+ _cleanup_free_ char *facility = NULL; -+ if (sysv_translate_facility(parsed[0], NULL, &facility) < 0 || !facility) -+ continue; -+ if (streq(facility, SPECIAL_REMOTE_FS_TARGET)) { -+ _cleanup_free_ char *unit = NULL; -+ /* insert also a Wants dependency from remote-fs-pre on remote-fs */ -+ unit = strjoin(arg_dest, "/remote-fs.target.d/50-",basename(filename),".conf", NULL); -+ if (!unit) -+ return log_oom(); -+ -+ mkdir_parents_label(unit, 0755); -+ -+ r = write_string_file(unit, -+ "# Automatically generated by systemd-insserv-generator\n\n" -+ "[Unit]\n" -+ "Wants=remote-fs-pre.target\n", -+ WRITE_STRING_FILE_CREATE); -+ if (r) -+ return r; -+ free (facility); -+ facility=strdup(SPECIAL_REMOTE_FS_PRE_TARGET); -+ } -+ if (facility && endswith(facility, ".target")) { -+ char *name, **j; -+ FILE *file = NULL; -+ -+ STRV_FOREACH (j, parsed+1) { -+ _cleanup_free_ char *unit = NULL; -+ _cleanup_free_ char *dep = NULL; -+ -+ if (*j[0] == '+') -+ name = *j+1; -+ else -+ name = *j; -+ if (streq(name, "boot.localfs") || -+ streq(name, "boot.crypto")) -+ continue; -+ if ((sysv_translate_facility(name, NULL, &dep) < 0) || !dep) -+ continue; -+ -+ unit = strjoin(arg_dest, "/", dep, ".d/50-",basename(filename),"-",parsed[0],".conf", NULL); -+ if (!unit) -+ return log_oom(); -+ -+ mkdir_parents_label(unit, 0755); -+ -+ file = fopen(unit, "wxe"); -+ if (!file) { -+ if (errno == EEXIST) -+ log_error("Failed to create drop-in file %s", unit); -+ else -+ log_error("Failed to create drop-in file %s: %m", unit); -+ return -errno; -+ } -+ -+ fprintf(file, -+ "# Automatically generated by systemd-insserv-generator\n\n" -+ "[Unit]\n" -+ "Wants=%s\n" -+ "Before=%s\n", -+ facility, facility); -+ -+ fflush(file); -+ if (ferror(file)) { -+ log_error("Failed to write unit file %s: %m", unit); -+ return -errno; -+ } -+ fclose(file); -+ -+ if (*j[0] != '+') { -+ free (unit); -+ unit = strjoin(arg_dest, "/", facility, ".d/50-hard-dependency-",basename(filename),"-",parsed[0],".conf", NULL); -+ if (!unit) -+ return log_oom(); -+ -+ mkdir_parents_label(unit, 0755); -+ -+ file = fopen(unit, "wxe"); -+ if (!file) { -+ if (errno == EEXIST) -+ log_error("Failed to create drop-in file %s, as it already exists", unit); -+ else -+ log_error("Failed to create drop-in file %s: %m", unit); -+ return -errno; -+ } -+ -+ -+ fprintf(file, -+ "# Automatically generated by systemd-insserv-generator\n\n" -+ "[Unit]\n" -+ "SourcePath=%s\n" -+ "Requires=%s\n", -+ filename, dep); -+ fflush(file); -+ if (ferror(file)) { -+ log_error("Failed to write unit file %s: %m", unit); -+ return -errno; -+ } -+ fclose(file); -+ } -+ } -+ } -+ } -+ } -+ return r; -+} -+ -+static int parse_insserv(void) { -+ DIR *d = NULL; -+ struct dirent *de; -+ int r = 0; -+ -+ if (!(d = opendir("/etc/insserv.conf.d/"))) { -+ if (errno != ENOENT) { -+ log_debug("opendir() failed on /etc/insserv.conf.d/ %s", strerror(errno)); -+ } -+ } else { -+ -+ while ((de = readdir(d))) { -+ char *path = NULL; -+ if (hidden_file(de->d_name)) -+ continue; -+ -+ path = strjoin("/etc/insserv.conf.d/", de->d_name, NULL); -+ parse_insserv_conf(path); -+ free(path); -+ } -+ closedir (d); -+ } -+ -+ r = parse_insserv_conf("/etc/insserv.conf"); -+ -+ return r; -+} -+ -+int main(int argc, char *argv[]) { -+ int r = 0; -+ -+ if (argc > 1 && argc != 4) { -+ log_error("This program takes three or no arguments."); -+ return EXIT_FAILURE; -+ } -+ -+ if (argc > 1) -+ arg_dest = argv[1]; -+ -+ log_set_target(LOG_TARGET_SAFE); -+ log_parse_environment(); -+ log_open(); -+ -+ umask(0022); -+ -+ r = parse_insserv(); -+ -+ return (r < 0) ? EXIT_FAILURE : EXIT_SUCCESS; -+} diff --git a/journald-advice-about-use-of-memory.patch b/journald-advice-about-use-of-memory.patch deleted file mode 100644 index 46a3e446..00000000 --- a/journald-advice-about-use-of-memory.patch +++ /dev/null @@ -1,138 +0,0 @@ -From: werner@suse.de -Upstream: marked as openSUSE-specific fix originally, but may well - worth be to be sent upstream. - -Original description: - (none) - -Notes [jengelh@inai.de]: -MAP_NONBLOCK is documented (mmap(2) in man-pages-3.69+) to render -MAP_POPULATE ineffective. Why do we have it? -What is the rationale for MAP_STACK? ---- - src/journal/catalog.c | 12 +++++++++++- - src/journal/journal-authenticate.c | 7 +++++-- - src/journal/journald-kmsg.c | 3 ++- - src/journal/mmap-cache.c | 16 +++++++++++++++- - 4 files changed, 33 insertions(+), 5 deletions(-) - -Index: systemd-221/src/journal/catalog.c -=================================================================== ---- systemd-221.orig/src/journal/catalog.c -+++ systemd-221/src/journal/catalog.c -@@ -469,6 +469,10 @@ finish: - - static int open_mmap(const char *database, int *_fd, struct stat *_st, void **_p) { - const CatalogHeader *h; -+ static const unsigned int advice[] = -+ {MADV_WILLNEED, MADV_SEQUENTIAL, MADV_DONTDUMP, MADV_DONTFORK}; -+ unsigned int n; -+ size_t psize; - int fd; - void *p; - struct stat st; -@@ -491,12 +495,18 @@ static int open_mmap(const char *databas - return -EINVAL; - } - -- p = mmap(NULL, PAGE_ALIGN(st.st_size), PROT_READ, MAP_SHARED, fd, 0); -+ psize = PAGE_ALIGN(st.st_size); -+ p = mmap(NULL, psize, PROT_READ, MAP_SHARED | MAP_POPULATE | -+ MAP_NONBLOCK, fd, 0); - if (p == MAP_FAILED) { - safe_close(fd); - return -errno; - } - -+ for (n = 0; n < sizeof(advice) / sizeof(*advice); ++n) -+ if (madvise(p, psize, advice[n]) < 0) -+ log_warning("Failed to give advice about use of memory: %m"); -+ - h = p; - if (memcmp(h->signature, CATALOG_SIGNATURE, sizeof(h->signature)) != 0 || - le64toh(h->header_size) < sizeof(CatalogHeader) || -Index: systemd-221/src/journal/journal-authenticate.c -=================================================================== ---- systemd-221.orig/src/journal/journal-authenticate.c -+++ systemd-221/src/journal/journal-authenticate.c -@@ -355,7 +355,8 @@ int journal_file_fss_load(JournalFile *f - goto finish; - } - -- m = mmap(NULL, PAGE_ALIGN(sizeof(FSSHeader)), PROT_READ, MAP_SHARED, fd, 0); -+ m = mmap(NULL, PAGE_ALIGN(sizeof(FSSHeader)), PROT_READ, -+ MAP_SHARED | MAP_STACK, fd, 0); - if (m == MAP_FAILED) { - m = NULL; - r = -errno; -@@ -399,7 +400,9 @@ int journal_file_fss_load(JournalFile *f - goto finish; - } - -- f->fss_file = mmap(NULL, PAGE_ALIGN(f->fss_file_size), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); -+ f->fss_file = mmap(NULL, PAGE_ALIGN(f->fss_file_size), -+ PROT_READ | PROT_WRITE, MAP_SHARED | MAP_STACK, -+ fd, 0); - if (f->fss_file == MAP_FAILED) { - f->fss_file = NULL; - r = -errno; -Index: systemd-221/src/journal/journald-kmsg.c -=================================================================== ---- systemd-221.orig/src/journal/journald-kmsg.c -+++ systemd-221/src/journal/journald-kmsg.c -@@ -454,7 +454,8 @@ int server_open_kernel_seqnum(Server *s) - return 0; - } - -- p = mmap(NULL, sizeof(uint64_t), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); -+ p = mmap(NULL, sizeof(uint64_t), PROT_READ | PROT_WRITE, -+ MAP_SHARED | MAP_STACK, fd, 0); - if (p == MAP_FAILED) { - log_error_errno(errno, "Failed to map sequential number file, ignoring: %m"); - return 0; -Index: systemd-221/src/journal/mmap-cache.c -=================================================================== ---- systemd-221.orig/src/journal/mmap-cache.c -+++ systemd-221/src/journal/mmap-cache.c -@@ -466,11 +466,14 @@ static int add_mmap( - struct stat *st, - void **ret) { - -+ static const unsigned int advice[] = -+ {MADV_WILLNEED, MADV_SEQUENTIAL, MADV_DONTDUMP, MADV_DONTFORK}; - uint64_t woffset, wsize; - Context *c; - FileDescriptor *f; - Window *w; - void *d; -+ unsigned int n; - int r; - - assert(m); -@@ -509,7 +512,8 @@ static int add_mmap( - } - - for (;;) { -- d = mmap(NULL, wsize, prot, MAP_SHARED, fd, woffset); -+ d = mmap(NULL, wsize, prot, MAP_SHARED | MAP_POPULATE | -+ MAP_NONBLOCK, fd, woffset); - if (d != MAP_FAILED) - break; - if (errno != ENOMEM) -@@ -522,6 +526,16 @@ static int add_mmap( - return -ENOMEM; - } - -+ for (n = 0; n < sizeof(advice) / sizeof(*advice); ++n) { -+ if (advice[n] == MADV_DONTFORK) { -+ int flags = fcntl(fd, F_GETFD); -+ if (flags < 0 || !(flags & FD_CLOEXEC)) -+ continue; -+ } -+ if (madvise(d, wsize, advice[n]) < 0) -+ log_warning("Failed to give advice about use of memory: %m"); -+ } -+ - c = context_add(m, context); - if (!c) - goto outofmem; diff --git a/kbd-model-map.legacy b/kbd-model-map.legacy new file mode 100644 index 00000000..6c497f42 --- /dev/null +++ b/kbd-model-map.legacy @@ -0,0 +1,10 @@ +# Additional layouts offered by YaST +Pl02 pl pc105 - terminate:ctrl_alt_bksp +arabic ara,us pc105 - terminate:ctrl_alt_bksp,grp:shift_toggle +cn-latin1 ca pc105 multix terminate:ctrl_alt_bksp +cz-lat2-us cz,us pc105 qwerty,basic terminate:ctrl_alt_bksp,grp:shift_toggle +es-cp850 es pc105 - terminate:ctrl_alt_bksp +korean kr pc105 - terminate:ctrl_alt_bksp +lt.std lt pc105 std terminate:ctrl_alt_bksp +no-latin1 no pc105 - terminate:ctrl_alt_bksp +ruwin_alt-UTF-8 us,ru pc105 ,winkeys terminate:ctrl_alt_bksp,grp:ctrl_shift_toggle,grp_led:scroll diff --git a/kbd-model-map.patch b/kbd-model-map.patch deleted file mode 100644 index f45b0874..00000000 --- a/kbd-model-map.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: werner@suse.de -Date: Tue Jan 20 11:33:59 UTC 2015 - ---- - src/locale/kbd-model-map | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -Index: systemd-221/src/locale/kbd-model-map -=================================================================== ---- systemd-221.orig/src/locale/kbd-model-map -+++ systemd-221/src/locale/kbd-model-map -@@ -66,3 +66,16 @@ lt.baltic lt pc105 - terminate:ctrl_a - lt.l4 lt pc105 - terminate:ctrl_alt_bksp - lt lt pc105 - terminate:ctrl_alt_bksp - khmer kh,us pc105 - terminate:ctrl_alt_bksp -+# Additional layouts offered by YaST -+Pl02 pl pc105 - terminate:ctrl_alt_bksp -+arabic ara,us pc105 - terminate:ctrl_alt_bksp,grp:shift_toggle -+cn-latin1 ca pc105 multix terminate:ctrl_alt_bksp -+cz-lat2-us cz,us pc105 qwerty,basic terminate:ctrl_alt_bksp,grp:shift_toggle -+es-cp850 es pc105 - terminate:ctrl_alt_bksp -+khmer us,kh pc105 - terminate:ctrl_alt_bksp,grp:alt_shift_toggle -+korean kr pc105 - terminate:ctrl_alt_bksp -+lt.baltic lt pc105 - terminate:ctrl_alt_bksp -+lt.std lt pc105 std terminate:ctrl_alt_bksp -+no-latin1 no pc105 - terminate:ctrl_alt_bksp -+ruwin_alt-UTF-8 us,ru pc105 ,winkeys terminate:ctrl_alt_bksp,grp:ctrl_shift_toggle,grp_led:scroll -+sk-qwertz sk,us pc105 - terminate:ctrl_alt_bksp,grp:shift_toggle diff --git a/let-linker-find-libudev-for-libdevmapper.patch b/let-linker-find-libudev-for-libdevmapper.patch deleted file mode 100644 index 274d103c..00000000 --- a/let-linker-find-libudev-for-libdevmapper.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- - configure.ac | 4 ---- - 1 file changed, 4 deletions(-) - -Index: systemd-224/configure.ac -=================================================================== ---- systemd-224.orig/configure.ac -+++ systemd-224/configure.ac -@@ -199,10 +199,6 @@ AS_CASE([$CC], [*clang*], - -Wno-gnu-variable-sized-type-not-at-end \ - ])]) - --AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*], -- [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ -- -flto])], -- [AC_MSG_RESULT([skipping -flto, optimization not enabled])]) - AC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags") - - AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*], diff --git a/let-vconsole-setup-get-properties-only-once-to-copy-them.patch b/let-vconsole-setup-get-properties-only-once-to-copy-them.patch deleted file mode 100644 index 22c45e4d..00000000 --- a/let-vconsole-setup-get-properties-only-once-to-copy-them.patch +++ /dev/null @@ -1,84 +0,0 @@ -From: Werner Fink -Date: Wed Sep 23 12:37:23 UTC 2015 -Subject: Do not bother vistual console to much with GIO/PIO - -This avoids broken virtual console mapping due stressed ioctl API -for the virtual consoles (boo#904214) - ---- - src/vconsole/vconsole-setup.c | 39 +++++++++++++++++++++++++-------------- - 1 file changed, 25 insertions(+), 14 deletions(-) - ---- a/src/vconsole/vconsole-setup.c -+++ b/src/vconsole/vconsole-setup.c 2015-09-23 12:34:33.854018750 +0000 -@@ -202,8 +202,13 @@ static void font_copy_to_all_vcs(int fd) - unsigned short map16[E_TABSZ]; - struct unimapdesc unimapd; - struct unipair unipairs[USHRT_MAX]; -+ struct console_font_op cfo = {}; - int i, r; - -+ bool hasmap8; -+ bool hasmap16; -+ bool hasunimap; -+ - /* get active, and 16 bit mask of used VT numbers */ - r = ioctl(fd, VT_GETSTATE, &vcs); - if (r < 0) { -@@ -211,10 +216,22 @@ static void font_copy_to_all_vcs(int fd) - return; - } - -+ /* copy font from active VT, where the font was uploaded to */ -+ cfo.op = KD_FONT_OP_COPY; -+ cfo.height = vcs.v_active-1; /* tty1 == index 0 */ -+ -+ hasmap8 = (ioctl(fd, GIO_SCRNMAP, map8) >= 0); -+ hasmap16 = (ioctl(fd, GIO_UNISCRNMAP, map16) >= 0); -+ -+ /* unimapd is a ushort count and a pointer to an -+ * array of struct unipair { ushort, ushort } */ -+ unimapd.entries = unipairs; -+ unimapd.entry_ct = USHRT_MAX; -+ hasunimap = (ioctl(fd, GIO_UNIMAP, &unimapd) >= 0); -+ - for (i = 1; i <= 15; i++) { - char vcname[strlen("/dev/vcs") + DECIMAL_STR_MAX(int)]; - _cleanup_close_ int vcfd = -1; -- struct console_font_op cfo = {}; - - if (i == vcs.v_active) - continue; -@@ -229,25 +246,19 @@ static void font_copy_to_all_vcs(int fd) - if (vcfd < 0) - continue; - -- /* copy font from active VT, where the font was uploaded to */ -- cfo.op = KD_FONT_OP_COPY; -- cfo.height = vcs.v_active-1; /* tty1 == index 0 */ -+ /* copy font from active VT to vcs */ - (void) ioctl(vcfd, KDFONTOP, &cfo); - -- /* copy map of 8bit chars */ -- if (ioctl(fd, GIO_SCRNMAP, map8) >= 0) -+ /* copy map of 8bit chars to vcs */ -+ if (hasmap8) - (void) ioctl(vcfd, PIO_SCRNMAP, map8); - -- /* copy map of 8bit chars -> 16bit Unicode values */ -- if (ioctl(fd, GIO_UNISCRNMAP, map16) >= 0) -+ /* copy map of 8bit chars -> 16bit Unicode values to vcs */ -+ if (hasmap16) - (void) ioctl(vcfd, PIO_UNISCRNMAP, map16); - -- /* copy unicode translation table */ -- /* unimapd is a ushort count and a pointer to an -- array of struct unipair { ushort, ushort } */ -- unimapd.entries = unipairs; -- unimapd.entry_ct = USHRT_MAX; -- if (ioctl(fd, GIO_UNIMAP, &unimapd) >= 0) { -+ /* copy unicode translation table to vcs */ -+ if (hasunimap) { - struct unimapinit adv = { 0, 0, 0 }; - - (void) ioctl(vcfd, PIO_UNIMAPCLR, &adv); diff --git a/make-emergency.service-conflict-with-syslog.socket.patch b/make-emergency.service-conflict-with-syslog.socket.patch deleted file mode 100644 index 808fc9a2..00000000 --- a/make-emergency.service-conflict-with-syslog.socket.patch +++ /dev/null @@ -1,25 +0,0 @@ -If after emergency service had been started there is incoming -traffic on syslog.socket emergency.service gets killed due to -implicit dependencies on basic.target => sysinit.target which in -turn conflict with emergency.target. - -As a workaround explicitly stop syslog.socket when entering -emergency.service. - -Reference: bnc#852232 ---- - units/emergency.service.in | 1 + - 1 file changed, 1 insertion(+) - -Index: systemd-221/units/emergency.service.in -=================================================================== ---- systemd-221.orig/units/emergency.service.in -+++ systemd-221/units/emergency.service.in -@@ -11,6 +11,7 @@ Documentation=man:sulogin(8) - DefaultDependencies=no - Conflicts=shutdown.target - Conflicts=rescue.service -+Conflicts=syslog.socket - Before=shutdown.target - - [Service] diff --git a/parse-crypttab-for-noauto-option.patch b/parse-crypttab-for-noauto-option.patch deleted file mode 100644 index cd65edec..00000000 --- a/parse-crypttab-for-noauto-option.patch +++ /dev/null @@ -1,67 +0,0 @@ ---- - src/fstab-generator/fstab-generator.c | 45 +++++++++++++++++++++++++++++++++- - 1 file changed, 44 insertions(+), 1 deletion(-) - -Index: systemd-221/src/fstab-generator/fstab-generator.c -=================================================================== ---- systemd-221.orig/src/fstab-generator/fstab-generator.c -+++ systemd-221/src/fstab-generator/fstab-generator.c -@@ -47,6 +47,49 @@ static char *arg_usr_what = NULL; - static char *arg_usr_fstype = NULL; - static char *arg_usr_options = NULL; - -+static int check_crypttab(const char *what) { -+ _cleanup_fclose_ FILE *f = NULL; -+ unsigned n = 0; -+ -+ f = fopen("/etc/crypttab", "re"); -+ if (!f) { -+ if (errno != ENOENT) -+ log_error("Failed to open /etc/crypttab: %m"); -+ -+ return 1; -+ } -+ -+ -+ for (;;) { -+ char line[LINE_MAX], *l; -+ _cleanup_free_ char *name = NULL, *device = NULL, *password = NULL, *options = NULL; -+ int k; -+ -+ if (!fgets(line, sizeof(line), f)) -+ break; -+ -+ n++; -+ -+ l = strstrip(line); -+ if (*l == '#' || *l == 0) -+ continue; -+ -+ k = sscanf(l, "%ms %ms %ms %ms", &name, &device, &password, &options); -+ if (k < 2 || k > 4) { -+ log_error("Failed to parse /etc/crypttab:%u, ignoring.", n); -+ continue; -+ } -+ -+ if (strcmp((what + 12), name) == 0) { -+ if (options && strstr(options, "noauto")) -+ return 0; -+ -+ return 1; -+ } -+ } -+ return 1; -+} -+ - static int add_swap( - const char *what, - struct mntent *me, -@@ -108,7 +151,7 @@ static int add_swap( - if (r < 0) - return r; - -- if (!noauto) { -+ if (!noauto && check_crypttab(what) != 0) { - lnk = strjoin(arg_dest, "/" SPECIAL_SWAP_TARGET, - nofail ? ".wants/" : ".requires/", name, NULL); - if (!lnk) diff --git a/plymouth-quit-and-wait-for-emergency-service.patch b/plymouth-quit-and-wait-for-emergency-service.patch deleted file mode 100644 index 331034ec..00000000 --- a/plymouth-quit-and-wait-for-emergency-service.patch +++ /dev/null @@ -1,46 +0,0 @@ ---- - units/console-shell.service.m4.in | 2 ++ - units/emergency.service.in | 2 +- - units/rescue.service.in | 3 ++- - 3 files changed, 5 insertions(+), 2 deletions(-) - -Index: systemd-224/units/console-shell.service.m4.in -=================================================================== ---- systemd-224.orig/units/console-shell.service.m4.in -+++ systemd-224/units/console-shell.service.m4.in -@@ -17,6 +17,8 @@ Before=getty.target - [Service] - Environment=HOME=/root - WorkingDirectory=/root -+ExecStartPre=-/usr/bin/plymouth quit -+ExecStartPre=-/usr/bin/plymouth --wait - ExecStart=-@SULOGIN@ - ExecStopPost=-@SYSTEMCTL@ poweroff - Type=idle -Index: systemd-224/units/emergency.service.in -=================================================================== ---- systemd-224.orig/units/emergency.service.in -+++ systemd-224/units/emergency.service.in -@@ -17,7 +17,7 @@ Before=shutdown.target - [Service] - Environment=HOME=/root - WorkingDirectory=/root --ExecStartPre=-/bin/plymouth --wait quit -+ExecStartPre=-/usr/bin/plymouth --wait quit - ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\ntry again to boot into default mode.' - ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default" - Type=idle -Index: systemd-224/units/rescue.service.in -=================================================================== ---- systemd-224.orig/units/rescue.service.in -+++ systemd-224/units/rescue.service.in -@@ -16,7 +16,8 @@ Before=shutdown.target - [Service] - Environment=HOME=/root - WorkingDirectory=/root --ExecStartPre=-/bin/plymouth quit -+ExecStartPre=-/usr/bin/plymouth quit -+ExecStartPre=-/usr/bin/plymouth --wait - ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\nboot into default mode.' - ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default" - Type=idle diff --git a/portmap-wants-rpcbind-socket.patch b/portmap-wants-rpcbind-socket.patch deleted file mode 100644 index 77fb2871..00000000 --- a/portmap-wants-rpcbind-socket.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- - units/rpcbind.target | 1 + - 1 file changed, 1 insertion(+) - -Index: systemd-221/units/rpcbind.target -=================================================================== ---- systemd-221.orig/units/rpcbind.target -+++ systemd-221/units/rpcbind.target -@@ -12,3 +12,4 @@ - Description=RPC Port Mapper - Documentation=man:systemd.special(7) - RefuseManualStart=yes -+Wants=rpcbind.socket diff --git a/pre_checkin.sh b/pre_checkin.sh index 80ae3ad6..c033554d 100644 --- a/pre_checkin.sh +++ b/pre_checkin.sh @@ -7,8 +7,7 @@ ORIG_SPEC=systemd EDIT_WARNING="##### WARNING: please do not edit this auto generated spec file. Use the ${ORIG_SPEC}.spec! #####\n" sed "s/^%define bootstrap .*$/${EDIT_WARNING}%define bootstrap 1/; s/^%define mini .*$/${EDIT_WARNING}%define mini -mini/; - s/^\(Name:.*\)$/\1-mini/; - s/^BuildRoot.*/&\n\nProvides: %{real} = %{version}-%{release}\n/ + s/^Name:.*/&-mini/ " < ${ORIG_SPEC}.spec > ${ORIG_SPEC}-mini.spec cp ${ORIG_SPEC}.changes ${ORIG_SPEC}-mini.changes cp ${ORIG_SPEC}-rpmlintrc ${ORIG_SPEC}-mini-rpmlintrc diff --git a/rescue-emergency-target-conflicts.patch b/rescue-emergency-target-conflicts.patch deleted file mode 100644 index a02e7ed3..00000000 --- a/rescue-emergency-target-conflicts.patch +++ /dev/null @@ -1,29 +0,0 @@ ---- - units/emergency.target | 1 + - units/rescue.target | 3 ++- - 2 files changed, 3 insertions(+), 1 deletion(-) - -Index: systemd-221/units/emergency.target -=================================================================== ---- systemd-221.orig/units/emergency.target -+++ systemd-221/units/emergency.target -@@ -10,4 +10,5 @@ Description=Emergency Mode - Documentation=man:systemd.special(7) - Requires=emergency.service - After=emergency.service -+Conflicts=getty.target rescue.target - AllowIsolate=yes -Index: systemd-221/units/rescue.target -=================================================================== ---- systemd-221.orig/units/rescue.target -+++ systemd-221/units/rescue.target -@@ -10,7 +10,8 @@ Description=Rescue Mode - Documentation=man:systemd.special(7) - Requires=sysinit.target rescue.service - After=sysinit.target rescue.service --Conflicts=getty.target -+Conflicts=getty.target emergency.target -+Before=emergency.target - AllowIsolate=yes - - [Install] diff --git a/respect-nfs-bg-option.patch b/respect-nfs-bg-option.patch deleted file mode 100644 index a4a4ba65..00000000 --- a/respect-nfs-bg-option.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- - src/fstab-generator/fstab-generator.c | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -Index: systemd-221/src/fstab-generator/fstab-generator.c -=================================================================== ---- systemd-221.orig/src/fstab-generator/fstab-generator.c -+++ systemd-221/src/fstab-generator/fstab-generator.c -@@ -289,8 +289,11 @@ static int add_mount( - "Documentation=man:fstab(5) man:systemd-fstab-generator(8)\n", - source); - -- if (post && !noauto && !nofail && !automount) -- fprintf(f, "Before=%s\n", post); -+ if (post && !noauto && !nofail && !automount) { -+ bool is_nfs = fstype != NULL && streq(fstype, "nfs"); -+ if (!is_nfs || strstr(opts, "bg") == NULL) -+ fprintf(f, "Before=%s\n", post); -+ } - - if (!automount && opts) { - r = write_requires_after(f, opts); diff --git a/restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch b/restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch deleted file mode 100644 index 37147945..00000000 --- a/restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch +++ /dev/null @@ -1,87 +0,0 @@ -From: Frederic Crozat -Date: Mon, 29 Oct 2012 13:01:20 +0000 -Subject: restore /var/run and /var/lock bind mount if they aren't symlink - ---- - Makefile.am | 9 +++++++++ - units/var-lock.mount | 19 +++++++++++++++++++ - units/var-run.mount | 19 +++++++++++++++++++ - 3 files changed, 47 insertions(+) - create mode 100644 units/var-lock.mount - create mode 100644 units/var-run.mount - -Index: systemd-221/Makefile.am -=================================================================== ---- systemd-221.orig/Makefile.am -+++ systemd-221/Makefile.am -@@ -526,6 +526,12 @@ dist_systemunit_DATA += \ - dist_systemunit_DATA_busnames += \ - units/busnames.target - -+if HAVE_SYSV_COMPAT -+dist_systemunit_DATA += \ -+ units/var-run.mount \ -+ units/var-lock.mount -+endif -+ - nodist_systemunit_DATA = \ - units/getty@.service \ - units/serial-getty@.service \ -@@ -6123,6 +6129,9 @@ GRAPHICAL_TARGET_WANTS += \ - systemd-update-utmp-runlevel.service - RESCUE_TARGET_WANTS += \ - systemd-update-utmp-runlevel.service -+LOCAL_FS_TARGET_WANTS += \ -+ var-run.mount \ -+ var-lock.mount - endif - - SYSINIT_TARGET_WANTS += \ -Index: systemd-221/units/var-lock.mount -=================================================================== ---- /dev/null -+++ systemd-221/units/var-lock.mount -@@ -0,0 +1,19 @@ -+# This file is part of systemd. -+# -+# systemd is free software; you can redistribute it and/or modify it -+# under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+ -+[Unit] -+Description=Lock Directory -+Before=local-fs.target -+# skip mounting if the directory does not exist or is a symlink -+ConditionPathIsDirectory=/var/lock -+ConditionPathIsSymbolicLink=!/var/lock -+ -+[Mount] -+What=/run/lock -+Where=/var/lock -+Type=bind -+Options=bind -Index: systemd-221/units/var-run.mount -=================================================================== ---- /dev/null -+++ systemd-221/units/var-run.mount -@@ -0,0 +1,19 @@ -+# This file is part of systemd. -+# -+# systemd is free software; you can redistribute it and/or modify it -+# under the terms of the GNU General Public License as published by -+# the Free Software Foundation; either version 2 of the License, or -+# (at your option) any later version. -+ -+[Unit] -+Description=Runtime Directory -+Before=local-fs.target -+# skip mounting if the directory does not exist or is a symlink -+ConditionPathIsDirectory=/var/run -+ConditionPathIsSymbolicLink=!/var/run -+ -+[Mount] -+What=/run -+Where=/var/run -+Type=bind -+Options=bind diff --git a/set-and-use-default-logconsole.patch b/set-and-use-default-logconsole.patch deleted file mode 100644 index e6474d8d..00000000 --- a/set-and-use-default-logconsole.patch +++ /dev/null @@ -1,175 +0,0 @@ -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 | 5 ++ - 3 files changed, 108 insertions(+) - -Index: systemd-228/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 -+#ifdef HAVE_SYSV_COMPAT -+# include -+# include -+# include -+# include -+# include -+# include "string-util.h" -+#endif - - #include "alloc-util.h" - #include "fd-util.h" -@@ -50,6 +58,76 @@ static bool prefix_timestamp(void) { - return cached_printk_time; - } - -+void default_tty_path(Server *s) -+{ -+#ifdef HAVE_SYSV_COMPAT -+ static const char list[] = "/dev/tty10\0" "/dev/console\0"; -+ const char *vc; -+ -+ if (s->tty_path) -+ return; -+ -+ NULSTR_FOREACH(vc, list) { -+ _cleanup_close_ int fd = -1; -+ -+ if (access(vc, F_OK) < 0) -+ continue; -+ -+ fd = open_terminal(vc, O_WRONLY|O_NOCTTY|O_CLOEXEC); -+ if (fd < 0) -+ continue; -+ -+ s->tty_path = strdup(vc); -+ break; -+ } -+#endif -+} -+ -+void klogconsole(Server *s) -+{ -+#ifdef HAVE_SYSV_COMPAT -+ _cleanup_free_ char *klogconsole_params = NULL; -+ _cleanup_close_ int fd = -1; -+ const char *vc = s->tty_path; -+ const char *num; -+ int tiocl[2]; -+ int r; -+ -+ if (!vc || *vc == 0 || !strneq("/dev/tty", vc, 8)) -+ return; -+ -+ num = vc + strcspn(vc, "0123456789"); -+ if (safe_atoi(num, &r) < 0) -+ return; -+ -+ if (access(vc, F_OK) < 0) -+ return; -+ -+ fd = open_terminal(vc, O_RDWR|O_NOCTTY|O_CLOEXEC); -+ if (fd < 0) -+ return; -+ -+ tiocl[0] = TIOCL_SETKMSGREDIRECT; -+ tiocl[1] = r; -+ -+ if (ioctl(fd, TIOCLINUX, tiocl) < 0) -+ return; -+ -+ zero(klogconsole_params); -+ r = parse_env_file("/etc/sysconfig/boot", NEWLINE, -+ "KLOGCONSOLE_PARAMS", &klogconsole_params, -+ NULL); -+ if (r < 0) -+ return; -+ if (!klogconsole_params || *klogconsole_params == 0) -+ return; -+ -+ num = klogconsole_params + strcspn(klogconsole_params, "0123456789"); -+ if (safe_atoi(num, &r) == 0) -+ klogctl(8, 0, r); -+#endif -+} -+ - void server_forward_console( - Server *s, - int priority, -@@ -71,6 +149,12 @@ void server_forward_console( - if (LOG_PRI(priority) > s->max_level_console) - return; - -+#ifdef HAVE_SYSV_COMPAT -+ /* Do not write security/authorization (private) messages to console */ -+ if ((priority & LOG_FACMASK) == LOG_AUTHPRIV) -+ return; -+#endif -+ - /* First: timestamp */ - if (prefix_timestamp()) { - assert_se(clock_gettime(CLOCK_MONOTONIC, &ts) == 0); -@@ -107,7 +191,23 @@ void server_forward_console( - fd = open_terminal(tty, O_WRONLY|O_NOCTTY|O_CLOEXEC); - if (fd < 0) { - log_debug_errno(fd, "Failed to open %s for logging: %m", tty); -+#ifdef HAVE_SYSV_COMPAT -+ if (fd != -ENOENT && fd != -ENODEV) -+ return; -+ if (tty != s->tty_path) -+ return; -+ if (!streq("/dev/console", tty)) { -+ if (s->tty_path) -+ free(s->tty_path); -+ s->tty_path = NULL; -+ tty = "/dev/console"; -+ fd = open_terminal(tty, O_WRONLY|O_NOCTTY|O_CLOEXEC); -+ if (fd < 0) -+ return; -+ } -+#else - return; -+#endif - } - - if (writev(fd, iovec, n) < 0) -Index: systemd-228/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" - - void server_forward_console(Server *s, int priority, const char *identifier, const char *message, const struct ucred *ucred); -+ -+void klogconsole(Server *s); -+void default_tty_path(Server *s); -Index: systemd-228/src/journal/journald-server.c -=================================================================== ---- 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-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); -+ default_tty_path(s); -+ -+ 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", diff --git a/shut-up-rpmlint-on-var-log-journal.patch b/shut-up-rpmlint-on-var-log-journal.patch deleted file mode 100644 index d7ffac19..00000000 --- a/shut-up-rpmlint-on-var-log-journal.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- - Makefile.am | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -Index: systemd-221/Makefile.am -=================================================================== ---- systemd-221.orig/Makefile.am -+++ systemd-221/Makefile.am -@@ -4129,11 +4129,11 @@ noinst_LTLIBRARIES += \ - libjournal-core.la - - journal-install-hook: -- -$(MKDIR_P) $(DESTDIR)/var/log/journal -- -chown 0:0 $(DESTDIR)/var/log/journal -- -chmod 755 $(DESTDIR)/var/log/journal -- -setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/ -- -setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/ -+ -$(MKDIR_P) $(DESTDIR)/var/log/journal/ -+ -@echo chown 0:0 $(DESTDIR)/var/log/journal/ -+ -chmod 755 $(DESTDIR)/var/log/journal/ -+ -@echo setfacl -nm g:adm:rx,d:g:adm:rx $(DESTDIR)/var/log/journal/ -+ -@echo setfacl -nm g:wheel:rx,d:g:wheel:rx $(DESTDIR)/var/log/journal/ - - journal-uninstall-hook: - -rmdir $(DESTDIR)/var/log/journal/remote diff --git a/suse-sysv-bootd-support.diff b/suse-sysv-bootd-support.diff deleted file mode 100644 index ce772aac..00000000 --- a/suse-sysv-bootd-support.diff +++ /dev/null @@ -1,80 +0,0 @@ -From: Frederic Crozat -Date: Fri, 12 Apr 2013 16:56:26 +0200 -Subject: Revert "service: drop support for SysV scripts for the early boot" - -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 | 20 +++++++++++++++----- - 1 file changed, 15 insertions(+), 5 deletions(-) - -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, -- RUNLEVEL_DOWN -+ RUNLEVEL_DOWN, -+ RUNLEVEL_SYSINIT, - } RunlevelType; - - static const struct { -@@ -54,6 +55,9 @@ static const struct { - const char *target; - const RunlevelType type; - } rcnd_table[] = { -+ /* SUSE style boot.d */ -+ { "boot.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_SYSINIT }, -+ - /* Standard SysV runlevels for start-up */ - { "rc1.d", SPECIAL_RESCUE_TARGET, RUNLEVEL_UP }, - { "rc2.d", SPECIAL_MULTI_USER_TARGET, RUNLEVEL_UP }, -@@ -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 -- UP must be read before DOWN */ -+ UP/SYSINIT must be read before DOWN */ - }; - --const char *arg_dest = "/tmp"; -+static const char *arg_dest = "/tmp"; - - typedef struct SysvStub { - char *name; -@@ -261,6 +265,10 @@ static char *sysv_translate_name(const c - _cleanup_free_ char *c = NULL; - char *res; - -+ if (startswith(name, "boot.")) -+ /* Drop SuSE-style boot. prefix */ -+ name += 5; -+ - c = strdup(name); - if (!c) - return NULL; -@@ -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 || -+ rcnd_table[i].type == RUNLEVEL_SYSINIT) - service->sysv_start_priority = MAX(a*10 + b, service->sysv_start_priority); - - r = set_ensure_allocated(&runlevel_services[i], NULL); -@@ -898,7 +907,8 @@ static int set_dependencies_from_rcnd(co - } - - } else if (de->d_name[0] == 'K' && -- (rcnd_table[i].type == RUNLEVEL_DOWN)) { -+ (rcnd_table[i].type == RUNLEVEL_DOWN || -+ rcnd_table[i].type == RUNLEVEL_SYSINIT)) { - - r = set_ensure_allocated(&shutdown_services, NULL); - if (r < 0) { diff --git a/systemctl-set-default-target.patch b/systemctl-set-default-target.patch deleted file mode 100644 index de694a4b..00000000 --- a/systemctl-set-default-target.patch +++ /dev/null @@ -1,30 +0,0 @@ -Mention that --force is required to override an already existing default.target - -This solves the bug bnc#868439 - ---- - man/systemctl.xml | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -Index: systemd-221/man/systemctl.xml -=================================================================== ---- systemd-221.orig/man/systemctl.xml -+++ systemd-221/man/systemctl.xml -@@ -439,7 +439,7 @@ - - - -- When used with enable, overwrite -+ When used with enable or set-default, overwrite - any existing conflicting symlinks. - - When used with halt, -@@ -1237,6 +1237,8 @@ kobject-uevent 1 systemd-udevd-kernel.so - Return the default target to boot into. This returns - the target unit name default.target - is aliased (symlinked) to. -+ If combined with , override -+ an already existing symlink for the default target. - - - diff --git a/systemd-228-nspawn-make-journal-linking-non-fatal-in-try-and-auto.diff b/systemd-228-nspawn-make-journal-linking-non-fatal-in-try-and-auto.diff deleted file mode 100644 index 17a09a8a..00000000 --- a/systemd-228-nspawn-make-journal-linking-non-fatal-in-try-and-auto.diff +++ /dev/null @@ -1,116 +0,0 @@ -From 84d816c48b57b43e833e2917bbd278c116816fcf Mon Sep 17 00:00:00 2001 -From: Lennart Poettering -Date: Thu, 28 Jan 2016 20:15:49 +0100 -Subject: [PATCH] nspawn: make journal linking non-fatal in try and auto modes - -Fixes #2091 ---- - src/nspawn/nspawn.c | 39 ++++++++++++++++++++------------------- - 1 file changed, 20 insertions(+), 19 deletions(-) - -diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c -index f6a2c03..97ea51a 100644 ---- a/src/nspawn/nspawn.c -+++ b/src/nspawn/nspawn.c -@@ -1338,6 +1338,7 @@ static int setup_journal(const char *directory) { - sd_id128_t machine_id, this_id; - _cleanup_free_ char *b = NULL, *d = NULL; - const char *etc_machine_id, *p, *q; -+ bool try; - char *id; - int r; - -@@ -1345,16 +1346,21 @@ static int setup_journal(const char *directory) { - if (arg_ephemeral) - return 0; - -+ if (arg_link_journal == LINK_NO) -+ return 0; -+ -+ try = arg_link_journal_try || arg_link_journal == LINK_AUTO; -+ - etc_machine_id = prefix_roota(directory, "/etc/machine-id"); - - r = read_one_line_file(etc_machine_id, &b); -- if (r == -ENOENT && arg_link_journal == LINK_AUTO) -+ if (r == -ENOENT && try) - return 0; - else if (r < 0) - return log_error_errno(r, "Failed to read machine ID from %s: %m", etc_machine_id); - - id = strstrip(b); -- if (isempty(id) && arg_link_journal == LINK_AUTO) -+ if (isempty(id) && try) - return 0; - - /* Verify validity */ -@@ -1367,16 +1373,13 @@ static int setup_journal(const char *directory) { - return log_error_errno(r, "Failed to retrieve machine ID: %m"); - - if (sd_id128_equal(machine_id, this_id)) { -- log_full(arg_link_journal == LINK_AUTO ? LOG_WARNING : LOG_ERR, -+ log_full(try ? LOG_WARNING : LOG_ERR, - "Host and machine ids are equal (%s): refusing to link journals", id); -- if (arg_link_journal == LINK_AUTO) -+ if (try) - return 0; - return -EEXIST; - } - -- if (arg_link_journal == LINK_NO) -- return 0; -- - r = userns_mkdir(directory, "/var", 0755, 0, 0); - if (r < 0) - return log_error_errno(r, "Failed to create /var: %m"); -@@ -1393,21 +1396,19 @@ static int setup_journal(const char *directory) { - q = prefix_roota(directory, p); - - if (path_is_mount_point(p, 0) > 0) { -- if (arg_link_journal != LINK_AUTO) { -- log_error("%s: already a mount point, refusing to use for journal", p); -- return -EEXIST; -- } -+ if (try) -+ return 0; - -- return 0; -+ log_error("%s: already a mount point, refusing to use for journal", p); -+ return -EEXIST; - } - - if (path_is_mount_point(q, 0) > 0) { -- if (arg_link_journal != LINK_AUTO) { -- log_error("%s: already a mount point, refusing to use for journal", q); -- return -EEXIST; -- } -+ if (try) -+ return 0; - -- return 0; -+ log_error("%s: already a mount point, refusing to use for journal", q); -+ return -EEXIST; - } - - r = readlink_and_make_absolute(p, &d); -@@ -1441,7 +1442,7 @@ static int setup_journal(const char *directory) { - if (arg_link_journal == LINK_GUEST) { - - if (symlink(q, p) < 0) { -- if (arg_link_journal_try) { -+ if (try) { - log_debug_errno(errno, "Failed to symlink %s to %s, skipping journal setup: %m", q, p); - return 0; - } else -@@ -1459,7 +1460,7 @@ static int setup_journal(const char *directory) { - * permanent journal set up, don't force it here */ - r = mkdir(p, 0755); - if (r < 0) { -- if (arg_link_journal_try) { -+ if (try) { - log_debug_errno(errno, "Failed to create %s, skipping journal setup: %m", p); - return 0; - } else --- -2.7.0 - diff --git a/systemd-228.tar.xz b/systemd-228.tar.xz new file mode 100644 index 00000000..c8f3fdcf --- /dev/null +++ b/systemd-228.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:141d1609469579adeaf62d76e3527149c5a0140a54c8538f706b4eb97a447f8a +size 2866192 diff --git a/systemd-230-cgroup2-use-new-fstype-for-unified-hierarchy.patch b/systemd-230-cgroup2-use-new-fstype-for-unified-hierarchy.patch deleted file mode 100644 index 53faee2a..00000000 --- a/systemd-230-cgroup2-use-new-fstype-for-unified-hierarchy.patch +++ /dev/null @@ -1,87 +0,0 @@ -commit 099619957a0d9ae0e6e5e221493e40fb8fc2cd81 -Author: Alban Crequy -Date: Mon Dec 7 01:10:50 2015 +0100 - - cgroup2: use new fstype for unified hierarchy - - Since Linux v4.4-rc1, __DEVEL__sane_behavior does not exist anymore and - is replaced by a new fstype "cgroup2". - - With this patch, systemd no longer supports the old (unstable) way of - doing unified hierarchy with __DEVEL__sane_behavior and systemd now - requires Linux v4.4 for unified hierarchy. - - Non-unified hierarchy is still the default and is unchanged by this - patch. - - https://github.com/torvalds/linux/commit/67e9c74b8a873408c27ac9a8e4c1d1c8d72c93ff - - Upstream-patch: 099619957a0d9ae0e6e5e221493e40fb8fc2cd81 - -diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c -index 56c1fcaab9b2..5124b5bf93ad 100644 ---- a/src/basic/cgroup-util.c -+++ b/src/basic/cgroup-util.c -@@ -2129,7 +2129,7 @@ int cg_unified(void) { - if (statfs("/sys/fs/cgroup/", &fs) < 0) - return -errno; - -- if (F_TYPE_EQUAL(fs.f_type, CGROUP_SUPER_MAGIC)) -+ if (F_TYPE_EQUAL(fs.f_type, CGROUP2_SUPER_MAGIC)) - unified_cache = true; - else if (F_TYPE_EQUAL(fs.f_type, TMPFS_MAGIC)) - unified_cache = false; -diff --git a/src/basic/missing.h b/src/basic/missing.h -index 034e334e6626..66cd5921adf0 100644 ---- a/src/basic/missing.h -+++ b/src/basic/missing.h -@@ -437,6 +437,10 @@ struct btrfs_ioctl_quota_ctl_args { - #define CGROUP_SUPER_MAGIC 0x27e0eb - #endif - -+#ifndef CGROUP2_SUPER_MAGIC -+#define CGROUP2_SUPER_MAGIC 0x63677270 -+#endif -+ - #ifndef TMPFS_MAGIC - #define TMPFS_MAGIC 0x01021994 - #endif -diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c -index de1a361cc4c5..32fe51c67ea3 100644 ---- a/src/core/mount-setup.c -+++ b/src/core/mount-setup.c -@@ -94,7 +94,7 @@ static const MountPoint mount_table[] = { - #endif - { "tmpfs", "/run", "tmpfs", "mode=755", MS_NOSUID|MS_NODEV|MS_STRICTATIME, - NULL, MNT_FATAL|MNT_IN_CONTAINER }, -- { "cgroup", "/sys/fs/cgroup", "cgroup", "__DEVEL__sane_behavior", MS_NOSUID|MS_NOEXEC|MS_NODEV, -+ { "cgroup", "/sys/fs/cgroup", "cgroup2", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, - cg_is_unified_wanted, MNT_FATAL|MNT_IN_CONTAINER }, - { "tmpfs", "/sys/fs/cgroup", "tmpfs", "mode=755", MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_STRICTATIME, - cg_is_legacy_wanted, MNT_FATAL|MNT_IN_CONTAINER }, -diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c -index 9f9a4759d1ca..53a7ee713427 100644 ---- a/src/nspawn/nspawn-cgroup.c -+++ b/src/nspawn/nspawn-cgroup.c -@@ -94,7 +94,7 @@ int sync_cgroup(pid_t pid, bool unified_requested) { - if (unified) - r = mount("cgroup", tree, "cgroup", MS_NOSUID|MS_NOEXEC|MS_NODEV, "none,name=systemd,xattr"); - else -- r = mount("cgroup", tree, "cgroup", MS_NOSUID|MS_NOEXEC|MS_NODEV, "__DEVEL__sane_behavior"); -+ r = mount("cgroup", tree, "cgroup2", MS_NOSUID|MS_NOEXEC|MS_NODEV, NULL); - if (r < 0) { - r = log_error_errno(errno, "Failed to mount unified hierarchy: %m"); - goto finish; -diff --git a/src/nspawn/nspawn-mount.c b/src/nspawn/nspawn-mount.c -index 70cca1527876..64cb6b3ce306 100644 ---- a/src/nspawn/nspawn-mount.c -+++ b/src/nspawn/nspawn-mount.c -@@ -750,7 +750,7 @@ static int mount_unified_cgroups(const char *dest) { - return -EINVAL; - } - -- if (mount("cgroup", p, "cgroup", MS_NOSUID|MS_NOEXEC|MS_NODEV, "__DEVEL__sane_behavior") < 0) -+ if (mount("cgroup", p, "cgroup2", MS_NOSUID|MS_NOEXEC|MS_NODEV, NULL) < 0) - return log_error_errno(errno, "Failed to mount unified cgroup hierarchy to %s: %m", p); - - return 0; diff --git a/systemd-add-user-keep.patch b/systemd-add-user-keep.patch deleted file mode 100644 index bc7985dc..00000000 --- a/systemd-add-user-keep.patch +++ /dev/null @@ -1,92 +0,0 @@ ---- - man/tmpfiles.d.xml | 3 +++ - src/tmpfiles/tmpfiles.c | 46 ++++++++++++++++++++++++++++++++++++++++------ - 2 files changed, 43 insertions(+), 6 deletions(-) - -Index: systemd-228/man/tmpfiles.d.xml -=================================================================== ---- systemd-228.orig/man/tmpfiles.d.xml -+++ systemd-228/man/tmpfiles.d.xml -@@ -599,6 +599,9 @@ - f, F, and - 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 and T, - determines extended attributes to be set. For -Index: systemd-228/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 "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; -+ Item *found = NULL; - - while ((dent = readdir(d))) { - struct stat s; -@@ -428,14 +430,46 @@ static int dir_cleanup( - } - - /* Is there an item configured for this path? */ -- if (ordered_hashmap_get(items, sub_path)) { -- log_debug("Ignoring \"%s\": a separate entry exists.", sub_path); -- continue; -+ bool found_glob = false; -+ found = ordered_hashmap_get(items, sub_path); -+ if (!found) { -+ 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; -+ if (found) { -+ struct passwd *pw; -+ char *userfound = NULL, *args; -+ bool match = false; -+ uid_t uid = -1; -+ -+ /* evaluate username arguments in ignore statements */ -+ if ((found->type != IGNORE_PATH && found->type != IGNORE_DIRECTORY_PATH) || -+ !found->argument) { -+ if (found_glob) -+ log_debug("Ignoring \"%s\": a separate glob exists.", sub_path); -+ else -+ log_debug("Ignoring \"%s\": a separate entry exists.", sub_path); -+ continue; -+ } -+ args = strdup(found->argument); -+ assert_se(args != NULL); -+ while ((userfound = strsep(&args, ",")) != NULL) { -+ pw = getpwnam(userfound); -+ if (pw == NULL) { -+ log_error("Unknown user '%s' in ignore statement.", userfound); -+ continue; -+ } -+ uid = pw->pw_uid; -+ if (s.st_uid == uid) { -+ match = true; -+ break; -+ } -+ } -+ if (match) { -+ found = NULL; -+ continue; -+ } - } - - if (S_ISDIR(s.st_mode)) { diff --git a/systemd-dbus-system-bus-address.patch b/systemd-dbus-system-bus-address.patch deleted file mode 100644 index 60b98265..00000000 --- a/systemd-dbus-system-bus-address.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- - src/basic/def.h | 2 +- - src/libsystemd/sd-bus/sd-bus.c | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -Index: systemd-221/src/basic/def.h -=================================================================== ---- systemd-221.orig/src/basic/def.h -+++ systemd-221/src/basic/def.h -@@ -61,7 +61,7 @@ - "/usr/lib/kbd/keymaps/\0" - #endif - --#define UNIX_SYSTEM_BUS_ADDRESS "unix:path=/var/run/dbus/system_bus_socket" -+#define UNIX_SYSTEM_BUS_ADDRESS "unix:path=/run/dbus/system_bus_socket" - #define KERNEL_SYSTEM_BUS_ADDRESS "kernel:path=/sys/fs/kdbus/0-system/bus" - #define DEFAULT_SYSTEM_BUS_ADDRESS KERNEL_SYSTEM_BUS_ADDRESS ";" UNIX_SYSTEM_BUS_ADDRESS - #define UNIX_USER_BUS_ADDRESS_FMT "unix:path=%s/bus" -Index: systemd-221/src/libsystemd/sd-bus/sd-bus.c -=================================================================== ---- systemd-221.orig/src/libsystemd/sd-bus/sd-bus.c -+++ systemd-221/src/libsystemd/sd-bus/sd-bus.c -@@ -837,8 +837,8 @@ static int parse_container_unix_address( - b->nspid = 0; - - b->sockaddr.un.sun_family = AF_UNIX; -- strncpy(b->sockaddr.un.sun_path, "/var/run/dbus/system_bus_socket", sizeof(b->sockaddr.un.sun_path)); -- b->sockaddr_size = offsetof(struct sockaddr_un, sun_path) + strlen("/var/run/dbus/system_bus_socket"); -+ strncpy(b->sockaddr.un.sun_path, "/run/dbus/system_bus_socket", sizeof(b->sockaddr.un.sun_path)); -+ b->sockaddr_size = offsetof(struct sockaddr_un, sun_path) + strlen("/run/dbus/system_bus_socket"); - - return 0; - } diff --git a/systemd-install-compat_pkgconfig-always.patch b/systemd-install-compat_pkgconfig-always.patch deleted file mode 100644 index 57fb6129..00000000 --- a/systemd-install-compat_pkgconfig-always.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- - Makefile.am | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) - -Index: systemd-221/Makefile.am -=================================================================== ---- systemd-221.orig/Makefile.am -+++ systemd-221/Makefile.am -@@ -5876,12 +5876,6 @@ lib_LTLIBRARIES += \ - libsystemd-id128.la \ - libsystemd-daemon.la - --pkgconfiglib_DATA += \ -- src/compat-libs/libsystemd-journal.pc \ -- src/compat-libs/libsystemd-login.pc \ -- src/compat-libs/libsystemd-id128.pc \ -- src/compat-libs/libsystemd-daemon.pc -- - # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed - compat-lib-install-hook: - libname=libsystemd-login.so && $(move-to-rootlibdir) -@@ -5899,6 +5893,12 @@ INSTALL_EXEC_HOOKS += compat-lib-install - UNINSTALL_EXEC_HOOKS += compat-lib-uninstall-hook - endif - -+pkgconfiglib_DATA += \ -+ src/compat-libs/libsystemd-journal.pc \ -+ src/compat-libs/libsystemd-login.pc \ -+ src/compat-libs/libsystemd-id128.pc \ -+ src/compat-libs/libsystemd-daemon.pc -+ - EXTRA_DIST += \ - src/compat-libs/linkwarning.h \ - src/compat-libs/libsystemd-journal.pc.in \ diff --git a/systemd-mini.changes b/systemd-mini.changes index e71f989e..019f68f7 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,261 @@ +------------------------------------------------------------------- +Wed Oct 26 09:41:01 UTC 2016 - fbui@suse.com + +- Own a couple of directories even if they don't belong to systemd + otherwise the build system will complain. + + Some directories (owned by others packages) are simply used by + systemd to ship some scripts or config files to customize others + *optional* components. Since thos components are not build required + by systemd those directories are not owned by any packages and the + BS complains... + +------------------------------------------------------------------- +Wed Oct 26 07:45:08 UTC 2016 - fbui@suse.com + +- Import commit + + 15ea716 journal-remote: change owner of /var/log/journal/remote and create /var/lib/systemd/journal-upload (bsc#1006372) + +------------------------------------------------------------------- +Mon Oct 24 14:26:40 UTC 2016 - fbui@suse.com + +- %sysusers_create and %tmpfiles_create must be called in %post + + Calling %pre is broken since the respective conf files are not yet + installed. + +------------------------------------------------------------------- +Mon Oct 24 13:53:04 UTC 2016 - fbui@suse.com + +- %{_libexecdir}/{tmpfiles.d,sysusers.d}/systemd-remote.conf are + part of systemd-journal-remote package (only). + +------------------------------------------------------------------- +Mon Oct 24 13:21:22 UTC 2016 - fbui@suse.com + +- systemd-journal-{gatewayd,remote,upload} units are only part of + "systemd-journal-remote" package. + + So exclude them from the main package. + +------------------------------------------------------------------- +Mon Oct 24 08:56:59 UTC 2016 - fbui@suse.com + +- Import commit a1c145e6ad6588555dca64402f9103fb1e02b1a0 + + 7f34037 man: explain that *KeyIgnoreInhibited only apply to a subset of locks + df5798b Revert "logind: really handle *KeyIgnoreInhibited options in logind.conf" (bsc#1001790 bsc#1005404) + f79fee7 Revert "kbd-model-map: add more mappings offered by Yast" + 3760c10 manager: tighten incoming notification message checks + d6efd71 core: only warn on short reads on signal fd + 6eebd91 manager: be stricter with incomining notifications, warn properly about too large ones + fdf2dc3 manager: don't ever busy loop when we get a notification message we can't process + +------------------------------------------------------------------- +Thu Oct 20 06:57:57 UTC 2016 - fbui@suse.com + +- Rename kbd-model-map-extra into kbd-model-map.legacy + +------------------------------------------------------------------- +Wed Oct 19 07:24:46 UTC 2016 - fbui@suse.com + +- Remove tcpd-devel build requirement. + + tcpwrap support has been removed since v212, see commit + 7f8aa67131cfc03ddcbd31c0420754864fc122f0 + +------------------------------------------------------------------- +Tue Oct 18 14:52:00 UTC 2016 - fbui@suse.com + +- remove all dummy "aliases" to /etc/init.d (as it was already done by + factory more than 1 year ago). + + Even if a sysvinit script is still requiring one of those dummy + symlinks this should not be an issue since this is requirement is + translated into a weak dependency. + +------------------------------------------------------------------- +Tue Oct 18 13:20:58 UTC 2016 - fbui@suse.com + +- specfile: + + - do not own /usr/share/zsh directory + - do not own /etc/dbus-1 and /etc/dbus-1/system.d dirs + - do not own /usr/share/dbus-1 dir + +------------------------------------------------------------------- +Tue Oct 18 13:06:27 UTC 2016 - fbui@suse.com + +- specfile: %{_prefix}/lib/systemd/system-preset was mentioned twice + in %files section. + +------------------------------------------------------------------- +Tue Oct 18 09:30:37 UTC 2016 - fbui@suse.com + +- Specfile cleanup: + + - use curly braces with rpm macros + +------------------------------------------------------------------- +Tue Oct 18 09:15:17 UTC 2016 - fbui@suse.com + +- Specfile cleanup: + + - %ghost files doesn't need (anymore) to be created in %builroot + - do not own /etc/X11/xorg.conf.d and /etc/X11/xinit + +------------------------------------------------------------------- +Tue Oct 18 07:58:38 UTC 2016 - fbui@suse.com + +- Specfile cleanup: no need to protect the manpages with %bootstrap + condition in nss-myhostname package since the package itself is + already protected. + +------------------------------------------------------------------- +Tue Oct 18 07:51:30 UTC 2016 - fbui@suse.com + +- fix nss-resolve sub package: + + - add a %files section + - add a package description + - libnss_resolve.so.2 is now part of this subpackage + - add %post and %postun sections + +------------------------------------------------------------------- +Tue Oct 18 07:16:17 UTC 2016 - fbui@suse.com + +- Specfile cleanup: + + - reorganize some files in %files by types + - some config files were missing the "noreplace" attribute + +------------------------------------------------------------------- +Tue Oct 18 06:19:34 UTC 2016 - fbui@suse.com + +- Use %config(noreplace) for %{_sysconfdir}/pam.d/systemd-user + +------------------------------------------------------------------- +Tue Oct 18 05:57:28 UTC 2016 - fbui@suse.com + +- Rework systemd-gatewayd package: + + - some gateway's files were still in the main package + - it now includes all progs dealing with remote journals + - it can be turned off (SP2 does that currently) + - it's been renamed systemd-journal-remote to reflect that + +------------------------------------------------------------------- +Mon Oct 17 12:19:34 UTC 2016 - fbui@suse.com + +- Specfile cleanup: + + - only specify once %{_prefix}/lib/systemd/system-shutdown in %file + - no need to list the content of %{_prefix}/lib/systemd/user-generators in %file + - machined is not built when %bootstrap = 1 + +------------------------------------------------------------------- +Mon Oct 17 12:11:43 UTC 2016 - fbui@suse.com + +- Specfile cleanup: + + - There's no point in listing all generators in %file + explicitly. The default is to include all of them and if for some + reason one must be excluded then it should be done explicitly. + +------------------------------------------------------------------- +Mon Oct 17 11:44:57 UTC 2016 - fbui@suse.com + +- Specfile cleanup: + + - remove explicit call to make for building man pages. This is not + needed and was maybe useful when generated doc was pre-built and + shipped in the tarball. + +------------------------------------------------------------------- +Mon Oct 17 09:59:13 UTC 2016 - fbui@suse.com + +- Specfile cleanup: + + - break overly long and unreadable line using mkdir + - gather directory creations + +------------------------------------------------------------------- +Mon Oct 17 08:38:27 UTC 2016 - fbui@suse.com + +- Stop providing udevd.8 + + systemd-udevd has replaced udevd for some time already and usage of + udevd should be avoided. Therefore don't encourage this and stop + documenting it. + +------------------------------------------------------------------- +Mon Oct 17 07:36:10 UTC 2016 - fbui@suse.com + +- Import from factory: + + - Thu Feb 4 11:05:37 UTC 2016 - lnussel@suse.de + + - curl also causes building of journal-upload. That one has rather + unusal certificate usage, set it's ca root to /etc/pki/systemd + instead of the built-in default /etc/ssl as journal-remote and + journal-upload think they can put stuff in /etc/ssl/certs then + but that directory is managed by p11-kit and doesn't serve the + purpose those programs think. + +------------------------------------------------------------------- +Thu Oct 13 19:33:17 UTC 2016 - fbui@suse.com + +- Package rootsymlink-generator helper. It was forgotten when + switching to the git repo but re-added back. + + That said this thing should be removed as it's broken as soon as + there's no direct link between the root fs and its backend device + node (i.e. BTRFS). + +------------------------------------------------------------------- +Thu Oct 13 19:09:25 UTC 2016 - fbui@suse.com + +- Add kbd-model-map-extra file which contains the additional legacy + keymaps needed by yast. + + This was previously directly patched in the systemd source code. + +------------------------------------------------------------------- +Mon Oct 10 13:33:40 UTC 2016 - fbui@suse.com + +- Imported e251b8d7fb5c801fdfa3a023257ba0e4d514f3b0 + + - Re-add back /dev/root symlink generation (although this must be + deprecated and finally removed). + +------------------------------------------------------------------- +Fri Oct 7 14:18:10 UTC 2016 - fbui@suse.com + +- Migrating to the Suse Systemd git repo: + + Third step: + + - Re-enable networkd (disabled by default in SLE12) + +------------------------------------------------------------------- +Fri Oct 7 13:33:51 UTC 2016 - fbui@suse.com + +- Migrating to the Suse Systemd git repo: + + Second step: + + - Import the specfile + - Import the tarball generated from the git repo + - Import lastest changes for the different scripts + +------------------------------------------------------------------- +Fri Oct 7 08:58:38 UTC 2016 - fbui@suse.com + +- Migrating to the Suse Systemd git repo: + + First step: drop all patches and drop the tar ball. + ------------------------------------------------------------------- Fri Sep 30 06:07:06 UTC 2016 - fbui@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index c1c25587..72c9fc3e 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -16,28 +16,37 @@ # +# +# The git repository used to track all Suse specific changes can be +# found at: https://github.com/openSUSE/systemd. +# + ##### WARNING: please do not edit this auto generated spec file. Use the systemd.spec! ##### %define bootstrap 1 ##### WARNING: please do not edit this auto generated spec file. Use the systemd.spec! ##### %define mini -mini -%define real systemd -%define min_kernel_version 3.11 +%define min_kernel_version 4.5 -%bcond_without bash_completion -%bcond_without networkd +%bcond_with gnuefi +%if 0%{?bootstrap} +%bcond_with sysvcompat +%bcond_with machined +%bcond_with importd +%bcond_with networkd +%bcond_with journal_remote +%else %bcond_without sysvcompat +%bcond_without machined +%bcond_without importd +%bcond_without networkd +%bcond_without journal_remote +%ifarch %{ix86} x86_64 +%bcond_without gnuefi +%endif +%endif +%bcond_without compatlibs %bcond_with resolved %bcond_with parentpathid -%if 0%{?suse_version} > 1315 -%bcond_without permission -%bcond_without blkrrpart -%bcond_without udevsettle -%else -%bcond_with permission -%bcond_with blkrrpart -%bcond_with udevsettle -%endif -%bcond_with systemgrps Name: systemd-mini Url: http://www.freedesktop.org/wiki/Software/systemd @@ -47,99 +56,95 @@ Summary: A System and Session Manager License: LGPL-2.1+ Group: System/Base BuildRoot: %{_tmppath}/%{name}-%{version}-build - -Provides: %{real} = %{version}-%{release} - -BuildRequires: acl -BuildRequires: audit-devel -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: fdupes -BuildRequires: gperf -BuildRequires: intltool -BuildRequires: kbd -BuildRequires: libacl-devel -BuildRequires: libcap-devel -BuildRequires: libsepol-devel -BuildRequires: libtool -BuildRequires: pam-devel -BuildRequires: systemd-rpm-macros -BuildRequires: xz -BuildRequires: config(suse-module-tools) -BuildRequires: pkgconfig(blkid) >= 2.26 -BuildRequires: pkgconfig(libkmod) >= 15 -BuildRequires: pkgconfig(liblzma) -BuildRequires: pkgconfig(libpci) >= 3 -#XXX: change to 2.27.1 when pkgconfig file is fixed upstream -BuildRequires: pkgconfig(mount) >= 2.27 -%ifarch aarch64 %ix86 x86_64 x32 %arm ppc64le s390x -BuildRequires: pkgconfig(libseccomp) -%endif -BuildRequires: pkgconfig(libselinux) >= 2.1.9 -BuildRequires: pkgconfig(libsepol) -Conflicts: sysvinit -Conflicts: otherproviders(systemd) -%if 0%{?bootstrap} -#!BuildIgnore: dbus-1 -Requires: this-is-only-for-build-envs -Provides: systemd = %version-%release -Conflicts: kiwi -%else -%ifarch %{ix86} x86_64 -BuildRequires: gnu-efi -%endif +%if ! 0%{?bootstrap} +BuildRequires: -post-build-checks BuildRequires: docbook-xsl-stylesheets +BuildRequires: kbd +BuildRequires: libapparmor-devel BuildRequires: libgcrypt-devel BuildRequires: libxslt-tools -# curl and bzip2 are required for building importd -BuildRequires: libapparmor-devel -BuildRequires: pkgconfig(bzip2) -BuildRequires: pkgconfig(libcurl) # python is only required for generating systemd.directives.xml BuildRequires: python3 BuildRequires: python3-lxml BuildRequires: pkgconfig(libcryptsetup) >= 1.6.0 -BuildRequires: pkgconfig(libmicrohttpd) BuildRequires: pkgconfig(libqrencode) -BuildRequires: pkgconfig(usbutils) >= 0.82 +%endif +BuildRequires: fdupes +BuildRequires: gperf +BuildRequires: intltool +BuildRequires: libacl-devel +BuildRequires: libcap-devel +BuildRequires: libmount-devel +BuildRequires: libsepol-devel +BuildRequires: libtool +BuildRequires: pam-config >= 0.79-5 +BuildRequires: pam-devel +# regenerate_initrd_post macro is expanded during build, hence this +# BR. Also this macro was introduced since version 12.4. +BuildRequires: suse-module-tools >= 12.4 +BuildRequires: systemd-rpm-macros +BuildRequires: xz +BuildRequires: pkgconfig(blkid) >= 2.26 +BuildRequires: pkgconfig(libkmod) >= 15 +BuildRequires: pkgconfig(liblzma) +BuildRequires: pkgconfig(libpci) >= 3 +BuildRequires: pkgconfig(libpcre) +BuildRequires: pkgconfig(libselinux) >= 2.1.9 +BuildRequires: pkgconfig(libsepol) +%if %{with importd} +BuildRequires: pkgconfig(bzip2) +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(zlib) +%endif +%if %{with journal_remote} +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(libmicrohttpd) >= 0.9.33 +%endif +%ifarch aarch64 %ix86 x86_64 x32 %arm ppc64le s390x +BuildRequires: pkgconfig(libseccomp) +%endif +%if %{with gnuefi} +BuildRequires: gnu-efi +%endif + +%if 0%{?bootstrap} +#!BuildIgnore: dbus-1 +Requires: this-is-only-for-build-envs +Provides: systemd = %{version}-%{release} +%else # the buildignore is important for bootstrapping #!BuildIgnore: udev -Requires: udev = %{version}-%{release} -Recommends: %{name}-bash-completion Requires: dbus-1 >= 1.4.0 Requires: kbd Requires: kmod >= 15 -Requires: netcfg +Requires: netcfg >= 11.5 Requires: pam-config >= 0.79-5 -BuildRequires: pam-config >= 0.79-5 Requires: pwdutils Requires: systemd-presets-branding Requires: sysvinit-tools +Requires: udev = %{version}-%{release} Requires: util-linux >= 2.27.1 +Recommends: %{name}-bash-completion Requires(post): coreutils Requires(post): findutils +Requires(post): systemd-presets-branding Requires(post): pam-config >= 0.79-5 %endif -Requires(pre): /usr/bin/getent -Requires(pre): /usr/sbin/groupadd Requires(post): /usr/bin/awk -Requires(post): /usr/bin/getent -Requires(post): /usr/bin/setfacl + +%if 0%{?bootstrap} +Conflicts: systemd +Conflicts: kiwi +%endif +Conflicts: sysvinit Conflicts: filesystem < 11.5 Conflicts: mkinitrd < 2.7.0 -Conflicts: kernel < %{min_kernel_version} Obsoletes: systemd-analyze < 201 Provides: systemd-analyze = %{version} Obsoletes: pm-utils <= 1.4.1 Obsoletes: suspend <= 1.0 - -#Git-Clone: git://github.com/systemd/systemd -Source: https://github.com/systemd/systemd/archive/v%version.tar.gz -%if ! 0%{?bootstrap} -Source1: systemd-rpmlintrc -%else -Source1: systemd-mini-rpmlintrc -%endif +Source0: systemd-%{version}.tar.xz +Source1: %{name}-rpmlintrc Source3: systemd-sysv-convert Source6: baselibs.conf Source7: libgcrypt.m4 @@ -148,173 +153,9 @@ Source10: macros.systemd.upstream Source11: after-local.service Source12: systemd-sysv-install Source13: fix-machines-subvol-for-rollbacks.sh +Source14: kbd-model-map.legacy -Source1065: systemd-remount-tmpfs - -# handle SUSE specific kbd settings -Patch3: handle-disable_caplock-and-compose_table-and-kbd_rate.patch -Patch4: handle-numlock-value-in-etc-sysconfig-keyboard.patch -Patch6: insserv-generator.patch -Patch12: Fix-run-lock-directories-permissions-to-follow-openSUSE-po.patch -Patch16: fix-support-for-boot-prefixed-initscript-bnc-746506.patch -Patch17: restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch - -# PATCH-FIX-OPENSUSE ensure-ask-password-wall-starts-after-getty-tty1.patch -- don't start getty on tty1 until all password request are done -Patch5: ensure-ask-password-wall-starts-after-getty-tty1.patch -# PATCH-FIX-OPENSUSE handle-root_uses_lang-value-in-etc-sysconfig-language.patch bnc#792182 fcrozat@suse.com -- handle ROOT_USES_LANG=ctype -Patch20: handle-root_uses_lang-value-in-etc-sysconfig-language.patch -# PATCH-FIX-OPENSUSE allow-multiple-sulogin-to-be-started.patch bnc#793182 fcrozat@suse.com -- handle multiple sulogin -Patch21: allow-multiple-sulogin-to-be-started.patch -# PATCH-FIX-OPENSUSE apply-ACL-for-nvidia-device-nodes.patch bnc#808319 -- set ACL on nvidia devices -Patch27: apply-ACL-for-nvidia-device-nodes.patch -# PATCH-FIX-OPENSUSE apply-ACL-for-nvidia-uvm-device-node.patch bnc#879767 -- set ACL on nvidia-uvm device -Patch28: apply-ACL-for-nvidia-uvm-device-node.patch -Patch37: suse-sysv-bootd-support.diff -# PATCH-FIX-OPENSUSE systemd-tmp-safe-defaults.patch FATE#314974 max@suse.de -- Return to SUSE's "safe defaults" policy on deleting files from tmp direcorie. -Patch39: systemd-tmp-safe-defaults.patch -# PATCH-FIX-OPENSUSE ensure-shortname-is-set-as-hostname-bnc-820213.patch bnc#820213 fcrozat@suse.com -- Do not set anything beyond first dot as hostname -Patch41: ensure-shortname-is-set-as-hostname-bnc-820213.patch -Patch42: systemd-pam_config.patch - -# Upstream First - Policy: -# 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-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-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 -Patch91: plymouth-quit-and-wait-for-emergency-service.patch -# PATCH-FIX-SUSE 0001-avoid-abort-due-timeout-at-user-service.patch werner@suse.com -Patch120: 0001-avoid-abort-due-timeout-at-user-service.patch -# PATCH-FIX-OPENSUSE 0010-do-not-install-sulogin-unit-with-poweroff.patch -- Avoid installing console-shell.service (bnc#849071) -Patch178: 0010-do-not-install-sulogin-unit-with-poweroff.patch -# PATCH-FIX-SUSE 0001-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch -Patch179: 0001-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch -# PATCH-FIX-OPENSUSE 0014-journald-with-journaling-FS.patch -Patch180: 0014-journald-with-journaling-FS.patch -# PATCH-FIX-SUSE 0019-make-completion-smart-to-be-able-to-redirect.patch -Patch182: 0019-make-completion-smart-to-be-able-to-redirect.patch -# PATCH-FIX-SUSE 0001-add-network-device-after-NFS-mount-units.patch werner@suse.com -Patch183: 0001-add-network-device-after-NFS-mount-units.patch -# PATCH-FIX-SUSE systemctl-set-default-target.patch -Patch186: systemctl-set-default-target.patch -# PATCH-FIX-SUSE boot-local-start.patch (bnc #869142) -Patch188: boot-local-start.patch -# PATCH-FIX-SUSE avoid random hangs on timeouts due lost cwd at terminating user manager -Patch189: avoid-random-hangs-on-timeouts-due-lost-cwd.patch -# PATCH-FIX-SUSE systemd-install-compat_pkgconfig-always.patch -Patch190: systemd-install-compat_pkgconfig-always.patch -# PATCH-FIX-OPENSUSE systemd-dbus-system-bus-address.patch always use /run/dbus not /var/run -Patch191: systemd-dbus-system-bus-address.patch -# PATCH-FIX-SUSE During linkage of systemd-cryptsetup let linker find libudev for libdevmapper -Patch192: let-linker-find-libudev-for-libdevmapper.patch -# PATCH-FIX-SUSE Make sure that rpcbind socket as well as service is up with the target -Patch193: portmap-wants-rpcbind-socket.patch -# PATCH-FIX-SUSE Avoid that emergency and rescue sulogin are fighting on console -Patch197: rescue-emergency-target-conflicts.patch -# PATCH-FIX-SUSE Avoid a divide by zero sigtrap -Patch198: avoid-divide-by-zero-sigtrap.patch -# PATCH-FIX-SUSE System fails to boot if nfs mounts get added to fstab (bnc#874665) -Patch203: respect-nfs-bg-option.patch -# PATCH-FIX-SUSE Do not ignores option 'noauto' in /etc/crypttab (bnc#742774) -Patch208: parse-crypttab-for-noauto-option.patch -# PATCH-FIX-SUSE Do a vhangup on all consoles lines (bnc#886599) -Patch338: vhangup-on-all-consoles.patch -# PATCH-FIX-SUSE Shut up rpmlint warning -Patch345: shut-up-rpmlint-on-var-log-journal.patch -# PATCH-FIX-SUSE -Patch352: set-and-use-default-logconsole.patch -Patch362: tty-ask-password-agent-on-console.patch -# PATCH-FIX-SUSE Provide the /var/lock/subsys at start (bnc#889357) -Patch366: tomcat6-var-lock-subsys-legacy.patch -# PATCH-FIX-SUSE Remove error messages for tab completion for systemctl isolate (bnc#892162) -Patch368: 0001-let-systemctl-completion-ignore-at-names.patch -# PATCH-FIX-SUSE Use RNDADDENTROPY ioctl to load random-seed and to increase entropy count as well (bnc#892096) -Patch386: use-rndaddentropy-ioctl-to-load-random-seed.patch -# PATCH-FIX-SUSE AUDIT-0: Power button press at gdm login should not prompt for credentials (bnc#888612) -Patch430: 0001-bnc888612-logind-polkit-acpi.patch -# PATCH-FIX-SUSE added on 2014/10/24 -Patch475: journald-advice-about-use-of-memory.patch -# PATCH-FIX-SUSE added on 2014/11/05 -Patch490: watch_resolv.conf_for_become_changed.patch -# PATCH-FIX-SUSE systemd-add-user-keep.patch (bnc#903009) -Patch520: systemd-add-user-keep.patch -# PATCH-FIX-SUSE systemd-add-user-keep.patch (bnc#903009) -Patch521: kbd-model-map.patch -# PATCH-WORKAROUND-SUSE (boo#939571) -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 -# PATCH-FIX-UPSTREAM (bsc#966535) -Patch525: 0001-core-exclude-.slice-units-from-systemctl-isolate.patch -# PATCH-FIX-UPSTREAM -- fixed after 228 -Patch526: systemd-228-nspawn-make-journal-linking-non-fatal-in-try-and-auto.diff -# PATCH-FIX-UPSTREAM -- fixed after 228 -Patch527: 0001-core-fix-bus-name-synchronization-after-daemon-reloa.patch -# PATCH-FIX-UPSTREAM -- fixed after 228 -Patch528: 0001-core-re-sync-bus-name-list-after-deserializing-durin.patch -# PATCH-FIX-UPSTREAM -- fixed after 228 -Patch529: 0001-systemctl-pid1-do-not-warn-about-missing-install-inf.patch -# PATCH-FIX-UPSTREAM -- fixed after 320 -Patch530: systemd-230-cgroup2-use-new-fstype-for-unified-hierarchy.patch -# PATCH-FIX-UPSTREAM -- fixed after 231 -Patch531: 0001-rules-block-add-support-for-pmem-devices-3683.patch -Patch532: 0001-journal-set-STATE_ARCHIVED-as-part-of-offlining-2740.patch -Patch533: 0001-journal-warn-when-we-fail-to-append-a-tag-to-a-journ.patch -Patch534: 0001-journal-fix-HMAC-calculation-when-appending-a-data-o.patch -Patch535: 0001-If-the-notification-message-length-is-0-ignore-the-m.patch -Patch536: 0001-pid1-don-t-return-any-error-in-manager_dispatch_noti.patch -Patch537: 0001-pid1-process-zero-length-notification-messages-again.patch -Patch538: 0001-pid1-more-informative-error-message-for-ignored-noti.patch - -# UDEV PATCHES -# ============ -# NOTE: all udev patches start with 1XXX-*.patch, do not use anything else. -# Udev patches mean: patches that affect udev code, src/{udev,libudev} -# nothing else, even if the patch might affect indirectly udev, as long -# 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 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 -Patch1003: 1003-udev-netlink-null-rules.patch -# PATCH-FIX-OPENSUSE 1005-create-default-links-for-primary-cd_dvd-drive.patch -Patch1005: 1005-create-default-links-for-primary-cd_dvd-drive.patch -# PATCH-FIX-OPENSUSE 1006-udev-always-rename-network.patch -Patch1006: 1006-udev-always-rename-network.patch -# PATCH-FIX-OPENSUSE 1007-physical-hotplug-cpu-and-memory.patch -Patch1007: 1007-physical-hotplug-cpu-and-memory.patch -# PATCH-FIX-SUSE skip btrfs check if devices are not ready (bnc#872929) -Patch1011: 1011-64-btrfs.rules-skip-btrfs-check-if-devices-are-not-r.patch -# PATCH-FIX-SUSE skip persistent device link creation on mp device (bnc#872929) -Patch1012: 1012-Skip-persistent-device-link-creation-on-multipath-de.patch -# PATCH-FIX-SUSE 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch -Patch1035: 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch -# PATCH-FIX-SUSE See bnc#882714 comment #51 -Patch1037: 1037-udev-exclude-cd-dvd-from-block-device.patch -# PATCH-FIX-SUSE 1062-rules-set-default-permissions-for-GenWQE-devices.patch (bnc#890977) -Patch1062: 1062-rules-set-default-permissions-for-GenWQE-devices.patch -# PATCH-FIX-SUSE 1066-udev-add-compatibility-links-for-truncated-by-id-links.patch (bnc#886852) -Patch1066: 1066-udev-add-compatibility-links-for-truncated-by-id-links.patch -# PATCH-FIX-SUSE 1095-set-ssd-disk-to-use-deadline-scheduler.patch (bnc#904517) -Patch1095: 1095-set-ssd-disk-to-use-deadline-scheduler.patch -# PATCH-FIX-SUSE 1096-new-udev-root-symlink-generator.patch -Patch1096: 1096-new-udev-root-symlink-generator.patch -# PATCH-FIX-SUSE 1097-udevd-increase-maximum-number-of-children.patch -Patch1097: 1097-udevd-increase-maximum-number-of-children.patch -# PATCH-FIX-OPENSUSE 1098-systemd-networkd-alias-network-service.patch -Patch1098: 1098-systemd-networkd-alias-network-service.patch -# PATCH-FIX-OPENSUSE 1099-Add-default-rules-for-valve-steam-controller-to-work.patch -Patch1099: 1099-Add-default-rules-for-valve-steam-controller-to-work.patch -# PATCH-FIX-OPENSUSE hostname-NULL.patch - fix crash on xen build hosts in OBS Marcus Meissner -Patch1100: hostname-NULL.patch +Source1065: udev-remount-tmpfs %description Systemd is a system and service manager, compatible with SysV and LSB @@ -326,20 +167,6 @@ maintains mount and automount points and implements an elaborate transactional dependency-based service control logic. It can work as a drop-in replacement for sysvinit. - -%package bash-completion -Summary: Bash completion support for systemd -License: LGPL-2.1+ -Group: System/Base -Requires: bash -%if %{with bash_completion} -Requires: bash-completion -%endif -BuildArch: noarch - -%description bash-completion -Some systemd commands offer bash completion, but it's an optional dependency. - %package devel Summary: Development headers for systemd License: LGPL-2.1+ @@ -347,9 +174,8 @@ Group: Development/Libraries/C and C++ Requires: libsystemd0%{?mini} = %{version}-%{release} Requires: systemd-rpm-macros %if 0%{?bootstrap} -Provides: systemd-devel = %version-%release +Conflicts: systemd-devel %endif -Conflicts: otherproviders(systemd-devel) %description devel Development headers and auxiliary files for developing applications for systemd. @@ -401,27 +227,17 @@ Summary: A rule-based device node and kernel event manager License: GPL-2.0 Group: System/Kernel Url: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html -PreReq: /bin/rm -# Avoid bootstrap cycle with sg3_utils -%if "%{?mini}" == "" -PreReq: /usr/bin/sg_inq -%endif Requires(pre): /usr/bin/stat Requires(pre): /usr/sbin/groupadd Requires(pre): /usr/bin/getent -Requires(post): libudev%{?mini}1 Requires(post): sed Requires(post): /usr/bin/systemctl -%if %{defined regenerate_initrd_post} +Requires(postun): %insserv_prereq + Requires(post): coreutils -Requires(post): /usr/bin/stat Requires(postun): coreutils -Requires(posttrans): suse-module-tools -Requires(posttrans): /sbin/mkinitrd -%else -Requires(post): /sbin/mkinitrd -Requires(postun): /sbin/mkinitrd -%endif +Requires(posttrans): suse-module-tools >= 12.4 + Conflicts: systemd < 39 Conflicts: aaa_base < 11.5 Conflicts: filesystem < 11.5 @@ -430,10 +246,12 @@ Conflicts: util-linux < 2.16 Conflicts: ConsoleKit < 0.4.1 Requires: filesystem %if 0%{?bootstrap} -Provides: udev = %version-%release -Conflicts: kiwi +Provides: udev = %{version} +Conflicts: libudev1 +Conflicts: udev +# avoid kiwi picking it for bootstrap +Requires: this-is-only-for-build-envs %endif -Conflicts: otherproviders(udev) %description -n udev%{?mini} Udev creates and removes device nodes in /dev for devices discovered or @@ -442,15 +260,15 @@ and dispatches them according to rules in /lib/udev/rules.d/. Matching rules may name a device node, create additional symlinks to the node, call tools to initialize a device, or load needed kernel modules. - - %package -n libudev%{?mini}1 -# This really should have been libudev1%{?mini}, but requires changes to prjconf :-/ Summary: Dynamic library to access udev device information License: LGPL-2.1+ Group: System/Libraries %if 0%{?bootstrap} Conflicts: libudev1 +Conflicts: kiwi +# avoid kiwi picking it for bootstrap +Requires: this-is-only-for-build-envs %endif %description -n libudev%{?mini}1 @@ -460,12 +278,13 @@ access to udev device information %package -n libudev%{?mini}-devel Summary: Development files for libudev License: LGPL-2.1+ -Group: Development/Libraries/C and C++ -Requires: libudev%{?mini}1 = %version-%release +Group: Development/Libraries/Other +Requires: libudev%{?mini}1 = %{version}-%{release} %if 0%{?bootstrap} -Provides: libudev-devel = %version-%release +Provides: libudev-devel = %{version} +Conflicts: libudev1 = %{version} +Conflicts: libudev-devel %endif -Conflicts: otherproviders(libudev-devel) %description -n libudev%{?mini}-devel This package contains the development files for the library libudev, a @@ -478,17 +297,27 @@ License: LGPL-2.1+ Group: System/Base Provides: syslog Provides: sysvinit(syslog) -Requires(pre): /usr/bin/getent -Requires(pre): /usr/sbin/groupadd -Requires(post): /usr/bin/getent -Requires(post): /usr/bin/setfacl Requires(post): /usr/bin/systemctl -Requires(post): permissions Conflicts: otherproviders(syslog) %description logger This package marks the installation to not use syslog but only the journal. +%package -n nss-resolve +Summary: Plugin for local hostname resolution via systemd-resolved +License: LGPL-2.1+ +Group: System/Libraries +Requires: %{name} = %{version}-%{release} + +%description -n nss-resolve +nss-resolve is a plug-in module for the GNU Name Service Switch (NSS) +functionality of the GNU C Library (glibc) enabling it to resolve host +names via the systemd-resolved(8) service (provided by the systemd +package). + +It replaces the nss-dns plug-in module that traditionally resolves +hostnames via DNS. + %package -n nss-myhostname Summary: Plugin for local system host name resolution License: LGPL-2.1+ @@ -512,10 +341,32 @@ longer necessary. Note that nss-myhostname only provides a workaround for broken software. If nss-myhostname is trigged by an application a message -is logged to /var/log/messages. Please check whether that's worth +is logged to /var/log/messages. Please check whether that is worth a bug report then. This package marks the installation to not use syslog but only the journal. +%endif +%if %{with journal_remote} +%package journal-remote +Summary: Gateway for serving journal events over the network using HTTP +License: LGPL-2.1+ +Group: System/Base +Requires: %{name} = %{version}-%{release} +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + +%description journal-remote +This extends the journal functionality to keep a copy of logs on a +remote server by providing programs to forward journal entries over +the network, using encrypted HTTP, and to write journal files from +serialized journal contents. + +This package contains systemd-journal-gatewayd, +systemd-journal-remote, and systemd-journal-upload. +%endif + +%if %{with machined} %package -n nss-mymachines Summary: Plugin for local virtual host name resolution License: LGPL-2.1+ @@ -526,127 +377,29 @@ nss-myhostname is a plugin for the GNU Name Service Switch (NSS) functionality of the GNU C Library (glibc) providing host name resolution for the locally configured containers and virtual machines systemd-machined knows about. - -%package -n nss-resolve -Summary: Plugin for local hostname resolution via systemd-resolved -License: LGPL-2.1+ -Group: System/Libraries - -%description -n nss-resolve - -%package journal-gateway -Summary: Gateway for serving journal events over the network using HTTP -License: LGPL-2.1+ -Group: System/Base -Requires: %{name} = %{version}-%{release} -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd - -%description journal-gateway -systemd-journal-gatewayd serves journal events over the network using HTTP. %endif +%package bash-completion +Summary: Bash completion support for systemd +License: LGPL-2.1+ +Group: System/Base +Requires: bash-completion +BuildArch: noarch + +%description bash-completion +Some systemd commands offer bash completion, but it is an optional dependency. + %prep -%setup -q -n systemd-%version +%setup -q -n systemd-%{version} echo "Checking whether upstream rpm macros changed..." -diff -au "%{S:10}" src/core/macros.systemd.in +#skipped for now +#[ -z "`diff -Naru "%{S:10}" src/core/macros.systemd.in`" ] || exit 1 # only needed for bootstrap %if 0%{?bootstrap} cp %{SOURCE7} m4/ %endif -# systemd patches -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch12 -p1 -%patch16 -p1 -%patch17 -p1 -%patch20 -p1 -%patch21 -p1 -# check if this is still needed, or can be derived from fbdev uaccess rule -# http://lists.freedesktop.org/archives/systemd-devel/2012-November/007561.html -%patch27 -p1 -%patch28 -p1 -%patch37 -p1 -%patch39 -p1 -%patch41 -p1 -%patch42 -p1 -%patch84 -p1 -%patch86 -p1 -%patch90 -p1 -%patch91 -p1 -%patch120 -p1 -%patch178 -p1 -%patch179 -p1 -%patch180 -p1 -%patch182 -p1 -%patch183 -p1 -%patch186 -p1 -%patch188 -p1 -%patch189 -p1 -%patch190 -p1 -%patch191 -p1 -%patch192 -p1 -%patch193 -p1 -%patch197 -p1 -%patch198 -p1 -%patch203 -p1 -%patch208 -p1 -%patch338 -p1 -%patch345 -p1 -%patch352 -p1 -%patch362 -p1 -%patch366 -p1 -%patch368 -p1 -%patch386 -p1 -%patch430 -p1 -%patch475 -p1 -%patch490 -p1 -%patch520 -p1 -%patch521 -p1 -%patch522 -p1 -%patch523 -p1 -%patch524 -p1 -%patch525 -p1 -%patch526 -p1 -%patch527 -p1 -%patch528 -p1 -%patch529 -p1 -%patch530 -p1 -%patch531 -p1 -%patch532 -p1 -%patch533 -p1 -%patch534 -p1 -%patch535 -p1 -%patch536 -p1 -%patch537 -p1 -%patch538 -p1 - -# udev patches -%patch1002 -p1 -%patch1003 -p1 -%patch1005 -p1 -%patch1006 -p1 -%patch1007 -p1 -%patch1011 -p1 -%patch1012 -p1 -%patch1035 -p1 -%if %{with blkrrpart} -%patch1037 -p1 -%endif -%patch1062 -p1 -%patch1066 -p1 -%patch1095 -p1 -%patch1096 -p1 -%patch1097 -p1 -%patch1098 -p1 -%patch1099 -p1 -%patch1100 -p1 - # # In combination with Patch352 set-and-use-default-logconsole.patch # Ensure that journald log on tty10 @@ -657,59 +410,49 @@ sed -ri 's:#TTYPath=/dev/console:#TTYPath=/dev/tty10:' src/journal/journald.conf %build # -# Be sure that fresh build libudev is linked as otherwise no errors are found +# Be sure that fresh build libudev is found and used at linkage time # sed -ri '/^systemd_cryptsetup_CFLAGS/,/^systemd_cryptsetup_LDADD/{ /^$/a\ -systemd_cryptsetup_LDFLAGS = \\\ - $(AM_LDFLAGS) \\\ - -Wl,-rpath-link=$(top_srcdir)/.libs\ +systemd_cryptsetup_LDFLAGS =\\\ + $(AM_LDFLAGS)\\\ + -Wl,-rpath-link=$(top_srcdir)/.libs\ }' Makefile.am -sh autogen.sh -export CFLAGS="%{optflags}" -%if 0%{?suse_version} == 1315 - CFLAGS="$CFLAGS -DNET_IFNAMES=1" -%else - CFLAGS="$CFLAGS -DNET_IFNAMES=0" -%endif +./autogen.sh -# certificate-root is set to /etc/pki/systemd instead of the -# built-in default /etc/ssl as journal-remote and journal-upload -# think they kan put stuff in /etc/ssl/certs then but that -# directory is managed by p11-kit and doesn't serve the purpose -# those programs think -# # keep split-usr until all packages have moved their systemd rules to /usr %configure \ - --with-ntp-servers="0.opensuse.pool.ntp.org 1.opensuse.pool.ntp.org 2.opensuse.pool.ntp.org 3.opensuse.pool.ntp.org" \ --docdir=%{_docdir}/systemd \ --with-pamlibdir=/%{_lib}/security \ --with-dbuspolicydir=%{_sysconfdir}/dbus-1/system.d \ --with-dbussessionservicedir=%{_datadir}/dbus-1/services \ --with-dbussystemservicedir=%{_datadir}/dbus-1/system-services \ - --with-dbusinterfacedir=%{_datadir}/dbus-1/interfaces \ - --with-certificate-root=/etc/pki/systemd \ + --with-certificate-root=%{_sysconfdir}/pki/systemd \ %if 0%{?bootstrap} --disable-myhostname \ --disable-manpages \ - --disable-machined \ - --disable-importd \ -%else - --enable-manpages \ - --with-nss-my-hostname-warning \ +%endif +%if %{with compatlibs} + --enable-compat-libs \ %endif --enable-selinux \ --enable-split-usr \ --disable-static \ + --disable-tests \ --with-rc-local-script-path-start=/etc/init.d/boot.local \ --with-rc-local-script-path-stop=/etc/init.d/halt.local \ --with-debug-shell=/bin/bash \ --disable-smack \ --disable-ima \ + --disable-adm-group \ + --disable-wheel-group \ %if %{without networkd} --disable-networkd \ %endif +%if %{without machined} + --disable-machined \ +%endif %if %{without sysvcompat} --with-sysvinit-path= \ --with-sysvrcnd-path= \ @@ -719,42 +462,35 @@ export CFLAGS="%{optflags}" %endif --disable-kdbus -%make_build V=e -%if ! 0%{?bootstrap} -%make_build V=e update-man-list man -%endif +make %{?_smp_mflags} V=e %install %make_install -install -pm0755 "%_sourcedir/systemd-sysv-install" "%buildroot/%_prefix/lib/systemd/" # move to %{_lib} %if ! 0%{?bootstrap} mv %{buildroot}%{_libdir}/libnss_myhostname.so.2 %{buildroot}/%{_lib} +install -D -m 755 %{S:9} %{buildroot}%{_sbindir}/nss-myhostname-config %endif +# FIXME: these symlinks should die. mkdir -p %{buildroot}/{sbin,lib,bin} ln -sf %{_bindir}/udevadm %{buildroot}/sbin/udevadm ln -sf %{_bindir}/systemd-ask-password %{buildroot}/bin/systemd-ask-password ln -sf %{_bindir}/systemctl %{buildroot}/bin/systemctl ln -sf %{_prefix}/lib/systemd/systemd-udevd %{buildroot}/sbin/udevd -%if ! 0%{?bootstrap} -ln -sf systemd-udevd.8 %{buildroot}/%{_mandir}/man8/udevd.8 -%endif - -%if ! 0%{?bootstrap} -install -D -m 755 %{S:9} %{buildroot}%{_sbindir}/nss-myhostname-config -%endif - -ln -s systemd-udevd.service %{buildroot}/%{_prefix}/lib/systemd/system/udev.service install -m755 -D %{S:1065} %{buildroot}/%{_prefix}/lib/udev/remount-tmpfs -mkdir -p %{buildroot}/%{_prefix}/lib/systemd/system/basic.target.wants rm -rf %{buildroot}%{_sysconfdir}/rpm find %{buildroot} -type f -name '*.la' -delete -mkdir -p %{buildroot}/{sbin,var/lib/systemd/sysv-convert,var/lib/systemd/migrated} %{buildroot}/usr/lib/systemd/{system-generators,user-generators,system-preset,user-preset,system/halt.target.wants,system/kexec.target.wants,system/poweroff.target.wants,system/reboot.target.wants,system/shutdown.target.wants} -install -m755 %{S:3} -D %{buildroot}%{_sbindir}/systemd-sysv-convert +mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/sysv-convert +mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/migrated + +install -m0755 -D %{S:3} %{buildroot}/%{_sbindir}/systemd-sysv-convert +install -m0755 -D %{S:12} %{buildroot}/%{_prefix}/lib/systemd/systemd-sysv-install +install -m0755 %{S:13} %{buildroot}/%{_prefix}/lib/systemd/ + ln -s ../usr/lib/systemd/systemd %{buildroot}/bin/systemd ln -s ../usr/lib/systemd/systemd %{buildroot}/sbin/init ln -s ../usr/bin/systemctl %{buildroot}/sbin/reboot @@ -775,13 +511,18 @@ cp %{buildroot}/%{_prefix}/lib/systemd/system/tmp.mount %{buildroot}/%{_datadir} # 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 -# create %{_libexecdir}/modules-load.d +# create %%{_libexecdir}/modules-load.d mkdir -p %{buildroot}%{_libexecdir}/modules-load.d cat << EOF > %{buildroot}%{_libexecdir}/modules-load.d/sg.conf # load sg module at boot time sg EOF +# To avoid making life hard for Factory developers, don't package the +# kernel.core_pattern setting until systemd-coredump is a part of an actual +# systemd release and it's made clear how to get the core dumps out of the +# journal. + # do not ship sysctl defaults in systemd package, will be part of # aaa_base (in procps for now) rm -f %{buildroot}%{_prefix}/lib/sysctl.d/50-default.conf @@ -790,7 +531,14 @@ rm -f %{buildroot}%{_prefix}/lib/sysctl.d/50-default.conf rm -f %{buildroot}/etc/init.d/README %if 0%{?bootstrap} rm -f %{buildroot}%{_localstatedir}/log/README -rm -rf %{buildroot}%{_datadir}/bash-completion +%endif + +# journal-upload is built if libcurl is installed which can happen +# when importd is enabled (whereas journal_remote is not). +%if ! %{with journal_remote} +rm -f %{buildroot}%{_sysconfdir}/systemd/journal-upload.conf +rm -f %{buildroot}%{_prefix}/lib/systemd/systemd-journal-upload +rm -f %{buildroot}%{_prefix}/lib/systemd/system/systemd-journal-upload.* %endif # legacy links @@ -802,13 +550,19 @@ for f in loginctl journalctl ; do done ln -s /usr/lib/udev %{buildroot}/lib/udev -# Create the /var/log/journal directory to change the volatile journal to a persistent one +# Create the /var/log/journal directory to change the volatile journal +# to a persistent one mkdir -p %{buildroot}%{_localstatedir}/log/journal/ +# This dir must be owned (and thus created) by systemd otherwise the +# build system will complain. This is odd since we simply own a ghost +# file in it... +mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d + # Make sure directories in /var exist mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/coredump mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/catalog -#create ghost databases +# Create ghost databases touch %{buildroot}%{_localstatedir}/lib/systemd/catalog/database touch %{buildroot}%{_sysconfdir}/udev/hwdb.bin @@ -820,8 +574,20 @@ mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-shutdown/ mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-sleep/ # Make sure these directories are properly owned +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/basic.target.wants mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/default.target.wants mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/dbus.target.wants +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/halt.target.wants +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/kexec.target.wants +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/poweroff.target.wants +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/reboot.target.wants +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/shutdown.target.wants + +# Make sure the generator directories are created and properly owned. +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-generators +mkdir -p %{buildroot}%{_prefix}/lib/systemd/user-generators +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-preset +mkdir -p %{buildroot}%{_prefix}/lib/systemd/user-preset # create drop-in to prevent tty1 to be cleared (bnc#804158) mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/getty@tty1.service.d/ @@ -831,18 +597,12 @@ cat << EOF > %{buildroot}%{_prefix}/lib/systemd/system/getty@tty1.service.d/nocl TTYVTDisallocate=no EOF -#ensure we get the running kernel sysctl settings. - -cat << EOF > %{buildroot}%{_prefix}/lib/tmpfiles.d/current-kernel-sysctl.conf -d! /run/sysctl.d -L! /run/sysctl.d/00-kernel-%v.conf - - - - /boot/sysctl.conf-%v -EOF - -mkdir -p %{buildroot}/%{_prefix}/lib/systemd/system/systemd-sysctl.service.d - -cat << EOF > %{buildroot}/%{_prefix}/lib/systemd/system/systemd-sysctl.service.d/after.conf -[Unit] -After=local-fs.target +# create drop-in to prevent delegate=yes for root user (bsc#954765, +# bnc#953241, fate#320421) +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/user@0.service.d/ +cat >%{buildroot}%{_prefix}/lib/systemd/system/user@0.service.d/nodelagate.conf < %{buildroot}%{_localstatedir}/lib/systemd/random-seed - -# On systems supporting rollbacks with btrfs, /var/lib/machines -# subvolume must be created differently. Normally the installer takes -# care of this now but some systems uses a plain subvolume that breaks -# snapshots, rollback ("nearly everything" see bsc#992573). This -# script should help fixing it. -install -m 755 %{S:13} %{buildroot}/%{_prefix}/lib/systemd/ +mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/random-seed %fdupes -s %{buildroot}%{_mandir} -%if ! 0%{?bootstrap} -for f in %{buildroot}%{_datadir}/bash-completion/completions/* -do - test -e "$f" || break - grep -q _init_completion "$f" || continue - echo "%exclude %{_datadir}/bash-completion/completions/${f##*/}" -done > files.completion -%else -> files.completion -%endif - # packaged in systemd-rpm-macros rm -f %{buildroot}/%{_prefix}/lib/rpm/macros.d/macros.systemd -%if %{without compat_libs} -lib=%{_libdir}/libsystemd.so -for lnk in daemon login id128 journal -do - lnk=%{buildroot}%{_libdir}/libsystemd-${lnk}.so - echo '/* GNU ld script */' > ${lnk} - echo 'INPUT('${lib}')' >> ${lnk} -done -%endif - -# Some files which may created by us or by the admin later on -mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d -for ghost in X11/xorg.conf.d/00-keyboard.conf vconsole.conf locale.conf \ - machine-id machine-info \ - systemd/system/runlevel2.target \ - systemd/system/runlevel3.target \ - systemd/system/runlevel4.target \ - systemd/system/runlevel4.target \ - systemd/system/runlevel5.target -do - > %{buildroot}%{_sysconfdir}/$ghost -done +# Make sure to disable all services by default. The Suse branding +# presets package takes care of defining the right policies. +rm -f %{buildroot}%{_prefix}/lib/systemd/system-preset/*.preset +echo 'disable *' >%{buildroot}%{_prefix}/lib/systemd/system-preset/99-default.preset # Workaround for bug #882393 for runlevel in poweroff rescue multi-user graphical reboot @@ -905,86 +629,72 @@ do ln -sf ../systemd-update-utmp-runlevel.service %{buildroot}%{_prefix}/lib/systemd/system/${runlevel}.target.wants/ 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 +# Add entries for xkeyboard-config converted keymaps; mappings, which +# already exist in original systemd mapping table are being ignored +# though, i.e. not overwritten; needed as long as YaST uses console +# keymaps internally and calls localectl to convert from vconsole to +# X11 keymaps. Ideally YaST should switch to X11 layout names (the +# mapping table wouldn't be needed since each X11 keymap has a +# generated xkbd keymap) and let localectl initialize +# /etc/vconsole.conf and /etc/X11/xorg.conf.d/00-keyboard.conf +# (FATE#319454). 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" + cat /usr/share/systemd/kbd-model-map.xkb-generated \ + >>%{buildroot}%{_datarootdir}/systemd/kbd-model-map fi +# kbd-model-map.legacy is used to provide mapping for legacy keymaps, +# which may still be used by yast. +cat %{S:13} >>%{buildroot}%{_datarootdir}/systemd/kbd-model-map + %find_lang systemd %pre -for name in journal timesync network resolve bus-proxy -do - getent group systemd-$name >/dev/null && continue - groupadd -r systemd-$name || : -done -for name in adm input tape -do - getent group $name >/dev/null && continue - groupadd -r $name || : -done -for name in timesync network resolve bus-proxy -do - getent passwd systemd-$name >/dev/null && continue - case "$name" in - timesync) descr="Systemd Time Synchronization" ;; - network) descr="Systemd Network Management" ;; - resolve) descr="Systemd Resolver" ;; - bus-proxy) descr="Systemd Bus Proxy" ;; - esac - useradd -r -l -g systemd-$name systemd-$name -s /usr/sbin/nologin -d / -c "$descr" || : -done +# Build of installation images uses an hard coded list of some +# packages with a %pre that needs to be run during the +# build. Unfortunately, systemd in one of them. To make thing simpler +# we use a %pre section even if it is not needed. exit 0 %post +%sysusers_create /usr/lib/sysusers.d/systemd.conf %if ! 0%{?bootstrap} -/usr/sbin/pam-config -a --systemd || : +pam-config -a --systemd || : %endif -/sbin/ldconfig -[ -e %{_localstatedir}/lib/random-seed ] && mv %{_localstatedir}/lib/random-seed %{_localstatedir}/lib/systemd/ > /dev/null || : -/usr/bin/systemd-machine-id-setup || : +ldconfig +[ -e %{_localstatedir}/lib/random-seed ] && mv %{_localstatedir}/lib/random-seed %{_localstatedir}/lib/systemd/ || : +systemd-machine-id-setup || : /usr/lib/systemd/systemd-random-seed save || : -/usr/bin/systemctl daemon-reexec || : -/usr/bin/journalctl --update-catalog || : -# Make sure new journal files -chgrp systemd-journal %{_localstatedir}/log/journal/ || : -chmod g+s %{_localstatedir}/log/journal/ || : -if read ID < /etc/machine-id > /dev/null 2>&1 ; then - chgrp systemd-journal "%{_localstatedir}/log/journal/$ID" || : - chmod g+s "%{_localstatedir}/log/journal/$ID" || : -fi -%if %{with systemgrps} -getent group wheel && setfacl -Rnm g:wheel:rx,d:g:wheel:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : -getent group adm && setfacl -Rnm g:adm:rx,d:g:adm:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : -%endif -systemd-sysusers || : +systemctl daemon-reexec || : +%journal_catalog_update +%tmpfiles_create # Try to read default runlevel from the old inittab if it exists if [ ! -e /etc/systemd/system/default.target -a -e /etc/inittab ]; then - runlevel=$(awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null) + runlevel=$(awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab) if [ -n "$runlevel" ] ; then - /bin/ln -sf /usr/lib/systemd/system/runlevel$runlevel.target /etc/systemd/system/default.target 2>&1 || : + ln -sf /usr/lib/systemd/system/runlevel$runlevel.target /etc/systemd/system/default.target || : fi 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. - # 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 +if [ $1 -eq 1 ]; then + # Enable systemd services according to the distro defaults. + # Note: systemctl might abort prematurely if it fails on one + # unit. + systemctl preset remote-fs.target || : + systemctl preset getty@.service || : + systemctl preset systemd-networkd.service || : + systemctl preset systemd-networkd-wait-online.service || : + systemctl preset systemd-timesyncd.service || : + systemctl preset systemd-resolved.service || : +fi >/dev/null # since v207 /etc/sysctl.conf is no longer parsed, however # backward compatibility is provided by /etc/sysctl.d/99-sysctl.conf if [ ! -L /etc/sysctl.d/99-sysctl.conf -a -e /etc/sysctl.conf ]; then - /bin/ln -sf /etc/sysctl.conf /etc/sysctl.d/99-sysctl.conf || : + ln -sf /etc/sysctl.conf /etc/sysctl.d/99-sysctl.conf || : fi # migrate any symlink which may refer to the old path @@ -998,7 +708,7 @@ done # 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 +case $(systemctl is-enabled tmp.mount 2>/dev/null) in enabled) ;; *) rm -f %{_prefix}/lib/systemd/system/tmp.mount esac @@ -1006,38 +716,54 @@ esac # Convert /var/lib/machines subvolume to make it suitable for # rollbacks, if needed. See bsc#992573. The installer has been fixed # to create it at installation time. +# +# The convertion might only be problematic for openSUSE distros +# (TW/Factory) where previous versions had already created the +# subvolume at the wrong place (via tmpfiles for example) and user +# started to populate and use it. In this case we'll let the user fix +# it manually. +# +# For SLE12 this subvolume was only introduced during the upgrade from +# v210 to v228 when we added this workaround. Note that the subvolume +# is still created at the wrong place due to the call to +# tmpfiles_create macro previously however it's empty so there +# shouldn't be any issues. if [ $1 -gt 1 ]; then - %{_prefix}/lib/systemd/fix-machines-subvol-for-rollbacks.sh || : + %{_prefix}/lib/systemd/fix-machines-subvol-for-rollbacks.sh || : fi %postun -/sbin/ldconfig +ldconfig if [ $1 -ge 1 ]; then - /usr/bin/systemctl daemon-reload || : - #Avoid restarting logind [bnc#934901] until fixed upstream - #/usr/bin/systemctl try-restart systemd-logind.service || : + systemctl daemon-reload || : + # Avoid restarting logind [bnc#934901] until fixed upstream + #systemctl try-restart systemd-logind.service >/dev/null 2>&1 || : fi %if ! 0%{?bootstrap} if [ $1 -eq 0 ]; then - /usr/sbin/pam-config -d --systemd || : + pam-config -d --systemd || : fi %endif %preun if [ $1 -eq 0 ]; then - /usr/bin/systemctl disable \ - getty@.service \ - remote-fs.target || : - rm -f /etc/systemd/system/default.target 2>&1 || : -fi + systemctl disable remote-fs.target || : + systemctl disable getty@.service || : + systemctl disable systemd-networkd.service || : + systemctl disable systemd-networkd-wait-online.service || : + systemctl disable systemd-timesyncd.service || : + systemctl disable systemd-resolved.service || : + + rm -f /etc/systemd/system/default.target +fi >/dev/null -# pretrans section must always use lua %pretrans -n udev%{?mini} -p if posix.stat("/lib/udev") and not posix.stat("/usr/lib/udev") then posix.symlink("/lib/udev", "/usr/lib/udev") end %pre -n udev%{?mini} + %regenerate_initrd_post if test -L /usr/lib/udev -a /lib/udev -ef /usr/lib/udev ; then rm /usr/lib/udev mv /lib/udev /usr/lib @@ -1045,135 +771,94 @@ if test -L /usr/lib/udev -a /lib/udev -ef /usr/lib/udev ; then elif [ ! -e /lib/udev ]; then ln -s /usr/lib/udev /lib/udev fi -# Create "tape" group which is referenced by 50-udev-default.rules and 60-persistent-storage-tape.rules + +# Create "tape"/"input" group which is referenced by some udev rules +# that we're shipping. FIXME: maybe we should consider using +# "sysusers_create basic.conf" instead ? getent group tape >/dev/null || groupadd -r tape || : -# kill daemon if we are not in a chroot -if test -f /proc/1/exe -a -d /proc/1/root ; then - if test "$(stat -Lc '%%D-%%i' /)" = "$(stat -Lc '%%D-%%i' /proc/1/root)"; then - systemctl stop systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udevd.service udev.service udev-control.socket udev-kernel.socket || : - udevadm control --exit || : - fi -fi +getent group input >/dev/null || groupadd -r input || : %post -n udev%{?mini} -/usr/bin/udevadm hwdb --update || : -if [ -f /etc/udev/rules.d/70-persistent-net.rules ]; then - # add KERNEL name match to existing persistent net rules - sed -ri '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \ - /etc/udev/rules.d/70-persistent-net.rules || : -fi +%udev_hwdb_update + +# add KERNEL name match to existing persistent net rules +sed -ri '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \ + /etc/udev/rules.d/70-persistent-net.rules 2>/dev/null || : + # cleanup old stuff rm -f /etc/sysconfig/udev -rm -f /etc/udev/rules.d/20-cdrom.rules -rm -f /etc/udev/rules.d/55-cdrom.rules -rm -f /etc/udev/rules.d/65-cdrom.rules -systemctl daemon-reload || : -# start daemon if we are not in a chroot -if test -f /proc/1/exe -a -d /proc/1/root; then - if test "$(stat -Lc '%%D-%%i' /)" = "$(stat -Lc '%%D-%%i' /proc/1/root)"; then - if ! systemctl start systemd-udevd.service; then - /usr/lib/systemd/systemd-udevd --daemon || : - fi - fi -fi - -if [ "${YAST_IS_RUNNING}" != "instsys" ]; then - if [ -e %{_localstatedir}/lib/no_initrd_recreation_by_suspend ]; then - echo "Skipping recreation of existing initial ramdisks, due" - echo "to presence of %{_localstatedir}/lib/no_initrd_recreation_by_suspend" -%if %{defined regenerate_initrd_post} - else - %regenerate_initrd_post -%else - elif [ -x /sbin/mkinitrd ]; then - [ -x /sbin/mkinitrd_setup ] && /sbin/mkinitrd_setup - /sbin/mkinitrd || : -%endif - fi -fi +rm -f /etc/udev/rules.d/{20,55,65}-cdrom.rules %postun -n udev%{?mini} - +%regenerate_initrd_post +%insserv_cleanup systemctl daemon-reload || : +%systemd_postun_with_restart systemd-udevd-{control,kernel}.socket systemd-udevd.service -if [ "${YAST_IS_RUNNING}" != "instsys" ]; then - if [ -e %{_localstatedir}/lib/no_initrd_recreation_by_suspend ]; then - echo "Skipping recreation of existing initial ramdisks, due" - echo "to presence of %{_localstatedir}/lib/no_initrd_recreation_by_suspend" -%if %{defined regenerate_initrd_post} - else - %regenerate_initrd_post -%else - elif [ -x /sbin/mkinitrd ]; then - [ -x /sbin/mkinitrd_setup ] && /sbin/mkinitrd_setup - /sbin/mkinitrd || : -%endif - fi -fi - -%if %{defined regenerate_initrd_post} %posttrans -n udev%{?mini} %regenerate_initrd_posttrans -%endif -%post -n libsystemd0%{?mini} -p /sbin/ldconfig -%postun -n libsystemd0%{?mini} -p /sbin/ldconfig -%post -n libudev%{?mini}1 -p /sbin/ldconfig +%post -n libudev%{?mini}1 -p /sbin/ldconfig +%post -n libsystemd0%{?mini} -p /sbin/ldconfig + %postun -n libudev%{?mini}1 -p /sbin/ldconfig +%postun -n libsystemd0%{?mini} -p /sbin/ldconfig %if ! 0%{?bootstrap} - -%if %{with permission} -%verifyscript logger -%verify_permissions -e %{_localstatedir}/log/journal/ -%endif - -%pre logger -getent group systemd-journal >/dev/null || groupadd -r systemd-journal || : -exit 0 - %post logger -%if %{with permission} -%set_permissions %{_localstatedir}/log/journal/ -%endif -%if %{with systemgrps} -getent group wheel && setfacl -Rnm g:wheel:rx,d:g:wheel:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : -getent group adm && setfacl -Rnm g:adm:rx,d:g:adm:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : -%endif +systemd-tmpfiles --create --prefix=%{_localstatedir}/log/journal/ || : if [ "$1" -eq 1 ]; then # tell journal to start logging on disk if directory didn't exist before - systemctl --no-block restart systemd-journal-flush.service || : + systemctl --no-block restart systemd-journal-flush.service >/dev/null || : fi +%endif +%if ! 0%{?bootstrap} %preun -n nss-myhostname if [ "$1" -eq 0 -a -f /etc/nsswitch.conf ] ; then %{_sbindir}/nss-myhostname-config --disable fi %post -n nss-myhostname -p /sbin/ldconfig - %postun -n nss-myhostname -p /sbin/ldconfig +%endif +%if %{with resolved} +%post -n nss-resolve -p /sbin/ldconfig +%postun -n nss-resolve -p /sbin/ldconfig +%endif + +%if %{with machined} %post -n nss-mymachines -p /sbin/ldconfig %postun -n nss-mymachines -p /sbin/ldconfig - -%pre journal-gateway -getent passwd systemd-journal-gateway >/dev/null || useradd -r -l -g systemd-journal-gateway -d %{_localstatedir}/log/journal/ -s /usr/sbin/nologin -c "Systemd Journal Gateway" systemd-journal-gateway || : -getent group systemd-journal-gateway >/dev/null || groupadd -r systemd-journal-gateway || : -%service_add_pre systemd-journal-gatewayd.socket systemd-journal-gatewayd.service -exit 0 - -%post journal-gateway -%service_add_post systemd-journal-gatewayd.socket systemd-journal-gatewayd.service - -%preun journal-gateway -%service_del_preun systemd-journal-gatewayd.socket systemd-journal-gatewayd.service - -%postun journal-gateway -%service_del_postun systemd-journal-gatewayd.socket systemd-journal-gatewayd.service - %endif +%if %{with journal_remote} +%pre journal-remote +%service_add_pre systemd-journal-gatewayd.socket systemd-journal-gatewayd.service +%service_add_pre systemd-journal-remote.socket systemd-journal-remote.service +%service_add_pre systemd-journal-upload.service + +%post journal-remote +%sysusers_create %{_libexecdir}/sysusers.d/systemd-remote.conf +%tmpfiles_create %{_libexecdir}/tmpfiles.d/systemd-remote.conf +%service_add_post systemd-journal-gatewayd.socket systemd-journal-gatewayd.service +%service_add_post systemd-journal-remote.socket systemd-journal-remote.service +%service_add_post systemd-journal-upload.service + +%preun journal-remote +%service_del_preun systemd-journal-gatewayd.socket systemd-journal-gatewayd.service +%service_del_preun systemd-journal-remote.socket systemd-journal-remote.service +%service_del_preun systemd-journal-upload.service + +%postun journal-remote +%service_del_postun systemd-journal-gatewayd.socket systemd-journal-gatewayd.service +%service_del_postun systemd-journal-remote.socket systemd-journal-remote.service +%service_del_postun systemd-journal-upload.service +%endif + +%clean + %files -f systemd.lang %defattr(-,root,root) /bin/systemd @@ -1187,7 +872,7 @@ exit 0 %{_bindir}/kernel-install %{_bindir}/hostnamectl %{_bindir}/localectl -%if ! 0%{?bootstrap} +%if %{with machined} %{_bindir}/machinectl %endif %{_bindir}/systemctl @@ -1224,16 +909,17 @@ exit 0 %dir %{_prefix}/lib/systemd %dir %{_prefix}/lib/systemd/user %dir %{_prefix}/lib/systemd/system +%exclude %{_prefix}/lib/systemd/systemd-journal-gatewayd +%exclude %{_prefix}/lib/systemd/systemd-journal-remote +%exclude %{_prefix}/lib/systemd/systemd-journal-upload %exclude %{_prefix}/lib/systemd/systemd-sysv* -%exclude %{_prefix}/lib/systemd/system/systemd-udev*.* -%exclude %{_prefix}/lib/systemd/system/udev.service -%exclude %{_prefix}/lib/systemd/system/initrd-udevadm-cleanup-db.service -%exclude %{_prefix}/lib/systemd/system/systemd-udev-root-symlink.service -%exclude %{_prefix}/lib/systemd/system/*.target.wants/systemd-udev*.* -%exclude %{_prefix}/lib/systemd/system/sysinit.target.wants/systemd-udev-root-symlink.service -%if ! 0%{?bootstrap} +%exclude %{_prefix}/lib/systemd/systemd-udevd %exclude %{_prefix}/lib/systemd/system/systemd-journal-gatewayd.* -%endif +%exclude %{_prefix}/lib/systemd/system/systemd-journal-remote.* +%exclude %{_prefix}/lib/systemd/system/systemd-journal-upload.* +%exclude %{_prefix}/lib/systemd/system/systemd-udev*.* +%exclude %{_prefix}/lib/systemd/system/*.target.wants/systemd-udev*.* +%exclude %{_prefix}/lib/systemd/system/initrd-udevadm-cleanup-db.service %{_prefix}/lib/systemd/system/*.automount %{_prefix}/lib/systemd/system/*.service %{_prefix}/lib/systemd/system/*.slice @@ -1246,67 +932,47 @@ exit 0 %{_prefix}/lib/systemd/user/*.target %{_prefix}/lib/systemd/user/*.service %{_prefix}/lib/systemd/user/*.socket -%exclude %{_prefix}/lib/systemd/systemd-udevd -%if ! 0%{?bootstrap} -%exclude %{_prefix}/lib/systemd/systemd-journal-gatewayd -%endif %{_prefix}/lib/systemd/systemd-* %{_prefix}/lib/systemd/systemd %{_prefix}/lib/systemd/fix-machines-subvol-for-rollbacks.sh %dir %{_prefix}/lib/systemd/catalog %{_prefix}/lib/systemd/catalog/systemd.catalog %{_prefix}/lib/systemd/catalog/systemd.*.catalog -%dir %{_prefix}/lib/systemd/system-shutdown -%dir %{_prefix}/lib/systemd/system-preset -%dir %{_prefix}/lib/systemd/user-preset -%dir %{_prefix}/lib/systemd/system-generators -%dir %{_prefix}/lib/systemd/user-generators -%{_prefix}/lib/systemd/user-generators/systemd-dbus1-generator +%{_prefix}/lib/systemd/system-preset +%{_prefix}/lib/systemd/user-preset +%{_prefix}/lib/systemd/system-generators +%{_prefix}/lib/systemd/user-generators %dir %{_prefix}/lib/systemd/ntp-units.d/ %dir %{_prefix}/lib/systemd/system-shutdown/ %dir %{_prefix}/lib/systemd/system-sleep/ %dir %{_prefix}/lib/systemd/system/default.target.wants %dir %{_prefix}/lib/systemd/system/dbus.target.wants %dir %{_prefix}/lib/systemd/system/getty@tty1.service.d +%dir %{_prefix}/lib/systemd/system/user@0.service.d %{_prefix}/lib/systemd/system/getty@tty1.service.d/noclear.conf -%dir %{_prefix}/lib/systemd/system/systemd-sysctl.service.d -%{_prefix}/lib/systemd/system/systemd-sysctl.service.d/after.conf -%if ! 0%{?bootstrap} -%{_prefix}/lib/systemd/system-generators/systemd-cryptsetup-generator +%{_prefix}/lib/systemd/system/user@0.service.d/nodelagate.conf +%if %{with importd} +%{_prefix}/lib/systemd/import-pubring.gpg %endif -%{_prefix}/lib/systemd/system-generators/systemd-dbus1-generator -%{_prefix}/lib/systemd/system-generators/systemd-debug-generator -%{_prefix}/lib/systemd/system-generators/systemd-hibernate-resume-generator -%if %{with sysvcompat} -%{_prefix}/lib/systemd/system-generators/systemd-sysv-generator -%{_prefix}/lib/systemd/system-generators/systemd-rc-local-generator -%{_prefix}/lib/systemd/system-generators/systemd-insserv-generator -%endif -%{_prefix}/lib/systemd/system-generators/systemd-getty-generator -%{_prefix}/lib/systemd/system-generators/systemd-fstab-generator -%{_prefix}/lib/systemd/system-generators/systemd-system-update-generator -%{_prefix}/lib/systemd/system-generators/systemd-gpt-auto-generator -%{_prefix}/lib/systemd/system-preset/ -%{_prefix}/lib/sysusers.d/ /%{_lib}/security/pam_systemd.so -%config /etc/pam.d/systemd-user -%if ! 0%{?bootstrap} -%ifarch %{ix86} x86_64 +%if %{with gnuefi} %dir %{_prefix}/lib/systemd/boot %dir %{_prefix}/lib/systemd/boot/efi %{_prefix}/lib/systemd/boot/efi/*.efi %{_prefix}/lib/systemd/boot/efi/*.stub %endif -%endif %dir %{_libexecdir}/modules-load.d %dir %{_sysconfdir}/modules-load.d %{_libexecdir}/modules-load.d/sg.conf -%dir %{_libexecdir}/tmpfiles.d +%{_libexecdir}/sysusers.d/ +%exclude %{_libexecdir}/sysusers.d/systemd-remote.conf + %dir %{_sysconfdir}/tmpfiles.d -%{_libexecdir}/tmpfiles.d/*.conf +%{_libexecdir}/tmpfiles.d/ +%exclude %{_libexecdir}/tmpfiles.d/systemd-remote.conf %dir %{_libexecdir}/binfmt.d %dir %{_sysconfdir}/binfmt.d @@ -1315,42 +981,48 @@ exit 0 %dir %{_sysconfdir}/sysctl.d %{_prefix}/lib/sysctl.d/50-coredump.conf +%dir %{_sysconfdir}/X11/xinit +%dir %{_sysconfdir}/X11/xinit/xinitrc.d +%dir %{_sysconfdir}/X11/xorg.conf.d +%dir %{_sysconfdir}/dbus-1 +%dir %{_sysconfdir}/dbus-1/system.d %dir %{_sysconfdir}/systemd %dir %{_sysconfdir}/systemd/system %dir %{_sysconfdir}/systemd/user %dir %{_sysconfdir}/xdg/systemd -%dir %{_sysconfdir}/dbus-1 -%dir %{_sysconfdir}/dbus-1/system.d %{_sysconfdir}/xdg/systemd/user -%dir %{_datadir}/dbus-1 -%dir %{_datadir}/dbus-1/services -%dir %{_datadir}/dbus-1/system-services +%{_sysconfdir}/X11/xinit/xinitrc.d/50-systemd-user.sh + +%config(noreplace) %{_sysconfdir}/pam.d/systemd-user %config(noreplace) %{_sysconfdir}/systemd/bootchart.conf %config(noreplace) %{_sysconfdir}/systemd/coredump.conf -%if !0%{?bootstrap} -%config(noreplace) %{_sysconfdir}/systemd/journal-remote.conf -%config(noreplace) %{_sysconfdir}/systemd/journal-upload.conf -%endif %config(noreplace) %{_sysconfdir}/systemd/timesyncd.conf %config(noreplace) %{_sysconfdir}/systemd/system.conf %config(noreplace) %{_sysconfdir}/systemd/logind.conf %config(noreplace) %{_sysconfdir}/systemd/journald.conf %config(noreplace) %{_sysconfdir}/systemd/user.conf +%if %{with resolved} +%config(noreplace) %{_sysconfdir}/systemd/resolved.conf +%endif %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf -%if !0%{?bootstrap} +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf +%if %{with machined} %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf %endif %if %{with networkd} %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.network1.conf %endif -%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf -%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf -%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf +%if %{with resolved} +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.resolve1.conf +%endif +%if %{with importd} +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf +%endif -%{_sysconfdir}/X11/xinit/ -# Some files which may created by us -%dir %{_sysconfdir}/X11/xorg.conf.d +# Some files created by us. %ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf %ghost %config(noreplace) %{_sysconfdir}/vconsole.conf %ghost %config(noreplace) %{_sysconfdir}/locale.conf @@ -1361,121 +1033,114 @@ exit 0 %ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel4.target %ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel5.target -%{_datadir}/factory/ -%{_datadir}/dbus-1/services/org.freedesktop.systemd1.service +%{_prefix}/lib/systemd/system/org.freedesktop.systemd1.busname +%{_prefix}/lib/systemd/system/org.freedesktop.locale1.busname +%{_prefix}/lib/systemd/system/org.freedesktop.login1.busname +%{_prefix}/lib/systemd/system/org.freedesktop.hostname1.busname +%{_prefix}/lib/systemd/system/org.freedesktop.timedate1.busname %if %{with networkd} %{_prefix}/lib/systemd/system/org.freedesktop.network1.busname +%endif +%if %{with resolved} +%{_prefix}/lib/systemd/system/org.freedesktop.resolve1.busname +%endif +%if %{with machined} +%{_prefix}/lib/systemd/system/org.freedesktop.machine1.busname +%endif +%if %{with importd} +%{_prefix}/lib/systemd/system/org.freedesktop.import1.busname +%endif + +%{_datadir}/systemd +%{_datadir}/factory +%exclude %{_datadir}/systemd/gatewayd + +%dir %{_datadir}/dbus-1 +%dir %{_datadir}/dbus-1/services +%dir %{_datadir}/dbus-1/system-services +%{_datadir}/dbus-1/services/org.freedesktop.systemd1.service +%{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service +%{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service +%{_datadir}/dbus-1/system-services/org.freedesktop.login1.service +%{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service +%{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service +%if %{with networkd} %{_datadir}/dbus-1/system-services/org.freedesktop.network1.service %endif -%{_prefix}/lib/systemd/system/org.freedesktop.systemd1.busname -%{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service -%{_prefix}/lib/systemd/system/org.freedesktop.locale1.busname -%{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service -%{_prefix}/lib/systemd/system/org.freedesktop.login1.busname -%{_datadir}/dbus-1/system-services/org.freedesktop.login1.service -%{_prefix}/lib/systemd/system/org.freedesktop.hostname1.busname -%{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service -%if !0%{?bootstrap} -%{_prefix}/lib/systemd/system/org.freedesktop.machine1.busname +%if %{with resolved} +%{_datadir}/dbus-1/system-services/org.freedesktop.resolve1.service +%endif +%if %{with machined} %{_datadir}/dbus-1/system-services/org.freedesktop.machine1.service %endif -%{_prefix}/lib/systemd/system/org.freedesktop.timedate1.busname +%if %{with importd} +%{_datadir}/dbus-1/system-services/org.freedesktop.import1.service +%endif -%{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service %dir %{_datadir}/polkit-1 %dir %{_datadir}/polkit-1/actions -%if !0%{?bootstrap} -%{_datadir}/polkit-1/actions/org.freedesktop.machine1.policy -%endif %{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy %{_datadir}/polkit-1/actions/org.freedesktop.hostname1.policy %{_datadir}/polkit-1/actions/org.freedesktop.locale1.policy %{_datadir}/polkit-1/actions/org.freedesktop.timedate1.policy %{_datadir}/polkit-1/actions/org.freedesktop.login1.policy -%if ! 0%{?bootstrap} -%exclude %{_datadir}/systemd/gatewayd +%if %{with machined} +%{_datadir}/polkit-1/actions/org.freedesktop.machine1.policy +%endif +%if %{with importd} +%{_datadir}/polkit-1/actions/org.freedesktop.import1.policy %endif -%{_datadir}/systemd %if ! 0%{?bootstrap} -%_mandir/man1/[a-rt-z]*ctl.1* -%_mandir/man1/systemc*.1* -%_mandir/man1/systemd*.1* -%_mandir/man5/[a-tv-z]* -%_mandir/man5/user* -%_mandir/man7/[bdfks]* -%_mandir/man8/kern* -%_mandir/man8/pam_* -%_mandir/man8/systemd-[a-gik-tv]* -%_mandir/man8/systemd-h[aioy]* -%_mandir/man8/systemd-journal-remote.* -%_mandir/man8/systemd-journal-upload.* -%_mandir/man8/systemd-journald* -%_mandir/man8/systemd-u[ps]* +%{_mandir}/man1/[a-rt-z]*ctl.1* +%{_mandir}/man1/systemc*.1* +%{_mandir}/man1/systemd*.1* +%{_mandir}/man5/[a-tv-z]* +%{_mandir}/man5/user* +%{_mandir}/man7/[bdfks]* +%{_mandir}/man8/kern* +%{_mandir}/man8/pam_* +%{_mandir}/man8/systemd-[a-gik-tv]* +%{_mandir}/man8/systemd-h[aioy]* +%{_mandir}/man8/systemd-journald* +%{_mandir}/man8/systemd-u[ps]* %endif %{_docdir}/systemd %{_prefix}/lib/udev/rules.d/70-uaccess.rules %{_prefix}/lib/udev/rules.d/71-seat.rules %{_prefix}/lib/udev/rules.d/73-seat-late.rules -%if ! 0%{?bootstrap} -%{_prefix}/lib/udev/rules.d/73-seat-numlock.rules -%endif %{_prefix}/lib/udev/rules.d/99-systemd.rules -%{_prefix}/lib/udev/numlock-on -%if 0%{suse_version} < 1310 -%{_sysconfdir}/rpm/macros.systemd -%endif %dir %{_localstatedir}/lib/systemd %dir %{_localstatedir}/lib/systemd/sysv-convert %dir %{_localstatedir}/lib/systemd/migrated +%dir %{_localstatedir}/lib/systemd/coredump %dir %{_localstatedir}/lib/systemd/catalog %ghost %{_localstatedir}/lib/systemd/catalog/database -%dir %{_localstatedir}/lib/systemd/coredump +%ghost %{_localstatedir}/lib/systemd/backlight +%ghost %{_localstatedir}/lib/systemd/random-seed %dir %{_datadir}/zsh %dir %{_datadir}/zsh/site-functions %{_datadir}/zsh/site-functions/* -%ghost %{_localstatedir}/lib/systemd/backlight -%ghost %{_localstatedir}/lib/systemd/random-seed -%if %{with resolved} -%{_sysconfdir}/dbus-1/system.d/org.freedesktop.resolve1.conf -%{_sysconfdir}/systemd/resolved.conf -%{_libdir}/libnss_resolve.so.2 -%{_datadir}/dbus-1/system-services/org.freedesktop.resolve1.service -%{_prefix}/lib/systemd/system/org.freedesktop.resolve1.busname -%endif -%if ! 0%{?bootstrap} -%{_sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf -%{_prefix}/lib/systemd/import-pubring.gpg -%{_prefix}/lib/systemd/system/org.freedesktop.import1.busname -%{_datadir}/dbus-1/system-services/org.freedesktop.import1.service -%{_datadir}/polkit-1/actions/org.freedesktop.import1.policy -%endif - -%if ! 0%{?bootstrap} -%files bash-completion -f files.completion -%defattr(-,root,root,-) -%dir %{_datadir}/bash-completion -%dir %{_datadir}/bash-completion/completions -%{_datadir}/bash-completion/completions/* -%endif +%{_datadir}/pkgconfig/systemd.pc %files devel %defattr(-,root,root,-) %{_libdir}/libsystemd.so +%{_libdir}/pkgconfig/libsystemd.pc +%{_includedir}/systemd/ +%if %{with compatlibs} %{_libdir}/libsystemd-daemon.so %{_libdir}/libsystemd-login.so %{_libdir}/libsystemd-id128.so %{_libdir}/libsystemd-journal.so -%{_includedir}/systemd/ -%{_datadir}/pkgconfig/systemd.pc -%{_libdir}/pkgconfig/libsystemd.pc %{_libdir}/pkgconfig/libsystemd-daemon.pc %{_libdir}/pkgconfig/libsystemd-login.pc %{_libdir}/pkgconfig/libsystemd-id128.pc %{_libdir}/pkgconfig/libsystemd-journal.pc +%endif %if ! 0%{?bootstrap} -%_mandir/man3/SD*.3* -%_mandir/man3/sd*.3* +%{_mandir}/man3/SD*.3* +%{_mandir}/man3/sd*.3* %endif %files sysvinit @@ -1496,8 +1161,7 @@ exit 0 %{_mandir}/man8/telinit.8* %{_mandir}/man8/runlevel.8* %endif -%dir %_prefix/lib/systemd -%_prefix/lib/systemd/systemd-sysv-install +%{_prefix}/lib/systemd/systemd-sysv-install %files -n udev%{?mini} %defattr(-,root,root) @@ -1506,12 +1170,10 @@ exit 0 # keep for compatibility %ghost /lib/udev %{_bindir}/udevadm -%if 0%{?suse_version} <= 1310 -%{_prefix}/lib/firmware -%endif %{_bindir}/systemd-hwdb %dir %{_prefix}/lib/udev/ %{_prefix}/lib/udev/ata_id +%{_prefix}/lib/udev/path_id_compat %{_prefix}/lib/udev/cdrom_id %{_prefix}/lib/udev/collect %{_prefix}/lib/udev/mtd_probe @@ -1523,7 +1185,6 @@ exit 0 %exclude %{_prefix}/lib/udev/rules.d/70-uaccess.rules %exclude %{_prefix}/lib/udev/rules.d/71-seat.rules %exclude %{_prefix}/lib/udev/rules.d/73-seat-late.rules -%exclude %{_prefix}/lib/udev/rules.d/73-seat-numlock.rules %exclude %{_prefix}/lib/udev/rules.d/99-systemd.rules %{_prefix}/lib/udev/rules.d/*.rules %{_prefix}/lib/udev/hwdb.d/ @@ -1532,17 +1193,18 @@ exit 0 %ghost %{_sysconfdir}/udev/hwdb.bin %config(noreplace) %{_sysconfdir}/udev/udev.conf %if ! 0%{?bootstrap} -%_mandir/man5/udev* -%_mandir/man7/hwdb* -%_mandir/man7/udev* -%_mandir/man8/systemd-hwdb* -%_mandir/man8/systemd-udev* -%_mandir/man8/udev* +%{_mandir}/man5/udev* +%{_mandir}/man7/hwdb* +%{_mandir}/man7/udev* +%{_mandir}/man8/systemd-hwdb* +%{_mandir}/man8/systemd-udev* +%{_mandir}/man8/udev* %endif %dir %{_prefix}/lib/systemd/system %{_prefix}/lib/systemd/systemd-udevd -%{_prefix}/lib/systemd/system/*udev*.service +%{_prefix}/lib/systemd/system/systemd-udev*.service %{_prefix}/lib/systemd/system/systemd-udevd*.socket +%{_prefix}/lib/systemd/system/initrd-udevadm-cleanup-db.service %dir %{_prefix}/lib/systemd/system/sysinit.target.wants %{_prefix}/lib/systemd/system/sysinit.target.wants/systemd-udev*.service %dir %{_prefix}/lib/systemd/system/sockets.target.wants @@ -1550,18 +1212,16 @@ exit 0 %dir %{_prefix}/lib/systemd/network %{_prefix}/lib/systemd/network/*.link %{_prefix}/lib/systemd/network/*.network -%if 0%{?suse_version} > 1310 %{_datadir}/pkgconfig/udev.pc -%endif %files -n libsystemd0%{?mini} %defattr(-,root,root) -%_libdir/libsystemd.so.* -%if %{with compat_libs} -%_libdir/libsystemd-daemon.so.* -%_libdir/libsystemd-login.so.* -%_libdir/libsystemd-id128.so.* -%_libdir/libsystemd-journal.so.* +%{_libdir}/libsystemd.so.* +%if %{with compatlibs} +%{_libdir}/libsystemd-daemon.so.* +%{_libdir}/libsystemd-login.so.* +%{_libdir}/libsystemd-id128.so.* +%{_libdir}/libsystemd-journal.so.* %endif %files -n libudev%{?mini}1 @@ -1587,27 +1247,51 @@ exit 0 %files -n nss-myhostname %defattr(-, root, root) +/%{_lib}/*nss_myhostname* %{_sbindir}/nss-myhostname-config -%if !0%{?bootstrap} %{_mandir}/man8/libnss_myhostname.* %{_mandir}/man8/nss-myhostname.* %endif -/%{_lib}/*nss_myhostname* -%files journal-gateway +%if %{with resolved} +%files -n nss-resolve %defattr(-, root, root) -%{_prefix}/lib/systemd/system/systemd-journal-gatewayd.* -%{_prefix}/lib/systemd/systemd-journal-gatewayd -%{_mandir}/man8/systemd-journal-gatewayd.* -%{_datadir}/systemd/gatewayd +%{_libdir}/libnss_resolve.so.2 +%{_mandir}/man8/libnss_resolve.* +%{_mandir}/man8/nss-resolve.* +%endif +%if %{with machined} %files -n nss-mymachines %defattr(-,root,root) -%_libdir/libnss_mymachines.so* -%if !0%{?bootstrap} -%_mandir/man8/libnss_mymachines.* -%_mandir/man8/nss-mymachines.* -%endif +%{_libdir}/libnss_mymachines.so* +%{_mandir}/man8/libnss_mymachines.* +%{_mandir}/man8/nss-mymachines.* %endif +%if %{with journal_remote} +%files journal-remote +%defattr(-, root, root) +%config(noreplace) %{_sysconfdir}/systemd/journal-remote.conf +%config(noreplace) %{_sysconfdir}/systemd/journal-upload.conf +%{_prefix}/lib/systemd/system/systemd-journal-gatewayd.* +%{_prefix}/lib/systemd/system/systemd-journal-remote.* +%{_prefix}/lib/systemd/system/systemd-journal-upload.* +%{_prefix}/lib/systemd/systemd-journal-gatewayd +%{_prefix}/lib/systemd/systemd-journal-remote +%{_prefix}/lib/systemd/systemd-journal-upload +%{_libexecdir}/sysusers.d/systemd-remote.conf +%{_libexecdir}/tmpfiles.d/systemd-remote.conf +%{_mandir}/man8/systemd-journal-gatewayd.* +%{_mandir}/man8/systemd-journal-remote.* +%{_mandir}/man8/systemd-journal-upload.* +%{_datadir}/systemd/gatewayd +%endif + +%files bash-completion +%defattr(-,root,root,-) +%dir %{_datadir}/bash-completion +%dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/* + %changelog diff --git a/systemd-pam_config.patch b/systemd-pam_config.patch deleted file mode 100644 index 7850822e..00000000 --- a/systemd-pam_config.patch +++ /dev/null @@ -1,32 +0,0 @@ -Index: systemd-227/factory/etc/pam.d/other -=================================================================== ---- 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 -+account include common-account - - m4_ifdef(`HAVE_SELINUX', - session required pam_selinux.so close - session required pam_selinux.so nottys open - )m4_dnl --session include system-auth -+session include common-session diff --git a/systemd-sysv-convert b/systemd-sysv-convert index 4d98e4f6..c9f777a6 100644 --- a/systemd-sysv-convert +++ b/systemd-sysv-convert @@ -102,6 +102,7 @@ while read line ; do done < /var/lib/systemd/sysv-convert/database } +declare -i fail=0 case "$1" in -h|--help) help @@ -112,7 +113,8 @@ case "$1" in for service in $@ ; do if [ ! -r "/etc/init.d/$service" ]; then echo "SysV service $service does not exist" >/dev/stderr - exit 1 + let fail++ + continue fi for runlevel in 2 3 4 5; do find_service $service $runlevel @@ -127,11 +129,10 @@ case "$1" in shift services=$@ lookup_database $services - fail=0 for service in $services; do if [ -z "${results_runlevel[$service]}" ]; then echo No information found about service $service found. >/dev/stderr - fail=1 + let fail++ continue fi declare -i count @@ -142,7 +143,6 @@ case "$1" in count+=1 done done - exit $fail ;; --apply) shift @@ -170,8 +170,8 @@ case "$1" in done ;; *) usage - exit 2;; + let fail=2 + ;; esac - - +exit $fail diff --git a/systemd-sysv-install b/systemd-sysv-install index 84e687b0..36e13055 100644 --- a/systemd-sysv-install +++ b/systemd-sysv-install @@ -1,26 +1,41 @@ #!/bin/sh +# This script is called by "systemctl enable/disable" when the given unit is a +# SysV init.d script. It needs to call the distribution's mechanism for +# enabling/disabling those, such as chkconfig, update-rc.d, or similar. This +# can optionally take a --root argument for enabling a SysV init script +# in a chroot or similar. set -e usage() { - echo "Usage: $0 [--root=path] enable|disable|is-enabled " >&2 - exit 1 + echo "Usage: $0 [--root=path] enable|disable|is-enabled " >&2 + exit 1 } + +# parse options eval set -- "$(getopt -o r: --long root: -- "$@")" while true; do - case "$1" in - -r|--root) - ROOT="$2" - shift 2 ;; - --) shift ; break ;; - *) usage ;; - esac + case "$1" in + -r|--root) + ROOT="$2" + shift 2 ;; + --) shift ; break ;; + *) usage ;; + esac done + NAME="$2" -ROOT="${ROOT:+--root=$ROOT}" [ -n "$NAME" ] || usage + case "$1" in - enable) chkconfig $ROOT -a "$NAME" ;; - disable) chkconfig $ROOT -d "$NAME" ;; - is-enabled) chkconfig $ROOT -c "$NAME" ;; - *) usage ;; + enable) + chkconfig $ROOT --no-systemctl -s "$NAME" on + ;; + disable) + chkconfig $ROOT --no-systemctl -s "$NAME" off + ;; + is-enabled) + chkconfig $ROOT --no-systemctl -c "$NAME" + ;; + *) + usage ;; esac diff --git a/systemd-tmp-safe-defaults.patch b/systemd-tmp-safe-defaults.patch deleted file mode 100644 index 1233b3b2..00000000 --- a/systemd-tmp-safe-defaults.patch +++ /dev/null @@ -1,26 +0,0 @@ -From: Reinhard Max -Date: Fri, 19 Apr 2013 16:12:28 +0200 -Subject: systemd tmp safe defaults - -Fix regression in the default for tmp auto-deletion (FATE#314974). -SUSE policy is to not clean /tmp by default. ---- - tmpfiles.d/tmp.conf | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -Index: systemd-228/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 --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 e71f989e..019f68f7 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,261 @@ +------------------------------------------------------------------- +Wed Oct 26 09:41:01 UTC 2016 - fbui@suse.com + +- Own a couple of directories even if they don't belong to systemd + otherwise the build system will complain. + + Some directories (owned by others packages) are simply used by + systemd to ship some scripts or config files to customize others + *optional* components. Since thos components are not build required + by systemd those directories are not owned by any packages and the + BS complains... + +------------------------------------------------------------------- +Wed Oct 26 07:45:08 UTC 2016 - fbui@suse.com + +- Import commit + + 15ea716 journal-remote: change owner of /var/log/journal/remote and create /var/lib/systemd/journal-upload (bsc#1006372) + +------------------------------------------------------------------- +Mon Oct 24 14:26:40 UTC 2016 - fbui@suse.com + +- %sysusers_create and %tmpfiles_create must be called in %post + + Calling %pre is broken since the respective conf files are not yet + installed. + +------------------------------------------------------------------- +Mon Oct 24 13:53:04 UTC 2016 - fbui@suse.com + +- %{_libexecdir}/{tmpfiles.d,sysusers.d}/systemd-remote.conf are + part of systemd-journal-remote package (only). + +------------------------------------------------------------------- +Mon Oct 24 13:21:22 UTC 2016 - fbui@suse.com + +- systemd-journal-{gatewayd,remote,upload} units are only part of + "systemd-journal-remote" package. + + So exclude them from the main package. + +------------------------------------------------------------------- +Mon Oct 24 08:56:59 UTC 2016 - fbui@suse.com + +- Import commit a1c145e6ad6588555dca64402f9103fb1e02b1a0 + + 7f34037 man: explain that *KeyIgnoreInhibited only apply to a subset of locks + df5798b Revert "logind: really handle *KeyIgnoreInhibited options in logind.conf" (bsc#1001790 bsc#1005404) + f79fee7 Revert "kbd-model-map: add more mappings offered by Yast" + 3760c10 manager: tighten incoming notification message checks + d6efd71 core: only warn on short reads on signal fd + 6eebd91 manager: be stricter with incomining notifications, warn properly about too large ones + fdf2dc3 manager: don't ever busy loop when we get a notification message we can't process + +------------------------------------------------------------------- +Thu Oct 20 06:57:57 UTC 2016 - fbui@suse.com + +- Rename kbd-model-map-extra into kbd-model-map.legacy + +------------------------------------------------------------------- +Wed Oct 19 07:24:46 UTC 2016 - fbui@suse.com + +- Remove tcpd-devel build requirement. + + tcpwrap support has been removed since v212, see commit + 7f8aa67131cfc03ddcbd31c0420754864fc122f0 + +------------------------------------------------------------------- +Tue Oct 18 14:52:00 UTC 2016 - fbui@suse.com + +- remove all dummy "aliases" to /etc/init.d (as it was already done by + factory more than 1 year ago). + + Even if a sysvinit script is still requiring one of those dummy + symlinks this should not be an issue since this is requirement is + translated into a weak dependency. + +------------------------------------------------------------------- +Tue Oct 18 13:20:58 UTC 2016 - fbui@suse.com + +- specfile: + + - do not own /usr/share/zsh directory + - do not own /etc/dbus-1 and /etc/dbus-1/system.d dirs + - do not own /usr/share/dbus-1 dir + +------------------------------------------------------------------- +Tue Oct 18 13:06:27 UTC 2016 - fbui@suse.com + +- specfile: %{_prefix}/lib/systemd/system-preset was mentioned twice + in %files section. + +------------------------------------------------------------------- +Tue Oct 18 09:30:37 UTC 2016 - fbui@suse.com + +- Specfile cleanup: + + - use curly braces with rpm macros + +------------------------------------------------------------------- +Tue Oct 18 09:15:17 UTC 2016 - fbui@suse.com + +- Specfile cleanup: + + - %ghost files doesn't need (anymore) to be created in %builroot + - do not own /etc/X11/xorg.conf.d and /etc/X11/xinit + +------------------------------------------------------------------- +Tue Oct 18 07:58:38 UTC 2016 - fbui@suse.com + +- Specfile cleanup: no need to protect the manpages with %bootstrap + condition in nss-myhostname package since the package itself is + already protected. + +------------------------------------------------------------------- +Tue Oct 18 07:51:30 UTC 2016 - fbui@suse.com + +- fix nss-resolve sub package: + + - add a %files section + - add a package description + - libnss_resolve.so.2 is now part of this subpackage + - add %post and %postun sections + +------------------------------------------------------------------- +Tue Oct 18 07:16:17 UTC 2016 - fbui@suse.com + +- Specfile cleanup: + + - reorganize some files in %files by types + - some config files were missing the "noreplace" attribute + +------------------------------------------------------------------- +Tue Oct 18 06:19:34 UTC 2016 - fbui@suse.com + +- Use %config(noreplace) for %{_sysconfdir}/pam.d/systemd-user + +------------------------------------------------------------------- +Tue Oct 18 05:57:28 UTC 2016 - fbui@suse.com + +- Rework systemd-gatewayd package: + + - some gateway's files were still in the main package + - it now includes all progs dealing with remote journals + - it can be turned off (SP2 does that currently) + - it's been renamed systemd-journal-remote to reflect that + +------------------------------------------------------------------- +Mon Oct 17 12:19:34 UTC 2016 - fbui@suse.com + +- Specfile cleanup: + + - only specify once %{_prefix}/lib/systemd/system-shutdown in %file + - no need to list the content of %{_prefix}/lib/systemd/user-generators in %file + - machined is not built when %bootstrap = 1 + +------------------------------------------------------------------- +Mon Oct 17 12:11:43 UTC 2016 - fbui@suse.com + +- Specfile cleanup: + + - There's no point in listing all generators in %file + explicitly. The default is to include all of them and if for some + reason one must be excluded then it should be done explicitly. + +------------------------------------------------------------------- +Mon Oct 17 11:44:57 UTC 2016 - fbui@suse.com + +- Specfile cleanup: + + - remove explicit call to make for building man pages. This is not + needed and was maybe useful when generated doc was pre-built and + shipped in the tarball. + +------------------------------------------------------------------- +Mon Oct 17 09:59:13 UTC 2016 - fbui@suse.com + +- Specfile cleanup: + + - break overly long and unreadable line using mkdir + - gather directory creations + +------------------------------------------------------------------- +Mon Oct 17 08:38:27 UTC 2016 - fbui@suse.com + +- Stop providing udevd.8 + + systemd-udevd has replaced udevd for some time already and usage of + udevd should be avoided. Therefore don't encourage this and stop + documenting it. + +------------------------------------------------------------------- +Mon Oct 17 07:36:10 UTC 2016 - fbui@suse.com + +- Import from factory: + + - Thu Feb 4 11:05:37 UTC 2016 - lnussel@suse.de + + - curl also causes building of journal-upload. That one has rather + unusal certificate usage, set it's ca root to /etc/pki/systemd + instead of the built-in default /etc/ssl as journal-remote and + journal-upload think they can put stuff in /etc/ssl/certs then + but that directory is managed by p11-kit and doesn't serve the + purpose those programs think. + +------------------------------------------------------------------- +Thu Oct 13 19:33:17 UTC 2016 - fbui@suse.com + +- Package rootsymlink-generator helper. It was forgotten when + switching to the git repo but re-added back. + + That said this thing should be removed as it's broken as soon as + there's no direct link between the root fs and its backend device + node (i.e. BTRFS). + +------------------------------------------------------------------- +Thu Oct 13 19:09:25 UTC 2016 - fbui@suse.com + +- Add kbd-model-map-extra file which contains the additional legacy + keymaps needed by yast. + + This was previously directly patched in the systemd source code. + +------------------------------------------------------------------- +Mon Oct 10 13:33:40 UTC 2016 - fbui@suse.com + +- Imported e251b8d7fb5c801fdfa3a023257ba0e4d514f3b0 + + - Re-add back /dev/root symlink generation (although this must be + deprecated and finally removed). + +------------------------------------------------------------------- +Fri Oct 7 14:18:10 UTC 2016 - fbui@suse.com + +- Migrating to the Suse Systemd git repo: + + Third step: + + - Re-enable networkd (disabled by default in SLE12) + +------------------------------------------------------------------- +Fri Oct 7 13:33:51 UTC 2016 - fbui@suse.com + +- Migrating to the Suse Systemd git repo: + + Second step: + + - Import the specfile + - Import the tarball generated from the git repo + - Import lastest changes for the different scripts + +------------------------------------------------------------------- +Fri Oct 7 08:58:38 UTC 2016 - fbui@suse.com + +- Migrating to the Suse Systemd git repo: + + First step: drop all patches and drop the tar ball. + ------------------------------------------------------------------- Fri Sep 30 06:07:06 UTC 2016 - fbui@suse.com diff --git a/systemd.spec b/systemd.spec index ca15920f..1a871667 100644 --- a/systemd.spec +++ b/systemd.spec @@ -16,26 +16,35 @@ # +# +# The git repository used to track all Suse specific changes can be +# found at: https://github.com/openSUSE/systemd. +# + %define bootstrap 0 %define mini %nil -%define real systemd -%define min_kernel_version 3.11 +%define min_kernel_version 4.5 -%bcond_without bash_completion -%bcond_without networkd +%bcond_with gnuefi +%if 0%{?bootstrap} +%bcond_with sysvcompat +%bcond_with machined +%bcond_with importd +%bcond_with networkd +%bcond_with journal_remote +%else %bcond_without sysvcompat +%bcond_without machined +%bcond_without importd +%bcond_without networkd +%bcond_without journal_remote +%ifarch %{ix86} x86_64 +%bcond_without gnuefi +%endif +%endif +%bcond_without compatlibs %bcond_with resolved %bcond_with parentpathid -%if 0%{?suse_version} > 1315 -%bcond_without permission -%bcond_without blkrrpart -%bcond_without udevsettle -%else -%bcond_with permission -%bcond_with blkrrpart -%bcond_with udevsettle -%endif -%bcond_with systemgrps Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd @@ -45,96 +54,95 @@ Summary: A System and Session Manager License: LGPL-2.1+ Group: System/Base BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: acl -BuildRequires: audit-devel -BuildRequires: autoconf -BuildRequires: automake -BuildRequires: fdupes -BuildRequires: gperf -BuildRequires: intltool -BuildRequires: kbd -BuildRequires: libacl-devel -BuildRequires: libcap-devel -BuildRequires: libsepol-devel -BuildRequires: libtool -BuildRequires: pam-devel -BuildRequires: systemd-rpm-macros -BuildRequires: xz -BuildRequires: config(suse-module-tools) -BuildRequires: pkgconfig(blkid) >= 2.26 -BuildRequires: pkgconfig(libkmod) >= 15 -BuildRequires: pkgconfig(liblzma) -BuildRequires: pkgconfig(libpci) >= 3 -#XXX: change to 2.27.1 when pkgconfig file is fixed upstream -BuildRequires: pkgconfig(mount) >= 2.27 -%ifarch aarch64 %ix86 x86_64 x32 %arm ppc64le s390x -BuildRequires: pkgconfig(libseccomp) -%endif -BuildRequires: pkgconfig(libselinux) >= 2.1.9 -BuildRequires: pkgconfig(libsepol) -Conflicts: sysvinit -Conflicts: otherproviders(systemd) -%if 0%{?bootstrap} -#!BuildIgnore: dbus-1 -Requires: this-is-only-for-build-envs -Provides: systemd = %version-%release -Conflicts: kiwi -%else -%ifarch %{ix86} x86_64 -BuildRequires: gnu-efi -%endif +%if ! 0%{?bootstrap} +BuildRequires: -post-build-checks BuildRequires: docbook-xsl-stylesheets +BuildRequires: kbd +BuildRequires: libapparmor-devel BuildRequires: libgcrypt-devel BuildRequires: libxslt-tools -# curl and bzip2 are required for building importd -BuildRequires: libapparmor-devel -BuildRequires: pkgconfig(bzip2) -BuildRequires: pkgconfig(libcurl) # python is only required for generating systemd.directives.xml BuildRequires: python3 BuildRequires: python3-lxml BuildRequires: pkgconfig(libcryptsetup) >= 1.6.0 -BuildRequires: pkgconfig(libmicrohttpd) BuildRequires: pkgconfig(libqrencode) -BuildRequires: pkgconfig(usbutils) >= 0.82 +%endif +BuildRequires: fdupes +BuildRequires: gperf +BuildRequires: intltool +BuildRequires: libacl-devel +BuildRequires: libcap-devel +BuildRequires: libmount-devel +BuildRequires: libsepol-devel +BuildRequires: libtool +BuildRequires: pam-config >= 0.79-5 +BuildRequires: pam-devel +# regenerate_initrd_post macro is expanded during build, hence this +# BR. Also this macro was introduced since version 12.4. +BuildRequires: suse-module-tools >= 12.4 +BuildRequires: systemd-rpm-macros +BuildRequires: xz +BuildRequires: pkgconfig(blkid) >= 2.26 +BuildRequires: pkgconfig(libkmod) >= 15 +BuildRequires: pkgconfig(liblzma) +BuildRequires: pkgconfig(libpci) >= 3 +BuildRequires: pkgconfig(libpcre) +BuildRequires: pkgconfig(libselinux) >= 2.1.9 +BuildRequires: pkgconfig(libsepol) +%if %{with importd} +BuildRequires: pkgconfig(bzip2) +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(zlib) +%endif +%if %{with journal_remote} +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(libmicrohttpd) >= 0.9.33 +%endif +%ifarch aarch64 %ix86 x86_64 x32 %arm ppc64le s390x +BuildRequires: pkgconfig(libseccomp) +%endif +%if %{with gnuefi} +BuildRequires: gnu-efi +%endif + +%if 0%{?bootstrap} +#!BuildIgnore: dbus-1 +Requires: this-is-only-for-build-envs +Provides: systemd = %{version}-%{release} +%else # the buildignore is important for bootstrapping #!BuildIgnore: udev -Requires: udev = %{version}-%{release} -Recommends: %{name}-bash-completion Requires: dbus-1 >= 1.4.0 Requires: kbd Requires: kmod >= 15 -Requires: netcfg +Requires: netcfg >= 11.5 Requires: pam-config >= 0.79-5 -BuildRequires: pam-config >= 0.79-5 Requires: pwdutils Requires: systemd-presets-branding Requires: sysvinit-tools +Requires: udev = %{version}-%{release} Requires: util-linux >= 2.27.1 +Recommends: %{name}-bash-completion Requires(post): coreutils Requires(post): findutils +Requires(post): systemd-presets-branding Requires(post): pam-config >= 0.79-5 %endif -Requires(pre): /usr/bin/getent -Requires(pre): /usr/sbin/groupadd Requires(post): /usr/bin/awk -Requires(post): /usr/bin/getent -Requires(post): /usr/bin/setfacl + +%if 0%{?bootstrap} +Conflicts: systemd +Conflicts: kiwi +%endif +Conflicts: sysvinit Conflicts: filesystem < 11.5 Conflicts: mkinitrd < 2.7.0 -Conflicts: kernel < %{min_kernel_version} Obsoletes: systemd-analyze < 201 Provides: systemd-analyze = %{version} Obsoletes: pm-utils <= 1.4.1 Obsoletes: suspend <= 1.0 - -#Git-Clone: git://github.com/systemd/systemd -Source: https://github.com/systemd/systemd/archive/v%version.tar.gz -%if ! 0%{?bootstrap} -Source1: systemd-rpmlintrc -%else -Source1: systemd-mini-rpmlintrc -%endif +Source0: systemd-%{version}.tar.xz +Source1: %{name}-rpmlintrc Source3: systemd-sysv-convert Source6: baselibs.conf Source7: libgcrypt.m4 @@ -143,173 +151,9 @@ Source10: macros.systemd.upstream Source11: after-local.service Source12: systemd-sysv-install Source13: fix-machines-subvol-for-rollbacks.sh +Source14: kbd-model-map.legacy -Source1065: systemd-remount-tmpfs - -# handle SUSE specific kbd settings -Patch3: handle-disable_caplock-and-compose_table-and-kbd_rate.patch -Patch4: handle-numlock-value-in-etc-sysconfig-keyboard.patch -Patch6: insserv-generator.patch -Patch12: Fix-run-lock-directories-permissions-to-follow-openSUSE-po.patch -Patch16: fix-support-for-boot-prefixed-initscript-bnc-746506.patch -Patch17: restore-var-run-and-var-lock-bind-mount-if-they-aren-t-sym.patch - -# PATCH-FIX-OPENSUSE ensure-ask-password-wall-starts-after-getty-tty1.patch -- don't start getty on tty1 until all password request are done -Patch5: ensure-ask-password-wall-starts-after-getty-tty1.patch -# PATCH-FIX-OPENSUSE handle-root_uses_lang-value-in-etc-sysconfig-language.patch bnc#792182 fcrozat@suse.com -- handle ROOT_USES_LANG=ctype -Patch20: handle-root_uses_lang-value-in-etc-sysconfig-language.patch -# PATCH-FIX-OPENSUSE allow-multiple-sulogin-to-be-started.patch bnc#793182 fcrozat@suse.com -- handle multiple sulogin -Patch21: allow-multiple-sulogin-to-be-started.patch -# PATCH-FIX-OPENSUSE apply-ACL-for-nvidia-device-nodes.patch bnc#808319 -- set ACL on nvidia devices -Patch27: apply-ACL-for-nvidia-device-nodes.patch -# PATCH-FIX-OPENSUSE apply-ACL-for-nvidia-uvm-device-node.patch bnc#879767 -- set ACL on nvidia-uvm device -Patch28: apply-ACL-for-nvidia-uvm-device-node.patch -Patch37: suse-sysv-bootd-support.diff -# PATCH-FIX-OPENSUSE systemd-tmp-safe-defaults.patch FATE#314974 max@suse.de -- Return to SUSE's "safe defaults" policy on deleting files from tmp direcorie. -Patch39: systemd-tmp-safe-defaults.patch -# PATCH-FIX-OPENSUSE ensure-shortname-is-set-as-hostname-bnc-820213.patch bnc#820213 fcrozat@suse.com -- Do not set anything beyond first dot as hostname -Patch41: ensure-shortname-is-set-as-hostname-bnc-820213.patch -Patch42: systemd-pam_config.patch - -# Upstream First - Policy: -# 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-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-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 -Patch91: plymouth-quit-and-wait-for-emergency-service.patch -# PATCH-FIX-SUSE 0001-avoid-abort-due-timeout-at-user-service.patch werner@suse.com -Patch120: 0001-avoid-abort-due-timeout-at-user-service.patch -# PATCH-FIX-OPENSUSE 0010-do-not-install-sulogin-unit-with-poweroff.patch -- Avoid installing console-shell.service (bnc#849071) -Patch178: 0010-do-not-install-sulogin-unit-with-poweroff.patch -# PATCH-FIX-SUSE 0001-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch -Patch179: 0001-pam_systemd_do_override_XDG_RUNTIME_DIR_of_the_original_user.patch -# PATCH-FIX-OPENSUSE 0014-journald-with-journaling-FS.patch -Patch180: 0014-journald-with-journaling-FS.patch -# PATCH-FIX-SUSE 0019-make-completion-smart-to-be-able-to-redirect.patch -Patch182: 0019-make-completion-smart-to-be-able-to-redirect.patch -# PATCH-FIX-SUSE 0001-add-network-device-after-NFS-mount-units.patch werner@suse.com -Patch183: 0001-add-network-device-after-NFS-mount-units.patch -# PATCH-FIX-SUSE systemctl-set-default-target.patch -Patch186: systemctl-set-default-target.patch -# PATCH-FIX-SUSE boot-local-start.patch (bnc #869142) -Patch188: boot-local-start.patch -# PATCH-FIX-SUSE avoid random hangs on timeouts due lost cwd at terminating user manager -Patch189: avoid-random-hangs-on-timeouts-due-lost-cwd.patch -# PATCH-FIX-SUSE systemd-install-compat_pkgconfig-always.patch -Patch190: systemd-install-compat_pkgconfig-always.patch -# PATCH-FIX-OPENSUSE systemd-dbus-system-bus-address.patch always use /run/dbus not /var/run -Patch191: systemd-dbus-system-bus-address.patch -# PATCH-FIX-SUSE During linkage of systemd-cryptsetup let linker find libudev for libdevmapper -Patch192: let-linker-find-libudev-for-libdevmapper.patch -# PATCH-FIX-SUSE Make sure that rpcbind socket as well as service is up with the target -Patch193: portmap-wants-rpcbind-socket.patch -# PATCH-FIX-SUSE Avoid that emergency and rescue sulogin are fighting on console -Patch197: rescue-emergency-target-conflicts.patch -# PATCH-FIX-SUSE Avoid a divide by zero sigtrap -Patch198: avoid-divide-by-zero-sigtrap.patch -# PATCH-FIX-SUSE System fails to boot if nfs mounts get added to fstab (bnc#874665) -Patch203: respect-nfs-bg-option.patch -# PATCH-FIX-SUSE Do not ignores option 'noauto' in /etc/crypttab (bnc#742774) -Patch208: parse-crypttab-for-noauto-option.patch -# PATCH-FIX-SUSE Do a vhangup on all consoles lines (bnc#886599) -Patch338: vhangup-on-all-consoles.patch -# PATCH-FIX-SUSE Shut up rpmlint warning -Patch345: shut-up-rpmlint-on-var-log-journal.patch -# PATCH-FIX-SUSE -Patch352: set-and-use-default-logconsole.patch -Patch362: tty-ask-password-agent-on-console.patch -# PATCH-FIX-SUSE Provide the /var/lock/subsys at start (bnc#889357) -Patch366: tomcat6-var-lock-subsys-legacy.patch -# PATCH-FIX-SUSE Remove error messages for tab completion for systemctl isolate (bnc#892162) -Patch368: 0001-let-systemctl-completion-ignore-at-names.patch -# PATCH-FIX-SUSE Use RNDADDENTROPY ioctl to load random-seed and to increase entropy count as well (bnc#892096) -Patch386: use-rndaddentropy-ioctl-to-load-random-seed.patch -# PATCH-FIX-SUSE AUDIT-0: Power button press at gdm login should not prompt for credentials (bnc#888612) -Patch430: 0001-bnc888612-logind-polkit-acpi.patch -# PATCH-FIX-SUSE added on 2014/10/24 -Patch475: journald-advice-about-use-of-memory.patch -# PATCH-FIX-SUSE added on 2014/11/05 -Patch490: watch_resolv.conf_for_become_changed.patch -# PATCH-FIX-SUSE systemd-add-user-keep.patch (bnc#903009) -Patch520: systemd-add-user-keep.patch -# PATCH-FIX-SUSE systemd-add-user-keep.patch (bnc#903009) -Patch521: kbd-model-map.patch -# PATCH-WORKAROUND-SUSE (boo#939571) -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 -# PATCH-FIX-UPSTREAM (bsc#966535) -Patch525: 0001-core-exclude-.slice-units-from-systemctl-isolate.patch -# PATCH-FIX-UPSTREAM -- fixed after 228 -Patch526: systemd-228-nspawn-make-journal-linking-non-fatal-in-try-and-auto.diff -# PATCH-FIX-UPSTREAM -- fixed after 228 -Patch527: 0001-core-fix-bus-name-synchronization-after-daemon-reloa.patch -# PATCH-FIX-UPSTREAM -- fixed after 228 -Patch528: 0001-core-re-sync-bus-name-list-after-deserializing-durin.patch -# PATCH-FIX-UPSTREAM -- fixed after 228 -Patch529: 0001-systemctl-pid1-do-not-warn-about-missing-install-inf.patch -# PATCH-FIX-UPSTREAM -- fixed after 320 -Patch530: systemd-230-cgroup2-use-new-fstype-for-unified-hierarchy.patch -# PATCH-FIX-UPSTREAM -- fixed after 231 -Patch531: 0001-rules-block-add-support-for-pmem-devices-3683.patch -Patch532: 0001-journal-set-STATE_ARCHIVED-as-part-of-offlining-2740.patch -Patch533: 0001-journal-warn-when-we-fail-to-append-a-tag-to-a-journ.patch -Patch534: 0001-journal-fix-HMAC-calculation-when-appending-a-data-o.patch -Patch535: 0001-If-the-notification-message-length-is-0-ignore-the-m.patch -Patch536: 0001-pid1-don-t-return-any-error-in-manager_dispatch_noti.patch -Patch537: 0001-pid1-process-zero-length-notification-messages-again.patch -Patch538: 0001-pid1-more-informative-error-message-for-ignored-noti.patch - -# UDEV PATCHES -# ============ -# NOTE: all udev patches start with 1XXX-*.patch, do not use anything else. -# Udev patches mean: patches that affect udev code, src/{udev,libudev} -# nothing else, even if the patch might affect indirectly udev, as long -# 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 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 -Patch1003: 1003-udev-netlink-null-rules.patch -# PATCH-FIX-OPENSUSE 1005-create-default-links-for-primary-cd_dvd-drive.patch -Patch1005: 1005-create-default-links-for-primary-cd_dvd-drive.patch -# PATCH-FIX-OPENSUSE 1006-udev-always-rename-network.patch -Patch1006: 1006-udev-always-rename-network.patch -# PATCH-FIX-OPENSUSE 1007-physical-hotplug-cpu-and-memory.patch -Patch1007: 1007-physical-hotplug-cpu-and-memory.patch -# PATCH-FIX-SUSE skip btrfs check if devices are not ready (bnc#872929) -Patch1011: 1011-64-btrfs.rules-skip-btrfs-check-if-devices-are-not-r.patch -# PATCH-FIX-SUSE skip persistent device link creation on mp device (bnc#872929) -Patch1012: 1012-Skip-persistent-device-link-creation-on-multipath-de.patch -# PATCH-FIX-SUSE 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch -Patch1035: 1035-99-systemd.rules-Ignore-devices-with-SYSTEMD_READY-0.patch -# PATCH-FIX-SUSE See bnc#882714 comment #51 -Patch1037: 1037-udev-exclude-cd-dvd-from-block-device.patch -# PATCH-FIX-SUSE 1062-rules-set-default-permissions-for-GenWQE-devices.patch (bnc#890977) -Patch1062: 1062-rules-set-default-permissions-for-GenWQE-devices.patch -# PATCH-FIX-SUSE 1066-udev-add-compatibility-links-for-truncated-by-id-links.patch (bnc#886852) -Patch1066: 1066-udev-add-compatibility-links-for-truncated-by-id-links.patch -# PATCH-FIX-SUSE 1095-set-ssd-disk-to-use-deadline-scheduler.patch (bnc#904517) -Patch1095: 1095-set-ssd-disk-to-use-deadline-scheduler.patch -# PATCH-FIX-SUSE 1096-new-udev-root-symlink-generator.patch -Patch1096: 1096-new-udev-root-symlink-generator.patch -# PATCH-FIX-SUSE 1097-udevd-increase-maximum-number-of-children.patch -Patch1097: 1097-udevd-increase-maximum-number-of-children.patch -# PATCH-FIX-OPENSUSE 1098-systemd-networkd-alias-network-service.patch -Patch1098: 1098-systemd-networkd-alias-network-service.patch -# PATCH-FIX-OPENSUSE 1099-Add-default-rules-for-valve-steam-controller-to-work.patch -Patch1099: 1099-Add-default-rules-for-valve-steam-controller-to-work.patch -# PATCH-FIX-OPENSUSE hostname-NULL.patch - fix crash on xen build hosts in OBS Marcus Meissner -Patch1100: hostname-NULL.patch +Source1065: udev-remount-tmpfs %description Systemd is a system and service manager, compatible with SysV and LSB @@ -321,20 +165,6 @@ maintains mount and automount points and implements an elaborate transactional dependency-based service control logic. It can work as a drop-in replacement for sysvinit. - -%package bash-completion -Summary: Bash completion support for systemd -License: LGPL-2.1+ -Group: System/Base -Requires: bash -%if %{with bash_completion} -Requires: bash-completion -%endif -BuildArch: noarch - -%description bash-completion -Some systemd commands offer bash completion, but it's an optional dependency. - %package devel Summary: Development headers for systemd License: LGPL-2.1+ @@ -342,9 +172,8 @@ Group: Development/Libraries/C and C++ Requires: libsystemd0%{?mini} = %{version}-%{release} Requires: systemd-rpm-macros %if 0%{?bootstrap} -Provides: systemd-devel = %version-%release +Conflicts: systemd-devel %endif -Conflicts: otherproviders(systemd-devel) %description devel Development headers and auxiliary files for developing applications for systemd. @@ -396,27 +225,17 @@ Summary: A rule-based device node and kernel event manager License: GPL-2.0 Group: System/Kernel Url: http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html -PreReq: /bin/rm -# Avoid bootstrap cycle with sg3_utils -%if "%{?mini}" == "" -PreReq: /usr/bin/sg_inq -%endif Requires(pre): /usr/bin/stat Requires(pre): /usr/sbin/groupadd Requires(pre): /usr/bin/getent -Requires(post): libudev%{?mini}1 Requires(post): sed Requires(post): /usr/bin/systemctl -%if %{defined regenerate_initrd_post} +Requires(postun): %insserv_prereq + Requires(post): coreutils -Requires(post): /usr/bin/stat Requires(postun): coreutils -Requires(posttrans): suse-module-tools -Requires(posttrans): /sbin/mkinitrd -%else -Requires(post): /sbin/mkinitrd -Requires(postun): /sbin/mkinitrd -%endif +Requires(posttrans): suse-module-tools >= 12.4 + Conflicts: systemd < 39 Conflicts: aaa_base < 11.5 Conflicts: filesystem < 11.5 @@ -425,10 +244,12 @@ Conflicts: util-linux < 2.16 Conflicts: ConsoleKit < 0.4.1 Requires: filesystem %if 0%{?bootstrap} -Provides: udev = %version-%release -Conflicts: kiwi +Provides: udev = %{version} +Conflicts: libudev1 +Conflicts: udev +# avoid kiwi picking it for bootstrap +Requires: this-is-only-for-build-envs %endif -Conflicts: otherproviders(udev) %description -n udev%{?mini} Udev creates and removes device nodes in /dev for devices discovered or @@ -437,15 +258,15 @@ and dispatches them according to rules in /lib/udev/rules.d/. Matching rules may name a device node, create additional symlinks to the node, call tools to initialize a device, or load needed kernel modules. - - %package -n libudev%{?mini}1 -# This really should have been libudev1%{?mini}, but requires changes to prjconf :-/ Summary: Dynamic library to access udev device information License: LGPL-2.1+ Group: System/Libraries %if 0%{?bootstrap} Conflicts: libudev1 +Conflicts: kiwi +# avoid kiwi picking it for bootstrap +Requires: this-is-only-for-build-envs %endif %description -n libudev%{?mini}1 @@ -455,12 +276,13 @@ access to udev device information %package -n libudev%{?mini}-devel Summary: Development files for libudev License: LGPL-2.1+ -Group: Development/Libraries/C and C++ -Requires: libudev%{?mini}1 = %version-%release +Group: Development/Libraries/Other +Requires: libudev%{?mini}1 = %{version}-%{release} %if 0%{?bootstrap} -Provides: libudev-devel = %version-%release +Provides: libudev-devel = %{version} +Conflicts: libudev1 = %{version} +Conflicts: libudev-devel %endif -Conflicts: otherproviders(libudev-devel) %description -n libudev%{?mini}-devel This package contains the development files for the library libudev, a @@ -473,17 +295,27 @@ License: LGPL-2.1+ Group: System/Base Provides: syslog Provides: sysvinit(syslog) -Requires(pre): /usr/bin/getent -Requires(pre): /usr/sbin/groupadd -Requires(post): /usr/bin/getent -Requires(post): /usr/bin/setfacl Requires(post): /usr/bin/systemctl -Requires(post): permissions Conflicts: otherproviders(syslog) %description logger This package marks the installation to not use syslog but only the journal. +%package -n nss-resolve +Summary: Plugin for local hostname resolution via systemd-resolved +License: LGPL-2.1+ +Group: System/Libraries +Requires: %{name} = %{version}-%{release} + +%description -n nss-resolve +nss-resolve is a plug-in module for the GNU Name Service Switch (NSS) +functionality of the GNU C Library (glibc) enabling it to resolve host +names via the systemd-resolved(8) service (provided by the systemd +package). + +It replaces the nss-dns plug-in module that traditionally resolves +hostnames via DNS. + %package -n nss-myhostname Summary: Plugin for local system host name resolution License: LGPL-2.1+ @@ -507,10 +339,32 @@ longer necessary. Note that nss-myhostname only provides a workaround for broken software. If nss-myhostname is trigged by an application a message -is logged to /var/log/messages. Please check whether that's worth +is logged to /var/log/messages. Please check whether that is worth a bug report then. This package marks the installation to not use syslog but only the journal. +%endif +%if %{with journal_remote} +%package journal-remote +Summary: Gateway for serving journal events over the network using HTTP +License: LGPL-2.1+ +Group: System/Base +Requires: %{name} = %{version}-%{release} +Requires(post): systemd +Requires(preun): systemd +Requires(postun): systemd + +%description journal-remote +This extends the journal functionality to keep a copy of logs on a +remote server by providing programs to forward journal entries over +the network, using encrypted HTTP, and to write journal files from +serialized journal contents. + +This package contains systemd-journal-gatewayd, +systemd-journal-remote, and systemd-journal-upload. +%endif + +%if %{with machined} %package -n nss-mymachines Summary: Plugin for local virtual host name resolution License: LGPL-2.1+ @@ -521,127 +375,29 @@ nss-myhostname is a plugin for the GNU Name Service Switch (NSS) functionality of the GNU C Library (glibc) providing host name resolution for the locally configured containers and virtual machines systemd-machined knows about. - -%package -n nss-resolve -Summary: Plugin for local hostname resolution via systemd-resolved -License: LGPL-2.1+ -Group: System/Libraries - -%description -n nss-resolve - -%package journal-gateway -Summary: Gateway for serving journal events over the network using HTTP -License: LGPL-2.1+ -Group: System/Base -Requires: %{name} = %{version}-%{release} -Requires(post): systemd -Requires(preun): systemd -Requires(postun): systemd - -%description journal-gateway -systemd-journal-gatewayd serves journal events over the network using HTTP. %endif +%package bash-completion +Summary: Bash completion support for systemd +License: LGPL-2.1+ +Group: System/Base +Requires: bash-completion +BuildArch: noarch + +%description bash-completion +Some systemd commands offer bash completion, but it is an optional dependency. + %prep -%setup -q -n systemd-%version +%setup -q -n systemd-%{version} echo "Checking whether upstream rpm macros changed..." -diff -au "%{S:10}" src/core/macros.systemd.in +#skipped for now +#[ -z "`diff -Naru "%{S:10}" src/core/macros.systemd.in`" ] || exit 1 # only needed for bootstrap %if 0%{?bootstrap} cp %{SOURCE7} m4/ %endif -# systemd patches -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch12 -p1 -%patch16 -p1 -%patch17 -p1 -%patch20 -p1 -%patch21 -p1 -# check if this is still needed, or can be derived from fbdev uaccess rule -# http://lists.freedesktop.org/archives/systemd-devel/2012-November/007561.html -%patch27 -p1 -%patch28 -p1 -%patch37 -p1 -%patch39 -p1 -%patch41 -p1 -%patch42 -p1 -%patch84 -p1 -%patch86 -p1 -%patch90 -p1 -%patch91 -p1 -%patch120 -p1 -%patch178 -p1 -%patch179 -p1 -%patch180 -p1 -%patch182 -p1 -%patch183 -p1 -%patch186 -p1 -%patch188 -p1 -%patch189 -p1 -%patch190 -p1 -%patch191 -p1 -%patch192 -p1 -%patch193 -p1 -%patch197 -p1 -%patch198 -p1 -%patch203 -p1 -%patch208 -p1 -%patch338 -p1 -%patch345 -p1 -%patch352 -p1 -%patch362 -p1 -%patch366 -p1 -%patch368 -p1 -%patch386 -p1 -%patch430 -p1 -%patch475 -p1 -%patch490 -p1 -%patch520 -p1 -%patch521 -p1 -%patch522 -p1 -%patch523 -p1 -%patch524 -p1 -%patch525 -p1 -%patch526 -p1 -%patch527 -p1 -%patch528 -p1 -%patch529 -p1 -%patch530 -p1 -%patch531 -p1 -%patch532 -p1 -%patch533 -p1 -%patch534 -p1 -%patch535 -p1 -%patch536 -p1 -%patch537 -p1 -%patch538 -p1 - -# udev patches -%patch1002 -p1 -%patch1003 -p1 -%patch1005 -p1 -%patch1006 -p1 -%patch1007 -p1 -%patch1011 -p1 -%patch1012 -p1 -%patch1035 -p1 -%if %{with blkrrpart} -%patch1037 -p1 -%endif -%patch1062 -p1 -%patch1066 -p1 -%patch1095 -p1 -%patch1096 -p1 -%patch1097 -p1 -%patch1098 -p1 -%patch1099 -p1 -%patch1100 -p1 - # # In combination with Patch352 set-and-use-default-logconsole.patch # Ensure that journald log on tty10 @@ -652,59 +408,49 @@ sed -ri 's:#TTYPath=/dev/console:#TTYPath=/dev/tty10:' src/journal/journald.conf %build # -# Be sure that fresh build libudev is linked as otherwise no errors are found +# Be sure that fresh build libudev is found and used at linkage time # sed -ri '/^systemd_cryptsetup_CFLAGS/,/^systemd_cryptsetup_LDADD/{ /^$/a\ -systemd_cryptsetup_LDFLAGS = \\\ - $(AM_LDFLAGS) \\\ - -Wl,-rpath-link=$(top_srcdir)/.libs\ +systemd_cryptsetup_LDFLAGS =\\\ + $(AM_LDFLAGS)\\\ + -Wl,-rpath-link=$(top_srcdir)/.libs\ }' Makefile.am -sh autogen.sh -export CFLAGS="%{optflags}" -%if 0%{?suse_version} == 1315 - CFLAGS="$CFLAGS -DNET_IFNAMES=1" -%else - CFLAGS="$CFLAGS -DNET_IFNAMES=0" -%endif +./autogen.sh -# certificate-root is set to /etc/pki/systemd instead of the -# built-in default /etc/ssl as journal-remote and journal-upload -# think they kan put stuff in /etc/ssl/certs then but that -# directory is managed by p11-kit and doesn't serve the purpose -# those programs think -# # keep split-usr until all packages have moved their systemd rules to /usr %configure \ - --with-ntp-servers="0.opensuse.pool.ntp.org 1.opensuse.pool.ntp.org 2.opensuse.pool.ntp.org 3.opensuse.pool.ntp.org" \ --docdir=%{_docdir}/systemd \ --with-pamlibdir=/%{_lib}/security \ --with-dbuspolicydir=%{_sysconfdir}/dbus-1/system.d \ --with-dbussessionservicedir=%{_datadir}/dbus-1/services \ --with-dbussystemservicedir=%{_datadir}/dbus-1/system-services \ - --with-dbusinterfacedir=%{_datadir}/dbus-1/interfaces \ - --with-certificate-root=/etc/pki/systemd \ + --with-certificate-root=%{_sysconfdir}/pki/systemd \ %if 0%{?bootstrap} --disable-myhostname \ --disable-manpages \ - --disable-machined \ - --disable-importd \ -%else - --enable-manpages \ - --with-nss-my-hostname-warning \ +%endif +%if %{with compatlibs} + --enable-compat-libs \ %endif --enable-selinux \ --enable-split-usr \ --disable-static \ + --disable-tests \ --with-rc-local-script-path-start=/etc/init.d/boot.local \ --with-rc-local-script-path-stop=/etc/init.d/halt.local \ --with-debug-shell=/bin/bash \ --disable-smack \ --disable-ima \ + --disable-adm-group \ + --disable-wheel-group \ %if %{without networkd} --disable-networkd \ %endif +%if %{without machined} + --disable-machined \ +%endif %if %{without sysvcompat} --with-sysvinit-path= \ --with-sysvrcnd-path= \ @@ -714,42 +460,35 @@ export CFLAGS="%{optflags}" %endif --disable-kdbus -%make_build V=e -%if ! 0%{?bootstrap} -%make_build V=e update-man-list man -%endif +make %{?_smp_mflags} V=e %install %make_install -install -pm0755 "%_sourcedir/systemd-sysv-install" "%buildroot/%_prefix/lib/systemd/" # move to %{_lib} %if ! 0%{?bootstrap} mv %{buildroot}%{_libdir}/libnss_myhostname.so.2 %{buildroot}/%{_lib} +install -D -m 755 %{S:9} %{buildroot}%{_sbindir}/nss-myhostname-config %endif +# FIXME: these symlinks should die. mkdir -p %{buildroot}/{sbin,lib,bin} ln -sf %{_bindir}/udevadm %{buildroot}/sbin/udevadm ln -sf %{_bindir}/systemd-ask-password %{buildroot}/bin/systemd-ask-password ln -sf %{_bindir}/systemctl %{buildroot}/bin/systemctl ln -sf %{_prefix}/lib/systemd/systemd-udevd %{buildroot}/sbin/udevd -%if ! 0%{?bootstrap} -ln -sf systemd-udevd.8 %{buildroot}/%{_mandir}/man8/udevd.8 -%endif - -%if ! 0%{?bootstrap} -install -D -m 755 %{S:9} %{buildroot}%{_sbindir}/nss-myhostname-config -%endif - -ln -s systemd-udevd.service %{buildroot}/%{_prefix}/lib/systemd/system/udev.service install -m755 -D %{S:1065} %{buildroot}/%{_prefix}/lib/udev/remount-tmpfs -mkdir -p %{buildroot}/%{_prefix}/lib/systemd/system/basic.target.wants rm -rf %{buildroot}%{_sysconfdir}/rpm find %{buildroot} -type f -name '*.la' -delete -mkdir -p %{buildroot}/{sbin,var/lib/systemd/sysv-convert,var/lib/systemd/migrated} %{buildroot}/usr/lib/systemd/{system-generators,user-generators,system-preset,user-preset,system/halt.target.wants,system/kexec.target.wants,system/poweroff.target.wants,system/reboot.target.wants,system/shutdown.target.wants} -install -m755 %{S:3} -D %{buildroot}%{_sbindir}/systemd-sysv-convert +mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/sysv-convert +mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/migrated + +install -m0755 -D %{S:3} %{buildroot}/%{_sbindir}/systemd-sysv-convert +install -m0755 -D %{S:12} %{buildroot}/%{_prefix}/lib/systemd/systemd-sysv-install +install -m0755 %{S:13} %{buildroot}/%{_prefix}/lib/systemd/ + ln -s ../usr/lib/systemd/systemd %{buildroot}/bin/systemd ln -s ../usr/lib/systemd/systemd %{buildroot}/sbin/init ln -s ../usr/bin/systemctl %{buildroot}/sbin/reboot @@ -770,13 +509,18 @@ cp %{buildroot}/%{_prefix}/lib/systemd/system/tmp.mount %{buildroot}/%{_datadir} # 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 -# create %{_libexecdir}/modules-load.d +# create %%{_libexecdir}/modules-load.d mkdir -p %{buildroot}%{_libexecdir}/modules-load.d cat << EOF > %{buildroot}%{_libexecdir}/modules-load.d/sg.conf # load sg module at boot time sg EOF +# To avoid making life hard for Factory developers, don't package the +# kernel.core_pattern setting until systemd-coredump is a part of an actual +# systemd release and it's made clear how to get the core dumps out of the +# journal. + # do not ship sysctl defaults in systemd package, will be part of # aaa_base (in procps for now) rm -f %{buildroot}%{_prefix}/lib/sysctl.d/50-default.conf @@ -785,7 +529,14 @@ rm -f %{buildroot}%{_prefix}/lib/sysctl.d/50-default.conf rm -f %{buildroot}/etc/init.d/README %if 0%{?bootstrap} rm -f %{buildroot}%{_localstatedir}/log/README -rm -rf %{buildroot}%{_datadir}/bash-completion +%endif + +# journal-upload is built if libcurl is installed which can happen +# when importd is enabled (whereas journal_remote is not). +%if ! %{with journal_remote} +rm -f %{buildroot}%{_sysconfdir}/systemd/journal-upload.conf +rm -f %{buildroot}%{_prefix}/lib/systemd/systemd-journal-upload +rm -f %{buildroot}%{_prefix}/lib/systemd/system/systemd-journal-upload.* %endif # legacy links @@ -797,13 +548,19 @@ for f in loginctl journalctl ; do done ln -s /usr/lib/udev %{buildroot}/lib/udev -# Create the /var/log/journal directory to change the volatile journal to a persistent one +# Create the /var/log/journal directory to change the volatile journal +# to a persistent one mkdir -p %{buildroot}%{_localstatedir}/log/journal/ +# This dir must be owned (and thus created) by systemd otherwise the +# build system will complain. This is odd since we simply own a ghost +# file in it... +mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d + # Make sure directories in /var exist mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/coredump mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/catalog -#create ghost databases +# Create ghost databases touch %{buildroot}%{_localstatedir}/lib/systemd/catalog/database touch %{buildroot}%{_sysconfdir}/udev/hwdb.bin @@ -815,8 +572,20 @@ mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-shutdown/ mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-sleep/ # Make sure these directories are properly owned +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/basic.target.wants mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/default.target.wants mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/dbus.target.wants +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/halt.target.wants +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/kexec.target.wants +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/poweroff.target.wants +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/reboot.target.wants +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/shutdown.target.wants + +# Make sure the generator directories are created and properly owned. +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-generators +mkdir -p %{buildroot}%{_prefix}/lib/systemd/user-generators +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system-preset +mkdir -p %{buildroot}%{_prefix}/lib/systemd/user-preset # create drop-in to prevent tty1 to be cleared (bnc#804158) mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/getty@tty1.service.d/ @@ -826,18 +595,12 @@ cat << EOF > %{buildroot}%{_prefix}/lib/systemd/system/getty@tty1.service.d/nocl TTYVTDisallocate=no EOF -#ensure we get the running kernel sysctl settings. - -cat << EOF > %{buildroot}%{_prefix}/lib/tmpfiles.d/current-kernel-sysctl.conf -d! /run/sysctl.d -L! /run/sysctl.d/00-kernel-%v.conf - - - - /boot/sysctl.conf-%v -EOF - -mkdir -p %{buildroot}/%{_prefix}/lib/systemd/system/systemd-sysctl.service.d - -cat << EOF > %{buildroot}/%{_prefix}/lib/systemd/system/systemd-sysctl.service.d/after.conf -[Unit] -After=local-fs.target +# create drop-in to prevent delegate=yes for root user (bsc#954765, +# bnc#953241, fate#320421) +mkdir -p %{buildroot}%{_prefix}/lib/systemd/system/user@0.service.d/ +cat >%{buildroot}%{_prefix}/lib/systemd/system/user@0.service.d/nodelagate.conf < %{buildroot}%{_localstatedir}/lib/systemd/random-seed - -# On systems supporting rollbacks with btrfs, /var/lib/machines -# subvolume must be created differently. Normally the installer takes -# care of this now but some systems uses a plain subvolume that breaks -# snapshots, rollback ("nearly everything" see bsc#992573). This -# script should help fixing it. -install -m 755 %{S:13} %{buildroot}/%{_prefix}/lib/systemd/ +mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/random-seed %fdupes -s %{buildroot}%{_mandir} -%if ! 0%{?bootstrap} -for f in %{buildroot}%{_datadir}/bash-completion/completions/* -do - test -e "$f" || break - grep -q _init_completion "$f" || continue - echo "%exclude %{_datadir}/bash-completion/completions/${f##*/}" -done > files.completion -%else -> files.completion -%endif - # packaged in systemd-rpm-macros rm -f %{buildroot}/%{_prefix}/lib/rpm/macros.d/macros.systemd -%if %{without compat_libs} -lib=%{_libdir}/libsystemd.so -for lnk in daemon login id128 journal -do - lnk=%{buildroot}%{_libdir}/libsystemd-${lnk}.so - echo '/* GNU ld script */' > ${lnk} - echo 'INPUT('${lib}')' >> ${lnk} -done -%endif - -# Some files which may created by us or by the admin later on -mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d -for ghost in X11/xorg.conf.d/00-keyboard.conf vconsole.conf locale.conf \ - machine-id machine-info \ - systemd/system/runlevel2.target \ - systemd/system/runlevel3.target \ - systemd/system/runlevel4.target \ - systemd/system/runlevel4.target \ - systemd/system/runlevel5.target -do - > %{buildroot}%{_sysconfdir}/$ghost -done +# Make sure to disable all services by default. The Suse branding +# presets package takes care of defining the right policies. +rm -f %{buildroot}%{_prefix}/lib/systemd/system-preset/*.preset +echo 'disable *' >%{buildroot}%{_prefix}/lib/systemd/system-preset/99-default.preset # Workaround for bug #882393 for runlevel in poweroff rescue multi-user graphical reboot @@ -900,86 +627,72 @@ do ln -sf ../systemd-update-utmp-runlevel.service %{buildroot}%{_prefix}/lib/systemd/system/${runlevel}.target.wants/ 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 +# Add entries for xkeyboard-config converted keymaps; mappings, which +# already exist in original systemd mapping table are being ignored +# though, i.e. not overwritten; needed as long as YaST uses console +# keymaps internally and calls localectl to convert from vconsole to +# X11 keymaps. Ideally YaST should switch to X11 layout names (the +# mapping table wouldn't be needed since each X11 keymap has a +# generated xkbd keymap) and let localectl initialize +# /etc/vconsole.conf and /etc/X11/xorg.conf.d/00-keyboard.conf +# (FATE#319454). 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" + cat /usr/share/systemd/kbd-model-map.xkb-generated \ + >>%{buildroot}%{_datarootdir}/systemd/kbd-model-map fi +# kbd-model-map.legacy is used to provide mapping for legacy keymaps, +# which may still be used by yast. +cat %{S:13} >>%{buildroot}%{_datarootdir}/systemd/kbd-model-map + %find_lang systemd %pre -for name in journal timesync network resolve bus-proxy -do - getent group systemd-$name >/dev/null && continue - groupadd -r systemd-$name || : -done -for name in adm input tape -do - getent group $name >/dev/null && continue - groupadd -r $name || : -done -for name in timesync network resolve bus-proxy -do - getent passwd systemd-$name >/dev/null && continue - case "$name" in - timesync) descr="Systemd Time Synchronization" ;; - network) descr="Systemd Network Management" ;; - resolve) descr="Systemd Resolver" ;; - bus-proxy) descr="Systemd Bus Proxy" ;; - esac - useradd -r -l -g systemd-$name systemd-$name -s /usr/sbin/nologin -d / -c "$descr" || : -done +# Build of installation images uses an hard coded list of some +# packages with a %pre that needs to be run during the +# build. Unfortunately, systemd in one of them. To make thing simpler +# we use a %pre section even if it is not needed. exit 0 %post +%sysusers_create /usr/lib/sysusers.d/systemd.conf %if ! 0%{?bootstrap} -/usr/sbin/pam-config -a --systemd || : +pam-config -a --systemd || : %endif -/sbin/ldconfig -[ -e %{_localstatedir}/lib/random-seed ] && mv %{_localstatedir}/lib/random-seed %{_localstatedir}/lib/systemd/ > /dev/null || : -/usr/bin/systemd-machine-id-setup || : +ldconfig +[ -e %{_localstatedir}/lib/random-seed ] && mv %{_localstatedir}/lib/random-seed %{_localstatedir}/lib/systemd/ || : +systemd-machine-id-setup || : /usr/lib/systemd/systemd-random-seed save || : -/usr/bin/systemctl daemon-reexec || : -/usr/bin/journalctl --update-catalog || : -# Make sure new journal files -chgrp systemd-journal %{_localstatedir}/log/journal/ || : -chmod g+s %{_localstatedir}/log/journal/ || : -if read ID < /etc/machine-id > /dev/null 2>&1 ; then - chgrp systemd-journal "%{_localstatedir}/log/journal/$ID" || : - chmod g+s "%{_localstatedir}/log/journal/$ID" || : -fi -%if %{with systemgrps} -getent group wheel && setfacl -Rnm g:wheel:rx,d:g:wheel:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : -getent group adm && setfacl -Rnm g:adm:rx,d:g:adm:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : -%endif -systemd-sysusers || : +systemctl daemon-reexec || : +%journal_catalog_update +%tmpfiles_create # Try to read default runlevel from the old inittab if it exists if [ ! -e /etc/systemd/system/default.target -a -e /etc/inittab ]; then - runlevel=$(awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab 2> /dev/null) + runlevel=$(awk -F ':' '$3 == "initdefault" && $1 !~ "^#" { print $2 }' /etc/inittab) if [ -n "$runlevel" ] ; then - /bin/ln -sf /usr/lib/systemd/system/runlevel$runlevel.target /etc/systemd/system/default.target 2>&1 || : + ln -sf /usr/lib/systemd/system/runlevel$runlevel.target /etc/systemd/system/default.target || : fi 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. - # 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 +if [ $1 -eq 1 ]; then + # Enable systemd services according to the distro defaults. + # Note: systemctl might abort prematurely if it fails on one + # unit. + systemctl preset remote-fs.target || : + systemctl preset getty@.service || : + systemctl preset systemd-networkd.service || : + systemctl preset systemd-networkd-wait-online.service || : + systemctl preset systemd-timesyncd.service || : + systemctl preset systemd-resolved.service || : +fi >/dev/null # since v207 /etc/sysctl.conf is no longer parsed, however # backward compatibility is provided by /etc/sysctl.d/99-sysctl.conf if [ ! -L /etc/sysctl.d/99-sysctl.conf -a -e /etc/sysctl.conf ]; then - /bin/ln -sf /etc/sysctl.conf /etc/sysctl.d/99-sysctl.conf || : + ln -sf /etc/sysctl.conf /etc/sysctl.d/99-sysctl.conf || : fi # migrate any symlink which may refer to the old path @@ -993,7 +706,7 @@ done # 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 +case $(systemctl is-enabled tmp.mount 2>/dev/null) in enabled) ;; *) rm -f %{_prefix}/lib/systemd/system/tmp.mount esac @@ -1001,38 +714,54 @@ esac # Convert /var/lib/machines subvolume to make it suitable for # rollbacks, if needed. See bsc#992573. The installer has been fixed # to create it at installation time. +# +# The convertion might only be problematic for openSUSE distros +# (TW/Factory) where previous versions had already created the +# subvolume at the wrong place (via tmpfiles for example) and user +# started to populate and use it. In this case we'll let the user fix +# it manually. +# +# For SLE12 this subvolume was only introduced during the upgrade from +# v210 to v228 when we added this workaround. Note that the subvolume +# is still created at the wrong place due to the call to +# tmpfiles_create macro previously however it's empty so there +# shouldn't be any issues. if [ $1 -gt 1 ]; then - %{_prefix}/lib/systemd/fix-machines-subvol-for-rollbacks.sh || : + %{_prefix}/lib/systemd/fix-machines-subvol-for-rollbacks.sh || : fi %postun -/sbin/ldconfig +ldconfig if [ $1 -ge 1 ]; then - /usr/bin/systemctl daemon-reload || : - #Avoid restarting logind [bnc#934901] until fixed upstream - #/usr/bin/systemctl try-restart systemd-logind.service || : + systemctl daemon-reload || : + # Avoid restarting logind [bnc#934901] until fixed upstream + #systemctl try-restart systemd-logind.service >/dev/null 2>&1 || : fi %if ! 0%{?bootstrap} if [ $1 -eq 0 ]; then - /usr/sbin/pam-config -d --systemd || : + pam-config -d --systemd || : fi %endif %preun if [ $1 -eq 0 ]; then - /usr/bin/systemctl disable \ - getty@.service \ - remote-fs.target || : - rm -f /etc/systemd/system/default.target 2>&1 || : -fi + systemctl disable remote-fs.target || : + systemctl disable getty@.service || : + systemctl disable systemd-networkd.service || : + systemctl disable systemd-networkd-wait-online.service || : + systemctl disable systemd-timesyncd.service || : + systemctl disable systemd-resolved.service || : + + rm -f /etc/systemd/system/default.target +fi >/dev/null -# pretrans section must always use lua %pretrans -n udev%{?mini} -p if posix.stat("/lib/udev") and not posix.stat("/usr/lib/udev") then posix.symlink("/lib/udev", "/usr/lib/udev") end %pre -n udev%{?mini} + %regenerate_initrd_post if test -L /usr/lib/udev -a /lib/udev -ef /usr/lib/udev ; then rm /usr/lib/udev mv /lib/udev /usr/lib @@ -1040,135 +769,94 @@ if test -L /usr/lib/udev -a /lib/udev -ef /usr/lib/udev ; then elif [ ! -e /lib/udev ]; then ln -s /usr/lib/udev /lib/udev fi -# Create "tape" group which is referenced by 50-udev-default.rules and 60-persistent-storage-tape.rules + +# Create "tape"/"input" group which is referenced by some udev rules +# that we're shipping. FIXME: maybe we should consider using +# "sysusers_create basic.conf" instead ? getent group tape >/dev/null || groupadd -r tape || : -# kill daemon if we are not in a chroot -if test -f /proc/1/exe -a -d /proc/1/root ; then - if test "$(stat -Lc '%%D-%%i' /)" = "$(stat -Lc '%%D-%%i' /proc/1/root)"; then - systemctl stop systemd-udevd-control.socket systemd-udevd-kernel.socket systemd-udevd.service udev.service udev-control.socket udev-kernel.socket || : - udevadm control --exit || : - fi -fi +getent group input >/dev/null || groupadd -r input || : %post -n udev%{?mini} -/usr/bin/udevadm hwdb --update || : -if [ -f /etc/udev/rules.d/70-persistent-net.rules ]; then - # add KERNEL name match to existing persistent net rules - sed -ri '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \ - /etc/udev/rules.d/70-persistent-net.rules || : -fi +%udev_hwdb_update + +# add KERNEL name match to existing persistent net rules +sed -ri '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \ + /etc/udev/rules.d/70-persistent-net.rules 2>/dev/null || : + # cleanup old stuff rm -f /etc/sysconfig/udev -rm -f /etc/udev/rules.d/20-cdrom.rules -rm -f /etc/udev/rules.d/55-cdrom.rules -rm -f /etc/udev/rules.d/65-cdrom.rules -systemctl daemon-reload || : -# start daemon if we are not in a chroot -if test -f /proc/1/exe -a -d /proc/1/root; then - if test "$(stat -Lc '%%D-%%i' /)" = "$(stat -Lc '%%D-%%i' /proc/1/root)"; then - if ! systemctl start systemd-udevd.service; then - /usr/lib/systemd/systemd-udevd --daemon || : - fi - fi -fi - -if [ "${YAST_IS_RUNNING}" != "instsys" ]; then - if [ -e %{_localstatedir}/lib/no_initrd_recreation_by_suspend ]; then - echo "Skipping recreation of existing initial ramdisks, due" - echo "to presence of %{_localstatedir}/lib/no_initrd_recreation_by_suspend" -%if %{defined regenerate_initrd_post} - else - %regenerate_initrd_post -%else - elif [ -x /sbin/mkinitrd ]; then - [ -x /sbin/mkinitrd_setup ] && /sbin/mkinitrd_setup - /sbin/mkinitrd || : -%endif - fi -fi +rm -f /etc/udev/rules.d/{20,55,65}-cdrom.rules %postun -n udev%{?mini} - +%regenerate_initrd_post +%insserv_cleanup systemctl daemon-reload || : +%systemd_postun_with_restart systemd-udevd-{control,kernel}.socket systemd-udevd.service -if [ "${YAST_IS_RUNNING}" != "instsys" ]; then - if [ -e %{_localstatedir}/lib/no_initrd_recreation_by_suspend ]; then - echo "Skipping recreation of existing initial ramdisks, due" - echo "to presence of %{_localstatedir}/lib/no_initrd_recreation_by_suspend" -%if %{defined regenerate_initrd_post} - else - %regenerate_initrd_post -%else - elif [ -x /sbin/mkinitrd ]; then - [ -x /sbin/mkinitrd_setup ] && /sbin/mkinitrd_setup - /sbin/mkinitrd || : -%endif - fi -fi - -%if %{defined regenerate_initrd_post} %posttrans -n udev%{?mini} %regenerate_initrd_posttrans -%endif -%post -n libsystemd0%{?mini} -p /sbin/ldconfig -%postun -n libsystemd0%{?mini} -p /sbin/ldconfig -%post -n libudev%{?mini}1 -p /sbin/ldconfig +%post -n libudev%{?mini}1 -p /sbin/ldconfig +%post -n libsystemd0%{?mini} -p /sbin/ldconfig + %postun -n libudev%{?mini}1 -p /sbin/ldconfig +%postun -n libsystemd0%{?mini} -p /sbin/ldconfig %if ! 0%{?bootstrap} - -%if %{with permission} -%verifyscript logger -%verify_permissions -e %{_localstatedir}/log/journal/ -%endif - -%pre logger -getent group systemd-journal >/dev/null || groupadd -r systemd-journal || : -exit 0 - %post logger -%if %{with permission} -%set_permissions %{_localstatedir}/log/journal/ -%endif -%if %{with systemgrps} -getent group wheel && setfacl -Rnm g:wheel:rx,d:g:wheel:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : -getent group adm && setfacl -Rnm g:adm:rx,d:g:adm:rx %{_localstatedir}/log/journal/ > /dev/null 2>&1 || : -%endif +systemd-tmpfiles --create --prefix=%{_localstatedir}/log/journal/ || : if [ "$1" -eq 1 ]; then # tell journal to start logging on disk if directory didn't exist before - systemctl --no-block restart systemd-journal-flush.service || : + systemctl --no-block restart systemd-journal-flush.service >/dev/null || : fi +%endif +%if ! 0%{?bootstrap} %preun -n nss-myhostname if [ "$1" -eq 0 -a -f /etc/nsswitch.conf ] ; then %{_sbindir}/nss-myhostname-config --disable fi %post -n nss-myhostname -p /sbin/ldconfig - %postun -n nss-myhostname -p /sbin/ldconfig +%endif +%if %{with resolved} +%post -n nss-resolve -p /sbin/ldconfig +%postun -n nss-resolve -p /sbin/ldconfig +%endif + +%if %{with machined} %post -n nss-mymachines -p /sbin/ldconfig %postun -n nss-mymachines -p /sbin/ldconfig - -%pre journal-gateway -getent passwd systemd-journal-gateway >/dev/null || useradd -r -l -g systemd-journal-gateway -d %{_localstatedir}/log/journal/ -s /usr/sbin/nologin -c "Systemd Journal Gateway" systemd-journal-gateway || : -getent group systemd-journal-gateway >/dev/null || groupadd -r systemd-journal-gateway || : -%service_add_pre systemd-journal-gatewayd.socket systemd-journal-gatewayd.service -exit 0 - -%post journal-gateway -%service_add_post systemd-journal-gatewayd.socket systemd-journal-gatewayd.service - -%preun journal-gateway -%service_del_preun systemd-journal-gatewayd.socket systemd-journal-gatewayd.service - -%postun journal-gateway -%service_del_postun systemd-journal-gatewayd.socket systemd-journal-gatewayd.service - %endif +%if %{with journal_remote} +%pre journal-remote +%service_add_pre systemd-journal-gatewayd.socket systemd-journal-gatewayd.service +%service_add_pre systemd-journal-remote.socket systemd-journal-remote.service +%service_add_pre systemd-journal-upload.service + +%post journal-remote +%sysusers_create %{_libexecdir}/sysusers.d/systemd-remote.conf +%tmpfiles_create %{_libexecdir}/tmpfiles.d/systemd-remote.conf +%service_add_post systemd-journal-gatewayd.socket systemd-journal-gatewayd.service +%service_add_post systemd-journal-remote.socket systemd-journal-remote.service +%service_add_post systemd-journal-upload.service + +%preun journal-remote +%service_del_preun systemd-journal-gatewayd.socket systemd-journal-gatewayd.service +%service_del_preun systemd-journal-remote.socket systemd-journal-remote.service +%service_del_preun systemd-journal-upload.service + +%postun journal-remote +%service_del_postun systemd-journal-gatewayd.socket systemd-journal-gatewayd.service +%service_del_postun systemd-journal-remote.socket systemd-journal-remote.service +%service_del_postun systemd-journal-upload.service +%endif + +%clean + %files -f systemd.lang %defattr(-,root,root) /bin/systemd @@ -1182,7 +870,7 @@ exit 0 %{_bindir}/kernel-install %{_bindir}/hostnamectl %{_bindir}/localectl -%if ! 0%{?bootstrap} +%if %{with machined} %{_bindir}/machinectl %endif %{_bindir}/systemctl @@ -1219,16 +907,17 @@ exit 0 %dir %{_prefix}/lib/systemd %dir %{_prefix}/lib/systemd/user %dir %{_prefix}/lib/systemd/system +%exclude %{_prefix}/lib/systemd/systemd-journal-gatewayd +%exclude %{_prefix}/lib/systemd/systemd-journal-remote +%exclude %{_prefix}/lib/systemd/systemd-journal-upload %exclude %{_prefix}/lib/systemd/systemd-sysv* -%exclude %{_prefix}/lib/systemd/system/systemd-udev*.* -%exclude %{_prefix}/lib/systemd/system/udev.service -%exclude %{_prefix}/lib/systemd/system/initrd-udevadm-cleanup-db.service -%exclude %{_prefix}/lib/systemd/system/systemd-udev-root-symlink.service -%exclude %{_prefix}/lib/systemd/system/*.target.wants/systemd-udev*.* -%exclude %{_prefix}/lib/systemd/system/sysinit.target.wants/systemd-udev-root-symlink.service -%if ! 0%{?bootstrap} +%exclude %{_prefix}/lib/systemd/systemd-udevd %exclude %{_prefix}/lib/systemd/system/systemd-journal-gatewayd.* -%endif +%exclude %{_prefix}/lib/systemd/system/systemd-journal-remote.* +%exclude %{_prefix}/lib/systemd/system/systemd-journal-upload.* +%exclude %{_prefix}/lib/systemd/system/systemd-udev*.* +%exclude %{_prefix}/lib/systemd/system/*.target.wants/systemd-udev*.* +%exclude %{_prefix}/lib/systemd/system/initrd-udevadm-cleanup-db.service %{_prefix}/lib/systemd/system/*.automount %{_prefix}/lib/systemd/system/*.service %{_prefix}/lib/systemd/system/*.slice @@ -1241,67 +930,47 @@ exit 0 %{_prefix}/lib/systemd/user/*.target %{_prefix}/lib/systemd/user/*.service %{_prefix}/lib/systemd/user/*.socket -%exclude %{_prefix}/lib/systemd/systemd-udevd -%if ! 0%{?bootstrap} -%exclude %{_prefix}/lib/systemd/systemd-journal-gatewayd -%endif %{_prefix}/lib/systemd/systemd-* %{_prefix}/lib/systemd/systemd %{_prefix}/lib/systemd/fix-machines-subvol-for-rollbacks.sh %dir %{_prefix}/lib/systemd/catalog %{_prefix}/lib/systemd/catalog/systemd.catalog %{_prefix}/lib/systemd/catalog/systemd.*.catalog -%dir %{_prefix}/lib/systemd/system-shutdown -%dir %{_prefix}/lib/systemd/system-preset -%dir %{_prefix}/lib/systemd/user-preset -%dir %{_prefix}/lib/systemd/system-generators -%dir %{_prefix}/lib/systemd/user-generators -%{_prefix}/lib/systemd/user-generators/systemd-dbus1-generator +%{_prefix}/lib/systemd/system-preset +%{_prefix}/lib/systemd/user-preset +%{_prefix}/lib/systemd/system-generators +%{_prefix}/lib/systemd/user-generators %dir %{_prefix}/lib/systemd/ntp-units.d/ %dir %{_prefix}/lib/systemd/system-shutdown/ %dir %{_prefix}/lib/systemd/system-sleep/ %dir %{_prefix}/lib/systemd/system/default.target.wants %dir %{_prefix}/lib/systemd/system/dbus.target.wants %dir %{_prefix}/lib/systemd/system/getty@tty1.service.d +%dir %{_prefix}/lib/systemd/system/user@0.service.d %{_prefix}/lib/systemd/system/getty@tty1.service.d/noclear.conf -%dir %{_prefix}/lib/systemd/system/systemd-sysctl.service.d -%{_prefix}/lib/systemd/system/systemd-sysctl.service.d/after.conf -%if ! 0%{?bootstrap} -%{_prefix}/lib/systemd/system-generators/systemd-cryptsetup-generator +%{_prefix}/lib/systemd/system/user@0.service.d/nodelagate.conf +%if %{with importd} +%{_prefix}/lib/systemd/import-pubring.gpg %endif -%{_prefix}/lib/systemd/system-generators/systemd-dbus1-generator -%{_prefix}/lib/systemd/system-generators/systemd-debug-generator -%{_prefix}/lib/systemd/system-generators/systemd-hibernate-resume-generator -%if %{with sysvcompat} -%{_prefix}/lib/systemd/system-generators/systemd-sysv-generator -%{_prefix}/lib/systemd/system-generators/systemd-rc-local-generator -%{_prefix}/lib/systemd/system-generators/systemd-insserv-generator -%endif -%{_prefix}/lib/systemd/system-generators/systemd-getty-generator -%{_prefix}/lib/systemd/system-generators/systemd-fstab-generator -%{_prefix}/lib/systemd/system-generators/systemd-system-update-generator -%{_prefix}/lib/systemd/system-generators/systemd-gpt-auto-generator -%{_prefix}/lib/systemd/system-preset/ -%{_prefix}/lib/sysusers.d/ /%{_lib}/security/pam_systemd.so -%config /etc/pam.d/systemd-user -%if ! 0%{?bootstrap} -%ifarch %{ix86} x86_64 +%if %{with gnuefi} %dir %{_prefix}/lib/systemd/boot %dir %{_prefix}/lib/systemd/boot/efi %{_prefix}/lib/systemd/boot/efi/*.efi %{_prefix}/lib/systemd/boot/efi/*.stub %endif -%endif %dir %{_libexecdir}/modules-load.d %dir %{_sysconfdir}/modules-load.d %{_libexecdir}/modules-load.d/sg.conf -%dir %{_libexecdir}/tmpfiles.d +%{_libexecdir}/sysusers.d/ +%exclude %{_libexecdir}/sysusers.d/systemd-remote.conf + %dir %{_sysconfdir}/tmpfiles.d -%{_libexecdir}/tmpfiles.d/*.conf +%{_libexecdir}/tmpfiles.d/ +%exclude %{_libexecdir}/tmpfiles.d/systemd-remote.conf %dir %{_libexecdir}/binfmt.d %dir %{_sysconfdir}/binfmt.d @@ -1310,42 +979,48 @@ exit 0 %dir %{_sysconfdir}/sysctl.d %{_prefix}/lib/sysctl.d/50-coredump.conf +%dir %{_sysconfdir}/X11/xinit +%dir %{_sysconfdir}/X11/xinit/xinitrc.d +%dir %{_sysconfdir}/X11/xorg.conf.d +%dir %{_sysconfdir}/dbus-1 +%dir %{_sysconfdir}/dbus-1/system.d %dir %{_sysconfdir}/systemd %dir %{_sysconfdir}/systemd/system %dir %{_sysconfdir}/systemd/user %dir %{_sysconfdir}/xdg/systemd -%dir %{_sysconfdir}/dbus-1 -%dir %{_sysconfdir}/dbus-1/system.d %{_sysconfdir}/xdg/systemd/user -%dir %{_datadir}/dbus-1 -%dir %{_datadir}/dbus-1/services -%dir %{_datadir}/dbus-1/system-services +%{_sysconfdir}/X11/xinit/xinitrc.d/50-systemd-user.sh + +%config(noreplace) %{_sysconfdir}/pam.d/systemd-user %config(noreplace) %{_sysconfdir}/systemd/bootchart.conf %config(noreplace) %{_sysconfdir}/systemd/coredump.conf -%if !0%{?bootstrap} -%config(noreplace) %{_sysconfdir}/systemd/journal-remote.conf -%config(noreplace) %{_sysconfdir}/systemd/journal-upload.conf -%endif %config(noreplace) %{_sysconfdir}/systemd/timesyncd.conf %config(noreplace) %{_sysconfdir}/systemd/system.conf %config(noreplace) %{_sysconfdir}/systemd/logind.conf %config(noreplace) %{_sysconfdir}/systemd/journald.conf %config(noreplace) %{_sysconfdir}/systemd/user.conf +%if %{with resolved} +%config(noreplace) %{_sysconfdir}/systemd/resolved.conf +%endif %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf -%if !0%{?bootstrap} +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf +%if %{with machined} %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf %endif %if %{with networkd} %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.network1.conf %endif -%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf -%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf -%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf +%if %{with resolved} +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.resolve1.conf +%endif +%if %{with importd} +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf +%endif -%{_sysconfdir}/X11/xinit/ -# Some files which may created by us -%dir %{_sysconfdir}/X11/xorg.conf.d +# Some files created by us. %ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf %ghost %config(noreplace) %{_sysconfdir}/vconsole.conf %ghost %config(noreplace) %{_sysconfdir}/locale.conf @@ -1356,121 +1031,114 @@ exit 0 %ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel4.target %ghost %config(noreplace) %{_sysconfdir}/systemd/system/runlevel5.target -%{_datadir}/factory/ -%{_datadir}/dbus-1/services/org.freedesktop.systemd1.service +%{_prefix}/lib/systemd/system/org.freedesktop.systemd1.busname +%{_prefix}/lib/systemd/system/org.freedesktop.locale1.busname +%{_prefix}/lib/systemd/system/org.freedesktop.login1.busname +%{_prefix}/lib/systemd/system/org.freedesktop.hostname1.busname +%{_prefix}/lib/systemd/system/org.freedesktop.timedate1.busname %if %{with networkd} %{_prefix}/lib/systemd/system/org.freedesktop.network1.busname +%endif +%if %{with resolved} +%{_prefix}/lib/systemd/system/org.freedesktop.resolve1.busname +%endif +%if %{with machined} +%{_prefix}/lib/systemd/system/org.freedesktop.machine1.busname +%endif +%if %{with importd} +%{_prefix}/lib/systemd/system/org.freedesktop.import1.busname +%endif + +%{_datadir}/systemd +%{_datadir}/factory +%exclude %{_datadir}/systemd/gatewayd + +%dir %{_datadir}/dbus-1 +%dir %{_datadir}/dbus-1/services +%dir %{_datadir}/dbus-1/system-services +%{_datadir}/dbus-1/services/org.freedesktop.systemd1.service +%{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service +%{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service +%{_datadir}/dbus-1/system-services/org.freedesktop.login1.service +%{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service +%{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service +%if %{with networkd} %{_datadir}/dbus-1/system-services/org.freedesktop.network1.service %endif -%{_prefix}/lib/systemd/system/org.freedesktop.systemd1.busname -%{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service -%{_prefix}/lib/systemd/system/org.freedesktop.locale1.busname -%{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service -%{_prefix}/lib/systemd/system/org.freedesktop.login1.busname -%{_datadir}/dbus-1/system-services/org.freedesktop.login1.service -%{_prefix}/lib/systemd/system/org.freedesktop.hostname1.busname -%{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service -%if !0%{?bootstrap} -%{_prefix}/lib/systemd/system/org.freedesktop.machine1.busname +%if %{with resolved} +%{_datadir}/dbus-1/system-services/org.freedesktop.resolve1.service +%endif +%if %{with machined} %{_datadir}/dbus-1/system-services/org.freedesktop.machine1.service %endif -%{_prefix}/lib/systemd/system/org.freedesktop.timedate1.busname +%if %{with importd} +%{_datadir}/dbus-1/system-services/org.freedesktop.import1.service +%endif -%{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service %dir %{_datadir}/polkit-1 %dir %{_datadir}/polkit-1/actions -%if !0%{?bootstrap} -%{_datadir}/polkit-1/actions/org.freedesktop.machine1.policy -%endif %{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy %{_datadir}/polkit-1/actions/org.freedesktop.hostname1.policy %{_datadir}/polkit-1/actions/org.freedesktop.locale1.policy %{_datadir}/polkit-1/actions/org.freedesktop.timedate1.policy %{_datadir}/polkit-1/actions/org.freedesktop.login1.policy -%if ! 0%{?bootstrap} -%exclude %{_datadir}/systemd/gatewayd +%if %{with machined} +%{_datadir}/polkit-1/actions/org.freedesktop.machine1.policy +%endif +%if %{with importd} +%{_datadir}/polkit-1/actions/org.freedesktop.import1.policy %endif -%{_datadir}/systemd %if ! 0%{?bootstrap} -%_mandir/man1/[a-rt-z]*ctl.1* -%_mandir/man1/systemc*.1* -%_mandir/man1/systemd*.1* -%_mandir/man5/[a-tv-z]* -%_mandir/man5/user* -%_mandir/man7/[bdfks]* -%_mandir/man8/kern* -%_mandir/man8/pam_* -%_mandir/man8/systemd-[a-gik-tv]* -%_mandir/man8/systemd-h[aioy]* -%_mandir/man8/systemd-journal-remote.* -%_mandir/man8/systemd-journal-upload.* -%_mandir/man8/systemd-journald* -%_mandir/man8/systemd-u[ps]* +%{_mandir}/man1/[a-rt-z]*ctl.1* +%{_mandir}/man1/systemc*.1* +%{_mandir}/man1/systemd*.1* +%{_mandir}/man5/[a-tv-z]* +%{_mandir}/man5/user* +%{_mandir}/man7/[bdfks]* +%{_mandir}/man8/kern* +%{_mandir}/man8/pam_* +%{_mandir}/man8/systemd-[a-gik-tv]* +%{_mandir}/man8/systemd-h[aioy]* +%{_mandir}/man8/systemd-journald* +%{_mandir}/man8/systemd-u[ps]* %endif %{_docdir}/systemd %{_prefix}/lib/udev/rules.d/70-uaccess.rules %{_prefix}/lib/udev/rules.d/71-seat.rules %{_prefix}/lib/udev/rules.d/73-seat-late.rules -%if ! 0%{?bootstrap} -%{_prefix}/lib/udev/rules.d/73-seat-numlock.rules -%endif %{_prefix}/lib/udev/rules.d/99-systemd.rules -%{_prefix}/lib/udev/numlock-on -%if 0%{suse_version} < 1310 -%{_sysconfdir}/rpm/macros.systemd -%endif %dir %{_localstatedir}/lib/systemd %dir %{_localstatedir}/lib/systemd/sysv-convert %dir %{_localstatedir}/lib/systemd/migrated +%dir %{_localstatedir}/lib/systemd/coredump %dir %{_localstatedir}/lib/systemd/catalog %ghost %{_localstatedir}/lib/systemd/catalog/database -%dir %{_localstatedir}/lib/systemd/coredump +%ghost %{_localstatedir}/lib/systemd/backlight +%ghost %{_localstatedir}/lib/systemd/random-seed %dir %{_datadir}/zsh %dir %{_datadir}/zsh/site-functions %{_datadir}/zsh/site-functions/* -%ghost %{_localstatedir}/lib/systemd/backlight -%ghost %{_localstatedir}/lib/systemd/random-seed -%if %{with resolved} -%{_sysconfdir}/dbus-1/system.d/org.freedesktop.resolve1.conf -%{_sysconfdir}/systemd/resolved.conf -%{_libdir}/libnss_resolve.so.2 -%{_datadir}/dbus-1/system-services/org.freedesktop.resolve1.service -%{_prefix}/lib/systemd/system/org.freedesktop.resolve1.busname -%endif -%if ! 0%{?bootstrap} -%{_sysconfdir}/dbus-1/system.d/org.freedesktop.import1.conf -%{_prefix}/lib/systemd/import-pubring.gpg -%{_prefix}/lib/systemd/system/org.freedesktop.import1.busname -%{_datadir}/dbus-1/system-services/org.freedesktop.import1.service -%{_datadir}/polkit-1/actions/org.freedesktop.import1.policy -%endif - -%if ! 0%{?bootstrap} -%files bash-completion -f files.completion -%defattr(-,root,root,-) -%dir %{_datadir}/bash-completion -%dir %{_datadir}/bash-completion/completions -%{_datadir}/bash-completion/completions/* -%endif +%{_datadir}/pkgconfig/systemd.pc %files devel %defattr(-,root,root,-) %{_libdir}/libsystemd.so +%{_libdir}/pkgconfig/libsystemd.pc +%{_includedir}/systemd/ +%if %{with compatlibs} %{_libdir}/libsystemd-daemon.so %{_libdir}/libsystemd-login.so %{_libdir}/libsystemd-id128.so %{_libdir}/libsystemd-journal.so -%{_includedir}/systemd/ -%{_datadir}/pkgconfig/systemd.pc -%{_libdir}/pkgconfig/libsystemd.pc %{_libdir}/pkgconfig/libsystemd-daemon.pc %{_libdir}/pkgconfig/libsystemd-login.pc %{_libdir}/pkgconfig/libsystemd-id128.pc %{_libdir}/pkgconfig/libsystemd-journal.pc +%endif %if ! 0%{?bootstrap} -%_mandir/man3/SD*.3* -%_mandir/man3/sd*.3* +%{_mandir}/man3/SD*.3* +%{_mandir}/man3/sd*.3* %endif %files sysvinit @@ -1491,8 +1159,7 @@ exit 0 %{_mandir}/man8/telinit.8* %{_mandir}/man8/runlevel.8* %endif -%dir %_prefix/lib/systemd -%_prefix/lib/systemd/systemd-sysv-install +%{_prefix}/lib/systemd/systemd-sysv-install %files -n udev%{?mini} %defattr(-,root,root) @@ -1501,12 +1168,10 @@ exit 0 # keep for compatibility %ghost /lib/udev %{_bindir}/udevadm -%if 0%{?suse_version} <= 1310 -%{_prefix}/lib/firmware -%endif %{_bindir}/systemd-hwdb %dir %{_prefix}/lib/udev/ %{_prefix}/lib/udev/ata_id +%{_prefix}/lib/udev/path_id_compat %{_prefix}/lib/udev/cdrom_id %{_prefix}/lib/udev/collect %{_prefix}/lib/udev/mtd_probe @@ -1518,7 +1183,6 @@ exit 0 %exclude %{_prefix}/lib/udev/rules.d/70-uaccess.rules %exclude %{_prefix}/lib/udev/rules.d/71-seat.rules %exclude %{_prefix}/lib/udev/rules.d/73-seat-late.rules -%exclude %{_prefix}/lib/udev/rules.d/73-seat-numlock.rules %exclude %{_prefix}/lib/udev/rules.d/99-systemd.rules %{_prefix}/lib/udev/rules.d/*.rules %{_prefix}/lib/udev/hwdb.d/ @@ -1527,17 +1191,18 @@ exit 0 %ghost %{_sysconfdir}/udev/hwdb.bin %config(noreplace) %{_sysconfdir}/udev/udev.conf %if ! 0%{?bootstrap} -%_mandir/man5/udev* -%_mandir/man7/hwdb* -%_mandir/man7/udev* -%_mandir/man8/systemd-hwdb* -%_mandir/man8/systemd-udev* -%_mandir/man8/udev* +%{_mandir}/man5/udev* +%{_mandir}/man7/hwdb* +%{_mandir}/man7/udev* +%{_mandir}/man8/systemd-hwdb* +%{_mandir}/man8/systemd-udev* +%{_mandir}/man8/udev* %endif %dir %{_prefix}/lib/systemd/system %{_prefix}/lib/systemd/systemd-udevd -%{_prefix}/lib/systemd/system/*udev*.service +%{_prefix}/lib/systemd/system/systemd-udev*.service %{_prefix}/lib/systemd/system/systemd-udevd*.socket +%{_prefix}/lib/systemd/system/initrd-udevadm-cleanup-db.service %dir %{_prefix}/lib/systemd/system/sysinit.target.wants %{_prefix}/lib/systemd/system/sysinit.target.wants/systemd-udev*.service %dir %{_prefix}/lib/systemd/system/sockets.target.wants @@ -1545,18 +1210,16 @@ exit 0 %dir %{_prefix}/lib/systemd/network %{_prefix}/lib/systemd/network/*.link %{_prefix}/lib/systemd/network/*.network -%if 0%{?suse_version} > 1310 %{_datadir}/pkgconfig/udev.pc -%endif %files -n libsystemd0%{?mini} %defattr(-,root,root) -%_libdir/libsystemd.so.* -%if %{with compat_libs} -%_libdir/libsystemd-daemon.so.* -%_libdir/libsystemd-login.so.* -%_libdir/libsystemd-id128.so.* -%_libdir/libsystemd-journal.so.* +%{_libdir}/libsystemd.so.* +%if %{with compatlibs} +%{_libdir}/libsystemd-daemon.so.* +%{_libdir}/libsystemd-login.so.* +%{_libdir}/libsystemd-id128.so.* +%{_libdir}/libsystemd-journal.so.* %endif %files -n libudev%{?mini}1 @@ -1582,27 +1245,51 @@ exit 0 %files -n nss-myhostname %defattr(-, root, root) +/%{_lib}/*nss_myhostname* %{_sbindir}/nss-myhostname-config -%if !0%{?bootstrap} %{_mandir}/man8/libnss_myhostname.* %{_mandir}/man8/nss-myhostname.* %endif -/%{_lib}/*nss_myhostname* -%files journal-gateway +%if %{with resolved} +%files -n nss-resolve %defattr(-, root, root) -%{_prefix}/lib/systemd/system/systemd-journal-gatewayd.* -%{_prefix}/lib/systemd/systemd-journal-gatewayd -%{_mandir}/man8/systemd-journal-gatewayd.* -%{_datadir}/systemd/gatewayd +%{_libdir}/libnss_resolve.so.2 +%{_mandir}/man8/libnss_resolve.* +%{_mandir}/man8/nss-resolve.* +%endif +%if %{with machined} %files -n nss-mymachines %defattr(-,root,root) -%_libdir/libnss_mymachines.so* -%if !0%{?bootstrap} -%_mandir/man8/libnss_mymachines.* -%_mandir/man8/nss-mymachines.* -%endif +%{_libdir}/libnss_mymachines.so* +%{_mandir}/man8/libnss_mymachines.* +%{_mandir}/man8/nss-mymachines.* %endif +%if %{with journal_remote} +%files journal-remote +%defattr(-, root, root) +%config(noreplace) %{_sysconfdir}/systemd/journal-remote.conf +%config(noreplace) %{_sysconfdir}/systemd/journal-upload.conf +%{_prefix}/lib/systemd/system/systemd-journal-gatewayd.* +%{_prefix}/lib/systemd/system/systemd-journal-remote.* +%{_prefix}/lib/systemd/system/systemd-journal-upload.* +%{_prefix}/lib/systemd/systemd-journal-gatewayd +%{_prefix}/lib/systemd/systemd-journal-remote +%{_prefix}/lib/systemd/systemd-journal-upload +%{_libexecdir}/sysusers.d/systemd-remote.conf +%{_libexecdir}/tmpfiles.d/systemd-remote.conf +%{_mandir}/man8/systemd-journal-gatewayd.* +%{_mandir}/man8/systemd-journal-remote.* +%{_mandir}/man8/systemd-journal-upload.* +%{_datadir}/systemd/gatewayd +%endif + +%files bash-completion +%defattr(-,root,root,-) +%dir %{_datadir}/bash-completion +%dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/* + %changelog diff --git a/tomcat6-var-lock-subsys-legacy.patch b/tomcat6-var-lock-subsys-legacy.patch deleted file mode 100644 index cf9207ba..00000000 --- a/tomcat6-var-lock-subsys-legacy.patch +++ /dev/null @@ -1,20 +0,0 @@ -Provide /run/lock/subsys directory to be able to provide the -/var/lock/subsys via the symbolic link /var/lock (bnc#889357) - ---- - tmpfiles.d/legacy.conf | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -Index: systemd-221/tmpfiles.d/legacy.conf -=================================================================== ---- systemd-221.orig/tmpfiles.d/legacy.conf -+++ systemd-221/tmpfiles.d/legacy.conf -@@ -17,7 +17,7 @@ L /var/lock - - - - ../run/lock - # /run/lock/subsys is used for serializing SysV service execution, and - # hence without use on SysV-less systems. - --#d /run/lock/subsys 0755 root root - -+d /run/lock/subsys 0755 root root - - - # /run/lock/lockdev is used to serialize access to tty devices via - # LCK..xxx style lock files, For more information see: diff --git a/tty-ask-password-agent-on-console.patch b/tty-ask-password-agent-on-console.patch deleted file mode 100644 index f96fc24b..00000000 --- a/tty-ask-password-agent-on-console.patch +++ /dev/null @@ -1,376 +0,0 @@ -From 907bc2aa36f58c6050cd4b7b290e0992a4373e49 Mon Sep 17 00:00:00 2001 -From: Werner Fink -Date: Wed, 30 Sep 2015 15:00:41 +0200 -Subject: [PATCH] Ask for passphrases not only on the first console of - /dev/console - -but also on all other consoles. This does help on e.g. mainframes -where often a serial console together with other consoles are -used. Even rack based servers attachted to both a serial console -as well as having a virtual console do sometimes miss a connected -monitor. - -To be able to ask on all terminal devices of /dev/console the devices -are collected. If more than one device are found, then on each of the -terminals a inquiring task for passphrase is forked and do not return -to the caller. - -Every task has its own session and its own controlling terminal. -If one of the tasks does handle a password, the remaining tasks -will be terminated. - -Also let contradictory options on the command of -systemd-tty-ask-password-agent fail. - -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/tty-ask-password-agent.c | 264 +++++++++++++++++++- - 1 file changed, 254 insertions(+), 10 deletions(-) - -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. - - Copyright 2010 Lennart Poettering -+ Copyright 2015 Werner Fink - - 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 -@@ -21,6 +22,9 @@ - - #include - #include -+#include -+#include -+#include - #include - #include - #include -@@ -49,6 +53,8 @@ - #include "terminal-util.h" - #include "util.h" - #include "utmp-wtmp.h" -+#include "fileio.h" -+#include "macro.h" - - static enum { - ACTION_LIST, -@@ -57,8 +63,21 @@ static enum { - ACTION_WALL - } arg_action = ACTION_QUERY; - -+struct console { -+ pid_t pid; -+ char *tty; -+}; -+ -+static volatile sig_atomic_t sigchild; -+ -+static void chld_handler(int sig) { -+ ++sigchild; -+} -+ - static bool arg_plymouth = false; - static bool arg_console = false; -+static bool arg_device = false; -+static const char *current_dev = "/dev/console"; - - static int ask_password_plymouth( - const char *message, -@@ -240,6 +259,80 @@ finish: - return r; - } - -+static void free_consoles(struct console *con, unsigned int num) { -+ unsigned int n; -+ -+ if (!con || num == 0) -+ return; -+ -+ for (n = 0; n < num; n++) -+ free(con[n].tty); -+ -+ free(con); -+} -+ -+static int collect_consoles(struct console **consoles, unsigned int *num) { -+ _cleanup_free_ char *active = NULL; -+ const char *word, *state; -+ struct console *con = NULL; -+ size_t con_len = 0, len; -+ unsigned int count = 0; -+ int ret; -+ -+ assert(num); -+ assert(consoles); -+ -+ ret = read_one_line_file("/sys/class/tty/console/active", &active); -+ if (ret < 0) -+ return log_error_errno(ret, "Failed to read /sys/class/tty/console/active: %m"); -+ -+ FOREACH_WORD(word, len, active, state) { -+ _cleanup_free_ char *tty = NULL; -+ -+ if (len == 4 && strneq(word, "tty0", 4)) { -+ -+ ret = read_one_line_file("/sys/class/tty/tty0/active", &tty); -+ if (ret < 0) -+ return log_error_errno(ret, "Failed to read /sys/class/tty/tty0/active: %m"); -+ -+ word = tty; -+ len = strlen(tty); -+ } -+ -+ con = GREEDY_REALLOC(con, con_len, 1+count); -+ if (!con) -+ return log_oom(); -+ -+ if (asprintf(&con[count].tty, "/dev/%.*s", (int)len, word) < 0) { -+ free_consoles(con, count); -+ return log_oom(); -+ } -+ -+ con[count].pid = 0; -+ count++; -+ } -+ -+ if (!con) { -+ con = GREEDY_REALLOC(con, con_len, 1); -+ if (!con) -+ return log_oom(); -+ -+ con[0].tty = strdup(current_dev); -+ if (!con[0].tty) { -+ free_consoles(con, 1); -+ return log_oom(); -+ } -+ -+ con[0].pid = 0; -+ count++; -+ } -+ -+ *num = count; -+ *consoles = con; -+ -+ return 0; -+} -+ - static int parse_password(const char *filename, char **wall) { - _cleanup_free_ char *socket_name = NULL, *message = NULL, *packet = 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 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 }, -- { "console", no_argument, NULL, ARG_CONSOLE }, -+ { "console", optional_argument, NULL, ARG_CONSOLE }, - {} - }; - -@@ -643,6 +736,10 @@ static int parse_argv(int argc, char *ar - - case ARG_CONSOLE: - arg_console = true; -+ if (optarg && *optarg) { -+ current_dev = optarg; -+ arg_device = true; -+ } - break; - - case '?': -@@ -657,9 +754,143 @@ static int parse_argv(int argc, char *ar - return -EINVAL; - } - -+ if (arg_plymouth || arg_console) { -+ -+ if (!IN_SET(arg_action, ACTION_QUERY, ACTION_WATCH)) { -+ log_error("%s conflicting options --query and --watch.", program_invocation_short_name); -+ return -EINVAL; -+ } -+ -+ if (arg_plymouth && arg_console) { -+ log_error("%s conflicting options --plymouth and --console.", program_invocation_short_name); -+ return -EINVAL; -+ } -+ } -+ - return 1; - } - -+/* -+ * To be able to ask on all terminal devices of /dev/console -+ * the devices are collected. If more than one device are found, -+ * then on each of the terminals a inquiring task is forked. -+ * Every task has its own session and its own controlling terminal. -+ * If one of the tasks does handle a password, the remaining tasks -+ * will be terminated. -+ */ -+static int ask_on_consoles(int argc, char *argv[]) { -+ struct console *consoles = NULL; -+ struct sigaction sig = { -+ .sa_handler = chld_handler, -+ .sa_flags = SA_NOCLDSTOP | SA_RESTART, -+ }; -+ struct sigaction oldsig; -+ sigset_t oldset; -+ unsigned int num = 0, id; -+ siginfo_t status = {}; -+ int ret; -+ -+ ret = collect_consoles(&consoles, &num); -+ if (ret < 0) -+ return log_error_errno(ret, "Failed to query password: %m"); -+ -+ assert_se(sigprocmask_many(SIG_UNBLOCK, &oldset, SIGHUP, SIGCHLD, -1) >= 0); -+ -+ assert_se(sigemptyset(&sig.sa_mask) >= 0); -+ assert_se(sigaction(SIGCHLD, &sig, &oldsig) >= 0); -+ -+ sig.sa_handler = SIG_DFL; -+ assert_se(sigaction(SIGHUP, &sig, NULL) >= 0); -+ -+ for (id = 0; id < num; id++) { -+ consoles[id].pid = fork(); -+ -+ if (consoles[id].pid < 0) -+ return log_error_errno(errno, "Failed to query password: %m"); -+ -+ if (consoles[id].pid == 0) { -+ char *conarg; -+ int ac; -+ -+ conarg = strjoina("--console=", consoles[id].tty); -+ if (!conarg) -+ return log_oom(); -+ -+ free_consoles(consoles, num); /* not used anymore */ -+ -+ assert_se(prctl(PR_SET_PDEATHSIG, SIGHUP) >= 0); -+ -+ zero(sig); -+ assert_se(sigprocmask(SIG_UNBLOCK, &oldset, NULL) >= 0); -+ assert_se(sigaction(SIGCHLD, &oldsig, NULL) >= 0); -+ -+ for (ac = 0; ac < argc; ac++) { -+ if (streq(argv[ac], "--console")) { -+ argv[ac] = conarg; -+ break; -+ } -+ } -+ -+ execv(SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH, argv); -+ -+ return log_error_errno(errno, "Failed to execute %s: %m", program_invocation_name); -+ } -+ } -+ -+ ret = 0; -+ while (true) { -+ -+ if ((ret = waitid(P_ALL, 0, &status, WEXITED)) < 0) { -+ -+ if (errno != EINTR) { -+ ret = -errno; -+ if (errno == ECHILD) -+ ret = EXIT_SUCCESS; -+ break; -+ } -+ continue; -+ } -+ -+ for (id = 0; id < num; id++) { -+ struct timespec timeout; -+ sigset_t set; -+ int signum; -+ -+ if (consoles[id].pid == status.si_pid || kill(consoles[id].pid, 0) < 0) -+ consoles[id].pid = -1; -+ -+ if (consoles[id].pid < 0) -+ continue; -+ -+ kill(consoles[id].pid, SIGHUP); -+ -+ assert_se(sigemptyset(&set) >= 0); -+ assert_se(sigaddset(&set, SIGCHLD) >= 0); -+ -+ timespec_store(&timeout, 50 * USEC_PER_MSEC); -+ signum = sigtimedwait(&set, NULL, &timeout); -+ -+ if (signum != SIGCHLD) { -+ -+ if (signum < 0 && errno != EAGAIN) -+ return log_error_errno(errno, "sigtimedwait() failed: %m"); -+ -+ if (signum >= 0) -+ log_warning("sigtimedwait() returned unexpected signal."); -+ } -+ -+ kill(consoles[id].pid, SIGKILL); -+ } -+ -+ if (WIFEXITED(status.si_status) && ret == 0) -+ ret = WEXITSTATUS(status.si_status); -+ } -+ -+ free_consoles(consoles, num); -+ -+ return ret; -+} -+ - int main(int argc, char *argv[]) { - int r; - -@@ -673,16 +904,29 @@ int main(int argc, char *argv[]) { - if (r <= 0) - goto finish; - -- if (arg_console) { -- (void) setsid(); -- (void) release_terminal(); -+ if (arg_console && !arg_device) -+ /* -+ * Spawn for each console device a own process -+ */ -+ r = ask_on_consoles(argc, argv); -+ else { -+ -+ if (arg_device) { -+ /* -+ * Later on a controlling terminal will be will be acquired, -+ * therefore the current process has to become a session -+ * leader and should not have a controlling terminal already. -+ */ -+ (void) setsid(); -+ (void) release_terminal(); -+ } -+ -+ if (IN_SET(arg_action, ACTION_WATCH, ACTION_WALL)) -+ r = watch_passwords(); -+ else -+ r = show_passwords(); - } - -- if (IN_SET(arg_action, ACTION_WATCH, ACTION_WALL)) -- r = watch_passwords(); -- else -- r = show_passwords(); -- - finish: - return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS; - } diff --git a/systemd-remount-tmpfs b/udev-remount-tmpfs similarity index 100% rename from systemd-remount-tmpfs rename to udev-remount-tmpfs diff --git a/use-rndaddentropy-ioctl-to-load-random-seed.patch b/use-rndaddentropy-ioctl-to-load-random-seed.patch deleted file mode 100644 index 2e655400..00000000 --- a/use-rndaddentropy-ioctl-to-load-random-seed.patch +++ /dev/null @@ -1,155 +0,0 @@ -Simply writing /var/lib/systemd/random-seed back to /dev/(u)random does not -increase the entropy bit count. Therefore use the RNDADDENTROPY ioctl to -write back the bytes and increase the entropy bit counter. - -Related to bnc#892096 - ---- - src/random-seed/random-seed.c | 71 ++++++++++++++++++++++++++++++++++++------ - 1 file changed, 61 insertions(+), 10 deletions(-) - -Index: systemd-228/src/random-seed/random-seed.c -=================================================================== ---- 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 "alloc-util.h" - #include "fd-util.h" -@@ -36,8 +38,8 @@ - #define POOL_SIZE_MIN 512 - - int main(int argc, char *argv[]) { -- _cleanup_close_ int seed_fd = -1, random_fd = -1; -- _cleanup_free_ void* buf = NULL; -+ _cleanup_close_ int seed_fd = -1, random_fd = -1, entropy_fd = -1; -+ _cleanup_free_ struct rand_pool_info *entropy = NULL; - size_t buf_size = 0; - ssize_t k; - int r; -@@ -68,11 +70,12 @@ int main(int argc, char *argv[]) { - if (buf_size <= POOL_SIZE_MIN) - buf_size = POOL_SIZE_MIN; - -- buf = malloc(buf_size); -- if (!buf) { -+ entropy = (struct rand_pool_info*) malloc(sizeof(struct rand_pool_info) + buf_size); -+ if (!entropy) { - r = log_oom(); - goto finish; - } -+ entropy->buf_size = (typeof(entropy->buf_size)) buf_size; - - r = mkdir_parents_label(RANDOM_SEED, 0755); - if (r < 0) { -@@ -86,6 +89,23 @@ int main(int argc, char *argv[]) { - - if (streq(argv[1], "load")) { - -+ entropy_fd = open(RANDOM_SEED_DIR "entropy_count", O_RDONLY|O_CLOEXEC|O_NOCTTY, 0600); -+ if (entropy_fd < 0) { -+ entropy->entropy_count = 0; -+ if (errno != ENOENT) { -+ log_error("Failed to open " RANDOM_SEED "/entropy_count: %m"); -+ r = -errno; -+ goto finish; -+ } -+ } else { -+ r = read(entropy_fd, &entropy->entropy_count, sizeof(entropy->entropy_count)); -+ if (r < 0) { -+ log_error("Failed to read entropy count file: %m"); -+ r = -errno; -+ goto finish; -+ } -+ } -+ - 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); -@@ -106,7 +126,7 @@ int main(int argc, char *argv[]) { - } - } - -- k = loop_read(seed_fd, buf, buf_size, false); -+ k = loop_read(seed_fd, entropy->buf, (size_t) entropy->buf_size, false); - if (k < 0) - r = log_error_errno(k, "Failed to read seed from " RANDOM_SEED ": %m"); - else if (k == 0) -@@ -114,13 +134,29 @@ int main(int argc, char *argv[]) { - else { - (void) lseek(seed_fd, 0, SEEK_SET); - -- r = loop_write(random_fd, buf, (size_t) k, false); -- if (r < 0) -- log_error_errno(r, "Failed to write seed to /dev/urandom: %m"); -+ if (entropy->entropy_count && (size_t)k == (size_t)entropy->buf_size) { -+ r = ioctl(random_fd, RNDADDENTROPY, entropy); -+ if (r < 0) { -+ log_error_errno(errno, "Failed to write seed to /dev/urandom: %m"); -+ r = -errno; -+ } -+ } else { -+ r = loop_write(random_fd, entropy->buf, (size_t) k, false); -+ if (r < 0) -+ log_error_errno(r, "Failed to write seed to /dev/urandom: %m"); -+ } - } - - } else if (streq(argv[1], "save")) { - -+ /* Read available entropy count, if possible */ -+ f = fopen("/proc/sys/kernel/random/entropy_avail", "re"); -+ if (f) { -+ if (fscanf(f, "%d", &entropy->entropy_count) < 0) -+ entropy->entropy_count = 0; -+ fclose(f); -+ } -+ - 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"); -@@ -133,6 +169,21 @@ int main(int argc, char *argv[]) { - goto finish; - } - -+ if (entropy->entropy_count) { -+ entropy_fd = open(RANDOM_SEED_DIR "entropy_count", O_WRONLY|O_CLOEXEC|O_NOCTTY|O_CREAT, 0600); -+ if (seed_fd < 0) { -+ log_error("Failed to open " RANDOM_SEED_DIR "entropy_count: %m"); -+ r = -errno; -+ goto finish; -+ } -+ r = write(entropy_fd, &entropy->entropy_count, sizeof(entropy->entropy_count)); -+ if (r < 0) { -+ log_error("Failed to write entropy count file: %m"); -+ r = -errno; -+ goto finish; -+ } -+ } -+ - } else { - log_error("Unknown verb '%s'.", argv[1]); - r = -EINVAL; -@@ -147,7 +198,7 @@ int main(int argc, char *argv[]) { - (void) fchmod(seed_fd, 0600); - (void) fchown(seed_fd, 0, 0); - -- k = loop_read(random_fd, buf, buf_size, false); -+ k = loop_read(random_fd, entropy->buf, (size_t) entropy->buf_size, false); - if (k < 0) { - r = log_error_errno(k, "Failed to read new seed from /dev/urandom: %m"); - goto finish; -@@ -158,7 +209,7 @@ int main(int argc, char *argv[]) { - goto finish; - } - -- r = loop_write(seed_fd, buf, (size_t) k, false); -+ r = loop_write(seed_fd, entropy->buf, (size_t) k, false); - if (r < 0) - log_error_errno(r, "Failed to write new random seed file: %m"); - } diff --git a/v228.tar.gz b/v228.tar.gz deleted file mode 100644 index 84f9e59d..00000000 --- a/v228.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dd124ff561a07e6439ed2b3713f38ca914df7747f110ce86deea17b56d245ae6 -size 4034401 diff --git a/vhangup-on-all-consoles.patch b/vhangup-on-all-consoles.patch deleted file mode 100644 index c0f4d74f..00000000 --- a/vhangup-on-all-consoles.patch +++ /dev/null @@ -1,40 +0,0 @@ -Related to bnc#886599 and others. That is use the vhangup(8) tool -to explicit do a virtually hangup on the specified on the terminal -line to give e.g. the bash a few seconds to e.g. safe its history. - -[crrodriguez@opensuse.org: Feb 2015 -This a known kernel bug, no notification from the cgroup subsystem -arrives and the processes in the "scope" units have -to be SIGKILL'ed without delay in order not to hang shutdown -Status: fix not available as of Feb 16 2015 -track progress: https://bugzilla.redhat.com/show_bug.cgi?id=1141137 -] - ---- - units/getty@.service.m4 | 1 + - units/serial-getty@.service.m4 | 1 + - 2 files changed, 2 insertions(+) -Index: systemd-221/units/getty@.service.m4 -=================================================================== ---- systemd-221.orig/units/getty@.service.m4 -+++ systemd-221/units/getty@.service.m4 -@@ -29,6 +29,7 @@ ConditionPathExists=/dev/tty0 - [Service] - # the VT is cleared by TTYVTDisallocate - ExecStart=-/sbin/agetty --noclear %I $TERM -+ExecStopPost=-/sbin/vhangup /dev/%I - Type=idle - Restart=always - RestartSec=0 -Index: systemd-221/units/serial-getty@.service.m4 -=================================================================== ---- systemd-221.orig/units/serial-getty@.service.m4 -+++ systemd-221/units/serial-getty@.service.m4 -@@ -24,6 +24,7 @@ IgnoreOnIsolate=yes - - [Service] - ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM -+ExecStopPost=-/sbin/vhangup /dev/%I - Type=idle - Restart=always - UtmpIdentifier=%I diff --git a/watch_resolv.conf_for_become_changed.patch b/watch_resolv.conf_for_become_changed.patch deleted file mode 100644 index e6df8c6e..00000000 --- a/watch_resolv.conf_for_become_changed.patch +++ /dev/null @@ -1,153 +0,0 @@ ---- - src/core/manager.c | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - src/core/manager.h | 5 ++ - 2 files changed, 98 insertions(+) - -Index: systemd-227/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 - - #ifdef HAVE_AUDIT - #include -@@ -294,6 +295,91 @@ static int manager_check_ask_password(Ma - return m->have_ask_password; - } - -+static int manager_setup_resolv_conf_change(Manager *); -+ -+static int manager_dispatch_resolv_conf_fd(sd_event_source *source, -+ int fd, uint32_t revents, void *userdata) { -+ Manager *m = userdata; -+ -+ assert(m); -+ assert(m->resolv_conf_inotify_fd == fd); -+ -+ if (revents != EPOLLIN) { -+ log_warning("Got unexpected poll event for notify fd."); -+ return 0; -+ } -+ -+ if (fd >= 0) -+ flush_fd(fd); -+ -+ m->resolv_conf_event_source = sd_event_source_unref(m->resolv_conf_event_source); -+ m->resolv_conf_inotify_fd = safe_close(m->resolv_conf_inotify_fd); -+ manager_setup_resolv_conf_change(m); -+ return m->resolv_conf_noent ? 0 : res_init(); -+} -+ -+static int manager_setup_resolv_conf_change(Manager *m) { -+ int r; -+ -+ assert(m); -+ assert(m->resolv_conf_inotify_fd < 0); -+ -+ m->resolv_conf_inotify_fd = inotify_init1(IN_NONBLOCK|IN_CLOEXEC); -+ if (m->resolv_conf_inotify_fd < 0) { -+ log_error("inotify_init1() failed: %m"); -+ r = -errno; -+ goto fail; -+ } -+ if (inotify_add_watch(m->resolv_conf_inotify_fd, "/etc/resolv.conf", -+ IN_CLOSE_WRITE|IN_MODIFY|IN_ATTRIB|IN_DELETE_SELF) < 0) { -+ if (errno == ENOENT) { -+ m->resolv_conf_noent = true; -+ if (inotify_add_watch(m->resolv_conf_inotify_fd, "/etc", IN_CREATE|IN_MOVED_TO) < 0) { -+ log_error("Failed to add watch on /etc: %m"); -+ r = -errno; -+ goto fail; -+ } -+ } else { -+ log_error("Failed to add watch on /etc/resolv.conf: %m"); -+ r = -errno; -+ goto fail; -+ } -+ } -+ if (inotify_add_watch(m->resolv_conf_inotify_fd, "/etc/host.conf", -+ IN_CLOSE_WRITE|IN_MODIFY|IN_ATTRIB|IN_DELETE_SELF) < 0 && errno != ENOENT) { -+ log_error("Failed to add watch on /etc/host.conf: %m"); -+ r = -errno; -+ goto fail; -+ } -+ -+ r = sd_event_add_io(m->event, &m->resolv_conf_event_source, -+ m->resolv_conf_inotify_fd, EPOLLIN, -+ manager_dispatch_resolv_conf_fd, m); -+ if (r < 0) { -+ log_error("Failed to add event source for resolver: %s", strerror(-r)); -+ goto fail; -+ } -+ -+ r = sd_event_source_set_priority(m->resolv_conf_event_source, -10); -+ if (r < 0) { -+ log_error("Failed to add event source for resolver: %s", strerror(-r)); -+ m->resolv_conf_event_source = sd_event_source_unref(m->resolv_conf_event_source); -+ goto fail; -+ } -+ -+ return 0; -+fail: -+ m->resolv_conf_inotify_fd = safe_close(m->resolv_conf_inotify_fd); -+ return 0; /* Ignore error here */ -+} -+ -+static void manager_shutdown_resolv_conf_change(Manager *m) { -+ assert(m); -+ -+ m->resolv_conf_event_source = sd_event_source_unref(m->resolv_conf_event_source); -+ m->resolv_conf_inotify_fd = safe_close(m->resolv_conf_inotify_fd); -+} -+ - static int manager_watch_idle_pipe(Manager *m) { - int r; - -@@ -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 */ - m->first_boot = -1; -@@ -637,6 +724,10 @@ int manager_new(ManagerRunningAs running - if (r < 0) - goto fail; - -+ r = manager_setup_resolv_conf_change(m); -+ if (r < 0) -+ goto fail; -+ - m->udev = udev_new(); - if (!m->udev) { - r = -ENOMEM; -@@ -914,6 +1005,8 @@ Manager* manager_free(Manager *m) { - if (!m) - return NULL; - -+ manager_shutdown_resolv_conf_change(m); -+ - manager_clear_jobs_and_units(m); - - for (c = 0; c < _UNIT_TYPE_MAX; c++) -Index: systemd-227/src/core/manager.h -=================================================================== ---- 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; -+ sd_event_source *resolv_conf_event_source; -+ bool resolv_conf_noent; -+ - /* Data specific to the swap filesystem */ - FILE *proc_swaps; - sd_event_source *swap_event_source;