diff options
| author | Chen Qi <Qi.Chen@windriver.com> | 2018-07-17 10:05:11 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-07-18 10:13:30 +0100 |
| commit | 597f4645faf61486eb1d2ab73f3d974460ab9466 (patch) | |
| tree | 7fff129bbe92cc4023efd91014ff7d9169de3bca /meta | |
| parent | 8a7db51308d62f75fbb2937ae4c79deb592070ba (diff) | |
| download | openembedded-core-597f4645faf61486eb1d2ab73f3d974460ab9466.tar.gz openembedded-core-597f4645faf61486eb1d2ab73f3d974460ab9466.tar.bz2 openembedded-core-597f4645faf61486eb1d2ab73f3d974460ab9466.zip | |
systemd: upgrade to 239
Upgrade systemd to 239.
1. Patch Changes
* Rebased Patches
0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch
0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
0006-Make-root-s-home-directory-configurable.patch
0027-remove-nobody-user-group-checking.patch
0011-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
0013-add-fallback-parse_printf_format-implementation.patch
0014-src-basic-missing.h-check-for-missing-strndupa.patch
0015-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
0016-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch
0017-Include-netinet-if_ether.h.patch
0019-Do-not-enable-nss-tests-if-nss-systemd-is-not-enable.patch
0022-don-t-use-glibc-specific-qsort_r.patch
0024-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch
0026-Use-uintmax_t-for-handling-rlim_t.patch
0030-fix-missing-of-__register_atfork-for-non-glibc-build.patch
0031-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch
0001-core-device.c-Change-the-default-device-timeout-to-2.patch
0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch
* Dropped Patches and Reasons
0001-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch
This patch is dropped because the problem has been fixed by
binutils upstream. And this workaround could be dropped.
https://sourceware.org/bugzilla/show_bug.cgi?id=18548
0007-Revert-rules-remove-firmware-loading-rules.patch
0008-Revert-udev-remove-userspace-firmware-loading-suppor.patch
These two patches are dropped because they are for kernel < 3.7.
But the current minimal requirement of kernel to build systemd
is as below.
REQUIREMENTS:
Linux kernel >= 3.13
Linux kernel >= 4.2 for unified cgroup hierarchy support
So these two patches no long make any sense.
Also remove non-exist firmware-path option
0009-remove-duplicate-include-uchar.h.patch
0010-check-for-uchar.h-in-meson.build.patch
These two patches are dropped because musl has implemented
uchar.h. See commit below from musl repo.
"""
ab9672ae73248f51e30f4553c4b8878525e46383
implement uchar.h (C11 UTF-16/32 conversion) interfaces
"""
0018-check-for-missing-canonicalize_file_name.patch
The above patch is dropped because current systemd does not need
canonicalize_file_name.
0025-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch
The above patch is dropped because utmp makes no sense in musl.
Check code below from musl.
include/utmp.h:#define _PATH_UTMP "/dev/null/utmp"
And utmp PACKAGECONFIG has been explicitly disabled for musl.
So we don't need this patch.
0032-memfd.patch
0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch
libmount.patch
0034-Fix-format-truncation-compile-failure-by-typecasting.patch
The above patches are dropped because they are backported patches.
And current systemd has contained these patches.
0036-time-util-fix-build-with-gcc8-Werror-format-truncati.patch
The above patch is dropped because it has been merged and is now
in new version.
* Newly Added Patch
0005-include-gshadow-only-if-ENABLE_GSHADOW-is-1.patch
This patch is added to fix build for musl.
0019-Do-not-disable-buffering-when-writing-to-oom_score_a.patch
This patch is added to fix the following error which caused system
unable to boot up.
systemd-udevd.service: Failed to adjust OOM setting: Invalid argument
dbus.service: Failed to adjust OOM setting: Invalid argument
0020-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch
This patch is added to fix segment fault error on musl systems.
0001-login-use-parse_uid-when-unmounting-user-runtime-dir.patch
This patch is backported to solve a race condition between
user-runtime-dir@xxx.service stop and user deletion.
2. PACKAGECONFIG and Dependency Changes
* Add a new PACKAGECONFIG item 'gshadow'. Enable it by default for glibc
but disable it by default for musl. This is because musl does not provide
gshadow.h.
* Add a new PACKAGECONFIG item 'portabled'. Default to disable it because
it's still experimental, according to the announcement letter.
"""
Currently, the support is still experimental, but this is expected to
change soon. Reflecting this experimental state, the "portablectl" binary
is not installed into /usr/bin yet.
"""
* Change 'kmod' from a hard dependency to a PACKAGECONFIG item. Default
to enable it.
* Change 'acl' from a hard dependency to a PACKAGECONFIG item. Default
to enable it.
* Remove 'readline' from DEPENDS. systemd does not need it.
* Remove 'libcgroup' from DEPENDS. The dependency on libcgroup has been
removed from systemd a long time ago. We now remove this unnecessary
dependency from DEPENDS.
3. update-alternatives changes
The utilities like shutdown, poweroff, etc. are now created as symlinks
at do_install. So there's no need to use update-alternatives mechanism
anymore to create the symlinks now. In addtion, I don't think we now
support multiple init systems at one running system, so there's really
no need to use update-alternatives mechanism here.
Also update the FILES_${PN} to include these files to avoid QA issue.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
48 files changed, 799 insertions, 1868 deletions
diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc index 5fa48e7ab1..736e0a0ea0 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 = "46659f7deb962f55c728e70597e37c2a3ab6326d" +SRCREV = "de7436b02badc82200dc127ff190b8155769b8e7" SRC_URI = "git://github.com/systemd/systemd.git;protocol=git" diff --git a/meta/recipes-core/systemd/systemd/0001-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch b/meta/recipes-core/systemd/systemd/0001-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch deleted file mode 100644 index 2cffc426ed..0000000000 --- a/meta/recipes-core/systemd/systemd/0001-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 687a5af8dc5d38f918a6ce08fed5297234bf8346 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 2 Mar 2018 18:00:17 -0800 -Subject: [PATCH] Hide __start_BUS_ERROR_MAP and __stop_BUS_ERROR_MAP - -for currently unknown reasons they get exported to the shared libries -even without being listed in the sym file - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - -Upstream-Status: Pending [ Conditional on master needing this, 234 does need it ] - - src/libsystemd/sd-bus/bus-error.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c -index 378f7a377..49d797abd 100644 ---- a/src/libsystemd/sd-bus/bus-error.c -+++ b/src/libsystemd/sd-bus/bus-error.c -@@ -71,8 +71,8 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_standard_errors[] = { - }; - - /* GCC maps this magically to the beginning and end of the BUS_ERROR_MAP section */ --extern const sd_bus_error_map __start_BUS_ERROR_MAP[]; --extern const sd_bus_error_map __stop_BUS_ERROR_MAP[]; -+extern const sd_bus_error_map __start_BUS_ERROR_MAP[] _hidden_; -+extern const sd_bus_error_map __stop_BUS_ERROR_MAP[] _hidden_; - - /* Additional maps registered with sd_bus_error_add_map() are in this - * NULL terminated array */ --- -2.16.2 - diff --git a/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch b/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch index e913e3f7b5..d745800ced 100644 --- a/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch +++ b/meta/recipes-core/systemd/systemd/0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch @@ -1,6 +1,6 @@ -From e361f6b4aefae57efff7e457df8db4d1067bec23 Mon Sep 17 00:00:00 2001 +From 9e3816bcaa36e1a11647ca0cf4f8044449c77fe0 Mon Sep 17 00:00:00 2001 From: Chen Qi <Qi.Chen@windriver.com> -Date: Wed, 28 Feb 2018 21:50:23 -0800 +Date: Mon, 2 Jul 2018 15:28:22 +0800 Subject: [PATCH] Remove fstack-protector flags to workaround musl build Remove fstack-protector and fstack-protector-strong flags to fix @@ -8,7 +8,7 @@ the following build failure for qemux86 and qemuppc with musl. undefined reference to `__stack_chk_fail_local' -Upstream-Status: Inappropriate [OE Specific] +Upstream-Status: Inappropriate [musl Specific] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> --- @@ -16,18 +16,18 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 1 file changed, 2 deletions(-) diff --git a/meson.build b/meson.build -index 7610ab12b..591b9cbab 100644 +index f432ea072..a734a295c 100644 --- a/meson.build +++ b/meson.build -@@ -329,8 +329,6 @@ foreach arg : ['-Wextra', - '-fdiagnostics-show-option', - '-fno-strict-aliasing', - '-fvisibility=hidden', -- '-fstack-protector', -- '-fstack-protector-strong', - '--param=ssp-buffer-size=4', - ] - if cc.has_argument(arg) +@@ -333,8 +333,6 @@ possible_cc_flags = [ + '-fdiagnostics-show-option', + '-fno-strict-aliasing', + '-fvisibility=hidden', +- '-fstack-protector', +- '-fstack-protector-strong', + '--param=ssp-buffer-size=4', + ] + -- -2.13.0 +2.11.0 diff --git a/meta/recipes-core/systemd/systemd/0001-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 f4c15e1c46..03f6ead131 100644 --- a/meta/recipes-core/systemd/systemd/0001-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,7 +1,7 @@ -From b1192a6e171413291d9d64fafc04773c6bbc9cab Mon Sep 17 00:00:00 2001 +From 6dd136512896979feb6883a16226d640a7e5ca74 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 +Subject: [PATCH 01/19] 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 implementation @@ -16,10 +16,10 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/basic/missing.h b/src/basic/missing.h -index 1280e6c41..39c1fb700 100644 +index 71a07d057..0e33abb9f 100644 --- a/src/basic/missing.h +++ b/src/basic/missing.h -@@ -605,7 +605,7 @@ struct btrfs_ioctl_quota_ctl_args { +@@ -592,7 +592,7 @@ struct btrfs_ioctl_quota_ctl_args { # if HAVE___SECURE_GETENV # define secure_getenv __secure_getenv # else @@ -29,5 +29,5 @@ index 1280e6c41..39c1fb700 100644 #endif -- -2.13.0 +2.11.0 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/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch index c3f4b39345..e24e7f83fc 100644 --- a/meta/recipes-core/systemd/systemd/0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch +++ b/meta/recipes-core/systemd/systemd/0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch @@ -1,7 +1,7 @@ -From c93eb6cdec03f5e243e59e95dc49273fcb90e7c1 Mon Sep 17 00:00:00 2001 +From 87dd61be2e28e78ce4f9f173794812e6c2d904d1 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 +Date: Wed, 27 Jun 2018 16:01:22 +0800 +Subject: [PATCH 1/9] 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 @@ -23,10 +23,10 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/units/meson.build b/units/meson.build -index 814ee7885..49ace0d0f 100644 +index e4ac6ced6..698734e44 100644 --- a/units/meson.build +++ b/units/meson.build -@@ -60,8 +60,7 @@ units = [ +@@ -46,8 +46,7 @@ units = [ ['poweroff.target', '', 'runlevel0.target'], ['printer.target', ''], @@ -36,7 +36,7 @@ index 814ee7885..49ace0d0f 100644 ['proc-sys-fs-binfmt_misc.mount', 'ENABLE_BINFMT'], ['reboot.target', '', 'runlevel6.target ctrl-alt-del.target'], -@@ -144,8 +143,7 @@ in_units = [ +@@ -130,8 +129,7 @@ in_units = [ ['systemd-ask-password-console.service', ''], ['systemd-ask-password-wall.service', ''], ['systemd-backlight@.service', 'ENABLE_BACKLIGHT'], @@ -58,18 +58,18 @@ index 30a6bc991..4231f3b70 100644 +[Install] +WantedBy=sysinit.target diff --git a/units/systemd-binfmt.service.in b/units/systemd-binfmt.service.in -index df9396d89..0687f4648 100644 +index e940c7c9a..6be7f5cc9 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 +@@ -14,6 +14,7 @@ Documentation=https://www.kernel.org/doc/html/latest/admin-guide/binfmt-misc.htm + Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems 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 +@@ -28,3 +29,6 @@ Type=oneshot RemainAfterExit=yes ExecStart=@rootlibexecdir@/systemd-binfmt TimeoutSec=90s @@ -77,5 +77,5 @@ index df9396d89..0687f4648 100644 +[Install] +WantedBy=sysinit.target -- -2.13.0 +2.11.0 diff --git a/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch b/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch index 98c83620ff..fd7bf3fcf6 100644 --- a/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch +++ b/meta/recipes-core/systemd/systemd/0001-core-device.c-Change-the-default-device-timeout-to-2.patch @@ -1,7 +1,9 @@ -From 7844e070745611a52e355b73e7890f360dd540d0 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Mon, 14 Dec 2015 04:09:19 +0000 +From 2925c0c3b6ce4056622b86c1c61ee14add430790 Mon Sep 17 00:00:00 2001 +From: Chen Qi <Qi.Chen@windriver.com> +Date: Thu, 28 Jun 2018 10:56:29 +0800 Subject: [PATCH] core/device.c: Change the default device timeout to 240 sec. + MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 + Content-Transfer-Encoding: 8bit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -10,16 +12,16 @@ Upstream-Status: Inappropriate [Specific case QEMU/AB] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> - +Signed-off-by: Chen Qi <Qi.Chen@windriver.com> --- src/core/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/device.c b/src/core/device.c -index a43664d3b..4b16a8aec 100644 +index a2d00a0fb..f26e55ebb 100644 --- a/src/core/device.c +++ b/src/core/device.c -@@ -113,7 +113,7 @@ static void device_init(Unit *u) { +@@ -95,7 +95,7 @@ static void device_init(Unit *u) { * indefinitely for plugged in devices, something which cannot * happen for the other units since their operations time out * anyway. */ @@ -27,4 +29,7 @@ index a43664d3b..4b16a8aec 100644 + u->job_running_timeout = (240 * USEC_PER_SEC); u->ignore_on_isolate = true; - } + +-- +2.11.0 + diff --git a/meta/recipes-core/systemd/systemd/0001-login-use-parse_uid-when-unmounting-user-runtime-dir.patch b/meta/recipes-core/systemd/systemd/0001-login-use-parse_uid-when-unmounting-user-runtime-dir.patch new file mode 100644 index 0000000000..ba08e34558 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-login-use-parse_uid-when-unmounting-user-runtime-dir.patch @@ -0,0 +1,110 @@ +From 86d18f3b09ec984ef3732567af992adb2dc77a8a Mon Sep 17 00:00:00 2001 +From: Yu Watanabe <watanabe.yu+github@gmail.com> +Date: Mon, 9 Jul 2018 14:05:20 +0900 +Subject: [PATCH] login: use parse_uid() when unmounting user runtime directory + +When unmounting user runtime directory, only UID is necessary, +and the corresponding user may not exist anymore. +This makes first try to parse the input by parse_uid(), and only if it +fails, prase the input by get_user_creds(). + +Fixes #9541. + +Upstream-Status: Backport +--- + src/login/user-runtime-dir.c | 57 ++++++++++++++++++++++++++++---------------- + 1 file changed, 36 insertions(+), 21 deletions(-) + +diff --git a/src/login/user-runtime-dir.c b/src/login/user-runtime-dir.c +index 1bb26c99e..de4061c75 100644 +--- a/src/login/user-runtime-dir.c ++++ b/src/login/user-runtime-dir.c +@@ -111,8 +111,22 @@ static int user_remove_runtime_path(const char *runtime_path) { + return r; + } + +-static int do_mount(const char *runtime_path, uid_t uid, gid_t gid) { ++static int do_mount(const char *user) { ++ char runtime_path[sizeof("/run/user") + DECIMAL_STR_MAX(uid_t)]; + size_t runtime_dir_size; ++ uid_t uid; ++ gid_t gid; ++ int r; ++ ++ r = get_user_creds(&user, &uid, &gid, NULL, NULL); ++ if (r < 0) ++ return log_error_errno(r, ++ r == -ESRCH ? "No such user \"%s\"" : ++ r == -ENOMSG ? "UID \"%s\" is invalid or has an invalid main group" ++ : "Failed to look up user \"%s\": %m", ++ user); ++ ++ xsprintf(runtime_path, "/run/user/" UID_FMT, uid); + + assert_se(gather_configuration(&runtime_dir_size) == 0); + +@@ -120,16 +134,30 @@ static int do_mount(const char *runtime_path, uid_t uid, gid_t gid) { + return user_mkdir_runtime_path(runtime_path, uid, gid, runtime_dir_size); + } + +-static int do_umount(const char *runtime_path) { ++static int do_umount(const char *user) { ++ char runtime_path[sizeof("/run/user") + DECIMAL_STR_MAX(uid_t)]; ++ uid_t uid; ++ int r; ++ ++ /* The user may be already removed. So, first try to parse the string by parse_uid(), ++ * and if it fails, fallback to get_user_creds().*/ ++ if (parse_uid(user, &uid) < 0) { ++ r = get_user_creds(&user, &uid, NULL, NULL, NULL); ++ if (r < 0) ++ return log_error_errno(r, ++ r == -ESRCH ? "No such user \"%s\"" : ++ r == -ENOMSG ? "UID \"%s\" is invalid or has an invalid main group" ++ : "Failed to look up user \"%s\": %m", ++ user); ++ } ++ ++ xsprintf(runtime_path, "/run/user/" UID_FMT, uid); ++ + log_debug("Will remove %s", runtime_path); + return user_remove_runtime_path(runtime_path); + } + + int main(int argc, char *argv[]) { +- const char *user; +- uid_t uid; +- gid_t gid; +- char runtime_path[sizeof("/run/user") + DECIMAL_STR_MAX(uid_t)]; + int r; + |
