[systemd-devel] [PATCH] tmpfilesdir should use rootprefix, otherwise units may fail in --enable-split-usr configurations

Lennart Poettering lennart at poettering.net
Mon Aug 11 10:02:02 PDT 2014

On Thu, 07.08.14 15:21, Dimitri John Ledkov (dimitri.ledkov at canonical.com) wrote:

> From: Dimitri John Ledkov <xnox at ubuntu.com>
> tmpfiles.d files do not depend on /usr present, and in
> --enable-split-usr configuration there may be system units
> (e.g. shipped in /lib) that rely on tmpfiles.d to be configured
> e.g. tmpfiles.d/systemd.conf itself. Hence tmpfiles.d should use
> rootprefix.

Not following here.

The tmpfilesdir is simply where systemd places its tmpfiles, not where
it looks for them (it looks in both rootprefix and in prefix actually). 

Also tmpfiles is ordered after local-fs.target, which means it runs only
after all local file systems are mounted. 

In essence this means that the tool should always find all tmpfiles
snippets, since it looks at all places, and all places are established
at the time it runs...

Or am I missing something?

> Signed-off-by: Dimitri John Ledkov <xnox at ubuntu.com>
> ---
>  Makefile.am | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/Makefile.am b/Makefile.am
> index ce8f247..81a0cf9 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -87,7 +87,7 @@ catalogstatedir=$(systemdstatedir)/catalog
>  pkgsysconfdir=$(sysconfdir)/systemd
>  userunitdir=$(prefix)/lib/systemd/user
>  userpresetdir=$(prefix)/lib/systemd/user-preset
> -tmpfilesdir=$(prefix)/lib/tmpfiles.d
> +tmpfilesdir=$(rootprefix)/lib/tmpfiles.d
>  sysusersdir=$(prefix)/lib/sysusers.d
>  sysctldir=$(prefix)/lib/sysctl.d
>  binfmtdir=$(prefix)/lib/binfmt.d


Lennart Poettering, Red Hat

More information about the systemd-devel mailing list