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-fs/udev/, sys-fs/udev/files/
Date: Wed, 06 Jan 2021 15:47:34
Message-Id: 1609948030.e1c9784d3db136c7ce82dd00bcad18839dd11fee.floppym@gentoo
1 commit: e1c9784d3db136c7ce82dd00bcad18839dd11fee
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 6 15:47:10 2021 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 6 15:47:10 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1c9784d
7
8 sys-fs/udev: remove old
9
10 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
11
12 sys-fs/udev/Manifest | 1 -
13 sys-fs/udev/files/242-gcc-9.patch | 163 -------------------
14 sys-fs/udev/udev-242.ebuild | 333 --------------------------------------
15 3 files changed, 497 deletions(-)
16
17 diff --git a/sys-fs/udev/Manifest b/sys-fs/udev/Manifest
18 index 299515c5f11..d0bd75c2b5b 100644
19 --- a/sys-fs/udev/Manifest
20 +++ b/sys-fs/udev/Manifest
21 @@ -1,4 +1,3 @@
22 -DIST systemd-242.tar.gz 7831435 BLAKE2B 288e65d0a8e133ef5885689eb16118a83d93c730e342da63115cea0892fc999104c3a4856c83f3e7ef909ba2f3311146730b05ee02d84cc0400851ccbdcd54cd SHA512 578f68a3c8f2d454198fc04ff8d943abcfb390531d57f9603d185857f7afa7f4dc641dafecf49ce50fe22f5837b252b181400891e8efd4459fd4f69bb4283cb4
23 DIST systemd-243.tar.gz 8242522 BLAKE2B 89e3ebbea5a99061329f7c78220a66c1e075d5ba90dfdf5ee8d0d9b762ef4600dc82d8ca2054632e5e343b6272cd8046c92f7f99dcfa8287c5ef2b42fb96d4cb SHA512 56b52a297aa5ac04d9667eb3afb1598725b197de73ff72baa1aabbc2844e36fba7b7fccdf6d214ae8b5b926616b2b7e15772763aaa80ec938d74333ff9c8673e
24 DIST systemd-246.tar.gz 9534036 BLAKE2B 71b72abcd4d066d35d45d9835d41bec8faa9a7eddc80b48fe7073223f07d32f78a8442c52dc0800940f9750d9c5502123a633738981d797cf610d85df2035bf0 SHA512 7103f7da53f7ced3b5543c238f23bd11c82af8e37166c1720a90576b6b431b4329320c78726166c65a9f5e101dd465c0a86dd13c586c4e55e608a6273d8f324f
25 DIST systemd-stable-245.5.tar.gz 9020836 BLAKE2B 7753eecceffa86c9208c3e71df2037b58b445f9090b73c6ff499b4170b94488a1fd1cabcd17cbb98506a692875a3eef07a40a54d23e09c331a01319f8d03d13d SHA512 47de4a59980643002f325c499eeb4dd76fa9f1d1267686e7564f103690487bf85974590d7cb3e3641409e5bfba567fe2a66efa80320e7e8adc48af4461e2e172
26
27 diff --git a/sys-fs/udev/files/242-gcc-9.patch b/sys-fs/udev/files/242-gcc-9.patch
28 deleted file mode 100644
29 index e9f690a65be..00000000000
30 --- a/sys-fs/udev/files/242-gcc-9.patch
31 +++ /dev/null
32 @@ -1,163 +0,0 @@
33 -From c98b3545008d8e984ab456dcf79787418fcbfe13 Mon Sep 17 00:00:00 2001
34 -From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@××××××.pl>
35 -Date: Tue, 7 May 2019 13:46:55 +0200
36 -Subject: [PATCH] network: remove redunant link name in message
37 -
38 -Fixes #12454.
39 -
40 -gcc was complaining that the link->ifname argument is NULL. Adding
41 -assert(link->ifname) right before the call has no effect. It seems that
42 -gcc is confused by the fact that log_link_warning_errno() internally
43 -calls log_object(), with link->ifname passed as the object. log_object()
44 -is also a macro and is does a check whether the passed object is NULL.
45 -So we have a check if something is NULL right next an unconditional use
46 -of it where it cannot be NULL. I think it's a bug in gcc.
47 -
48 -Anyway, we don't need to use link->ifname here. log_object() already prepends
49 -the object name to the message.
50 ----
51 - src/network/networkd-link.c | 3 +--
52 - 1 file changed, 1 insertion(+), 2 deletions(-)
53 -
54 -diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
55 -index 533193ac932..6fc82940033 100644
56 ---- a/src/network/networkd-link.c
57 -+++ b/src/network/networkd-link.c
58 -@@ -338,8 +338,7 @@ static int link_enable_ipv6(Link *link) {
59 -
60 - r = sysctl_write_ip_property_boolean(AF_INET6, link->ifname, "disable_ipv6", disabled);
61 - if (r < 0)
62 -- log_link_warning_errno(link, r, "Cannot %s IPv6 for interface %s: %m",
63 -- enable_disable(!disabled), link->ifname);
64 -+ log_link_warning_errno(link, r, "Cannot %s IPv6: %m", enable_disable(!disabled));
65 - else
66 - log_link_info(link, "IPv6 successfully %sd", enable_disable(!disabled));
67 -
68 -From bcb846f30f9ca8f42e79d109706aee9f2032261b Mon Sep 17 00:00:00 2001
69 -From: Mike Gilbert <floppym@g.o>
70 -Date: Wed, 22 May 2019 10:31:01 -0400
71 -Subject: [PATCH] shared/machine-image: avoid passing NULL to log_debug_errno
72 -
73 -Fixes: https://github.com/systemd/systemd/issues/12534
74 ----
75 - src/shared/machine-image.c | 11 ++++++++---
76 - 1 file changed, 8 insertions(+), 3 deletions(-)
77 -
78 -diff --git a/src/shared/machine-image.c b/src/shared/machine-image.c
79 -index 6b9d8fb97a6..6a6d952b424 100644
80 ---- a/src/shared/machine-image.c
81 -+++ b/src/shared/machine-image.c
82 -@@ -201,11 +201,13 @@ static int image_make(
83 - Image **ret) {
84 -
85 - _cleanup_free_ char *pretty_buffer = NULL;
86 -+ _cleanup_free_ char *cwd = NULL;
87 - struct stat stbuf;
88 - bool read_only;
89 - int r;
90 -
91 - assert(dfd >= 0 || dfd == AT_FDCWD);
92 -+ assert(path || dfd == AT_FDCWD);
93 - assert(filename);
94 -
95 - /* We explicitly *do* follow symlinks here, since we want to allow symlinking trees, raw files and block
96 -@@ -221,6 +223,9 @@ static int image_make(
97 - st = &stbuf;
98 - }
99 -
100 -+ if (!path)
101 -+ safe_getcwd(&cwd);
102 -+
103 - read_only =
104 - (path && path_startswith(path, "/usr")) ||
105 - (faccessat(dfd, filename, W_OK, AT_EACCESS) < 0 && errno == EROFS);
106 -@@ -359,7 +364,7 @@ static int image_make(
107 -
108 - block_fd = openat(dfd, filename, O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_NOCTTY);
109 - if (block_fd < 0)
110 -- log_debug_errno(errno, "Failed to open block device %s/%s, ignoring: %m", path, filename);
111 -+ log_debug_errno(errno, "Failed to open block device %s/%s, ignoring: %m", path ?: strnull(cwd), filename);
112 - else {
113 - /* Refresh stat data after opening the node */
114 - if (fstat(block_fd, &stbuf) < 0)
115 -@@ -373,13 +378,13 @@ static int image_make(
116 - int state = 0;
117 -
118 - if (ioctl(block_fd, BLKROGET, &state) < 0)
119 -- log_debug_errno(errno, "Failed to issue BLKROGET on device %s/%s, ignoring: %m", path, filename);
120 -+ log_debug_errno(errno, "Failed to issue BLKROGET on device %s/%s, ignoring: %m", path ?: strnull(cwd), filename);
121 - else if (state)
122 - read_only = true;
123 - }
124 -
125 - if (ioctl(block_fd, BLKGETSIZE64, &size) < 0)
126 -- log_debug_errno(errno, "Failed to issue BLKGETSIZE64 on device %s/%s, ignoring: %m", path, filename);
127 -+ log_debug_errno(errno, "Failed to issue BLKGETSIZE64 on device %s/%s, ignoring: %m", path ?: strnull(cwd), filename);
128 -
129 - block_fd = safe_close(block_fd);
130 - }
131 -From 2570578d908a8e010828fa1f88826b1c45d534ff Mon Sep 17 00:00:00 2001
132 -From: Lennart Poettering <lennart@××××××××××.net>
133 -Date: Fri, 24 May 2019 10:54:09 +0200
134 -Subject: [PATCH] machine-image: openat() doesn't operate on the cwd if the
135 - first argument is specified
136 -
137 -A fix-up for bcb846f30f9ca8f42e79d109706aee9f2032261b.
138 ----
139 - src/shared/machine-image.c | 17 ++++++++++-------
140 - 1 file changed, 10 insertions(+), 7 deletions(-)
141 -
142 -diff --git a/src/shared/machine-image.c b/src/shared/machine-image.c
143 -index 6a6d952b424..55e5f08f91e 100644
144 ---- a/src/shared/machine-image.c
145 -+++ b/src/shared/machine-image.c
146 -@@ -200,8 +200,7 @@ static int image_make(
147 - const struct stat *st,
148 - Image **ret) {
149 -
150 -- _cleanup_free_ char *pretty_buffer = NULL;
151 -- _cleanup_free_ char *cwd = NULL;
152 -+ _cleanup_free_ char *pretty_buffer = NULL, *parent = NULL;
153 - struct stat stbuf;
154 - bool read_only;
155 - int r;
156 -@@ -223,8 +222,12 @@ static int image_make(
157 - st = &stbuf;
158 - }
159 -
160 -- if (!path)
161 -- safe_getcwd(&cwd);
162 -+ if (!path) {
163 -+ if (dfd == AT_FDCWD)
164 -+ (void) safe_getcwd(&parent);
165 -+ else
166 -+ (void) fd_get_path(dfd, &parent);
167 -+ }
168 -
169 - read_only =
170 - (path && path_startswith(path, "/usr")) ||
171 -@@ -364,7 +367,7 @@ static int image_make(
172 -
173 - block_fd = openat(dfd, filename, O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_NOCTTY);
174 - if (block_fd < 0)
175 -- log_debug_errno(errno, "Failed to open block device %s/%s, ignoring: %m", path ?: strnull(cwd), filename);
176 -+ log_debug_errno(errno, "Failed to open block device %s/%s, ignoring: %m", path ?: strnull(parent), filename);
177 - else {
178 - /* Refresh stat data after opening the node */
179 - if (fstat(block_fd, &stbuf) < 0)
180 -@@ -378,13 +381,13 @@ static int image_make(
181 - int state = 0;
182 -
183 - if (ioctl(block_fd, BLKROGET, &state) < 0)
184 -- log_debug_errno(errno, "Failed to issue BLKROGET on device %s/%s, ignoring: %m", path ?: strnull(cwd), filename);
185 -+ log_debug_errno(errno, "Failed to issue BLKROGET on device %s/%s, ignoring: %m", path ?: strnull(parent), filename);
186 - else if (state)
187 - read_only = true;
188 - }
189 -
190 - if (ioctl(block_fd, BLKGETSIZE64, &size) < 0)
191 -- log_debug_errno(errno, "Failed to issue BLKGETSIZE64 on device %s/%s, ignoring: %m", path ?: strnull(cwd), filename);
192 -+ log_debug_errno(errno, "Failed to issue BLKGETSIZE64 on device %s/%s, ignoring: %m", path ?: strnull(parent), filename);
193 -
194 - block_fd = safe_close(block_fd);
195 - }
196
197 diff --git a/sys-fs/udev/udev-242.ebuild b/sys-fs/udev/udev-242.ebuild
198 deleted file mode 100644
199 index 6c9973b9a66..00000000000
200 --- a/sys-fs/udev/udev-242.ebuild
201 +++ /dev/null
202 @@ -1,333 +0,0 @@
203 -# Copyright 2003-2020 Gentoo Authors
204 -# Distributed under the terms of the GNU General Public License v2
205 -
206 -EAPI=6
207 -
208 -inherit bash-completion-r1 linux-info meson ninja-utils multilib-minimal toolchain-funcs udev
209 -
210 -if [[ ${PV} = 9999* ]]; then
211 - EGIT_REPO_URI="https://github.com/systemd/systemd.git"
212 - inherit git-r3
213 -else
214 - MY_PV=${PV/_/-}
215 - MY_P=systemd-${MY_PV}
216 - S=${WORKDIR}/${MY_P}
217 - SRC_URI="https://github.com/systemd/systemd/archive/v${MY_PV}/${MY_P}.tar.gz"
218 - KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 s390 sparc x86"
219 -fi
220 -
221 -DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
222 -HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
223 -
224 -LICENSE="LGPL-2.1 MIT GPL-2"
225 -SLOT="0"
226 -IUSE="acl +kmod selinux"
227 -
228 -RESTRICT="test"
229 -
230 -COMMON_DEPEND=">=sys-apps/util-linux-2.30[${MULTILIB_USEDEP}]
231 - sys-libs/libcap[${MULTILIB_USEDEP}]
232 - acl? ( sys-apps/acl )
233 - kmod? ( >=sys-apps/kmod-16 )
234 - selinux? ( >=sys-libs/libselinux-2.1.9 )
235 - !<sys-libs/glibc-2.11
236 - !sys-apps/gentoo-systemd-integration
237 - !sys-apps/systemd"
238 -DEPEND="${COMMON_DEPEND}
239 - dev-util/gperf
240 - >=dev-util/intltool-0.50
241 - >=dev-util/meson-0.40.0
242 - dev-util/ninja
243 - >=sys-apps/coreutils-8.16
244 - virtual/os-headers
245 - virtual/pkgconfig
246 - >=sys-kernel/linux-headers-3.9
247 - app-text/docbook-xml-dtd:4.2
248 - app-text/docbook-xml-dtd:4.5
249 - app-text/docbook-xsl-stylesheets
250 - dev-libs/libxslt"
251 -RDEPEND="${COMMON_DEPEND}
252 - acct-group/kmem
253 - acct-group/tty
254 - acct-group/audio
255 - acct-group/cdrom
256 - acct-group/dialout
257 - acct-group/disk
258 - acct-group/input
259 - acct-group/kvm
260 - acct-group/lp
261 - acct-group/render
262 - acct-group/tape
263 - acct-group/video
264 - !<sys-fs/lvm2-2.02.103
265 - !<sec-policy/selinux-base-2.20120725-r10"
266 -PDEPEND=">=sys-apps/hwids-20140304[udev]
267 - >=sys-fs/udev-init-scripts-26"
268 -
269 -pkg_setup() {
270 - if [[ ${MERGE_TYPE} != buildonly ]]; then
271 - CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET ~!FW_LOADER_USER_HELPER ~UNIX"
272 - linux-info_pkg_setup
273 -
274 - # CONFIG_FHANDLE was introduced by 2.6.39
275 - local MINKV=2.6.39
276 -
277 - if kernel_is -lt ${MINKV//./ }; then
278 - eerror "Your running kernel is too old to run this version of ${P}"
279 - eerror "You need to upgrade kernel at least to ${MINKV}"
280 - fi
281 -
282 - if kernel_is -lt 3 7; then
283 - ewarn "Your running kernel is too old to have firmware loader and"
284 - ewarn "this version of ${P} doesn't have userspace firmware loader"
285 - ewarn "If you need firmware support, you need to upgrade kernel at least to 3.7"
286 - fi
287 - fi
288 -}
289 -
290 -src_prepare() {
291 - cat <<-EOF > "${T}"/40-gentoo.rules
292 - # Gentoo specific floppy and usb groups
293 - ACTION=="add", SUBSYSTEM=="block", KERNEL=="fd[0-9]", GROUP="floppy"
294 - ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"
295 - EOF
296 -
297 - if [[ -d "${WORKDIR}/patches" ]]; then
298 - eapply "${WORKDIR}/patches"
299 - fi
300 -
301 - local PATCHES=(
302 - "${FILESDIR}"/242-gcc-9.patch
303 - )
304 -
305 - default
306 -}
307 -
308 -meson_multilib_native_use() {
309 - if multilib_is_native_abi && use "$1"; then
310 - echo true
311 - else
312 - echo false
313 - fi
314 -}
315 -
316 -multilib_src_configure() {
317 - local emesonargs=(
318 - -Dacl=$(meson_multilib_native_use acl)
319 - -Defi=false
320 - -Dkmod=$(meson_multilib_native_use kmod)
321 - -Dselinux=$(meson_multilib_native_use selinux)
322 - -Dlink-udev-shared=false
323 - -Dsplit-usr=true
324 -
325 - # Prevent automagic deps
326 - -Dgcrypt=false
327 - -Dlibcryptsetup=false
328 - -Dlibidn=false
329 - -Dlibidn2=false
330 - -Dlibiptc=false
331 - -Dseccomp=false
332 - -Dlz4=false
333 - -Dxz=false
334 - )
335 - meson_src_configure
336 -}
337 -
338 -src_configure() {
339 - # Prevent conflicts with i686 cross toolchain, bug 559726
340 - tc-export AR CC NM OBJCOPY RANLIB
341 - multilib-minimal_src_configure
342 -}
343 -
344 -multilib_src_compile() {
345 - # meson creates this link
346 - local libudev=$(readlink src/udev/libudev.so.1)
347 -
348 - local targets=(
349 - src/udev/${libudev}
350 - )
351 - if multilib_is_native_abi; then
352 - targets+=(
353 - systemd-udevd
354 - udevadm
355 - src/udev/ata_id
356 - src/udev/cdrom_id
357 - src/udev/mtd_probe
358 - src/udev/scsi_id
359 - src/udev/v4l_id
360 - man/udev.conf.5
361 - man/systemd.link.5
362 - man/hwdb.7
363 - man/udev.7
364 - man/systemd-udevd.service.8
365 - man/udevadm.8
366 - )
367 - fi
368 - eninja "${targets[@]}"
369 -}
370 -
371 -multilib_src_install() {
372 - local libudev=$(readlink src/udev/libudev.so.1)
373 -
374 - into /
375 - dolib.so src/udev/{${libudev},libudev.so.1,libudev.so}
376 -
377 - insinto "/usr/$(get_libdir)/pkgconfig"
378 - doins src/libudev/libudev.pc
379 -
380 - if multilib_is_native_abi; then
381 - into /
382 - dobin udevadm
383 -
384 - exeinto /lib/systemd
385 - doexe systemd-udevd
386 -
387 - exeinto /lib/udev
388 - doexe src/udev/{ata_id,cdrom_id,mtd_probe,scsi_id,v4l_id}
389 -
390 - rm rules/99-systemd.rules || die
391 - insinto /lib/udev/rules.d
392 - doins rules/*.rules
393 -
394 - insinto /usr/share/pkgconfig
395 - doins src/udev/udev.pc
396 -
397 - mv man/systemd-udevd.service.8 man/systemd-udevd.8 || die
398 - rm man/systemd-udevd-{control,kernel}.socket.8 || die
399 - doman man/*.[0-9]
400 - fi
401 -}
402 -
403 -multilib_src_install_all() {
404 - doheader src/libudev/libudev.h
405 -
406 - insinto /etc/udev
407 - doins src/udev/udev.conf
408 - keepdir /etc/udev/{hwdb.d,rules.d}
409 -
410 - insinto /lib/systemd/network
411 - doins network/99-default.link
412 -
413 - # see src_prepare() for content of 40-gentoo.rules
414 - insinto /lib/udev/rules.d
415 - doins "${T}"/40-gentoo.rules
416 - doins "${S}"/rules/*.rules
417 -
418 - dobashcomp shell-completion/bash/udevadm
419 -
420 - insinto /usr/share/zsh/site-functions
421 - doins shell-completion/zsh/_udevadm
422 -
423 - einstalldocs
424 -}
425 -
426 -pkg_postinst() {
427 - mkdir -p "${ROOT%/}"/run
428 -
429 - # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766
430 - # So try to remove it here (will only work if empty).
431 - rmdir "${ROOT%/}"/dev/loop 2>/dev/null
432 - if [[ -d ${ROOT%/}/dev/loop ]]; then
433 - ewarn "Please make sure your remove /dev/loop,"
434 - ewarn "else losetup may be confused when looking for unused devices."
435 - fi
436 -
437 - local fstab="${ROOT%/}"/etc/fstab dev path fstype rest
438 - while read -r dev path fstype rest; do
439 - if [[ ${path} == /dev && ${fstype} != devtmpfs ]]; then
440 - ewarn "You need to edit your /dev line in ${fstab} to have devtmpfs"
441 - ewarn "filesystem. Otherwise udev won't be able to boot."
442 - ewarn "See, https://bugs.gentoo.org/453186"
443 - fi
444 - done < "${fstab}"
445 -
446 - if [[ -d ${ROOT%/}/usr/lib/udev ]]; then
447 - ewarn
448 - ewarn "Please re-emerge all packages on your system which install"
449 - ewarn "rules and helpers in /usr/lib/udev. They should now be in"
450 - ewarn "/lib/udev."
451 - ewarn
452 - ewarn "One way to do this is to run the following command:"
453 - ewarn "emerge -av1 \$(qfile -q -S -C /usr/lib/udev)"
454 - ewarn "Note that qfile can be found in app-portage/portage-utils"
455 - fi
456 -
457 - local old_cd_rules="${ROOT%/}"/etc/udev/rules.d/70-persistent-cd.rules
458 - local old_net_rules="${ROOT%/}"/etc/udev/rules.d/70-persistent-net.rules
459 - for old_rules in "${old_cd_rules}" "${old_net_rules}"; do
460 - if [[ -f ${old_rules} ]]; then
461 - ewarn
462 - ewarn "File ${old_rules} is from old udev installation but if you still use it,"
463 - ewarn "rename it to something else starting with 70- to silence this deprecation"
464 - ewarn "warning."
465 - fi
466 - done
467 -
468 - elog
469 - elog "Starting from version >= 197 the new predictable network interface names are"
470 - elog "used by default, see:"
471 - elog "https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames"
472 - elog "https://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_id.c"
473 - elog
474 - elog "Example command to get the information for the new interface name before booting"
475 - elog "(replace <ifname> with, for example, eth0):"
476 - elog "# udevadm test-builtin net_id /sys/class/net/<ifname> 2> /dev/null"
477 - elog
478 - elog "You can use either kernel parameter \"net.ifnames=0\", create empty"
479 - elog "file /etc/systemd/network/99-default.link, or symlink it to /dev/null"
480 - elog "to disable the feature."
481 -
482 - if has_version 'sys-apps/biosdevname'; then
483 - ewarn
484 - ewarn "You can replace the functionality of sys-apps/biosdevname which has been"
485 - ewarn "detected to be installed with the new predictable network interface names."
486 - fi
487 -
488 - ewarn
489 - ewarn "You need to restart udev as soon as possible to make the upgrade go"
490 - ewarn "into effect."
491 - ewarn "The method you use to do this depends on your init system."
492 - if has_version 'sys-apps/openrc'; then
493 - ewarn "For sys-apps/openrc users it is:"
494 - ewarn "# /etc/init.d/udev --nodeps restart"
495 - fi
496 -
497 - elog
498 - elog "For more information on udev on Gentoo, upgrading, writing udev rules, and"
499 - elog "fixing known issues visit:"
500 - elog "https://wiki.gentoo.org/wiki/Udev"
501 - elog "https://wiki.gentoo.org/wiki/Udev/upgrade"
502 -
503 - # If user has disabled 80-net-name-slot.rules using a empty file or a symlink to /dev/null,
504 - # do the same for 80-net-setup-link.rules to keep the old behavior
505 - local net_move=no
506 - local net_name_slot_sym=no
507 - local net_rules_path="${ROOT%/}"/etc/udev/rules.d
508 - local net_name_slot="${net_rules_path}"/80-net-name-slot.rules
509 - local net_setup_link="${net_rules_path}"/80-net-setup-link.rules
510 - if [[ ! -e ${net_setup_link} ]]; then
511 - [[ -f ${net_name_slot} && $(sed -e "/^#/d" -e "/^\W*$/d" ${net_name_slot} | wc -l) == 0 ]] && net_move=yes
512 - if [[ -L ${net_name_slot} && $(readlink ${net_name_slot}) == /dev/null ]]; then
513 - net_move=yes
514 - net_name_slot_sym=yes
515 - fi
516 - fi
517 - if [[ ${net_move} == yes ]]; then
518 - ebegin "Copying ${net_name_slot} to ${net_setup_link}"
519 -
520 - if [[ ${net_name_slot_sym} == yes ]]; then
521 - ln -nfs /dev/null "${net_setup_link}"
522 - else
523 - cp "${net_name_slot}" "${net_setup_link}"
524 - fi
525 - eend $?
526 - fi
527 -
528 - # Update hwdb database in case the format is changed by udev version.
529 - if has_version 'sys-apps/hwids[udev]'; then
530 - udevadm hwdb --update --root="${ROOT%/}"
531 - # Only reload when we are not upgrading to avoid potential race w/ incompatible hwdb.bin and the running udevd
532 - # https://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda
533 - [[ -z ${REPLACING_VERSIONS} ]] && udev_reload
534 - fi
535 -}