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