summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2018-03-12 14:35:45 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-03-20 09:30:19 +0000
commit906230a73b3ccfa4afd2a19a6b0aa18cd1d5fa08 (patch)
treee76d9557b248aa859077ce752db3bdbbab7dabb9
parent388a6cdef0a993d781141f7c375a198f4c4ab808 (diff)
downloadopenembedded-core-906230a73b3ccfa4afd2a19a6b0aa18cd1d5fa08.tar.gz
openembedded-core-906230a73b3ccfa4afd2a19a6b0aa18cd1d5fa08.tar.bz2
openembedded-core-906230a73b3ccfa4afd2a19a6b0aa18cd1d5fa08.zip
systemd: upgrade to 237
Upgrade systemd to 237. Note that this version has dropped autotools support. The following patches are rebased: 0004-Use-getenv-when-secure-versions-are-not-available.patch 0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch 0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch 0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch 0018-check-for-uchar.h-in-configure.patch 0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch 0001-add-fallback-parse_printf_format-implementation.patch 0002-src-basic-missing.h-check-for-missing-strndupa.patch 0007-check-for-missing-canonicalize_file_name.patch 0008-Do-not-enable-nss-tests.patch 0010-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch 0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch The following backported patches are dropped: 0001-core-evaluate-presets-after-generators-have-run-6526.patch 0001-main-skip-many-initialization-steps-when-running-in-.patch 0001-meson-update-header-file-to-detect-memfd_create.patch 0003-fileio-include-sys-mman.h.patch The following patch is dropped as autotools support is dropped: 0002-configure.ac-Check-if-memfd_create-is-already-define.patch The following patches are newly added to fix problems: 0027-remove-nobody-user-group-checking.patch 0028-add-missing-FTW_-macros-for-musl.patch 0030-fix-missing-of-__register_atfork-for-non-glibc-build.patch 0031-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch Other changes are mostly autotools/meson related. This new version has dropped ptest support, as there's no easy way to do this in the framework of meson. Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-rw-r--r--meta/recipes-core/systemd/systemd.inc2
-rw-r--r--meta/recipes-core/systemd/systemd/0001-Use-getenv-when-secure-versions-are-not-available.patch (renamed from meta/recipes-core/systemd/systemd/0004-Use-getenv-when-secure-versions-are-not-available.patch)21
-rw-r--r--meta/recipes-core/systemd/systemd/0001-core-evaluate-presets-after-generators-have-run-6526.patch69
-rw-r--r--meta/recipes-core/systemd/systemd/0001-main-skip-many-initialization-steps-when-running-in-.patch163
-rw-r--r--meta/recipes-core/systemd/systemd/0001-meson-update-header-file-to-detect-memfd_create.patch28
-rw-r--r--meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch81
-rw-r--r--meta/recipes-core/systemd/systemd/0002-configure.ac-Check-if-memfd_create-is-already-define.patch27
-rw-r--r--meta/recipes-core/systemd/systemd/0002-src-basic-missing.h-check-for-missing-strndupa.patch104
-rw-r--r--meta/recipes-core/systemd/systemd/0003-fileio-include-sys-mman.h.patch26
-rw-r--r--meta/recipes-core/systemd/systemd/0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch64
-rw-r--r--meta/recipes-core/systemd/systemd/0004-implment-systemd-sysv-install-for-OE.patch (renamed from meta/recipes-core/systemd/systemd/0010-implment-systemd-sysv-install-for-OE.patch)8
-rw-r--r--meta/recipes-core/systemd/systemd/0005-binfmt-Don-t-install-dependency-links-at-install-tim.patch74
-rw-r--r--meta/recipes-core/systemd/systemd/0005-rules-whitelist-hd-devices.patch (renamed from meta/recipes-core/systemd/systemd/0012-rules-whitelist-hd-devices.patch)9
-rw-r--r--meta/recipes-core/systemd/systemd/0006-Make-root-s-home-directory-configurable.patch78
-rw-r--r--meta/recipes-core/systemd/systemd/0007-Revert-rules-remove-firmware-loading-rules.patch (renamed from meta/recipes-core/systemd/systemd/0014-Revert-rules-remove-firmware-loading-rules.patch)8
-rw-r--r--meta/recipes-core/systemd/systemd/0007-check-for-missing-canonicalize_file_name.patch63
-rw-r--r--meta/recipes-core/systemd/systemd/0007-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch40
-rw-r--r--meta/recipes-core/systemd/systemd/0008-Do-not-enable-nss-tests.patch35
-rw-r--r--meta/recipes-core/systemd/systemd/0008-Revert-udev-remove-userspace-firmware-loading-suppor.patch (renamed from meta/recipes-core/systemd/systemd/0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch)204
-rw-r--r--meta/recipes-core/systemd/systemd/0009-remove-duplicate-include-uchar.h.patch (renamed from meta/recipes-core/systemd/systemd/0017-remove-duplicate-include-uchar.h.patch)14
-rw-r--r--meta/recipes-core/systemd/systemd/0010-check-for-uchar.h-in-meson.build.patch45
-rw-r--r--meta/recipes-core/systemd/systemd/0010-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch49
-rw-r--r--meta/recipes-core/systemd/systemd/0011-nss-mymachines-Build-conditionally-when-HAVE_MYHOSTN.patch38
-rw-r--r--meta/recipes-core/systemd/systemd/0011-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch (renamed from meta/recipes-core/systemd/systemd/0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch)26
-rw-r--r--meta/recipes-core/systemd/systemd/0012-rules-watch-metadata-changes-in-ide-devices.patch (renamed from meta/recipes-core/systemd/systemd/0020-rules-watch-metadata-changes-in-ide-devices.patch)8
-rw-r--r--meta/recipes-core/systemd/systemd/0013-Make-root-s-home-directory-configurable.patch155
-rw-r--r--meta/recipes-core/systemd/systemd/0013-add-fallback-parse_printf_format-implementation.patch (renamed from meta/recipes-core/systemd/systemd/0001-add-fallback-parse_printf_format-implementation.patch)86
-rw-r--r--meta/recipes-core/systemd/systemd/0014-src-basic-missing.h-check-for-missing-strndupa.patch118
-rw-r--r--meta/recipes-core/systemd/systemd/0015-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch (renamed from meta/recipes-core/systemd/systemd/0003-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch)30
-rw-r--r--meta/recipes-core/systemd/systemd/0016-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch (renamed from meta/recipes-core/systemd/systemd/0004-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch)18
-rw-r--r--meta/recipes-core/systemd/systemd/0017-Include-netinet-if_ether.h.patch (renamed from meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch)55
-rw-r--r--meta/recipes-core/systemd/systemd/0018-check-for-missing-canonicalize_file_name.patch47
-rw-r--r--meta/recipes-core/systemd/systemd/0018-check-for-uchar.h-in-configure.patch44
-rw-r--r--meta/recipes-core/systemd/systemd/0019-Do-not-enable-nss-tests-if-nss-systemd-is-not-enable.patch29
-rw-r--r--meta/recipes-core/systemd/systemd/0020-test-hexdecoct.c-Include-missing.h-for-strndupa.patch (renamed from meta/recipes-core/systemd/systemd/0009-test-hexdecoct.c-Include-missing.h-form-strndupa.patch)15
-rw-r--r--meta/recipes-core/systemd/systemd/0021-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch42
-rw-r--r--meta/recipes-core/systemd/systemd/0022-don-t-use-glibc-specific-qsort_r.patch (renamed from meta/recipes-core/systemd/systemd/0011-don-t-use-glibc-specific-qsort_r.patch)26
-rw-r--r--meta/recipes-core/systemd/systemd/0023-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch (renamed from meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch)22
-rw-r--r--meta/recipes-core/systemd/systemd/0024-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch (renamed from meta/recipes-core/systemd/systemd/0013-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch)14
-rw-r--r--meta/recipes-core/systemd/systemd/0025-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch (renamed from meta/recipes-core/systemd/systemd/0001-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch)16
-rw-r--r--meta/recipes-core/systemd/systemd/0026-Use-uintmax_t-for-handling-rlim_t.patch (renamed from meta/recipes-core/systemd/systemd/0001-Use-uintmax_t-for-handling-rlim_t.patch)22
-rw-r--r--meta/recipes-core/systemd/systemd/0027-remove-nobody-user-group-checking.patch63
-rw-r--r--meta/recipes-core/systemd/systemd/0028-add-missing-FTW_-macros-for-musl.patch50
-rw-r--r--meta/recipes-core/systemd/systemd/0029-nss-mymachines-Build-conditionally-when-ENABLE_MYHOS.patch43
-rw-r--r--meta/recipes-core/systemd/systemd/0030-fix-missing-of-__register_atfork-for-non-glibc-build.patch45
-rw-r--r--meta/recipes-core/systemd/systemd/0031-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch30
-rw-r--r--meta/recipes-core/systemd/systemd/run-ptest6
-rw-r--r--meta/recipes-core/systemd/systemd_237.bb (renamed from meta/recipes-core/systemd/systemd_234.bb)269
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
+