From be65fe73b7ad5d101f4dd278a4442ebb534f9923 Mon Sep 17 00:00:00 2001 From: Alex Kiernan Date: Thu, 20 Aug 2020 10:20:36 +0000 Subject: systemd: Fix path to modules-load.d et al Following 4a56315a990b ("path: use ROOTPREFIX properly"), the paths to sysusers.d, sysctl.d binfmt.d and modules-load.d changed to /lib when building without usrmerge, which aoppears to be an inadvertent ABI change. Undo this change and track upstream: https://github.com/systemd/systemd/issues/16773 (From OE-Core rev: a2b68ba14fb97349d3ebc71e5ca96a340aec243e) Signed-off-by: Alex Kiernan Signed-off-by: Richard Purdie --- .../0001-Use-PREFIX-ROOTPREFIX-correctly.patch | 81 ++++++++++++++++++++++ meta/recipes-core/systemd/systemd_246.bb | 1 + 2 files changed, 82 insertions(+) create mode 100644 meta/recipes-core/systemd/systemd/0001-Use-PREFIX-ROOTPREFIX-correctly.patch diff --git a/meta/recipes-core/systemd/systemd/0001-Use-PREFIX-ROOTPREFIX-correctly.patch b/meta/recipes-core/systemd/systemd/0001-Use-PREFIX-ROOTPREFIX-correctly.patch new file mode 100644 index 0000000000..c61941df91 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-Use-PREFIX-ROOTPREFIX-correctly.patch @@ -0,0 +1,81 @@ +From 2868e3b72d4ac02860e380d70c9af0d61a985790 Mon Sep 17 00:00:00 2001 +From: Alex Kiernan +Date: Sun, 16 Aug 2020 16:07:12 +0000 +Subject: [PATCH] Use PREFIX/ROOTPREFIX correctly + +Signed-off-by: Alex Kiernan +Upstream-status: Pending [https://github.com/systemd/systemd/issues/16773] +--- + meson.build | 1 + + src/core/systemd.pc.in | 8 ++++---- + src/libsystemd/sd-path/sd-path.c | 8 ++++---- + 3 files changed, 9 insertions(+), 8 deletions(-) + +diff --git a/meson.build b/meson.build +index dbbddb68e232..18618dba0623 100644 +--- a/meson.build ++++ b/meson.build +@@ -226,6 +226,7 @@ conf.set_quoted('SYSTEMD_SHUTDOWN_BINARY_PATH', join_paths(rootlib + conf.set_quoted('SYSTEMCTL_BINARY_PATH', join_paths(rootbindir, 'systemctl')) + conf.set_quoted('SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH', join_paths(rootbindir, 'systemd-tty-ask-password-agent')) + conf.set_quoted('SYSTEMD_STDIO_BRIDGE_BINARY_PATH', join_paths(bindir, 'systemd-stdio-bridge')) ++conf.set_quoted('PREFIX', prefixdir) + conf.set_quoted('ROOTPREFIX', rootprefixdir) + conf.set_quoted('RANDOM_SEED_DIR', randomseeddir) + conf.set_quoted('RANDOM_SEED', join_paths(randomseeddir, 'random-seed')) +diff --git a/src/core/systemd.pc.in b/src/core/systemd.pc.in +index 8424837824b5..410a126317ad 100644 +--- a/src/core/systemd.pc.in ++++ b/src/core/systemd.pc.in +@@ -65,16 +65,16 @@ systemdshutdowndir=${systemd_shutdown_dir} + tmpfiles_dir=${prefix}/lib/tmpfiles.d + tmpfilesdir=${tmpfiles_dir} + +-sysusers_dir=${rootprefix}/lib/sysusers.d ++sysusers_dir=${prefix}/lib/sysusers.d + sysusersdir=${sysusers_dir} + +-sysctl_dir=${rootprefix}/lib/sysctl.d ++sysctl_dir=${prefix}/lib/sysctl.d + sysctldir=${sysctl_dir} + +-binfmt_dir=${rootprefix}/lib/binfmt.d ++binfmt_dir=${prefix}/lib/binfmt.d + binfmtdir=${binfmt_dir} + +-modules_load_dir=${rootprefix}/lib/modules-load.d ++modules_load_dir=${prefix}/lib/modules-load.d + modulesloaddir=${modules_load_dir} + + catalog_dir=${prefix}/lib/systemd/catalog +diff --git a/src/libsystemd/sd-path/sd-path.c b/src/libsystemd/sd-path/sd-path.c +index 736795d1d797..3572916dc073 100644 +--- a/src/libsystemd/sd-path/sd-path.c ++++ b/src/libsystemd/sd-path/sd-path.c +@@ -371,19 +371,19 @@ static int get_path(uint64_t type, char **buffer, const char **ret) { + return 0; + + case SD_PATH_SYSUSERS: +- *ret = ROOTPREFIX "/lib/sysusers.d"; ++ *ret = PREFIX "/lib/sysusers.d"; + return 0; + + case SD_PATH_SYSCTL: +- *ret = ROOTPREFIX "/lib/sysctl.d"; ++ *ret = PREFIX "/lib/sysctl.d"; + return 0; + + case SD_PATH_BINFMT: +- *ret = ROOTPREFIX "/lib/binfmt.d"; ++ *ret = PREFIX "/lib/binfmt.d"; + return 0; + + case SD_PATH_MODULES_LOAD: +- *ret = ROOTPREFIX "/lib/modules-load.d"; ++ *ret = PREFIX "/lib/modules-load.d"; + return 0; + + case SD_PATH_CATALOG: +-- +2.17.1 + diff --git a/meta/recipes-core/systemd/systemd_246.bb b/meta/recipes-core/systemd/systemd_246.bb index 11e3cd2966..704a36e75d 100644 --- a/meta/recipes-core/systemd/systemd_246.bb +++ b/meta/recipes-core/systemd/systemd_246.bb @@ -20,6 +20,7 @@ SRC_URI += "file://touchscreen.rules \ file://99-default.preset \ file://0001-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ file://0003-implment-systemd-sysv-install-for-OE.patch \ + file://0001-Use-PREFIX-ROOTPREFIX-correctly.patch \ " # patches needed by musl -- cgit v1.2.3-54-g00ecf