bitbake.conf: Add runtimedir
PATCH 1/2 bitbake.conf: Add runtimedir
Adds the path to the runtime state directory (/run). In particular, systemd units need to have the correct path to the runtime directory because RequiresMountsFor doesn't follow symbolic links. This means that if a unit calls out a directory in /var/run (a symbolic link to /run), it may actually start before /run is mounted. The fix is to have the unit specify a directory in /run instead.
--- meta/conf/bitbake.conf | 1 + 1 file changed, 1 insertion(+)
meta/conf/bitbake.conf +1 -0
@@ -31,6 +31,7 @@ export sysconfdir = "${base_prefix}/etc" export servicedir = "${base_prefix}/srv" export sharedstatedir = "${base_prefix}/com" export localstatedir = "${base_prefix}/var" +export runtimedir = "${base_prefix}/run" export datadir = "${prefix}/share" export infodir = "${datadir}/info" export mandir = "${datadir}/man"
Signature · 1 line
2.34.1
PATCH 2/2 rpcbind: Specify state directory under /run
The state directory must be correctly specified as under /run because RequiresMountsFor doesn't follow symbolic links which means the unit may run before /run is mounted if the default of /var/run/rpcbind is kept
--- meta/recipes-extended/rpcbind/rpcbind_1.2.6.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-extended/rpcbind/rpcbind_1.2.6.bb +1 -1
@@ -40,7 +40,7 @@ PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_system_unitdir}/ systemd \ " -EXTRA_OECONF += " --enable-warmstarts --with-rpcuser=rpc" +EXTRA_OECONF += " --enable-warmstarts --with-rpcuser=rpc --with-statedir=${runtimedir}/rpcbind" do_install:append () { install -d ${D}${sysconfdir}/init.d
Signature · 1 line
2.34.1
Quoted 17 lines · Joshua Watt
Adds the path to the runtime state directory (/run). In particular, systemd units need to have the correct path to the runtime directory because RequiresMountsFor doesn't follow symbolic links. This means that if a unit calls out a directory in
/var/run(a symbolic link to /run), it may actually start before /run is mounted. The fix is to have the unit specify a directory in /run instead.Signed-off-by Joshua Watt <[email protected]>--- meta/conf/bitbake.conf | 1 + 1 file changed, 1 insertion(+)meta/conf/bitbake.conf +0
-0
meta/conf/bitbake.conf export sysconfdir = "${base_prefix}/etc" · line 37
Quoted 7 lines
meta/conf/bitbake.conf +1
-0@@ -31,6 +31,7 @@ export sysconfdir = "${base_prefix}/etc" export servicedir = "${base_prefix}/srv" export sharedstatedir = "${base_prefix}/com" export localstatedir = "${base_prefix}/var" +export runtimedir = "${base_prefix}/run" export datadir = "${prefix}/share" export infodir = "${datadir}/info" export mandir = "${datadir}/man"
Is there anything currently using that from the shell environment?
Most of this is historical and in many cases not necessary so I'm not sure we want to add to it...
Cheers,
Richard
Quoted 14 lines · Richard Purdie
Quoted 12 lines · Joshua Watt
Adds the path to the runtime state directory (/run). In particular, systemd units need to have the correct path to the runtime directory because RequiresMountsFor doesn't follow symbolic links. This means that if a unit calls out a directory in
/var/run(a symbolic link to /run), it may actually start before /run is mounted. The fix is to have the unit specify a directory in /run instead.Signed-off-by Joshua Watt <[email protected]>--- meta/conf/bitbake.conf | 1 + 1 file changed, 1 insertion(+)
Quoted 14 lines
meta/conf/bitbake.conf export sysconfdir = "${base_prefix}/etc" · line 37
Quoted 12 lines
meta/conf/bitbake.conf +1
-0@@ -31,6 +31,7 @@ export sysconfdir = "${base_prefix}/etc" export servicedir = "${base_prefix}/srv" export sharedstatedir = "${base_prefix}/com" export localstatedir = "${base_prefix}/var" +export runtimedir = "${base_prefix}/run" export datadir = "${prefix}/share" export infodir = "${datadir}/info" export mandir = "${datadir}/man"Is there anything currently using that from the shell environment?
No, nothing is using it today.
Quoted 3 lines
Most of this is historical and in many cases not necessary so I'm not sure we want to add to it...
Ya fair. Are you saying we shouldn't export it, or we shouldn't add it at all. I'm fine with either way, the latter just means open-coding it as "/run" where necessary (e.g. the rpcbind patch)
Quoted 4 lines
Cheers,
Richard
Quoted 34 lines · Joshua Watt
Quoted 14 lines · Richard Purdie
Quoted 12 lines · Joshua Watt
Adds the path to the runtime state directory (/run). In particular, systemd units need to have the correct path to the runtime directory because RequiresMountsFor doesn't follow symbolic links. This means that if a unit calls out a directory in
/var/run(a symbolic link to /run), it may actually start before /run is mounted. The fix is to have the unit specify a directory in /run instead.Signed-off-by Joshua Watt <[email protected]>--- meta/conf/bitbake.conf | 1 + 1 file changed, 1 insertion(+)Quoted 14 lines
meta/conf/bitbake.conf export sysconfdir = "${base_prefix}/etc" · line 37
Quoted 12 lines
meta/conf/bitbake.conf +1
-0@@ -31,6 +31,7 @@ export sysconfdir = "${base_prefix}/etc" export servicedir = "${base_prefix}/srv" export sharedstatedir = "${base_prefix}/com" export localstatedir = "${base_prefix}/var" +export runtimedir = "${base_prefix}/run" export datadir = "${prefix}/share" export infodir = "${datadir}/info" export mandir = "${datadir}/man"Is there anything currently using that from the shell environment?
No, nothing is using it today.
Quoted 1 line
Quoted 6 lines
Quoted 2 lines
Most of this is historical and in many cases not necessary so I'm not sure we want to add to it...
Ya fair. Are you saying we shouldn't export it, or we shouldn't add it at all. I'm fine with either way, the latter just means open-coding it as "/run" where necessary (e.g. the rpcbind patch)
I'm just saying not to export it. We have enough of a mess already in the environment!
Cheers,
Richard
PATCH v2 1/1 bitbake.conf: Add runtimedir
In reply to Joshua WattAdds the path to the runtime state directory (/run). In particular, systemd units need to have the correct path to the runtime directory because RequiresMountsFor doesn't follow symbolic links. This means that if a unit calls out a directory in /var/run (a symbolic link to /run), it may actually start before /run is mounted. The fix is to have the unit specify a directory in /run instead.
--- meta/conf/bitbake.conf | 1 + 1 file changed, 1 insertion(+)
meta/conf/bitbake.conf +1 -0
@@ -31,6 +31,7 @@ export sysconfdir = "${base_prefix}/etc" export servicedir = "${base_prefix}/srv" export sharedstatedir = "${base_prefix}/com" export localstatedir = "${base_prefix}/var" +runtimedir = "${base_prefix}/run" export datadir = "${prefix}/share" export infodir = "${datadir}/info" export mandir = "${datadir}/man"
Signature · 1 line
2.34.1