1 |
commit: f422ee7c27b90f4e9d88cc10f1a940bcbb32309b |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri May 11 17:55:37 2018 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri May 11 20:28:32 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f422ee7c |
7 |
|
8 |
sys-fs/udev: remove old unstable versions |
9 |
|
10 |
Package-Manager: Portage-2.3.24, Repoman-2.3.6 |
11 |
|
12 |
sys-fs/udev/Manifest | 3 - |
13 |
sys-fs/udev/udev-234-r1.ebuild | 325 ----------------------------------------- |
14 |
sys-fs/udev/udev-235.ebuild | 325 ----------------------------------------- |
15 |
sys-fs/udev/udev-237.ebuild | 323 ---------------------------------------- |
16 |
4 files changed, 976 deletions(-) |
17 |
|
18 |
diff --git a/sys-fs/udev/Manifest b/sys-fs/udev/Manifest |
19 |
index bf91fd39e4f..879d26bb80f 100644 |
20 |
--- a/sys-fs/udev/Manifest |
21 |
+++ b/sys-fs/udev/Manifest |
22 |
@@ -1,9 +1,6 @@ |
23 |
DIST systemd-216.tar.xz 3612960 BLAKE2B 677fa79e7a8dae5d62f37115c3087d89c46a28515c1fe48abbd77016ee41565583e407913b5a9738908436a2ccc36a1d3305392d8dfa5ac053a44ca66d587611 SHA512 f4eee6664368168eafd61939f1355ac21c7eeecce6247de98ef36f40bb6a942d12c006ced4ee15f3d8f11699c194990222d5a5115b45f2aa81f2a1abafebbdd2 |
24 |
DIST systemd-225.tar.gz 3878442 BLAKE2B 24bf9f6bfdd7d7c585829c1b172f73e669e137020b990ecd07dffafbe6890f1819e6c8efd5b322008473a62007a4a6f6ab2fb209be7db4ecb89a2bc01d60aaab SHA512 35b3946509c7b01660da4370d3c51ff0e6a537dadd9dbb0a039c4f7ed552fd4e02ebac6eb8a788f61f1e3ba99444238d959051dd004c174b027729a80368ac19 |
25 |
DIST systemd-233.tar.gz 4660737 BLAKE2B 38cdd74543447b3c02391b328428fed169fe2cf2df6e9341dcaf2f7d3d977612ec102301e144c1cada90d61e9e9bda3b2faaef708c8ff4bd0b52b143760a83b2 SHA512 5ad5329ea116d973cf67096f7e7ad28e9ea0905696e9451291f1d25e5064f4a9bfcfae87e912996c6a38397e9f4a148d4ccecfa9b70f7ecdf04deadb61784c8e |
26 |
-DIST systemd-234.tar.gz 4800186 BLAKE2B 398ed8869da98909d1374ef5e549ca3e26b02ece577d94dec53e98431de0c6441e50762a3bc2c93fa1c14c236a8f0dca8e3f4102fd276ec977dfb3e77a789165 SHA512 762336a7d96c6583cf71cad62efce95a0ed93cd0a0d7251f128d10dba8200c0c8df0e5a7d168179ababa5b221295a231e73b7e7ea2697cb3fb5c1b33538efa68 |
27 |
-DIST systemd-235.tar.gz 6586406 BLAKE2B f2e46a6c51fc9445800c4b7eee66f23ae83b42c2fedf2304acf612e6cb99122afe67f1b93cf72ed022b52384975afb92ab38cfb4efc6026384602c973d2eb98e SHA512 243f2eb5340fa37dd1286eaa63e83387bda9e03953af266cd6196a37535a13491482caf14c6ab10608bba4ed23b6c41923608e52017e0c26988ed72ddd2b9993 |
28 |
DIST systemd-236.tar.gz 6759035 BLAKE2B 0fc26bd67fb6cc3b0565c763fc26e38186c4b05c3d38652b73a2189dfbfb46382dba239f7f6f889eec57ad1d8f69d4098745c8f4ca16a707aa23b7771f2328f3 SHA512 1a9672960e03e05c09e41fb8cfe9b0f25e867fd43f37f8371515ddddfdbd4270afd746a6da733f6d1d3b2cc43db1ecc7a9f2245f2dac2ec233db74e9e70e4f6d |
29 |
-DIST systemd-237.tar.gz 6871350 BLAKE2B 4734a110a297fbbd6679bced6302fcdca55ab5d4207905e8dee9f5545f1de841d5adeaa4fd89961b9e63709d04b5c862b8bc81481311cf8e72ee327e459c9d91 SHA512 15ef4b92815a6dd9a6c51672dbc00fd7cd0f08068ef0cbeaca574f68d330b28bc67ba1946f24f75ef3d9e7b63843a73eea700db54688061dbf5c9f8470394c3b |
30 |
DIST systemd-238.tar.gz 6954022 BLAKE2B 9b5cc36a7234c0d037a2656ee1e5ed54186a394b8be41771ebc29c903d3efcecf7f13f004a6d1695c022923bd0d540a243e897852f07e810f73fd3163f688dde SHA512 c0f272b022308d3bd94679184e102a8dc85de55310bda205a458ea33c77c7733e5c8c8e5b15f786ba3e0ce59e7c6a9bf0d5a0950517c6b91e0f345950129b9c8 |
31 |
DIST udev-216-patches-2.tar.xz 1264 BLAKE2B b1bbb6b1b7734edc3352b4352a45b4b5df4715b0fc92c4936798aa93fb078755b7795f475d7bc42392ad8ef57853e9ce2507c66cc9bfbd37e6fe22ada4c156cc SHA512 1f5912f3bbc3e40a4efad9de8b1fab2b3a750f3f23c9f2e33a581658959d22cf23f9ff1b8f51597874e7bca1d0f757f37fd5550b4112160261559524eda261f4 |
32 |
|
33 |
diff --git a/sys-fs/udev/udev-234-r1.ebuild b/sys-fs/udev/udev-234-r1.ebuild |
34 |
deleted file mode 100644 |
35 |
index 58780e73818..00000000000 |
36 |
--- a/sys-fs/udev/udev-234-r1.ebuild |
37 |
+++ /dev/null |
38 |
@@ -1,325 +0,0 @@ |
39 |
-# Copyright 1999-2017 Gentoo Foundation |
40 |
-# Distributed under the terms of the GNU General Public License v2 |
41 |
- |
42 |
-EAPI=6 |
43 |
- |
44 |
-inherit bash-completion-r1 linux-info meson ninja-utils multilib-minimal toolchain-funcs udev user versionator |
45 |
- |
46 |
-if [[ ${PV} = 9999* ]]; then |
47 |
- EGIT_REPO_URI="https://github.com/systemd/systemd.git" |
48 |
- inherit git-r3 |
49 |
-else |
50 |
- SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> systemd-${PV}.tar.gz" |
51 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
52 |
-fi |
53 |
- |
54 |
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" |
55 |
-HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" |
56 |
- |
57 |
-LICENSE="LGPL-2.1 MIT GPL-2" |
58 |
-SLOT="0" |
59 |
-IUSE="acl +kmod selinux" |
60 |
- |
61 |
-RESTRICT="test" |
62 |
- |
63 |
-COMMON_DEPEND=">=sys-apps/util-linux-2.27.1[${MULTILIB_USEDEP}] |
64 |
- sys-libs/libcap[${MULTILIB_USEDEP}] |
65 |
- acl? ( sys-apps/acl ) |
66 |
- kmod? ( >=sys-apps/kmod-16 ) |
67 |
- selinux? ( >=sys-libs/libselinux-2.1.9 ) |
68 |
- !<sys-libs/glibc-2.11 |
69 |
- !sys-apps/gentoo-systemd-integration |
70 |
- !sys-apps/systemd" |
71 |
-DEPEND="${COMMON_DEPEND} |
72 |
- dev-util/gperf |
73 |
- >=dev-util/intltool-0.50 |
74 |
- >=dev-util/meson-0.40.0 |
75 |
- dev-util/ninja |
76 |
- >=sys-apps/coreutils-8.16 |
77 |
- virtual/os-headers |
78 |
- virtual/pkgconfig |
79 |
- >=sys-kernel/linux-headers-3.9 |
80 |
- app-text/docbook-xml-dtd:4.2 |
81 |
- app-text/docbook-xml-dtd:4.5 |
82 |
- app-text/docbook-xsl-stylesheets |
83 |
- dev-libs/libxslt" |
84 |
-RDEPEND="${COMMON_DEPEND} |
85 |
- !<sys-fs/lvm2-2.02.103 |
86 |
- !<sec-policy/selinux-base-2.20120725-r10" |
87 |
-PDEPEND=">=sys-apps/hwids-20140304[udev] |
88 |
- >=sys-fs/udev-init-scripts-26" |
89 |
- |
90 |
-S=${WORKDIR}/systemd-${PV} |
91 |
-EGIT_CHECKOUT_DIR=${S} |
92 |
- |
93 |
-pkg_setup() { |
94 |
- if [[ ${MERGE_TYPE} != buildonly ]]; then |
95 |
- CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET ~!FW_LOADER_USER_HELPER ~UNIX" |
96 |
- linux-info_pkg_setup |
97 |
- |
98 |
- # CONFIG_FHANDLE was introduced by 2.6.39 |
99 |
- local MINKV=2.6.39 |
100 |
- |
101 |
- if kernel_is -lt ${MINKV//./ }; then |
102 |
- eerror "Your running kernel is too old to run this version of ${P}" |
103 |
- eerror "You need to upgrade kernel at least to ${MINKV}" |
104 |
- fi |
105 |
- |
106 |
- if kernel_is -lt 3 7; then |
107 |
- ewarn "Your running kernel is too old to have firmware loader and" |
108 |
- ewarn "this version of ${P} doesn't have userspace firmware loader" |
109 |
- ewarn "If you need firmware support, you need to upgrade kernel at least to 3.7" |
110 |
- fi |
111 |
- fi |
112 |
-} |
113 |
- |
114 |
-src_prepare() { |
115 |
- if ! [[ ${PV} = 9999* ]]; then |
116 |
- # secure_getenv() disable for non-glibc systems wrt bug #443030 |
117 |
- if ! [[ $(grep -r secure_getenv * | wc -l) -eq 27 ]]; then |
118 |
- eerror "The line count for secure_getenv() failed, see bug #443030" |
119 |
- die |
120 |
- fi |
121 |
- fi |
122 |
- |
123 |
- cat <<-EOF > "${T}"/40-gentoo.rules |
124 |
- # Gentoo specific floppy and usb groups |
125 |
- ACTION=="add", SUBSYSTEM=="block", KERNEL=="fd[0-9]", GROUP="floppy" |
126 |
- ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb" |
127 |
- EOF |
128 |
- |
129 |
- local PATCHES=( |
130 |
- "${FILESDIR}/234-uucp-group.patch" |
131 |
- ) |
132 |
- |
133 |
- default |
134 |
- |
135 |
- if ! use elibc_glibc; then #443030 |
136 |
- echo '#define secure_getenv(x) NULL' >> config.h.in |
137 |
- sed -i -e '/error.*secure_getenv/s:.*:#define secure_getenv(x) NULL:' src/shared/missing.h || die |
138 |
- fi |
139 |
-} |
140 |
- |
141 |
-meson_multilib_native_use() { |
142 |
- if multilib_is_native_abi && use "$1"; then |
143 |
- echo true |
144 |
- else |
145 |
- echo false |
146 |
- fi |
147 |
-} |
148 |
- |
149 |
-multilib_src_configure() { |
150 |
- local emesonargs=( |
151 |
- -Dacl=$(meson_multilib_native_use acl) |
152 |
- -Defi=false |
153 |
- -Dkmod=$(meson_multilib_native_use kmod) |
154 |
- -Dselinux=$(meson_multilib_native_use selinux) |
155 |
- -Dlink-udev-shared=false |
156 |
- -Dsplit-usr=true |
157 |
- ) |
158 |
- meson_src_configure |
159 |
-} |
160 |
- |
161 |
-src_configure() { |
162 |
- # Prevent conflicts with i686 cross toolchain, bug 559726 |
163 |
- tc-export AR CC NM OBJCOPY RANLIB |
164 |
- multilib-minimal_src_configure |
165 |
-} |
166 |
- |
167 |
-multilib_src_compile() { |
168 |
- # meson creates this link |
169 |
- local libudev=$(readlink src/libudev/libudev.so.1) |
170 |
- |
171 |
- local targets=( |
172 |
- src/libudev/${libudev} |
173 |
- ) |
174 |
- if multilib_is_native_abi; then |
175 |
- targets+=( |
176 |
- systemd-udevd |
177 |
- udevadm |
178 |
- src/udev/ata_id |
179 |
- src/udev/cdrom_id |
180 |
- src/udev/collect |
181 |
- src/udev/mtd_probe |
182 |
- src/udev/scsi_id |
183 |
- src/udev/v4l_id |
184 |
- man/udev.conf.5 |
185 |
- man/systemd.link.5 |
186 |
- man/hwdb.7 |
187 |
- man/udev.7 |
188 |
- man/systemd-udevd.service.8 |
189 |
- man/udevadm.8 |
190 |
- ) |
191 |
- fi |
192 |
- eninja "${targets[@]}" |
193 |
-} |
194 |
- |
195 |
-multilib_src_install() { |
196 |
- local libudev=$(readlink src/libudev/libudev.so.1) |
197 |
- |
198 |
- into / |
199 |
- dolib.so src/libudev/{${libudev},libudev.so.1,libudev.so} |
200 |
- |
201 |
- insinto "/usr/$(get_libdir)/pkgconfig" |
202 |
- doins src/libudev/libudev.pc |
203 |
- |
204 |
- if multilib_is_native_abi; then |
205 |
- into / |
206 |
- dobin udevadm |
207 |
- |
208 |
- exeinto /lib/systemd |
209 |
- doexe systemd-udevd |
210 |
- |
211 |
- exeinto /lib/udev |
212 |
- doexe src/udev/{ata_id,cdrom_id,collect,mtd_probe,scsi_id,v4l_id} |
213 |
- |
214 |
- rm rules/99-systemd.rules || die |
215 |
- insinto /lib/udev/rules.d |
216 |
- doins rules/*.rules |
217 |
- |
218 |
- insinto /usr/share/pkgconfig |
219 |
- doins src/udev/udev.pc |
220 |
- |
221 |
- mv man/systemd-udevd.service.8 man/systemd-udevd.8 || die |
222 |
- rm man/systemd-udevd-{control,kernel}.socket.8 || die |
223 |
- doman man/*.[0-9] |
224 |
- fi |
225 |
-} |
226 |
- |
227 |
-multilib_src_install_all() { |
228 |
- doheader src/libudev/libudev.h |
229 |
- |
230 |
- insinto /etc/udev |
231 |
- doins src/udev/udev.conf |
232 |
- |
233 |
- insinto /lib/systemd/network |
234 |
- doins network/99-default.link |
235 |
- |
236 |
- # see src_prepare() for content of 40-gentoo.rules |
237 |
- insinto /lib/udev/rules.d |
238 |
- doins "${T}"/40-gentoo.rules |
239 |
- doins "${S}"/rules/*.rules |
240 |
- |
241 |
- dobashcomp shell-completion/bash/udevadm |
242 |
- |
243 |
- insinto /usr/share/zsh/site-functions |
244 |
- doins shell-completion/zsh/_udevadm |
245 |
- |
246 |
- einstalldocs |
247 |
-} |
248 |
- |
249 |
-pkg_postinst() { |
250 |
- mkdir -p "${ROOT%/}"/run |
251 |
- |
252 |
- # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766 |
253 |
- # So try to remove it here (will only work if empty). |
254 |
- rmdir "${ROOT%/}"/dev/loop 2>/dev/null |
255 |
- if [[ -d ${ROOT%/}/dev/loop ]]; then |
256 |
- ewarn "Please make sure your remove /dev/loop," |
257 |
- ewarn "else losetup may be confused when looking for unused devices." |
258 |
- fi |
259 |
- |
260 |
- local fstab="${ROOT%/}"/etc/fstab dev path fstype rest |
261 |
- while read -r dev path fstype rest; do |
262 |
- if [[ ${path} == /dev && ${fstype} != devtmpfs ]]; then |
263 |
- ewarn "You need to edit your /dev line in ${fstab} to have devtmpfs" |
264 |
- ewarn "filesystem. Otherwise udev won't be able to boot." |
265 |
- ewarn "See, https://bugs.gentoo.org/453186" |
266 |
- fi |
267 |
- done < "${fstab}" |
268 |
- |
269 |
- if [[ -d ${ROOT%/}/usr/lib/udev ]]; then |
270 |
- ewarn |
271 |
- ewarn "Please re-emerge all packages on your system which install" |
272 |
- ewarn "rules and helpers in /usr/lib/udev. They should now be in" |
273 |
- ewarn "/lib/udev." |
274 |
- ewarn |
275 |
- ewarn "One way to do this is to run the following command:" |
276 |
- ewarn "emerge -av1 \$(qfile -q -S -C /usr/lib/udev)" |
277 |
- ewarn "Note that qfile can be found in app-portage/portage-utils" |
278 |
- fi |
279 |
- |
280 |
- local old_cd_rules="${ROOT%/}"/etc/udev/rules.d/70-persistent-cd.rules |
281 |
- local old_net_rules="${ROOT%/}"/etc/udev/rules.d/70-persistent-net.rules |
282 |
- for old_rules in "${old_cd_rules}" "${old_net_rules}"; do |
283 |
- if [[ -f ${old_rules} ]]; then |
284 |
- ewarn |
285 |
- ewarn "File ${old_rules} is from old udev installation but if you still use it," |
286 |
- ewarn "rename it to something else starting with 70- to silence this deprecation" |
287 |
- ewarn "warning." |
288 |
- fi |
289 |
- done |
290 |
- |
291 |
- elog |
292 |
- elog "Starting from version >= 197 the new predictable network interface names are" |
293 |
- elog "used by default, see:" |
294 |
- elog "https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames" |
295 |
- elog "https://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_id.c" |
296 |
- elog |
297 |
- elog "Example command to get the information for the new interface name before booting" |
298 |
- elog "(replace <ifname> with, for example, eth0):" |
299 |
- elog "# udevadm test-builtin net_id /sys/class/net/<ifname> 2> /dev/null" |
300 |
- elog |
301 |
- elog "You can use either kernel parameter \"net.ifnames=0\", create empty" |
302 |
- elog "file /etc/systemd/network/99-default.link, or symlink it to /dev/null" |
303 |
- elog "to disable the feature." |
304 |
- |
305 |
- if has_version 'sys-apps/biosdevname'; then |
306 |
- ewarn |
307 |
- ewarn "You can replace the functionality of sys-apps/biosdevname which has been" |
308 |
- ewarn "detected to be installed with the new predictable network interface names." |
309 |
- fi |
310 |
- |
311 |
- ewarn |
312 |
- ewarn "You need to restart udev as soon as possible to make the upgrade go" |
313 |
- ewarn "into effect." |
314 |
- ewarn "The method you use to do this depends on your init system." |
315 |
- if has_version 'sys-apps/openrc'; then |
316 |
- ewarn "For sys-apps/openrc users it is:" |
317 |
- ewarn "# /etc/init.d/udev --nodeps restart" |
318 |
- fi |
319 |
- |
320 |
- elog |
321 |
- elog "For more information on udev on Gentoo, upgrading, writing udev rules, and" |
322 |
- elog "fixing known issues visit:" |
323 |
- elog "https://wiki.gentoo.org/wiki/Udev" |
324 |
- elog "https://wiki.gentoo.org/wiki/Udev/upgrade" |
325 |
- |
326 |
- # If user has disabled 80-net-name-slot.rules using a empty file or a symlink to /dev/null, |
327 |
- # do the same for 80-net-setup-link.rules to keep the old behavior |
328 |
- local net_move=no |
329 |
- local net_name_slot_sym=no |
330 |
- local net_rules_path="${ROOT%/}"/etc/udev/rules.d |
331 |
- local net_name_slot="${net_rules_path}"/80-net-name-slot.rules |
332 |
- local net_setup_link="${net_rules_path}"/80-net-setup-link.rules |
333 |
- if [[ ! -e ${net_setup_link} ]]; then |
334 |
- [[ -f ${net_name_slot} && $(sed -e "/^#/d" -e "/^\W*$/d" ${net_name_slot} | wc -l) == 0 ]] && net_move=yes |
335 |
- if [[ -L ${net_name_slot} && $(readlink ${net_name_slot}) == /dev/null ]]; then |
336 |
- net_move=yes |
337 |
- net_name_slot_sym=yes |
338 |
- fi |
339 |
- fi |
340 |
- if [[ ${net_move} == yes ]]; then |
341 |
- ebegin "Copying ${net_name_slot} to ${net_setup_link}" |
342 |
- |
343 |
- if [[ ${net_name_slot_sym} == yes ]]; then |
344 |
- ln -nfs /dev/null "${net_setup_link}" |
345 |
- else |
346 |
- cp "${net_name_slot}" "${net_setup_link}" |
347 |
- fi |
348 |
- eend $? |
349 |
- fi |
350 |
- |
351 |
- # https://cgit.freedesktop.org/systemd/systemd/commit/rules/50-udev-default.rules?id=3dff3e00e044e2d53c76fa842b9a4759d4a50e69 |
352 |
- # https://bugs.gentoo.org/246847 |
353 |
- # https://bugs.gentoo.org/514174 |
354 |
- enewgroup input |
355 |
- |
356 |
- # Update hwdb database in case the format is changed by udev version. |
357 |
- if has_version 'sys-apps/hwids[udev]'; then |
358 |
- udevadm hwdb --update --root="${ROOT%/}" |
359 |
- # Only reload when we are not upgrading to avoid potential race w/ incompatible hwdb.bin and the running udevd |
360 |
- # https://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda |
361 |
- [[ -z ${REPLACING_VERSIONS} ]] && udev_reload |
362 |
- fi |
363 |
-} |
364 |
|
365 |
diff --git a/sys-fs/udev/udev-235.ebuild b/sys-fs/udev/udev-235.ebuild |
366 |
deleted file mode 100644 |
367 |
index b92b31ab23c..00000000000 |
368 |
--- a/sys-fs/udev/udev-235.ebuild |
369 |
+++ /dev/null |
370 |
@@ -1,325 +0,0 @@ |
371 |
-# Copyright 1999-2017 Gentoo Foundation |
372 |
-# Distributed under the terms of the GNU General Public License v2 |
373 |
- |
374 |
-EAPI=6 |
375 |
- |
376 |
-inherit bash-completion-r1 linux-info meson ninja-utils multilib-minimal toolchain-funcs udev user versionator |
377 |
- |
378 |
-if [[ ${PV} = 9999* ]]; then |
379 |
- EGIT_REPO_URI="https://github.com/systemd/systemd.git" |
380 |
- inherit git-r3 |
381 |
-else |
382 |
- SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> systemd-${PV}.tar.gz" |
383 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
384 |
-fi |
385 |
- |
386 |
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" |
387 |
-HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" |
388 |
- |
389 |
-LICENSE="LGPL-2.1 MIT GPL-2" |
390 |
-SLOT="0" |
391 |
-IUSE="acl +kmod selinux" |
392 |
- |
393 |
-RESTRICT="test" |
394 |
- |
395 |
-COMMON_DEPEND=">=sys-apps/util-linux-2.30[${MULTILIB_USEDEP}] |
396 |
- sys-libs/libcap[${MULTILIB_USEDEP}] |
397 |
- acl? ( sys-apps/acl ) |
398 |
- kmod? ( >=sys-apps/kmod-16 ) |
399 |
- selinux? ( >=sys-libs/libselinux-2.1.9 ) |
400 |
- !<sys-libs/glibc-2.11 |
401 |
- !sys-apps/gentoo-systemd-integration |
402 |
- !sys-apps/systemd" |
403 |
-DEPEND="${COMMON_DEPEND} |
404 |
- dev-util/gperf |
405 |
- >=dev-util/intltool-0.50 |
406 |
- >=dev-util/meson-0.40.0 |
407 |
- dev-util/ninja |
408 |
- >=sys-apps/coreutils-8.16 |
409 |
- virtual/os-headers |
410 |
- virtual/pkgconfig |
411 |
- >=sys-kernel/linux-headers-3.9 |
412 |
- app-text/docbook-xml-dtd:4.2 |
413 |
- app-text/docbook-xml-dtd:4.5 |
414 |
- app-text/docbook-xsl-stylesheets |
415 |
- dev-libs/libxslt" |
416 |
-RDEPEND="${COMMON_DEPEND} |
417 |
- !<sys-fs/lvm2-2.02.103 |
418 |
- !<sec-policy/selinux-base-2.20120725-r10" |
419 |
-PDEPEND=">=sys-apps/hwids-20140304[udev] |
420 |
- >=sys-fs/udev-init-scripts-26" |
421 |
- |
422 |
-S=${WORKDIR}/systemd-${PV} |
423 |
-EGIT_CHECKOUT_DIR=${S} |
424 |
- |
425 |
-pkg_setup() { |
426 |
- if [[ ${MERGE_TYPE} != buildonly ]]; then |
427 |
- CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET ~!FW_LOADER_USER_HELPER ~UNIX" |
428 |
- linux-info_pkg_setup |
429 |
- |
430 |
- # CONFIG_FHANDLE was introduced by 2.6.39 |
431 |
- local MINKV=2.6.39 |
432 |
- |
433 |
- if kernel_is -lt ${MINKV//./ }; then |
434 |
- eerror "Your running kernel is too old to run this version of ${P}" |
435 |
- eerror "You need to upgrade kernel at least to ${MINKV}" |
436 |
- fi |
437 |
- |
438 |
- if kernel_is -lt 3 7; then |
439 |
- ewarn "Your running kernel is too old to have firmware loader and" |
440 |
- ewarn "this version of ${P} doesn't have userspace firmware loader" |
441 |
- ewarn "If you need firmware support, you need to upgrade kernel at least to 3.7" |
442 |
- fi |
443 |
- fi |
444 |
-} |
445 |
- |
446 |
-src_prepare() { |
447 |
- if ! [[ ${PV} = 9999* ]]; then |
448 |
- # secure_getenv() disable for non-glibc systems wrt bug #443030 |
449 |
- if ! [[ $(grep -r secure_getenv * | wc -l) -eq 27 ]]; then |
450 |
- eerror "The line count for secure_getenv() failed, see bug #443030" |
451 |
- die |
452 |
- fi |
453 |
- fi |
454 |
- |
455 |
- cat <<-EOF > "${T}"/40-gentoo.rules |
456 |
- # Gentoo specific floppy and usb groups |
457 |
- ACTION=="add", SUBSYSTEM=="block", KERNEL=="fd[0-9]", GROUP="floppy" |
458 |
- ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb" |
459 |
- EOF |
460 |
- |
461 |
- local PATCHES=( |
462 |
- "${FILESDIR}/234-uucp-group.patch" |
463 |
- ) |
464 |
- |
465 |
- default |
466 |
- |
467 |
- if ! use elibc_glibc; then #443030 |
468 |
- echo '#define secure_getenv(x) NULL' >> config.h.in |
469 |
- sed -i -e '/error.*secure_getenv/s:.*:#define secure_getenv(x) NULL:' src/shared/missing.h || die |
470 |
- fi |
471 |
-} |
472 |
- |
473 |
-meson_multilib_native_use() { |
474 |
- if multilib_is_native_abi && use "$1"; then |
475 |
- echo true |
476 |
- else |
477 |
- echo false |
478 |
- fi |
479 |
-} |
480 |
- |
481 |
-multilib_src_configure() { |
482 |
- local emesonargs=( |
483 |
- -Dacl=$(meson_multilib_native_use acl) |
484 |
- -Defi=false |
485 |
- -Dkmod=$(meson_multilib_native_use kmod) |
486 |
- -Dselinux=$(meson_multilib_native_use selinux) |
487 |
- -Dlink-udev-shared=false |
488 |
- -Dsplit-usr=true |
489 |
- ) |
490 |
- meson_src_configure |
491 |
-} |
492 |
- |
493 |
-src_configure() { |
494 |
- # Prevent conflicts with i686 cross toolchain, bug 559726 |
495 |
- tc-export AR CC NM OBJCOPY RANLIB |
496 |
- multilib-minimal_src_configure |
497 |
-} |
498 |
- |
499 |
-multilib_src_compile() { |
500 |
- # meson creates this link |
501 |
- local libudev=$(readlink src/libudev/libudev.so.1) |
502 |
- |
503 |
- local targets=( |
504 |
- src/libudev/${libudev} |
505 |
- ) |
506 |
- if multilib_is_native_abi; then |
507 |
- targets+=( |
508 |
- systemd-udevd |
509 |
- udevadm |
510 |
- src/udev/ata_id |
511 |
- src/udev/cdrom_id |
512 |
- src/udev/collect |
513 |
- src/udev/mtd_probe |
514 |
- src/udev/scsi_id |
515 |
- src/udev/v4l_id |
516 |
- man/udev.conf.5 |
517 |
- man/systemd.link.5 |
518 |
- man/hwdb.7 |
519 |
- man/udev.7 |
520 |
- man/systemd-udevd.service.8 |
521 |
- man/udevadm.8 |
522 |
- ) |
523 |
- fi |
524 |
- eninja "${targets[@]}" |
525 |
-} |
526 |
- |
527 |
-multilib_src_install() { |
528 |
- local libudev=$(readlink src/libudev/libudev.so.1) |
529 |
- |
530 |
- into / |
531 |
- dolib.so src/libudev/{${libudev},libudev.so.1,libudev.so} |
532 |
- |
533 |
- insinto "/usr/$(get_libdir)/pkgconfig" |
534 |
- doins src/libudev/libudev.pc |
535 |
- |
536 |
- if multilib_is_native_abi; then |
537 |
- into / |
538 |
- dobin udevadm |
539 |
- |
540 |
- exeinto /lib/systemd |
541 |
- doexe systemd-udevd |
542 |
- |
543 |
- exeinto /lib/udev |
544 |
- doexe src/udev/{ata_id,cdrom_id,collect,mtd_probe,scsi_id,v4l_id} |
545 |
- |
546 |
- rm rules/99-systemd.rules || die |
547 |
- insinto /lib/udev/rules.d |
548 |
- doins rules/*.rules |
549 |
- |
550 |
- insinto /usr/share/pkgconfig |
551 |
- doins src/udev/udev.pc |
552 |
- |
553 |
- mv man/systemd-udevd.service.8 man/systemd-udevd.8 || die |
554 |
- rm man/systemd-udevd-{control,kernel}.socket.8 || die |
555 |
- doman man/*.[0-9] |
556 |
- fi |
557 |
-} |
558 |
- |
559 |
-multilib_src_install_all() { |
560 |
- doheader src/libudev/libudev.h |
561 |
- |
562 |
- insinto /etc/udev |
563 |
- doins src/udev/udev.conf |
564 |
- |
565 |
- insinto /lib/systemd/network |
566 |
- doins network/99-default.link |
567 |
- |
568 |
- # see src_prepare() for content of 40-gentoo.rules |
569 |
- insinto /lib/udev/rules.d |
570 |
- doins "${T}"/40-gentoo.rules |
571 |
- doins "${S}"/rules/*.rules |
572 |
- |
573 |
- dobashcomp shell-completion/bash/udevadm |
574 |
- |
575 |
- insinto /usr/share/zsh/site-functions |
576 |
- doins shell-completion/zsh/_udevadm |
577 |
- |
578 |
- einstalldocs |
579 |
-} |
580 |
- |
581 |
-pkg_postinst() { |
582 |
- mkdir -p "${ROOT%/}"/run |
583 |
- |
584 |
- # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766 |
585 |
- # So try to remove it here (will only work if empty). |
586 |
- rmdir "${ROOT%/}"/dev/loop 2>/dev/null |
587 |
- if [[ -d ${ROOT%/}/dev/loop ]]; then |
588 |
- ewarn "Please make sure your remove /dev/loop," |
589 |
- ewarn "else losetup may be confused when looking for unused devices." |
590 |
- fi |
591 |
- |
592 |
- local fstab="${ROOT%/}"/etc/fstab dev path fstype rest |
593 |
- while read -r dev path fstype rest; do |
594 |
- if [[ ${path} == /dev && ${fstype} != devtmpfs ]]; then |
595 |
- ewarn "You need to edit your /dev line in ${fstab} to have devtmpfs" |
596 |
- ewarn "filesystem. Otherwise udev won't be able to boot." |
597 |
- ewarn "See, https://bugs.gentoo.org/453186" |
598 |
- fi |
599 |
- done < "${fstab}" |
600 |
- |
601 |
- if [[ -d ${ROOT%/}/usr/lib/udev ]]; then |
602 |
- ewarn |
603 |
- ewarn "Please re-emerge all packages on your system which install" |
604 |
- ewarn "rules and helpers in /usr/lib/udev. They should now be in" |
605 |
- ewarn "/lib/udev." |
606 |
- ewarn |
607 |
- ewarn "One way to do this is to run the following command:" |
608 |
- ewarn "emerge -av1 \$(qfile -q -S -C /usr/lib/udev)" |
609 |
- ewarn "Note that qfile can be found in app-portage/portage-utils" |
610 |
- fi |
611 |
- |
612 |
- local old_cd_rules="${ROOT%/}"/etc/udev/rules.d/70-persistent-cd.rules |
613 |
- local old_net_rules="${ROOT%/}"/etc/udev/rules.d/70-persistent-net.rules |
614 |
- for old_rules in "${old_cd_rules}" "${old_net_rules}"; do |
615 |
- if [[ -f ${old_rules} ]]; then |
616 |
- ewarn |
617 |
- ewarn "File ${old_rules} is from old udev installation but if you still use it," |
618 |
- ewarn "rename it to something else starting with 70- to silence this deprecation" |
619 |
- ewarn "warning." |
620 |
- fi |
621 |
- done |
622 |
- |
623 |
- elog |
624 |
- elog "Starting from version >= 197 the new predictable network interface names are" |
625 |
- elog "used by default, see:" |
626 |
- elog "https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames" |
627 |
- elog "https://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_id.c" |
628 |
- elog |
629 |
- elog "Example command to get the information for the new interface name before booting" |
630 |
- elog "(replace <ifname> with, for example, eth0):" |
631 |
- elog "# udevadm test-builtin net_id /sys/class/net/<ifname> 2> /dev/null" |
632 |
- elog |
633 |
- elog "You can use either kernel parameter \"net.ifnames=0\", create empty" |
634 |
- elog "file /etc/systemd/network/99-default.link, or symlink it to /dev/null" |
635 |
- elog "to disable the feature." |
636 |
- |
637 |
- if has_version 'sys-apps/biosdevname'; then |
638 |
- ewarn |
639 |
- ewarn "You can replace the functionality of sys-apps/biosdevname which has been" |
640 |
- ewarn "detected to be installed with the new predictable network interface names." |
641 |
- fi |
642 |
- |
643 |
- ewarn |
644 |
- ewarn "You need to restart udev as soon as possible to make the upgrade go" |
645 |
- ewarn "into effect." |
646 |
- ewarn "The method you use to do this depends on your init system." |
647 |
- if has_version 'sys-apps/openrc'; then |
648 |
- ewarn "For sys-apps/openrc users it is:" |
649 |
- ewarn "# /etc/init.d/udev --nodeps restart" |
650 |
- fi |
651 |
- |
652 |
- elog |
653 |
- elog "For more information on udev on Gentoo, upgrading, writing udev rules, and" |
654 |
- elog "fixing known issues visit:" |
655 |
- elog "https://wiki.gentoo.org/wiki/Udev" |
656 |
- elog "https://wiki.gentoo.org/wiki/Udev/upgrade" |
657 |
- |
658 |
- # If user has disabled 80-net-name-slot.rules using a empty file or a symlink to /dev/null, |
659 |
- # do the same for 80-net-setup-link.rules to keep the old behavior |
660 |
- local net_move=no |
661 |
- local net_name_slot_sym=no |
662 |
- local net_rules_path="${ROOT%/}"/etc/udev/rules.d |
663 |
- local net_name_slot="${net_rules_path}"/80-net-name-slot.rules |
664 |
- local net_setup_link="${net_rules_path}"/80-net-setup-link.rules |
665 |
- if [[ ! -e ${net_setup_link} ]]; then |
666 |
- [[ -f ${net_name_slot} && $(sed -e "/^#/d" -e "/^\W*$/d" ${net_name_slot} | wc -l) == 0 ]] && net_move=yes |
667 |
- if [[ -L ${net_name_slot} && $(readlink ${net_name_slot}) == /dev/null ]]; then |
668 |
- net_move=yes |
669 |
- net_name_slot_sym=yes |
670 |
- fi |
671 |
- fi |
672 |
- if [[ ${net_move} == yes ]]; then |
673 |
- ebegin "Copying ${net_name_slot} to ${net_setup_link}" |
674 |
- |
675 |
- if [[ ${net_name_slot_sym} == yes ]]; then |
676 |
- ln -nfs /dev/null "${net_setup_link}" |
677 |
- else |
678 |
- cp "${net_name_slot}" "${net_setup_link}" |
679 |
- fi |
680 |
- eend $? |
681 |
- fi |
682 |
- |
683 |
- # https://cgit.freedesktop.org/systemd/systemd/commit/rules/50-udev-default.rules?id=3dff3e00e044e2d53c76fa842b9a4759d4a50e69 |
684 |
- # https://bugs.gentoo.org/246847 |
685 |
- # https://bugs.gentoo.org/514174 |
686 |
- enewgroup input |
687 |
- |
688 |
- # Update hwdb database in case the format is changed by udev version. |
689 |
- if has_version 'sys-apps/hwids[udev]'; then |
690 |
- udevadm hwdb --update --root="${ROOT%/}" |
691 |
- # Only reload when we are not upgrading to avoid potential race w/ incompatible hwdb.bin and the running udevd |
692 |
- # https://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda |
693 |
- [[ -z ${REPLACING_VERSIONS} ]] && udev_reload |
694 |
- fi |
695 |
-} |
696 |
|
697 |
diff --git a/sys-fs/udev/udev-237.ebuild b/sys-fs/udev/udev-237.ebuild |
698 |
deleted file mode 100644 |
699 |
index 5825a197ca7..00000000000 |
700 |
--- a/sys-fs/udev/udev-237.ebuild |
701 |
+++ /dev/null |
702 |
@@ -1,323 +0,0 @@ |
703 |
-# Copyright 1999-2018 Gentoo Foundation |
704 |
-# Distributed under the terms of the GNU General Public License v2 |
705 |
- |
706 |
-EAPI=6 |
707 |
- |
708 |
-inherit bash-completion-r1 linux-info meson ninja-utils multilib-minimal toolchain-funcs udev user versionator |
709 |
- |
710 |
-if [[ ${PV} = 9999* ]]; then |
711 |
- EGIT_REPO_URI="https://github.com/systemd/systemd.git" |
712 |
- inherit git-r3 |
713 |
-else |
714 |
- SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> systemd-${PV}.tar.gz" |
715 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
716 |
-fi |
717 |
- |
718 |
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" |
719 |
-HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" |
720 |
- |
721 |
-LICENSE="LGPL-2.1 MIT GPL-2" |
722 |
-SLOT="0" |
723 |
-IUSE="acl +kmod selinux" |
724 |
- |
725 |
-RESTRICT="test" |
726 |
- |
727 |
-COMMON_DEPEND=">=sys-apps/util-linux-2.30[${MULTILIB_USEDEP}] |
728 |
- sys-libs/libcap[${MULTILIB_USEDEP}] |
729 |
- acl? ( sys-apps/acl ) |
730 |
- kmod? ( >=sys-apps/kmod-16 ) |
731 |
- selinux? ( >=sys-libs/libselinux-2.1.9 ) |
732 |
- !<sys-libs/glibc-2.11 |
733 |
- !sys-apps/gentoo-systemd-integration |
734 |
- !sys-apps/systemd" |
735 |
-DEPEND="${COMMON_DEPEND} |
736 |
- dev-util/gperf |
737 |
- >=dev-util/intltool-0.50 |
738 |
- >=dev-util/meson-0.40.0 |
739 |
- dev-util/ninja |
740 |
- >=sys-apps/coreutils-8.16 |
741 |
- virtual/os-headers |
742 |
- virtual/pkgconfig |
743 |
- >=sys-kernel/linux-headers-3.9 |
744 |
- app-text/docbook-xml-dtd:4.2 |
745 |
- app-text/docbook-xml-dtd:4.5 |
746 |
- app-text/docbook-xsl-stylesheets |
747 |
- dev-libs/libxslt" |
748 |
-RDEPEND="${COMMON_DEPEND} |
749 |
- !<sys-fs/lvm2-2.02.103 |
750 |
- !<sec-policy/selinux-base-2.20120725-r10" |
751 |
-PDEPEND=">=sys-apps/hwids-20140304[udev] |
752 |
- >=sys-fs/udev-init-scripts-26" |
753 |
- |
754 |
-S=${WORKDIR}/systemd-${PV} |
755 |
-EGIT_CHECKOUT_DIR=${S} |
756 |
- |
757 |
-pkg_setup() { |
758 |
- if [[ ${MERGE_TYPE} != buildonly ]]; then |
759 |
- CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET ~!FW_LOADER_USER_HELPER ~UNIX" |
760 |
- linux-info_pkg_setup |
761 |
- |
762 |
- # CONFIG_FHANDLE was introduced by 2.6.39 |
763 |
- local MINKV=2.6.39 |
764 |
- |
765 |
- if kernel_is -lt ${MINKV//./ }; then |
766 |
- eerror "Your running kernel is too old to run this version of ${P}" |
767 |
- eerror "You need to upgrade kernel at least to ${MINKV}" |
768 |
- fi |
769 |
- |
770 |
- if kernel_is -lt 3 7; then |
771 |
- ewarn "Your running kernel is too old to have firmware loader and" |
772 |
- ewarn "this version of ${P} doesn't have userspace firmware loader" |
773 |
- ewarn "If you need firmware support, you need to upgrade kernel at least to 3.7" |
774 |
- fi |
775 |
- fi |
776 |
-} |
777 |
- |
778 |
-src_prepare() { |
779 |
- cat <<-EOF > "${T}"/40-gentoo.rules |
780 |
- # Gentoo specific floppy and usb groups |
781 |
- ACTION=="add", SUBSYSTEM=="block", KERNEL=="fd[0-9]", GROUP="floppy" |
782 |
- ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb" |
783 |
- EOF |
784 |
- |
785 |
- local PATCHES=( |
786 |
- "${FILESDIR}/236-uucp-group.patch" |
787 |
- ) |
788 |
- |
789 |
- default |
790 |
-} |
791 |
- |
792 |
-meson_multilib_native_use() { |
793 |
- if multilib_is_native_abi && use "$1"; then |
794 |
- echo true |
795 |
- else |
796 |
- echo false |
797 |
- fi |
798 |
-} |
799 |
- |
800 |
-multilib_src_configure() { |
801 |
- local emesonargs=( |
802 |
- -Dacl=$(meson_multilib_native_use acl) |
803 |
- -Defi=false |
804 |
- -Dkmod=$(meson_multilib_native_use kmod) |
805 |
- -Dselinux=$(meson_multilib_native_use selinux) |
806 |
- -Dlink-udev-shared=false |
807 |
- -Dsplit-usr=true |
808 |
- |
809 |
- # Prevent automagic deps |
810 |
- -Dgcrypt=false |
811 |
- -Dlibcryptsetup=false |
812 |
- -Dlibidn=false |
813 |
- -Dlibidn2=false |
814 |
- -Dlibiptc=false |
815 |
- -Dseccomp=false |
816 |
- -Dlz4=false |
817 |
- -Dxz=false |
818 |
- ) |
819 |
- meson_src_configure |
820 |
-} |
821 |
- |
822 |
-src_configure() { |
823 |
- # Prevent conflicts with i686 cross toolchain, bug 559726 |
824 |
- tc-export AR CC NM OBJCOPY RANLIB |
825 |
- multilib-minimal_src_configure |
826 |
-} |
827 |
- |
828 |
-multilib_src_compile() { |
829 |
- # meson creates this link |
830 |
- local libudev=$(readlink src/udev/libudev.so.1) |
831 |
- |
832 |
- local targets=( |
833 |
- src/udev/${libudev} |
834 |
- ) |
835 |
- if multilib_is_native_abi; then |
836 |
- targets+=( |
837 |
- systemd-udevd |
838 |
- udevadm |
839 |
- src/udev/ata_id |
840 |
- src/udev/cdrom_id |
841 |
- src/udev/collect |
842 |
- src/udev/mtd_probe |
843 |
- src/udev/scsi_id |
844 |
- src/udev/v4l_id |
845 |
- man/udev.conf.5 |
846 |
- man/systemd.link.5 |
847 |
- man/hwdb.7 |
848 |
- man/udev.7 |
849 |
- man/systemd-udevd.service.8 |
850 |
- man/udevadm.8 |
851 |
- ) |
852 |
- fi |
853 |
- eninja "${targets[@]}" |
854 |
-} |
855 |
- |
856 |
-multilib_src_install() { |
857 |
- local libudev=$(readlink src/udev/libudev.so.1) |
858 |
- |
859 |
- into / |
860 |
- dolib.so src/udev/{${libudev},libudev.so.1,libudev.so} |
861 |
- |
862 |
- insinto "/usr/$(get_libdir)/pkgconfig" |
863 |
- doins src/libudev/libudev.pc |
864 |
- |
865 |
- if multilib_is_native_abi; then |
866 |
- into / |
867 |
- dobin udevadm |
868 |
- |
869 |
- exeinto /lib/systemd |
870 |
- doexe systemd-udevd |
871 |
- |
872 |
- exeinto /lib/udev |
873 |
- doexe src/udev/{ata_id,cdrom_id,collect,mtd_probe,scsi_id,v4l_id} |
874 |
- |
875 |
- rm rules/99-systemd.rules || die |
876 |
- insinto /lib/udev/rules.d |
877 |
- doins rules/*.rules |
878 |
- |
879 |
- insinto /usr/share/pkgconfig |
880 |
- doins src/udev/udev.pc |
881 |
- |
882 |
- mv man/systemd-udevd.service.8 man/systemd-udevd.8 || die |
883 |
- rm man/systemd-udevd-{control,kernel}.socket.8 || die |
884 |
- doman man/*.[0-9] |
885 |
- fi |
886 |
-} |
887 |
- |
888 |
-multilib_src_install_all() { |
889 |
- doheader src/libudev/libudev.h |
890 |
- |
891 |
- insinto /etc/udev |
892 |
- doins src/udev/udev.conf |
893 |
- keepdir /etc/udev/{hwdb.d,rules.d} |
894 |
- |
895 |
- insinto /lib/systemd/network |
896 |
- doins network/99-default.link |
897 |
- |
898 |
- # see src_prepare() for content of 40-gentoo.rules |
899 |
- insinto /lib/udev/rules.d |
900 |
- doins "${T}"/40-gentoo.rules |
901 |
- doins "${S}"/rules/*.rules |
902 |
- |
903 |
- dobashcomp shell-completion/bash/udevadm |
904 |
- |
905 |
- insinto /usr/share/zsh/site-functions |
906 |
- doins shell-completion/zsh/_udevadm |
907 |
- |
908 |
- einstalldocs |
909 |
-} |
910 |
- |
911 |
-pkg_postinst() { |
912 |
- mkdir -p "${ROOT%/}"/run |
913 |
- |
914 |
- # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766 |
915 |
- # So try to remove it here (will only work if empty). |
916 |
- rmdir "${ROOT%/}"/dev/loop 2>/dev/null |
917 |
- if [[ -d ${ROOT%/}/dev/loop ]]; then |
918 |
- ewarn "Please make sure your remove /dev/loop," |
919 |
- ewarn "else losetup may be confused when looking for unused devices." |
920 |
- fi |
921 |
- |
922 |
- local fstab="${ROOT%/}"/etc/fstab dev path fstype rest |
923 |
- while read -r dev path fstype rest; do |
924 |
- if [[ ${path} == /dev && ${fstype} != devtmpfs ]]; then |
925 |
- ewarn "You need to edit your /dev line in ${fstab} to have devtmpfs" |
926 |
- ewarn "filesystem. Otherwise udev won't be able to boot." |
927 |
- ewarn "See, https://bugs.gentoo.org/453186" |
928 |
- fi |
929 |
- done < "${fstab}" |
930 |
- |
931 |
- if [[ -d ${ROOT%/}/usr/lib/udev ]]; then |
932 |
- ewarn |
933 |
- ewarn "Please re-emerge all packages on your system which install" |
934 |
- ewarn "rules and helpers in /usr/lib/udev. They should now be in" |
935 |
- ewarn "/lib/udev." |
936 |
- ewarn |
937 |
- ewarn "One way to do this is to run the following command:" |
938 |
- ewarn "emerge -av1 \$(qfile -q -S -C /usr/lib/udev)" |
939 |
- ewarn "Note that qfile can be found in app-portage/portage-utils" |
940 |
- fi |
941 |
- |
942 |
- local old_cd_rules="${ROOT%/}"/etc/udev/rules.d/70-persistent-cd.rules |
943 |
- local old_net_rules="${ROOT%/}"/etc/udev/rules.d/70-persistent-net.rules |
944 |
- for old_rules in "${old_cd_rules}" "${old_net_rules}"; do |
945 |
- if [[ -f ${old_rules} ]]; then |
946 |
- ewarn |
947 |
- ewarn "File ${old_rules} is from old udev installation but if you still use it," |
948 |
- ewarn "rename it to something else starting with 70- to silence this deprecation" |
949 |
- ewarn "warning." |
950 |
- fi |
951 |
- done |
952 |
- |
953 |
- elog |
954 |
- elog "Starting from version >= 197 the new predictable network interface names are" |
955 |
- elog "used by default, see:" |
956 |
- elog "https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames" |
957 |
- elog "https://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_id.c" |
958 |
- elog |
959 |
- elog "Example command to get the information for the new interface name before booting" |
960 |
- elog "(replace <ifname> with, for example, eth0):" |
961 |
- elog "# udevadm test-builtin net_id /sys/class/net/<ifname> 2> /dev/null" |
962 |
- elog |
963 |
- elog "You can use either kernel parameter \"net.ifnames=0\", create empty" |
964 |
- elog "file /etc/systemd/network/99-default.link, or symlink it to /dev/null" |
965 |
- elog "to disable the feature." |
966 |
- |
967 |
- if has_version 'sys-apps/biosdevname'; then |
968 |
- ewarn |
969 |
- ewarn "You can replace the functionality of sys-apps/biosdevname which has been" |
970 |
- ewarn "detected to be installed with the new predictable network interface names." |
971 |
- fi |
972 |
- |
973 |
- ewarn |
974 |
- ewarn "You need to restart udev as soon as possible to make the upgrade go" |
975 |
- ewarn "into effect." |
976 |
- ewarn "The method you use to do this depends on your init system." |
977 |
- if has_version 'sys-apps/openrc'; then |
978 |
- ewarn "For sys-apps/openrc users it is:" |
979 |
- ewarn "# /etc/init.d/udev --nodeps restart" |
980 |
- fi |
981 |
- |
982 |
- elog |
983 |
- elog "For more information on udev on Gentoo, upgrading, writing udev rules, and" |
984 |
- elog "fixing known issues visit:" |
985 |
- elog "https://wiki.gentoo.org/wiki/Udev" |
986 |
- elog "https://wiki.gentoo.org/wiki/Udev/upgrade" |
987 |
- |
988 |
- # If user has disabled 80-net-name-slot.rules using a empty file or a symlink to /dev/null, |
989 |
- # do the same for 80-net-setup-link.rules to keep the old behavior |
990 |
- local net_move=no |
991 |
- local net_name_slot_sym=no |
992 |
- local net_rules_path="${ROOT%/}"/etc/udev/rules.d |
993 |
- local net_name_slot="${net_rules_path}"/80-net-name-slot.rules |
994 |
- local net_setup_link="${net_rules_path}"/80-net-setup-link.rules |
995 |
- if [[ ! -e ${net_setup_link} ]]; then |
996 |
- [[ -f ${net_name_slot} && $(sed -e "/^#/d" -e "/^\W*$/d" ${net_name_slot} | wc -l) == 0 ]] && net_move=yes |
997 |
- if [[ -L ${net_name_slot} && $(readlink ${net_name_slot}) == /dev/null ]]; then |
998 |
- net_move=yes |
999 |
- net_name_slot_sym=yes |
1000 |
- fi |
1001 |
- fi |
1002 |
- if [[ ${net_move} == yes ]]; then |
1003 |
- ebegin "Copying ${net_name_slot} to ${net_setup_link}" |
1004 |
- |
1005 |
- if [[ ${net_name_slot_sym} == yes ]]; then |
1006 |
- ln -nfs /dev/null "${net_setup_link}" |
1007 |
- else |
1008 |
- cp "${net_name_slot}" "${net_setup_link}" |
1009 |
- fi |
1010 |
- eend $? |
1011 |
- fi |
1012 |
- |
1013 |
- # https://cgit.freedesktop.org/systemd/systemd/commit/rules/50-udev-default.rules?id=3dff3e00e044e2d53c76fa842b9a4759d4a50e69 |
1014 |
- # https://bugs.gentoo.org/246847 |
1015 |
- # https://bugs.gentoo.org/514174 |
1016 |
- enewgroup input |
1017 |
- |
1018 |
- # Update hwdb database in case the format is changed by udev version. |
1019 |
- if has_version 'sys-apps/hwids[udev]'; then |
1020 |
- udevadm hwdb --update --root="${ROOT%/}" |
1021 |
- # Only reload when we are not upgrading to avoid potential race w/ incompatible hwdb.bin and the running udevd |
1022 |
- # https://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda |
1023 |
- [[ -z ${REPLACING_VERSIONS} ]] && udev_reload |
1024 |
- fi |
1025 |
-} |