diff options
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; + + log_parse_environment(); +@@ -146,23 +174,10 @@ int main(int argc, char *argv[]) { + + umask(0022); + +- user = argv[2]; +- r = get_user_creds(&user, &uid, &gid, NULL, NULL); +- if (r < 0) { +- 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); +- return EXIT_FAILURE; +- } +- +- xsprintf(runtime_path, "/run/user/" UID_FMT, uid); +- + if (streq(argv[1], "start")) +- r = do_mount(runtime_path, uid, gid); ++ r = do_mount(argv[2]); + else if (streq(argv[1], "stop")) +- r = do_umount(runtime_path); ++ r = do_umount(argv[2]); + else + assert_not_reached("Unknown verb!"); + +-- +2.11.0 + diff --git a/meta/recipes-core/systemd/systemd/0022-don-t-use-glibc-specific-qsort_r.patch b/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch index a5f74421ac..f07211bd8a 100644 --- a/meta/recipes-core/systemd/systemd/0022-don-t-use-glibc-specific-qsort_r.patch +++ b/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch @@ -1,21 +1,99 @@ -From d343757d629402c70ca8e5eaa551deaf175c96f3 Mon Sep 17 00:00:00 2001 +From d43faf6d253db789225b7c454c8f255fbc68857e Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing <systemd@esmil.dk> Date: Thu, 18 Sep 2014 15:24:56 +0200 -Subject: [PATCH 22/31] don't use glibc-specific qsort_r +Subject: [PATCH 02/19] don't use glibc-specific qsort_r -Upstream-Status: Pending +Upstream-Status: Inappropriate [musl specific] Signed-off-by: Khem Raj <raj.khem@gmail.com> --- - src/hwdb/hwdb.c | 18 +++++++++++------- - src/udev/udevadm-hwdb.c | 16 ++++++++++------ - 2 files changed, 21 insertions(+), 13 deletions(-) + src/basic/format-table.c | 27 ++++++++++++++++----------- + src/basic/util.h | 7 ------- + src/hwdb/hwdb.c | 18 +++++++++++------- + src/udev/udevadm-hwdb.c | 16 ++++++++++------ + 4 files changed, 37 insertions(+), 31 deletions(-) +diff --git a/src/basic/format-table.c b/src/basic/format-table.c +index 94e796d1c..f7b4eade9 100644 +--- a/src/basic/format-table.c ++++ b/src/basic/format-table.c +@@ -745,29 +745,29 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t + return 0; + } + +-static int table_data_compare(const void *x, const void *y, void *userdata) { ++static Table *user_table; ++static int table_data_compare(const void *x, const void *y) { + const size_t *a = x, *b = y; +- Table *t = userdata; + size_t i; + int r; + +- assert(t); +- assert(t->sort_map); ++ assert(user_table); ++ assert(user_table->sort_map); + + /* Make sure the header stays at the beginning */ +- if (*a < t->n_columns && *b < t->n_columns) ++ if (*a < user_table->n_columns && *b < user_table->n_columns) + return 0; +- if (*a < t->n_columns) ++ if (*a < user_table->n_columns) + return -1; +- if (*b < t->n_columns) ++ if (*b < user_table->n_columns) + return 1; + + /* Order other lines by the sorting map */ +- for (i = 0; i < t->n_sort_map; i++) { ++ for (i = 0; i < user_table->n_sort_map; i++) { + TableData *d, *dd; + +- d = t->data[*a + t->sort_map[i]]; +- dd = t->data[*b + t->sort_map[i]]; ++ d = user_table->data[*a + user_table->sort_map[i]]; ++ dd = user_table->data[*b + user_table->sort_map[i]]; + + r = cell_data_compare(d, *a, dd, *b); + if (r != 0) +@@ -960,7 +960,12 @@ int table_print(Table *t, FILE *f) { + for (i = 0; i < n_rows; i++) + sorted[i] = i * t->n_columns; + +- qsort_r_safe(sorted, n_rows, sizeof(size_t), table_data_compare, t); ++ if (n_rows <= 1) ++ return; ++ assert(sorted); ++ user_table = t; ++ qsort(sorted, n_rows, sizeof(size_t), table_data_compare); ++ user_table = NULL; + } + |
