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