From bf3d75a2ebf4ad80313d7ced8478f21d9a96f87b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= Date: Wed, 2 Oct 2013 22:40:43 +0200 Subject: [PATCH 5/5] Install dracut-install into libexec dir instead of lib dir dracut-install script is the only thing ABI specific atm. See https://bugs.gentoo.org/show_bug.cgi?id=485218 for details on the problem. --- Makefile | 4 +++- configure | 1 + dracut-functions.sh | 4 ++++ dracut.sh | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cab7755..fd936f2 100644 --- a/Makefile +++ b/Makefile @@ -104,6 +104,7 @@ install: dracut-version.sh mkdir -p $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(mandir)/man5 $(DESTDIR)$(mandir)/man7 $(DESTDIR)$(mandir)/man8 install -m 0755 dracut.sh $(DESTDIR)$(bindir)/dracut sed -r \ + -e "s|^(libexecdir)=.*|\1=$(libexecdir)|" \ -e "s|^(pkglibdir)=.*|\1=$(pkglibdir)|" \ -i $(DESTDIR)$(bindir)/dracut install -m 0755 dracut-catimages.sh $(DESTDIR)$(bindir)/dracut-catimages @@ -147,7 +148,8 @@ endif done \ fi if [ -f install/dracut-install ]; then \ - install -m 0755 install/dracut-install $(DESTDIR)$(pkglibdir)/dracut-install; \ + mkdir -p $(DESTDIR)$(libexecdir); \ + install -m 0755 install/dracut-install $(DESTDIR)$(libexecdir)/dracut-install; \ fi if [ -f skipcpio/skipcpio ]; then \ install -m 0755 skipcpio/skipcpio $(DESTDIR)$(pkglibdir)/skipcpio; \ diff --git a/configure b/configure index 19b5e1f..d2ffc2c 100755 --- a/configure +++ b/configure @@ -61,6 +61,7 @@ sbindir ?= ${sbindir:-${prefix}/sbin} mandir ?= ${mandir:-${prefix}/share/man} enable_documentation ?= ${enable_documentation:-yes} bindir ?= ${bindir:-${prefix}/bin} +libexecdir ?= ${libexecdir:-${prefix}/libexec} EOF { diff --git a/dracut-functions.sh b/dracut-functions.sh index 86a69a8..e8ec335 100755 --- a/dracut-functions.sh +++ b/dracut-functions.sh @@ -695,6 +695,10 @@ if ! [[ $DRACUT_INSTALL ]]; then DRACUT_INSTALL=$(find_binary dracut-install) fi +if ! [[ $DRACUT_INSTALL ]] && [[ -x $libexecdir/dracut-install ]]; then + DRACUT_INSTALL=$libexecdir/dracut-install +fi + if ! [[ $DRACUT_INSTALL ]] && [[ -x $dracutbasedir/dracut-install ]]; then DRACUT_INSTALL=$dracutbasedir/dracut-install fi diff --git a/dracut.sh b/dracut.sh index 9657230..08335d0 100755 --- a/dracut.sh +++ b/dracut.sh @@ -27,6 +27,7 @@ dracut_args=( "$@" ) # base dirs +libexecdir=/usr/libexec pkglibdir=/usr/lib/dracut dracutbasedir="$pkglibdir" -- 1.8.5.5