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-196-r1.ebuild udev-9999.ebuild
Date: Sun, 02 Dec 2012 07:29:17
Message-Id: 20121202072905.58DD12171D@flycatcher.gentoo.org
1 ssuominen 12/12/02 07:29:05
2
3 Modified: ChangeLog udev-9999.ebuild
4 Added: udev-196-r1.ebuild
5 Log:
6 New toys
7
8 (Portage version: 2.2.0_alpha144/cvs/Linux x86_64, signed Manifest commit with key 4868F14D)
9
10 Revision Changes Path
11 1.749 sys-fs/udev/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/ChangeLog?rev=1.749&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/ChangeLog?rev=1.749&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/ChangeLog?r1=1.748&r2=1.749
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v
20 retrieving revision 1.748
21 retrieving revision 1.749
22 diff -u -r1.748 -r1.749
23 --- ChangeLog 2 Dec 2012 06:05:40 -0000 1.748
24 +++ ChangeLog 2 Dec 2012 07:29:05 -0000 1.749
25 @@ -1,11 +1,15 @@
26 # ChangeLog for sys-fs/udev
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.748 2012/12/02 06:05:40 ssuominen Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.749 2012/12/02 07:29:05 ssuominen Exp $
30
31 - 02 Dec 2012; Samuli Suominen <ssuominen@g.o> udev-196.ebuild,
32 +*udev-196-r1 (02 Dec 2012)
33 +
34 + 02 Dec 2012; Samuli Suominen <ssuominen@g.o> +udev-196-r1.ebuild,
35 udev-9999.ebuild:
36 - Install hwdb.d files to /usr/lib/udev/hwdb.d and run udevadm hwdb --update in
37 - pkg_postinst() to refresh /etc/udev/udev.bin
38 + USE="hwdb" will now pull in sys-apps/hwids with USE="udev" enabled to gain
39 + pci.ids, usb.ids and oui.txt to generate /etc/udev/udev.bin from.
40 + Run udevadm hwdb --update too. Thanks to Flameeyes for co-operating with
41 + this one.
42
43 *udev-196 (02 Dec 2012)
44
45
46
47
48 1.122 sys-fs/udev/udev-9999.ebuild
49
50 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/udev-9999.ebuild?rev=1.122&view=markup
51 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/udev-9999.ebuild?rev=1.122&content-type=text/plain
52 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/udev-9999.ebuild?r1=1.121&r2=1.122
53
54 Index: udev-9999.ebuild
55 ===================================================================
56 RCS file: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-9999.ebuild,v
57 retrieving revision 1.121
58 retrieving revision 1.122
59 diff -u -r1.121 -r1.122
60 --- udev-9999.ebuild 2 Dec 2012 06:05:40 -0000 1.121
61 +++ udev-9999.ebuild 2 Dec 2012 07:29:05 -0000 1.122
62 @@ -1,6 +1,6 @@
63 # Copyright 1999-2012 Gentoo Foundation
64 # Distributed under the terms of the GNU General Public License v2
65 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-9999.ebuild,v 1.121 2012/12/02 06:05:40 ssuominen Exp $
66 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-9999.ebuild,v 1.122 2012/12/02 07:29:05 ssuominen Exp $
67
68 EAPI=4
69
70 @@ -28,7 +28,7 @@
71
72 LICENSE="LGPL-2.1 MIT GPL-2"
73 SLOT="0"
74 -IUSE="acl doc gudev introspection keymap +openrc selinux static-libs"
75 +IUSE="acl doc gudev hwdb introspection keymap +openrc selinux static-libs"
76
77 RESTRICT="test"
78
79 @@ -46,7 +46,8 @@
80 virtual/os-headers
81 virtual/pkgconfig
82 !<sys-kernel/linux-headers-${KV_min}
83 - doc? ( dev-util/gtk-doc )"
84 + doc? ( dev-util/gtk-doc )
85 + hwdb? ( >=sys-apps/hwids-20121202.2[udev] )"
86
87 if [[ ${PV} = 9999* ]]
88 then
89 @@ -289,9 +290,6 @@
90
91 # install udevadm symlink
92 dosym ../usr/bin/udevadm /sbin/udevadm
93 -
94 - insinto /usr/lib/udev/hwdb.d
95 - doins hwdb/*.hwdb
96 }
97
98 pkg_preinst()
99 @@ -395,5 +393,5 @@
100 elog " fixing known issues visit:"
101 elog " http://www.gentoo.org/doc/en/udev-guide.xml"
102
103 - udevadm hwdb --update
104 + use hwdb && udevadm hwdb --update
105 }
106
107
108
109 1.1 sys-fs/udev/udev-196-r1.ebuild
110
111 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/udev-196-r1.ebuild?rev=1.1&view=markup
112 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/udev-196-r1.ebuild?rev=1.1&content-type=text/plain
113
114 Index: udev-196-r1.ebuild
115 ===================================================================
116 # Copyright 1999-2012 Gentoo Foundation
117 # Distributed under the terms of the GNU General Public License v2
118 # $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-196-r1.ebuild,v 1.1 2012/12/02 07:29:05 ssuominen Exp $
119
120 EAPI=4
121
122 KV_min=2.6.39
123
124 inherit autotools eutils linux-info
125
126 if [[ ${PV} = 9999* ]]
127 then
128 EGIT_REPO_URI="git://anongit.freedesktop.org/systemd/systemd"
129 inherit git-2
130 else
131 patchset=1
132 SRC_URI="http://www.freedesktop.org/software/systemd/systemd-${PV}.tar.xz"
133 if [[ -n "${patchset}" ]]
134 then
135 SRC_URI="${SRC_URI}
136 mirror://gentoo/${PN}-195-patches-${patchset}.tar.bz2"
137 fi
138 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
139 fi
140
141 DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
142 HOMEPAGE="http://www.freedesktop.org/wiki/Software/systemd"
143
144 LICENSE="LGPL-2.1 MIT GPL-2"
145 SLOT="0"
146 IUSE="acl doc gudev hwdb introspection keymap +openrc selinux static-libs"
147
148 RESTRICT="test"
149
150 COMMON_DEPEND=">=sys-apps/kmod-11-r3
151 >=sys-apps/util-linux-2.20
152 acl? ( sys-apps/acl )
153 gudev? ( >=dev-libs/glib-2 )
154 introspection? ( >=dev-libs/gobject-introspection-1.31.1 )
155 selinux? ( sys-libs/libselinux )
156 !<sys-libs/glibc-2.11"
157
158 DEPEND="${COMMON_DEPEND}
159 dev-util/gperf
160 >=dev-util/intltool-0.50
161 virtual/os-headers
162 virtual/pkgconfig
163 !<sys-kernel/linux-headers-${KV_min}
164 doc? ( dev-util/gtk-doc )
165 hwdb? ( >=sys-apps/hwids-20121202.2[udev] )"
166
167 if [[ ${PV} = 9999* ]]
168 then
169 DEPEND="${DEPEND}
170 app-text/docbook-xsl-stylesheets
171 dev-libs/libxslt"
172 fi
173
174 RDEPEND="${COMMON_DEPEND}
175 openrc? ( >=sys-fs/udev-init-scripts-16
176 !<sys-apps/openrc-0.9.9 )
177 !sys-apps/coldplug
178 !<sys-fs/lvm2-2.02.45
179 !sys-fs/device-mapper
180 !<sys-fs/udev-init-scripts-16
181 !<sys-kernel/dracut-017-r1
182 !<sys-kernel/genkernel-3.4.25"
183
184 PDEPEND=">=virtual/udev-180"
185
186 S=${WORKDIR}/systemd-${PV}
187
188 QA_MULTILIB_PATHS="usr/lib/systemd/systemd-udevd"
189
190 udev_check_KV()
191 {
192 if kernel_is lt ${KV_min//./ }
193 then
194 return 1
195 fi
196 return 0
197 }
198
199 check_default_rules()
200 {
201 # Make sure there are no sudden changes to upstream rules file
202 # (more for my own needs than anything else ...)
203 local udev_rules_md5=66bb698deeae64ab444b710baf54a412
204 MD5=$(md5sum < "${S}"/rules/50-udev-default.rules)
205 MD5=${MD5/ -/}
206 if [[ ${MD5} != ${udev_rules_md5} ]]
207 then
208 eerror "50-udev-default.rules has been updated, please validate!"
209 eerror "md5sum: ${MD5}"
210 die "50-udev-default.rules has been updated, please validate!"
211 fi
212 }
213
214 pkg_setup()
215 {
216 # required kernel options
217 CONFIG_CHECK="~DEVTMPFS"
218 ERROR_DEVTMPFS="DEVTMPFS is not set in this kernel. Udev will not run."
219
220 linux-info_pkg_setup
221
222 if ! udev_check_KV
223 then
224 eerror "Your kernel version (${KV_FULL}) is too old to run ${P}"
225 eerror "It must be at least ${KV_min}!"
226 fi
227
228 KV_FULL_SRC=${KV_FULL}
229 get_running_version
230 if ! udev_check_KV
231 then
232 eerror
233 eerror "Your running kernel version (${KV_FULL}) is too old"
234 eerror "for this version of udev."
235 eerror "You must upgrade your kernel or downgrade udev."
236 fi
237 }
238
239 src_prepare()
240 {
241 # backport some patches
242 if [[ -n "${patchset}" ]]
243 then
244 EPATCH_SUFFIX=patch EPATCH_FORCE=yes epatch
245 fi
246
247 # change rules back to group uucp instead of dialout for now
248 sed -e 's/GROUP="dialout"/GROUP="uucp"/' \
249 -i rules/*.rules \
250 || die "failed to change group dialout to uucp"
251
252 if [[ ! -e configure ]]
253 then
254 if use doc
255 then
256 gtkdocize --docdir docs || die "gtkdocize failed"
257 else
258 echo 'EXTRA_DIST =' > docs/gtk-doc.make
259 fi
260 eautoreconf
261 else
262 check_default_rules
263 elibtoolize
264 fi
265 }
266
267 src_configure()
268 {
269 local econf_args
270
271 econf_args=(
272 ac_cv_search_cap_init=
273 ac_cv_header_sys_capability_h=yes
274 DBUS_CFLAGS=' '
275 DBUS_LIBS=' '
276 --docdir=/usr/share/doc/${PF}
277 --libdir=/usr/$(get_libdir)
278 --with-distro=gentoo
279 --with-firmware-path=/usr/lib/firmware/updates:/usr/lib/firmware:/lib/firmware/updates:/lib/firmware
280 --with-html-dir=/usr/share/doc/${PF}/html
281 --with-rootlibdir=/usr/$(get_libdir)
282 --with-rootprefix=/usr
283 --disable-audit
284 --disable-coredump
285 --disable-hostnamed
286 --disable-ima
287 --disable-libcryptsetup
288 --disable-localed
289 --disable-logind
290 --disable-nls
291 --disable-pam
292 --disable-quotacheck
293 --disable-readahead
294 --enable-split-usr
295 --disable-tcpwrap
296 --disable-timedated
297 --disable-xz
298 $(use_enable acl)
299 $(use_enable doc gtk-doc)
300 $(use_enable gudev)
301 $(use_enable introspection)
302 $(use_enable keymap)
303 $(use_enable selinux)
304 $(use_enable static-libs static)
305 )
306 econf "${econf_args[@]}"
307 }
308
309 src_compile()
310 {
311 echo 'BUILT_SOURCES: $(BUILT_SOURCES)' > "${T}"/Makefile.extra
312 emake -f Makefile -f "${T}"/Makefile.extra BUILT_SOURCES
313 local targets=(
314 systemd-udevd
315 udevadm
316 libudev.la
317 ata_id
318 cdrom_id
319 collect
320 scsi_id
321 v4l_id
322 accelerometer
323 mtd_probe
324 man/udev.7
325 man/udevadm.8
326 man/systemd-udevd.8
327 man/systemd-udevd.service.8
328 )
329 use keymap && targets+=( keymap )
330 use gudev && targets+=( libgudev-1.0.la )
331
332 emake "${targets[@]}"
333 if use doc
334 then
335 emake -C docs/libudev
336 use gudev && emake -C docs/gudev
337 fi
338 }
339
340 src_install()
341 {
342 local lib_LTLIBRARIES=libudev.la \
343 pkgconfiglib_DATA=src/libudev/libudev.pc
344
345 local targets=(
346 install-libLTLIBRARIES
347 install-includeHEADERS
348 install-libgudev_includeHEADERS
349 install-binPROGRAMS
350 install-rootlibexecPROGRAMS
351 install-udevlibexecPROGRAMS
352 install-dist_systemunitDATA
353 install-dist_udevconfDATA
354 install-dist_udevhomeSCRIPTS
355 install-dist_udevkeymapDATA
356 install-dist_udevkeymapforcerelDATA
357 install-dist_udevrulesDATA
358 install-girDATA
359 install-man7
360 install-man8
361 install-nodist_systemunitDATA
362 install-pkgconfiglibDATA
363 install-sharepkgconfigDATA
364 install-typelibsDATA
365 install-dist_docDATA
366 udev-confdirs
367 systemd-install-hook
368 )
369
370 if use gudev
371 then
372 lib_LTLIBRARIES+=" libgudev-1.0.la"
373 pkgconfiglib_DATA+=" src/gudev/gudev-1.0.pc"
374 fi
375
376 # add final values of variables:
377 targets+=(
378 rootlibexec_PROGRAMS=systemd-udevd
379 bin_PROGRAMS=udevadm
380 lib_LTLIBRARIES="${lib_LTLIBRARIES}"
381 MANPAGES="man/udev.7 man/udevadm.8 man/systemd-udevd.service.8"
382 MANPAGES_ALIAS="man/systemd-udevd.8"
383 dist_systemunit_DATA="units/systemd-udevd-control.socket \
384 units/systemd-udevd-kernel.socket"
385 nodist_systemunit_DATA="units/systemd-udevd.service \
386 units/systemd-udev-trigger.service \
387 units/systemd-udev-settle.service"
388 pkgconfiglib_DATA="${pkgconfiglib_DATA}"
389 )
390 emake DESTDIR="${D}" "${targets[@]}"
391 if use doc
392 then
393 emake -C docs/libudev DESTDIR="${D}" install
394 use gudev && emake -C docs/gudev DESTDIR="${D}" install
395 fi
396 dodoc TODO
397
398 prune_libtool_files --all
399 rm -f "${D}"/usr/lib/udev/rules.d/99-systemd.rules
400 rm -rf "${D}"/usr/share/doc/${PF}/LICENSE.*
401
402 # install gentoo-specific rules
403 insinto /usr/lib/udev/rules.d
404 doins "${FILESDIR}"/40-gentoo.rules
405
406 # install udevadm symlink
407 dosym ../usr/bin/udevadm /sbin/udevadm
408 }
409
410 pkg_preinst()
411 {
412 local htmldir
413 for htmldir in gudev libudev; do
414 if [[ -d ${ROOT}usr/share/gtk-doc/html/${htmldir} ]]
415 then
416 rm -rf "${ROOT}"usr/share/gtk-doc/html/${htmldir}
417 fi
418 if [[ -d ${D}/usr/share/doc/${PF}/html/${htmldir} ]]
419 then
420 dosym ../../doc/${PF}/html/${htmldir} \
421 /usr/share/gtk-doc/html/${htmldir}
422 fi
423 done
424 preserve_old_lib /$(get_libdir)/libudev.so.0
425 }
426
427 # This function determines if a directory is a mount point.
428 # It was lifted from dracut.
429 ismounted()
430 {
431 while read a m a; do
432 [[ $m = $1 ]] && return 0
433 done < "${ROOT}"/proc/mounts
434 return 1
435 }
436
437 pkg_postinst()
438 {
439 mkdir -p "${ROOT}"/run
440
441 # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766
442 # So try to remove it here (will only work if empty).
443 rmdir "${ROOT}"/dev/loop 2>/dev/null
444 if [[ -d ${ROOT}/dev/loop ]]
445 then
446 ewarn "Please make sure your remove /dev/loop,"
447 ewarn "else losetup may be confused when looking for unused devices."
448 fi
449
450 # people want reminders, I'll give them reminders. Odds are they will
451 # just ignore them anyway...
452
453 # 64-device-mapper.rules now gets installed by sys-fs/device-mapper
454 # remove it if user don't has sys-fs/device-mapper installed, 27 Jun 2007
455 if [[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] &&
456 ! has_version sys-fs/device-mapper
457 then
458 rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules
459 einfo "Removed unneeded file 64-device-mapper.rules"
460 fi
461
462 if [[ ${REPLACING_VERSIONS} ]] && [[ ${REPLACING_VERSIONS} < 189 ]]; then
463 ewarn
464 ewarn "Upstream has removed the persistent-net and persistent-cd rules"
465 ewarn "generator. If you need persistent names for these devices,"
466 ewarn "place udev rules for them in ${ROOT}etc/udev/rules.d."
467 ewarn "Be aware that you cannot directly swap device names, so persistent"
468 ewarn "rules for network devices should be like the ones at the following"
469 ewarn "URL:"
470 ewarn "http://bugs.gentoo.org/show_bug.cgi?id=433746#c1"
471 fi
472
473 if ismounted /usr
474 then
475 ewarn
476 ewarn "Your system has /usr on a separate partition. This means"
477 ewarn "you will need to use an initramfs to pre-mount /usr before"
478 ewarn "udev runs."
479 ewarn "This must be set up before your next reboot, or you may"
480 ewarn "experience failures which are very difficult to troubleshoot."
481 ewarn "For a more detailed explanation, see the following URL:"
482 ewarn "http://www.freedesktop.org/wiki/Software/systemd/separate-usr-is-broken"
483 ewarn
484 ewarn "For more information on setting up an initramfs, see the"
485 ewarn "following URL:"
486 ewarn "http://www.gentoo.org/doc/en/initramfs-guide.xml"
487 fi
488
489 if [[ -d ${ROOT}lib/udev ]]
490 then
491 ewarn
492 ewarn "This version of udev moves the files which were installed in"
493 ewarn "/lib/udev to /usr/lib/udev. We include a backward compatibility"
494 ewarn "patch for gentoo to allow the rules in /lib/udev/rules.d to be"
495 ewarn "read; however, bugs should be filed against packages which are"
496 ewarn "installing things in /lib/udev so they can be fixed."
497 fi
498
499 ewarn
500 ewarn "You need to restart udev as soon as possible to make the upgrade go"
501 ewarn "into effect."
502 ewarn "The method you use to do this depends on your init system."
503
504 preserve_old_lib_notify /$(get_libdir)/libudev.so.0
505
506 elog
507 elog "For more information on udev on Gentoo, writing udev rules, and"
508 elog " fixing known issues visit:"
509 elog " http://www.gentoo.org/doc/en/udev-guide.xml"
510
511 use hwdb && udevadm hwdb --update
512 }