[opensuse-factory] systemd-tmpfiles question
In the Ceph upstream project, we are maintaining a cross-distro spec file: https:/github.com/ceph/ceph/blob/master/ceph.spec.in In one of the %post scriptlets we are running systemd-tmpfiles to ensure that files in /var/run are created when the package is installed. Now, I am aware that for Tumbleweed I will need to use the %tmpfiles_create macro. But the RH maintainer would rather put the /var/run/... files in %files and not run systemd-tmpfiles at all. Having the /var/run/... files in %files will ensure that they are available immediately when the package is installed. At the next reboot, they will disappear but systemd-tmpfiles is run at boot and will re-create them. Is this an acceptable solution for openSUSE Tumbleweed as well? It would be nice to use the same approach for both RH/CentOS/Fedora and openSUSE, as the spec file already has plenty of conditionals ;-) Thanks, Nathan -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
On Wednesday 2015-11-25 17:50, Nathan Cutler wrote:
In one of the %post scriptlets we are running systemd-tmpfiles to ensure that files in /var/run are created when the package is installed. [...] the RH maintainer would rather put the /var/run/... files in %files and not run systemd-tmpfiles at all.
Having the /var/run/... files in %files will ensure that they are available immediately when the package is installed. At the next reboot, they will disappear but systemd-tmpfiles is run at boot and will re-create them.
The extra directories/files make rpm slower than it already is (its database is really horribly laid out), and when you are in a rescue system, `rpm -V` will needlessy complain about the missing file if you did not mark it %ghost, %noverify, or some combination thereof. Even the remotely legitimate case of removing /var/run/xyz directories on (a) package removal, and (b) on ancient system where /var/run is not yet a tmpfs can be rejected as well, because the program may create any number of run files which rpm definitely is not tracking and therefore won't remove. IOW, save yourself the trouble of listing /var/run/xyz. -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
Jan Engelhardt wrote:
On Wednesday 2015-11-25 17:50, Nathan Cutler wrote:
In one of the %post scriptlets we are running systemd-tmpfiles to ensure that files in /var/run are created when the package is installed. [...] the RH maintainer would rather put the /var/run/... files in %files and not run systemd-tmpfiles at all.
/var/run is diallowed in modern distros, please use /run.
Having the /var/run/... files in %files will ensure that they are available immediately when the package is installed. At the next reboot, they will disappear but systemd-tmpfiles is run at boot and will re-create them.
The extra directories/files make rpm slower than it already is (its database is really horribly laid out),
With that argument we'd need to avoid listing anything in %files... IMO if there are discrete files that can be owned by a package they also should be owned by a package.
and when you are in a rescue system, `rpm -V` will needlessy complain about the missing file if you did not mark it %ghost, %noverify, or some combination thereof.
%tmpfiles_create + %ghost is the combination currently expected by rpmlint. cu Ludwig -- (o_ Ludwig Nussel //\ V_/_ http://www.suse.com/ SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
/var/run is diallowed in modern distros, please use /run.
In Ceph we are using /run so no problem there.
%tmpfiles_create + %ghost is the combination currently expected by rpmlint.
Thanks! Now if only %tmpfiles_create were defined in Leap . . . -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org
participants (3)
-
Jan Engelhardt
-
Ludwig Nussel
-
Nathan Cutler