1 |
commit: 692cdb6521195bc92880aba1dfc3e9749c580cdb |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Jul 18 13:44:51 2017 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Jul 18 13:45:26 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=692cdb65 |
7 |
|
8 |
sys-fs/udev: remove unstable versions |
9 |
|
10 |
Package-Manager: Portage-2.3.6, Repoman-2.3.2 |
11 |
|
12 |
sys-fs/udev/Manifest | 5 - |
13 |
sys-fs/udev/udev-228.ebuild | 433 ---------------------------------------- |
14 |
sys-fs/udev/udev-229-r2.ebuild | 435 ----------------------------------------- |
15 |
sys-fs/udev/udev-230-r1.ebuild | 433 ---------------------------------------- |
16 |
sys-fs/udev/udev-232-r2.ebuild | 419 --------------------------------------- |
17 |
5 files changed, 1725 deletions(-) |
18 |
|
19 |
diff --git a/sys-fs/udev/Manifest b/sys-fs/udev/Manifest |
20 |
index 1209982a951..9afdd1670ff 100644 |
21 |
--- a/sys-fs/udev/Manifest |
22 |
+++ b/sys-fs/udev/Manifest |
23 |
@@ -1,10 +1,5 @@ |
24 |
DIST systemd-216.tar.xz 3612960 SHA256 945d3db7d840d6ffe98aa68394428e13317161ae79905397faab6671619728f3 SHA512 f4eee6664368168eafd61939f1355ac21c7eeecce6247de98ef36f40bb6a942d12c006ced4ee15f3d8f11699c194990222d5a5115b45f2aa81f2a1abafebbdd2 WHIRLPOOL 505e09b55209a4f9d8cec077970571b2e1298e8db02946a6c79df139dece9d1a08e46c86ef6c8053274abfd46c9a5ea09157f5bc9dc1f7461322c596e84ef494 |
25 |
DIST systemd-225.tar.gz 3878442 SHA256 b2f576bb3688e9315f2f49b98e141ac6f964567370e98ebd8fd7332a0a6f9701 SHA512 35b3946509c7b01660da4370d3c51ff0e6a537dadd9dbb0a039c4f7ed552fd4e02ebac6eb8a788f61f1e3ba99444238d959051dd004c174b027729a80368ac19 WHIRLPOOL 47cd3b5690dafdf3c0ef6a9767e947666b1853541f8aefd17eb5c07eee1477daf32f3b249b04327b1c56d8ec430745725383750b97755bb6cf594d354a7ffdf8 |
26 |
-DIST systemd-228.tar.gz 4034401 SHA256 dd124ff561a07e6439ed2b3713f38ca914df7747f110ce86deea17b56d245ae6 SHA512 e54f282f550854dc082a4788709905e5767b75d2057e18d749b54821f2e44e0a8d1349b1a9180036cc854ecccaf5ff86b3b1dba4d3c2ce1b1fc766930ea4c0ea WHIRLPOOL 16b28367edc29a74f5b08691839da39a02d55bf5bcdffef55bfb1a2e8065eeecbe22a2b661e2d5f161f008d05baa000aff60d662d65db380d6c3fe0c1380eea1 |
27 |
-DIST systemd-229.tar.gz 4319173 SHA256 b51b0a48d1beb388d95bd6a98d62be05490335d4bb388aefecdcb576e91e0741 SHA512 d692c0c9fc82f2fce64a5ec1caa4a0f8cf9edaeb1bdaaa1c462669db8f78b3dd6b33c87ef926ff21823582d0460f7b63aa3755792f9ae2cd6fb813ba08a35c39 WHIRLPOOL aa44f7161d80cc680226f19755579ba72c52cfe7bd671aefb09c414981f3a5a5c852f07d3449ac6f96d4ca91120cfb1464225d995b1637f1e2c108baf3c4a392 |
28 |
-DIST systemd-230.tar.gz 4288027 SHA256 46b07568142adcd017c62e6230d39eb10d219ed3b2f13ffc12d9a3a6b1c840cd SHA512 a0057c5258055a6b4000eb762ab2ec3c5329361711540f7124ba5c4b1119a1b531ad336ddef3bbe5d08218c8d7f1fd175c86d61357ac72935a932921cff28a96 WHIRLPOOL 95404535eb85d3b8c20dc13b12427a9da1f92729eb9e66a58d7e990f09fee28762be00088897bf1bf485d9a34619799ff0171a161824cc8f135ac2438e978d1e |
29 |
-DIST systemd-232.tar.gz 4529048 SHA256 1172c7c7d5d72fbded53186e7599d5272231f04cc8b72f9a0fb2c5c20dfc4880 SHA512 5dbe52f655ec2901b1bfbb1256f83ba26bc82c13097ac9a82e4fbb97886551530f9888c369592f1b410cfff40d6d127b985533a3e29cfab5b30d18739ee5dcb1 WHIRLPOOL f2a1499584c5b5c4d9e945e45ef5e0eef2e8be77acdbd7b3b29a8c8b62dc7a10c162a856df7107c19e2eb19e63bc43a33433686472ca30909237981683cbe980 |
30 |
DIST systemd-233.tar.gz 4660737 SHA256 8b3e99da3d4164b66581830a7f2436c0c8fe697b5fbdc3927bdb960646be0083 SHA512 5ad5329ea116d973cf67096f7e7ad28e9ea0905696e9451291f1d25e5064f4a9bfcfae87e912996c6a38397e9f4a148d4ccecfa9b70f7ecdf04deadb61784c8e WHIRLPOOL ce19f6a546b8f899cfa952e49d47f063fd29186be4a53391bc30ea2c487eb2c140a74ad843a1dc499bb61bba3e9ca055613852291e38b85af5d79c59409dc176 |
31 |
DIST systemd-234.tar.gz 4800186 SHA256 da3e69d10aa1c983d33833372ad4929037b411ac421fb085c8cee79ae1d80b6a SHA512 762336a7d96c6583cf71cad62efce95a0ed93cd0a0d7251f128d10dba8200c0c8df0e5a7d168179ababa5b221295a231e73b7e7ea2697cb3fb5c1b33538efa68 WHIRLPOOL 9ff9f25ce82514db969a427eee51c0483b2bcaaa611f93c1fc17c356ea25eee712217708c54101ecaafd835cd8ac988b16e8ad411b48541a32442b9a0d148f07 |
32 |
DIST udev-216-patches-2.tar.xz 1264 SHA256 18b7b8f852f11c2ac2a58458462ce686ebec48859562df99c5b9c29c95ddfa3c SHA512 1f5912f3bbc3e40a4efad9de8b1fab2b3a750f3f23c9f2e33a581658959d22cf23f9ff1b8f51597874e7bca1d0f757f37fd5550b4112160261559524eda261f4 WHIRLPOOL 8f93f982de2d1fa10f7e3c6541c559f2c881730276498b14d4d27b8577bdb340d49b2dc7a50a40e8a13fcabbbabb3dfa5f1605aa842e325d12c17e82d2dc787b |
33 |
-DIST udev-229-patches-1.tar.xz 996 SHA256 29fe3d2ebbbfed8d30237b79275865ab486ca636282bba40f499b624166e4d2d SHA512 1d6f80311049a441acc49fa88e316e83f4a22a4015e2bfc5b76b6b512ed35b431791acdb11d3bcc4a70913019bb23cfcfaeefcf38bdacace1412a9946cba1a74 WHIRLPOOL 580874fc492e84c66e8f1771d7d4da531f9358802e94b0e4bbbda21f0e08e987295553429c55adba56dcd4c333a231dc2ea2c0a2dc42ac999bb018168f200549 |
34 |
|
35 |
diff --git a/sys-fs/udev/udev-228.ebuild b/sys-fs/udev/udev-228.ebuild |
36 |
deleted file mode 100644 |
37 |
index 9a429a82d8e..00000000000 |
38 |
--- a/sys-fs/udev/udev-228.ebuild |
39 |
+++ /dev/null |
40 |
@@ -1,433 +0,0 @@ |
41 |
-# Copyright 1999-2016 Gentoo Foundation |
42 |
-# Distributed under the terms of the GNU General Public License v2 |
43 |
- |
44 |
-EAPI=5 |
45 |
- |
46 |
-inherit autotools bash-completion-r1 eutils linux-info multilib multilib-minimal toolchain-funcs udev user versionator |
47 |
- |
48 |
-if [[ ${PV} = 9999* ]]; then |
49 |
- EGIT_REPO_URI="git://anongit.freedesktop.org/systemd/systemd" |
50 |
- inherit git-r3 |
51 |
-else |
52 |
- patchset= |
53 |
- SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> systemd-${PV}.tar.gz" |
54 |
- if [[ -n "${patchset}" ]]; then |
55 |
- SRC_URI+=" |
56 |
- https://dev.gentoo.org/~ssuominen/${P}-patches-${patchset}.tar.xz |
57 |
- https://dev.gentoo.org/~williamh/dist/${P}-patches-${patchset}.tar.xz" |
58 |
- fi |
59 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
60 |
-fi |
61 |
- |
62 |
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" |
63 |
-HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" |
64 |
- |
65 |
-LICENSE="LGPL-2.1 MIT GPL-2" |
66 |
-SLOT="0" |
67 |
-IUSE="acl +kmod selinux static-libs" |
68 |
- |
69 |
-RESTRICT="test" |
70 |
- |
71 |
-COMMON_DEPEND=">=sys-apps/util-linux-2.27.1[${MULTILIB_USEDEP}] |
72 |
- sys-libs/libcap[${MULTILIB_USEDEP}] |
73 |
- acl? ( sys-apps/acl ) |
74 |
- kmod? ( >=sys-apps/kmod-16 ) |
75 |
- selinux? ( >=sys-libs/libselinux-2.1.9 ) |
76 |
- !<sys-libs/glibc-2.11 |
77 |
- !sys-apps/gentoo-systemd-integration |
78 |
- !sys-apps/systemd |
79 |
- abi_x86_32? ( |
80 |
- !<=app-emulation/emul-linux-x86-baselibs-20130224-r7 |
81 |
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
82 |
- )" |
83 |
-# Force new make >= -r4 to skip some parallel build issues |
84 |
-DEPEND="${COMMON_DEPEND} |
85 |
- dev-util/gperf |
86 |
- >=dev-util/intltool-0.50 |
87 |
- >=sys-apps/coreutils-8.16 |
88 |
- virtual/os-headers |
89 |
- virtual/pkgconfig |
90 |
- >=sys-devel/make-3.82-r4 |
91 |
- >=sys-kernel/linux-headers-3.9 |
92 |
- app-text/docbook-xml-dtd:4.2 |
93 |
- app-text/docbook-xml-dtd:4.5 |
94 |
- app-text/docbook-xsl-stylesheets |
95 |
- dev-libs/libxslt" |
96 |
-RDEPEND="${COMMON_DEPEND} |
97 |
- !<sys-fs/lvm2-2.02.103 |
98 |
- !<sec-policy/selinux-base-2.20120725-r10" |
99 |
-PDEPEND=">=sys-apps/hwids-20140304[udev] |
100 |
- >=sys-fs/udev-init-scripts-26" |
101 |
- |
102 |
-S=${WORKDIR}/systemd-${PV} |
103 |
- |
104 |
-check_default_rules() { |
105 |
- # Make sure there are no sudden changes to upstream rules file |
106 |
- # (more for my own needs than anything else ...) |
107 |
- local udev_rules_md5=b8ad860dccae0ca51656b33c405ea2ca |
108 |
- MD5=$(md5sum < "${S}"/rules/50-udev-default.rules) |
109 |
- MD5=${MD5/ -/} |
110 |
- if [[ ${MD5} != ${udev_rules_md5} ]]; then |
111 |
- eerror "50-udev-default.rules has been updated, please validate!" |
112 |
- eerror "md5sum: ${MD5}" |
113 |
- die "50-udev-default.rules has been updated, please validate!" |
114 |
- fi |
115 |
-} |
116 |
- |
117 |
-pkg_setup() { |
118 |
- if [[ ${MERGE_TYPE} != buildonly ]]; then |
119 |
- CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET ~!FW_LOADER_USER_HELPER ~UNIX" |
120 |
- linux-info_pkg_setup |
121 |
- |
122 |
- # CONFIG_FHANDLE was introduced by 2.6.39 |
123 |
- local MINKV=2.6.39 |
124 |
- |
125 |
- if kernel_is -lt ${MINKV//./ }; then |
126 |
- eerror "Your running kernel is too old to run this version of ${P}" |
127 |
- eerror "You need to upgrade kernel at least to ${MINKV}" |
128 |
- fi |
129 |
- |
130 |
- if kernel_is -lt 3 7; then |
131 |
- ewarn "Your running kernel is too old to have firmware loader and" |
132 |
- ewarn "this version of ${P} doesn't have userspace firmware loader" |
133 |
- ewarn "If you need firmware support, you need to upgrade kernel at least to 3.7" |
134 |
- fi |
135 |
- fi |
136 |
-} |
137 |
- |
138 |
-src_prepare() { |
139 |
- if ! [[ ${PV} = 9999* ]]; then |
140 |
- # secure_getenv() disable for non-glibc systems wrt bug #443030 |
141 |
- if ! [[ $(grep -r secure_getenv * | wc -l) -eq 25 ]]; then |
142 |
- eerror "The line count for secure_getenv() failed, see bug #443030" |
143 |
- die |
144 |
- fi |
145 |
- fi |
146 |
- |
147 |
- # backport some patches |
148 |
- if [[ -n "${patchset}" ]]; then |
149 |
- EPATCH_SUFFIX=patch EPATCH_FORCE=yes epatch |
150 |
- fi |
151 |
- |
152 |
- cat <<-EOF > "${T}"/40-gentoo.rules |
153 |
- # Gentoo specific floppy and usb groups |
154 |
- SUBSYSTEM=="block", KERNEL=="fd[0-9]", GROUP="floppy" |
155 |
- SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb" |
156 |
- EOF |
157 |
- |
158 |
- # change rules back to group uucp instead of dialout for now wrt #454556 |
159 |
- sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die |
160 |
- |
161 |
- # stub out the am_path_libcrypt function |
162 |
- echo 'AC_DEFUN([AM_PATH_LIBGCRYPT],[:])' > m4/gcrypt.m4 |
163 |
- |
164 |
- # apply user patches |
165 |
- epatch_user |
166 |
- |
167 |
- eautoreconf |
168 |
- |
169 |
- if ! [[ ${PV} = 9999* ]]; then |
170 |
- check_default_rules |
171 |
- fi |
172 |
- |
173 |
- # Restore possibility of running --enable-static wrt #472608 |
174 |
- sed -i \ |
175 |
- -e '/--enable-static is not supported by systemd/s:as_fn_error:echo:' \ |
176 |
- configure || die |
177 |
- |
178 |
- if ! use elibc_glibc; then #443030 |
179 |
- echo '#define secure_getenv(x) NULL' >> config.h.in |
180 |
- sed -i -e '/error.*secure_getenv/s:.*:#define secure_getenv(x) NULL:' src/shared/missing.h || die |
181 |
- fi |
182 |
-} |
183 |
- |
184 |
-src_configure() { |
185 |
- # Prevent conflicts with i686 cross toolchain, bug 559726 |
186 |
- tc-export AR CC NM OBJCOPY RANLIB |
187 |
- multilib-minimal_src_configure |
188 |
-} |
189 |
- |
190 |
-multilib_src_configure() { |
191 |
- tc-export CC #463846 |
192 |
- export cc_cv_CFLAGS__flto=no #502950 |
193 |
- export cc_cv_CFLAGS__Werror_shadow=no #554454 |
194 |
- |
195 |
- # Keep sorted by ./configure --help and only pass --disable flags |
196 |
- # when *required* to avoid external deps or unnecessary compile |
197 |
- local econf_args |
198 |
- econf_args=( |
199 |
- --libdir=/usr/$(get_libdir) |
200 |
- --docdir=/usr/share/doc/${PF} |
201 |
- $(multilib_native_use_enable static-libs static) |
202 |
- --disable-nls |
203 |
- --disable-dbus |
204 |
- $(multilib_native_use_enable kmod) |
205 |
- --disable-xkbcommon |
206 |
- --disable-seccomp |
207 |
- $(multilib_native_use_enable selinux) |
208 |
- --disable-xz |
209 |
- --disable-lz4 |
210 |
- --disable-pam |
211 |
- $(multilib_native_use_enable acl) |
212 |
- --disable-gcrypt |
213 |
- --disable-audit |
214 |
- --disable-libcryptsetup |
215 |
- --disable-qrencode |
216 |
- --disable-microhttpd |
217 |
- --disable-gnuefi |
218 |
- --disable-gnutls |
219 |
- --disable-libcurl |
220 |
- --disable-libidn |
221 |
- --disable-quotacheck |
222 |
- --disable-logind |
223 |
- --disable-polkit |
224 |
- --disable-myhostname |
225 |
- $(multilib_is_native_abi || echo "--disable-manpages") |
226 |
- --enable-split-usr |
227 |
- --without-python |
228 |
- --with-bashcompletiondir="$(get_bashcompdir)" |
229 |
- --with-rootprefix= |
230 |
- $(multilib_is_native_abi && echo "--with-rootlibdir=/$(get_libdir)") |
231 |
- --disable-elfutils |
232 |
- ) |
233 |
- |
234 |
- if ! multilib_is_native_abi; then |
235 |
- econf_args+=( |
236 |
- MOUNT_{CFLAGS,LIBS}=' ' |
237 |
- ) |
238 |
- fi |
239 |
- |
240 |
- ECONF_SOURCE=${S} econf "${econf_args[@]}" |
241 |
-} |
242 |
- |
243 |
-multilib_src_compile() { |
244 |
- echo 'BUILT_SOURCES: $(BUILT_SOURCES)' > "${T}"/Makefile.extra |
245 |
- emake -f Makefile -f "${T}"/Makefile.extra BUILT_SOURCES |
246 |
- |
247 |
- # Most of the parallel build problems were solved by >=sys-devel/make-3.82-r4, |
248 |
- # but not everything -- separate building of the binaries as a workaround, |
249 |
- # which will force internal libraries required for the helpers to be built |
250 |
- # early enough, like eg. libsystemd-shared.la |
251 |
- if multilib_is_native_abi; then |
252 |
- local lib_targets=( libudev.la ) |
253 |
- emake "${lib_targets[@]}" |
254 |
- |
255 |
- local exec_targets=( |
256 |
- systemd-udevd |
257 |
- udevadm |
258 |
- ) |
259 |
- emake "${exec_targets[@]}" |
260 |
- |
261 |
- local helper_targets=( |
262 |
- ata_id |
263 |
- cdrom_id |
264 |
- collect |
265 |
- scsi_id |
266 |
- v4l_id |
267 |
- mtd_probe |
268 |
- ) |
269 |
- emake "${helper_targets[@]}" |
270 |
- |
271 |
- local man_targets=( |
272 |
- man/udev.conf.5 |
273 |
- man/systemd.link.5 |
274 |
- man/udev.7 |
275 |
- man/systemd-udevd.service.8 |
276 |
- man/udevadm.8 |
277 |
- ) |
278 |
- emake "${man_targets[@]}" |
279 |
- else |
280 |
- local lib_targets=( libudev.la ) |
281 |
- emake "${lib_targets[@]}" |
282 |
- fi |
283 |
-} |
284 |
- |
285 |
-multilib_src_install() { |
286 |
- if multilib_is_native_abi; then |
287 |
- local lib_LTLIBRARIES="libudev.la" \ |
288 |
- pkgconfiglib_DATA="src/libudev/libudev.pc" |
289 |
- |
290 |
- local targets=( |
291 |
- install-libLTLIBRARIES |
292 |
- install-includeHEADERS |
293 |
- install-rootbinPROGRAMS |
294 |
- install-rootlibexecPROGRAMS |
295 |
- install-udevlibexecPROGRAMS |
296 |
- install-dist_udevconfDATA |
297 |
- install-dist_udevrulesDATA |
298 |
- install-pkgconfiglibDATA |
299 |
- install-pkgconfigdataDATA |
300 |
- install-dist_docDATA |
301 |
- libudev-install-hook |
302 |
- install-directories-hook |
303 |
- install-dist_bashcompletionDATA |
304 |
- install-dist_networkDATA |
305 |
- ) |
306 |
- |
307 |
- # add final values of variables: |
308 |
- targets+=( |
309 |
- rootlibexec_PROGRAMS=systemd-udevd |
310 |
- rootbin_PROGRAMS=udevadm |
311 |
- lib_LTLIBRARIES="${lib_LTLIBRARIES}" |
312 |
- pkgconfiglib_DATA="${pkgconfiglib_DATA}" |
313 |
- pkgconfigdata_DATA="src/udev/udev.pc" |
314 |
- INSTALL_DIRS='$(sysconfdir)/udev/rules.d \ |
315 |
- $(sysconfdir)/udev/hwdb.d \ |
316 |
- $(sysconfdir)/systemd/network' |
317 |
- dist_bashcompletion_DATA="shell-completion/bash/udevadm" |
318 |
- dist_network_DATA="network/99-default.link" |
319 |
- ) |
320 |
- emake -j1 DESTDIR="${D}" "${targets[@]}" |
321 |
- doman man/{udev.conf.5,systemd.link.5,udev.7,systemd-udevd.service.8,udevadm.8} |
322 |
- else |
323 |
- local lib_LTLIBRARIES="libudev.la" \ |
324 |
- pkgconfiglib_DATA="src/libudev/libudev.pc" \ |
325 |
- include_HEADERS="src/libudev/libudev.h" |
326 |
- |
327 |
- local targets=( |
328 |
- install-libLTLIBRARIES |
329 |
- install-includeHEADERS |
330 |
- install-pkgconfiglibDATA |
331 |
- ) |
332 |
- |
333 |
- targets+=( |
334 |
- lib_LTLIBRARIES="${lib_LTLIBRARIES}" |
335 |
- pkgconfiglib_DATA="${pkgconfiglib_DATA}" |
336 |
- include_HEADERS="${include_HEADERS}" |
337 |
- ) |
338 |
- emake -j1 DESTDIR="${D}" "${targets[@]}" |
339 |
- fi |
340 |
-} |
341 |
- |
342 |
-multilib_src_install_all() { |
343 |
- dodoc TODO |
344 |
- |
345 |
- prune_libtool_files --all |
346 |
- rm -f \ |
347 |
- "${D}"/lib/udev/rules.d/99-systemd.rules \ |
348 |
- "${D}"/usr/share/doc/${PF}/{LICENSE.*,GVARIANT-SERIALIZATION,DIFFERENCES,PORTING-DBUS1,sd-shutdown.h} |
349 |
- |
350 |
- # see src_prepare() for content of 40-gentoo.rules |
351 |
- insinto /lib/udev/rules.d |
352 |
- doins "${T}"/40-gentoo.rules |
353 |
- |
354 |
- # maintainer note: by not letting the upstream build-sys create the .so |
355 |
- # link, you also avoid a parallel make problem |
356 |
- mv "${D}"/usr/share/man/man8/systemd-udevd{.service,}.8 |
357 |
-} |
358 |
- |
359 |
-pkg_postinst() { |
360 |
- mkdir -p "${ROOT%/}"/run |
361 |
- |
362 |
- # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766 |
363 |
- # So try to remove it here (will only work if empty). |
364 |
- rmdir "${ROOT%/}"/dev/loop 2>/dev/null |
365 |
- if [[ -d ${ROOT%/}/dev/loop ]]; then |
366 |
- ewarn "Please make sure your remove /dev/loop," |
367 |
- ewarn "else losetup may be confused when looking for unused devices." |
368 |
- fi |
369 |
- |
370 |
- local fstab="${ROOT%/}"/etc/fstab dev path fstype rest |
371 |
- while read -r dev path fstype rest; do |
372 |
- if [[ ${path} == /dev && ${fstype} != devtmpfs ]]; then |
373 |
- ewarn "You need to edit your /dev line in ${fstab} to have devtmpfs" |
374 |
- ewarn "filesystem. Otherwise udev won't be able to boot." |
375 |
- ewarn "See, https://bugs.gentoo.org/453186" |
376 |
- fi |
377 |
- done < "${fstab}" |
378 |
- |
379 |
- if [[ -d ${ROOT%/}/usr/lib/udev ]]; then |
380 |
- ewarn |
381 |
- ewarn "Please re-emerge all packages on your system which install" |
382 |
- ewarn "rules and helpers in /usr/lib/udev. They should now be in" |
383 |
- ewarn "/lib/udev." |
384 |
- ewarn |
385 |
- ewarn "One way to do this is to run the following command:" |
386 |
- ewarn "emerge -av1 \$(qfile -q -S -C /usr/lib/udev)" |
387 |
- ewarn "Note that qfile can be found in app-portage/portage-utils" |
388 |
- fi |
389 |
- |
390 |
- local old_cd_rules="${ROOT%/}"/etc/udev/rules.d/70-persistent-cd.rules |
391 |
- local old_net_rules="${ROOT%/}"/etc/udev/rules.d/70-persistent-net.rules |
392 |
- for old_rules in "${old_cd_rules}" "${old_net_rules}"; do |
393 |
- if [[ -f ${old_rules} ]]; then |
394 |
- ewarn |
395 |
- ewarn "File ${old_rules} is from old udev installation but if you still use it," |
396 |
- ewarn "rename it to something else starting with 70- to silence this deprecation" |
397 |
- ewarn "warning." |
398 |
- fi |
399 |
- done |
400 |
- |
401 |
- elog |
402 |
- elog "Starting from version >= 197 the new predictable network interface names are" |
403 |
- elog "used by default, see:" |
404 |
- elog "https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames" |
405 |
- elog "https://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_id.c" |
406 |
- elog |
407 |
- elog "Example command to get the information for the new interface name before booting" |
408 |
- elog "(replace <ifname> with, for example, eth0):" |
409 |
- elog "# udevadm test-builtin net_id /sys/class/net/<ifname> 2> /dev/null" |
410 |
- elog |
411 |
- elog "You can use either kernel parameter \"net.ifnames=0\", create empty" |
412 |
- elog "file /etc/systemd/network/99-default.link, or symlink it to /dev/null" |
413 |
- elog "to disable the feature." |
414 |
- |
415 |
- if has_version 'sys-apps/biosdevname'; then |
416 |
- ewarn |
417 |
- ewarn "You can replace the functionality of sys-apps/biosdevname which has been" |
418 |
- ewarn "detected to be installed with the new predictable network interface names." |
419 |
- fi |
420 |
- |
421 |
- ewarn |
422 |
- ewarn "You need to restart udev as soon as possible to make the upgrade go" |
423 |
- ewarn "into effect." |
424 |
- ewarn "The method you use to do this depends on your init system." |
425 |
- if has_version 'sys-apps/openrc'; then |
426 |
- ewarn "For sys-apps/openrc users it is:" |
427 |
- ewarn "# /etc/init.d/udev --nodeps restart" |
428 |
- fi |
429 |
- |
430 |
- elog |
431 |
- elog "For more information on udev on Gentoo, upgrading, writing udev rules, and" |
432 |
- elog "fixing known issues visit:" |
433 |
- elog "https://wiki.gentoo.org/wiki/Udev" |
434 |
- elog "https://wiki.gentoo.org/wiki/Udev/upgrade" |
435 |
- |
436 |
- # If user has disabled 80-net-name-slot.rules using a empty file or a symlink to /dev/null, |
437 |
- # do the same for 80-net-setup-link.rules to keep the old behavior |
438 |
- local net_move=no |
439 |
- local net_name_slot_sym=no |
440 |
- local net_rules_path="${ROOT%/}"/etc/udev/rules.d |
441 |
- local net_name_slot="${net_rules_path}"/80-net-name-slot.rules |
442 |
- local net_setup_link="${net_rules_path}"/80-net-setup-link.rules |
443 |
- if [[ ! -e ${net_setup_link} ]]; then |
444 |
- [[ -f ${net_name_slot} && $(sed -e "/^#/d" -e "/^\W*$/d" ${net_name_slot} | wc -l) == 0 ]] && net_move=yes |
445 |
- if [[ -L ${net_name_slot} && $(readlink ${net_name_slot}) == /dev/null ]]; then |
446 |
- net_move=yes |
447 |
- net_name_slot_sym=yes |
448 |
- fi |
449 |
- fi |
450 |
- if [[ ${net_move} == yes ]]; then |
451 |
- ebegin "Copying ${net_name_slot} to ${net_setup_link}" |
452 |
- |
453 |
- if [[ ${net_name_slot_sym} == yes ]]; then |
454 |
- ln -nfs /dev/null "${net_setup_link}" |
455 |
- else |
456 |
- cp "${net_name_slot}" "${net_setup_link}" |
457 |
- fi |
458 |
- eend $? |
459 |
- fi |
460 |
- |
461 |
- # https://cgit.freedesktop.org/systemd/systemd/commit/rules/50-udev-default.rules?id=3dff3e00e044e2d53c76fa842b9a4759d4a50e69 |
462 |
- # https://bugs.gentoo.org/246847 |
463 |
- # https://bugs.gentoo.org/514174 |
464 |
- enewgroup input |
465 |
- |
466 |
- # Update hwdb database in case the format is changed by udev version. |
467 |
- if has_version 'sys-apps/hwids[udev]'; then |
468 |
- udevadm hwdb --update --root="${ROOT%/}" |
469 |
- # Only reload when we are not upgrading to avoid potential race w/ incompatible hwdb.bin and the running udevd |
470 |
- # https://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda |
471 |
- [[ -z ${REPLACING_VERSIONS} ]] && udev_reload |
472 |
- fi |
473 |
-} |
474 |
|
475 |
diff --git a/sys-fs/udev/udev-229-r2.ebuild b/sys-fs/udev/udev-229-r2.ebuild |
476 |
deleted file mode 100644 |
477 |
index ef177c6e375..00000000000 |
478 |
--- a/sys-fs/udev/udev-229-r2.ebuild |
479 |
+++ /dev/null |
480 |
@@ -1,435 +0,0 @@ |
481 |
-# Copyright 1999-2016 Gentoo Foundation |
482 |
-# Distributed under the terms of the GNU General Public License v2 |
483 |
- |
484 |
-EAPI=5 |
485 |
- |
486 |
-inherit autotools bash-completion-r1 eutils linux-info multilib multilib-minimal toolchain-funcs udev user versionator |
487 |
- |
488 |
-if [[ ${PV} = 9999* ]]; then |
489 |
- EGIT_REPO_URI="git://anongit.freedesktop.org/systemd/systemd" |
490 |
- inherit git-r3 |
491 |
-else |
492 |
- patchset=1 |
493 |
- SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> systemd-${PV}.tar.gz" |
494 |
- if [[ -n "${patchset}" ]]; then |
495 |
- SRC_URI+=" |
496 |
- https://dev.gentoo.org/~williamh/dist/${P}-patches-${patchset}.tar.xz |
497 |
- https://dev.gentoo.org/~ssuominen/${P}-patches-${patchset}.tar.xz" |
498 |
- fi |
499 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
500 |
-fi |
501 |
- |
502 |
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" |
503 |
-HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" |
504 |
- |
505 |
-LICENSE="LGPL-2.1 MIT GPL-2" |
506 |
-SLOT="0" |
507 |
-IUSE="acl +kmod selinux static-libs" |
508 |
- |
509 |
-RESTRICT="test" |
510 |
- |
511 |
-COMMON_DEPEND=">=sys-apps/util-linux-2.27.1[${MULTILIB_USEDEP}] |
512 |
- sys-libs/libcap[${MULTILIB_USEDEP}] |
513 |
- acl? ( sys-apps/acl ) |
514 |
- kmod? ( >=sys-apps/kmod-16 ) |
515 |
- selinux? ( >=sys-libs/libselinux-2.1.9 ) |
516 |
- !<sys-libs/glibc-2.11 |
517 |
- !sys-apps/gentoo-systemd-integration |
518 |
- !sys-apps/systemd |
519 |
- abi_x86_32? ( |
520 |
- !<=app-emulation/emul-linux-x86-baselibs-20130224-r7 |
521 |
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
522 |
- )" |
523 |
-# Force new make >= -r4 to skip some parallel build issues |
524 |
-DEPEND="${COMMON_DEPEND} |
525 |
- dev-util/gperf |
526 |
- >=dev-util/intltool-0.50 |
527 |
- >=sys-apps/coreutils-8.16 |
528 |
- virtual/os-headers |
529 |
- virtual/pkgconfig |
530 |
- >=sys-devel/make-3.82-r4 |
531 |
- >=sys-kernel/linux-headers-3.9 |
532 |
- app-text/docbook-xml-dtd:4.2 |
533 |
- app-text/docbook-xml-dtd:4.5 |
534 |
- app-text/docbook-xsl-stylesheets |
535 |
- dev-libs/libxslt" |
536 |
-RDEPEND="${COMMON_DEPEND} |
537 |
- !<sys-fs/lvm2-2.02.103 |
538 |
- !<sec-policy/selinux-base-2.20120725-r10" |
539 |
-PDEPEND=">=sys-apps/hwids-20140304[udev] |
540 |
- >=sys-fs/udev-init-scripts-26" |
541 |
- |
542 |
-S=${WORKDIR}/systemd-${PV} |
543 |
- |
544 |
-check_default_rules() { |
545 |
- # Make sure there are no sudden changes to upstream rules file |
546 |
- # (more for my own needs than anything else ...) |
547 |
- local udev_rules_md5=b8ad860dccae0ca51656b33c405ea2ca |
548 |
- MD5=$(md5sum < "${S}"/rules/50-udev-default.rules) |
549 |
- MD5=${MD5/ -/} |
550 |
- if [[ ${MD5} != ${udev_rules_md5} ]]; then |
551 |
- eerror "50-udev-default.rules has been updated, please validate!" |
552 |
- eerror "md5sum: ${MD5}" |
553 |
- die "50-udev-default.rules has been updated, please validate!" |
554 |
- fi |
555 |
-} |
556 |
- |
557 |
-pkg_setup() { |
558 |
- if [[ ${MERGE_TYPE} != buildonly ]]; then |
559 |
- CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET ~!FW_LOADER_USER_HELPER ~UNIX" |
560 |
- linux-info_pkg_setup |
561 |
- |
562 |
- # CONFIG_FHANDLE was introduced by 2.6.39 |
563 |
- local MINKV=2.6.39 |
564 |
- |
565 |
- if kernel_is -lt ${MINKV//./ }; then |
566 |
- eerror "Your running kernel is too old to run this version of ${P}" |
567 |
- eerror "You need to upgrade kernel at least to ${MINKV}" |
568 |
- fi |
569 |
- |
570 |
- if kernel_is -lt 3 7; then |
571 |
- ewarn "Your running kernel is too old to have firmware loader and" |
572 |
- ewarn "this version of ${P} doesn't have userspace firmware loader" |
573 |
- ewarn "If you need firmware support, you need to upgrade kernel at least to 3.7" |
574 |
- fi |
575 |
- fi |
576 |
-} |
577 |
- |
578 |
-src_prepare() { |
579 |
- if ! [[ ${PV} = 9999* ]]; then |
580 |
- # secure_getenv() disable for non-glibc systems wrt bug #443030 |
581 |
- if ! [[ $(grep -r secure_getenv * | wc -l) -eq 26 ]]; then |
582 |
- eerror "The line count for secure_getenv() failed, see bug #443030" |
583 |
- die |
584 |
- fi |
585 |
- fi |
586 |
- |
587 |
- # backport some patches |
588 |
- if [[ -n "${patchset}" ]]; then |
589 |
- EPATCH_SUFFIX=patch EPATCH_FORCE=yes epatch |
590 |
- fi |
591 |
- epatch "${FILESDIR}"/${PN}-229-sysmacros.patch #580200 |
592 |
- |
593 |
- cat <<-EOF > "${T}"/40-gentoo.rules |
594 |
- # Gentoo specific floppy and usb groups |
595 |
- ACTION=="add", SUBSYSTEM=="block", KERNEL=="fd[0-9]", GROUP="floppy" |
596 |
- ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb" |
597 |
- EOF |
598 |
- |
599 |
- # change rules back to group uucp instead of dialout for now wrt #454556 |
600 |
- sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die |
601 |
- |
602 |
- # stub out the am_path_libcrypt function |
603 |
- echo 'AC_DEFUN([AM_PATH_LIBGCRYPT],[:])' > m4/gcrypt.m4 |
604 |
- |
605 |
- # apply user patches |
606 |
- epatch_user |
607 |
- |
608 |
- eautoreconf |
609 |
- |
610 |
- if ! [[ ${PV} = 9999* ]]; then |
611 |
- check_default_rules |
612 |
- fi |
613 |
- |
614 |
- # Restore possibility of running --enable-static wrt #472608 |
615 |
- sed -i \ |
616 |
- -e '/--enable-static is not supported by systemd/s:as_fn_error:echo:' \ |
617 |
- configure || die |
618 |
- |
619 |
- if ! use elibc_glibc; then #443030 |
620 |
- echo '#define secure_getenv(x) NULL' >> config.h.in |
621 |
- sed -i -e '/error.*secure_getenv/s:.*:#define secure_getenv(x) NULL:' src/shared/missing.h || die |
622 |
- fi |
623 |
-} |
624 |
- |
625 |
-src_configure() { |
626 |
- # Prevent conflicts with i686 cross toolchain, bug 559726 |
627 |
- tc-export AR CC NM OBJCOPY RANLIB |
628 |
- multilib-minimal_src_configure |
629 |
-} |
630 |
- |
631 |
-multilib_src_configure() { |
632 |
- tc-export CC #463846 |
633 |
- export cc_cv_CFLAGS__flto=no #502950 |
634 |
- export cc_cv_CFLAGS__Werror_shadow=no #554454 |
635 |
- export cc_cv_LDFLAGS__Wl__fuse_ld_gold=no #573874 |
636 |
- |
637 |
- # Keep sorted by ./configure --help and only pass --disable flags |
638 |
- # when *required* to avoid external deps or unnecessary compile |
639 |
- local econf_args |
640 |
- econf_args=( |
641 |
- --libdir=/usr/$(get_libdir) |
642 |
- --docdir=/usr/share/doc/${PF} |
643 |
- $(multilib_native_use_enable static-libs static) |
644 |
- --disable-nls |
645 |
- --disable-dbus |
646 |
- $(multilib_native_use_enable kmod) |
647 |
- --disable-xkbcommon |
648 |
- --disable-seccomp |
649 |
- $(multilib_native_use_enable selinux) |
650 |
- --disable-xz |
651 |
- --disable-lz4 |
652 |
- --disable-pam |
653 |
- $(multilib_native_use_enable acl) |
654 |
- --disable-gcrypt |
655 |
- --disable-audit |
656 |
- --disable-libcryptsetup |
657 |
- --disable-qrencode |
658 |
- --disable-microhttpd |
659 |
- --disable-gnuefi |
660 |
- --disable-gnutls |
661 |
- --disable-libcurl |
662 |
- --disable-libidn |
663 |
- --disable-quotacheck |
664 |
- --disable-logind |
665 |
- --disable-polkit |
666 |
- --disable-myhostname |
667 |
- $(multilib_is_native_abi || echo "--disable-manpages") |
668 |
- --enable-split-usr |
669 |
- --without-python |
670 |
- --with-bashcompletiondir="$(get_bashcompdir)" |
671 |
- --with-rootprefix= |
672 |
- $(multilib_is_native_abi && echo "--with-rootlibdir=/$(get_libdir)") |
673 |
- --disable-elfutils |
674 |
- ) |
675 |
- |
676 |
- if ! multilib_is_native_abi; then |
677 |
- econf_args+=( |
678 |
- MOUNT_{CFLAGS,LIBS}=' ' |
679 |
- ) |
680 |
- fi |
681 |
- |
682 |
- ECONF_SOURCE=${S} econf "${econf_args[@]}" |
683 |
-} |
684 |
- |
685 |
-multilib_src_compile() { |
686 |
- echo 'BUILT_SOURCES: $(BUILT_SOURCES)' > "${T}"/Makefile.extra |
687 |
- emake -f Makefile -f "${T}"/Makefile.extra BUILT_SOURCES |
688 |
- |
689 |
- # Most of the parallel build problems were solved by >=sys-devel/make-3.82-r4, |
690 |
- # but not everything -- separate building of the binaries as a workaround, |
691 |
- # which will force internal libraries required for the helpers to be built |
692 |
- # early enough, like eg. libsystemd-shared.la |
693 |
- if multilib_is_native_abi; then |
694 |
- local lib_targets=( libudev.la ) |
695 |
- emake "${lib_targets[@]}" |
696 |
- |
697 |
- local exec_targets=( |
698 |
- systemd-udevd |
699 |
- udevadm |
700 |
- ) |
701 |
- emake "${exec_targets[@]}" |
702 |
- |
703 |
- local helper_targets=( |
704 |
- ata_id |
705 |
- cdrom_id |
706 |
- collect |
707 |
- scsi_id |
708 |
- v4l_id |
709 |
- mtd_probe |
710 |
- ) |
711 |
- emake "${helper_targets[@]}" |
712 |
- |
713 |
- local man_targets=( |
714 |
- man/udev.conf.5 |
715 |
- man/systemd.link.5 |
716 |
- man/udev.7 |
717 |
- man/systemd-udevd.service.8 |
718 |
- man/udevadm.8 |
719 |
- ) |
720 |
- emake "${man_targets[@]}" |
721 |
- else |
722 |
- local lib_targets=( libudev.la ) |
723 |
- emake "${lib_targets[@]}" |
724 |
- fi |
725 |
-} |
726 |
- |
727 |
-multilib_src_install() { |
728 |
- if multilib_is_native_abi; then |
729 |
- local lib_LTLIBRARIES="libudev.la" \ |
730 |
- pkgconfiglib_DATA="src/libudev/libudev.pc" |
731 |
- |
732 |
- local targets=( |
733 |
- install-libLTLIBRARIES |
734 |
- install-includeHEADERS |
735 |
- install-rootbinPROGRAMS |
736 |
- install-rootlibexecPROGRAMS |
737 |
- install-udevlibexecPROGRAMS |
738 |
- install-dist_udevconfDATA |
739 |
- install-dist_udevrulesDATA |
740 |
- install-pkgconfiglibDATA |
741 |
- install-pkgconfigdataDATA |
742 |
- install-dist_docDATA |
743 |
- libudev-install-hook |
744 |
- install-directories-hook |
745 |
- install-dist_bashcompletionDATA |
746 |
- install-dist_networkDATA |
747 |
- ) |
748 |
- |
749 |
- # add final values of variables: |
750 |
- targets+=( |
751 |
- rootlibexec_PROGRAMS=systemd-udevd |
752 |
- rootbin_PROGRAMS=udevadm |
753 |
- lib_LTLIBRARIES="${lib_LTLIBRARIES}" |
754 |
- pkgconfiglib_DATA="${pkgconfiglib_DATA}" |
755 |
- pkgconfigdata_DATA="src/udev/udev.pc" |
756 |
- INSTALL_DIRS='$(sysconfdir)/udev/rules.d \ |
757 |
- $(sysconfdir)/udev/hwdb.d \ |
758 |
- $(sysconfdir)/systemd/network' |
759 |
- dist_bashcompletion_DATA="shell-completion/bash/udevadm" |
760 |
- dist_network_DATA="network/99-default.link" |
761 |
- ) |
762 |
- emake -j1 DESTDIR="${D}" "${targets[@]}" |
763 |
- doman man/{udev.conf.5,systemd.link.5,udev.7,systemd-udevd.service.8,udevadm.8} |
764 |
- else |
765 |
- local lib_LTLIBRARIES="libudev.la" \ |
766 |
- pkgconfiglib_DATA="src/libudev/libudev.pc" \ |
767 |
- include_HEADERS="src/libudev/libudev.h" |
768 |
- |
769 |
- local targets=( |
770 |
- install-libLTLIBRARIES |
771 |
- install-includeHEADERS |
772 |
- install-pkgconfiglibDATA |
773 |
- ) |
774 |
- |
775 |
- targets+=( |
776 |
- lib_LTLIBRARIES="${lib_LTLIBRARIES}" |
777 |
- pkgconfiglib_DATA="${pkgconfiglib_DATA}" |
778 |
- include_HEADERS="${include_HEADERS}" |
779 |
- ) |
780 |
- emake -j1 DESTDIR="${D}" "${targets[@]}" |
781 |
- fi |
782 |
-} |
783 |
- |
784 |
-multilib_src_install_all() { |
785 |
- dodoc TODO |
786 |
- |
787 |
- prune_libtool_files --all |
788 |
- rm -f \ |
789 |
- "${D}"/lib/udev/rules.d/99-systemd.rules \ |
790 |
- "${D}"/usr/share/doc/${PF}/{LICENSE.*,GVARIANT-SERIALIZATION,DIFFERENCES,PORTING-DBUS1,sd-shutdown.h} |
791 |
- |
792 |
- # see src_prepare() for content of 40-gentoo.rules |
793 |
- insinto /lib/udev/rules.d |
794 |
- doins "${T}"/40-gentoo.rules |
795 |
- |
796 |
- # maintainer note: by not letting the upstream build-sys create the .so |
797 |
- # link, you also avoid a parallel make problem |
798 |
- mv "${D}"/usr/share/man/man8/systemd-udevd{.service,}.8 |
799 |
-} |
800 |
- |
801 |
-pkg_postinst() { |
802 |
- mkdir -p "${ROOT%/}"/run |
803 |
- |
804 |
- # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766 |
805 |
- # So try to remove it here (will only work if empty). |
806 |
- rmdir "${ROOT%/}"/dev/loop 2>/dev/null |
807 |
- if [[ -d ${ROOT%/}/dev/loop ]]; then |
808 |
- ewarn "Please make sure your remove /dev/loop," |
809 |
- ewarn "else losetup may be confused when looking for unused devices." |
810 |
- fi |
811 |
- |
812 |
- local fstab="${ROOT%/}"/etc/fstab dev path fstype rest |
813 |
- while read -r dev path fstype rest; do |
814 |
- if [[ ${path} == /dev && ${fstype} != devtmpfs ]]; then |
815 |
- ewarn "You need to edit your /dev line in ${fstab} to have devtmpfs" |
816 |
- ewarn "filesystem. Otherwise udev won't be able to boot." |
817 |
- ewarn "See, https://bugs.gentoo.org/453186" |
818 |
- fi |
819 |
- done < "${fstab}" |
820 |
- |
821 |
- if [[ -d ${ROOT%/}/usr/lib/udev ]]; then |
822 |
- ewarn |
823 |
- ewarn "Please re-emerge all packages on your system which install" |
824 |
- ewarn "rules and helpers in /usr/lib/udev. They should now be in" |
825 |
- ewarn "/lib/udev." |
826 |
- ewarn |
827 |
- ewarn "One way to do this is to run the following command:" |
828 |
- ewarn "emerge -av1 \$(qfile -q -S -C /usr/lib/udev)" |
829 |
- ewarn "Note that qfile can be found in app-portage/portage-utils" |
830 |
- fi |
831 |
- |
832 |
- local old_cd_rules="${ROOT%/}"/etc/udev/rules.d/70-persistent-cd.rules |
833 |
- local old_net_rules="${ROOT%/}"/etc/udev/rules.d/70-persistent-net.rules |
834 |
- for old_rules in "${old_cd_rules}" "${old_net_rules}"; do |
835 |
- if [[ -f ${old_rules} ]]; then |
836 |
- ewarn |
837 |
- ewarn "File ${old_rules} is from old udev installation but if you still use it," |
838 |
- ewarn "rename it to something else starting with 70- to silence this deprecation" |
839 |
- ewarn "warning." |
840 |
- fi |
841 |
- done |
842 |
- |
843 |
- elog |
844 |
- elog "Starting from version >= 197 the new predictable network interface names are" |
845 |
- elog "used by default, see:" |
846 |
- elog "https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames" |
847 |
- elog "https://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_id.c" |
848 |
- elog |
849 |
- elog "Example command to get the information for the new interface name before booting" |
850 |
- elog "(replace <ifname> with, for example, eth0):" |
851 |
- elog "# udevadm test-builtin net_id /sys/class/net/<ifname> 2> /dev/null" |
852 |
- elog |
853 |
- elog "You can use either kernel parameter \"net.ifnames=0\", create empty" |
854 |
- elog "file /etc/systemd/network/99-default.link, or symlink it to /dev/null" |
855 |
- elog "to disable the feature." |
856 |
- |
857 |
- if has_version 'sys-apps/biosdevname'; then |
858 |
- ewarn |
859 |
- ewarn "You can replace the functionality of sys-apps/biosdevname which has been" |
860 |
- ewarn "detected to be installed with the new predictable network interface names." |
861 |
- fi |
862 |
- |
863 |
- ewarn |
864 |
- ewarn "You need to restart udev as soon as possible to make the upgrade go" |
865 |
- ewarn "into effect." |
866 |
- ewarn "The method you use to do this depends on your init system." |
867 |
- if has_version 'sys-apps/openrc'; then |
868 |
- ewarn "For sys-apps/openrc users it is:" |
869 |
- ewarn "# /etc/init.d/udev --nodeps restart" |
870 |
- fi |
871 |
- |
872 |
- elog |
873 |
- elog "For more information on udev on Gentoo, upgrading, writing udev rules, and" |
874 |
- elog "fixing known issues visit:" |
875 |
- elog "https://wiki.gentoo.org/wiki/Udev" |
876 |
- elog "https://wiki.gentoo.org/wiki/Udev/upgrade" |
877 |
- |
878 |
- # If user has disabled 80-net-name-slot.rules using a empty file or a symlink to /dev/null, |
879 |
- # do the same for 80-net-setup-link.rules to keep the old behavior |
880 |
- local net_move=no |
881 |
- local net_name_slot_sym=no |
882 |
- local net_rules_path="${ROOT%/}"/etc/udev/rules.d |
883 |
- local net_name_slot="${net_rules_path}"/80-net-name-slot.rules |
884 |
- local net_setup_link="${net_rules_path}"/80-net-setup-link.rules |
885 |
- if [[ ! -e ${net_setup_link} ]]; then |
886 |
- [[ -f ${net_name_slot} && $(sed -e "/^#/d" -e "/^\W*$/d" ${net_name_slot} | wc -l) == 0 ]] && net_move=yes |
887 |
- if [[ -L ${net_name_slot} && $(readlink ${net_name_slot}) == /dev/null ]]; then |
888 |
- net_move=yes |
889 |
- net_name_slot_sym=yes |
890 |
- fi |
891 |
- fi |
892 |
- if [[ ${net_move} == yes ]]; then |
893 |
- ebegin "Copying ${net_name_slot} to ${net_setup_link}" |
894 |
- |
895 |
- if [[ ${net_name_slot_sym} == yes ]]; then |
896 |
- ln -nfs /dev/null "${net_setup_link}" |
897 |
- else |
898 |
- cp "${net_name_slot}" "${net_setup_link}" |
899 |
- fi |
900 |
- eend $? |
901 |
- fi |
902 |
- |
903 |
- # https://cgit.freedesktop.org/systemd/systemd/commit/rules/50-udev-default.rules?id=3dff3e00e044e2d53c76fa842b9a4759d4a50e69 |
904 |
- # https://bugs.gentoo.org/246847 |
905 |
- # https://bugs.gentoo.org/514174 |
906 |
- enewgroup input |
907 |
- |
908 |
- # Update hwdb database in case the format is changed by udev version. |
909 |
- if has_version 'sys-apps/hwids[udev]'; then |
910 |
- udevadm hwdb --update --root="${ROOT%/}" |
911 |
- # Only reload when we are not upgrading to avoid potential race w/ incompatible hwdb.bin and the running udevd |
912 |
- # https://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda |
913 |
- [[ -z ${REPLACING_VERSIONS} ]] && udev_reload |
914 |
- fi |
915 |
-} |
916 |
|
917 |
diff --git a/sys-fs/udev/udev-230-r1.ebuild b/sys-fs/udev/udev-230-r1.ebuild |
918 |
deleted file mode 100644 |
919 |
index bbedcf25973..00000000000 |
920 |
--- a/sys-fs/udev/udev-230-r1.ebuild |
921 |
+++ /dev/null |
922 |
@@ -1,433 +0,0 @@ |
923 |
-# Copyright 1999-2017 Gentoo Foundation |
924 |
-# Distributed under the terms of the GNU General Public License v2 |
925 |
- |
926 |
-EAPI=6 |
927 |
- |
928 |
-inherit autotools bash-completion-r1 linux-info multilib-minimal toolchain-funcs udev user versionator |
929 |
- |
930 |
-if [[ ${PV} = 9999* ]]; then |
931 |
- EGIT_REPO_URI="git://anongit.freedesktop.org/systemd/systemd" |
932 |
- inherit git-r3 |
933 |
-else |
934 |
- patchset= |
935 |
- SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> systemd-${PV}.tar.gz" |
936 |
- if [[ -n "${patchset}" ]]; then |
937 |
- SRC_URI+=" |
938 |
- https://dev.gentoo.org/~williamh/dist/${P}-patches-${patchset}.tar.xz |
939 |
- https://dev.gentoo.org/~ssuominen/${P}-patches-${patchset}.tar.xz" |
940 |
- fi |
941 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
942 |
-fi |
943 |
- |
944 |
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" |
945 |
-HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" |
946 |
- |
947 |
-LICENSE="LGPL-2.1 MIT GPL-2" |
948 |
-SLOT="0" |
949 |
-IUSE="acl +kmod selinux static-libs" |
950 |
- |
951 |
-RESTRICT="test" |
952 |
- |
953 |
-COMMON_DEPEND=">=sys-apps/util-linux-2.27.1[${MULTILIB_USEDEP}] |
954 |
- sys-libs/libcap[${MULTILIB_USEDEP}] |
955 |
- acl? ( sys-apps/acl ) |
956 |
- kmod? ( >=sys-apps/kmod-16 ) |
957 |
- selinux? ( >=sys-libs/libselinux-2.1.9 ) |
958 |
- !<sys-libs/glibc-2.11 |
959 |
- !sys-apps/gentoo-systemd-integration |
960 |
- !sys-apps/systemd |
961 |
- abi_x86_32? ( |
962 |
- !<=app-emulation/emul-linux-x86-baselibs-20130224-r7 |
963 |
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
964 |
- )" |
965 |
-# Force new make >= -r4 to skip some parallel build issues |
966 |
-DEPEND="${COMMON_DEPEND} |
967 |
- dev-util/gperf |
968 |
- >=dev-util/intltool-0.50 |
969 |
- >=sys-apps/coreutils-8.16 |
970 |
- virtual/os-headers |
971 |
- virtual/pkgconfig |
972 |
- >=sys-devel/make-3.82-r4 |
973 |
- >=sys-kernel/linux-headers-3.9 |
974 |
- app-text/docbook-xml-dtd:4.2 |
975 |
- app-text/docbook-xml-dtd:4.5 |
976 |
- app-text/docbook-xsl-stylesheets |
977 |
- dev-libs/libxslt" |
978 |
-RDEPEND="${COMMON_DEPEND} |
979 |
- !<sys-fs/lvm2-2.02.103 |
980 |
- !<sec-policy/selinux-base-2.20120725-r10" |
981 |
-PDEPEND=">=sys-apps/hwids-20140304[udev] |
982 |
- >=sys-fs/udev-init-scripts-26" |
983 |
- |
984 |
-S=${WORKDIR}/systemd-${PV} |
985 |
- |
986 |
-check_default_rules() { |
987 |
- # Make sure there are no sudden changes to upstream rules file |
988 |
- # (more for my own needs than anything else ...) |
989 |
- local udev_rules_md5=b8ad860dccae0ca51656b33c405ea2ca |
990 |
- MD5=$(md5sum < "${S}"/rules/50-udev-default.rules) |
991 |
- MD5=${MD5/ -/} |
992 |
- if [[ ${MD5} != ${udev_rules_md5} ]]; then |
993 |
- eerror "50-udev-default.rules has been updated, please validate!" |
994 |
- eerror "md5sum: ${MD5}" |
995 |
- die "50-udev-default.rules has been updated, please validate!" |
996 |
- fi |
997 |
-} |
998 |
- |
999 |
-pkg_setup() { |
1000 |
- if [[ ${MERGE_TYPE} != buildonly ]]; then |
1001 |
- CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET ~!FW_LOADER_USER_HELPER ~UNIX" |
1002 |
- linux-info_pkg_setup |
1003 |
- |
1004 |
- # CONFIG_FHANDLE was introduced by 2.6.39 |
1005 |
- local MINKV=2.6.39 |
1006 |
- |
1007 |
- if kernel_is -lt ${MINKV//./ }; then |
1008 |
- eerror "Your running kernel is too old to run this version of ${P}" |
1009 |
- eerror "You need to upgrade kernel at least to ${MINKV}" |
1010 |
- fi |
1011 |
- |
1012 |
- if kernel_is -lt 3 7; then |
1013 |
- ewarn "Your running kernel is too old to have firmware loader and" |
1014 |
- ewarn "this version of ${P} doesn't have userspace firmware loader" |
1015 |
- ewarn "If you need firmware support, you need to upgrade kernel at least to 3.7" |
1016 |
- fi |
1017 |
- fi |
1018 |
-} |
1019 |
- |
1020 |
-src_prepare() { |
1021 |
- if ! [[ ${PV} = 9999* ]]; then |
1022 |
- # secure_getenv() disable for non-glibc systems wrt bug #443030 |
1023 |
- if ! [[ $(grep -r secure_getenv * | wc -l) -eq 26 ]]; then |
1024 |
- eerror "The line count for secure_getenv() failed, see bug #443030" |
1025 |
- die |
1026 |
- fi |
1027 |
- fi |
1028 |
- |
1029 |
- # backport some patches |
1030 |
- if [[ -n "${patchset}" ]]; then |
1031 |
- eapply "${WORKDIR}"/patch |
1032 |
- fi |
1033 |
- |
1034 |
- cat <<-EOF > "${T}"/40-gentoo.rules |
1035 |
- # Gentoo specific floppy and usb groups |
1036 |
- ACTION=="add", SUBSYSTEM=="block", KERNEL=="fd[0-9]", GROUP="floppy" |
1037 |
- ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb" |
1038 |
- EOF |
1039 |
- |
1040 |
- # change rules back to group uucp instead of dialout for now wrt #454556 |
1041 |
- sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die |
1042 |
- |
1043 |
- # stub out the am_path_libcrypt function |
1044 |
- echo 'AC_DEFUN([AM_PATH_LIBGCRYPT],[:])' > m4/gcrypt.m4 |
1045 |
- |
1046 |
- eapply "${FILESDIR}"/232-0002-build-sys-add-check-for-gperf-lookup-function-signat.patch |
1047 |
- |
1048 |
- # apply user patches |
1049 |
- eapply_user |
1050 |
- |
1051 |
- eautoreconf |
1052 |
- |
1053 |
- if ! [[ ${PV} = 9999* ]]; then |
1054 |
- check_default_rules |
1055 |
- fi |
1056 |
- |
1057 |
- # Restore possibility of running --enable-static wrt #472608 |
1058 |
- sed -i \ |
1059 |
- -e '/--enable-static is not supported by systemd/s:as_fn_error:echo:' \ |
1060 |
- configure || die |
1061 |
- |
1062 |
- if ! use elibc_glibc; then #443030 |
1063 |
- echo '#define secure_getenv(x) NULL' >> config.h.in |
1064 |
- sed -i -e '/error.*secure_getenv/s:.*:#define secure_getenv(x) NULL:' src/shared/missing.h || die |
1065 |
- fi |
1066 |
-} |
1067 |
- |
1068 |
-src_configure() { |
1069 |
- # Prevent conflicts with i686 cross toolchain, bug 559726 |
1070 |
- tc-export AR CC NM OBJCOPY RANLIB |
1071 |
- multilib-minimal_src_configure |
1072 |
-} |
1073 |
- |
1074 |
-multilib_src_configure() { |
1075 |
- tc-export CC #463846 |
1076 |
- export cc_cv_CFLAGS__flto=no #502950 |
1077 |
- export cc_cv_CFLAGS__Werror_shadow=no #554454 |
1078 |
- export cc_cv_LDFLAGS__Wl__fuse_ld_gold=no #573874 |
1079 |
- |
1080 |
- # Keep sorted by ./configure --help and only pass --disable flags |
1081 |
- # when *required* to avoid external deps or unnecessary compile |
1082 |
- local econf_args |
1083 |
- econf_args=( |
1084 |
- --libdir=/usr/$(get_libdir) |
1085 |
- --docdir=/usr/share/doc/${PF} |
1086 |
- $(multilib_native_use_enable static-libs static) |
1087 |
- --disable-nls |
1088 |
- --disable-dbus |
1089 |
- $(multilib_native_use_enable kmod) |
1090 |
- --disable-xkbcommon |
1091 |
- --disable-seccomp |
1092 |
- $(multilib_native_use_enable selinux) |
1093 |
- --disable-xz |
1094 |
- --disable-lz4 |
1095 |
- --disable-pam |
1096 |
- $(multilib_native_use_enable acl) |
1097 |
- --disable-gcrypt |
1098 |
- --disable-audit |
1099 |
- --disable-libcryptsetup |
1100 |
- --disable-qrencode |
1101 |
- --disable-microhttpd |
1102 |
- --disable-gnuefi |
1103 |
- --disable-gnutls |
1104 |
- --disable-libcurl |
1105 |
- --disable-libidn |
1106 |
- --disable-quotacheck |
1107 |
- --disable-logind |
1108 |
- --disable-polkit |
1109 |
- --disable-myhostname |
1110 |
- $(multilib_is_native_abi || echo "--disable-manpages") |
1111 |
- --enable-split-usr |
1112 |
- --without-python |
1113 |
- --with-bashcompletiondir="$(get_bashcompdir)" |
1114 |
- --with-rootprefix= |
1115 |
- $(multilib_is_native_abi && echo "--with-rootlibdir=/$(get_libdir)") |
1116 |
- --disable-elfutils |
1117 |
- ) |
1118 |
- |
1119 |
- if ! multilib_is_native_abi; then |
1120 |
- econf_args+=( |
1121 |
- MOUNT_{CFLAGS,LIBS}=' ' |
1122 |
- ) |
1123 |
- fi |
1124 |
- |
1125 |
- ECONF_SOURCE=${S} econf "${econf_args[@]}" |
1126 |
-} |
1127 |
- |
1128 |
-multilib_src_compile() { |
1129 |
- echo 'BUILT_SOURCES: $(BUILT_SOURCES)' > "${T}"/Makefile.extra |
1130 |
- emake -f Makefile -f "${T}"/Makefile.extra BUILT_SOURCES |
1131 |
- |
1132 |
- # Most of the parallel build problems were solved by >=sys-devel/make-3.82-r4, |
1133 |
- # but not everything -- separate building of the binaries as a workaround, |
1134 |
- # which will force internal libraries required for the helpers to be built |
1135 |
- # early enough, like eg. libsystemd-shared.la |
1136 |
- if multilib_is_native_abi; then |
1137 |
- local lib_targets=( libudev.la ) |
1138 |
- emake "${lib_targets[@]}" |
1139 |
- |
1140 |
- local exec_targets=( |
1141 |
- systemd-udevd |
1142 |
- udevadm |
1143 |
- ) |
1144 |
- emake "${exec_targets[@]}" |
1145 |
- |
1146 |
- local helper_targets=( |
1147 |
- ata_id |
1148 |
- cdrom_id |
1149 |
- collect |
1150 |
- scsi_id |
1151 |
- v4l_id |
1152 |
- mtd_probe |
1153 |
- ) |
1154 |
- emake "${helper_targets[@]}" |
1155 |
- |
1156 |
- local man_targets=( |
1157 |
- man/udev.conf.5 |
1158 |
- man/systemd.link.5 |
1159 |
- man/udev.7 |
1160 |
- man/systemd-udevd.service.8 |
1161 |
- man/udevadm.8 |
1162 |
- ) |
1163 |
- emake "${man_targets[@]}" |
1164 |
- else |
1165 |
- local lib_targets=( libudev.la ) |
1166 |
- emake "${lib_targets[@]}" |
1167 |
- fi |
1168 |
-} |
1169 |
- |
1170 |
-multilib_src_install() { |
1171 |
- if multilib_is_native_abi; then |
1172 |
- local lib_LTLIBRARIES="libudev.la" |
1173 |
- local pkgconfiglib_DATA="src/libudev/libudev.pc" |
1174 |
- |
1175 |
- local targets=( |
1176 |
- install-libLTLIBRARIES |
1177 |
- install-includeHEADERS |
1178 |
- install-rootbinPROGRAMS |
1179 |
- install-rootlibexecPROGRAMS |
1180 |
- install-udevlibexecPROGRAMS |
1181 |
- install-dist_udevconfDATA |
1182 |
- install-dist_udevrulesDATA |
1183 |
- install-pkgconfiglibDATA |
1184 |
- install-pkgconfigdataDATA |
1185 |
- install-dist_docDATA |
1186 |
- libudev-install-hook |
1187 |
- install-directories-hook |
1188 |
- install-dist_bashcompletionDATA |
1189 |
- install-dist_networkDATA |
1190 |
- ) |
1191 |
- |
1192 |
- # add final values of variables: |
1193 |
- targets+=( |
1194 |
- rootlibexec_PROGRAMS=systemd-udevd |
1195 |
- rootbin_PROGRAMS=udevadm |
1196 |
- lib_LTLIBRARIES="${lib_LTLIBRARIES}" |
1197 |
- pkgconfiglib_DATA="${pkgconfiglib_DATA}" |
1198 |
- pkgconfigdata_DATA="src/udev/udev.pc" |
1199 |
- INSTALL_DIRS='$(sysconfdir)/udev/rules.d $(sysconfdir)/udev/hwdb.d $(sysconfdir)/systemd/network' |
1200 |
- dist_bashcompletion_DATA="shell-completion/bash/udevadm" |
1201 |
- dist_network_DATA="network/99-default.link" |
1202 |
- ) |
1203 |
- emake -j1 DESTDIR="${D}" "${targets[@]}" |
1204 |
- doman man/{udev.conf.5,systemd.link.5,udev.7,systemd-udevd.service.8,udevadm.8} |
1205 |
- else |
1206 |
- local lib_LTLIBRARIES="libudev.la" |
1207 |
- local pkgconfiglib_DATA="src/libudev/libudev.pc" |
1208 |
- local include_HEADERS="src/libudev/libudev.h" |
1209 |
- |
1210 |
- local targets=( |
1211 |
- install-libLTLIBRARIES |
1212 |
- install-includeHEADERS |
1213 |
- install-pkgconfiglibDATA |
1214 |
- ) |
1215 |
- |
1216 |
- targets+=( |
1217 |
- lib_LTLIBRARIES="${lib_LTLIBRARIES}" |
1218 |
- pkgconfiglib_DATA="${pkgconfiglib_DATA}" |
1219 |
- include_HEADERS="${include_HEADERS}" |
1220 |
- ) |
1221 |
- emake -j1 DESTDIR="${D}" "${targets[@]}" |
1222 |
- fi |
1223 |
-} |
1224 |
- |
1225 |
-multilib_src_install_all() { |
1226 |
- dodoc TODO |
1227 |
- |
1228 |
- prune_libtool_files --all |
1229 |
- rm -f "${D}"/lib/udev/rules.d/99-systemd.rules |
1230 |
- rm -f "${D}"/usr/share/doc/${PF}/{LICENSE.*,GVARIANT-SERIALIZATION,DIFFERENCES,PORTING-DBUS1,sd-shutdown.h} |
1231 |
- |
1232 |
- # see src_prepare() for content of 40-gentoo.rules |
1233 |
- insinto /lib/udev/rules.d |
1234 |
- doins "${T}"/40-gentoo.rules |
1235 |
- |
1236 |
- # maintainer note: by not letting the upstream build-sys create the .so |
1237 |
- # link, you also avoid a parallel make problem |
1238 |
- mv "${D}"/usr/share/man/man8/systemd-udevd{.service,}.8 |
1239 |
-} |
1240 |
- |
1241 |
-pkg_postinst() { |
1242 |
- mkdir -p "${ROOT%/}"/run |
1243 |
- |
1244 |
- # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766 |
1245 |
- # So try to remove it here (will only work if empty). |
1246 |
- rmdir "${ROOT%/}"/dev/loop 2>/dev/null |
1247 |
- if [[ -d ${ROOT%/}/dev/loop ]]; then |
1248 |
- ewarn "Please make sure your remove /dev/loop," |
1249 |
- ewarn "else losetup may be confused when looking for unused devices." |
1250 |
- fi |
1251 |
- |
1252 |
- local fstab="${ROOT%/}"/etc/fstab dev path fstype rest |
1253 |
- while read -r dev path fstype rest; do |
1254 |
- if [[ ${path} == /dev && ${fstype} != devtmpfs ]]; then |
1255 |
- ewarn "You need to edit your /dev line in ${fstab} to have devtmpfs" |
1256 |
- ewarn "filesystem. Otherwise udev won't be able to boot." |
1257 |
- ewarn "See, https://bugs.gentoo.org/453186" |
1258 |
- fi |
1259 |
- done < "${fstab}" |
1260 |
- |
1261 |
- if [[ -d ${ROOT%/}/usr/lib/udev ]]; then |
1262 |
- ewarn |
1263 |
- ewarn "Please re-emerge all packages on your system which install" |
1264 |
- ewarn "rules and helpers in /usr/lib/udev. They should now be in" |
1265 |
- ewarn "/lib/udev." |
1266 |
- ewarn |
1267 |
- ewarn "One way to do this is to run the following command:" |
1268 |
- ewarn "emerge -av1 \$(qfile -q -S -C /usr/lib/udev)" |
1269 |
- ewarn "Note that qfile can be found in app-portage/portage-utils" |
1270 |
- fi |
1271 |
- |
1272 |
- local old_cd_rules="${ROOT%/}"/etc/udev/rules.d/70-persistent-cd.rules |
1273 |
- local old_net_rules="${ROOT%/}"/etc/udev/rules.d/70-persistent-net.rules |
1274 |
- for old_rules in "${old_cd_rules}" "${old_net_rules}"; do |
1275 |
- if [[ -f ${old_rules} ]]; then |
1276 |
- ewarn |
1277 |
- ewarn "File ${old_rules} is from old udev installation but if you still use it," |
1278 |
- ewarn "rename it to something else starting with 70- to silence this deprecation" |
1279 |
- ewarn "warning." |
1280 |
- fi |
1281 |
- done |
1282 |
- |
1283 |
- elog |
1284 |
- elog "Starting from version >= 197 the new predictable network interface names are" |
1285 |
- elog "used by default, see:" |
1286 |
- elog "https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames" |
1287 |
- elog "https://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_id.c" |
1288 |
- elog |
1289 |
- elog "Example command to get the information for the new interface name before booting" |
1290 |
- elog "(replace <ifname> with, for example, eth0):" |
1291 |
- elog "# udevadm test-builtin net_id /sys/class/net/<ifname> 2> /dev/null" |
1292 |
- elog |
1293 |
- elog "You can use either kernel parameter \"net.ifnames=0\", create empty" |
1294 |
- elog "file /etc/systemd/network/99-default.link, or symlink it to /dev/null" |
1295 |
- elog "to disable the feature." |
1296 |
- |
1297 |
- if has_version 'sys-apps/biosdevname'; then |
1298 |
- ewarn |
1299 |
- ewarn "You can replace the functionality of sys-apps/biosdevname which has been" |
1300 |
- ewarn "detected to be installed with the new predictable network interface names." |
1301 |
- fi |
1302 |
- |
1303 |
- ewarn |
1304 |
- ewarn "You need to restart udev as soon as possible to make the upgrade go" |
1305 |
- ewarn "into effect." |
1306 |
- ewarn "The method you use to do this depends on your init system." |
1307 |
- if has_version 'sys-apps/openrc'; then |
1308 |
- ewarn "For sys-apps/openrc users it is:" |
1309 |
- ewarn "# /etc/init.d/udev --nodeps restart" |
1310 |
- fi |
1311 |
- |
1312 |
- elog |
1313 |
- elog "For more information on udev on Gentoo, upgrading, writing udev rules, and" |
1314 |
- elog "fixing known issues visit:" |
1315 |
- elog "https://wiki.gentoo.org/wiki/Udev" |
1316 |
- elog "https://wiki.gentoo.org/wiki/Udev/upgrade" |
1317 |
- |
1318 |
- # If user has disabled 80-net-name-slot.rules using a empty file or a symlink to /dev/null, |
1319 |
- # do the same for 80-net-setup-link.rules to keep the old behavior |
1320 |
- local net_move=no |
1321 |
- local net_name_slot_sym=no |
1322 |
- local net_rules_path="${ROOT%/}"/etc/udev/rules.d |
1323 |
- local net_name_slot="${net_rules_path}"/80-net-name-slot.rules |
1324 |
- local net_setup_link="${net_rules_path}"/80-net-setup-link.rules |
1325 |
- if [[ ! -e ${net_setup_link} ]]; then |
1326 |
- [[ -f ${net_name_slot} && $(sed -e "/^#/d" -e "/^\W*$/d" ${net_name_slot} | wc -l) == 0 ]] && net_move=yes |
1327 |
- if [[ -L ${net_name_slot} && $(readlink ${net_name_slot}) == /dev/null ]]; then |
1328 |
- net_move=yes |
1329 |
- net_name_slot_sym=yes |
1330 |
- fi |
1331 |
- fi |
1332 |
- if [[ ${net_move} == yes ]]; then |
1333 |
- ebegin "Copying ${net_name_slot} to ${net_setup_link}" |
1334 |
- |
1335 |
- if [[ ${net_name_slot_sym} == yes ]]; then |
1336 |
- ln -nfs /dev/null "${net_setup_link}" |
1337 |
- else |
1338 |
- cp "${net_name_slot}" "${net_setup_link}" |
1339 |
- fi |
1340 |
- eend $? |
1341 |
- fi |
1342 |
- |
1343 |
- # https://cgit.freedesktop.org/systemd/systemd/commit/rules/50-udev-default.rules?id=3dff3e00e044e2d53c76fa842b9a4759d4a50e69 |
1344 |
- # https://bugs.gentoo.org/246847 |
1345 |
- # https://bugs.gentoo.org/514174 |
1346 |
- enewgroup input |
1347 |
- |
1348 |
- # Update hwdb database in case the format is changed by udev version. |
1349 |
- if has_version 'sys-apps/hwids[udev]'; then |
1350 |
- udevadm hwdb --update --root="${ROOT%/}" |
1351 |
- # Only reload when we are not upgrading to avoid potential race w/ incompatible hwdb.bin and the running udevd |
1352 |
- # https://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda |
1353 |
- [[ -z ${REPLACING_VERSIONS} ]] && udev_reload |
1354 |
- fi |
1355 |
-} |
1356 |
|
1357 |
diff --git a/sys-fs/udev/udev-232-r2.ebuild b/sys-fs/udev/udev-232-r2.ebuild |
1358 |
deleted file mode 100644 |
1359 |
index f2855ffa786..00000000000 |
1360 |
--- a/sys-fs/udev/udev-232-r2.ebuild |
1361 |
+++ /dev/null |
1362 |
@@ -1,419 +0,0 @@ |
1363 |
-# Copyright 1999-2017 Gentoo Foundation |
1364 |
-# Distributed under the terms of the GNU General Public License v2 |
1365 |
- |
1366 |
-EAPI=6 |
1367 |
- |
1368 |
-inherit autotools bash-completion-r1 linux-info multilib-minimal toolchain-funcs udev user versionator |
1369 |
- |
1370 |
-if [[ ${PV} = 9999* ]]; then |
1371 |
- EGIT_REPO_URI="git://anongit.freedesktop.org/systemd/systemd" |
1372 |
- inherit git-r3 |
1373 |
-else |
1374 |
- patchset= |
1375 |
- SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> systemd-${PV}.tar.gz" |
1376 |
- if [[ -n "${patchset}" ]]; then |
1377 |
- SRC_URI+=" |
1378 |
- https://dev.gentoo.org/~williamh/dist/${P}-patches-${patchset}.tar.xz |
1379 |
- https://dev.gentoo.org/~ssuominen/${P}-patches-${patchset}.tar.xz" |
1380 |
- fi |
1381 |
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
1382 |
-fi |
1383 |
- |
1384 |
-DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" |
1385 |
-HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd" |
1386 |
- |
1387 |
-LICENSE="LGPL-2.1 MIT GPL-2" |
1388 |
-SLOT="0" |
1389 |
-IUSE="acl +kmod selinux" |
1390 |
- |
1391 |
-RESTRICT="test" |
1392 |
- |
1393 |
-COMMON_DEPEND=">=sys-apps/util-linux-2.27.1[${MULTILIB_USEDEP}] |
1394 |
- sys-libs/libcap[${MULTILIB_USEDEP}] |
1395 |
- acl? ( sys-apps/acl ) |
1396 |
- kmod? ( >=sys-apps/kmod-16 ) |
1397 |
- selinux? ( >=sys-libs/libselinux-2.1.9 ) |
1398 |
- !<sys-libs/glibc-2.11 |
1399 |
- !sys-apps/gentoo-systemd-integration |
1400 |
- !sys-apps/systemd |
1401 |
- abi_x86_32? ( |
1402 |
- !<=app-emulation/emul-linux-x86-baselibs-20130224-r7 |
1403 |
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
1404 |
- )" |
1405 |
-# Force new make >= -r4 to skip some parallel build issues |
1406 |
-DEPEND="${COMMON_DEPEND} |
1407 |
- dev-util/gperf |
1408 |
- >=dev-util/intltool-0.50 |
1409 |
- >=sys-apps/coreutils-8.16 |
1410 |
- virtual/os-headers |
1411 |
- virtual/pkgconfig |
1412 |
- >=sys-devel/make-3.82-r4 |
1413 |
- >=sys-kernel/linux-headers-3.9 |
1414 |
- app-text/docbook-xml-dtd:4.2 |
1415 |
- app-text/docbook-xml-dtd:4.5 |
1416 |
- app-text/docbook-xsl-stylesheets |
1417 |
- dev-libs/libxslt" |
1418 |
-RDEPEND="${COMMON_DEPEND} |
1419 |
- !<sys-fs/lvm2-2.02.103 |
1420 |
- !<sec-policy/selinux-base-2.20120725-r10" |
1421 |
-PDEPEND=">=sys-apps/hwids-20140304[udev] |
1422 |
- >=sys-fs/udev-init-scripts-26" |
1423 |
- |
1424 |
-S=${WORKDIR}/systemd-${PV} |
1425 |
- |
1426 |
-check_default_rules() { |
1427 |
- # Make sure there are no sudden changes to upstream rules file |
1428 |
- # (more for my own needs than anything else ...) |
1429 |
- local udev_rules_md5=b8ad860dccae0ca51656b33c405ea2ca |
1430 |
- MD5=$(md5sum < "${S}"/rules/50-udev-default.rules) |
1431 |
- MD5=${MD5/ -/} |
1432 |
- if [[ ${MD5} != ${udev_rules_md5} ]]; then |
1433 |
- eerror "50-udev-default.rules has been updated, please validate!" |
1434 |
- eerror "md5sum: ${MD5}" |
1435 |
- die "50-udev-default.rules has been updated, please validate!" |
1436 |
- fi |
1437 |
-} |
1438 |
- |
1439 |
-pkg_setup() { |
1440 |
- if [[ ${MERGE_TYPE} != buildonly ]]; then |
1441 |
- CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET ~!FW_LOADER_USER_HELPER ~UNIX" |
1442 |
- linux-info_pkg_setup |
1443 |
- |
1444 |
- # CONFIG_FHANDLE was introduced by 2.6.39 |
1445 |
- local MINKV=2.6.39 |
1446 |
- |
1447 |
- if kernel_is -lt ${MINKV//./ }; then |
1448 |
- eerror "Your running kernel is too old to run this version of ${P}" |
1449 |
- eerror "You need to upgrade kernel at least to ${MINKV}" |
1450 |
- fi |
1451 |
- |
1452 |
- if kernel_is -lt 3 7; then |
1453 |
- ewarn "Your running kernel is too old to have firmware loader and" |
1454 |
- ewarn "this version of ${P} doesn't have userspace firmware loader" |
1455 |
- ewarn "If you need firmware support, you need to upgrade kernel at least to 3.7" |
1456 |
- fi |
1457 |
- fi |
1458 |
-} |
1459 |
- |
1460 |
-src_prepare() { |
1461 |
- if ! [[ ${PV} = 9999* ]]; then |
1462 |
- # secure_getenv() disable for non-glibc systems wrt bug #443030 |
1463 |
- if ! [[ $(grep -r secure_getenv * | wc -l) -eq 28 ]]; then |
1464 |
- eerror "The line count for secure_getenv() failed, see bug #443030" |
1465 |
- die |
1466 |
- fi |
1467 |
- fi |
1468 |
- |
1469 |
- # backport some patches |
1470 |
- if [[ -n "${patchset}" ]]; then |
1471 |
- eapply "${WORKDIR}"/patch |
1472 |
- fi |
1473 |
- |
1474 |
- cat <<-EOF > "${T}"/40-gentoo.rules |
1475 |
- # Gentoo specific floppy and usb groups |
1476 |
- ACTION=="add", SUBSYSTEM=="block", KERNEL=="fd[0-9]", GROUP="floppy" |
1477 |
- ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb" |
1478 |
- EOF |
1479 |
- |
1480 |
- # change rules back to group uucp instead of dialout for now wrt #454556 |
1481 |
- sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die |
1482 |
- |
1483 |
- # stub out the am_path_libcrypt function |
1484 |
- echo 'AC_DEFUN([AM_PATH_LIBGCRYPT],[:])' > m4/gcrypt.m4 |
1485 |
- |
1486 |
- eapply "${FILESDIR}/systemd-${PV}-pkgconfig.patch" |
1487 |
- eapply "${FILESDIR}"/232-0002-build-sys-add-check-for-gperf-lookup-function-signat.patch |
1488 |
- |
1489 |
- # apply user patches |
1490 |
- eapply_user |
1491 |
- |
1492 |
- eautoreconf |
1493 |
- |
1494 |
- if ! [[ ${PV} = 9999* ]]; then |
1495 |
- check_default_rules |
1496 |
- fi |
1497 |
- |
1498 |
- if ! use elibc_glibc; then #443030 |
1499 |
- echo '#define secure_getenv(x) NULL' >> config.h.in |
1500 |
- sed -i -e '/error.*secure_getenv/s:.*:#define secure_getenv(x) NULL:' src/shared/missing.h || die |
1501 |
- fi |
1502 |
-} |
1503 |
- |
1504 |
-src_configure() { |
1505 |
- # Prevent conflicts with i686 cross toolchain, bug 559726 |
1506 |
- tc-export AR CC NM OBJCOPY RANLIB |
1507 |
- multilib-minimal_src_configure |
1508 |
-} |
1509 |
- |
1510 |
-multilib_src_configure() { |
1511 |
- tc-export CC #463846 |
1512 |
- export cc_cv_CFLAGS__flto=no #502950 |
1513 |
- export cc_cv_CFLAGS__Werror_shadow=no #554454 |
1514 |
- export cc_cv_LDFLAGS__Wl__fuse_ld_gold=no #573874 |
1515 |
- |
1516 |
- # Keep sorted by ./configure --help and only pass --disable flags |
1517 |
- # when *required* to avoid external deps or unnecessary compile |
1518 |
- local econf_args |
1519 |
- econf_args=( |
1520 |
- --libdir=/usr/$(get_libdir) |
1521 |
- --docdir=/usr/share/doc/${PF} |
1522 |
- --disable-nls |
1523 |
- --disable-dbus |
1524 |
- $(multilib_native_use_enable kmod) |
1525 |
- --disable-xkbcommon |
1526 |
- --disable-seccomp |
1527 |
- $(multilib_native_use_enable selinux) |
1528 |
- --disable-xz |
1529 |
- --disable-lz4 |
1530 |
- --disable-pam |
1531 |
- $(multilib_native_use_enable acl) |
1532 |
- --disable-gcrypt |
1533 |
- --disable-audit |
1534 |
- --disable-libcryptsetup |
1535 |
- --disable-qrencode |
1536 |
- --disable-microhttpd |
1537 |
- --disable-gnuefi |
1538 |
- --disable-gnutls |
1539 |
- --disable-libcurl |
1540 |
- --disable-libidn |
1541 |
- --disable-quotacheck |
1542 |
- --disable-logind |
1543 |
- --disable-polkit |
1544 |
- --disable-myhostname |
1545 |
- $(multilib_is_native_abi || echo "--disable-manpages") |
1546 |
- --enable-split-usr |
1547 |
- --without-python |
1548 |
- --with-bashcompletiondir="$(get_bashcompdir)" |
1549 |
- --with-rootprefix= |
1550 |
- $(multilib_is_native_abi && echo "--with-rootlibdir=/$(get_libdir)") |
1551 |
- --disable-elfutils |
1552 |
- ) |
1553 |
- |
1554 |
- if ! multilib_is_native_abi; then |
1555 |
- econf_args+=( |
1556 |
- MOUNT_{CFLAGS,LIBS}=' ' |
1557 |
- ) |
1558 |
- fi |
1559 |
- |
1560 |
- ECONF_SOURCE=${S} econf "${econf_args[@]}" |
1561 |
-} |
1562 |
- |
1563 |
-multilib_src_compile() { |
1564 |
- echo 'BUILT_SOURCES: $(BUILT_SOURCES)' > "${T}"/Makefile.extra |
1565 |
- emake -f Makefile -f "${T}"/Makefile.extra BUILT_SOURCES |
1566 |
- |
1567 |
- # Most of the parallel build problems were solved by >=sys-devel/make-3.82-r4, |
1568 |
- # but not everything -- separate building of the binaries as a workaround, |
1569 |
- # which will force internal libraries required for the helpers to be built |
1570 |
- # early enough, like eg. libsystemd-shared.la |
1571 |
- if multilib_is_native_abi; then |
1572 |
- local lib_targets=( libudev.la ) |
1573 |
- emake "${lib_targets[@]}" |
1574 |
- |
1575 |
- local exec_targets=( |
1576 |
- systemd-udevd |
1577 |
- udevadm |
1578 |
- ) |
1579 |
- emake "${exec_targets[@]}" |
1580 |
- |
1581 |
- local helper_targets=( |
1582 |
- ata_id |
1583 |
- cdrom_id |
1584 |
- collect |
1585 |
- scsi_id |
1586 |
- v4l_id |
1587 |
- mtd_probe |
1588 |
- ) |
1589 |
- emake "${helper_targets[@]}" |
1590 |
- |
1591 |
- local man_targets=( |
1592 |
- man/udev.conf.5 |
1593 |
- man/systemd.link.5 |
1594 |
- man/udev.7 |
1595 |
- man/systemd-udevd.service.8 |
1596 |
- man/udevadm.8 |
1597 |
- ) |
1598 |
- emake "${man_targets[@]}" |
1599 |
- else |
1600 |
- local lib_targets=( libudev.la ) |
1601 |
- emake "${lib_targets[@]}" |
1602 |
- fi |
1603 |
-} |
1604 |
- |
1605 |
-multilib_src_install() { |
1606 |
- if multilib_is_native_abi; then |
1607 |
- local targets=( |
1608 |
- install-includeHEADERS |
1609 |
- install-rootbinPROGRAMS |
1610 |
- install-rootlibLTLIBRARIES |
1611 |
- install-rootlibexecPROGRAMS |
1612 |
- install-udevlibexecPROGRAMS |
1613 |
- install-dist_udevconfDATA |
1614 |
- install-dist_udevrulesDATA |
1615 |
- install-pkgconfiglibDATA |
1616 |
- install-pkgconfigdataDATA |
1617 |
- install-dist_docDATA |
1618 |
- install-directories-hook |
1619 |
- install-dist_bashcompletionDATA |
1620 |
- install-dist_networkDATA |
1621 |
- rootlibexec_PROGRAMS=systemd-udevd |
1622 |
- rootbin_PROGRAMS=udevadm |
1623 |
- rootlib_LTLIBRARIES="libudev.la" |
1624 |
- pkgconfiglib_DATA="src/libudev/libudev.pc" |
1625 |
- pkgconfigdata_DATA="src/udev/udev.pc" |
1626 |
- INSTALL_DIRS='$(sysconfdir)/udev/rules.d $(sysconfdir)/udev/hwdb.d $(sysconfdir)/systemd/network' |
1627 |
- dist_bashcompletion_DATA="shell-completion/bash/udevadm" |
1628 |
- dist_network_DATA="network/99-default.link" |
1629 |
- ) |
1630 |
- emake -j1 DESTDIR="${D}" "${targets[@]}" |
1631 |
- doman man/{udev.conf.5,systemd.link.5,udev.7,systemd-udevd.service.8,udevadm.8} |
1632 |
- |
1633 |
- # Compatibility symlink for software that looks for libudev.so |
1634 |
- # without using pkg-config |
1635 |
- dosym ../../$(get_libdir)/libudev.so.1 \ |
1636 |
- /usr/$(get_libdir)/libudev.so |
1637 |
- else |
1638 |
- local targets=( |
1639 |
- install-libLTLIBRARIES |
1640 |
- install-includeHEADERS |
1641 |
- install-pkgconfiglibDATA |
1642 |
- lib_LTLIBRARIES="libudev.la" |
1643 |
- pkgconfiglib_DATA="src/libudev/libudev.pc" |
1644 |
- include_HEADERS="src/libudev/libudev.h" |
1645 |
- ) |
1646 |
- |
1647 |
- emake -j1 DESTDIR="${D}" "${targets[@]}" |
1648 |
- fi |
1649 |
-} |
1650 |
- |
1651 |
-multilib_src_install_all() { |
1652 |
- dodoc TODO |
1653 |
- |
1654 |
- prune_libtool_files --all |
1655 |
- rm -f "${D}"/lib/udev/rules.d/99-systemd.rules |
1656 |
- rm -f "${D}"/usr/share/doc/${PF}/{LICENSE.*,GVARIANT-SERIALIZATION,DIFFERENCES,PORTING-DBUS1,sd-shutdown.h} |
1657 |
- |
1658 |
- # see src_prepare() for content of 40-gentoo.rules |
1659 |
- insinto /lib/udev/rules.d |
1660 |
- doins "${T}"/40-gentoo.rules |
1661 |
- |
1662 |
- # maintainer note: by not letting the upstream build-sys create the .so |
1663 |
- # link, you also avoid a parallel make problem |
1664 |
- mv "${D}"/usr/share/man/man8/systemd-udevd{.service,}.8 |
1665 |
-} |
1666 |
- |
1667 |
-pkg_postinst() { |
1668 |
- mkdir -p "${ROOT%/}"/run |
1669 |
- |
1670 |
- # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766 |
1671 |
- # So try to remove it here (will only work if empty). |
1672 |
- rmdir "${ROOT%/}"/dev/loop 2>/dev/null |
1673 |
- if [[ -d ${ROOT%/}/dev/loop ]]; then |
1674 |
- ewarn "Please make sure your remove /dev/loop," |
1675 |
- ewarn "else losetup may be confused when looking for unused devices." |
1676 |
- fi |
1677 |
- |
1678 |
- local fstab="${ROOT%/}"/etc/fstab dev path fstype rest |
1679 |
- while read -r dev path fstype rest; do |
1680 |
- if [[ ${path} == /dev && ${fstype} != devtmpfs ]]; then |
1681 |
- ewarn "You need to edit your /dev line in ${fstab} to have devtmpfs" |
1682 |
- ewarn "filesystem. Otherwise udev won't be able to boot." |
1683 |
- ewarn "See, https://bugs.gentoo.org/453186" |
1684 |
- fi |
1685 |
- done < "${fstab}" |
1686 |
- |
1687 |
- if [[ -d ${ROOT%/}/usr/lib/udev ]]; then |
1688 |
- ewarn |
1689 |
- ewarn "Please re-emerge all packages on your system which install" |
1690 |
- ewarn "rules and helpers in /usr/lib/udev. They should now be in" |
1691 |
- ewarn "/lib/udev." |
1692 |
- ewarn |
1693 |
- ewarn "One way to do this is to run the following command:" |
1694 |
- ewarn "emerge -av1 \$(qfile -q -S -C /usr/lib/udev)" |
1695 |
- ewarn "Note that qfile can be found in app-portage/portage-utils" |
1696 |
- fi |
1697 |
- |
1698 |
- local old_cd_rules="${ROOT%/}"/etc/udev/rules.d/70-persistent-cd.rules |
1699 |
- local old_net_rules="${ROOT%/}"/etc/udev/rules.d/70-persistent-net.rules |
1700 |
- for old_rules in "${old_cd_rules}" "${old_net_rules}"; do |
1701 |
- if [[ -f ${old_rules} ]]; then |
1702 |
- ewarn |
1703 |
- ewarn "File ${old_rules} is from old udev installation but if you still use it," |
1704 |
- ewarn "rename it to something else starting with 70- to silence this deprecation" |
1705 |
- ewarn "warning." |
1706 |
- fi |
1707 |
- done |
1708 |
- |
1709 |
- elog |
1710 |
- elog "Starting from version >= 197 the new predictable network interface names are" |
1711 |
- elog "used by default, see:" |
1712 |
- elog "https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames" |
1713 |
- elog "https://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_id.c" |
1714 |
- elog |
1715 |
- elog "Example command to get the information for the new interface name before booting" |
1716 |
- elog "(replace <ifname> with, for example, eth0):" |
1717 |
- elog "# udevadm test-builtin net_id /sys/class/net/<ifname> 2> /dev/null" |
1718 |
- elog |
1719 |
- elog "You can use either kernel parameter \"net.ifnames=0\", create empty" |
1720 |
- elog "file /etc/systemd/network/99-default.link, or symlink it to /dev/null" |
1721 |
- elog "to disable the feature." |
1722 |
- |
1723 |
- if has_version 'sys-apps/biosdevname'; then |
1724 |
- ewarn |
1725 |
- ewarn "You can replace the functionality of sys-apps/biosdevname which has been" |
1726 |
- ewarn "detected to be installed with the new predictable network interface names." |
1727 |
- fi |
1728 |
- |
1729 |
- ewarn |
1730 |
- ewarn "You need to restart udev as soon as possible to make the upgrade go" |
1731 |
- ewarn "into effect." |
1732 |
- ewarn "The method you use to do this depends on your init system." |
1733 |
- if has_version 'sys-apps/openrc'; then |
1734 |
- ewarn "For sys-apps/openrc users it is:" |
1735 |
- ewarn "# /etc/init.d/udev --nodeps restart" |
1736 |
- fi |
1737 |
- |
1738 |
- elog |
1739 |
- elog "For more information on udev on Gentoo, upgrading, writing udev rules, and" |
1740 |
- elog "fixing known issues visit:" |
1741 |
- elog "https://wiki.gentoo.org/wiki/Udev" |
1742 |
- elog "https://wiki.gentoo.org/wiki/Udev/upgrade" |
1743 |
- |
1744 |
- # If user has disabled 80-net-name-slot.rules using a empty file or a symlink to /dev/null, |
1745 |
- # do the same for 80-net-setup-link.rules to keep the old behavior |
1746 |
- local net_move=no |
1747 |
- local net_name_slot_sym=no |
1748 |
- local net_rules_path="${ROOT%/}"/etc/udev/rules.d |
1749 |
- local net_name_slot="${net_rules_path}"/80-net-name-slot.rules |
1750 |
- local net_setup_link="${net_rules_path}"/80-net-setup-link.rules |
1751 |
- if [[ ! -e ${net_setup_link} ]]; then |
1752 |
- [[ -f ${net_name_slot} && $(sed -e "/^#/d" -e "/^\W*$/d" ${net_name_slot} | wc -l) == 0 ]] && net_move=yes |
1753 |
- if [[ -L ${net_name_slot} && $(readlink ${net_name_slot}) == /dev/null ]]; then |
1754 |
- net_move=yes |
1755 |
- net_name_slot_sym=yes |
1756 |
- fi |
1757 |
- fi |
1758 |
- if [[ ${net_move} == yes ]]; then |
1759 |
- ebegin "Copying ${net_name_slot} to ${net_setup_link}" |
1760 |
- |
1761 |
- if [[ ${net_name_slot_sym} == yes ]]; then |
1762 |
- ln -nfs /dev/null "${net_setup_link}" |
1763 |
- else |
1764 |
- cp "${net_name_slot}" "${net_setup_link}" |
1765 |
- fi |
1766 |
- eend $? |
1767 |
- fi |
1768 |
- |
1769 |
- # https://cgit.freedesktop.org/systemd/systemd/commit/rules/50-udev-default.rules?id=3dff3e00e044e2d53c76fa842b9a4759d4a50e69 |
1770 |
- # https://bugs.gentoo.org/246847 |
1771 |
- # https://bugs.gentoo.org/514174 |
1772 |
- enewgroup input |
1773 |
- |
1774 |
- # Update hwdb database in case the format is changed by udev version. |
1775 |
- if has_version 'sys-apps/hwids[udev]'; then |
1776 |
- udevadm hwdb --update --root="${ROOT%/}" |
1777 |
- # Only reload when we are not upgrading to avoid potential race w/ incompatible hwdb.bin and the running udevd |
1778 |
- # https://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda |
1779 |
- [[ -z ${REPLACING_VERSIONS} ]] && udev_reload |
1780 |
- fi |
1781 |
-} |