Gentoo Archives: gentoo-commits

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