[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Merging / and /usr (was: jessie release goals)



On Thu, May 09, 2013 at 12:03:43PM +0100, Roger Leigh wrote:
> On Thu, May 09, 2013 at 11:50:31AM +0200, Goswin von Brederlow wrote:
> > If you make /usr a symlink to / then there will be to distinct paths
> > to each file and that will confuse dpkg.
> > 
> > The first problem that comes to mind is package A containing /bin/foo
> > and package B containing /usr/bin/foo. Dpkg will happily install both
> > without noticing the file overwrite conflict.
> > 
> > Or package A 1.0 contains /bin/foo and package A 1.1 contains
> > /usr/bin/foo. IIrc then dpkg will unpack A 1.1 (overwrite /bin/foo
> > with /usr/bin/foo) and then remove /bin/foo. Leaving you without
> > /usr/bin/foo.
> 
> This is all very true.  Once we have /usr mounted in the initramfs,
> we can correct such duplicate paths to prevent this; packages which
> provide a binary in /bin and a symlink in /usr/bin to make the binary
> available in early boot can simply move the binary back to /usr--it
> will be guaranteed to be available in early boot.  Since two different
> paths would then be effectively equivalent, maybe we might also need
> dpkg itself to be aware of this so that it will refuse to overwrite,
> in addition to a manual audit of the existing paths.
> 
> My current work on this is at
> http://anonscm.debian.org/gitweb/?p=users/rleigh/initramfs-tools.git;a=shortlog;h=refs/heads/usrmount
> It works for mounting a local /usr; testing NFS and NFS/local
> combinations is on my TODO list for tonight.  This still needs further
> cleanup and testing.  It will be ready for wider testing in a few days.
> It also needs a patch to util-linux so it doesn't try to fsck a mounted
> /usr at boot.
> 
> 
> Regards,
> Roger

I totaly support your initramfs patches to mount /usr.

But that is a long way away from the merge / + /usr. Which I don't
feel has a good solution yet. All the proposals so far have major
faults leading to corrupted and even unbootable systems.

As I see it the way to go is:

1) mount /usr in initramfs now so we simply don't have to care wether
it is seperate or not. You are well on the way there.

2) possibly remove patches that put stuff in / with compat symlinks in
/usr/ provided they conflict with an older initramfs. Might be good to
wait a release before doing that so we don't add tons of dependencies
on the intramfs version.

3) wait a release (unless we do that for 2)

4) remove all / instead of /usr patches, remove / + /usr duplicates

5) wait a release

6) consider the / + /usr situation again

That would give at least 4 years before merging / and /usr becomes an
issue. I think talk about doing this for jessie is seriously premature
given the solutions for merging proposed so far.

MfG
	Goswin


Reply to: