Gentoo Archives: gentoo-commits

From: "Samuli Suominen (ssuominen)" <ssuominen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-fs/udev: udev-210.ebuild ChangeLog
Date: Tue, 25 Feb 2014 08:20:33
Message-Id: 20140225082025.21FD22004C@flycatcher.gentoo.org
1 ssuominen 14/02/25 08:20:25
2
3 Modified: ChangeLog
4 Added: udev-210.ebuild
5 Log:
6 Version bump.
7
8 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)
9
10 Revision Changes Path
11 1.994 sys-fs/udev/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/ChangeLog?rev=1.994&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/ChangeLog?rev=1.994&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/ChangeLog?r1=1.993&r2=1.994
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v
20 retrieving revision 1.993
21 retrieving revision 1.994
22 diff -u -r1.993 -r1.994
23 --- ChangeLog 24 Feb 2014 08:40:57 -0000 1.993
24 +++ ChangeLog 25 Feb 2014 08:20:24 -0000 1.994
25 @@ -1,6 +1,11 @@
26 # ChangeLog for sys-fs/udev
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.993 2014/02/24 08:40:57 ssuominen Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.994 2014/02/25 08:20:24 ssuominen Exp $
30 +
31 +*udev-210 (25 Feb 2014)
32 +
33 + 25 Feb 2014; Samuli Suominen <ssuominen@g.o> +udev-210.ebuild:
34 + Version bump.
35
36 24 Feb 2014; Samuli Suominen <ssuominen@g.o> udev-209.ebuild,
37 udev-9999.ebuild:
38
39
40
41 1.1 sys-fs/udev/udev-210.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/udev-210.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/udev-210.ebuild?rev=1.1&content-type=text/plain
45
46 Index: udev-210.ebuild
47 ===================================================================
48 # Copyright 1999-2014 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-210.ebuild,v 1.1 2014/02/25 08:20:24 ssuominen Exp $
51
52 EAPI=5
53
54 inherit autotools bash-completion-r1 eutils linux-info multilib toolchain-funcs versionator multilib-minimal
55
56 if [[ ${PV} = 9999* ]]; then
57 EGIT_REPO_URI="git://anongit.freedesktop.org/systemd/systemd"
58 inherit git-2
59 else
60 patchset=
61 SRC_URI="http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz"
62 if [[ -n "${patchset}" ]]; then
63 SRC_URI="${SRC_URI}
64 http://dev.gentoo.org/~ssuominen/${P}-patches-${patchset}.tar.xz
65 http://dev.gentoo.org/~williamh/dist/${P}-patches-${patchset}.tar.xz"
66 fi
67 #TODO: Release news item before keywording
68 #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
69 fi
70
71 DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
72 HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd"
73
74 LICENSE="LGPL-2.1 MIT GPL-2"
75 SLOT="0"
76 IUSE="acl doc +firmware-loader gudev introspection +kmod +openrc selinux static-libs"
77
78 RESTRICT="test"
79
80 COMMON_DEPEND=">=sys-apps/util-linux-2.20
81 acl? ( sys-apps/acl )
82 gudev? ( >=dev-libs/glib-2.22 )
83 introspection? ( >=dev-libs/gobject-introspection-1.31.1 )
84 kmod? ( >=sys-apps/kmod-16 )
85 selinux? ( >=sys-libs/libselinux-2.1.9 )
86 !<sys-libs/glibc-2.11
87 !sys-apps/systemd
88 abi_x86_32? (
89 !<=app-emulation/emul-linux-x86-baselibs-20130224-r7
90 !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
91 )"
92 DEPEND="${COMMON_DEPEND}
93 dev-util/gperf
94 virtual/os-headers
95 virtual/pkgconfig
96 !<sys-devel/make-3.82-r4
97 !<sys-kernel/linux-headers-2.6.32
98 doc? ( >=dev-util/gtk-doc-1.18 )"
99 # Try with `emerge -C docbook-xml-dtd` to see the build failure without DTDs
100 if [[ ${PV} = 9999* ]]; then
101 DEPEND="${DEPEND}
102 app-text/docbook-xml-dtd:4.2
103 app-text/docbook-xml-dtd:4.5
104 app-text/docbook-xsl-stylesheets
105 dev-libs/libxslt
106 >=dev-util/intltool-0.50"
107 fi
108 RDEPEND="${COMMON_DEPEND}
109 !<sys-fs/lvm2-2.02.103
110 !<sec-policy/selinux-base-2.20120725-r10"
111 PDEPEND=">=virtual/udev-208
112 >=sys-apps/hwids-20140101[udev]
113 openrc? ( >=sys-fs/udev-init-scripts-26 )"
114
115 S=${WORKDIR}/systemd-${PV}
116
117 # The multilib-build.eclass doesn't handle situation where the installed headers
118 # are different in ABIs. In this case, we install libgudev headers in native
119 # ABI but not for non-native ABI.
120 multilib_check_headers() { :; }
121
122 check_default_rules() {
123 # Make sure there are no sudden changes to upstream rules file
124 # (more for my own needs than anything else ...)
125 local udev_rules_md5=dcbc152236a7d009e6ce6f2369c509ea
126 MD5=$(md5sum < "${S}"/rules/50-udev-default.rules)
127 MD5=${MD5/ -/}
128 if [[ ${MD5} != ${udev_rules_md5} ]]; then
129 eerror "50-udev-default.rules has been updated, please validate!"
130 eerror "md5sum: ${MD5}"
131 die "50-udev-default.rules has been updated, please validate!"
132 fi
133 }
134
135 pkg_setup() {
136 CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET ~DMIID"
137 linux-info_pkg_setup
138
139 # Based on README from tarball:
140 local MINKV=3.0
141 # These arch's have the mandatory accept4() function support in Linux 2.6.32*, see:
142 # $ grep -r define.*accept4 linux-2.6.32*/*
143 if use amd64 || use ia64 || use mips || use sparc || use x86; then
144 MINKV=2.6.32
145 fi
146
147 if kernel_is -lt ${MINKV//./ }; then
148 eerror "Your running kernel is too old to run this version of ${P}"
149 eerror "You need to upgrade kernel at least to ${MINKV}"
150 fi
151 }
152
153 src_prepare() {
154 if ! [[ ${PV} = 9999* ]]; then
155 # secure_getenv() disable for non-glibc systems wrt bug #443030
156 if ! [[ $(grep -r secure_getenv * | wc -l) -eq 22 ]]; then
157 eerror "The line count for secure_getenv() failed, see bug #443030"
158 die
159 fi
160 fi
161
162 # backport some patches
163 if [[ -n "${patchset}" ]]; then
164 EPATCH_SUFFIX=patch EPATCH_FORCE=yes epatch
165 fi
166
167 cat <<-EOF > "${T}"/40-gentoo.rules
168 # Gentoo specific usb group
169 SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", GROUP="usb"
170 # Keep this for Linux 2.6.32 kernels with incomplete devtmpfs support because
171 # accept4() function is supported for some arch's wrt #457868
172 SUBSYSTEM=="mem", KERNEL=="null|zero|full|random|urandom", MODE="0666"
173 EOF
174
175 # Remove requirements for gettext and intltool wrt bug #443028
176 if ! has_version dev-util/intltool && ! [[ ${PV} = 9999* ]]; then
177 sed -i \
178 -e '/INTLTOOL_APPLIED_VERSION=/s:=.*:=0.40.0:' \
179 -e '/XML::Parser perl module is required for intltool/s|^|:|' \
180 configure || die
181 eval export INTLTOOL_{EXTRACT,MERGE,UPDATE}=/bin/true
182 eval export {MSG{FMT,MERGE},XGETTEXT}=/bin/true
183 fi
184
185 # apply user patches
186 epatch_user
187
188 # compile with older versions of gcc #451110
189 version_is_at_least 4.6 $(gcc-version) || \
190 sed -i 's:static_assert:alsdjflkasjdfa:' src/shared/macro.h
191
192 # change rules back to group uucp instead of dialout for now wrt #454556
193 sed -i -e 's/GROUP="dialout"/GROUP="uucp"/' rules/*.rules || die
194
195 if [[ ! -e configure ]]; then
196 if use doc; then
197 gtkdocize --docdir docs || die "gtkdocize failed"
198 else
199 echo 'EXTRA_DIST =' > docs/gtk-doc.make
200 fi
201 eautoreconf
202 else
203 check_default_rules
204 elibtoolize
205 fi
206
207 # Restore possibility of running --enable-static wrt #472608
208 sed -i \
209 -e '/--enable-static is not supported by systemd/s:as_fn_error:echo:' \
210 configure || die
211
212 if ! use elibc_glibc; then #443030
213 echo '#define secure_getenv(x) NULL' >> config.h.in
214 sed -i -e '/error.*secure_getenv/s:.*:#define secure_getenv(x) NULL:' src/shared/missing.h || die
215 fi
216 }
217
218 multilib_src_configure() {
219 tc-export CC #463846
220
221 # Keep sorted by ./configure --help and only pass --disable flags
222 # when *required* to avoid external deps or unnecessary compile
223 local econf_args
224 econf_args=(
225 ac_cv_search_cap_init=
226 ac_cv_header_sys_capability_h=yes
227 --libdir=/usr/$(get_libdir)
228 --docdir=/usr/share/doc/${PF}
229 --disable-nls
230 --disable-python-devel
231 --disable-dbus
232 --disable-seccomp
233 --disable-xz
234 --disable-tcpwrap
235 --disable-pam
236 --disable-xattr
237 --disable-gcrypt
238 --disable-audit
239 --disable-libcryptsetup
240 --disable-qrencode
241 --disable-microhttpd
242 --disable-readahead
243 --disable-quotacheck
244 --disable-logind
245 --disable-polkit
246 --disable-myhostname
247 --enable-split-usr
248 --with-html-dir=/usr/share/doc/${PF}/html
249 --without-python
250 --with-bashcompletiondir="$(get_bashcompdir)"
251 --with-rootprefix=
252 )
253 # Use pregenerated copies when possible wrt #480924
254 if ! [[ ${PV} = 9999* ]]; then
255 econf_args+=(
256 --disable-manpages
257 )
258 fi
259 if multilib_build_binaries; then
260 econf_args+=(
261 $(use_enable static-libs static)
262 $(use_enable doc gtk-doc)
263 $(use_enable introspection)
264 $(use_enable acl)
265 $(use_enable kmod)
266 $(use_enable selinux)
267 $(use_enable gudev)
268 --with-rootlibdir=/$(get_libdir)
269 )
270 else
271 econf_args+=(
272 --disable-static
273 --disable-gtk-doc
274 --disable-introspection
275 --disable-acl
276 --disable-kmod
277 --disable-selinux
278 --disable-gudev
279 --disable-manpages
280 --with-rootlibdir=/usr/$(get_libdir)
281 )
282 fi
283 use firmware-loader && econf_args+=( --with-firmware-path="/lib/firmware/updates:/lib/firmware" )
284
285 ECONF_SOURCE=${S} econf "${econf_args[@]}"
286 }
287
288 multilib_src_compile() {
289 echo 'BUILT_SOURCES: $(BUILT_SOURCES)' > "${T}"/Makefile.extra
290 emake -f Makefile -f "${T}"/Makefile.extra BUILT_SOURCES
291
292 # Most of the parallel build problems were solved by >=sys-devel/make-3.82-r4,
293 # but not everything -- separate building of the binaries as a workaround,
294 # which will force internal libraries required for the helpers to be built
295 # early enough, like eg. libsystemd-shared.la
296 if multilib_build_binaries; then
297 local lib_targets=( libudev.la )
298 use gudev && lib_targets+=( libgudev-1.0.la )
299 emake "${lib_targets[@]}"
300
301 local exec_targets=(
302 systemd-udevd
303 udevadm
304 )
305 emake "${exec_targets[@]}"
306
307 local helper_targets=(
308 ata_id
309 cdrom_id
310 collect
311 scsi_id
312 v4l_id
313 accelerometer
314 mtd_probe
315 )
316 emake "${helper_targets[@]}"
317
318 if [[ ${PV} = 9999* ]]; then
319 local man_targets=(
320 man/udev.7
321 man/udevadm.8
322 man/systemd-udevd.service.8
323 )
324 emake "${man_targets[@]}"
325 fi
326
327 if use doc; then
328 emake -C docs/libudev
329 use gudev && emake -C docs/gudev
330 fi
331 else
332 local lib_targets=( libudev.la )
333 emake "${lib_targets[@]}"
334 fi
335 }
336
337 multilib_src_install() {
338 if multilib_build_binaries; then
339 local lib_LTLIBRARIES="libudev.la" \
340 pkgconfiglib_DATA="src/libudev/libudev.pc"
341
342 local targets=(
343 install-libLTLIBRARIES
344 install-includeHEADERS
345 install-libgudev_includeHEADERS
346 install-rootbinPROGRAMS
347 install-rootlibexecPROGRAMS
348 install-udevlibexecPROGRAMS
349 install-dist_udevconfDATA
350 install-dist_udevrulesDATA
351 install-girDATA
352 install-pkgconfiglibDATA
353 install-sharepkgconfigDATA
354 install-typelibsDATA
355 install-dist_docDATA
356 libudev-install-hook
357 install-directories-hook
358 install-dist_bashcompletionDATA
359 install-dist_networkDATA
360 )
361
362 if use gudev; then
363 lib_LTLIBRARIES+=" libgudev-1.0.la"
364 pkgconfiglib_DATA+=" src/gudev/gudev-1.0.pc"
365 fi
366
367 # add final values of variables:
368 targets+=(
369 rootlibexec_PROGRAMS=systemd-udevd
370 rootbin_PROGRAMS=udevadm
371 lib_LTLIBRARIES="${lib_LTLIBRARIES}"
372 pkgconfiglib_DATA="${pkgconfiglib_DATA}"
373 INSTALL_DIRS='$(sysconfdir)/udev/rules.d \
374 $(sysconfdir)/udev/hwdb.d \
375 $(sysconfdir)/systemd/network'
376 dist_bashcompletion_DATA="shell-completion/bash/udevadm"
377 dist_network_DATA="network/99-default.link"
378 )
379 emake -j1 DESTDIR="${D}" "${targets[@]}"
380
381 if use doc; then
382 emake -C docs/libudev DESTDIR="${D}" install
383 use gudev && emake -C docs/gudev DESTDIR="${D}" install
384 fi
385
386 # install udevadm compatibility symlink
387 dosym {../bin,sbin}/udevadm
388
389 if [[ ${PV} = 9999* ]]; then
390 doman man/{udev.7,udevadm.8,systemd-udevd.service.8}
391 else
392 doman "${S}"/man/{udev.7,udevadm.8,systemd-udevd.service.8}
393 fi
394 else
395 local lib_LTLIBRARIES="libudev.la" \
396 pkgconfiglib_DATA="src/libudev/libudev.pc" \
397 include_HEADERS="src/libudev/libudev.h"
398
399 local targets=(
400 install-libLTLIBRARIES
401 install-includeHEADERS
402 install-pkgconfiglibDATA
403 )
404
405 targets+=(
406 lib_LTLIBRARIES="${lib_LTLIBRARIES}"
407 pkgconfiglib_DATA="${pkgconfiglib_DATA}"
408 include_HEADERS="${include_HEADERS}"
409 )
410 emake -j1 DESTDIR="${D}" "${targets[@]}"
411 fi
412 }
413
414 multilib_src_install_all() {
415 dodoc TODO
416
417 prune_libtool_files --all
418 rm -f \
419 "${D}"/lib/udev/rules.d/99-systemd.rules \
420 "${D}"/usr/share/doc/${PF}/{LICENSE.*,sd-shutdown.h}
421
422 # see src_prepare() for content of 40-gentoo.rules
423 insinto /lib/udev/rules.d
424 doins "${T}"/40-gentoo.rules
425
426 # maintainer note: by not letting the upstream build-sys create the .so
427 # link, you also avoid a parallel make problem
428 mv "${D}"/usr/share/man/man8/systemd-udevd{.service,}.8
429 }
430
431 pkg_preinst() {
432 local htmldir
433 for htmldir in gudev libudev; do
434 if [[ -d ${ROOT}usr/share/gtk-doc/html/${htmldir} ]]; then
435 rm -rf "${ROOT}"usr/share/gtk-doc/html/${htmldir}
436 fi
437 if [[ -d ${D}/usr/share/doc/${PF}/html/${htmldir} ]]; then
438 dosym ../../doc/${PF}/html/${htmldir} \
439 /usr/share/gtk-doc/html/${htmldir}
440 fi
441 done
442 }
443
444 pkg_postinst() {
445 mkdir -p "${ROOT}"run
446
447 # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766
448 # So try to remove it here (will only work if empty).
449 rmdir "${ROOT}"dev/loop 2>/dev/null
450 if [[ -d ${ROOT}dev/loop ]]; then
451 ewarn "Please make sure your remove /dev/loop,"
452 ewarn "else losetup may be confused when looking for unused devices."
453 fi
454
455 local fstab="${ROOT}"etc/fstab dev path fstype rest
456 while read -r dev path fstype rest; do
457 if [[ ${path} == /dev && ${fstype} != devtmpfs ]]; then
458 ewarn "You need to edit your /dev line in ${fstab} to have devtmpfs"
459 ewarn "filesystem. Otherwise udev won't be able to boot."
460 ewarn "See, http://bugs.gentoo.org/453186"
461 fi
462 done < "${fstab}"
463
464 if [[ -d ${ROOT}usr/lib/udev ]]; then
465 ewarn
466 ewarn "Please re-emerge all packages on your system which install"
467 ewarn "rules and helpers in /usr/lib/udev. They should now be in"
468 ewarn "/lib/udev."
469 ewarn
470 ewarn "One way to do this is to run the following command:"
471 ewarn "emerge -av1 \$(qfile -q -S -C /usr/lib/udev)"
472 ewarn "Note that qfile can be found in app-portage/portage-utils"
473 fi
474
475 local old_cd_rules="${ROOT}"etc/udev/rules.d/70-persistent-cd.rules
476 local old_net_rules="${ROOT}"etc/udev/rules.d/70-persistent-net.rules
477 for old_rules in "${old_cd_rules}" "${old_net_rules}"; do
478 if [[ -f ${old_rules} ]]; then
479 ewarn
480 ewarn "File ${old_rules} is from old udev installation but if you still use it,"
481 ewarn "rename it to something else starting with 70- to silence this deprecation"
482 ewarn "warning."
483 fi
484 done
485
486 elog
487 elog "Starting from version >= 197 the new predictable network interface names are"
488 elog "used by default, see:"
489 elog "http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames"
490 elog "http://cgit.freedesktop.org/systemd/systemd/tree/src/udev/udev-builtin-net_id.c"
491 elog
492 elog "Example command to get the information for the new interface name before booting"
493 elog "(replace <ifname> with, for example, eth0):"
494 elog "# udevadm test-builtin net_id /sys/class/net/<ifname> 2> /dev/null"
495 elog
496 elog "You can use either kernel parameter \"net.ifnames=0\", create empty"
497 elog "file /etc/systemd/network/99-default.link, or symlink it to /dev/null"
498 elog "to disable the feature."
499
500 if has_version sys-apps/biosdevname; then
501 ewarn
502 ewarn "You can replace the functionality of sys-apps/biosdevname which has been"
503 ewarn "detected to be installed with the new predictable network interface names."
504 fi
505
506 ewarn
507 ewarn "You need to restart udev as soon as possible to make the upgrade go"
508 ewarn "into effect."
509 ewarn "The method you use to do this depends on your init system."
510 if has_version 'sys-apps/openrc'; then
511 ewarn "For sys-apps/openrc users it is:"
512 ewarn "# /etc/init.d/udev --nodeps restart"
513 fi
514
515 elog
516 elog "For more information on udev on Gentoo, upgrading, writing udev rules, and"
517 elog "fixing known issues visit:"
518 elog "http://wiki.gentoo.org/wiki/Udev"
519 elog "http://wiki.gentoo.org/wiki/Udev/upgrade"
520
521 # Update hwdb database in case the format is changed by udev version.
522 if has_version 'sys-apps/hwids[udev]'; then
523 udevadm hwdb --update --root="${ROOT%/}"
524 # Only reload when we are not upgrading to avoid potential race w/ incompatible hwdb.bin and the running udevd
525 if [[ -z ${REPLACING_VERSIONS} ]]; then
526 # http://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda
527 if [[ ${ROOT} != "" ]] && [[ ${ROOT} != "/" ]]; then
528 return 0
529 fi
530 udevadm control --reload
531 fi
532 fi
533 }