summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2017-07-03 22:52:18 -0400
committerMike Gilbert <floppym@gentoo.org>2017-07-03 22:52:18 -0400
commit785b9ef776a8106029579209bbd8d6d2a0862ae7 (patch)
tree4ad247bcd9ec3e3d288d051c916a0a8e8c607c56
parentsys-kernel/dracut: override systemdutildir (diff)
downloadgentoo-785b9ef776a8106029579209bbd8d6d2a0862ae7.tar.gz
gentoo-785b9ef776a8106029579209bbd8d6d2a0862ae7.tar.bz2
gentoo-785b9ef776a8106029579209bbd8d6d2a0862ae7.zip
sys-kernel/dracut: better fix for systemdutildir
Package-Manager: Portage-2.3.6_p9, Repoman-2.3.2_p77
-rw-r--r--sys-kernel/dracut/dracut-045-r2.ebuild (renamed from sys-kernel/dracut/dracut-045-r1.ebuild)7
-rw-r--r--sys-kernel/dracut/files/045-systemdutildir.patch45
2 files changed, 47 insertions, 5 deletions
diff --git a/sys-kernel/dracut/dracut-045-r1.ebuild b/sys-kernel/dracut/dracut-045-r2.ebuild
index 3c4fcadb254d..145d0b7f5eaf 100644
--- a/sys-kernel/dracut/dracut-045-r1.ebuild
+++ b/sys-kernel/dracut/dracut-045-r2.ebuild
@@ -11,7 +11,7 @@ SRC_URI="mirror://kernel/linux/utils/boot/${PN}/${P}.tar.xz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
-IUSE="debug selinux systemd"
+IUSE="debug selinux"
RESTRICT="test"
@@ -36,7 +36,6 @@ RDEPEND="${CDEPEND}
sys-libs/libsepol
sec-policy/selinux-dracut
)
- systemd? ( sys-apps/systemd )
!net-analyzer/arping
"
DEPEND="${CDEPEND}
@@ -52,6 +51,7 @@ DOCS=( AUTHORS HACKING NEWS README README.generic README.kernel README.modules
QA_MULTILIB_PATHS="usr/lib/dracut"
PATCHES=(
+ "${FILESDIR}/045-systemdutildir.patch"
)
src_configure() {
@@ -81,9 +81,6 @@ src_install() {
einfo "Setting libdirs to \"${libdirs}\" ..."
echo "libdirs=\"${libdirs}\"" > "${T}/gentoo.conf"
-
- use systemd || echo 'systemdutildir="/lib/systemd"' >> "${T}/gentoo.conf"
-
insinto "${dracutlibdir}/dracut.conf.d"
doins "${T}/gentoo.conf"
diff --git a/sys-kernel/dracut/files/045-systemdutildir.patch b/sys-kernel/dracut/files/045-systemdutildir.patch
new file mode 100644
index 000000000000..e56abba35470
--- /dev/null
+++ b/sys-kernel/dracut/files/045-systemdutildir.patch
@@ -0,0 +1,45 @@
+From ed5cc98864c28eab2c4cb45ec0f67450699aaaa8 Mon Sep 17 00:00:00 2001
+From: Mike Gilbert <floppym@gentoo.org>
+Date: Mon, 3 Jul 2017 22:39:42 -0400
+Subject: [PATCH] dracut.sh: improve udevdir and systemdutildir fallback logic
+
+Check for a common binary in systemdutildir. This resolves an issue on
+split-usr systems, where it is common to have both /lib/systemd[/system]
+and /usr/lib/systemd[/user] present.
+
+Check for systemd-udevd specifically, since some distros (Gentoo) allow
+udev to be installed without the rest of the systemd stack.
+
+Similar logic is applied to udevdir simply for consistency.
+---
+ dracut.sh | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/dracut.sh b/dracut.sh
+index 64d94201..67c12a72 100755
+--- a/dracut.sh
++++ b/dracut.sh
+@@ -1266,16 +1266,16 @@ done
+ [[ -d $udevdir ]] \
+ || udevdir="$(pkg-config udev --variable=udevdir 2>/dev/null)"
+ if ! [[ -d "$udevdir" ]]; then
+- [[ ! -h /lib ]] && [[ -d /lib/udev ]] && udevdir=/lib/udev
+- [[ -d /usr/lib/udev ]] && udevdir=/usr/lib/udev
++ [[ -e /lib/udev/collect ]] && udevdir=/lib/udev
++ [[ -e /usr/lib/udev/collect ]] && udevdir=/usr/lib/udev
+ fi
+
+ [[ -d $systemdutildir ]] \
+ || systemdutildir=$(pkg-config systemd --variable=systemdutildir 2>/dev/null)
+
+ if ! [[ -d "$systemdutildir" ]]; then
+- [[ ! -h /lib ]] && [[ -d /lib/systemd ]] && systemdutildir=/lib/systemd
+- [[ -d /usr/lib/systemd ]] && systemdutildir=/usr/lib/systemd
++ [[ -e /lib/systemd/systemd-udevd ]] && systemdutildir=/lib/systemd
++ [[ -e /usr/lib/systemd/systemd-udevd ]] && systemdutildir=/usr/lib/systemd
+ fi
+
+ [[ -d $systemdsystemunitdir ]] \
+--
+2.13.2
+