From a0a1439ee5f22383a479f9739891de9b0afca75f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Sun, 21 Aug 2016 20:34:50 +0100 Subject: Remove some hacks not needed anymore after the /usr merge --- strata/core/attr.morph | 2 +- strata/core/bash.morph | 1 - strata/core/shadow.morph | 4 +--- strata/core/util-linux.morph | 4 +--- strata/coreutils-common/tar.morph | 5 +---- strata/foundation/kmod.morph | 40 +++++++-------------------------------- strata/foundation/systemd.morph | 12 +++++------- strata/tools/procps-ng.morph | 11 ----------- 8 files changed, 16 insertions(+), 63 deletions(-) diff --git a/strata/core/attr.morph b/strata/core/attr.morph index d0bf6976..c7b46d31 100644 --- a/strata/core/attr.morph +++ b/strata/core/attr.morph @@ -7,7 +7,7 @@ configure-commands: - | ./configure --prefix="$PREFIX" \ --exec-prefix="$PREFIX" \ - --sbindir="$PREFIX"/sbin \ + --sbindir="$PREFIX"/bin \ --bindir="$PREFIX"/bin \ --libdir="$PREFIX"/lib \ --libexecdir="$PREFIX"/lib \ diff --git a/strata/core/bash.morph b/strata/core/bash.morph index 5d0b8f03..59c9e8b4 100644 --- a/strata/core/bash.morph +++ b/strata/core/bash.morph @@ -5,7 +5,6 @@ configure-commands: - | export CFLAGS="${CFLAGS} -DSYS_BASHRC='\"/etc/bash.bashrc\"'"; ./configure --prefix="$PREFIX" \ - --bindir=/bin \ --without-bash-malloc \ --with-installed-readline \ --enable-readline diff --git a/strata/core/shadow.morph b/strata/core/shadow.morph index cdb1ff75..5e3244ae 100644 --- a/strata/core/shadow.morph +++ b/strata/core/shadow.morph @@ -4,13 +4,11 @@ build-system: autotools pre-configure-commands: - autoreconf -vfi configure-commands: -# Installing to /bin so that they overwrite busybox login. - | ./configure --with-selinux=no \ --sysconfdir=/etc \ --with-libpam=yes \ - --prefix="$PREFIX" \ - --bindir=/bin + --prefix="$PREFIX" post-install-commands: # Disable things handled by pam instead - | diff --git a/strata/core/util-linux.morph b/strata/core/util-linux.morph index a685af9c..dca8ad4c 100644 --- a/strata/core/util-linux.morph +++ b/strata/core/util-linux.morph @@ -4,9 +4,7 @@ build-system: autotools pre-configure-commands: - ./autogen.sh configure-commands: -# Installing to /bin so that they overwrite busybox login. - | ./configure --prefix="$PREFIX" \ --enable-libmount-force-mountinfo \ - --disable-use-tty-group \ - --bindir=/bin + --disable-use-tty-group diff --git a/strata/coreutils-common/tar.morph b/strata/coreutils-common/tar.morph index c839c1b3..11ca9585 100644 --- a/strata/coreutils-common/tar.morph +++ b/strata/coreutils-common/tar.morph @@ -7,10 +7,7 @@ configure-commands: # Configure flag notes: # 1. Needed to run configure as root # 2. Disable some warning that cause the build to fail -# 3. To use GNU tar instead the busybox one. -# This will dissappear when we merge /usr/bin and /bin - | `# [1]` env FORCE_UNSAFE_CONFIGURE=1 \ ./configure --prefix="$PREFIX" \ - `# [2]` --disable-gcc-warnings \ - `# [3]` --bindir=/bin + `# [2]` --disable-gcc-warnings 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 diff --git a/strata/foundation/systemd.morph b/strata/foundation/systemd.morph index ae1f6a14..d0f962a8 100644 --- a/strata/foundation/systemd.morph +++ b/strata/foundation/systemd.morph @@ -3,13 +3,11 @@ kind: chunk build-system: autotools configure-commands: - ./autogen.sh -# KILL added because it picks up /usr/bin/kill, which is not installed on -# all systems -- KILL=/bin/kill ./configure --prefix="$PREFIX" --sysconfdir=/etc --localstatedir=/var - --disable-manpages - --disable-tests - --libexecdir="$PREFIX/libexec" - --enable-split-usr +- ./configure --prefix="$PREFIX" --sysconfdir=/etc --localstatedir=/var + --disable-manpages + --disable-tests + --libexecdir="$PREFIX/libexec" + --enable-split-usr post-install-commands: - mkdir -p "$DESTDIR"/sbin - ln -s "$PREFIX"/lib/systemd/systemd "$DESTDIR"/sbin/init diff --git a/strata/tools/procps-ng.morph b/strata/tools/procps-ng.morph index e030b36c..fb742a23 100644 --- a/strata/tools/procps-ng.morph +++ b/strata/tools/procps-ng.morph @@ -14,14 +14,3 @@ configure-commands: # Setting prefix to / causes files to go in /include and /share # So don't do either of those things! - ./configure --prefix="$PREFIX" --exec-prefix=/ - -post-install-commands: -# We need to link the binaries into /bin so that they override the Busybox -# versions of these tools. This will not be necessary once /bin is merged -# into /usr/bin. It's not possible to get the Makefile to install the binaries -# in /bin -- a bunch of them are hardcoded to live in ${exec_prefix}/usr/bin. - - | - usr_binaries="free pidof pmap slabtop top vmstat watch pgrep pkill pwdx tload uptime w" - for file in $usr_binaries; do - ln -sf "$PREFIX"/bin/$file "$DESTDIR"/bin/$file - done -- cgit v1.2.1