Bug 656586 - Please Update Spec File to use %ghost on files in /var/run and /var/lock
Please Update Spec File to use %ghost on files in /var/run and /var/lock
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: filesystem (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
http://lists.fedoraproject.org/piperm...
:
Depends On:
Blocks: 827166
  Show dependency treegraph
 
Reported: 2010-11-23 18:29 EST by Lennart Poettering
Modified: 2012-05-31 15:39 EDT (History)
2 users (show)

See Also:
Fixed In Version: filesystem-2.4.40-1.fc15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-02-25 11:03:54 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Lennart Poettering 2010-11-23 18:29:20 EST
Your package filesystem appears to include a file in /var/run or /var/lock. With an upcoming change in Rawhide these directories will now be mounted as tmpfs. For details about this change please consult http://lists.fedoraproject.org/pipermail/devel-announce/2010-November/000726.html For your package this means that you need add %ghost to all files that are placed in either of these two directories. Please make sure to make this change in time for the F15 cycle. For details about %ghost see http://www.rpm.org/max-rpm-snapshot/s1-rpm-inside-files-list-directives.html#S3-RPM-INSIDE-FLIST-GHOST-DIRECTIVE , for more information on the F15 feature see the feature page https://fedoraproject.org/wiki/Features/var-run-tmpfs . If your package already uses %ghost on these files, feel free to close this bug report right-away. Sorry for this mass bug filing, and if you have any further questions, don't hesitate to ask on fedora-devel or ask me personally. Thank you, Lennart
Comment 1 Ondrej Vasik 2010-11-26 03:28:34 EST
Lennart, could you please clarify one thing here? 
Filesystem owns and creates /var/lock, /var/run and /var/lock/subsys ... from the problem description, I need to ghost only files/dirs placed under /var/lock and /var/run - so only /var/lock/subsys ... Correct?
Comment 2 Lennart Poettering 2011-02-18 14:29:11 EST
Yupp, that's how I see it.

You should continue to own /var/run and /var/lock, to ensure that we get the right labels on it, since mount will copy the labels from the underlying dirs to the tmpfs mounts.
Comment 3 Ondrej Vasik 2011-02-25 11:03:54 EST
Ok, done, closing RAWHIDE.
Comment 4 Paul Howarth 2011-04-01 04:33:50 EDT
The last update to filesystem in f15 has changed the /var/run, /var/lock and /var/lock/subsys directories to %ghost, and only /var/lock/subsys appears in /etc/tmpfiles.d/filesystem.conf

Having directories (as opposed to files) as %ghost is a bad idea as those directories won't be created at rpm install time (and /var/lock/subsys will only be created when systemd processes /etc/tmpfiles.d/filesystem.conf, which may not be until the next reboot), so for instance there may be problems in the installer as a result of this change, where the package has been installed but systemd won't have created the directories.

I suggest removing all of the newly-added %ghost attributes and reverting to regular ownership of these three directories. The /etc/tmpfiles.d/filesystem.conf is correct as /var/lock/subsys will need to be re-created at each boot by systemd. So rpm creates the directory at package installation time and systemd recreates it after each subsequent boot.
Comment 5 Ondrej Vasik 2011-04-01 04:57:43 EDT
Do you mean the update in testing - filesystem-2.4.39-1.fc15 , correct? I just want to mention, that there is post scriptlet handling /var/run and /var/lock ... /var/lock/subsys is handled by systemd and /run/lock/subsys - see https://bugzilla.redhat.com/show_bug.cgi?id=692124#c11 .

If you are still worried, could you please add this comment into https://bugzilla.redhat.com/show_bug.cgi?id=692124 ? Probably Harald/Lennart/Notting could explain you the recent change better than me.
Comment 6 Paul Howarth 2011-04-01 05:24:17 EDT
(In reply to comment #5)
> Do you mean the update in testing - filesystem-2.4.39-1.fc15 , correct? I just
> want to mention, that there is post scriptlet handling /var/run and /var/lock
> ... /var/lock/subsys is handled by systemd and /run/lock/subsys - see
> https://bugzilla.redhat.com/show_bug.cgi?id=692124#c11 .

So there; my apologies for the noise - I just saw the change on commits-list and the lua script must have been added in a previous change and thus wasn't there in the same email, so it looked wrong. Thanks for the prompt response.
Comment 7 Fedora Update System 2011-04-02 02:08:34 EDT
filesystem-2.4.39-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/filesystem-2.4.39-1.fc15
Comment 8 Fedora Update System 2011-04-05 17:31:35 EDT
filesystem-2.4.40-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.