Gentoo Archives: gentoo-commits

From: William Hubbs <williamh@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/udev/
Date: Tue, 07 Mar 2017 01:33:48
Message-Id: 1488849758.edca1a26c5f8fffad364816cf1e7ded88e86bf80.williamh@gentoo
1 commit: edca1a26c5f8fffad364816cf1e7ded88e86bf80
2 Author: William Hubbs <williamh <AT> gentoo <DOT> org>
3 AuthorDate: Tue Mar 7 01:21:16 2017 +0000
4 Commit: William Hubbs <williamh <AT> gentoo <DOT> org>
5 CommitDate: Tue Mar 7 01:22:38 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=edca1a26
7
8 sys-fs/udev: version bump to 233
9
10 Package-Manager: Portage-2.3.3, Repoman-2.3.2
11
12 sys-fs/udev/Manifest | 1 +
13 sys-fs/udev/udev-233.ebuild | 416 ++++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 417 insertions(+)
15
16 diff --git a/sys-fs/udev/Manifest b/sys-fs/udev/Manifest
17 index 8e0953080ca..13164cbdeac 100644
18 --- a/sys-fs/udev/Manifest
19 +++ b/sys-fs/udev/Manifest
20 @@ -4,5 +4,6 @@ DIST systemd-228.tar.gz 4034401 SHA256 dd124ff561a07e6439ed2b3713f38ca914df7747f
21 DIST systemd-229.tar.gz 4319173 SHA256 b51b0a48d1beb388d95bd6a98d62be05490335d4bb388aefecdcb576e91e0741 SHA512 d692c0c9fc82f2fce64a5ec1caa4a0f8cf9edaeb1bdaaa1c462669db8f78b3dd6b33c87ef926ff21823582d0460f7b63aa3755792f9ae2cd6fb813ba08a35c39 WHIRLPOOL aa44f7161d80cc680226f19755579ba72c52cfe7bd671aefb09c414981f3a5a5c852f07d3449ac6f96d4ca91120cfb1464225d995b1637f1e2c108baf3c4a392
22 DIST systemd-230.tar.gz 4288027 SHA256 46b07568142adcd017c62e6230d39eb10d219ed3b2f13ffc12d9a3a6b1c840cd SHA512 a0057c5258055a6b4000eb762ab2ec3c5329361711540f7124ba5c4b1119a1b531ad336ddef3bbe5d08218c8d7f1fd175c86d61357ac72935a932921cff28a96 WHIRLPOOL 95404535eb85d3b8c20dc13b12427a9da1f92729eb9e66a58d7e990f09fee28762be00088897bf1bf485d9a34619799ff0171a161824cc8f135ac2438e978d1e
23 DIST systemd-232.tar.gz 4529048 SHA256 1172c7c7d5d72fbded53186e7599d5272231f04cc8b72f9a0fb2c5c20dfc4880 SHA512 5dbe52f655ec2901b1bfbb1256f83ba26bc82c13097ac9a82e4fbb97886551530f9888c369592f1b410cfff40d6d127b985533a3e29cfab5b30d18739ee5dcb1 WHIRLPOOL f2a1499584c5b5c4d9e945e45ef5e0eef2e8be77acdbd7b3b29a8c8b62dc7a10c162a856df7107c19e2eb19e63bc43a33433686472ca30909237981683cbe980
24 +DIST systemd-233.tar.gz 4660737 SHA256 8b3e99da3d4164b66581830a7f2436c0c8fe697b5fbdc3927bdb960646be0083 SHA512 5ad5329ea116d973cf67096f7e7ad28e9ea0905696e9451291f1d25e5064f4a9bfcfae87e912996c6a38397e9f4a148d4ccecfa9b70f7ecdf04deadb61784c8e WHIRLPOOL ce19f6a546b8f899cfa952e49d47f063fd29186be4a53391bc30ea2c487eb2c140a74ad843a1dc499bb61bba3e9ca055613852291e38b85af5d79c59409dc176
25 DIST udev-216-patches-2.tar.xz 1264 SHA256 18b7b8f852f11c2ac2a58458462ce686ebec48859562df99c5b9c29c95ddfa3c SHA512 1f5912f3bbc3e40a4efad9de8b1fab2b3a750f3f23c9f2e33a581658959d22cf23f9ff1b8f51597874e7bca1d0f757f37fd5550b4112160261559524eda261f4 WHIRLPOOL 8f93f982de2d1fa10f7e3c6541c559f2c881730276498b14d4d27b8577bdb340d49b2dc7a50a40e8a13fcabbbabb3dfa5f1605aa842e325d12c17e82d2dc787b
26 DIST udev-229-patches-1.tar.xz 996 SHA256 29fe3d2ebbbfed8d30237b79275865ab486ca636282bba40f499b624166e4d2d SHA512 1d6f80311049a441acc49fa88e316e83f4a22a4015e2bfc5b76b6b512ed35b431791acdb11d3bcc4a70913019bb23cfcfaeefcf38bdacace1412a9946cba1a74 WHIRLPOOL 580874fc492e84c66e8f1771d7d4da531f9358802e94b0e4bbbda21f0e08e987295553429c55adba56dcd4c333a231dc2ea2c0a2dc42ac999bb018168f200549
27
28 diff --git a/sys-fs/udev/udev-233.ebuild b/sys-fs/udev/udev-233.ebuild
29 new file mode 100644
30 index 00000000000..8662d86b43c
31 --- /dev/null
32 +++ b/sys-fs/udev/udev-233.ebuild
33 @@ -0,0 +1,416 @@
34 +# Copyright 1999-2017 Gentoo Foundation
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=6
38 +
39 +inherit autotools bash-completion-r1 linux-info multilib-minimal toolchain-funcs udev user versionator
40 +
41 +if [[ ${PV} = 9999* ]]; then
42 + EGIT_REPO_URI="git://anongit.freedesktop.org/systemd/systemd"
43 + inherit git-r3
44 +else
45 + patchset=
46 + SRC_URI="https://github.com/systemd/systemd/archive/v${PV}.tar.gz -> systemd-${PV}.tar.gz"
47 + if [[ -n "${patchset}" ]]; then
48 + SRC_URI+="
49 + https://dev.gentoo.org/~williamh/dist/${P}-patches-${patchset}.tar.xz
50 + https://dev.gentoo.org/~ssuominen/${P}-patches-${patchset}.tar.xz"
51 + fi
52 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
53 +fi
54 +
55 +DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
56 +HOMEPAGE="https://www.freedesktop.org/wiki/Software/systemd"
57 +
58 +LICENSE="LGPL-2.1 MIT GPL-2"
59 +SLOT="0"
60 +IUSE="acl +kmod selinux"
61 +
62 +RESTRICT="test"
63 +
64 +COMMON_DEPEND=">=sys-apps/util-linux-2.27.1[${MULTILIB_USEDEP}]
65 + sys-libs/libcap[${MULTILIB_USEDEP}]
66 + acl? ( sys-apps/acl )
67 + kmod? ( >=sys-apps/kmod-16 )
68 + selinux? ( >=sys-libs/libselinux-2.1.9 )
69 + !<sys-libs/glibc-2.11
70 + !sys-apps/gentoo-systemd-integration
71 + !sys-apps/systemd
72 + abi_x86_32? (
73 + !<=app-emulation/emul-linux-x86-baselibs-20130224-r7
74 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
75 + )"
76 +# Force new make >= -r4 to skip some parallel build issues
77 +DEPEND="${COMMON_DEPEND}
78 + dev-util/gperf
79 + >=dev-util/intltool-0.50
80 + >=sys-apps/coreutils-8.16
81 + virtual/os-headers
82 + virtual/pkgconfig
83 + >=sys-devel/make-3.82-r4
84 + >=sys-kernel/linux-headers-3.9
85 + app-text/docbook-xml-dtd:4.2
86 + app-text/docbook-xml-dtd:4.5
87 + app-text/docbook-xsl-stylesheets
88 + dev-libs/libxslt"
89 +RDEPEND="${COMMON_DEPEND}
90 + !<sys-fs/lvm2-2.02.103
91 + !<sec-policy/selinux-base-2.20120725-r10"
92 +PDEPEND=">=sys-apps/hwids-20140304[udev]
93 + >=sys-fs/udev-init-scripts-26"
94 +
95 +S=${WORKDIR}/systemd-${PV}
96 +
97 +check_default_rules() {
98 + # Make sure there are no sudden changes to upstream rules file
99 + # (more for my own needs than anything else ...)
100 + local udev_rules_md5=c6ee9def75c5c082bf083a7248991935
101 + MD5=$(md5sum < "${S}"/rules/50-udev-default.rules)
102 + MD5=${MD5/ -/}
103 + if [[ ${MD5} != ${udev_rules_md5} ]]; then
104 + eerror "50-udev-default.rules has been updated, please validate!"
105 + eerror "md5sum: ${MD5}"
106 + die "50-udev-default.rules has been updated, please validate!"
107 + fi
108 +}
109 +
110 +pkg_setup() {
111 + if [[ ${MERGE_TYPE} != buildonly ]]; then
112 + CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET ~!FW_LOADER_USER_HELPER ~UNIX"
113 + linux-info_pkg_setup
114 +
115 + # CONFIG_FHANDLE was introduced by 2.6.39
116 + local MINKV=2.6.39
117 +
118 + if kernel_is -lt ${MINKV//./ }; then
119 + eerror "Your running kernel is too old to run this version of ${P}"
120 + eerror "You need to upgrade kernel at least to ${MINKV}"
121 + fi
122 +
123 + if kernel_is -lt 3 7; then
124 + ewarn "Your running kernel is too old to have firmware loader and"
125 + ewarn "this version of ${P} doesn't have userspace firmware loader"
126 + ewarn "If you need firmware support, you need to upgrade kernel at least to 3.7"
127 + fi
128 + fi
129 +}
130 +
131 +src_prepare() {
132 + if ! [[ ${PV} = 9999* ]]; then
133 + # secure_getenv() disable for non-glibc systems wrt bug #443030
134 + if ! [[ $(grep -r secure_getenv * | wc -l) -eq 30 ]]; then
135 + eerror "The line count for secure_getenv() failed, see bug #443030"
136 + die
137 + fi
138 + fi
139 +
140 + # backport some patches
141 + if [[ -n "${patchset}" ]]; then
142 + eapply "${WORKDIR}"/patch
143 + fi
144 +
145 + cat <<-EOF > "${T}"/40-gentoo.rules
146 + # Gentoo specific floppy and usb groups
147 + ACTION=="add", SUBSYSTEM=="block", KERNEL=="fd[0-9]", GROUP="floppy"
148 + ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"
149 + EOF
150 +
151 + # change rules back to group uucp instead of dialout for now wrt #454556
152 + sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die
153 +
154 + # stub out the am_path_libcrypt function
155 + echo 'AC_DEFUN([AM_PATH_LIBGCRYPT],[:])' > m4/gcrypt.m4
156 +
157 + # apply user patches
158 + eapply_user
159 +
160 + eautoreconf
161 +
162 + if ! [[ ${PV} = 9999* ]]; then
163 + check_default_rules
164 + fi
165 +
166 + if ! use elibc_glibc; then #443030
167 + echo '#define secure_getenv(x) NULL' >> config.h.in
168 + sed -i -e '/error.*secure_getenv/s:.*:#define secure_getenv(x) NULL:' src/shared/missing.h || die
169 + fi
170 +}
171 +
172 +src_configure() {
173 + # Prevent conflicts with i686 cross toolchain, bug 559726
174 + tc-export AR CC NM OBJCOPY RANLIB
175 + multilib-minimal_src_configure
176 +}
177 +
178 +multilib_src_configure() {
179 + tc-export CC #463846
180 + export cc_cv_CFLAGS__flto=no #502950
181 + export cc_cv_CFLAGS__Werror_shadow=no #554454
182 + export cc_cv_LDFLAGS__Wl__fuse_ld_gold=no #573874
183 +
184 + # Keep sorted by ./configure --help and only pass --disable flags
185 + # when *required* to avoid external deps or unnecessary compile
186 + local econf_args
187 + econf_args=(
188 + --libdir=/usr/$(get_libdir)
189 + --docdir=/usr/share/doc/${PF}
190 + --disable-nls
191 + --disable-dbus
192 + $(multilib_native_use_enable kmod)
193 + --disable-xkbcommon
194 + --disable-seccomp
195 + $(multilib_native_use_enable selinux)
196 + --disable-xz
197 + --disable-lz4
198 + --disable-pam
199 + $(multilib_native_use_enable acl)
200 + --disable-gcrypt
201 + --disable-audit
202 + --disable-libcryptsetup
203 + --disable-qrencode
204 + --disable-microhttpd
205 + --disable-gnuefi
206 + --disable-gnutls
207 + --disable-libcurl
208 + --disable-libidn
209 + --disable-quotacheck
210 + --disable-logind
211 + --disable-polkit
212 + --disable-myhostname
213 + $(multilib_is_native_abi || echo "--disable-manpages")
214 + --enable-split-usr
215 + --without-python
216 + --with-bashcompletiondir="$(get_bashcompdir)"
217 + --with-rootprefix=
218 + $(multilib_is_native_abi && echo "--with-rootlibdir=/$(get_libdir)")
219 + --disable-elfutils
220 + )
221 +
222 + if ! multilib_is_native_abi; then
223 + econf_args+=(
224 + MOUNT_{CFLAGS,LIBS}=' '
225 + )
226 + fi
227 +
228 + ECONF_SOURCE=${S} econf "${econf_args[@]}"
229 +}
230 +
231 +multilib_src_compile() {
232 + echo 'BUILT_SOURCES: $(BUILT_SOURCES)' > "${T}"/Makefile.extra
233 + emake -f Makefile -f "${T}"/Makefile.extra BUILT_SOURCES
234 +
235 + # Most of the parallel build problems were solved by >=sys-devel/make-3.82-r4,
236 + # but not everything -- separate building of the binaries as a workaround,
237 + # which will force internal libraries required for the helpers to be built
238 + # early enough, like eg. libsystemd-shared.la
239 + if multilib_is_native_abi; then
240 + local lib_targets=( libudev.la )
241 + emake "${lib_targets[@]}"
242 +
243 + local exec_targets=(
244 + systemd-udevd
245 + udevadm
246 + )
247 + emake "${exec_targets[@]}"
248 +
249 + local helper_targets=(
250 + ata_id
251 + cdrom_id
252 + collect
253 + scsi_id
254 + v4l_id
255 + mtd_probe
256 + )
257 + emake "${helper_targets[@]}"
258 +
259 + local man_targets=(
260 + man/udev.conf.5
261 + man/systemd.link.5
262 + man/udev.7
263 + man/systemd-udevd.service.8
264 + man/udevadm.8
265 + )
266 + emake "${man_targets[@]}"
267 + else
268 + local lib_targets=( libudev.la )
269 + emake "${lib_targets[@]}"
270 + fi
271 +}
272 +
273 +multilib_src_install() {
274 + if multilib_is_native_abi; then
275 + local targets=(
276 + install-includeHEADERS
277 + install-rootbinPROGRAMS
278 + install-rootlibLTLIBRARIES
279 + install-rootlibexecPROGRAMS
280 + install-udevlibexecPROGRAMS
281 + install-dist_udevconfDATA
282 + install-dist_udevrulesDATA
283 + install-pkgconfiglibDATA
284 + install-pkgconfigdataDATA
285 + install-dist_docDATA
286 + install-directories-hook
287 + install-dist_bashcompletionDATA
288 + install-dist_networkDATA
289 + rootlibexec_PROGRAMS=systemd-udevd
290 + rootbin_PROGRAMS=udevadm
291 + rootlib_LTLIBRARIES="libudev.la"
292 + pkgconfiglib_DATA="src/libudev/libudev.pc"
293 + pkgconfigdata_DATA="src/udev/udev.pc"
294 + INSTALL_DIRS='$(sysconfdir)/udev/rules.d $(sysconfdir)/udev/hwdb.d $(sysconfdir)/systemd/network'
295 + dist_bashcompletion_DATA="shell-completion/bash/udevadm"
296 + dist_network_DATA="network/99-default.link"
297 + )
298 + emake -j1 DESTDIR="${D}" "${targets[@]}"
299 + doman man/{udev.conf.5,systemd.link.5,udev.7,systemd-udevd.service.8,udevadm.8}
300 +
301 + # Compatibility symlink for software that looks for libudev.so
302 + # without using pkg-config
303 + dosym ../../$(get_libdir)/libudev.so.1 \
304 + /usr/$(get_libdir)/libudev.so
305 + else
306 + local targets=(
307 + install-libLTLIBRARIES
308 + install-includeHEADERS
309 + install-pkgconfiglibDATA
310 + lib_LTLIBRARIES="libudev.la"
311 + pkgconfiglib_DATA="src/libudev/libudev.pc"
312 + include_HEADERS="src/libudev/libudev.h"
313 + )
314 +
315 + emake -j1 DESTDIR="${D}" "${targets[@]}"
316 + fi
317 +}
318 +
319 +multilib_src_install_all() {
320 + dodoc TODO
321 +
322 + prune_libtool_files --all
323 + rm -f "${D}"/lib/udev/rules.d/99-systemd.rules
324 + rm -f "${D}"/usr/share/doc/${PF}/{LICENSE.*,GVARIANT-SERIALIZATION,DIFFERENCES,PORTING-DBUS1,sd-shutdown.h}
325 +
326 + # see src_prepare() for content of 40-gentoo.rules
327 + insinto /lib/udev/rules.d
328 + doins "${T}"/40-gentoo.rules
329 +
330 + # maintainer note: by not letting the upstream build-sys create the .so
331 + # link, you also avoid a parallel make problem
332 + mv "${D}"/usr/share/man/man8/systemd-udevd{.service,}.8
333 +}
334 +
335 +pkg_postinst() {
336 + mkdir -p "${ROOT%/}"/run
337 +
338 + # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766
339 + # So try to remove it here (will only work if empty).
340 + rmdir "${ROOT%/}"/dev/loop 2>/dev/null
341 + if [[ -d ${ROOT%/}/dev/loop ]]; then
342 + ewarn "Please make sure your remove /dev/loop,"
343 + ewarn "else losetup may be confused when looking for unused devices."
344 + fi
345 +
346 + local fstab="${ROOT%/}"/etc/fstab dev path fstype rest
347 + while read -r dev path fstype rest; do
348 + if [[ ${path} == /dev && ${fstype} != devtmpfs ]]; then
349 + ewarn "You need to edit your /dev line in ${fstab} to have devtmpfs"
350 + ewarn "filesystem. Otherwise udev won't be able to boot."
351 + ewarn "See, https://bugs.gentoo.org/453186"
352 + fi
353 + done < "${fstab}"
354 +
355 + if [[ -d ${ROOT%/}/usr/lib/udev ]]; then
356 + ewarn
357 + ewarn "Please re-emerge all packages on your system which install"
358 + ewarn "rules and helpers in /usr/lib/udev. They should now be in"
359 + ewarn "/lib/udev."
360 + ewarn
361 + ewarn "One way to do this is to run the following command:"
362 + ewarn "emerge -av1 \$(qfile -q -S -C /usr/lib/udev)"
363 + ewarn "Note that qfile can be found in app-portage/portage-utils"
364 + fi
365 +
366 + local old_cd_rules="${ROOT%/}"/etc/udev/rules.d/70-persistent-cd.rules
367 + local old_net_rules="${ROOT%/}"/etc/udev/rules.d/70-persistent-net.rules
368 + for old_rules in "${old_cd_rules}" "${old_net_rules}"; do
369 + if [[ -f ${old_rules} ]]; then
370 + ewarn
371 + ewarn "File ${old_rules} is from old udev installation but if you still use it,"
372 + ewarn "rename it to something else starting with 70- to silence this deprecation"
373 + ewarn "warning."
374 + fi
375 + done
376 +
377 + elog
378 + elog "Starting from version >= 197 the new predictable network interface names are"
379 + elog "used by default, see:"
380 + elog "https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames"
381 + elog "https://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_id.c"
382 + elog
383 + elog "Example command to get the information for the new interface name before booting"
384 + elog "(replace <ifname> with, for example, eth0):"
385 + elog "# udevadm test-builtin net_id /sys/class/net/<ifname> 2> /dev/null"
386 + elog
387 + elog "You can use either kernel parameter \"net.ifnames=0\", create empty"
388 + elog "file /etc/systemd/network/99-default.link, or symlink it to /dev/null"
389 + elog "to disable the feature."
390 +
391 + if has_version 'sys-apps/biosdevname'; then
392 + ewarn
393 + ewarn "You can replace the functionality of sys-apps/biosdevname which has been"
394 + ewarn "detected to be installed with the new predictable network interface names."
395 + fi
396 +
397 + ewarn
398 + ewarn "You need to restart udev as soon as possible to make the upgrade go"
399 + ewarn "into effect."
400 + ewarn "The method you use to do this depends on your init system."
401 + if has_version 'sys-apps/openrc'; then
402 + ewarn "For sys-apps/openrc users it is:"
403 + ewarn "# /etc/init.d/udev --nodeps restart"
404 + fi
405 +
406 + elog
407 + elog "For more information on udev on Gentoo, upgrading, writing udev rules, and"
408 + elog "fixing known issues visit:"
409 + elog "https://wiki.gentoo.org/wiki/Udev"
410 + elog "https://wiki.gentoo.org/wiki/Udev/upgrade"
411 +
412 + # If user has disabled 80-net-name-slot.rules using a empty file or a symlink to /dev/null,
413 + # do the same for 80-net-setup-link.rules to keep the old behavior
414 + local net_move=no
415 + local net_name_slot_sym=no
416 + local net_rules_path="${ROOT%/}"/etc/udev/rules.d
417 + local net_name_slot="${net_rules_path}"/80-net-name-slot.rules
418 + local net_setup_link="${net_rules_path}"/80-net-setup-link.rules
419 + if [[ ! -e ${net_setup_link} ]]; then
420 + [[ -f ${net_name_slot} && $(sed -e "/^#/d" -e "/^\W*$/d" ${net_name_slot} | wc -l) == 0 ]] && net_move=yes
421 + if [[ -L ${net_name_slot} && $(readlink ${net_name_slot}) == /dev/null ]]; then
422 + net_move=yes
423 + net_name_slot_sym=yes
424 + fi
425 + fi
426 + if [[ ${net_move} == yes ]]; then
427 + ebegin "Copying ${net_name_slot} to ${net_setup_link}"
428 +
429 + if [[ ${net_name_slot_sym} == yes ]]; then
430 + ln -nfs /dev/null "${net_setup_link}"
431 + else
432 + cp "${net_name_slot}" "${net_setup_link}"
433 + fi
434 + eend $?
435 + fi
436 +
437 + # https://cgit.freedesktop.org/systemd/systemd/commit/rules/50-udev-default.rules?id=3dff3e00e044e2d53c76fa842b9a4759d4a50e69
438 + # https://bugs.gentoo.org/246847
439 + # https://bugs.gentoo.org/514174
440 + enewgroup input
441 +
442 + # Update hwdb database in case the format is changed by udev version.
443 + if has_version 'sys-apps/hwids[udev]'; then
444 + udevadm hwdb --update --root="${ROOT%/}"
445 + # Only reload when we are not upgrading to avoid potential race w/ incompatible hwdb.bin and the running udevd
446 + # https://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda
447 + [[ -z ${REPLACING_VERSIONS} ]] && udev_reload
448 + fi
449 +}