Gentoo Archives: gentoo-commits

From: "Samuli Suominen (ssuominen)" <ssuominen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-fs/udev: udev-212.ebuild udev-9999.ebuild ChangeLog
Date: Wed, 26 Mar 2014 06:13:18
Message-Id: 20140326061307.2BAE42004E@flycatcher.gentoo.org
1 ssuominen 14/03/26 06:13:07
2
3 Modified: udev-9999.ebuild ChangeLog
4 Added: udev-212.ebuild
5 Log:
6 Version bump. Don't force -Wl,-fuse-ld=bfd for ia64 anymore as upstream split the -lresolv requiring library to it's own wrt #504700. Start passing systemd specific --disable-gnutls to avoid libgnutls dependency for minimal build and stop passing removed --disable-tcpwrap.
7
8 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)
9
10 Revision Changes Path
11 1.289 sys-fs/udev/udev-9999.ebuild
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/udev-9999.ebuild?rev=1.289&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/udev-9999.ebuild?rev=1.289&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/udev-9999.ebuild?r1=1.288&r2=1.289
16
17 Index: udev-9999.ebuild
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-9999.ebuild,v
20 retrieving revision 1.288
21 retrieving revision 1.289
22 diff -u -r1.288 -r1.289
23 --- udev-9999.ebuild 19 Mar 2014 16:23:12 -0000 1.288
24 +++ udev-9999.ebuild 26 Mar 2014 06:13:06 -0000 1.289
25 @@ -1,6 +1,6 @@
26 # Copyright 1999-2014 Gentoo Foundation
27 # Distributed under the terms of the GNU General Public License v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-9999.ebuild,v 1.288 2014/03/19 16:23:12 ssuominen Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-9999.ebuild,v 1.289 2014/03/26 06:13:06 ssuominen Exp $
30
31 EAPI=5
32
33 @@ -163,13 +163,6 @@
34 -e '/--enable-static is not supported by systemd/s:as_fn_error:echo:' \
35 configure || die
36
37 - # Force ld.bfd for arches with no -Wl,--gc-sections support in ld.gold wrt #504700
38 - # Do this here to make use of CC_CHECK_FLAGS_APPEND in configure.ac, as older binutils
39 - # version doesn't necessarily support whole -Wl,-fuse-ld= flag
40 - if use ia64; then
41 - sed -i -e '/fuse-ld/s:gold:bfd:' configure || die
42 - fi
43 -
44 if ! use elibc_glibc; then #443030
45 echo '#define secure_getenv(x) NULL' >> config.h.in
46 sed -i -e '/error.*secure_getenv/s:.*:#define secure_getenv(x) NULL:' src/shared/missing.h || die
47 @@ -192,7 +185,6 @@
48 --disable-dbus
49 --disable-seccomp
50 --disable-xz
51 - --disable-tcpwrap
52 --disable-pam
53 --disable-xattr
54 --disable-gcrypt
55 @@ -200,6 +192,7 @@
56 --disable-libcryptsetup
57 --disable-qrencode
58 --disable-microhttpd
59 + --disable-gnutls
60 --disable-readahead
61 --disable-quotacheck
62 --disable-logind
63
64
65
66 1.1014 sys-fs/udev/ChangeLog
67
68 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/ChangeLog?rev=1.1014&view=markup
69 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/ChangeLog?rev=1.1014&content-type=text/plain
70 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/ChangeLog?r1=1.1013&r2=1.1014
71
72 Index: ChangeLog
73 ===================================================================
74 RCS file: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v
75 retrieving revision 1.1013
76 retrieving revision 1.1014
77 diff -u -r1.1013 -r1.1014
78 --- ChangeLog 19 Mar 2014 16:23:12 -0000 1.1013
79 +++ ChangeLog 26 Mar 2014 06:13:06 -0000 1.1014
80 @@ -1,6 +1,15 @@
81 # ChangeLog for sys-fs/udev
82 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
83 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.1013 2014/03/19 16:23:12 ssuominen Exp $
84 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.1014 2014/03/26 06:13:06 ssuominen Exp $
85 +
86 +*udev-212 (26 Mar 2014)
87 +
88 + 26 Mar 2014; Samuli Suominen <ssuominen@g.o> +udev-212.ebuild,
89 + udev-9999.ebuild:
90 + Version bump. Don't force -Wl,-fuse-ld=bfd for ia64 anymore as upstream split
91 + the -lresolv requiring library to it's own wrt #504700. Start passing systemd
92 + specific --disable-gnutls to avoid libgnutls dependency for minimal build and
93 + stop passing removed --disable-tcpwrap.
94
95 19 Mar 2014; Samuli Suominen <ssuominen@g.o> udev-211.ebuild,
96 udev-9999.ebuild:
97
98
99
100 1.1 sys-fs/udev/udev-212.ebuild
101
102 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/udev-212.ebuild?rev=1.1&view=markup
103 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/udev-212.ebuild?rev=1.1&content-type=text/plain
104
105 Index: udev-212.ebuild
106 ===================================================================
107 # Copyright 1999-2014 Gentoo Foundation
108 # Distributed under the terms of the GNU General Public License v2
109 # $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-212.ebuild,v 1.1 2014/03/26 06:13:06 ssuominen Exp $
110
111 EAPI=5
112
113 inherit autotools bash-completion-r1 eutils linux-info multilib toolchain-funcs versionator multilib-minimal
114
115 if [[ ${PV} = 9999* ]]; then
116 EGIT_REPO_URI="git://anongit.freedesktop.org/systemd/systemd"
117 inherit git-2
118 else
119 patchset=
120 SRC_URI="http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz"
121 if [[ -n "${patchset}" ]]; then
122 SRC_URI="${SRC_URI}
123 http://dev.gentoo.org/~ssuominen/${P}-patches-${patchset}.tar.xz
124 http://dev.gentoo.org/~williamh/dist/${P}-patches-${patchset}.tar.xz"
125 fi
126 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
127 fi
128
129 DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
130 HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd"
131
132 LICENSE="LGPL-2.1 MIT GPL-2"
133 SLOT="0"
134 IUSE="acl doc +firmware-loader gudev introspection +kmod +openrc selinux static-libs"
135
136 RESTRICT="test"
137
138 COMMON_DEPEND=">=sys-apps/util-linux-2.20
139 acl? ( sys-apps/acl )
140 gudev? ( >=dev-libs/glib-2.22 )
141 introspection? ( >=dev-libs/gobject-introspection-1.31.1 )
142 kmod? ( >=sys-apps/kmod-16 )
143 selinux? ( >=sys-libs/libselinux-2.1.9 )
144 !<sys-libs/glibc-2.11
145 !sys-apps/gentoo-systemd-integration
146 !sys-apps/systemd
147 abi_x86_32? (
148 !<=app-emulation/emul-linux-x86-baselibs-20130224-r7
149 !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
150 )"
151 DEPEND="${COMMON_DEPEND}
152 dev-util/gperf
153 sys-libs/libcap
154 virtual/os-headers
155 virtual/pkgconfig
156 !<sys-devel/make-3.82-r4
157 !<sys-kernel/linux-headers-2.6.32
158 doc? ( >=dev-util/gtk-doc-1.18 )"
159 # Try with `emerge -C docbook-xml-dtd` to see the build failure without DTDs
160 if [[ ${PV} = 9999* ]]; then
161 DEPEND="${DEPEND}
162 app-text/docbook-xml-dtd:4.2
163 app-text/docbook-xml-dtd:4.5
164 app-text/docbook-xsl-stylesheets
165 dev-libs/libxslt
166 >=dev-util/intltool-0.50"
167 fi
168 RDEPEND="${COMMON_DEPEND}
169 !<sys-fs/lvm2-2.02.103
170 !<sec-policy/selinux-base-2.20120725-r10"
171 PDEPEND=">=virtual/udev-208
172 >=sys-apps/hwids-20140304[udev]
173 openrc? ( >=sys-fs/udev-init-scripts-26 )"
174
175 S=${WORKDIR}/systemd-${PV}
176
177 # The multilib-build.eclass doesn't handle situation where the installed headers
178 # are different in ABIs. In this case, we install libgudev headers in native
179 # ABI but not for non-native ABI.
180 multilib_check_headers() { :; }
181
182 check_default_rules() {
183 # Make sure there are no sudden changes to upstream rules file
184 # (more for my own needs than anything else ...)
185 local udev_rules_md5=6bd3d421b9b6acd0e2d87ad720d6a389
186 MD5=$(md5sum < "${S}"/rules/50-udev-default.rules)
187 MD5=${MD5/ -/}
188 if [[ ${MD5} != ${udev_rules_md5} ]]; then
189 eerror "50-udev-default.rules has been updated, please validate!"
190 eerror "md5sum: ${MD5}"
191 die "50-udev-default.rules has been updated, please validate!"
192 fi
193 }
194
195 pkg_setup() {
196 CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET"
197 linux-info_pkg_setup
198
199 # Based on README from tarball:
200 local MINKV=3.0
201 # These arch's have the mandatory accept4() function support in Linux 2.6.32*, see:
202 # $ grep -r define.*accept4 linux-2.6.32*/*
203 if use amd64 || use ia64 || use mips || use sparc || use x86; then
204 MINKV=2.6.32
205 fi
206
207 if kernel_is -lt ${MINKV//./ }; then
208 eerror "Your running kernel is too old to run this version of ${P}"
209 eerror "You need to upgrade kernel at least to ${MINKV}"
210 fi
211 }
212
213 src_prepare() {
214 if ! [[ ${PV} = 9999* ]]; then
215 # secure_getenv() disable for non-glibc systems wrt bug #443030
216 if ! [[ $(grep -r secure_getenv * | wc -l) -eq 22 ]]; then
217 eerror "The line count for secure_getenv() failed, see bug #443030"
218 die
219 fi
220 fi
221
222 # backport some patches
223 if [[ -n "${patchset}" ]]; then
224 EPATCH_SUFFIX=patch EPATCH_FORCE=yes epatch
225 fi
226
227 cat <<-EOF > "${T}"/40-gentoo.rules
228 # Gentoo specific usb group
229 SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"
230 # Keep this for Linux 2.6.32 kernels with incomplete devtmpfs support because
231 # accept4() function is supported for some arch's wrt #457868
232 SUBSYSTEM=="mem", KERNEL=="null|zero|full|random|urandom", MODE="0666"
233 EOF
234
235 # Remove requirements for gettext and intltool wrt bug #443028
236 if ! has_version dev-util/intltool && ! [[ ${PV} = 9999* ]]; then
237 sed -i \
238 -e '/INTLTOOL_APPLIED_VERSION=/s:=.*:=0.40.0:' \
239 -e '/XML::Parser perl module is required for intltool/s|^|:|' \
240 configure || die
241 eval export INTLTOOL_{EXTRACT,MERGE,UPDATE}=/bin/true
242 eval export {MSG{FMT,MERGE},XGETTEXT}=/bin/true
243 fi
244
245 # compile with older versions of gcc #451110
246 version_is_at_least 4.6 $(gcc-version) || \
247 sed -i 's:static_assert:alsdjflkasjdfa:' src/shared/macro.h
248
249 # change rules back to group uucp instead of dialout for now wrt #454556
250 sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die
251
252 # apply user patches
253 epatch_user
254
255 if [[ ! -e configure ]]; then
256 if use doc; then
257 gtkdocize --docdir docs || die "gtkdocize failed"
258 else
259 echo 'EXTRA_DIST =' > docs/gtk-doc.make
260 fi
261 eautoreconf
262 else
263 check_default_rules
264 elibtoolize
265 fi
266
267 # Restore possibility of running --enable-static wrt #472608
268 sed -i \
269 -e '/--enable-static is not supported by systemd/s:as_fn_error:echo:' \
270 configure || die
271
272 if ! use elibc_glibc; then #443030
273 echo '#define secure_getenv(x) NULL' >> config.h.in
274 sed -i -e '/error.*secure_getenv/s:.*:#define secure_getenv(x) NULL:' src/shared/missing.h || die
275 fi
276 }
277
278 multilib_src_configure() {
279 tc-export CC #463846
280 export cc_cv_CFLAGS__flto=no #502950
281
282 # Keep sorted by ./configure --help and only pass --disable flags
283 # when *required* to avoid external deps or unnecessary compile
284 local econf_args
285 econf_args=(
286 ac_cv_search_cap_init=
287 --libdir=/usr/$(get_libdir)
288 --docdir=/usr/share/doc/${PF}
289 --disable-nls
290 --disable-python-devel
291 --disable-dbus
292 --disable-seccomp
293 --disable-xz
294 --disable-pam
295 --disable-xattr
296 --disable-gcrypt
297 --disable-audit
298 --disable-libcryptsetup
299 --disable-qrencode
300 --disable-microhttpd
301 --disable-gnutls
302 --disable-readahead
303 --disable-quotacheck
304 --disable-logind
305 --disable-polkit
306 --disable-myhostname
307 --enable-split-usr
308 --with-html-dir=/usr/share/doc/${PF}/html
309 --without-python
310 --with-bashcompletiondir="$(get_bashcompdir)"
311 --with-rootprefix=
312 )
313 # Use pregenerated copies when possible wrt #480924
314 if ! [[ ${PV} = 9999* ]]; then
315 econf_args+=(
316 --disable-manpages
317 )
318 fi
319 if multilib_build_binaries; then
320 econf_args+=(
321 $(use_enable static-libs static)
322 $(use_enable doc gtk-doc)
323 $(use_enable introspection)
324 $(use_enable acl)
325 $(use_enable kmod)
326 $(use_enable selinux)
327 $(use_enable gudev)
328 --with-rootlibdir=/$(get_libdir)
329 )
330 else
331 econf_args+=(
332 --disable-static
333 --disable-gtk-doc
334 --disable-introspection
335 --disable-acl
336 --disable-kmod
337 --disable-selinux
338 --disable-gudev
339 --disable-manpages
340 --with-rootlibdir=/usr/$(get_libdir)
341 )
342 fi
343 use firmware-loader && econf_args+=( --with-firmware-path="/lib/firmware/updates:/lib/firmware" )
344
345 ECONF_SOURCE=${S} econf "${econf_args[@]}"
346 }
347
348 multilib_src_compile() {
349 echo 'BUILT_SOURCES: $(BUILT_SOURCES)' > "${T}"/Makefile.extra
350 emake -f Makefile -f "${T}"/Makefile.extra BUILT_SOURCES
351
352 # Most of the parallel build problems were solved by >=sys-devel/make-3.82-r4,
353 # but not everything -- separate building of the binaries as a workaround,
354 # which will force internal libraries required for the helpers to be built
355 # early enough, like eg. libsystemd-shared.la
356 if multilib_build_binaries; then
357 local lib_targets=( libudev.la )
358 use gudev && lib_targets+=( libgudev-1.0.la )
359 emake "${lib_targets[@]}"
360
361 local exec_targets=(
362 systemd-udevd
363 udevadm
364 )
365 emake "${exec_targets[@]}"
366
367 local helper_targets=(
368 ata_id
369 cdrom_id
370 collect
371 scsi_id
372 v4l_id
373 accelerometer
374 mtd_probe
375 )
376 emake "${helper_targets[@]}"
377
378 if [[ ${PV} = 9999* ]]; then
379 local man_targets=(
380 man/systemd.link.5
381 man/udev.7
382 man/udevadm.8
383 man/systemd-udevd.service.8
384 )
385 emake "${man_targets[@]}"
386 fi
387
388 if use doc; then
389 emake -C docs/libudev
390 use gudev && emake -C docs/gudev
391 fi
392 else
393 local lib_targets=( libudev.la )
394 emake "${lib_targets[@]}"
395 fi
396 }
397
398 multilib_src_install() {
399 if multilib_build_binaries; then
400 local lib_LTLIBRARIES="libudev.la" \
401 pkgconfiglib_DATA="src/libudev/libudev.pc"
402
403 local targets=(
404 install-libLTLIBRARIES
405 install-includeHEADERS
406 install-libgudev_includeHEADERS
407 install-rootbinPROGRAMS
408 install-rootlibexecPROGRAMS
409 install-udevlibexecPROGRAMS
410 install-dist_udevconfDATA
411 install-dist_udevrulesDATA
412 install-girDATA
413 install-pkgconfiglibDATA
414 install-sharepkgconfigDATA
415 install-typelibsDATA
416 install-dist_docDATA
417 libudev-install-hook
418 install-directories-hook
419 install-dist_bashcompletionDATA
420 install-dist_networkDATA
421 )
422
423 if use gudev; then
424 lib_LTLIBRARIES+=" libgudev-1.0.la"
425 pkgconfiglib_DATA+=" src/gudev/gudev-1.0.pc"
426 fi
427
428 # add final values of variables:
429 targets+=(
430 rootlibexec_PROGRAMS=systemd-udevd
431 rootbin_PROGRAMS=udevadm
432 lib_LTLIBRARIES="${lib_LTLIBRARIES}"
433 pkgconfiglib_DATA="${pkgconfiglib_DATA}"
434 INSTALL_DIRS='$(sysconfdir)/udev/rules.d \
435 $(sysconfdir)/udev/hwdb.d \
436 $(sysconfdir)/systemd/network'
437 dist_bashcompletion_DATA="shell-completion/bash/udevadm"
438 dist_network_DATA="network/99-default.link"
439 )
440 emake -j1 DESTDIR="${D}" "${targets[@]}"
441
442 if use doc; then
443 emake -C docs/libudev DESTDIR="${D}" install
444 use gudev && emake -C docs/gudev DESTDIR="${D}" install
445 fi
446
447 if [[ ${PV} = 9999* ]]; then
448 doman man/{systemd.link.5,udev.7,udevadm.8,systemd-udevd.service.8}
449 else
450 doman "${S}"/man/{systemd.link.5,udev.7,udevadm.8,systemd-udevd.service.8}
451 fi
452 else
453 local lib_LTLIBRARIES="libudev.la" \
454 pkgconfiglib_DATA="src/libudev/libudev.pc" \
455 include_HEADERS="src/libudev/libudev.h"
456
457 local targets=(
458 install-libLTLIBRARIES
459 install-includeHEADERS
460 install-pkgconfiglibDATA
461 )
462
463 targets+=(
464 lib_LTLIBRARIES="${lib_LTLIBRARIES}"
465 pkgconfiglib_DATA="${pkgconfiglib_DATA}"
466 include_HEADERS="${include_HEADERS}"
467 )
468 emake -j1 DESTDIR="${D}" "${targets[@]}"
469 fi
470 }
471
472 multilib_src_install_all() {
473 dodoc TODO
474
475 prune_libtool_files --all
476 rm -f \
477 "${D}"/lib/udev/rules.d/99-systemd.rules \
478 "${D}"/usr/share/doc/${PF}/{LICENSE.*,GVARIANT-SERIALIZATION,DIFFERENCES,PORTING-DBUS1,sd-shutdown.h}
479
480 # see src_prepare() for content of 40-gentoo.rules
481 insinto /lib/udev/rules.d
482 doins "${T}"/40-gentoo.rules
483
484 # maintainer note: by not letting the upstream build-sys create the .so
485 # link, you also avoid a parallel make problem
486 mv "${D}"/usr/share/man/man8/systemd-udevd{.service,}.8
487 }
488
489 pkg_preinst() {
490 local htmldir
491 for htmldir in gudev libudev; do
492 if [[ -d ${ROOT%/}/usr/share/gtk-doc/html/${htmldir} ]]; then
493 rm -rf "${ROOT%/}"/usr/share/gtk-doc/html/${htmldir}
494 fi
495 if [[ -d ${D}/usr/share/doc/${PF}/html/${htmldir} ]]; then
496 dosym ../../doc/${PF}/html/${htmldir} \
497 /usr/share/gtk-doc/html/${htmldir}
498 fi
499 done
500 }
501
502 pkg_postinst() {
503 mkdir -p "${ROOT%/}"/run
504
505 # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766
506 # So try to remove it here (will only work if empty).
507 rmdir "${ROOT%/}"/dev/loop 2>/dev/null
508 if [[ -d ${ROOT%/}/dev/loop ]]; then
509 ewarn "Please make sure your remove /dev/loop,"
510 ewarn "else losetup may be confused when looking for unused devices."
511 fi
512
513 local fstab="${ROOT%/}"/etc/fstab dev path fstype rest
514 while read -r dev path fstype rest; do
515 if [[ ${path} == /dev && ${fstype} != devtmpfs ]]; then
516 ewarn "You need to edit your /dev line in ${fstab} to have devtmpfs"
517 ewarn "filesystem. Otherwise udev won't be able to boot."
518 ewarn "See, http://bugs.gentoo.org/453186"
519 fi
520 done < "${fstab}"
521
522 if [[ -d ${ROOT%/}/usr/lib/udev ]]; then
523 ewarn
524 ewarn "Please re-emerge all packages on your system which install"
525 ewarn "rules and helpers in /usr/lib/udev. They should now be in"
526 ewarn "/lib/udev."
527 ewarn
528 ewarn "One way to do this is to run the following command:"
529 ewarn "emerge -av1 \$(qfile -q -S -C /usr/lib/udev)"
530 ewarn "Note that qfile can be found in app-portage/portage-utils"
531 fi
532
533 local old_cd_rules="${ROOT%/}"/etc/udev/rules.d/70-persistent-cd.rules
534 local old_net_rules="${ROOT%/}"/etc/udev/rules.d/70-persistent-net.rules
535 for old_rules in "${old_cd_rules}" "${old_net_rules}"; do
536 if [[ -f ${old_rules} ]]; then
537 ewarn
538 ewarn "File ${old_rules} is from old udev installation but if you still use it,"
539 ewarn "rename it to something else starting with 70- to silence this deprecation"
540 ewarn "warning."
541 fi
542 done
543
544 elog
545 elog "Starting from version >= 197 the new predictable network interface names are"
546 elog "used by default, see:"
547 elog "http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames"
548 elog "http://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_id.c"
549 elog
550 elog "Example command to get the information for the new interface name before booting"
551 elog "(replace <ifname> with, for example, eth0):"
552 elog "# udevadm test-builtin net_id /sys/class/net/<ifname> 2> /dev/null"
553 elog
554 elog "You can use either kernel parameter \"net.ifnames=0\", create empty"
555 elog "file /etc/systemd/network/99-default.link, or symlink it to /dev/null"
556 elog "to disable the feature."
557
558 if has_version 'sys-apps/biosdevname'; then
559 ewarn
560 ewarn "You can replace the functionality of sys-apps/biosdevname which has been"
561 ewarn "detected to be installed with the new predictable network interface names."
562 fi
563
564 ewarn
565 ewarn "You need to restart udev as soon as possible to make the upgrade go"
566 ewarn "into effect."
567 ewarn "The method you use to do this depends on your init system."
568 if has_version 'sys-apps/openrc'; then
569 ewarn "For sys-apps/openrc users it is:"
570 ewarn "# /etc/init.d/udev --nodeps restart"
571 fi
572
573 elog
574 elog "For more information on udev on Gentoo, upgrading, writing udev rules, and"
575 elog "fixing known issues visit:"
576 elog "http://wiki.gentoo.org/wiki/Udev"
577 elog "http://wiki.gentoo.org/wiki/Udev/upgrade"
578
579 # If user has disabled 80-net-name-slot.rules using a empty file or a symlink to /dev/null,
580 # do the same for 80-net-setup-link.rules to keep the old behavior
581 local net_move=no
582 local net_name_slot_sym=no
583 local net_rules_path="${ROOT%/}"/etc/udev/rules.d
584 local net_name_slot="${net_rules_path}"/80-net-name-slot.rules
585 local net_setup_link="${net_rules_path}"/80-net-setup-link.rules
586 if [[ -e ${net_setup_link} ]]; then
587 net_move=no
588 else
589 [[ -f ${net_name_slot} && $(sed -e "/^#/d" -e "/^\W*$/d" ${net_name_slot} | wc -l) == 0 ]] && net_move=yes
590 if [[ -L ${net_name_slot} && $(readlink ${net_name_slot}) == /dev/null ]]; then
591 net_move=yes
592 net_name_slot_sym=yes
593 fi
594 fi
595 if [[ ${net_move} == yes ]]; then
596 ebegin "Copying ${net_name_slot} to ${net_setup_link}"
597
598 if [[ ${net_name_slot_sym} == yes ]]; then
599 ln -nfs /dev/null "${net_setup_link}"
600 else
601 cp "${net_name_slot}" "${net_setup_link}"
602 fi
603 eend $?
604 fi
605
606 # Update hwdb database in case the format is changed by udev version.
607 if has_version 'sys-apps/hwids[udev]'; then
608 udevadm hwdb --update --root="${ROOT%/}"
609 # Only reload when we are not upgrading to avoid potential race w/ incompatible hwdb.bin and the running udevd
610 if [[ -z ${REPLACING_VERSIONS} ]]; then
611 # http://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda
612 if [[ ${ROOT} != "" ]] && [[ ${ROOT} != "/" ]]; then
613 return 0
614 fi
615 udevadm control --reload
616 fi
617 fi
618 }