tmpfiles.d: use nonarch libdir
cover tmpfiles.d: use nonarch libdir
From: Lukas Funke <[email protected]>
The series intents to move tmpfiles.d configurations from /etc to /usr/lib.
The documentation of systemd states that /etc/tmpfiles.d should be reserved for the local administrator and packages should put their files in /usr/lib/tmpfiles.d [1].
[1] https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
Malte Schmidt (3):
systemd: use nonarch libdir for tmpfiles.d
pam: use nonarch libdir for tmpfiles.d
sysstat: use nonarch libdir for tmpfiles.d
Stefan Herbrechtsmeier (1):
glibc: use nonarch libdir for tmpfiles.d
meta/recipes-core/glibc/glibc-package.inc | 8 ++++---- meta/recipes-core/systemd/systemd_254.4.bb | 4 ++-- meta/recipes-extended/pam/libpam_1.5.3.bb | 9 ++++++--- meta/recipes-extended/sysstat/sysstat_12.7.4.bb | 10 +++++++--- 4 files changed, 19 insertions(+), 12 deletions(-)
Signature · 1 line
2.30.2
PATCH 1/4 systemd: use nonarch libdir for tmpfiles.d
From: Malte Schmidt <[email protected]>
The documentation of systemd states that /etc/tmpfiles.d should be reserved for the local administrator and packages should put their files in /usr/lib/tmpfiles.d [1].
[1] https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
--- meta/recipes-core/systemd/systemd_254.4.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/systemd/systemd_254.4.bb +2 -2
@@ -282,12 +282,12 @@ do_install() { [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s ${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd install -d ${D}${sysconfdir}/udev/rules.d/ - install -d ${D}${sysconfdir}/tmpfiles.d + install -d ${D}${exec_prefix}/lib/tmpfiles.d for rule in $(find ${WORKDIR} -maxdepth 1 -type f -name "*.rules"); do install -m 0644 $rule ${D}${sysconfdir}/udev/rules.d/ done - install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${sysconfdir}/tmpfiles.d/ + install -m 0644 ${WORKDIR}/00-create-volatile.conf ${D}${exec_prefix}/lib/tmpfiles.d/ if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then install -d ${D}${sysconfdir}/init.d
Signature · 1 line
2.30.2
Re: [OE-Core][PATCH 1/4] systemd: use nonarch libdir for tmpfiles.d
Lukas Funke <[email protected]> escreveu no dia terça, 14/11/2023 à(s) 11:00:
Quoted 25 lines
From: Malte Schmidt <[email protected]>
The documentation of systemd states that
/etc/tmpfiles.dshould be reserved for the local administrator and packages should put their files in/usr/lib/tmpfiles.d[1].[1] https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
Signed-off-by Malte Schmidt <[email protected]>Signed-off-by Stefan Herbrechtsmeier <--- meta/recipes-core/systemd/systemd_254.4.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)meta/recipes-core/systemd/systemd_254.4.bb +0
-0@@ -282,12 +282,12 @@ do_install() { [ ! -e ${D}/${base_sbindir}/udevd ] && ln -s${rootlibexecdir}/systemd/systemd-udevd ${D}/${base_sbindir}/udevd
install -d ${D}${sysconfdir}/udev/rules.d/
meta/recipes-core/systemd/systemd_254.4.bb do_install() { · line 285
Quoted 2 lines
meta/recipes-core/systemd/systemd_254.4.bb +1
-1- install -d ${D}${sysconfdir}/tmpfiles.d + install -d ${D}${exec_prefix}/lib/tmpfiles.d
for rule in $(find ${WORKDIR} -maxdepth 1 -type f -name "*.rules");Quoted 9 lines
do
install -m 0644 $rule ${D}${sysconfdir}/udev/rules.d/ done- install -m 0644
${WORKDIR}/00-create-volatile.conf
${D}${sysconfdir}/tmpfiles.d/
+ install -m 0644${WORKDIR}/00-create-volatile.conf
${D}${exec_prefix}/lib/tmpfiles.d/
Quoted 7 lines
if
${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; theninstall -d ${D}${sysconfdir}/init.d--
2.30.2
Hi Lukas,
Why not ${nonarch_libdir} instead of ${exec_prefix}/lib as in all the other patches in this series?
Jose
Quoted 12 lines
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#190493):
https://lists.openembedded.org/g/openembedded-core/message/190493
Mute This Topic: https://lists.openembedded.org/mt/102581153/5052612
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Signature · 3 lines
Best regards, José Quaresma
PATCH 2/4 pam: use nonarch libdir for tmpfiles.d
In reply to [email protected]From: Malte Schmidt <[email protected]>
The documentation of systemd states that /etc/tmpfiles.d should be reserved for the local administrator and packages should put their files in /usr/lib/tmpfiles.d [1].
[1] https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
--- meta/recipes-extended/pam/libpam_1.5.3.bb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
meta/recipes-extended/pam/libpam_1.5.3.bb +6 -3
@@ -49,7 +49,10 @@ PACKAGECONFIG[audit] = "--enable-audit,--disable-audit,audit," PACKAGECONFIG[userdb] = "--enable-db=db,--enable-db=no,db," PACKAGES += "${PN}-runtime ${PN}-xtests" -FILES:${PN} = "${base_libdir}/lib*${SOLIBS}" +FILES:${PN} = " \ + ${base_libdir}/lib*${SOLIBS} \ + ${nonarch_libdir}/tmpfiles.d/*.conf \ +" FILES:${PN}-dev += "${base_libdir}/security/*.la ${base_libdir}/*.la ${base_libdir}/lib*${SOLIBSDEV}" FILES:${PN}-runtime = "${sysconfdir} ${sbindir} ${systemd_system_unitdir}" FILES:${PN}-xtests = "${datadir}/Linux-PAM/xtests"
@@ -130,9 +133,9 @@ do_install() { if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)}; then rm -rf ${D}${sysconfdir}/init.d/ rm -rf ${D}${sysconfdir}/rc* - install -d ${D}${sysconfdir}/tmpfiles.d + install -d ${D}${nonarch_libdir}/tmpfiles.d install -m 0644 ${WORKDIR}/pam-volatiles.conf \ - ${D}${sysconfdir}/tmpfiles.d/pam.conf + ${D}${nonarch_libdir}/tmpfiles.d/pam.conf else install -d ${D}${sysconfdir}/default/volatiles install -m 0644 ${WORKDIR}/99_pam \
Signature · 1 line
2.30.2
PATCH 3/4 sysstat: use nonarch libdir for tmpfiles.d
In reply to [email protected]From: Malte Schmidt <[email protected]>
The documentation of systemd states that /etc/tmpfiles.d should be reserved for the local administrator and packages should put their files in /usr/lib/tmpfiles.d [1].
[1] https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
--- meta/recipes-extended/sysstat/sysstat_12.7.4.bb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
meta/recipes-extended/sysstat/sysstat_12.7.4.bb +7 -3
@@ -48,9 +48,9 @@ do_install() { install -m 0644 ${WORKDIR}/99_sysstat ${D}/etc/default/volatiles fi if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/tmpfiles.d + install -d ${D}${nonarch_libdir}/tmpfiles.d echo "d ${localstatedir}/log/sa - - - -" \ - > ${D}${sysconfdir}/tmpfiles.d/sysstat.conf + > ${D}${nonarch_libdir}/tmpfiles.d/sysstat.conf # Unless both cron and systemd are enabled, install our own # systemd unit file. Otherwise the package will install one.
@@ -70,7 +70,11 @@ pkg_postinst:${PN} () { fi } -FILES:${PN} += "${systemd_system_unitdir} ${nonarch_base_libdir}/systemd" +FILES:${PN} += " \ + ${systemd_system_unitdir} \ + ${nonarch_base_libdir}/systemd \ + ${nonarch_libdir}/tmpfiles.d \ +" TARGET_CC_ARCH += "${LDFLAGS}"
Signature · 1 line
2.30.2
PATCH 4/4 glibc: use nonarch libdir for tmpfiles.d
In reply to [email protected]From: Stefan Herbrechtsmeier <[email protected]>
The documentation of systemd states that /etc/tmpfiles.d should be reserved for the local administrator and packages should put their files in /usr/lib/tmpfiles.d [1].
[1] https://www.freedesktop.org/software/systemd/man/tmpfiles.d.html
--- meta/recipes-core/glibc/glibc-package.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
meta/recipes-core/glibc/glibc-package.inc +4 -4
@@ -42,7 +42,7 @@ FILES_SOLIBSDEV = "${libdir}/lib*${SOLIBSDEV}" FILES:${PN}-dev += "${libdir}/libpthread.a ${libdir}/libdl.a ${libdir}/libutil.a ${libdir}/libanl.a ${libdir}/*_nonshared.a ${base_libdir}/*_nonshared.a ${base_libdir}/*.o ${datadir}/aclocal" RDEPENDS:${PN}-dev = "linux-libc-headers-dev" FILES:${PN}-staticdev += "${libdir}/*.a ${base_libdir}/*.a" -FILES:nscd = "${sbindir}/nscd* ${sysconfdir}/init.d/nscd ${systemd_system_unitdir}/nscd* ${sysconfdir}/tmpfiles.d/nscd.conf \ +FILES:nscd = "${sbindir}/nscd* ${sysconfdir}/init.d/nscd ${systemd_system_unitdir}/nscd* ${nonarch_libdir}/tmpfiles.d/nscd.conf \ ${sysconfdir}/nscd.conf ${sysconfdir}/default/volatiles/98_nscd ${localstatedir}/db/nscd" FILES:${PN}-mtrace = "${bindir}/mtrace" FILES:tzcode = "${bindir}/tzselect ${sbindir}/zic ${bindir}/zdump"
@@ -132,9 +132,9 @@ def get_libc_fpu_setting(bb, d): do_install:append:class-target() { if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${sysconfdir}/tmpfiles.d + install -d ${D}${nonarch_libdir}/tmpfiles.d echo "d /run/nscd 755 root root -" \ - > ${D}${sysconfdir}/tmpfiles.d/nscd.conf + > ${D}${nonarch_libdir}/tmpfiles.d/nscd.conf fi if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
@@ -280,7 +280,7 @@ python populate_packages:prepend () { pkg_postinst:nscd () { if [ -z "$D" ]; then if command -v systemd-tmpfiles >/dev/null; then - systemd-tmpfiles --create ${sysconfdir}/tmpfiles.d/nscd.conf + systemd-tmpfiles --create ${nonarch_libdir}/tmpfiles.d/nscd.conf elif [ -e ${sysconfdir}/init.d/populate-volatile.sh ]; then ${sysconfdir}/init.d/populate-volatile.sh update fi
Signature · 1 line
2.30.2