Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 645302 - sys-fs/lvm2-2.02.166-r2 install a useless opentmpfiles configuration
Summary: sys-fs/lvm2-2.02.166-r2 install a useless opentmpfiles configuration
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-21 23:12 UTC by nobody
Modified: 2018-01-22 07:29 UTC (History)
2 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 nobody 2018-01-21 23:12:51 UTC
Here's the file content:
/usr/lib/tmpfiles.d/lvm2.conf
d /run/lock/lvm 0700 root root -
d /run/lvm 0700 root root -

This file want opentmpfiles to create them, but it will never happen when lvm is start.

You can see it in an rc.log
   OpenRC 0.34.11 is starting up Gentoo Linux (x86_64)
 * Setting up tmpfiles.d entries for /dev ... (opentmpfiles-dev start)
 [ ok ]
 ...
 * /run/lvm: creating directory (it's actually device-mapper)
 * Starting lvmetad ... (here it's really lvm)
 [ ok ]
* Setting up the Logical Volume Manager ...
 [ ok ]
...
 * Setting up tmpfiles.d entries ... (opentmpfiles-setup start)
 [ ok ]

lvm is run at boot runlevel, and opentmpfiles-setup is also run at boot runlevel, but as you can see, opentmpfiles-setup could be run AFTER lvm.
which mean: if opentmpfiles-setup read the config file and create the directory and file it is ask to create, it will do that AFTER lvm has start ; which is pointless.

And you can see it by running the opentmpfiles commands:
This is command run from opentmpfiles-dev, which is run at sysinit runlevel, so before lvm
tmpfiles --prefix=/dev --create --boot --dry-run --verbose
_c /dev/autofs 0600 0 0 0 10:235
_c /dev/fuse 0600 0 0 0 10:229
... (only creating file for /dev)

And this is the command run from opentmpfiles-setup, that is run after lvm
tmpfiles --exclude-prefix=/dev --create --remove --boot --dry-run --verbose
_d /run/lock/lvm 0700 root root 0  <--- !!!
_d /run/lvm 0700 root root 0       <--- !!!
_d /var/cache/man 0755 man man 1w 
_d /run/minidlna 0755 minidlna minidlna 0 
_d /var/cache/revdep-rebuild 0700 0 0 0 
_d /tmp/screen 0775 root utmp 0 

It only works because device-mapper have this, and it is start before lvm:
checkpath -q -d -m 0700 -o root:root /run/lvm /run/lock/lvm

the /usr/lib/tmpfiles.d/lvm2.conf file is then just useless ; but it's a call for bug, because if anyone think it do the job, it does not.