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