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