diff mbox series

[1/2] bitbake.conf: Add runtimedir

Message ID 20231215203404.2913433-1-JPEWhacker@gmail.com
State Accepted, archived
Commit 90bc18108230f6d41a50cebc8348444e119e95bf
Headers show
Series [1/2] bitbake.conf: Add runtimedir | expand

Commit Message

Joshua Watt Dec. 15, 2023, 8:34 p.m. UTC
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(+)

Comments

Richard Purdie Dec. 15, 2023, 10:47 p.m. UTC | #1
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
Joshua Watt Dec. 15, 2023, 11:47 p.m. UTC | #2
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
Richard Purdie Dec. 15, 2023, 11:49 p.m. UTC | #3
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
diff mbox series

Patch

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"