Bug 656586 - Please Update Spec File to use %ghost on files in /var/run and /var/lock
Summary: Please Update Spec File to use %ghost on files in /var/run and /var/lock
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: filesystem
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
URL: http://lists.fedoraproject.org/piperm...
Whiteboard:
Depends On:
Blocks: 827166
TreeView+ depends on / blocked
 
Reported: 2010-11-23 23:29 UTC by Lennart Poettering
Modified: 2012-05-31 19:39 UTC (History)
2 users (show)

Fixed In Version: filesystem-2.4.40-1.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-25 16:03:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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.


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