On Fri, Apr 01, 2011 at 04:27:01PM +0100, Roger Leigh wrote:
> On Fri, Apr 01, 2011 at 10:40:52AM +0100, Roger Leigh wrote:
> > On Wed, Mar 30, 2011 at 04:43:59PM +0100, Roger Leigh wrote:
> > > Attached is a patch for adding a new top-level directory, /run.
> > > 
> > > References:
> > > http://thread.gmane.org/gmane.linux.redhat.fedora.devel/146976
> > > https://lwn.net/Articles/436012/
> > > 
> > > This has already been adopted by Fedora, and it's something we've
> > > wanted in Debian for years (but settled on /lib/init/rw for FHS
> > > compliance).  /run is wider in scope than /lib/init.rw, and will
> > > be used for transient writable data present from system startup
> > > to shutdown, which is not preserved across reboots, and will
> > > therefore supercede /var/run, /var/lock, /lib/init/rw and existing
> > > use of /dev and /etc as a place to put writable program state.
> > > 
> > > Once set up by initscripts, I expect we will then need to replace
> > > /var/run and /var/lock with symlinks, which will require an additional
> > > change to base-files once /run is set up and functional.
> > > Bind mounting is an alternative, but bind mounting /run will hide files
> > > created earlier in the boot sequence, though it would be feasible for
> > > /var/lock.
> > 
> > Updated patch attached.  This allows the safe migration of /var/run
> > and /var/lock by
> > 1) dropping base-files ownership
> > 2) ensuring their continued existence after dropping ownership
> > This will permit initscripts/systemd to switch them to symlink or
> > bind mount them at their discretion.

We identified an issue with this patch in that /var/lock could be lost
due to being empty and then not recreated.  It turns out that this part
of the patch is not needed at all, since dpkg is already perfectly
capable of handling directories being symlinks, so the much simpler
patch (attached) may be used instead, which simple creates /run only,
and does nothing else.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
diff -urN base-files-6.1.original/debian/changelog base-files-6.1/debian/changelog
--- base-files-6.1.original/debian/changelog	2011-04-01 09:20:54.288929294 +0100
+++ base-files-6.1/debian/changelog	2011-04-02 15:45:34.678407227 +0100
@@ -1,3 +1,9 @@
+base-files (6.1run0) unstable; urgency=low
+
+  * Add /run.
+
+ -- Roger Leigh <rle...@debian.org>  Fri, 01 Apr 2011 09:26:35 +0100
+
 base-files (6.1) unstable; urgency=medium
 
   * Changed issue, issue.net and debian_version to read "wheezy/sid".
diff -urN base-files-6.1.original/debian/directory-list base-files-6.1/debian/directory-list
--- base-files-6.1.original/debian/directory-list	2011-04-01 09:20:54.288929294 +0100
+++ base-files-6.1/debian/directory-list	2011-04-02 15:39:40.784019553 +0100
@@ -10,6 +10,7 @@
 mnt
 proc
 root
+run
 sbin
 tmp
 usr

Attachment: signature.asc
Description: Digital signature

Reply via email to