* [OE-core][PATCH 1/2] bitbake.conf: Add runtimedir
@ 2023-12-15 20:34 Joshua Watt
2023-12-15 20:34 ` [OE-core][PATCH 2/2] rpcbind: Specify state directory under /run Joshua Watt
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Joshua Watt @ 2023-12-15 20:34 UTC (permalink / raw)
To: openembedded-core; +Cc: 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 <JPEWhacker@gmail.com>
---
meta/conf/bitbake.conf | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index e7826e7af96..55166d01784 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -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"
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* [OE-core][PATCH 2/2] rpcbind: Specify state directory under /run
2023-12-15 20:34 [OE-core][PATCH 1/2] bitbake.conf: Add runtimedir Joshua Watt
@ 2023-12-15 20:34 ` Joshua Watt
2023-12-15 22:47 ` [OE-core][PATCH 1/2] bitbake.conf: Add runtimedir Richard Purdie
2023-12-18 15:38 ` [OE-core][PATCH v2] " Joshua Watt
2 siblings, 0 replies; 6+ messages in thread
From: Joshua Watt @ 2023-12-15 20:34 UTC (permalink / raw)
To: openembedded-core; +Cc: Joshua Watt
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
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
meta/recipes-extended/rpcbind/rpcbind_1.2.6.bb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-extended/rpcbind/rpcbind_1.2.6.bb b/meta/recipes-extended/rpcbind/rpcbind_1.2.6.bb
index dd89726afc7..dbd4d32e0a0 100644
--- a/meta/recipes-extended/rpcbind/rpcbind_1.2.6.bb
+++ b/meta/recipes-extended/rpcbind/rpcbind_1.2.6.bb
@@ -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
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [OE-core][PATCH 1/2] bitbake.conf: Add runtimedir
2023-12-15 20:34 [OE-core][PATCH 1/2] bitbake.conf: Add runtimedir Joshua Watt
2023-12-15 20:34 ` [OE-core][PATCH 2/2] rpcbind: Specify state directory under /run Joshua Watt
@ 2023-12-15 22:47 ` Richard Purdie
2023-12-15 23:47 ` Joshua Watt
2023-12-18 15:38 ` [OE-core][PATCH v2] " Joshua Watt
2 siblings, 1 reply; 6+ messages in thread
From: Richard Purdie @ 2023-12-15 22:47 UTC (permalink / raw)
To: Joshua Watt, openembedded-core
On Fri, 2023-12-15 at 13:34 -0700, Joshua Watt wrote:
> 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 <JPEWhacker@gmail.com>
> ---
> meta/conf/bitbake.conf | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index e7826e7af96..55166d01784 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -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
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [OE-core][PATCH 1/2] bitbake.conf: Add runtimedir
2023-12-15 22:47 ` [OE-core][PATCH 1/2] bitbake.conf: Add runtimedir Richard Purdie
@ 2023-12-15 23:47 ` Joshua Watt
2023-12-15 23:49 ` Richard Purdie
0 siblings, 1 reply; 6+ messages in thread
From: Joshua Watt @ 2023-12-15 23:47 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
On Fri, Dec 15, 2023 at 3:47 PM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>
> On Fri, 2023-12-15 at 13:34 -0700, Joshua Watt wrote:
> > 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 <JPEWhacker@gmail.com>
> > ---
> > meta/conf/bitbake.conf | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> > index e7826e7af96..55166d01784 100644
> > --- a/meta/conf/bitbake.conf
> > +++ b/meta/conf/bitbake.conf
> > @@ -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.
>
> 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)
>
> Cheers,
>
> Richard
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [OE-core][PATCH 1/2] bitbake.conf: Add runtimedir
2023-12-15 23:47 ` Joshua Watt
@ 2023-12-15 23:49 ` Richard Purdie
0 siblings, 0 replies; 6+ messages in thread
From: Richard Purdie @ 2023-12-15 23:49 UTC (permalink / raw)
To: Joshua Watt; +Cc: openembedded-core
On Fri, 2023-12-15 at 16:47 -0700, Joshua Watt wrote:
> On Fri, Dec 15, 2023 at 3:47 PM Richard Purdie
> <richard.purdie@linuxfoundation.org> wrote:
> >
> > On Fri, 2023-12-15 at 13:34 -0700, Joshua Watt wrote:
> > > 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 <JPEWhacker@gmail.com>
> > > ---
> > > meta/conf/bitbake.conf | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> > > index e7826e7af96..55166d01784 100644
> > > --- a/meta/conf/bitbake.conf
> > > +++ b/meta/conf/bitbake.conf
> > > @@ -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.
>
> >
> > 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [OE-core][PATCH v2] bitbake.conf: Add runtimedir
2023-12-15 20:34 [OE-core][PATCH 1/2] bitbake.conf: Add runtimedir Joshua Watt
2023-12-15 20:34 ` [OE-core][PATCH 2/2] rpcbind: Specify state directory under /run Joshua Watt
2023-12-15 22:47 ` [OE-core][PATCH 1/2] bitbake.conf: Add runtimedir Richard Purdie
@ 2023-12-18 15:38 ` Joshua Watt
2 siblings, 0 replies; 6+ messages in thread
From: Joshua Watt @ 2023-12-18 15:38 UTC (permalink / raw)
To: openembedded-core; +Cc: 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 <JPEWhacker@gmail.com>
---
meta/conf/bitbake.conf | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index e7826e7af96..83b12cbc158 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -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"
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-12-18 15:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-15 20:34 [OE-core][PATCH 1/2] bitbake.conf: Add runtimedir Joshua Watt
2023-12-15 20:34 ` [OE-core][PATCH 2/2] rpcbind: Specify state directory under /run Joshua Watt
2023-12-15 22:47 ` [OE-core][PATCH 1/2] bitbake.conf: Add runtimedir Richard Purdie
2023-12-15 23:47 ` Joshua Watt
2023-12-15 23:49 ` Richard Purdie
2023-12-18 15:38 ` [OE-core][PATCH v2] " Joshua Watt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.