#1585 Handling directories under /var/lock and /var/run in %files and base image
Closed None Opened 7 years ago by adelton.

= phenomenon =

The page https://fedoraproject.org/wiki/Packaging:Tmpfiles.d talk about putting /run/%{name}/ to %files and says

Files placed in the subdirectories may be listed the same way
    or omitted entirely as the files will be cleaned up on every
    reboot.

The ticket https://fedorahosted.org/fesco/ticket/525 again says that the files should be defined as normal files.

= background analysis =

These days, /var/lock is a symlink to ../run/lock.

In base container image of Fedora, /run/lock does not exist:

$ docker run fedora:23 ls -la /run
total 12
drwxr-xr-x. 3 root root 4096 Jun 6 07:02 .
drwxr-xr-x. 18 root root 4096 Jun 6 07:02 ..
drwxr-xr-x. 2 root root 4096 Jun 6 07:02 secrets

Installing any package which specifies something under /var/lock in %files then fails. For an example, see opencryptoki and

    https://bugzilla.redhat.com/show_bug.cgi?id=1341079

But really, what is the point of defining the files and directories in %files when they won't be present due to the use of tmpfs (unless they are defined in tmpfiles and that's a mechanism orthogonal to the rpm database)?

= implementation recommendation =

Either make recommendation for adding these parent directories to base container images of Fedora, or make recommendation against specifying the files and directories under %files.

I've tried to get some opinion on the devel mailing list

https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/U2R34HF2IYWX7CVNONIW7HIKIQTYPBKN/

but did not get any responses there.


This sounds like something to bring up to the FPC? ie, packaging@lists.fedoraproject.org and/or ticket at https://fedorahosted.org/fpc/ ?

Login to comment on this ticket.

Metadata