On Wed, Apr 06, 2011 at 12:59:56AM +0200, Marco d'Itri wrote:
> On Apr 05, Roger Leigh <rle...@debian.org> wrote:
> 
> > While it will be fine for udev to do this when /run is supported
> > in initscripts, right now it's not.
> So how could /run be present if it is not supported by the system init
> scripts?

/run has been added to base-files today (6.2).  initscripts will
mount a tmpfs there shortly (#620191), but for the moment it's
just an empty directory.

> > As a result, udev is going to start putting things there on
> > the root filesystem, and this is going to interfere with upgrades
> No: /run needs to be writeable when udev is started, this happens
> before / is remounted rw so udev will not use it even if the empty
> mount point exists at boot time.

I certainly found udev using /run on my system.  I haven't
restarted it since the new udev was uploaded.  I think that
what may have happened here is that udev was restarted on
upgrade because / was writable and /run existed, it started
using it.

> > Would it be possible to explicitly disable this for the time
> > being?
> Only if you can show a situation in which something will break because
> of the current code. Cases in which the local admin caused the breakage
> do not count.

base-files provides /run as an empty directory.
When udev is upgraded (restarted), it will start using it.
When initscripts is upgraded using the patch in #620191, it will
set up a couple of mounts over the top of /run, hiding the
/run/udev directory.  This will probably cause problems for udev
since they will be inaccessible.  Restarting udev will correct this; 
and restarting the system will also correct it (a tmpfs will be
mounted), but it will cause breakage for running systems; udev
should not have used /run when it isn't actually functional yet.

The problem is that udev is using /run if it's present and
writable, but this check is not sufficient.  It should only
use /run if a tmpfs is also mounted there.  The way to do
that is to depend upon initscripts (>= xxx) once it's uploaded.

I think the best solution here would be to comment out /run use
temporarily, and remove /run/udev in the postinst if present
in order to clean up the rootfs.  Once that is done and the
new initscripts is in place, you can uncomment the /run use and
remove the postinst rm and add a versioned depends upon initscripts.
At this point, initscripts will guarantee /run is set up and
working, and it will be safe to use just like you're doing now,
but with a tmpfs backing store.


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.

Attachment: signature.asc
Description: Digital signature

Reply via email to