diff options
| author | Jiaqing Zhao <jiaqing.zhao@linux.intel.com> | 2022-05-23 10:20:14 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-06-11 10:06:13 +0100 |
| commit | 09007ea722ef46fae6620899cd9e2104507455a0 (patch) | |
| tree | ca1f1dee3bde66606a14e9c47f099c6c7f7e9fda | |
| parent | fc3f326706250e6dc1981511152f60c3bcdb0766 (diff) | |
| download | poky-09007ea722ef46fae6620899cd9e2104507455a0.tar.gz | |
systemd: Correct path returned in sd_path_lookup()
In oe-core, sysusers.d/sysctl.d/binfmt.d/modules-load.d are still kept
under /usr/lib instead of /lib changed in systemd v246. This patch
corrects the SD_PATH_{SYSUSERS,SYSCTL,BINFMT,MODULES_LOAD} returned
in sd_path_lookup() back to the /usr/lib ones.
Also updates the patch description and upstream status.
(From OE-Core rev: 4851c836529a47210934d865ed6bdc724ed50a2f)
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
(cherry picked from commit 8d913ab6db3ae4b2786a64a086d519a40dcb8c4d)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
3 files changed, 74 insertions, 43 deletions
diff --git a/meta/recipes-core/systemd/systemd/0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch b/meta/recipes-core/systemd/systemd/0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch new file mode 100644 index 0000000000..31efc4cc4b --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch | |||
| @@ -0,0 +1,73 @@ | |||
| 1 | From beb0219b71510bc63aed81d2a970a04349d6c616 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 29 Sep 2020 18:01:41 -0700 | ||
| 4 | Subject: [PATCH] Move sysusers.d/sysctl.d/binfmt.d/modules-load.d to /usr | ||
| 5 | |||
| 6 | These directories are moved to /lib since systemd v246, commit | ||
| 7 | 4a56315a990b ("path: use ROOTPREFIX properly"), but in oe-core/yocto, | ||
| 8 | the old /usr/lib is still being used. | ||
| 9 | |||
| 10 | Upstream-Status: Inappropriate (OE-specific) | ||
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 12 | Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> | ||
| 13 | --- | ||
| 14 | src/core/systemd.pc.in | 8 ++++---- | ||
| 15 | src/libsystemd/sd-path/sd-path.c | 8 ++++---- | ||
| 16 | 2 files changed, 8 insertions(+), 8 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in | ||
| 19 | index fc0f8c34fa..65996bbed8 100644 | ||
| 20 | --- a/src/core/systemd.pc.in | ||
| 21 | +++ b/src/core/systemd.pc.in | ||
| 22 | @@ -65,16 +65,16 @@ systemdshutdowndir=${systemd_shutdown_dir} | ||
| 23 | tmpfiles_dir=${prefix}/lib/tmpfiles.d | ||
| 24 | tmpfilesdir=${tmpfiles_dir} | ||
| 25 | |||
| 26 | -sysusers_dir=${rootprefix}/lib/sysusers.d | ||
| 27 | +sysusers_dir=${prefix}/lib/sysusers.d | ||
| 28 | sysusersdir=${sysusers_dir} | ||
| 29 | |||
| 30 | -sysctl_dir=${rootprefix}/lib/sysctl.d | ||
| 31 | +sysctl_dir=${prefix}/lib/sysctl.d | ||
| 32 | sysctldir=${sysctl_dir} | ||
| 33 | |||
| 34 | -binfmt_dir=${rootprefix}/lib/binfmt.d | ||
| 35 | +binfmt_dir=${prefix}/lib/binfmt.d | ||
| 36 | binfmtdir=${binfmt_dir} | ||
| 37 | |||
| 38 | -modules_load_dir=${rootprefix}/lib/modules-load.d | ||
| 39 | +modules_load_dir=${prefix}/lib/modules-load.d | ||
| 40 | modulesloaddir=${modules_load_dir} | ||
| 41 | |||
| 42 | catalog_dir=${prefix}/lib/systemd/catalog | ||
| 43 | diff --git a/src/libsystemd/sd-path/sd-path.c b/src/libsystemd/sd-path/sd-path.c | ||
| 44 | index ff1e0d5f8e..19a001f47e 100644 | ||
| 45 | --- a/src/libsystemd/sd-path/sd-path.c | ||
| 46 | +++ b/src/libsystemd/sd-path/sd-path.c | ||
| 47 | @@ -362,19 +362,19 @@ static int get_path(uint64_t type, char **buffer, const char **ret) { | ||
| 48 | return 0; | ||
| 49 | |||
| 50 | case SD_PATH_SYSUSERS: | ||
| 51 | - *ret = ROOTPREFIX_NOSLASH "/lib/sysusers.d"; | ||
| 52 | + *ret = "/usr/lib/sysusers.d"; | ||
| 53 | return 0; | ||
| 54 | |||
| 55 | case SD_PATH_SYSCTL: | ||
| 56 | - *ret = ROOTPREFIX_NOSLASH "/lib/sysctl.d"; | ||
| 57 | + *ret = "/usr/lib/sysctl.d"; | ||
| 58 | return 0; | ||
| 59 | |||
| 60 | case SD_PATH_BINFMT: | ||
| 61 | - *ret = ROOTPREFIX_NOSLASH "/lib/binfmt.d"; | ||
| 62 | + *ret = "/usr/lib/binfmt.d"; | ||
| 63 | return 0; | ||
| 64 | |||
| 65 | case SD_PATH_MODULES_LOAD: | ||
| 66 | - *ret = ROOTPREFIX_NOSLASH "/lib/modules-load.d"; | ||
| 67 | + *ret = "/usr/lib/modules-load.d"; | ||
| 68 | return 0; | ||
| 69 | |||
| 70 | case SD_PATH_CATALOG: | ||
| 71 | -- | ||
| 72 | 2.34.1 | ||
| 73 | |||
diff --git a/meta/recipes-core/systemd/systemd/0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch b/meta/recipes-core/systemd/systemd/0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch deleted file mode 100644 index 752824688f..0000000000 --- a/meta/recipes-core/systemd/systemd/0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch +++ /dev/null | |||
| @@ -1,42 +0,0 @@ | |||
| 1 | From 58860e0f248576a80ff2af256ba42713c186ae93 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 29 Sep 2020 18:01:41 -0700 | ||
| 4 | Subject: [PATCH] systemd.pc.in: use ROOTPREFIX without suffixed slash | ||
| 5 | |||
| 6 | This complements the commit | ||
| 7 | https://github.com/poettering/systemd/commit/b612c26ceb9f56af0271fc9f07c1724d2d260a8a | ||
| 8 | |||
| 9 | Upstream-Status: Pending | ||
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 11 | --- | ||
| 12 | src/core/systemd.pc.in | 8 ++++---- | ||
| 13 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in | ||
| 16 | index b5cc8f9..21dbf30 100644 | ||
| 17 | --- a/src/core/systemd.pc.in | ||
| 18 | +++ b/src/core/systemd.pc.in | ||
| 19 | @@ -65,16 +65,16 @@ systemdshutdowndir=${systemd_shutdown_dir} | ||
| 20 | tmpfiles_dir=${prefix}/lib/tmpfiles.d | ||
| 21 | tmpfilesdir=${tmpfiles_dir} | ||
| 22 | |||
| 23 | -sysusers_dir=${rootprefix}/lib/sysusers.d | ||
| 24 | +sysusers_dir=${prefix}/lib/sysusers.d | ||
| 25 | sysusersdir=${sysusers_dir} | ||
| 26 | |||
| 27 | -sysctl_dir=${rootprefix}/lib/sysctl.d | ||
| 28 | +sysctl_dir=${prefix}/lib/sysctl.d | ||
| 29 | sysctldir=${sysctl_dir} | ||
| 30 | |||
| 31 | -binfmt_dir=${rootprefix}/lib/binfmt.d | ||
| 32 | +binfmt_dir=${prefix}/lib/binfmt.d | ||
| 33 | binfmtdir=${binfmt_dir} | ||
| 34 | |||
| 35 | -modules_load_dir=${rootprefix}/lib/modules-load.d | ||
| 36 | +modules_load_dir=${prefix}/lib/modules-load.d | ||
| 37 | modulesloaddir=${modules_load_dir} | ||
| 38 | |||
| 39 | catalog_dir=${prefix}/lib/systemd/catalog | ||
| 40 | -- | ||
| 41 | 2.25.1 | ||
| 42 | |||
diff --git a/meta/recipes-core/systemd/systemd_250.5.bb b/meta/recipes-core/systemd/systemd_250.5.bb index 81fe0c88e0..006b2f86ea 100644 --- a/meta/recipes-core/systemd/systemd_250.5.bb +++ b/meta/recipes-core/systemd/systemd_250.5.bb | |||
| @@ -23,7 +23,7 @@ SRC_URI += "file://touchscreen.rules \ | |||
| 23 | file://systemd-pager.sh \ | 23 | file://systemd-pager.sh \ |
| 24 | file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ | 24 | file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ |
| 25 | file://0003-implment-systemd-sysv-install-for-OE.patch \ | 25 | file://0003-implment-systemd-sysv-install-for-OE.patch \ |
| 26 | file://0001-systemd.pc.in-use-ROOTPREFIX-without-suffixed-slash.patch \ | 26 | file://0001-Move-sysusers.d-sysctl.d-binfmt.d-modules-load.d-to-.patch \ |
| 27 | file://0001-resolve-Use-sockaddr-pointer-type-for-bind.patch \ | 27 | file://0001-resolve-Use-sockaddr-pointer-type-for-bind.patch \ |
| 28 | " | 28 | " |
| 29 | 29 | ||
