base-files: Add /run/lock as a standard directory
PATCH 1/1 base-files: Add /run/lock as a standard directory
rpm -V -qa
Will report:
Unsatisfied dependencies for base-files-3.0.14-r73.2.0.qemux86_64:/proc/mounts/run/lock
The /run/lock directory was being dynamically created during package install, but should have been owned by the base-files package.
(Note: /proc/mounts is a different issue)
--- meta/recipes-core/base-files/base-files_3.0.14.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/base-files/base-files_3.0.14.bb +2 -2
@@ -34,8 +34,8 @@ docdir_append = "/${P}" dirs1777 = "/tmp ${localstatedir}/volatile/tmp" dirs2775 = "/home ${prefix}/src ${localstatedir}/local" dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \ - ${sysconfdir}/skel /lib /mnt /proc ${ROOT_HOME} /run /sbin \ - ${prefix} ${bindir} ${docdir} /usr/games ${includedir} \ + ${sysconfdir}/skel /lib /mnt /proc ${ROOT_HOME} /run /run/lock \ + /sbin ${prefix} ${bindir} ${docdir} /usr/games ${includedir} \ ${libdir} ${sbindir} ${datadir} \ ${datadir}/common-licenses ${datadir}/dict ${infodir} \ ${mandir} ${datadir}/misc ${localstatedir} \
Signature · 1 line
1.8.5.3
Quoted 2 lines · Mark Hatle
The
/run/lockdirectory was being dynamically created during package install, but should have been owned by the base-files package.
Doesn't do_install generate the /var/run/lock -> /run/lock symlink, as /run is always a tmpfs so has to be populated on boot?
Ross
Quoted 7 lines · Ross
Quoted 2 lines · Mark Hatle
The
/run/lockdirectory was being dynamically created during package install, but should have been owned by the base-files package.Doesn't
do_installgenerate the/var/run/lock->/run/locksymlink, as /run is always a tmpfs so has to be populated on boot?
The /var/run/lock -> /run/lock symlink is generated, but the /run/lock is never created by anything that I could find.
/run is not always a tmpfs... We've got configurations where it's persistent.
With that said, the fix may be incorrect though if something is generally used to create this as a tmpfs, which package would normally create the directory and populate it? the volatiles code?
--Mark
Quoted 2 lines
Ross
Quoted 13 lines · Mark Hatle
Quoted 8 lines · Ross
Quoted 3 lines · Mark Hatle
The
/run/lockdirectory was being dynamically created during package install,
but should have been owned by the base-files package.Doesn't
do_installgenerate the/var/run/lock->/run/locksymlink, as /run is always a tmpfs so has to be populated on boot?The
/var/run/lock->/run/locksymlink is generated, but the/run/lockis never created by anything that I could find.
Quoted 7 lines
/run is not always a tmpfs... We've got configurations where it's persistent.
With that said, the fix may be incorrect though if something is generally used to create this as a tmpfs, which package would normally create the directory and populate it? the volatiles code?
Ross is almost correct here, there is a link generated from via the volatiles file in initscripts recipe, which will be created during package install time.
Sau!
Quoted 5 lines
--Mark
Quoted 2 lines
Ross
Quoted 17 lines · Saul Wold
Quoted 16 lines · Mark Hatle
Quoted 8 lines · Ross
Quoted 3 lines · Mark Hatle
The
/run/lockdirectory was being dynamically created during package install,
but should have been owned by the base-files package.Doesn't
do_installgenerate the/var/run/lock->/run/locksymlink, as /run is always a tmpfs so has to be populated on boot?The
/var/run/lock->/run/locksymlink is generated, but the/run/lockis never created by anything that I could find./run is not always a tmpfs... We've got configurations where it's persistent.
Quoted 8 lines
Quoted 4 lines
With that said, the fix may be incorrect though if something is generally used to create this as a tmpfs, which package would normally create the directory and populate it? the volatiles code?
Ross is almost correct here, there is a link generated from via the volatiles file in initscripts recipe, which will be created during package install time.
We still have the packaging issue though. Nothing 'owns' that directory, yet other package(s) reference it. At a minimum something should own it (or it needs to get shoved into the /etc/rpm/sysinfo/Dirnames file to show yes, the directory really is available.)
/proc/mounts has always been an issue since it's owned by the system, but that can be dealt with using the same type of this /etc/rpm/sysinfo/Providenames....
(There is a feature enhancement in the YP bugzilla to more easily support a persistent filesystem, vs always using the volatiles.. we probably should drop this for now and come back around when that is investigated.)
--Mark
Quoted 7 lines
Sau!
Quoted 5 lines
--Mark
Quoted 2 lines
Ross
Quoted 2 lines · Mark Hatle
/run is not always a tmpfs... We've got configurations where it's persistent.
What? Why?
Quoted 8 lines · Colin Walters
Quoted 3 lines · Mark Hatle
/run is not always a tmpfs... We've got configurations where it's persistent.
What? Why?
Certain system configurations may require parts of the /run filesystem to not always be on tmpfs. (Some situations where you have a lot of disk, but limited ram for instance.. using tmpfs will potentially put your system into a low memory state, or you might not have enough tmpfs to run the system properly.)
As part of the future work to allow for persistent storage on certain things that the volatiles are doing right now, /run is one of the directories that needs to be investigated. Is there actually anything there that may be desirable to persist from one boot to the next?
--Mark
Quoted 2 lines · Mark Hatle
Certain system configurations may require parts of the /run filesystem to not always be on tmpfs. (Some situations where you have a lot of disk, but limited ram for instance.. using tmpfs will potentially put your system into a low memory state, or you might not have enough tmpfs to run the system properly.)
I understand not doing /tmp-on-tmpfs, but /run? Fix the parts of userspace that are allocating significant memory there.
And if you're really not mounting /run as tmpfs, I hope you're ensuring it's emptied immediately after mounting.
Quoted 2 lines
/run is one of the directories that needs to be investigated. Is
there actually anything there that may be desirable to persist from one boot to the next?
No. It not being persistent is part of the API contract.
http://lwn.net/Articles/436012/