From 9538a6a43506a80af02bef1a64c6c14b848ebde3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20R=C4=99korajski?= Date: Sun, 8 Jul 2018 00:42:00 +0200 Subject: [PATCH] - partial update to 239 (TODO: new files) --- pld-sysv-network.patch | 2 +- systemd-glibc.patch | 282 --------------------------------------- systemd.spec | 56 +++++++- target-pld.patch | 14 +- tmpfiles-not-fatal.patch | 2 +- udevadm-in-sbin.patch | 8 +- uids_gids.patch | 13 +- 7 files changed, 64 insertions(+), 313 deletions(-) delete mode 100644 systemd-glibc.patch diff --git a/pld-sysv-network.patch b/pld-sysv-network.patch index de285e2..ea55505 100644 --- a/pld-sysv-network.patch +++ b/pld-sysv-network.patch @@ -4,7 +4,7 @@ diff -dur -x '*.orig' systemd-218.orig/man/systemd.special.xml systemd-218/man/s @@ -910,6 +910,10 @@ After= for this target unit to all SysV init script service units with an LSB header referring to - the $network facility. + the $portmap facility. + + PLD specific: also scripts with + . /etc/sysconfig/network diff --git a/systemd-glibc.patch b/systemd-glibc.patch deleted file mode 100644 index 92772a2..0000000 --- a/systemd-glibc.patch +++ /dev/null @@ -1,282 +0,0 @@ -commit 848e863acc51ecfb0f3955c498874588201d9130 -Author: Franck Bui -Date: Thu Mar 15 06:23:46 2018 +0100 - - basic/macros: rename noreturn into _noreturn_ (#8456) - - "noreturn" is reserved and can be used in other header files we include: - - [ 16s] In file included from /usr/include/gcrypt.h:30:0, - [ 16s] from ../src/journal/journal-file.h:26, - [ 16s] from ../src/journal/journal-vacuum.c:31: - [ 16s] /usr/include/gpg-error.h:1544:46: error: expected ‘,’ or ‘;’ before ‘)’ token - [ 16s] void gpgrt_log_bug (const char *fmt, ...) GPGRT_ATTR_NR_PRINTF(1,2); - - Here we include grcrypt.h (which in turns include gpg-error.h) *after* we - "noreturn" was defined in macro.h. - -diff --git a/src/basic/log.c b/src/basic/log.c -index 7a7f2cbec..16a2431c5 100644 ---- a/src/basic/log.c -+++ b/src/basic/log.c -@@ -814,7 +814,7 @@ static void log_assert( - log_dispatch_internal(level, 0, file, line, func, NULL, NULL, NULL, NULL, buffer); - } - --noreturn void log_assert_failed_realm( -+_noreturn_ void log_assert_failed_realm( - LogRealm realm, - const char *text, - const char *file, -@@ -826,7 +826,7 @@ noreturn void log_assert_failed_realm( - abort(); - } - --noreturn void log_assert_failed_unreachable_realm( -+_noreturn_ void log_assert_failed_unreachable_realm( - LogRealm realm, - const char *text, - const char *file, -diff --git a/src/basic/log.h b/src/basic/log.h -index efcf0f1bf..314be128a 100644 ---- a/src/basic/log.h -+++ b/src/basic/log.h -@@ -186,7 +186,7 @@ int log_dump_internal( - char *buffer); - - /* Logging for various assertions */ --noreturn void log_assert_failed_realm( -+_noreturn_ void log_assert_failed_realm( - LogRealm realm, - const char *text, - const char *file, -@@ -195,7 +195,7 @@ noreturn void log_assert_failed_realm( - #define log_assert_failed(text, ...) \ - log_assert_failed_realm(LOG_REALM, (text), __VA_ARGS__) - --noreturn void log_assert_failed_unreachable_realm( -+_noreturn_ void log_assert_failed_unreachable_realm( - LogRealm realm, - const char *text, - const char *file, -diff --git a/src/basic/macro.h b/src/basic/macro.h -index 95be63a20..8911edfc4 100644 ---- a/src/basic/macro.h -+++ b/src/basic/macro.h -@@ -53,6 +53,15 @@ - #else - #define _fallthrough_ - #endif -+/* Define C11 noreturn without and even on older gcc -+ * compiler versions */ -+#ifndef _noreturn_ -+#if __STDC_VERSION__ >= 201112L -+#define _noreturn_ _Noreturn -+#else -+#define _noreturn_ __attribute__((noreturn)) -+#endif -+#endif - - /* Temporarily disable some warnings */ - #define DISABLE_WARNING_DECLARATION_AFTER_STATEMENT \ -@@ -414,16 +423,6 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) { - #endif - #endif - --/* Define C11 noreturn without and even on older gcc -- * compiler versions */ --#ifndef noreturn --#if __STDC_VERSION__ >= 201112L --#define noreturn _Noreturn --#else --#define noreturn __attribute__((noreturn)) --#endif --#endif -- - #define DEFINE_TRIVIAL_CLEANUP_FUNC(type, func) \ - static inline void func##p(type *p) { \ - if (*p) \ -diff --git a/src/basic/process-util.c b/src/basic/process-util.c -index aa9846db5..e6120af5b 100644 ---- a/src/basic/process-util.c -+++ b/src/basic/process-util.c -@@ -987,7 +987,7 @@ bool is_main_thread(void) { - return cached > 0; - } - --noreturn void freeze(void) { -+_noreturn_ void freeze(void) { - - log_close(); - -diff --git a/src/basic/process-util.h b/src/basic/process-util.h -index 93029e36e..5170adec7 100644 ---- a/src/basic/process-util.h -+++ b/src/basic/process-util.h -@@ -91,7 +91,7 @@ int pid_from_same_root_fs(pid_t pid); - - bool is_main_thread(void); - --noreturn void freeze(void); -+_noreturn_ void freeze(void); - - bool oom_score_adjust_is_valid(int oa); - -diff --git a/src/core/main.c b/src/core/main.c -index 076846a41..4b2d14923 100644 ---- a/src/core/main.c -+++ b/src/core/main.c -@@ -141,7 +141,7 @@ static uint64_t arg_default_tasks_max = UINT64_MAX; - static sd_id128_t arg_machine_id = {}; - static EmergencyAction arg_cad_burst_action = EMERGENCY_ACTION_REBOOT_FORCE; - --noreturn static void freeze_or_reboot(void) { -+_noreturn_ static void freeze_or_reboot(void) { - - if (arg_crash_reboot) { - log_notice("Rebooting in 10s..."); -@@ -156,7 +156,7 @@ noreturn static void freeze_or_reboot(void) { - freeze(); - } - --noreturn static void crash(int sig) { -+_noreturn_ static void crash(int sig) { - struct sigaction sa; - pid_t pid; - -diff --git a/src/journal/test-journal-interleaving.c b/src/journal/test-journal-interleaving.c -index 5a88b2774..d87bdbdd3 100644 ---- a/src/journal/test-journal-interleaving.c -+++ b/src/journal/test-journal-interleaving.c -@@ -37,7 +37,7 @@ - - static bool arg_keep = false; - --noreturn static void log_assert_errno(const char *text, int error, const char *file, int line, const char *func) { -+_noreturn_ static void log_assert_errno(const char *text, int error, const char *file, int line, const char *func) { - log_internal(LOG_CRIT, error, file, line, func, - "'%s' failed at %s:%u (%s): %m", text, file, line, func); - abort(); -diff --git a/src/shared/pager.c b/src/shared/pager.c -index 75db3c985..681af9c40 100644 ---- a/src/shared/pager.c -+++ b/src/shared/pager.c -@@ -47,7 +47,7 @@ static int stored_stderr = -1; - static bool stdout_redirected = false; - static bool stderr_redirected = false; - --noreturn static void pager_fallback(void) { -+_noreturn_ static void pager_fallback(void) { - int r; - - r = copy_bytes(STDIN_FILENO, STDOUT_FILENO, (uint64_t) -1, 0); -diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c -index 2821640e9..c8fa47b3d 100644 ---- a/src/udev/collect/collect.c -+++ b/src/udev/collect/collect.c -@@ -58,7 +58,7 @@ static inline struct _mate *node_to_mate(struct udev_list_node *node) - return container_of(node, struct _mate, node); - } - --noreturn static void sig_alrm(int signo) -+_noreturn_ static void sig_alrm(int signo) - { - exit(4); - } -From eb50b6d936c474f5bc2974c059f6432222af4de4 Mon Sep 17 00:00:00 2001 -From: Karel Zak -Date: Thu, 22 Mar 2018 12:50:45 +0100 -Subject: [PATCH] Fix linux/fs.h and sys/mount.h collisions - -* (kernel-headers) linux/fs.h and (glibc) sys/mount.h contains MS_* constants - and because it's without #ifdefs you cannot include the both files together - in the same code - -* (systemd) src/basic/missing.h contains another copy of MS_* constants - -The patch removes local systemd MS_* fallbacks, cleanup fs.h and -mount.h include. - -Signed-off-by: Karel Zak ---- - src/basic/missing.h | 40 ---------------------------------------- - src/core/load-fragment.c | 1 - - src/shared/bus-unit-util.c | 2 ++ - 3 files changed, 2 insertions(+), 41 deletions(-) - -diff --git a/src/basic/missing.h b/src/basic/missing.h -index 567aea8da9c..6802dd27c7b 100644 ---- a/src/basic/missing.h -+++ b/src/basic/missing.h -@@ -524,46 +524,6 @@ struct btrfs_ioctl_quota_ctl_args { - #define OCFS2_SUPER_MAGIC 0x7461636f - #endif - --#ifndef MS_MOVE --#define MS_MOVE 8192 --#endif -- --#ifndef MS_REC --#define MS_REC 16384 --#endif -- --#ifndef MS_PRIVATE --#define MS_PRIVATE (1<<18) --#endif -- --#ifndef MS_REC --#define MS_REC (1<<19) --#endif -- --#ifndef MS_SHARED --#define MS_SHARED (1<<20) --#endif -- --#ifndef MS_RELATIME --#define MS_RELATIME (1<<21) --#endif -- --#ifndef MS_KERNMOUNT --#define MS_KERNMOUNT (1<<22) --#endif -- --#ifndef MS_I_VERSION --#define MS_I_VERSION (1<<23) --#endif -- --#ifndef MS_STRICTATIME --#define MS_STRICTATIME (1<<24) --#endif -- --#ifndef MS_LAZYTIME --#define MS_LAZYTIME (1<<25) --#endif -- - #ifndef SCM_SECURITY - #define SCM_SECURITY 0x03 - #endif -diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c -index 94605ab0d02..49f8a8c6da1 100644 ---- a/src/core/load-fragment.c -+++ b/src/core/load-fragment.c -@@ -21,7 +21,6 @@ - - #include - #include --#include - #include - #if HAVE_SECCOMP - #include -diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c -index 23e05daf48c..6e7ea10e714 100644 ---- a/src/shared/bus-unit-util.c -+++ b/src/shared/bus-unit-util.c -@@ -52,6 +52,8 @@ - #include "utf8.h" - #include "util.h" - -+#include -+ - int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) { - assert(message); - assert(u); diff --git a/systemd.spec b/systemd.spec index 48033ba..57dcd43 100644 --- a/systemd.spec +++ b/systemd.spec @@ -7,6 +7,51 @@ # - dev->udev upgrade: # - /dev/urandom remains missing, not created with start_udev anymore # +#warning: Installed (but unpackaged) file(s) found: +# /lib/systemd/portable/profile/default/service.conf +# /lib/systemd/portable/profile/nonetwork/service.conf +# /lib/systemd/portable/profile/strict/service.conf +# /lib/systemd/portable/profile/trusted/service.conf +# /lib/systemd/portablectl +# /lib/systemd/system/dbus-org.freedesktop.portable1.service +# /lib/systemd/system/suspend-then-hibernate.target +# /lib/systemd/system/system-update-pre.target +# /lib/systemd/system/systemd-portabled.service +# /lib/systemd/system/systemd-suspend-then-hibernate.service +# /lib/systemd/system/systemd-time-wait-sync.service +# /lib/systemd/system/user-.slice.d/10-defaults.conf +# /lib/systemd/system/user-runtime-dir@.service +# /lib/systemd/systemd-portabled +# /lib/systemd/systemd-time-wait-sync +# /lib/systemd/systemd-user-runtime-dir +# /lib/udev/hwdb.d/20-vmbus-class.hwdb +# /sbin/resolvconf +# /usr/bin/resolvectl +# /usr/lib/rpm/macros.d/macros.systemd +# /usr/lib/tmpfiles.d/portables.conf +# /usr/share/bash-completion/completions/portablectl +# /usr/share/bash-completion/completions/resolvectl +# /usr/share/dbus-1/system-services/org.freedesktop.portable1.service +# /usr/share/dbus-1/system-services/org.freedesktop.timesync1.service +# /usr/share/dbus-1/system.d/org.freedesktop.portable1.conf +# /usr/share/dbus-1/system.d/org.freedesktop.timesync1.conf +# /usr/share/man/man1/portablectl.1.gz +# /usr/share/man/man1/resolvconf.1 +# /usr/share/man/man1/resolvectl.1.gz +# /usr/share/man/man5/loader.conf.5.gz +# /usr/share/man/man7/sd-boot.7 +# /usr/share/man/man7/systemd-boot.7.gz +# /usr/share/man/man7/systemd.syntax.7.gz +# /usr/share/man/man8/systemd-journal-remote.service.8.gz +# /usr/share/man/man8/systemd-journal-remote.socket.8 +# /usr/share/man/man8/systemd-journal-upload.service.8.gz +# /usr/share/man/man8/systemd-portabled.8 +# /usr/share/man/man8/systemd-portabled.service.8.gz +# /usr/share/man/man8/systemd-suspend-then-hibernate.service.8 +# /usr/share/man/man8/systemd-time-wait-sync.8 +# /usr/share/man/man8/systemd-time-wait-sync.service.8.gz +# /usr/share/polkit-1/actions/org.freedesktop.portable1.policy +# # Conditional build: %bcond_without audit # audit support %bcond_without cryptsetup # cryptsetup support @@ -25,13 +70,13 @@ Summary: A System and Service Manager Summary(pl.UTF-8): systemd - zarządca systemu i usług dla Linuksa Name: systemd # Verify ChangeLog and NEWS when updating (since there are incompatible/breaking changes very often) -Version: 238 +Version: 239 Release: 0.1 Epoch: 1 License: GPL v2+ (udev), LGPL v2.1+ (the rest) Group: Base Source0: https://github.com/systemd/systemd/archive/v%{version}/%{name}-%{version}.tar.gz -# Source0-md5: 76db8004647283b779234364cd637d3c +# Source0-md5: 6137e3f50390391cf34521d071a1a078 Source1: %{name}-sysv-convert Source2: %{name}_booted.c Source3: network.service @@ -64,7 +109,6 @@ Patch3: tmpfiles-not-fatal.patch Patch4: udev-ploop-rules.patch Patch5: udevadm-in-sbin.patch Patch6: net-rename-revert.patch -Patch7: %{name}-glibc.patch Patch8: proc-hidepid.patch Patch9: %{name}-configfs.patch Patch10: pld-boot_efi_mount.patch @@ -627,7 +671,6 @@ Uzupełnianie parametrów w zsh dla poleceń udev. %patch5 -p1 # rejected upstream (do not disable!) %patch6 -p1 -%patch7 -p1 %patch8 -p1 %patch9 -p1 %patch10 -p1 @@ -1293,7 +1336,6 @@ fi %{_mandir}/man1/systemd-notify.1* %{_mandir}/man1/systemd-nspawn.1* %{_mandir}/man1/systemd-path.1* -%{_mandir}/man1/systemd-resolve.1* %{_mandir}/man1/systemd-run.1* %{_mandir}/man1/systemd-socket-activate.1* %{_mandir}/man1/systemd-tty-ask-password-agent.1* @@ -1369,8 +1411,8 @@ fi %{_mandir}/man8/systemd-journald-dev-log.socket.8* %{_mandir}/man8/systemd-journald.8* %if %{with microhttpd} -%{_mandir}/man8/systemd-journal-remote.8.* -%{_mandir}/man8/systemd-journal-upload.8.* +%{_mandir}/man8/systemd-journal-remote.8* +%{_mandir}/man8/systemd-journal-upload.8* %endif %{_mandir}/man8/systemd-localed.8* %{_mandir}/man8/systemd-logind.8* diff --git a/target-pld.patch b/target-pld.patch index e38fa29..f13c46f 100644 --- a/target-pld.patch +++ b/target-pld.patch @@ -17,7 +17,7 @@ +int read_etc_hostname_distro(const char *path, char **ret) { + int r; + char *p; -+ r = parse_env_file("/etc/sysconfig/network", NEWLINE, "HOSTNAME", &p, NULL); ++ r = parse_env_file(NULL, "/etc/sysconfig/network", NEWLINE, "HOSTNAME", &p, NULL); + if (r < 0) + return r; + if (r == 0) /* EOF without any hostname? the file is empty, let's treat that exactly like no file at all: ENOENT */ @@ -50,8 +50,8 @@ diff -dur -x '*~' -x '*.orig' systemd-208.orig/src/core/locale-setup.c systemd-2 +++ systemd-208/src/core/locale-setup.c 2014-01-09 15:15:41.000000000 +0100 @@ -76,6 +76,7 @@ - if (detect_container(NULL) <= 0) { - r = parse_env_file("/proc/cmdline", WHITESPACE, + if (detect_container() <= 0) { + r = parse_env_file(NULL, "/proc/cmdline", WHITESPACE, + "LANG", &variables[VARIABLE_LANG], "locale.LANG", &variables[VARIABLE_LANG], "locale.LANGUAGE", &variables[VARIABLE_LANGUAGE], @@ -61,7 +61,7 @@ diff -dur -x '*~' -x '*.orig' systemd-208.orig/src/core/locale-setup.c systemd-2 } + if (r <= 0 && -+ (r = parse_env_file("/etc/sysconfig/i18n", NEWLINE, ++ (r = parse_env_file(NULL, "/etc/sysconfig/i18n", NEWLINE, + "LANG", &variables[VARIABLE_LANG], + NULL)) < 0) { + @@ -81,7 +81,7 @@ diff -dur -x '*~' -x '*.orig' systemd-208.orig/src/core/locale-setup.c systemd-2 - if (!e) - return -EINVAL; + if (!e) { -+ r = parse_env_file("/etc/sysconfig/timezone", NEWLINE, ++ r = parse_env_file(NULL, "/etc/sysconfig/timezone", NEWLINE, + "TIMEZONE", &e, + NULL); + if (r < 0) { @@ -101,7 +101,7 @@ diff -dur -x '*~' -x '*.orig' systemd-208.orig/src/vconsole/vconsole-setup.c sys log_warning("Failed to read /etc/vconsole.conf: %s", strerror(-r)); + if (r <= 0) { -+ int r1 = parse_env_file("/etc/sysconfig/console", NEWLINE, ++ int r1 = parse_env_file(NULL, "/etc/sysconfig/console", NEWLINE, + "CONSOLEFONT", &vc_font, + "CONSOLEMAP", &vc_font_map, + "CONSOLESCREENFONTMAP", &vc_font_unimap, @@ -113,4 +113,4 @@ diff -dur -x '*~' -x '*.orig' systemd-208.orig/src/vconsole/vconsole-setup.c sys + /* Let the kernel command line override /etc/vconsole.conf */ if (detect_container(NULL) <= 0) { - r = parse_env_file("/proc/cmdline", WHITESPACE, + r = parse_env_file(NULL, "/proc/cmdline", WHITESPACE, diff --git a/tmpfiles-not-fatal.patch b/tmpfiles-not-fatal.patch index a6cf4f8..1377f1a 100644 --- a/tmpfiles-not-fatal.patch +++ b/tmpfiles-not-fatal.patch @@ -6,7 +6,7 @@ RemainAfterExit=yes -ExecStart=@rootbindir@/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev +ExecStart=-@rootbindir@/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev - SuccessExitStatus=65 + SuccessExitStatus=65 73 --- systemd-238/units/systemd-tmpfiles-clean.service.in~ 2018-03-05 23:16:37.000000000 +0100 +++ systemd-238/units/systemd-tmpfiles-clean.service.in 2018-05-15 13:24:19.297825542 +0200 @@ -17,6 +17,6 @@ Before=shutdown.target diff --git a/udevadm-in-sbin.patch b/udevadm-in-sbin.patch index 7ec5a91..8902fab 100644 --- a/udevadm-in-sbin.patch +++ b/udevadm-in-sbin.patch @@ -19,12 +19,14 @@ executable('systemd-shutdown', --- systemd-183/units/systemd-udev-trigger.service.in~ 2012-05-21 15:14:51.642981269 +0200 +++ systemd-183/units/systemd-udev-trigger.service.in 2012-05-30 13:55:20.229509590 +0200 -@@ -17,4 +17,4 @@ +@@ -17,5 +17,5 @@ [Service] Type=oneshot RemainAfterExit=yes --ExecStart=@rootbindir@/udevadm trigger --type=subsystems --action=add ; @rootbindir@/udevadm trigger --type=devices --action=add -+ExecStart=@rootsbindir@/udevadm trigger --type=subsystems --action=add ; @rootsbindir@/udevadm trigger --type=devices --action=add +-ExecStart=@rootbindir@/udevadm trigger --type=subsystems --action=add +-ExecStart=@rootbindir@/udevadm trigger --type=devices --action=add ++ExecStart=@rootsbindir@/udevadm trigger --type=subsystems --action=add ++ExecStart=@rootsbindir@/udevadm trigger --type=devices --action=add --- systemd-183/units/systemd-udev-settle.service.in~ 2012-05-30 13:43:34.886201138 +0200 +++ systemd-183/units/systemd-udev-settle.service.in 2012-05-30 13:55:44.546175399 +0200 @@ -29,4 +29,4 @@ diff --git a/uids_gids.patch b/uids_gids.patch index 9629f6b..d24000b 100644 --- a/uids_gids.patch +++ b/uids_gids.patch @@ -52,20 +52,9 @@ )m4_dnl --- systemd-238/sysusers.d/systemd.conf.m4~ 2018-03-05 23:16:37.000000000 +0100 +++ systemd-238/sysusers.d/systemd.conf.m4 2018-05-15 13:34:07.479084303 +0200 -@@ -5,13 +5,13 @@ - # the Free Software Foundation; either version 2.1 of the License, or +@@ -5,6 +5,6 @@ # (at your option) any later version. --g systemd-journal - - -+g systemd-journal 288 - - m4_ifdef(`ENABLE_NETWORKD', --u systemd-network - "systemd Network Management" -+u systemd-network 316 "systemd Network Management" - )m4_dnl - m4_ifdef(`ENABLE_RESOLVE', --u systemd-resolve - "systemd Resolver" -+u systemd-resolve 317 "systemd Resolver" - )m4_dnl m4_ifdef(`ENABLE_COREDUMP', -u systemd-coredump - "systemd Core Dumper" +u systemd-coredump 333 "systemd Core Dumper" -- 2.44.0