On Sun, 02 Dec 2018 at 20:16:10 +0100, Marc Haber wrote:
> On Sat, Dec 01, 2018 at 11:36:45PM +0100, Didier 'OdyX' Raboud wrote:
> > A merged-/usr has a /bin → /usr/bin symlink; so a .deb package unpacking
> > /bin/grep will make that binary end up in /usr/bin/grep; but the
> > /bin → /usr/bin symlink ensures that you can either access /usr/bin/grep  
> > directly or /bin/grep through the symlink.
> 
> And where will the binaries and up on an un-usrmerged system with a
> dedicated /usr? in /usr, I hope?

I would encourage anyone with questions about the behaviour of merged and
unmerged /usr systems to try them, either by building one chroot, container
or VM with merged /usr and one without, or by building a chroot, container
or VM with unmerged /usr, copying it, and installing usrmerge in the copy.

The answer to your question is that non-/usr-merged systems behave the
same way they always have: binaries end up wherever the source package
chooses to put them when it builds the .deb (typically determined by
where they appear under debian/tmp).

To avoid breaking hard-coded paths on existing non-/usr-merged systems,
that has to be where the package has traditionally put them, unless
the package takes special steps to create a compatibility symlink on
non-merged-/usr systems (which I would not recommend[1]).

When installed on an unmerged-/usr system:

.deb contains ->     /bin/grep                    /usr/bin/perl
/bin/foo          physical location               does not exist
/usr/bin/foo       does not exist               physical location

When installed on a merged /usr system:

.deb contains ->     /bin/grep                    /usr/bin/perl
/bin/foo        exists thanks to /bin symlink   physical location
/usr/bin/foo    exists thanks to /bin symlink   physical location

None of the above depends on whether /usr is a mount point. If /usr is a
mount point, then /bin/grep is physically located on the /usr filesystem
if the system is merged-/usr, or on the root filesystem otherwise.

Replace /bin/grep in the above with any executable that is canonically
in /bin or /sbin (its source package would typically install
something like debian/tmp/bin/grep), and replace /usr/bin/perl with any
executable that is canonically in /usr/bin or /usr/sbin (its source
package would typically install something like debian/tmp/usr/bin/perl).

    smcv

[1] 
https://lists.debian.org/msgid-search/20181122205532.ga2...@espresso.pseudorandom.co.uk

Reply via email to