1 |
commit: 75b02a79f8717694050c317553e02fd25fdfd046 |
2 |
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Oct 8 21:58:07 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 30 09:33:29 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75b02a79 |
7 |
|
8 |
sys-fs/eudev: wire up 'split-usr' USE flag |
9 |
|
10 |
Closes: https://bugs.gentoo.org/736080 |
11 |
Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org> |
12 |
Closes: https://github.com/gentoo/gentoo/pull/27700 |
13 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
14 |
|
15 |
...v-3.2.12_pre3.ebuild => eudev-3.2.11-r3.ebuild} | 98 +++++++++++----------- |
16 |
sys-fs/eudev/eudev-3.2.12_pre3.ebuild | 25 ++++-- |
17 |
sys-fs/eudev/eudev-9999.ebuild | 25 ++++-- |
18 |
3 files changed, 82 insertions(+), 66 deletions(-) |
19 |
|
20 |
diff --git a/sys-fs/eudev/eudev-3.2.12_pre3.ebuild b/sys-fs/eudev/eudev-3.2.11-r3.ebuild |
21 |
similarity index 75% |
22 |
copy from sys-fs/eudev/eudev-3.2.12_pre3.ebuild |
23 |
copy to sys-fs/eudev/eudev-3.2.11-r3.ebuild |
24 |
index d286cedd7a14..a1a0e698f4ca 100644 |
25 |
--- a/sys-fs/eudev/eudev-3.2.12_pre3.ebuild |
26 |
+++ b/sys-fs/eudev/eudev-3.2.11-r3.ebuild |
27 |
@@ -1,36 +1,32 @@ |
28 |
# Copyright 1999-2022 Gentoo Authors |
29 |
# Distributed under the terms of the GNU General Public License v2 |
30 |
|
31 |
-EAPI=8 |
32 |
+EAPI=7 |
33 |
|
34 |
KV_MIN=2.6.39 |
35 |
|
36 |
-inherit linux-info multilib-minimal toolchain-funcs udev |
37 |
+inherit autotools linux-info multilib-minimal toolchain-funcs |
38 |
|
39 |
if [[ ${PV} = 9999* ]]; then |
40 |
EGIT_REPO_URI="https://github.com/eudev-project/eudev.git" |
41 |
- inherit autotools git-r3 |
42 |
+ inherit git-r3 |
43 |
else |
44 |
- MY_PV=${PV/_pre/-pre} |
45 |
- SRC_URI="https://github.com/eudev-project/eudev/releases/download/v${MY_PV}/${PN}-${MY_PV}.tar.gz" |
46 |
- S="${WORKDIR}"/${PN}-${MY_PV} |
47 |
- |
48 |
- if [[ ${PV} != *_pre* ]] ; then |
49 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
50 |
- fi |
51 |
+ SRC_URI="https://github.com/eudev-project/eudev/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz" |
52 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" |
53 |
fi |
54 |
|
55 |
DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" |
56 |
-HOMEPAGE="https://github.com/eudev-project/eudev" |
57 |
+HOMEPAGE="https://github.com/gentoo/eudev" |
58 |
|
59 |
LICENSE="LGPL-2.1 MIT GPL-2" |
60 |
SLOT="0" |
61 |
-IUSE="+kmod rule-generator selinux static-libs test" |
62 |
+IUSE="+kmod introspection rule-generator selinux split-usr static-libs test" |
63 |
RESTRICT="!test? ( test )" |
64 |
|
65 |
DEPEND=">=sys-apps/util-linux-2.20 |
66 |
>=sys-kernel/linux-headers-${KV_MIN} |
67 |
virtual/libcrypt:= |
68 |
+ introspection? ( >=dev-libs/gobject-introspection-1.38 ) |
69 |
kmod? ( >=sys-apps/kmod-16 ) |
70 |
selinux? ( >=sys-libs/libselinux-2.1.9 ) |
71 |
!sys-apps/gentoo-systemd-integration |
72 |
@@ -46,10 +42,8 @@ RDEPEND="${DEPEND} |
73 |
BDEPEND="dev-util/gperf |
74 |
virtual/os-headers |
75 |
virtual/pkgconfig |
76 |
- test? ( |
77 |
- app-text/tree |
78 |
- dev-lang/perl |
79 |
- )" |
80 |
+ >=sys-devel/make-3.82-r4 |
81 |
+ test? ( app-text/tree dev-lang/perl )" |
82 |
PDEPEND=">=sys-fs/udev-init-scripts-26" |
83 |
|
84 |
MULTILIB_WRAPPED_HEADERS=( |
85 |
@@ -58,7 +52,7 @@ MULTILIB_WRAPPED_HEADERS=( |
86 |
|
87 |
pkg_pretend() { |
88 |
ewarn |
89 |
- ewarn "As of 2013-01-29, ${PN} provides the new interface renaming functionality," |
90 |
+ ewarn "As of 2013-01-29, ${P} provides the new interface renaming functionality," |
91 |
ewarn "as described in the URL below:" |
92 |
ewarn "https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames" |
93 |
ewarn |
94 |
@@ -85,15 +79,20 @@ pkg_setup() { |
95 |
} |
96 |
|
97 |
src_prepare() { |
98 |
- default |
99 |
- |
100 |
- # Change rules back to group uucp instead of dialout for now |
101 |
+ # change rules back to group uucp instead of dialout for now |
102 |
sed -e 's/GROUP="dialout"/GROUP="uucp"/' -i rules/*.rules \ |
103 |
|| die "failed to change group dialout to uucp" |
104 |
|
105 |
- if [[ ${PV} == 9999* ]] ; then |
106 |
- eautoreconf |
107 |
- fi |
108 |
+ default |
109 |
+ eautoreconf |
110 |
+} |
111 |
+ |
112 |
+rootprefix() { |
113 |
+ usex split-usr '' /usr |
114 |
+} |
115 |
+ |
116 |
+sbindir() { |
117 |
+ usex split-usr sbin bin |
118 |
} |
119 |
|
120 |
multilib_src_configure() { |
121 |
@@ -102,37 +101,41 @@ multilib_src_configure() { |
122 |
# bug #502950 |
123 |
export cc_cv_CFLAGS__flto=no |
124 |
|
125 |
- local myeconfargs=( |
126 |
+ # Keep sorted by ./configure --help and only pass --disable flags |
127 |
+ # when *required* to avoid external deps or unnecessary compile |
128 |
+ local econf_args |
129 |
+ econf_args=( |
130 |
ac_cv_search_cap_init= |
131 |
ac_cv_header_sys_capability_h=yes |
132 |
- |
133 |
DBUS_CFLAGS=' ' |
134 |
DBUS_LIBS=' ' |
135 |
- |
136 |
- --with-rootprefix= |
137 |
+ --with-rootprefix="${EPREFIX}$(rootprefix)" |
138 |
--with-rootrundir=/run |
139 |
--exec-prefix="${EPREFIX}" |
140 |
- --bindir="${EPREFIX}"/bin |
141 |
+ --bindir="${EPREFIX}$(rootprefix)/bin" |
142 |
+ --sbindir="${EPREFIX}$(rootprefix)/$(sbindir)" |
143 |
--includedir="${EPREFIX}"/usr/include |
144 |
- --libdir="${EPREFIX}"/usr/$(get_libdir) |
145 |
- --with-rootlibexecdir="${EPREFIX}"/lib/udev |
146 |
- --enable-split-usr |
147 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)" |
148 |
+ --with-rootlibexecdir="${EPREFIX}$(rootprefix)/lib/udev" |
149 |
+ $(use_enable split-usr) |
150 |
--enable-manpages |
151 |
) |
152 |
|
153 |
# Only build libudev for non-native_abi, and only install it to libdir, |
154 |
# that means all options only apply to native_abi |
155 |
- if multilib_is_native_abi ; then |
156 |
- myeconfargs+=( |
157 |
- --with-rootlibdir="${EPREFIX}"/$(get_libdir) |
158 |
+ if multilib_is_native_abi; then |
159 |
+ econf_args+=( |
160 |
+ --with-rootlibdir="${EPREFIX}$(rootprefix)/$(get_libdir)" |
161 |
+ $(use_enable introspection) |
162 |
$(use_enable kmod) |
163 |
$(use_enable static-libs static) |
164 |
$(use_enable selinux) |
165 |
$(use_enable rule-generator) |
166 |
) |
167 |
else |
168 |
- myeconfargs+=( |
169 |
+ econf_args+=( |
170 |
--disable-static |
171 |
+ --disable-introspection |
172 |
--disable-kmod |
173 |
--disable-selinux |
174 |
--disable-rule-generator |
175 |
@@ -140,11 +143,11 @@ multilib_src_configure() { |
176 |
) |
177 |
fi |
178 |
|
179 |
- ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" |
180 |
+ ECONF_SOURCE="${S}" econf "${econf_args[@]}" |
181 |
} |
182 |
|
183 |
multilib_src_compile() { |
184 |
- if multilib_is_native_abi ; then |
185 |
+ if multilib_is_native_abi; then |
186 |
emake |
187 |
else |
188 |
emake -C src/shared |
189 |
@@ -153,21 +156,22 @@ multilib_src_compile() { |
190 |
} |
191 |
|
192 |
multilib_src_test() { |
193 |
- # Make sandbox get out of the way. |
194 |
- # These are safe because there is a fake root filesystem put in place, |
195 |
+ # make sandbox get out of the way |
196 |
+ # these are safe because there is a fake root filesystem put in place, |
197 |
# but sandbox seems to evaluate the paths of the test i/o instead of the |
198 |
- # paths of the actual i/o that results. Also only test for native abi |
199 |
- if multilib_is_native_abi ; then |
200 |
+ # paths of the actual i/o that results. |
201 |
+ # also only test for native abi |
202 |
+ if multilib_is_native_abi; then |
203 |
addread /sys |
204 |
addwrite /dev |
205 |
addwrite /run |
206 |
|
207 |
- default |
208 |
+ default_src_test |
209 |
fi |
210 |
} |
211 |
|
212 |
multilib_src_install() { |
213 |
- if multilib_is_native_abi ; then |
214 |
+ if multilib_is_native_abi; then |
215 |
emake DESTDIR="${D}" install |
216 |
else |
217 |
emake -C src/libudev DESTDIR="${D}" install |
218 |
@@ -177,19 +181,13 @@ multilib_src_install() { |
219 |
multilib_src_install_all() { |
220 |
find "${ED}" -name '*.la' -delete || die |
221 |
|
222 |
- insinto /lib/udev/rules.d |
223 |
+ insinto "$(rootprefix)/lib/udev/rules.d" |
224 |
doins "${FILESDIR}"/40-gentoo.rules |
225 |
|
226 |
use rule-generator && doinitd "${FILESDIR}"/udev-postmount |
227 |
} |
228 |
|
229 |
-pkg_postrm() { |
230 |
- udev_reload |
231 |
-} |
232 |
- |
233 |
pkg_postinst() { |
234 |
- udev_reload |
235 |
- |
236 |
mkdir -p "${EROOT}"/run |
237 |
|
238 |
# "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766 |
239 |
|
240 |
diff --git a/sys-fs/eudev/eudev-3.2.12_pre3.ebuild b/sys-fs/eudev/eudev-3.2.12_pre3.ebuild |
241 |
index d286cedd7a14..15d7e4a514a0 100644 |
242 |
--- a/sys-fs/eudev/eudev-3.2.12_pre3.ebuild |
243 |
+++ b/sys-fs/eudev/eudev-3.2.12_pre3.ebuild |
244 |
@@ -25,7 +25,7 @@ HOMEPAGE="https://github.com/eudev-project/eudev" |
245 |
|
246 |
LICENSE="LGPL-2.1 MIT GPL-2" |
247 |
SLOT="0" |
248 |
-IUSE="+kmod rule-generator selinux static-libs test" |
249 |
+IUSE="+kmod rule-generator selinux split-usr static-libs test" |
250 |
RESTRICT="!test? ( test )" |
251 |
|
252 |
DEPEND=">=sys-apps/util-linux-2.20 |
253 |
@@ -96,6 +96,14 @@ src_prepare() { |
254 |
fi |
255 |
} |
256 |
|
257 |
+rootprefix() { |
258 |
+ usex split-usr '' /usr |
259 |
+} |
260 |
+ |
261 |
+sbindir() { |
262 |
+ usex split-usr sbin bin |
263 |
+} |
264 |
+ |
265 |
multilib_src_configure() { |
266 |
# bug #463846 |
267 |
tc-export CC |
268 |
@@ -109,14 +117,15 @@ multilib_src_configure() { |
269 |
DBUS_CFLAGS=' ' |
270 |
DBUS_LIBS=' ' |
271 |
|
272 |
- --with-rootprefix= |
273 |
+ --with-rootprefix="${EPREFIX}$(rootprefix)" |
274 |
--with-rootrundir=/run |
275 |
--exec-prefix="${EPREFIX}" |
276 |
- --bindir="${EPREFIX}"/bin |
277 |
+ --bindir="${EPREFIX}$(rootprefix)/bin" |
278 |
+ --sbindir="${EPREFIX}$(rootprefix)/$(sbindir)" |
279 |
--includedir="${EPREFIX}"/usr/include |
280 |
- --libdir="${EPREFIX}"/usr/$(get_libdir) |
281 |
- --with-rootlibexecdir="${EPREFIX}"/lib/udev |
282 |
- --enable-split-usr |
283 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)" |
284 |
+ --with-rootlibexecdir="${EPREFIX}$(rootprefix)/lib/udev" |
285 |
+ $(use_enable split-usr) |
286 |
--enable-manpages |
287 |
) |
288 |
|
289 |
@@ -124,7 +133,7 @@ multilib_src_configure() { |
290 |
# that means all options only apply to native_abi |
291 |
if multilib_is_native_abi ; then |
292 |
myeconfargs+=( |
293 |
- --with-rootlibdir="${EPREFIX}"/$(get_libdir) |
294 |
+ --with-rootlibdir="${EPREFIX}$(rootprefix)/$(get_libdir)" |
295 |
$(use_enable kmod) |
296 |
$(use_enable static-libs static) |
297 |
$(use_enable selinux) |
298 |
@@ -177,7 +186,7 @@ multilib_src_install() { |
299 |
multilib_src_install_all() { |
300 |
find "${ED}" -name '*.la' -delete || die |
301 |
|
302 |
- insinto /lib/udev/rules.d |
303 |
+ insinto "$(rootprefix)/lib/udev/rules.d" |
304 |
doins "${FILESDIR}"/40-gentoo.rules |
305 |
|
306 |
use rule-generator && doinitd "${FILESDIR}"/udev-postmount |
307 |
|
308 |
diff --git a/sys-fs/eudev/eudev-9999.ebuild b/sys-fs/eudev/eudev-9999.ebuild |
309 |
index d286cedd7a14..15d7e4a514a0 100644 |
310 |
--- a/sys-fs/eudev/eudev-9999.ebuild |
311 |
+++ b/sys-fs/eudev/eudev-9999.ebuild |
312 |
@@ -25,7 +25,7 @@ HOMEPAGE="https://github.com/eudev-project/eudev" |
313 |
|
314 |
LICENSE="LGPL-2.1 MIT GPL-2" |
315 |
SLOT="0" |
316 |
-IUSE="+kmod rule-generator selinux static-libs test" |
317 |
+IUSE="+kmod rule-generator selinux split-usr static-libs test" |
318 |
RESTRICT="!test? ( test )" |
319 |
|
320 |
DEPEND=">=sys-apps/util-linux-2.20 |
321 |
@@ -96,6 +96,14 @@ src_prepare() { |
322 |
fi |
323 |
} |
324 |
|
325 |
+rootprefix() { |
326 |
+ usex split-usr '' /usr |
327 |
+} |
328 |
+ |
329 |
+sbindir() { |
330 |
+ usex split-usr sbin bin |
331 |
+} |
332 |
+ |
333 |
multilib_src_configure() { |
334 |
# bug #463846 |
335 |
tc-export CC |
336 |
@@ -109,14 +117,15 @@ multilib_src_configure() { |
337 |
DBUS_CFLAGS=' ' |
338 |
DBUS_LIBS=' ' |
339 |
|
340 |
- --with-rootprefix= |
341 |
+ --with-rootprefix="${EPREFIX}$(rootprefix)" |
342 |
--with-rootrundir=/run |
343 |
--exec-prefix="${EPREFIX}" |
344 |
- --bindir="${EPREFIX}"/bin |
345 |
+ --bindir="${EPREFIX}$(rootprefix)/bin" |
346 |
+ --sbindir="${EPREFIX}$(rootprefix)/$(sbindir)" |
347 |
--includedir="${EPREFIX}"/usr/include |
348 |
- --libdir="${EPREFIX}"/usr/$(get_libdir) |
349 |
- --with-rootlibexecdir="${EPREFIX}"/lib/udev |
350 |
- --enable-split-usr |
351 |
+ --libdir="${EPREFIX}/usr/$(get_libdir)" |
352 |
+ --with-rootlibexecdir="${EPREFIX}$(rootprefix)/lib/udev" |
353 |
+ $(use_enable split-usr) |
354 |
--enable-manpages |
355 |
) |
356 |
|
357 |
@@ -124,7 +133,7 @@ multilib_src_configure() { |
358 |
# that means all options only apply to native_abi |
359 |
if multilib_is_native_abi ; then |
360 |
myeconfargs+=( |
361 |
- --with-rootlibdir="${EPREFIX}"/$(get_libdir) |
362 |
+ --with-rootlibdir="${EPREFIX}$(rootprefix)/$(get_libdir)" |
363 |
$(use_enable kmod) |
364 |
$(use_enable static-libs static) |
365 |
$(use_enable selinux) |
366 |
@@ -177,7 +186,7 @@ multilib_src_install() { |
367 |
multilib_src_install_all() { |
368 |
find "${ED}" -name '*.la' -delete || die |
369 |
|
370 |
- insinto /lib/udev/rules.d |
371 |
+ insinto "$(rootprefix)/lib/udev/rules.d" |
372 |
doins "${FILESDIR}"/40-gentoo.rules |
373 |
|
374 |
use rule-generator && doinitd "${FILESDIR}"/udev-postmount |