Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-kernel/dracut/, sys-kernel/dracut/files/
Date: Tue, 04 Jul 2017 02:52:54
Message-Id: 1499136738.785b9ef776a8106029579209bbd8d6d2a0862ae7.floppym@gentoo
1 commit: 785b9ef776a8106029579209bbd8d6d2a0862ae7
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jul 4 02:52:18 2017 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Tue Jul 4 02:52:18 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=785b9ef7
7
8 sys-kernel/dracut: better fix for systemdutildir
9
10 Package-Manager: Portage-2.3.6_p9, Repoman-2.3.2_p77
11
12 .../{dracut-045-r1.ebuild => dracut-045-r2.ebuild} | 7 +---
13 sys-kernel/dracut/files/045-systemdutildir.patch | 45 ++++++++++++++++++++++
14 2 files changed, 47 insertions(+), 5 deletions(-)
15
16 diff --git a/sys-kernel/dracut/dracut-045-r1.ebuild b/sys-kernel/dracut/dracut-045-r2.ebuild
17 similarity index 97%
18 rename from sys-kernel/dracut/dracut-045-r1.ebuild
19 rename to sys-kernel/dracut/dracut-045-r2.ebuild
20 index 3c4fcadb254..145d0b7f5ea 100644
21 --- a/sys-kernel/dracut/dracut-045-r1.ebuild
22 +++ b/sys-kernel/dracut/dracut-045-r2.ebuild
23 @@ -11,7 +11,7 @@ SRC_URI="mirror://kernel/linux/utils/boot/${PN}/${P}.tar.xz"
24 LICENSE="GPL-2"
25 SLOT="0"
26 KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
27 -IUSE="debug selinux systemd"
28 +IUSE="debug selinux"
29
30 RESTRICT="test"
31
32 @@ -36,7 +36,6 @@ RDEPEND="${CDEPEND}
33 sys-libs/libsepol
34 sec-policy/selinux-dracut
35 )
36 - systemd? ( sys-apps/systemd )
37 !net-analyzer/arping
38 "
39 DEPEND="${CDEPEND}
40 @@ -52,6 +51,7 @@ DOCS=( AUTHORS HACKING NEWS README README.generic README.kernel README.modules
41 QA_MULTILIB_PATHS="usr/lib/dracut"
42
43 PATCHES=(
44 + "${FILESDIR}/045-systemdutildir.patch"
45 )
46
47 src_configure() {
48 @@ -81,9 +81,6 @@ src_install() {
49
50 einfo "Setting libdirs to \"${libdirs}\" ..."
51 echo "libdirs=\"${libdirs}\"" > "${T}/gentoo.conf"
52 -
53 - use systemd || echo 'systemdutildir="/lib/systemd"' >> "${T}/gentoo.conf"
54 -
55 insinto "${dracutlibdir}/dracut.conf.d"
56 doins "${T}/gentoo.conf"
57
58
59 diff --git a/sys-kernel/dracut/files/045-systemdutildir.patch b/sys-kernel/dracut/files/045-systemdutildir.patch
60 new file mode 100644
61 index 00000000000..e56abba3547
62 --- /dev/null
63 +++ b/sys-kernel/dracut/files/045-systemdutildir.patch
64 @@ -0,0 +1,45 @@
65 +From ed5cc98864c28eab2c4cb45ec0f67450699aaaa8 Mon Sep 17 00:00:00 2001
66 +From: Mike Gilbert <floppym@g.o>
67 +Date: Mon, 3 Jul 2017 22:39:42 -0400
68 +Subject: [PATCH] dracut.sh: improve udevdir and systemdutildir fallback logic
69 +
70 +Check for a common binary in systemdutildir. This resolves an issue on
71 +split-usr systems, where it is common to have both /lib/systemd[/system]
72 +and /usr/lib/systemd[/user] present.
73 +
74 +Check for systemd-udevd specifically, since some distros (Gentoo) allow
75 +udev to be installed without the rest of the systemd stack.
76 +
77 +Similar logic is applied to udevdir simply for consistency.
78 +---
79 + dracut.sh | 8 ++++----
80 + 1 file changed, 4 insertions(+), 4 deletions(-)
81 +
82 +diff --git a/dracut.sh b/dracut.sh
83 +index 64d94201..67c12a72 100755
84 +--- a/dracut.sh
85 ++++ b/dracut.sh
86 +@@ -1266,16 +1266,16 @@ done
87 + [[ -d $udevdir ]] \
88 + || udevdir="$(pkg-config udev --variable=udevdir 2>/dev/null)"
89 + if ! [[ -d "$udevdir" ]]; then
90 +- [[ ! -h /lib ]] && [[ -d /lib/udev ]] && udevdir=/lib/udev
91 +- [[ -d /usr/lib/udev ]] && udevdir=/usr/lib/udev
92 ++ [[ -e /lib/udev/collect ]] && udevdir=/lib/udev
93 ++ [[ -e /usr/lib/udev/collect ]] && udevdir=/usr/lib/udev
94 + fi
95 +
96 + [[ -d $systemdutildir ]] \
97 + || systemdutildir=$(pkg-config systemd --variable=systemdutildir 2>/dev/null)
98 +
99 + if ! [[ -d "$systemdutildir" ]]; then
100 +- [[ ! -h /lib ]] && [[ -d /lib/systemd ]] && systemdutildir=/lib/systemd
101 +- [[ -d /usr/lib/systemd ]] && systemdutildir=/usr/lib/systemd
102 ++ [[ -e /lib/systemd/systemd-udevd ]] && systemdutildir=/lib/systemd
103 ++ [[ -e /usr/lib/systemd/systemd-udevd ]] && systemdutildir=/usr/lib/systemd
104 + fi
105 +
106 + [[ -d $systemdsystemunitdir ]] \
107 +--
108 +2.13.2
109 +