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