1 |
williamh 12/02/03 19:22:43 |
2 |
|
3 |
Modified: ChangeLog udev-9999.ebuild |
4 |
Added: udev-180.ebuild |
5 |
Log: |
6 |
udev 180 version bump. This version uses the split udev-init-scripts package for bug #396181. |
7 |
|
8 |
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.637 sys-fs/udev/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/ChangeLog?rev=1.637&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/ChangeLog?rev=1.637&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/ChangeLog?r1=1.636&r2=1.637 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v |
20 |
retrieving revision 1.636 |
21 |
retrieving revision 1.637 |
22 |
diff -u -r1.636 -r1.637 |
23 |
--- ChangeLog 1 Feb 2012 21:55:01 -0000 1.636 |
24 |
+++ ChangeLog 3 Feb 2012 19:22:43 -0000 1.637 |
25 |
@@ -1,6 +1,13 @@ |
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.636 2012/02/01 21:55:01 ranger Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.637 2012/02/03 19:22:43 williamh Exp $ |
30 |
+ |
31 |
+*udev-180 (03 Feb 2012) |
32 |
+ |
33 |
+ 03 Feb 2012; William Hubbs <williamh@g.o> +udev-180.ebuild, |
34 |
+ udev-9999.ebuild: |
35 |
+ udev 180 version bump. This version uses the split udev-init-scripts package |
36 |
+ for bug #396181. |
37 |
|
38 |
01 Feb 2012; Brent Baude <ranger@g.o> udev-171-r5.ebuild: |
39 |
Marking udev-171-r5 ppc for bug 399717 |
40 |
|
41 |
|
42 |
|
43 |
1.68 sys-fs/udev/udev-9999.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/udev-9999.ebuild?rev=1.68&view=markup |
46 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/udev-9999.ebuild?rev=1.68&content-type=text/plain |
47 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/udev-9999.ebuild?r1=1.67&r2=1.68 |
48 |
|
49 |
Index: udev-9999.ebuild |
50 |
=================================================================== |
51 |
RCS file: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-9999.ebuild,v |
52 |
retrieving revision 1.67 |
53 |
retrieving revision 1.68 |
54 |
diff -u -r1.67 -r1.68 |
55 |
--- udev-9999.ebuild 29 Dec 2011 19:32:46 -0000 1.67 |
56 |
+++ udev-9999.ebuild 3 Feb 2012 19:22:43 -0000 1.68 |
57 |
@@ -1,20 +1,18 @@ |
58 |
-# Copyright 1999-2011 Gentoo Foundation |
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.67 2011/12/29 19:32:46 williamh Exp $ |
62 |
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-9999.ebuild,v 1.68 2012/02/03 19:22:43 williamh Exp $ |
63 |
|
64 |
EAPI=4 |
65 |
|
66 |
KV_min=2.6.34 |
67 |
# patchversion=1 |
68 |
-scriptversion=6 |
69 |
-udev_rules_md5=7a7180a394e5bdea9011f68582b94fe8 |
70 |
+udev_rules_md5=ebc2cf422aa9e46cf7d9a555670412ba |
71 |
|
72 |
EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git" |
73 |
|
74 |
[[ ${PV} == "9999" ]] && vcs="git-2 autotools" |
75 |
inherit ${vcs} eutils flag-o-matic multilib toolchain-funcs linux-info systemd libtool |
76 |
|
77 |
-scriptname=${PN}-gentoo-scripts |
78 |
if [[ ${PV} != "9999" ]] |
79 |
then |
80 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
81 |
@@ -24,8 +22,6 @@ |
82 |
patchset=${P}-patchset-${patchversion} |
83 |
SRC_URI="${SRC_URI} mirror://gentoo/${patchset}.tar.bz2" |
84 |
fi |
85 |
- scriptname="${scriptname}-${scriptversion}" |
86 |
- SRC_URI="${SRC_URI} mirror://gentoo/${scriptname}.tar.bz2" |
87 |
fi |
88 |
|
89 |
DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" |
90 |
@@ -34,7 +30,7 @@ |
91 |
LICENSE="GPL-2" |
92 |
SLOT="0" |
93 |
IUSE="build selinux debug +rule_generator hwdb acl gudev introspection |
94 |
- keymap floppy edd doc" |
95 |
+ keymap floppy edd doc static-libs" |
96 |
|
97 |
COMMON_DEPEND="selinux? ( sys-libs/libselinux ) |
98 |
acl? ( sys-apps/acl dev-libs/glib:2 ) |
99 |
@@ -58,20 +54,22 @@ |
100 |
test? ( app-text/tree )" |
101 |
else |
102 |
DEPEND="${DEPEND} |
103 |
- doc? ( dev-util/gtk-doc )" |
104 |
+ doc? ( dev-util/gtk-doc )" |
105 |
fi |
106 |
|
107 |
RDEPEND="${COMMON_DEPEND} |
108 |
hwdb? ( >=sys-apps/usbutils-0.82 sys-apps/pciutils[-zlib] ) |
109 |
acl? ( sys-apps/coreutils[acl] ) |
110 |
+ sys-fs/udev-init-scripts |
111 |
!sys-apps/coldplug |
112 |
!<sys-fs/lvm2-2.02.45 |
113 |
!sys-fs/device-mapper |
114 |
>=sys-apps/baselayout-1.12.5" |
115 |
|
116 |
# required kernel options |
117 |
-CONFIG_CHECK="~INOTIFY_USER ~SIGNALFD ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 |
118 |
- ~!IDE ~BLK_DEV_BSG ~TMPFS_POSIX_ACL" |
119 |
+CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~HOTPLUG ~INOTIFY_USER ~NET ~PROC_FS |
120 |
+ ~SIGNALFD ~SYSFS ~TMPFS_POSIX_ACL |
121 |
+ ~!IDE ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2" |
122 |
|
123 |
udev_check_KV() |
124 |
{ |
125 |
@@ -107,22 +105,6 @@ |
126 |
fi |
127 |
} |
128 |
|
129 |
-if [[ $PV == 9999 ]] |
130 |
-then |
131 |
- src_unpack() |
132 |
- { |
133 |
- git-2_src_unpack |
134 |
- unset EGIT_BRANCH |
135 |
- unset EGIT_COMMIT |
136 |
- unset EGIT_DIR |
137 |
- unset EGIT_MASTER |
138 |
- EGIT_PROJECT="${scriptname}" |
139 |
- EGIT_REPO_URI="git://git.overlays.gentoo.org/proj/${scriptname}.git" |
140 |
- EGIT_SOURCEDIR="${WORKDIR}/${scriptname}" |
141 |
- git-2_src_unpack |
142 |
- } |
143 |
-fi |
144 |
- |
145 |
src_prepare() |
146 |
{ |
147 |
# backport some patches |
148 |
@@ -137,9 +119,12 @@ |
149 |
-i rules/{rules.d,arch}/*.rules \ |
150 |
|| die "failed to change group dialout to uucp" |
151 |
|
152 |
- if [[ ${PV} != 9999 ]] |
153 |
+ if [ ! -e configure ] |
154 |
then |
155 |
- # Make sure there is no sudden changes to upstream rules file |
156 |
+ gtkdocize --copy || die "gtkdocize failed" |
157 |
+ eautoreconf |
158 |
+ else |
159 |
+ # Make sure there are no sudden changes to upstream rules file |
160 |
# (more for my own needs than anything else ...) |
161 |
MD5=$(md5sum < "${S}/rules/rules.d/50-udev-default.rules") |
162 |
MD5=${MD5/ -/} |
163 |
@@ -149,13 +134,6 @@ |
164 |
eerror "md5sum: ${MD5}" |
165 |
die "50-udev-default.rules has been updated, please validate!" |
166 |
fi |
167 |
- fi |
168 |
- |
169 |
- if [[ ${PV} == 9999 ]] |
170 |
- then |
171 |
- gtkdocize --copy || die "gtkdocize failed" |
172 |
- eautoreconf |
173 |
- else |
174 |
elibtoolize |
175 |
fi |
176 |
} |
177 |
@@ -164,12 +142,10 @@ |
178 |
{ |
179 |
filter-flags -fprefetch-loop-arrays |
180 |
econf \ |
181 |
- --exec-prefix=/ \ |
182 |
+ --with-rootprefix=/ \ |
183 |
--libdir=/usr/$(get_libdir) \ |
184 |
- --with-rootlibdir=/$(get_libdir) \ |
185 |
- --libexecdir=/lib/udev \ |
186 |
- --enable-logging \ |
187 |
- --enable-static \ |
188 |
+ --libexecdir=/lib \ |
189 |
+ $(use_enable static-libs static) \ |
190 |
$(use_with selinux) \ |
191 |
$(use_enable debug) \ |
192 |
$(use_enable rule_generator) \ |
193 |
@@ -195,21 +171,15 @@ |
194 |
|
195 |
if use keymap |
196 |
then |
197 |
- dodoc extras/keymap/README.keymap.txt |
198 |
+ dodoc src/extras/keymap/README.keymap.txt |
199 |
fi |
200 |
|
201 |
- # compatibility symlinks: |
202 |
- # udevadm is now in /bin and udevd is in /lib/udev. |
203 |
- dosym "/bin/udevadm" /sbin/udevadm |
204 |
- dosym "/lib/udev/udevd" /sbin/udevd |
205 |
+ # udevadm is now in /usr/bin. |
206 |
+ dosym /usr/bin/udevadm /sbin/udevadm |
207 |
|
208 |
# create symlinks for these utilities to /sbin |
209 |
# where multipath-tools expect them to be (Bug #168588) |
210 |
- dosym "../lib/udev/scsi_id" /sbin/scsi_id |
211 |
- |
212 |
- # Add gentoo stuff to udev.conf |
213 |
- echo "# If you need to change mount-options, do it in /etc/fstab" \ |
214 |
- >> "${D}"/etc/udev/udev.conf |
215 |
+ dosym "/lib/udevd/scsi_id" /sbin/scsi_id |
216 |
|
217 |
# Now install rules |
218 |
insinto /lib/udev/rules.d/ |
219 |
@@ -222,16 +192,6 @@ |
220 |
then |
221 |
doins "rules/arch/40-${ARCH}.rules" |
222 |
fi |
223 |
- |
224 |
- cd "${WORKDIR}/${scriptname}" |
225 |
- doconfd conf.d/* |
226 |
- exeinto /lib/udev |
227 |
- doexe helpers/* |
228 |
- doinitd init.d/* |
229 |
- insinto /etc/modprobe.d |
230 |
- doins modprobe.d/* |
231 |
- insinto /lib/udev/rules.d |
232 |
- doins rules.d/* |
233 |
} |
234 |
|
235 |
# 19 Nov 2008 |
236 |
@@ -270,8 +230,8 @@ |
237 |
# abort if there is no udevd running |
238 |
[[ -n $(pidof udevd) ]] || return |
239 |
|
240 |
- # abort if no /dev/.udev exists |
241 |
- [[ -e /dev/.udev ]] || return |
242 |
+ # abort if no /run/udev exists |
243 |
+ [[ -e /run/udev ]] || return |
244 |
|
245 |
elog |
246 |
elog "restarting udevd now." |
247 |
@@ -280,7 +240,7 @@ |
248 |
sleep 1 |
249 |
killall -9 udevd &>/dev/null |
250 |
|
251 |
- /sbin/udevd --daemon |
252 |
+ /lib/udev/udevd --daemon |
253 |
sleep 3 |
254 |
if [[ ! -n $(pidof udevd) ]] |
255 |
then |
256 |
@@ -292,64 +252,6 @@ |
257 |
fi |
258 |
} |
259 |
|
260 |
-postinst_init_scripts() |
261 |
-{ |
262 |
- local enable_postmount=false |
263 |
- |
264 |
- # FIXME: inconsistent handling of init-scripts here |
265 |
- # * udev is added to sysinit in openrc-ebuild |
266 |
- # * we add udev-postmount to default in here |
267 |
- # |
268 |
- |
269 |
- # If we are building stages, add udev to the sysinit runlevel automatically. |
270 |
- if use build |
271 |
- then |
272 |
- if [[ -x "${ROOT}"/etc/init.d/udev \ |
273 |
- && -d "${ROOT}"/etc/runlevels/sysinit ]] |
274 |
- then |
275 |
- ln -s /etc/init.d/udev "${ROOT}"/etc/runlevels/sysinit/udev |
276 |
- fi |
277 |
- enable_postmount=true |
278 |
- fi |
279 |
- |
280 |
- # migration to >=openrc-0.4 |
281 |
- if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]] |
282 |
- then |
283 |
- ewarn |
284 |
- ewarn "You need to add the udev init script to the runlevel sysinit," |
285 |
- ewarn "else your system will not be able to boot" |
286 |
- ewarn "after updating to >=openrc-0.4.0" |
287 |
- ewarn "Run this to enable udev for >=openrc-0.4.0:" |
288 |
- ewarn "\trc-update add udev sysinit" |
289 |
- ewarn |
290 |
- fi |
291 |
- |
292 |
- # add udev-postmount to default runlevel instead of that ugly injecting |
293 |
- # like a hotplug event, 2009/10/15 |
294 |
- |
295 |
- # already enabled? |
296 |
- [[ -e "${ROOT}"/etc/runlevels/default/udev-postmount ]] && return |
297 |
- |
298 |
- [[ -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=true |
299 |
- [[ "${ROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=true |
300 |
- |
301 |
- if $enable_postmount |
302 |
- then |
303 |
- local initd=udev-postmount |
304 |
- |
305 |
- if [[ -e ${ROOT}/etc/init.d/${initd} ]] && \ |
306 |
- [[ ! -e ${ROOT}/etc/runlevels/default/${initd} ]] |
307 |
- then |
308 |
- ln -snf /etc/init.d/${initd} "${ROOT}"/etc/runlevels/default/${initd} |
309 |
- elog "Auto-adding '${initd}' service to your default runlevel" |
310 |
- fi |
311 |
- else |
312 |
- elog "You should add the udev-postmount service to default runlevel." |
313 |
- elog "Run this to add it:" |
314 |
- elog "\trc-update add udev-postmount default" |
315 |
- fi |
316 |
-} |
317 |
- |
318 |
# This function determines if a directory is a mount point. |
319 |
# It was lifted from dracut. |
320 |
ismounted() |
321 |
@@ -362,6 +264,7 @@ |
322 |
|
323 |
pkg_postinst() |
324 |
{ |
325 |
+ mkdir -p "${ROOT}"/run |
326 |
fix_old_persistent_net_rules |
327 |
|
328 |
# "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766 |
329 |
@@ -375,8 +278,6 @@ |
330 |
|
331 |
restart_udevd |
332 |
|
333 |
- postinst_init_scripts |
334 |
- |
335 |
# people want reminders, I'll give them reminders. Odds are they will |
336 |
# just ignore them anyway... |
337 |
|
338 |
@@ -418,7 +319,7 @@ |
339 |
|
340 |
ewarn |
341 |
ewarn "If you build an initramfs including udev, then please" |
342 |
- ewarn "make sure that the /sbin/udevadm binary gets included," |
343 |
+ ewarn "make sure that the /usr/bin/udevadm binary gets included," |
344 |
ewarn "and your scripts changed to use it,as it replaces the" |
345 |
ewarn "old helper apps udevinfo, udevtrigger, ..." |
346 |
|
347 |
|
348 |
|
349 |
|
350 |
1.1 sys-fs/udev/udev-180.ebuild |
351 |
|
352 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/udev-180.ebuild?rev=1.1&view=markup |
353 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/udev-180.ebuild?rev=1.1&content-type=text/plain |
354 |
|
355 |
Index: udev-180.ebuild |
356 |
=================================================================== |
357 |
# Copyright 1999-2012 Gentoo Foundation |
358 |
# Distributed under the terms of the GNU General Public License v2 |
359 |
# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-180.ebuild,v 1.1 2012/02/03 19:22:43 williamh Exp $ |
360 |
|
361 |
EAPI=4 |
362 |
|
363 |
KV_min=2.6.34 |
364 |
# patchversion=1 |
365 |
udev_rules_md5=ebc2cf422aa9e46cf7d9a555670412ba |
366 |
|
367 |
EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git" |
368 |
|
369 |
[[ ${PV} == "9999" ]] && vcs="git-2 autotools" |
370 |
inherit ${vcs} eutils flag-o-matic multilib toolchain-funcs linux-info systemd libtool |
371 |
|
372 |
if [[ ${PV} != "9999" ]] |
373 |
then |
374 |
KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86" |
375 |
SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2" |
376 |
if [[ -n "${patchversion}" ]] |
377 |
then |
378 |
patchset=${P}-patchset-${patchversion} |
379 |
SRC_URI="${SRC_URI} mirror://gentoo/${patchset}.tar.bz2" |
380 |
fi |
381 |
fi |
382 |
|
383 |
DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" |
384 |
HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" |
385 |
|
386 |
LICENSE="GPL-2" |
387 |
SLOT="0" |
388 |
IUSE="build selinux debug +rule_generator hwdb acl gudev introspection |
389 |
keymap floppy edd doc static-libs" |
390 |
|
391 |
COMMON_DEPEND="selinux? ( sys-libs/libselinux ) |
392 |
acl? ( sys-apps/acl dev-libs/glib:2 ) |
393 |
gudev? ( dev-libs/glib:2 ) |
394 |
introspection? ( dev-libs/gobject-introspection ) |
395 |
>=sys-apps/util-linux-2.20 |
396 |
>=sys-libs/glibc-2.10" |
397 |
|
398 |
DEPEND="${COMMON_DEPEND} |
399 |
keymap? ( dev-util/gperf ) |
400 |
dev-util/pkgconfig |
401 |
virtual/os-headers |
402 |
!<sys-kernel/linux-headers-2.6.34" |
403 |
|
404 |
if [[ $PV == "9999" ]] |
405 |
then |
406 |
RESTRICT="test? ( userpriv )" |
407 |
IUSE="${IUSE} test" |
408 |
DEPEND="${DEPEND} |
409 |
dev-util/gtk-doc |
410 |
test? ( app-text/tree )" |
411 |
else |
412 |
DEPEND="${DEPEND} |
413 |
doc? ( dev-util/gtk-doc )" |
414 |
fi |
415 |
|
416 |
RDEPEND="${COMMON_DEPEND} |
417 |
hwdb? ( >=sys-apps/usbutils-0.82 sys-apps/pciutils[-zlib] ) |
418 |
acl? ( sys-apps/coreutils[acl] ) |
419 |
sys-fs/udev-init-scripts |
420 |
!sys-apps/coldplug |
421 |
!<sys-fs/lvm2-2.02.45 |
422 |
!sys-fs/device-mapper |
423 |
>=sys-apps/baselayout-1.12.5" |
424 |
|
425 |
# required kernel options |
426 |
CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~HOTPLUG ~INOTIFY_USER ~NET ~PROC_FS |
427 |
~SIGNALFD ~SYSFS ~TMPFS_POSIX_ACL |
428 |
~!IDE ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2" |
429 |
|
430 |
udev_check_KV() |
431 |
{ |
432 |
if kernel_is lt ${KV_min//./ } |
433 |
then |
434 |
return 1 |
435 |
fi |
436 |
return 0 |
437 |
} |
438 |
|
439 |
pkg_setup() |
440 |
{ |
441 |
linux-info_pkg_setup |
442 |
|
443 |
# always print kernel version requirements |
444 |
ewarn |
445 |
ewarn "${P} does not support Linux kernel before version ${KV_min}!" |
446 |
|
447 |
if ! udev_check_KV |
448 |
then |
449 |
eerror "Your kernel version (${KV_FULL}) is too old to run ${P}" |
450 |
fi |
451 |
|
452 |
KV_FULL_SRC=${KV_FULL} |
453 |
get_running_version |
454 |
if ! udev_check_KV |
455 |
then |
456 |
eerror |
457 |
eerror "udev cannot be restarted after emerging," |
458 |
eerror "as your running kernel version (${KV_FULL}) is too old." |
459 |
eerror "You really need to use a newer kernel after a reboot!" |
460 |
NO_RESTART=1 |
461 |
fi |
462 |
} |
463 |
|
464 |
src_prepare() |
465 |
{ |
466 |
# backport some patches |
467 |
if [[ -n "${patchset}" ]] |
468 |
then |
469 |
EPATCH_SOURCE="${WORKDIR}/${patchset}" EPATCH_SUFFIX="patch" \ |
470 |
EPATCH_FORCE="yes" epatch |
471 |
fi |
472 |
|
473 |
# change rules back to group uucp instead of dialout for now |
474 |
sed -e 's/GROUP="dialout"/GROUP="uucp"/' \ |
475 |
-i rules/{rules.d,arch}/*.rules \ |
476 |
|| die "failed to change group dialout to uucp" |
477 |
|
478 |
if [ ! -e configure ] |
479 |
then |
480 |
gtkdocize --copy || die "gtkdocize failed" |
481 |
eautoreconf |
482 |
else |
483 |
# Make sure there are no sudden changes to upstream rules file |
484 |
# (more for my own needs than anything else ...) |
485 |
MD5=$(md5sum < "${S}/rules/rules.d/50-udev-default.rules") |
486 |
MD5=${MD5/ -/} |
487 |
if [[ ${MD5} != ${udev_rules_md5} ]] |
488 |
then |
489 |
eerror "50-udev-default.rules has been updated, please validate!" |
490 |
eerror "md5sum: ${MD5}" |
491 |
die "50-udev-default.rules has been updated, please validate!" |
492 |
fi |
493 |
elibtoolize |
494 |
fi |
495 |
} |
496 |
|
497 |
src_configure() |
498 |
{ |
499 |
filter-flags -fprefetch-loop-arrays |
500 |
econf \ |
501 |
--with-rootprefix=/ \ |
502 |
--libdir=/usr/$(get_libdir) \ |
503 |
--libexecdir=/lib \ |
504 |
$(use_enable static-libs static) \ |
505 |
$(use_with selinux) \ |
506 |
$(use_enable debug) \ |
507 |
$(use_enable rule_generator) \ |
508 |
$(use_enable hwdb) \ |
509 |
--with-pci-ids-path=/usr/share/misc/pci.ids \ |
510 |
--with-usb-ids-path=/usr/share/misc/usb.ids \ |
511 |
$(use_enable acl udev_acl) \ |
512 |
$(use_enable gudev) \ |
513 |
$(use_enable introspection) \ |
514 |
$(use_enable keymap) \ |
515 |
$(use_enable floppy) \ |
516 |
$(use_enable edd) \ |
517 |
$(use_enable doc gtk-doc) \ |
518 |
$(systemd_with_unitdir) |
519 |
} |
520 |
|
521 |
src_install() |
522 |
{ |
523 |
emake DESTDIR="${D}" docdir="/usr/share/doc/${P}" install |
524 |
|
525 |
# documentation |
526 |
dodoc ChangeLog README TODO |
527 |
|
528 |
if use keymap |
529 |
then |
530 |
dodoc src/extras/keymap/README.keymap.txt |
531 |
fi |
532 |
|
533 |
# udevadm is now in /usr/bin. |
534 |
dosym /usr/bin/udevadm /sbin/udevadm |
535 |
|
536 |
# create symlinks for these utilities to /sbin |
537 |
# where multipath-tools expect them to be (Bug #168588) |
538 |
dosym "/lib/udevd/scsi_id" /sbin/scsi_id |
539 |
|
540 |
# Now install rules |
541 |
insinto /lib/udev/rules.d/ |
542 |
|
543 |
# support older kernels |
544 |
doins rules/misc/30-kernel-compat.rules |
545 |
|
546 |
# add arch specific rules |
547 |
if [[ -f rules/arch/40-${ARCH}.rules ]] |
548 |
then |
549 |
doins "rules/arch/40-${ARCH}.rules" |
550 |
fi |
551 |
} |
552 |
|
553 |
# 19 Nov 2008 |
554 |
fix_old_persistent_net_rules() |
555 |
{ |
556 |
local rules="${ROOT}"/etc/udev/rules.d/70-persistent-net.rules |
557 |
[[ -f ${rules} ]] || return |
558 |
|
559 |
elog |
560 |
elog "Updating persistent-net rules file" |
561 |
|
562 |
# Change ATTRS to ATTR matches, Bug #246927 |
563 |
sed -i -e 's/ATTRS{/ATTR{/g' "${rules}" |
564 |
|
565 |
# Add KERNEL matches if missing, Bug #246849 |
566 |
sed -ri \ |
567 |
-e '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \ |
568 |
"${rules}" |
569 |
} |
570 |
|
571 |
# See Bug #129204 for a discussion about restarting udevd |
572 |
restart_udevd() |
573 |
{ |
574 |
if [[ ${NO_RESTART} = "1" ]] |
575 |
then |
576 |
ewarn "Not restarting udevd, as your kernel is too old!" |
577 |
return |
578 |
fi |
579 |
|
580 |
# need to merge to our system |
581 |
[[ ${ROOT} = / ]] || return |
582 |
|
583 |
# check if root of init-process is identical to ours (not in chroot) |
584 |
[[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] || return |
585 |
|
586 |
# abort if there is no udevd running |
587 |
[[ -n $(pidof udevd) ]] || return |
588 |
|
589 |
# abort if no /run/udev exists |
590 |
[[ -e /run/udev ]] || return |
591 |
|
592 |
elog |
593 |
elog "restarting udevd now." |
594 |
|
595 |
killall -15 udevd &>/dev/null |
596 |
sleep 1 |
597 |
killall -9 udevd &>/dev/null |
598 |
|
599 |
/lib/udev/udevd --daemon |
600 |
sleep 3 |
601 |
if [[ ! -n $(pidof udevd) ]] |
602 |
then |
603 |
eerror "FATAL: udev died, please check your kernel is" |
604 |
eerror "new enough and configured correctly for ${P}." |
605 |
eerror |
606 |
eerror "Please have a look at this before rebooting." |
607 |
eerror "If in doubt, please downgrade udev back to your old version" |
608 |
fi |
609 |
} |
610 |
|
611 |
# This function determines if a directory is a mount point. |
612 |
# It was lifted from dracut. |
613 |
ismounted() |
614 |
{ |
615 |
while read a m a; do |
616 |
[ "$m" = "$1" ] && return 0 |
617 |
done < "${ROOT}"/proc/mounts |
618 |
return 1 |
619 |
} |
620 |
|
621 |
pkg_postinst() |
622 |
{ |
623 |
mkdir -p "${ROOT}"/run |
624 |
fix_old_persistent_net_rules |
625 |
|
626 |
# "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766 |
627 |
# So try to remove it here (will only work if empty). |
628 |
rmdir "${ROOT}"/dev/loop 2>/dev/null |
629 |
if [[ -d "${ROOT}"/dev/loop ]] |
630 |
then |
631 |
ewarn "Please make sure your remove /dev/loop," |
632 |
ewarn "else losetup may be confused when looking for unused devices." |
633 |
fi |
634 |
|
635 |
restart_udevd |
636 |
|
637 |
# people want reminders, I'll give them reminders. Odds are they will |
638 |
# just ignore them anyway... |
639 |
|
640 |
# Removing some device-nodes we thought we need some time ago, 25 Jan 2007 |
641 |
if [[ -d ${ROOT}/lib/udev/devices ]] |
642 |
then |
643 |
rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom} |
644 |
fi |
645 |
|
646 |
# Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007 |
647 |
if [[ -d ${ROOT}/etc/dev.d ]] |
648 |
then |
649 |
rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null |
650 |
if [[ -d ${ROOT}/etc/dev.d ]] |
651 |
then |
652 |
ewarn "You still have the directory /etc/dev.d on your system." |
653 |
ewarn "This is no longer used by udev and can be removed." |
654 |
fi |
655 |
fi |
656 |
|
657 |
# 64-device-mapper.rules now gets installed by sys-fs/device-mapper |
658 |
# remove it if user don't has sys-fs/device-mapper installed, 27 Jun 2007 |
659 |
if [[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] && |
660 |
! has_version sys-fs/device-mapper |
661 |
then |
662 |
rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules |
663 |
einfo "Removed unneeded file 64-device-mapper.rules" |
664 |
fi |
665 |
|
666 |
# requested in Bug #225033: |
667 |
elog |
668 |
elog "persistent-net assigns fixed names to network devices." |
669 |
elog "If you have problems with the persistent-net rules," |
670 |
elog "just delete the rules file" |
671 |
elog "\trm ${ROOT}etc/udev/rules.d/70-persistent-net.rules" |
672 |
elog "then reboot." |
673 |
elog |
674 |
elog "This may however number your devices in a different way than they are now." |
675 |
|
676 |
ewarn |
677 |
ewarn "If you build an initramfs including udev, then please" |
678 |
ewarn "make sure that the /usr/bin/udevadm binary gets included," |
679 |
ewarn "and your scripts changed to use it,as it replaces the" |
680 |
ewarn "old helper apps udevinfo, udevtrigger, ..." |
681 |
|
682 |
ewarn |
683 |
ewarn "mount options for directory /dev are no longer" |
684 |
ewarn "set in /etc/udev/udev.conf, but in /etc/fstab" |
685 |
ewarn "as for other directories." |
686 |
|
687 |
ewarn |
688 |
ewarn "If you use /dev/md/*, /dev/loop/* or /dev/rd/*," |
689 |
ewarn "then please migrate over to using the device names" |
690 |
ewarn "/dev/md*, /dev/loop* and /dev/ram*." |
691 |
ewarn "The devfs-compat rules have been removed." |
692 |
ewarn "For reference see Bug #269359." |
693 |
|
694 |
ewarn |
695 |
ewarn "Rules for /dev/hd* devices have been removed" |
696 |
ewarn "Please migrate to libata." |
697 |
|
698 |
ewarn |
699 |
ewarn "action_modeswitch has been removed by upstream." |
700 |
ewarn "Please use sys-apps/usb_modeswitch." |
701 |
|
702 |
if ismounted /usr |
703 |
then |
704 |
ewarn |
705 |
ewarn "Your system has /usr on a separate partition. This means" |
706 |
ewarn "you will need to use an initramfs to pre-mount /usr before" |
707 |
ewarn "udev runs." |
708 |
ewarn "This must be set up before your next reboot, or you may" |
709 |
ewarn "experience failures which are very difficult to troubleshoot." |
710 |
ewarn "For a more detailed explanation, see the following URL:" |
711 |
ewarn "http://www.freedesktop.org/wiki/Software/systemd/separate-usr-is-broken" |
712 |
fi |
713 |
|
714 |
elog |
715 |
elog "For more information on udev on Gentoo, writing udev rules, and" |
716 |
elog " fixing known issues visit:" |
717 |
elog " http://www.gentoo.org/doc/en/udev-guide.xml" |
718 |
} |