Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/4] files/fs-perms.txt: Replace /srv by $servicedir
@ 2026-07-06 16:59 Jörg Sommer
  2026-07-06 16:59 ` [PATCH 2/4] systemd: Simplify code to handle resolv.conf with resolved Jörg Sommer
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jörg Sommer @ 2026-07-06 16:59 UTC (permalink / raw)
  To: openembedded-core, joerg.sommer; +Cc: Jörg Sommer

From: Jörg Sommer <joerg.sommer@navimatix.de>

Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de>
---
 meta/files/fs-perms.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/files/fs-perms.txt b/meta/files/fs-perms.txt
index d2266c1b26..9726d5a2b1 100644
--- a/meta/files/fs-perms.txt
+++ b/meta/files/fs-perms.txt
@@ -48,7 +48,7 @@ ${localstatedir}/run	link	/run
 ${localstatedir}/lock	link	/run/lock
 
 /home				0755	root	root	false - - -
-/srv				0755	root	root	false - - -
+${servicedir}			0755	root	root	false - - -
 ${prefix}/src			0755	root	root	false - - -
 ${localstatedir}/local		0755	root	root	false - - -
 
-- 
2.53.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/4] systemd: Simplify code to handle resolv.conf with resolved
  2026-07-06 16:59 [PATCH 1/4] files/fs-perms.txt: Replace /srv by $servicedir Jörg Sommer
@ 2026-07-06 16:59 ` Jörg Sommer
  2026-07-06 16:59 ` [PATCH 3/4] base-files: Install /etc/mtab in a systemd-friendly way Jörg Sommer
  2026-07-06 16:59 ` [PATCH 4/4] systemd: Ship /srv with the package Jörg Sommer
  2 siblings, 0 replies; 7+ messages in thread
From: Jörg Sommer @ 2026-07-06 16:59 UTC (permalink / raw)
  To: openembedded-core, joerg.sommer; +Cc: Jörg Sommer

From: Jörg Sommer <joerg.sommer@navimatix.de>

Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de>
---
 meta/recipes-core/systemd/systemd_259.5.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_259.5.bb b/meta/recipes-core/systemd/systemd_259.5.bb
index f3ec0edae7..0fbfcaba42 100644
--- a/meta/recipes-core/systemd/systemd_259.5.bb
+++ b/meta/recipes-core/systemd/systemd_259.5.bb
@@ -330,9 +330,9 @@ do_install() {
 		echo 'f /run/systemd/resolve/resolv.conf 0644 root root' >>${D}${exec_prefix}/lib/tmpfiles.d/systemd.conf
 		ln -s ../run/systemd/resolve/resolv.conf ${D}${sysconfdir}/resolv-conf.systemd
 	else
-		resolv_conf="${@bb.utils.contains('RESOLV_CONF', 'stub-resolv', 'run/systemd/resolve/stub-resolv.conf', 'run/systemd/resolve/resolv.conf', d)}"
-		sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - ../${resolv_conf}%g" ${D}${exec_prefix}/lib/tmpfiles.d/systemd-resolve.conf
-		ln -s ../${resolv_conf} ${D}${sysconfdir}/resolv-conf.systemd
+		rc="../run/systemd/resolve/${@bb.utils.contains('RESOLV_CONF', 'stub-resolv', 'stub-', '', d)}resolv.conf"
+		sed -i -e "s%^L! /etc/resolv.conf.*$%L! /etc/resolv.conf - - - - $rc%" ${D}${exec_prefix}/lib/tmpfiles.d/systemd-resolve.conf
+		ln -s $rc ${D}${sysconfdir}/resolv-conf.systemd
 	fi
 	if ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'false', 'true', d)}; then
 		rm ${D}${exec_prefix}/lib/tmpfiles.d/x11.conf
-- 
2.53.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/4] base-files: Install /etc/mtab in a systemd-friendly way
  2026-07-06 16:59 [PATCH 1/4] files/fs-perms.txt: Replace /srv by $servicedir Jörg Sommer
  2026-07-06 16:59 ` [PATCH 2/4] systemd: Simplify code to handle resolv.conf with resolved Jörg Sommer
@ 2026-07-06 16:59 ` Jörg Sommer
  2026-07-13 16:29   ` [OE-core] " Joshua Watt
  2026-07-06 16:59 ` [PATCH 4/4] systemd: Ship /srv with the package Jörg Sommer
  2 siblings, 1 reply; 7+ messages in thread
From: Jörg Sommer @ 2026-07-06 16:59 UTC (permalink / raw)
  To: openembedded-core, joerg.sommer; +Cc: Jörg Sommer

From: Jörg Sommer <joerg.sommer@navimatix.de>

