Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 740586 - systemd.eclass: systemd_tmpfiles_create does not call `systemd-tmpfiles --create`
Summary: systemd.eclass: systemd_tmpfiles_create does not call `systemd-tmpfiles --cre...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-06 00:06 UTC by Adrian
Modified: 2020-09-09 14:45 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian 2020-09-06 00:06:45 UTC
I noticed that when installing postgresql, /run/postgresql (on a systemd-based system) was not created.

The tmpfiles.d entry /usr/lib/tmpfiles.d/postgresql-12.conf got created just fine, but the systemd_tmpfiles_create function aborted when checking $ROOT in [1].

Looking at the example code in [2] which implies an empty $ROOT (otherwise the code there would output two leading slashes!) and the code a bit below [3], I think the check should be `[[ ${ROOT:-/} == / ]]` instead of `[[ ${ROOT} == / ]]` (when changing it manually everything works fine).

[1]: https://github.com/gentoo/gentoo/blob/5076a5d39849249f0ddc424bf5e36b69aa167892/eclass/systemd.eclass#L451
[2]: https://devmanual.gentoo.org/ebuild-writing/variables/index.html#root
[3]: https://github.com/gentoo/gentoo/blob/5076a5d39849249f0ddc424bf5e36b69aa167892/eclass/systemd.eclass#L471-L472
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-09-06 03:19:16 UTC
These functions should have been removed a long time ago.  Today you're supposed to use tmpfiles.eclass.
Comment 2 Larry the Git Cow gentoo-dev 2020-09-09 14:45:55 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ca6f4764d3c2d826a52152a71a7dcdf66d120df

commit 4ca6f4764d3c2d826a52152a71a7dcdf66d120df
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2020-09-06 13:55:18 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2020-09-09 14:44:38 +0000

    systemd.eclass: fix systemd_tmpfiles_create under EAPI 7
    
    Closes: https://bugs.gentoo.org/740586
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 eclass/systemd.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)