[Buildroot] [PATCH 3/3] package/skeleton: ensure custom skeleton uses merged /usr if needed

Peter Korsgaard peter at korsgaard.com
Tue Nov 10 23:22:08 UTC 2015


>>>>> "Yann" == Yann E MORIN <yann.morin.1998 at free.fr> writes:

 > When using systemd, the poolicy in Buildroot is to use a merged /usr
 > (see c5bd8af6, "system: add options for /bin /sbin and /lib to be
 > symlinks into /usr" for more info). So, we apply a few tricks in some
 > packages to account for the merged /usr case.

 > However, when using a custom skeleton, we have no say in how that
 > skeleton is organised, so it may well have a split /usr. In that case,
 > our little tricks might not work as expected.

 > So, when the user uses a custom skeleton and wants systemd as an init
 > system, we must check that the custom skeleton is setup with a merged
 > /usr.

 > We do that by checking that each pair of {/lib,/usr/lib} {/bin,/usr/bin}
 > and {/sbin,/usr/sbin} have the same inode numbers, i.e. /lib must have
 > the same inode number as /usr/lib (and so on...). When a pair does not
 > share the same inode number, this is not a merged /usr and we abort.

 > We implement that check with make constructs, so it is done very early
 > in the build process, and we can abort early if need be.

Nice. It doesn't handle cases where absolute symlinks are used
(E.G. /bin -> /usr/bin), but I don't see how we can fix that.

Committed series, thanks.

-- 
Bye, Peter Korsgaard



More information about the buildroot mailing list