The old mtab pointed to /proc/mounts which itself is a symlink. Systemd
therefore tries to replace it with a symlink to /proc/self/mounts, but fails
on a read-only rootfs:

    systemd-tmpfiles: symlink(../proc/self/mounts, /etc/mtab) failed: Read-only file system

Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de>
---
 meta/recipes-core/base-files/base-files_3.0.14.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index d4d777b485..aafc0aa923 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -109,7 +109,7 @@ do_install () {
 	install -m 0644 ${S}/host.conf ${D}${sysconfdir}/host.conf
 	install -m 0644 ${S}/motd ${D}${sysconfdir}/motd
 
-	ln -sf /proc/mounts ${D}${sysconfdir}/mtab
+	ln -sf ../proc/self/mounts ${D}${sysconfdir}/mtab
 
 	# deal with hostname
 	if [ "${hostname}" ]; then
-- 
2.53.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/4] systemd: Ship /srv with the package
  2026-07-06 16:59 [PATCH 1/4] files/fs-perms.txt: Replace /srv by $servicedir Jörg Sommer
  2026-07-06 16:59 ` [PATCH 2/4] systemd: Simplify code to handle resolv.conf with resolved Jörg Sommer
  2026-07-06 16:59 ` [PATCH 3/4] base-files: Install /etc/mtab in a systemd-friendly way Jörg Sommer
@ 2026-07-06 16:59 ` Jörg Sommer
  2026-07-07  7:07   ` [OE-core] " Mathieu Dubois-Briand
  2 siblings, 1 reply; 7+ messages in thread
From: Jörg Sommer @ 2026-07-06 16:59 UTC (permalink / raw)
  To: openembedded-core, joerg.sommer; +Cc: Jörg Sommer

From: Jörg Sommer <joerg.sommer@navimatix.de>

If *volatile-binds* gets removed from RDEPENDS, the /srv directory is not
part of the image, and tmpfiles tries to create it on boot, but fails on a
read-only rootfs:

systemd-tmpfiles: /srv does not exist and cannot be created as the file system is read-only.

Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de>
---
 meta/recipes-core/systemd/systemd_259.5.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd_259.5.bb b/meta/recipes-core/systemd/systemd_259.5.bb
index 0fbfcaba42..447974373f 100644
--- a/meta/recipes-core/systemd/systemd_259.5.bb
+++ b/meta/recipes-core/systemd/systemd_259.5.bb
@@ -266,7 +266,7 @@ do_install() {
 			sed -i -e 's#/root#${ROOT_HOME}#g' ${D}${exec_prefix}/lib/sysusers.d/basic.conf
 		fi
 	fi
-	install -d ${D}/${base_sbindir}
+	install -d ${D}${base_sbindir} ${D}${servicedir}
 
 	if ! ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'true', 'false', d)}; then
 		# Remove the serial-getty generator and instead use explicit services
-- 
2.53.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [OE-core] [PATCH 4/4] systemd: Ship /srv with the package
  2026-07-06 16:59 ` [PATCH 4/4] systemd: Ship /srv with the package Jörg Sommer
@ 2026-07-07  7:07   ` Mathieu Dubois-Briand
  2026-07-07 13:21     ` [PATCH v2] " Jörg Sommer
  0 siblings, 1 reply; 7+ messages in thread
From: Mathieu Dubois-Briand @ 2026-07-07  7:07 UTC (permalink / raw)
  To: joerg.sommer, openembedded-core

On Mon Jul 6, 2026 at 6:59 PM CEST, Jörg Sommer via lists.openembedded.org wrote:
> From: Jörg Sommer <joerg.sommer@navimatix.de>
>
> If *volatile-binds* gets removed from RDEPENDS, the /srv directory is not
> part of the image, and tmpfiles tries to create it on boot, but fails on a
> read-only rootfs:
>
> systemd-tmpfiles: /srv does not exist and cannot be created as the file system is read-only.
>
> Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de>
> ---

Hi Jörg,

You probably also need to modify the FILES variable, as we get this
error on the autobuilder:

ERROR: systemd-1_259.5-r0 do_package: QA Issue: systemd: Files/directories were installed but not shipped in any package:
  /srv

https://autobuilder.yoctoproject.org/valkyrie/#/builders/9/builds/4061
https://autobuilder.yoctoproject.org/valkyrie/#/builders/10/builds/4078
https://autobuilder.yoctoproject.org/valkyrie/#/builders/20/builds/4041
https://autobuilder.yoctoproject.org/valkyrie/#/builders/22/builds/4105

Can you have a look at the issue?

Thanks,
Mathieu

-- 
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2] systemd: Ship /srv with the package
  2026-07-07  7:07   ` [OE-core] " Mathieu Dubois-Briand
