Todo List: Removal of relative paths from systemd-tmpfiles calls in install scripts

2013-03-17 - Evangelos Foutras

Either just the basename (e.g. apache.conf) or an absolute path (e.g. /usr/lib/tmpfiles.d/apache.conf) will work.

Just the configuration filename (e.g. apache.conf) would be preferable to the absolute path (in my opinion). This is why I've included samba and lightdm which use absolute paths.

[This change in behavior was introduced in system 198 by http://cgit.freedesktop.org/systemd/systemd/commit/?id=fabe5c0e]

=================================

For an example of the issue consider the following command:

# systemd-tmpfiles --create usr/lib/tmpfiles.d/apache.conf

Regardless of whether it's run from the root directory (/) or not, it will try to open the following files:

* /etc/tmpfiles.d/usr/lib/tmpfiles.d/apache.conf
* /run/tmpfiles.d/usr/lib/tmpfiles.d/apache.conf
* /usr/local/lib/tmpfiles.d/usr/lib/tmpfiles.d/apache.conf
* /usr/lib/tmpfiles.d/usr/lib/tmpfiles.d/apache.conf

After which it will fail with:

Failed to open 'usr/lib/tmpfiles.d/apache.conf', ignoring: No such file or directory

The above causes the /run/httpd directory not to be created on installation (https://bugs.archlinux.org/task/34334).

Link to lists of pkgbase values:

Filter Todo List Packages

Select filter criteria
16 packages displayed out of 16 total packages.
Arch Repository Name Current Version Staging Version Maintainers Status Last Touched By
i686 Extra apache 2.4.20-1 jgc, anatolik Complete jgc
x86_64 Extra apache 2.4.20-1 jgc, anatolik Complete jgc
i686 Extra fetchmail 6.3.26-4 pierre Complete pierre
x86_64 Extra fetchmail 6.3.26-4 pierre Complete pierre
i686 Community lightdm alucryd Complete alucryd
x86_64 Community lightdm alucryd Complete alucryd
i686 Extra lighttpd 1.4.39-2 pierre Complete pierre
x86_64 Extra lighttpd 1.4.39-2 pierre Complete pierre
i686 Community murmur 1.2.16-1 svenstaro Complete foutrelis
x86_64 Community murmur 1.2.16-1 svenstaro Complete foutrelis
i686 Community ndisc6 1.0.3-1 seblu Complete seblu
x86_64 Community ndisc6 1.0.3-1 seblu Complete seblu
i686 Extra php 7.0.7-1 pierre Complete pierre
x86_64 Extra php 7.0.7-1 pierre Complete pierre
i686 Extra samba 4.4.3-1 tpowa Complete foutrelis
x86_64 Extra samba 4.4.3-1 tpowa Complete foutrelis