mkinitrd unification across distributions
 help / color / mirror / Atom feed
From: "Amadeusz Żołnowski" <aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
To: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: "Amadeusz Żołnowski" <aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
Subject: [PATCH 2/2] Install dracut-install into libexec dir instead of lib dir
Date: Wed,  2 Oct 2013 23:00:30 +0200	[thread overview]
Message-ID: <1380747630-555-2-git-send-email-aidecoe@aidecoe.name> (raw)
In-Reply-To: <1380747630-555-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>

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 ea504f5..e004a79 100644
--- a/Makefile
+++ b/Makefile
@@ -92,6 +92,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
@@ -135,7 +136,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
 	mkdir -p $(DESTDIR)${prefix}/lib/kernel/install.d
 	install -m 0755 50-dracut.install $(DESTDIR)${prefix}/lib/kernel/install.d/50-dracut.install
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 cf33af5..76d4451 100755
--- a/dracut-functions.sh
+++ b/dracut-functions.sh
@@ -694,6 +694,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 c68e74e..574358d 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.3.2

  parent reply	other threads:[~2013-10-02 21:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-02 21:00 [PATCH 1/2] Use the same paths in dracut.sh as those set with configure script Amadeusz Żołnowski
     [not found] ` <1380747630-555-1-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
2013-10-02 21:00   ` Amadeusz Żołnowski [this message]
     [not found]     ` <1380747630-555-2-git-send-email-aidecoe-2qtfh70TtYba5EbDDlwbIw@public.gmane.org>
2013-10-04 11:07       ` [PATCH 2/2] Install dracut-install into libexec dir instead of lib dir Harald Hoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1380747630-555-2-git-send-email-aidecoe@aidecoe.name \
    --to=aidecoe-2qtfh70ttyba5ebddlwbiw@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox