On Thu, May 26, 2011 at 08:04:50PM +0200, Santiago Vila wrote: > [ Note: Thanks a lot for the patch and sorry for not answering before ]. > > El 26/05/11 16:37, Roger Leigh escribió: > >@@ -32,8 +33,6 @@ > > var/lib/dpkg > > var/lib/misc > > var/local > > -var/lock > > var/log > > -var/run > > var/spool > > var/tmp > > So, you propose that base-files des not contain var/lock or var/run anymore. > > I think that will not work: If we make var/run and var/lock to be > symlinks, and then we upgrade base-files to a version which does not > contain var/lock and var/run anymore, the symlinks will disappear, > as dpkg will remove them.
To work around that, we can move the symlink creation out of the part of the postinst with the version check to do it unconditionally, so if the directories do not exist (for any reason--either initial bootstrap or loss on upgrade) we will create a symlink. > So, if the symlinks are useful at all, it will not be because > base-files creates them, but instead because some other package > creates them (which I think it is already the case), in which case > we don't really need base-files to deal with them. > This is why I think the best thing base-files can do for the good of > the whole system is exactly to do nothing about this, which includes > not removing var/lock and var/run if/when they are converted to > symlinks by another package. They key problem with this approach is that we can not bootstrap a system with a functional /run hierarchy unless it's done in base-files. The operative word here is *bootstrap*; upgrades are handled by initscripts, and initscripts can handle the transition fine in the context of a *running* system. But it can't handle it if it's not a live system (no init scripts run, and what's mounted is ill-defined). In the context of a chroot, and this includes both bootstrapping with debootstrap to create a basic chroot, or as part of debian-installer, we can't do the transition as I explained in the previous detailed email. Because we don't run init scripts, and can't reliably move directories, it needs creating at debootstrap time or else we can't migrate at all. Once /var/run and /var/lock exist as directories, it's too late--we can't alter them. This means that you won't be able to have /run in a wheezy or sid chroot (or fresh install) unless this change is made in base-files. It will remain a symlink to /var/run indefinitely, and this brings its own problems--it's different to a "real" system, and it will require special case handling. But the most important issue is that there is *no* upgrade path for these chroots--it's fixed from debootstrap time onwards. For a debootstrap in debian-installer, it will *not* be rectified by initscripts since it also won't migrate in a chroot environment, and this will result in /run being created as a symlink. It won't be rectified at boot time either, because /run and /var/run will point to the same place, so it won't alter it, and so new installs will be broken indefinitely. It will *eventually* happen: when initscripts' postinst runs once the system is rebooted, and then rebooted again after, but that might not be until wheezy+1 for stable installs, and it needs to be in place at install time. Colin Watson made the changes to debian-installer this morning to allow this to all work correctly for fresh installs. 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.
signature.asc
Description: Digital signature