diff options
author | Javier Jardón <jjardon@gnome.org> | 2016-08-21 20:34:50 +0100 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2016-11-08 19:17:34 +0000 |
commit | 47b76c5bd2bd7bba497ab36942eaa0c96efba6d0 (patch) | |
tree | 0dbb0e12798db1ed1042ba560751f7b5dd9c099a /strata/foundation/kmod.morph | |
parent | 3badff6789e8aedd1b1298ef5065af744bf6a676 (diff) | |
download | definitions-47b76c5bd2bd7bba497ab36942eaa0c96efba6d0.tar.gz |
Remove some hacks not needed anymore after the /usr merge
Change-Id: I459cb33978e644aa1ac2b3e71cb79ae67894c3e5
Diffstat (limited to 'strata/foundation/kmod.morph')
-rw-r--r-- | strata/foundation/kmod.morph | 40 |
1 files changed, 7 insertions, 33 deletions
diff --git a/strata/foundation/kmod.morph b/strata/foundation/kmod.morph index 8f158e8e..ee1b1254 100644 --- a/strata/foundation/kmod.morph +++ b/strata/foundation/kmod.morph @@ -14,36 +14,10 @@ build-commands: - make install-commands: - make DESTDIR="$DESTDIR" pkgconfigdir="$PREFIX"/lib/pkgconfig install - -# WARNING with the following command: -# if the staging area when kmod is built is sufficiently different to the -# staging area that kmod is included in, then these symlinks may not work. -# -# i.e. if /sbin isn't a symlink when this is built (fhs-dirs isn't included or -# doesn't symlink /sbin to /usr/bin) then we get symlinks in /sbin which point -# to ../usr/bin, but if /sbin is itself a symlink to /usr/bin, then the symlinks -# would end up in /usr/bin, which would point to ../usr/bin, which would evaluate -# to /usr/usr/bin. -# -# The alternatives to this are: -# -# 1. Use hardlinks instead, which has the problem of ssh-rsync upgrades duplicating -# the binary -# -# 2. Use an absolute path for the symlink, which makes things interesting when -# inspecting a chroot -# -# 3. Use a wrapper script to invoke kmod with a different name, which isn't -# possible in busybox ash without making a temporary directory, which means -# you need an extra process to hang around to clean that directory up. -- | - if [ -h /sbin ]; then - for app in modprobe lsmod rmmod insmod modinfo depmod; do - ln -sf kmod "$DESTDIR$PREFIX/bin/$app" - done - else - install -d "$DESTDIR"/sbin - for app in modprobe lsmod rmmod insmod modinfo depmod; do - ln -sf ../"$PREFIX"/bin/kmod "$DESTDIR/sbin/$app" - done - fi +post-install-commands: +- ln -s kmod "$DESTDIR/$PREFIX"/bin/modprobe +- ln -s kmod "$DESTDIR/$PREFIX"/bin/lsmod +- ln -s kmod "$DESTDIR/$PREFIX"/bin/rmmod +- ln -s kmod "$DESTDIR/$PREFIX"/bin/insmod +- ln -s kmod "$DESTDIR/$PREFIX"/bin/modinfo +- ln -s kmod "$DESTDIR/$PREFIX"/bin/depmod |