Bug 656586

Summary: Please Update Spec File to use %ghost on files in /var/run and /var/lock
Product: [Fedora] Fedora Reporter: Lennart Poettering <lpoetter>
Component: filesystemAssignee: Ondrej Vasik <ovasik>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: ovasik, paul
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
URL: http://lists.fedoraproject.org/pipermail/devel-announce/2010-November/000726.html
Whiteboard:
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 16:03:54 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 827166    

Description Lennart Poettering 2010-11-23 23:29:20 UTC
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 08:28:34 UTC
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 19:29:11 UTC
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 16:03:54 UTC
Ok, done, closing RAWHIDE.

Comment 4 Paul Howarth 2011-04-01 08:33:50 UTC
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 08:57:43 UTC
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 09:24:17 UTC
(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 06:08:34 UTC
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 21:31:35 UTC
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.