@ 2026-07-07 13:21     ` Jörg Sommer
  0 siblings, 0 replies; 7+ messages in thread
From: Jörg Sommer @ 2026-07-07 13:21 UTC (permalink / raw)
  To: Mathieu Dubois-Briand, openembedded-core, joerg.sommer
  Cc: openembedded-core, Jörg Sommer

From: Jörg Sommer <joerg.sommer@navimatix.de>

If *volatile-binds* gets removed from RDEPENDS, the /srv directory is not
part of the image, and tmpfiles tries to create it on boot, but fails on a
read-only rootfs:

systemd-tmpfiles: /srv does not exist and cannot be created as the file system is read-only.

Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de>
---
 meta/recipes-core/systemd/systemd_259.5.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd_259.5.bb b/meta/recipes-core/systemd/systemd_259.5.bb
index 0fbfcaba42..27722f97bb 100644
--- a/meta/recipes-core/systemd/systemd_259.5.bb
+++ b/meta/recipes-core/systemd/systemd_259.5.bb
@@ -266,7 +266,7 @@ do_install() {
 			sed -i -e 's#/root#${ROOT_HOME}#g' ${D}${exec_prefix}/lib/sysusers.d/basic.conf
 		fi
 	fi
-	install -d ${D}/${base_sbindir}
+	install -d ${D}${base_sbindir} ${D}${servicedir}
 
 	if ! ${@bb.utils.contains('PACKAGECONFIG', 'serial-getty-generator', 'true', 'false', d)}; then
 		# Remove the serial-getty generator and instead use explicit services
@@ -719,6 +719,7 @@ FILES:${PN} = " ${base_bindir}/* \
                 ${exec_prefix}/lib/environment.d \
                 ${exec_prefix}/lib/nvpcr \
                 ${exec_prefix}/lib/pcrlock.d \
+                ${servicedir} \
                 ${localstatedir} \
                 ${nonarch_libdir}/modprobe.d/systemd.conf \
                 ${nonarch_libdir}/modprobe.d/README \
-- 
2.53.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [OE-core] [PATCH 3/4] base-files: Install /etc/mtab in a systemd-friendly way
  2026-07-06 16:59 ` [PATCH 3/4] base-files: Install /etc/mtab in a systemd-friendly way Jörg Sommer
@ 2026-07-13 16:29   ` Joshua Watt
  0 siblings, 0 replies; 7+ messages in thread
From: Joshua Watt @ 2026-07-13 16:29 UTC (permalink / raw)
  To: joerg.sommer; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 1944 bytes --]

On Mon, Jul 6, 2026 at 10:59 AM Jörg Sommer via lists.openembedded.org
<joerg.sommer=navimatix.de@lists.openembedded.org> wrote:

> From: Jörg Sommer <joerg.sommer@navimatix.de>
>
> The old mtab pointed to /proc/mounts which itself is a symlink. Systemd
> therefore tries to replace it with a symlink to /proc/self/mounts, but
> fails
> on a read-only rootfs:
>
>     systemd-tmpfiles: symlink(../proc/self/mounts, /etc/mtab) failed:
> Read-only file system
>
> Signed-off-by: Jörg Sommer <joerg.sommer@navimatix.de>
> ---
>  meta/recipes-core/base-files/base-files_3.0.14.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb
> b/meta/recipes-core/base-files/base-files_3.0.14.bb
> index d4d777b485..aafc0aa923 100644
> --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
> +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
> @@ -109,7 +109,7 @@ do_install () {
>         install -m 0644 ${S}/host.conf ${D}${sysconfdir}/host.conf
>         install -m 0644 ${S}/motd ${D}${sysconfdir}/motd
>
> -       ln -sf /proc/mounts ${D}${sysconfdir}/mtab
> +       ln -sf ../proc/self/mounts ${D}${sysconfdir}/mtab
>

This should be absolute /proc/self/mounts otherwise it's assuming
sysconfdir is only one directory level deep, and AFIACT, there is no reason
for it to be absolute


>
>         # deal with hostname
>         if [ "${hostname}" ]; then
> --
> 2.53.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#240283):
> https://lists.openembedded.org/g/openembedded-core/message/240283
> Mute This Topic: https://lists.openembedded.org/mt/120143149/3616693
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> JPEWhacker@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>

[-- Attachment #2: Type: text/html, Size: 3571 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-07-13 16:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-06 16:59 [PATCH 1/4] files/fs-perms.txt: Replace /srv by $servicedir Jörg Sommer
2026-07-06 16:59 ` [PATCH 2/4] systemd: Simplify code to handle resolv.conf with resolved Jörg Sommer
2026-07-06 16:59 ` [PATCH 3/4] base-files: Install /etc/mtab in a systemd-friendly way Jörg Sommer
2026-07-13 16:29   ` [OE-core] " Joshua Watt
2026-07-06 16:59 ` [PATCH 4/4] systemd: Ship /srv with the package Jörg Sommer
2026-07-07  7:07   ` [OE-core] " Mathieu Dubois-Briand
2026-07-07 13:21     ` [PATCH v2] " Jörg Sommer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox