[Mageia-dev] Planning the /usr move

Colin Guthrie mageia at colin.guthr.ie
Wed Jul 11 15:01:31 CEST 2012


'Twas brillig, and Olav Vitters at 11/07/12 13:39 did gyre and gimble:
> On Wed, Jul 11, 2012 at 12:52:17PM +0100, Colin Guthrie wrote:
>>  2. Add a patch to RPM that introduces a new check that must pass before
>> a given RPM can be installed.
>>  3. Create a new "filesystem" build that uses this check.
> [..]
>> Several other packages will be subsequently broken (some packages ship
>> their binaries in /bin but symlink them to /usr/bin  but when /bin is
>> itself a symlink to /usr/bin, they package ultimately conflicts with
>> itself!). We need to identify such packages and fix them and have them
>> ready to go. In order to do the transition correctly, we may need to fix
>> them first, build them and then wait until all such packages are fixed,
>> THEN update the filesystem rpm and then rebuild all such packages with a
>> dep on the filesystem > x package. This might be needed to avoid any
>> problems on the build system chroots.
> 
> Shouldn't those packages also rely on the new RPM check? Or you mean
> just update those packages and don't allow for symlinks between /bin and
> /usr/bin (+same for sbin)?

They don't need to. Provided they "Require(pre): filesystem >= foo" and
rely on the check being in filesystem rpm packge. That prevents too many
"quirks" being in too many packages (the error message would also be
more confusing for users but a simple "I need a newer filesystem
package" is a bit clearer.

> Would the new RPM do a runtime check to see if things have been
> migrated?

Yes, this is what the patch does, but as mentioned it would only be the
"filesystem" rpm that would actually implement this check.

> Does Dracut usrmove handle the packages which at the moment contain
> symlinks (e.g. /bin/foo -> /usr/bin/foo and e.g. /usr/bin/bar ->
> /bin/bar)? Or should either dracut or the packages have conflicts to
> deal with this?

The code in dracut deals with this currently. It will overwrite symlinks
with the real binary instead.

The code is actually quite simple:

/usr/lib/dracut/modules.d/30convertfs/convertfs.sh


There may be some junk left behind when packages provide separate
binaries of the same name in /bin vs /usr/bin (and sbin), but this is
relatively rare (although I will mention this more in my next message).

Col




-- 

Colin Guthrie
colin(at)mageia.org
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/




More information about the Mageia-dev mailing list