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