diff options
48 files changed, 1156 insertions, 1373 deletions
diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc index d99d1506d7..5fa48e7ab1 100644 --- a/meta/recipes-core/systemd/systemd.inc +++ b/meta/recipes-core/systemd/systemd.inc @@ -14,7 +14,7 @@ LICENSE = "GPLv2 & LGPLv2.1" LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" -SRCREV = "c1edab7ad1e7ccc9be693bedfd464cd1cbffb395" +SRCREV = "46659f7deb962f55c728e70597e37c2a3ab6326d" SRC_URI = "git://github.com/systemd/systemd.git;protocol=git" diff --git a/meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch b/meta/recipes-core/systemd/systemd/0001-Use-getenv-when-secure-versions-are-not-available.patch index ab2cbe035b..f4c15e1c46 100644 --- a/meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch +++ b/meta/recipes-core/systemd/systemd/0001-Use-getenv-when-secure-versions-are-not-available.patch @@ -1,23 +1,26 @@ -From 5765cda4f7243e240b1e8723dc536fb20503d544 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Wed, 9 Nov 2016 19:28:32 -0800 -Subject: [PATCH 04/19] Use getenv when secure versions are not available +From b1192a6e171413291d9d64fafc04773c6bbc9cab Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +Date: Fri, 23 Feb 2018 10:04:48 +0800 +Subject: [PATCH 01/31] Use getenv when secure versions are not available musl doesnt implement secure version, so we default -to it if configure does not detect a secure imeplementation +to it if configure does not detect a secure implementation Signed-off-by: Khem Raj <raj.khem@gmail.com> + Upstream-Status: Denied + +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> --- src/basic/missing.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/missing.h b/src/basic/missing.h -index 4a3fd9c..4936873 100644 +index 1280e6c41..39c1fb700 100644 --- a/src/basic/missing.h +++ b/src/basic/missing.h -@@ -529,7 +529,7 @@ struct btrfs_ioctl_quota_ctl_args { - # ifdef HAVE___SECURE_GETENV +@@ -605,7 +605,7 @@ struct btrfs_ioctl_quota_ctl_args { + # if HAVE___SECURE_GETENV # define secure_getenv __secure_getenv # else -# error "neither secure_getenv nor __secure_getenv are available" @@ -26,5 +29,5 @@ index 4a3fd9c..4936873 100644 #endif -- -2.10.2 +2.13.0 diff --git a/meta/recipes-core/systemd/systemd/0001-core-evaluate-presets-after-generators-have-run-6526.patch b/meta/recipes-core/systemd/systemd/0001-core-evaluate-presets-after-generators-have-run-6526.patch deleted file mode 100644 index df100e587d..0000000000 --- a/meta/recipes-core/systemd/systemd/0001-core-evaluate-presets-after-generators-have-run-6526.patch +++ /dev/null @@ -1,69 +0,0 @@ -From 28dd66ecfce743b1ea9046c7bb501e0fcaeff724 Mon Sep 17 00:00:00 2001 -From: Luca Bruno <luca.bruno@coreos.com> -Date: Sun, 6 Aug 2017 13:24:24 +0000 -Subject: [PATCH] core: evaluate presets after generators have run (#6526) - -This commit moves the first-boot system preset-settings evaluation out -of main and into the manager startup logic itself. Notably, it reverses -the order between generators and presets evaluation, so that any changes -performed by first-boot generators are taken into the account by presets -logic. - -After this change, units created by a generator can be enabled as part -of a preset. - -Upstream-Status: Backport - -Signed-off-by: Catalin Enache <catalin.enache@windriver.com> ---- - src/core/main.c | 12 ++---------- - src/core/manager.c | 8 ++++++++ - 2 files changed, 10 insertions(+), 10 deletions(-) - -diff --git a/src/core/main.c b/src/core/main.c -index dfedc3d..11ac9cf 100644 ---- a/src/core/main.c -+++ b/src/core/main.c -@@ -1809,18 +1809,10 @@ int main(int argc, char *argv[]) { - if (prctl(PR_SET_CHILD_SUBREAPER, 1) < 0) - log_warning_errno(errno, "Failed to make us a subreaper: %m"); - -- if (arg_system) { -+ if (arg_system) -+ /* Bump up RLIMIT_NOFILE for systemd itself */ - (void) bump_rlimit_nofile(&saved_rlimit_nofile); - -- if (empty_etc) { -- r = unit_file_preset_all(UNIT_FILE_SYSTEM, 0, NULL, UNIT_FILE_PRESET_ENABLE_ONLY, NULL, 0); -- if (r < 0) -- log_full_errno(r == -EEXIST ? LOG_NOTICE : LOG_WARNING, r, "Failed to populate /etc with preset unit settings, ignoring: %m"); -- else -- log_info("Populated /etc with preset unit settings."); -- } -- } -- - r = manager_new(arg_system ? UNIT_FILE_SYSTEM : UNIT_FILE_USER, arg_action == ACTION_TEST, &m); - if (r < 0) { - log_emergency_errno(r, "Failed to allocate manager object: %m"); -diff --git a/src/core/manager.c b/src/core/manager.c -index 1aadb70..fb5e2b5 100644 ---- a/src/core/manager.c -+++ b/src/core/manager.c -@@ -1328,6 +1328,14 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) { - if (r < 0) - return r; - -+ if (m->first_boot && m->unit_file_scope == UNIT_FILE_SYSTEM) { -+ q = unit_file_preset_all(UNIT_FILE_SYSTEM, 0, NULL, UNIT_FILE_PRESET_ENABLE_ONLY, NULL, 0); -+ if (q < 0) -+ log_full_errno(q == -EEXIST ? LOG_NOTICE : LOG_WARNING, q, "Failed to populate /etc with preset unit settings, ignoring: %m"); -+ else -+ log_info("Populated /etc with preset unit settings."); -+ } -+ - lookup_paths_reduce(&m->lookup_paths); - manager_build_unit_path_cache(m); - --- -2.10.2 - diff --git a/meta/recipes-core/systemd/systemd/0001-main-skip-many-initialization-steps-when-running-in-.patch b/meta/recipes-core/systemd/systemd/0001-main-skip-many-initialization-steps-when-running-in-.patch deleted file mode 100644 index a033b04b23..0000000000 --- a/meta/recipes-core/systemd/systemd/0001-main-skip-many-initialization-steps-when-running-in-.patch +++ /dev/null @@ -1,163 +0,0 @@ -From dea374e898a749a0474b72b2015cca9009b1432b Mon Sep 17 00:00:00 2001 -From: Lennart Poettering <lennart@poettering.net> -Date: Wed, 13 Sep 2017 10:31:40 +0200 -Subject: [PATCH] main: skip many initialization steps when running in --test - mode - -Most importantly, don't collect open socket activation fds when in ---test mode. This specifically created a problem because we invoke -pager_open() beforehand (which these days makes copies of the original -stdout/stderr in order to be able to restore them when the pager goes -away) and we might mistakenly the fd copies it creates as socket -activation fds. - -Fixes: #6383 - -Upstream-Status: Backport - -Signed-off-by: Catalin Enache <catalin.enache@windriver.com> ---- - src/core/main.c | 108 +++++++++++++++++++++++++++++--------------------------- - 1 file changed, 56 insertions(+), 52 deletions(-) - -diff --git a/src/core/main.c b/src/core/main.c -index 11ac9cf..d1a53a5 100644 ---- a/src/core/main.c -+++ b/src/core/main.c -@@ -1679,20 +1679,22 @@ int main(int argc, char *argv[]) { - log_close(); - - /* Remember open file descriptors for later deserialization */ -- r = fdset_new_fill(&fds); -- if (r < 0) { -- log_emergency_errno(r, "Failed to allocate fd set: %m"); -- error_message = "Failed to allocate fd set"; -- goto finish; -- } else -- fdset_cloexec(fds, true); -+ if (arg_action == ACTION_RUN) { -+ r = fdset_new_fill(&fds); -+ if (r < 0) { -+ log_emergency_errno(r, "Failed to allocate fd set: %m"); -+ error_message = "Failed to allocate fd set"; -+ goto finish; -+ } else -+ fdset_cloexec(fds, true); - -- if (arg_serialization) -- assert_se(fdset_remove(fds, fileno(arg_serialization)) >= 0); -+ if (arg_serialization) -+ assert_se(fdset_remove(fds, fileno(arg_serialization)) >= 0); - -- if (arg_system) -- /* Become a session leader if we aren't one yet. */ -- setsid(); -+ if (arg_system) -+ /* Become a session leader if we aren't one yet. */ -+ setsid(); -+ } - - /* Move out of the way, so that we won't block unmounts */ - assert_se(chdir("/") == 0); -@@ -1762,56 +1764,58 @@ int main(int argc, char *argv[]) { - arg_action == ACTION_TEST ? " test" : "", getuid(), t); - } - -- if (arg_system && !skip_setup) { -- if (arg_show_status > 0) -- status_welcome(); -+ if (arg_action == ACTION_RUN) { -+ if (arg_system && !skip_setup) { -+ if (arg_show_status > 0) -+ status_welcome(); - -- hostname_setup(); -- machine_id_setup(NULL, arg_machine_id, NULL); -- loopback_setup(); -- bump_unix_max_dgram_qlen(); -+ hostname_setup(); -+ machine_id_setup(NULL, arg_machine_id, NULL); -+ loopback_setup(); -+ bump_unix_max_dgram_qlen(); - -- test_usr(); -- } -+ test_usr(); -+ } - -- if (arg_system && arg_runtime_watchdog > 0 && arg_runtime_watchdog != USEC_INFINITY) -- watchdog_set_timeout(&arg_runtime_watchdog); -+ if (arg_system && arg_runtime_watchdog > 0 && arg_runtime_watchdog != USEC_INFINITY) -+ watchdog_set_timeout(&arg_runtime_watchdog); - -- if (arg_timer_slack_nsec != NSEC_INFINITY) -- if (prctl(PR_SET_TIMERSLACK, arg_timer_slack_nsec) < 0) -- log_error_errno(errno, "Failed to adjust timer slack: %m"); -+ if (arg_timer_slack_nsec != NSEC_INFINITY) -+ if (prctl(PR_SET_TIMERSLACK, arg_timer_slack_nsec) < 0) -+ log_error_errno(errno, "Failed to adjust timer slack: %m"); - -- if (arg_system && !cap_test_all(arg_capability_bounding_set)) { -- r = capability_bounding_set_drop_usermode(arg_capability_bounding_set); -- if (r < 0) { -- log_emergency_errno(r, "Failed to drop capability bounding set of usermode helpers: %m"); -- error_message = "Failed to drop capability bounding set of usermode helpers"; -- goto finish; -- } -- r = capability_bounding_set_drop(arg_capability_bounding_set, true); -- if (r < 0) { -- log_emergency_errno(r, "Failed to drop capability bounding set: %m"); -- error_message = "Failed to drop capability bounding set"; -- goto finish; -+ if (arg_system && !cap_test_all(arg_capability_bounding_set)) { -+ r = capability_bounding_set_drop_usermode(arg_capability_bounding_set); -+ if (r < 0) { -+ log_emergency_errno(r, "Failed to drop capability bounding set of usermode helpers: %m"); -+ error_message = "Failed to drop capability bounding set of usermode helpers"; -+ goto finish; -+ } -+ r = capability_bounding_set_drop(arg_capability_bounding_set, true); -+ if (r < 0) { -+ log_emergency_errno(r, "Failed to drop capability bounding set: %m"); -+ error_message = "Failed to drop capability bounding set"; -+ goto finish; -+ } - } -- } - -- if (arg_syscall_archs) { -- r = enforce_syscall_archs(arg_syscall_archs); -- if (r < 0) { -- error_message = "Failed to set syscall architectures"; -- goto finish; -+ if (arg_syscall_archs) { -+ r = enforce_syscall_archs(arg_syscall_archs); -+ if (r < 0) { -+ error_message = "Failed to set syscall architectures"; -+ goto finish; -+ } - } -- } - -- if (!arg_system) -- /* Become reaper of our children */ -- if (prctl(PR_SET_CHILD_SUBREAPER, 1) < 0) -- log_warning_errno(errno, "Failed to make us a subreaper: %m"); -+ if (!arg_system) -+ /* Become reaper of our children */ -+ if (prctl(PR_SET_CHILD_SUBREAPER, 1) < 0) -+ log_warning_errno(errno, "Failed to make us a subreaper: %m"); - -- if (arg_system) -- /* Bump up RLIMIT_NOFILE for systemd itself */ -- (void) bump_rlimit_nofile(&saved_rlimit_nofile); -+ if (arg_system) -+ /* Bump up RLIMIT_NOFILE for systemd itself */ -+ (void) bump_rlimit_nofile(&saved_rlimit_nofile); -+ } - - r = manager_new(arg_system ? UNIT_FILE_SYSTEM : UNIT_FILE_USER, arg_action == ACTION_TEST, &m); - if (r < 0) { --- -2.10.2 - diff --git a/meta/recipes-core/systemd/systemd/0001-meson-update-header-file-to-detect-memfd_create.patch b/meta/recipes-core/systemd/systemd/0001-meson-update-header-file-to-detect-memfd_create.patch deleted file mode 100644 index c6431209d0..0000000000 --- a/meta/recipes-core/systemd/systemd/0001-meson-update-header-file-to-detect-memfd_create.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 2207e1ffe4f7e2dcc5e745dadb48738aa1048d63 Mon Sep 17 00:00:00 2001 -From: Yu Watanabe <watanabe.yu+github@gmail.com> -Date: Sun, 26 Nov 2017 02:17:06 +0900 -Subject: [PATCH 1/3] meson: update header file to detect memfd_create() - ---- -Upstream-Status: Backport - - meson.build | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index 20b27c860..550dd4ad8 100644 ---- a/meson.build -+++ b/meson.build -@@ -414,7 +414,8 @@ foreach ident : ['secure_getenv', '__secure_getenv'] - endforeach - - foreach ident : [ -- ['memfd_create', '''#include <sys/memfd.h>'''], -+ ['memfd_create', '''#define _GNU_SOURCE -+ #include <sys/mman.h>'''], - ['gettid', '''#include <sys/types.h>'''], - ['pivot_root', '''#include <stdlib.h>'''], # no known header declares pivot_root - ['name_to_handle_at', '''#define _GNU_SOURCE --- -2.16.1 - diff --git a/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch b/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch new file mode 100644 index 0000000000..c3f4b39345 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch @@ -0,0 +1,81 @@ +From c93eb6cdec03f5e243e59e95dc49273fcb90e7c1 Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +Date: Fri, 23 Feb 2018 10:23:40 +0800 +Subject: [PATCH 02/31] binfmt: Don't install dependency links at install time + for the binfmt services + +use [Install] blocks so that they get created when the service is enabled +like a traditional service. + +The [Install] blocks were rejected upstream as they don't have a way to +"enable" it on install without static symlinks which can't be disabled, +only masked. We however can do that in a postinst. + +Upstream-Status: Denied + +Signed-off-by: Ross Burton <ross.burton@intel.com> +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> +--- + units/meson.build | 6 ++---- + units/proc-sys-fs-binfmt_misc.automount | 3 +++ + units/systemd-binfmt.service.in | 4 ++++ + 3 files changed, 9 insertions(+), 4 deletions(-) + +diff --git a/units/meson.build b/units/meson.build +index 814ee7885..49ace0d0f 100644 +--- a/units/meson.build ++++ b/units/meson.build +@@ -60,8 +60,7 @@ units = [ + ['poweroff.target', '', + 'runlevel0.target'], + ['printer.target', ''], +- ['proc-sys-fs-binfmt_misc.automount', 'ENABLE_BINFMT', +- 'sysinit.target.wants/'], ++ ['proc-sys-fs-binfmt_misc.automount', 'ENABLE_BINFMT'], + ['proc-sys-fs-binfmt_misc.mount', 'ENABLE_BINFMT'], + ['reboot.target', '', + 'runlevel6.target ctrl-alt-del.target'], +@@ -144,8 +143,7 @@ in_units = [ + ['systemd-ask-password-console.service', ''], + ['systemd-ask-password-wall.service', ''], + ['systemd-backlight@.service', 'ENABLE_BACKLIGHT'], +- ['systemd-binfmt.service', 'ENABLE_BINFMT', +- 'sysinit.target.wants/'], ++ ['systemd-binfmt.service', 'ENABLE_BINFMT'], + ['systemd-coredump@.service', 'ENABLE_COREDUMP'], + ['systemd-exit.service', ''], + ['systemd-firstboot.service', 'ENABLE_FIRSTBOOT', +diff --git a/units/proc-sys-fs-binfmt_misc.automount b/units/proc-sys-fs-binfmt_misc.automount +index 30a6bc991..4231f3b70 100644 +--- a/units/proc-sys-fs-binfmt_misc.automount ++++ b/units/proc-sys-fs-binfmt_misc.automount +@@ -18,3 +18,6 @@ ConditionPathIsReadWrite=/proc/sys/ + + [Automount] + Where=/proc/sys/fs/binfmt_misc ++ ++[Install] ++WantedBy=sysinit.target +diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in +index df9396d89..0687f4648 100644 +--- a/units/systemd-binfmt.service.in ++++ b/units/systemd-binfmt.service.in +@@ -13,6 +13,7 @@ Documentation=man:systemd-binfmt.service(8) man:binfmt.d(5) + Documentation=https://www.kernel.org/doc/Documentation/binfmt_misc.txt + DefaultDependencies=no + Conflicts=shutdown.target ++Wants=proc-sys-fs-binfmt_misc.automount + After=proc-sys-fs-binfmt_misc.automount + Before=sysinit.target shutdown.target + ConditionPathIsReadWrite=/proc/sys/ +@@ -27,3 +28,6 @@ Type=oneshot + RemainAfterExit=yes + ExecStart=@rootlibexecdir@/systemd-binfmt + TimeoutSec=90s ++ ++[Install] ++WantedBy=sysinit.target +-- +2.13.0 + diff --git a/meta/recipes-core/systemd/systemd/0002-configure.ac-Check-if-memfd_create-is-already-define.patch b/meta/recipes-core/systemd/systemd/0002-configure.ac-Check-if-memfd_create-is-already-define.patch deleted file mode 100644 index da798a79a3..0000000000 --- a/meta/recipes-core/systemd/systemd/0002-configure.ac-Check-if-memfd_create-is-already-define.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 025408c87869962f511de044dd41a1f4b1d80165 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Sat, 27 Jan 2018 11:53:38 -0800 -Subject: [PATCH 2/3] configure.ac: Check if memfd_create is already defined - -Upstream-Status: Inappropriate [upstream systemd uses meson] - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - configure.ac | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/configure.ac b/configure.ac -index 3674190fb..c7a184d72 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -340,6 +340,7 @@ AC_CHECK_DECLS([ - [], [], [[ - #include <sys/types.h> - #include <unistd.h> -+#include <sys/mman.h> - #include <sys/mount.h> - #include <fcntl.h> - #include <sched.h> --- -2.16.1 - diff --git a/meta/recipes-core/systemd/systemd/0002-src-basic-missing.h-check-for-missing-strndupa.patch b/meta/recipes-core/systemd/systemd/0002-src-basic-missing.h-check-for-missing-strndupa.patch deleted file mode 100644 index 94c136b0d9..0000000000 --- a/meta/recipes-core/systemd/systemd/0002-src-basic-missing.h-check-for-missing-strndupa.patch +++ /dev/null @@ -1,104 +0,0 @@ -From 585abd891a56409915314304101cac26b42c076b Mon Sep 17 00:00:00 2001 -From: Emil Renner Berthing <systemd@esmil.dk> < |
