1 |
williamh 12/02/08 04:26:59 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: udev-181.ebuild |
5 |
Log: |
6 |
version bump |
7 |
|
8 |
(Portage version: 2.2.0_alpha85/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.642 sys-fs/udev/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/ChangeLog?rev=1.642&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/ChangeLog?rev=1.642&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/ChangeLog?r1=1.641&r2=1.642 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v |
20 |
retrieving revision 1.641 |
21 |
retrieving revision 1.642 |
22 |
diff -u -r1.641 -r1.642 |
23 |
--- ChangeLog 7 Feb 2012 15:39:16 -0000 1.641 |
24 |
+++ ChangeLog 8 Feb 2012 04:26:59 -0000 1.642 |
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.641 2012/02/07 15:39:16 jer Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.642 2012/02/08 04:26:59 williamh Exp $ |
30 |
+ |
31 |
+*udev-181 (08 Feb 2012) |
32 |
+ |
33 |
+ 08 Feb 2012; William Hubbs <williamh@g.o> +udev-181.ebuild: |
34 |
+ version bump |
35 |
|
36 |
07 Feb 2012; Jeroen Roovers <jer@g.o> udev-171-r5.ebuild: |
37 |
Stable for HPPA (bug #399717). |
38 |
|
39 |
|
40 |
|
41 |
1.1 sys-fs/udev/udev-181.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/udev-181.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/udev/udev-181.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: udev-181.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-181.ebuild,v 1.1 2012/02/08 04:26:59 williamh Exp $ |
51 |
|
52 |
EAPI=4 |
53 |
|
54 |
KV_min=2.6.34 |
55 |
# patchversion=1 |
56 |
udev_rules_md5=ebc2cf422aa9e46cf7d9a555670412ba |
57 |
|
58 |
EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git" |
59 |
|
60 |
[[ ${PV} == "9999" ]] && vcs="git-2 autotools" |
61 |
inherit ${vcs} eutils flag-o-matic multilib toolchain-funcs linux-info systemd libtool |
62 |
|
63 |
if [[ ${PV} != "9999" ]] |
64 |
then |
65 |
KEYWORDS="~amd64 ~arm ~hppa ~ppc ~ppc64 ~x86" |
66 |
SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2" |
67 |
if [[ -n "${patchversion}" ]] |
68 |
then |
69 |
patchset=${P}-patchset-${patchversion} |
70 |
SRC_URI="${SRC_URI} mirror://gentoo/${patchset}.tar.bz2" |
71 |
fi |
72 |
fi |
73 |
|
74 |
DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" |
75 |
HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" |
76 |
|
77 |
LICENSE="GPL-2" |
78 |
SLOT="0" |
79 |
IUSE="build selinux debug +rule_generator hwdb acl gudev introspection |
80 |
keymap floppy edd doc static-libs" |
81 |
|
82 |
COMMON_DEPEND="selinux? ( sys-libs/libselinux ) |
83 |
acl? ( sys-apps/acl dev-libs/glib:2 ) |
84 |
gudev? ( dev-libs/glib:2 ) |
85 |
introspection? ( dev-libs/gobject-introspection ) |
86 |
~sys-apps/kmod-5 |
87 |
>=sys-apps/util-linux-2.20 |
88 |
>=sys-libs/glibc-2.10" |
89 |
|
90 |
DEPEND="${COMMON_DEPEND} |
91 |
keymap? ( dev-util/gperf ) |
92 |
dev-util/pkgconfig |
93 |
virtual/os-headers |
94 |
!<sys-kernel/linux-headers-2.6.34" |
95 |
|
96 |
if [[ $PV == "9999" ]] |
97 |
then |
98 |
RESTRICT="test? ( userpriv )" |
99 |
IUSE="${IUSE} test" |
100 |
DEPEND="${DEPEND} |
101 |
dev-util/gtk-doc |
102 |
test? ( app-text/tree )" |
103 |
else |
104 |
DEPEND="${DEPEND} |
105 |
doc? ( dev-util/gtk-doc )" |
106 |
fi |
107 |
|
108 |
RDEPEND="${COMMON_DEPEND} |
109 |
hwdb? ( >=sys-apps/usbutils-0.82 sys-apps/pciutils[-zlib] ) |
110 |
acl? ( sys-apps/coreutils[acl] ) |
111 |
sys-fs/udev-init-scripts |
112 |
!sys-apps/coldplug |
113 |
!<sys-fs/lvm2-2.02.45 |
114 |
!sys-fs/device-mapper |
115 |
>=sys-apps/baselayout-1.12.5" |
116 |
|
117 |
# required kernel options |
118 |
CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~HOTPLUG ~INOTIFY_USER ~NET ~PROC_FS |
119 |
~SIGNALFD ~SYSFS ~TMPFS_POSIX_ACL |
120 |
~!IDE ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2" |
121 |
|
122 |
udev_check_KV() |
123 |
{ |
124 |
if kernel_is lt ${KV_min//./ } |
125 |
then |
126 |
return 1 |
127 |
fi |
128 |
return 0 |
129 |
} |
130 |
|
131 |
pkg_setup() |
132 |
{ |
133 |
linux-info_pkg_setup |
134 |
|
135 |
# always print kernel version requirements |
136 |
ewarn |
137 |
ewarn "${P} does not support Linux kernel before version ${KV_min}!" |
138 |
|
139 |
if ! udev_check_KV |
140 |
then |
141 |
eerror "Your kernel version (${KV_FULL}) is too old to run ${P}" |
142 |
fi |
143 |
|
144 |
KV_FULL_SRC=${KV_FULL} |
145 |
get_running_version |
146 |
if ! udev_check_KV |
147 |
then |
148 |
eerror |
149 |
eerror "udev cannot be restarted after emerging," |
150 |
eerror "as your running kernel version (${KV_FULL}) is too old." |
151 |
eerror "You really need to use a newer kernel after a reboot!" |
152 |
NO_RESTART=1 |
153 |
fi |
154 |
} |
155 |
|
156 |
src_prepare() |
157 |
{ |
158 |
# backport some patches |
159 |
if [[ -n "${patchset}" ]] |
160 |
then |
161 |
EPATCH_SOURCE="${WORKDIR}/${patchset}" EPATCH_SUFFIX="patch" \ |
162 |
EPATCH_FORCE="yes" epatch |
163 |
fi |
164 |
|
165 |
# change rules back to group uucp instead of dialout for now |
166 |
sed -e 's/GROUP="dialout"/GROUP="uucp"/' \ |
167 |
-i rules/{rules.d,arch}/*.rules \ |
168 |
|| die "failed to change group dialout to uucp" |
169 |
|
170 |
if [ ! -e configure ] |
171 |
then |
172 |
gtkdocize --copy || die "gtkdocize failed" |
173 |
eautoreconf |
174 |
else |
175 |
# Make sure there are no sudden changes to upstream rules file |
176 |
# (more for my own needs than anything else ...) |
177 |
MD5=$(md5sum < "${S}/rules/rules.d/50-udev-default.rules") |
178 |
MD5=${MD5/ -/} |
179 |
if [[ ${MD5} != ${udev_rules_md5} ]] |
180 |
then |
181 |
eerror "50-udev-default.rules has been updated, please validate!" |
182 |
eerror "md5sum: ${MD5}" |
183 |
die "50-udev-default.rules has been updated, please validate!" |
184 |
fi |
185 |
elibtoolize |
186 |
fi |
187 |
} |
188 |
|
189 |
src_configure() |
190 |
{ |
191 |
filter-flags -fprefetch-loop-arrays |
192 |
econf \ |
193 |
--with-rootprefix=/ \ |
194 |
--libdir=/usr/$(get_libdir) \ |
195 |
--libexecdir=/lib \ |
196 |
$(use_enable static-libs static) \ |
197 |
$(use_with selinux) \ |
198 |
$(use_enable debug) \ |
199 |
$(use_enable rule_generator) \ |
200 |
$(use_enable hwdb) \ |
201 |
--with-pci-ids-path=/usr/share/misc/pci.ids \ |
202 |
--with-usb-ids-path=/usr/share/misc/usb.ids \ |
203 |
$(use_enable acl udev_acl) \ |
204 |
$(use_enable gudev) \ |
205 |
$(use_enable introspection) \ |
206 |
$(use_enable keymap) \ |
207 |
$(use_enable floppy) \ |
208 |
$(use_enable edd) \ |
209 |
$(use_enable doc gtk-doc) \ |
210 |
$(systemd_with_unitdir) |
211 |
} |
212 |
|
213 |
src_install() |
214 |
{ |
215 |
emake DESTDIR="${D}" docdir="/usr/share/doc/${P}" install |
216 |
|
217 |
# documentation |
218 |
dodoc ChangeLog README TODO |
219 |
|
220 |
if use keymap |
221 |
then |
222 |
dodoc src/extras/keymap/README.keymap.txt |
223 |
fi |
224 |
|
225 |
# udevadm is now in /usr/bin. |
226 |
dosym /usr/bin/udevadm /sbin/udevadm |
227 |
|
228 |
# create symlinks for these utilities to /sbin |
229 |
# where multipath-tools expect them to be (Bug #168588) |
230 |
dosym "/lib/udevd/scsi_id" /sbin/scsi_id |
231 |
|
232 |
# Now install rules |
233 |
insinto /lib/udev/rules.d/ |
234 |
|
235 |
# support older kernels |
236 |
doins rules/misc/30-kernel-compat.rules |
237 |
|
238 |
# add arch specific rules |
239 |
if [[ -f rules/arch/40-${ARCH}.rules ]] |
240 |
then |
241 |
doins "rules/arch/40-${ARCH}.rules" |
242 |
fi |
243 |
} |
244 |
|
245 |
# 19 Nov 2008 |
246 |
fix_old_persistent_net_rules() |
247 |
{ |
248 |
local rules="${ROOT}"/etc/udev/rules.d/70-persistent-net.rules |
249 |
[[ -f ${rules} ]] || return |
250 |
|
251 |
elog |
252 |
elog "Updating persistent-net rules file" |
253 |
|
254 |
# Change ATTRS to ATTR matches, Bug #246927 |
255 |
sed -i -e 's/ATTRS{/ATTR{/g' "${rules}" |
256 |
|
257 |
# Add KERNEL matches if missing, Bug #246849 |
258 |
sed -ri \ |
259 |
-e '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \ |
260 |
"${rules}" |
261 |
} |
262 |
|
263 |
# See Bug #129204 for a discussion about restarting udevd |
264 |
restart_udevd() |
265 |
{ |
266 |
if [[ ${NO_RESTART} = "1" ]] |
267 |
then |
268 |
ewarn "Not restarting udevd, as your kernel is too old!" |
269 |
return |
270 |
fi |
271 |
|
272 |
# need to merge to our system |
273 |
[[ ${ROOT} = / ]] || return |
274 |
|
275 |
# check if root of init-process is identical to ours (not in chroot) |
276 |
[[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] || return |
277 |
|
278 |
# abort if there is no udevd running |
279 |
[[ -n $(pidof udevd) ]] || return |
280 |
|
281 |
# abort if no /run/udev exists |
282 |
[[ -e /run/udev ]] || return |
283 |
|
284 |
elog |
285 |
elog "restarting udevd now." |
286 |
|
287 |
killall -15 udevd &>/dev/null |
288 |
sleep 1 |
289 |
killall -9 udevd &>/dev/null |
290 |
|
291 |
/lib/udev/udevd --daemon |
292 |
sleep 3 |
293 |
if [[ ! -n $(pidof udevd) ]] |
294 |
then |
295 |
eerror "FATAL: udev died, please check your kernel is" |
296 |
eerror "new enough and configured correctly for ${P}." |
297 |
eerror |
298 |
eerror "Please have a look at this before rebooting." |
299 |
eerror "If in doubt, please downgrade udev back to your old version" |
300 |
fi |
301 |
} |
302 |
|
303 |
# This function determines if a directory is a mount point. |
304 |
# It was lifted from dracut. |
305 |
ismounted() |
306 |
{ |
307 |
while read a m a; do |
308 |
[ "$m" = "$1" ] && return 0 |
309 |
done < "${ROOT}"/proc/mounts |
310 |
return 1 |
311 |
} |
312 |
|
313 |
pkg_postinst() |
314 |
{ |
315 |
mkdir -p "${ROOT}"/run |
316 |
fix_old_persistent_net_rules |
317 |
|
318 |
# "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766 |
319 |
# So try to remove it here (will only work if empty). |
320 |
rmdir "${ROOT}"/dev/loop 2>/dev/null |
321 |
if [[ -d "${ROOT}"/dev/loop ]] |
322 |
then |
323 |
ewarn "Please make sure your remove /dev/loop," |
324 |
ewarn "else losetup may be confused when looking for unused devices." |
325 |
fi |
326 |
|
327 |
restart_udevd |
328 |
|
329 |
# people want reminders, I'll give them reminders. Odds are they will |
330 |
# just ignore them anyway... |
331 |
|
332 |
# Removing some device-nodes we thought we need some time ago, 25 Jan 2007 |
333 |
if [[ -d ${ROOT}/lib/udev/devices ]] |
334 |
then |
335 |
rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom} |
336 |
fi |
337 |
|
338 |
# Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007 |
339 |
if [[ -d ${ROOT}/etc/dev.d ]] |
340 |
then |
341 |
rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null |
342 |
if [[ -d ${ROOT}/etc/dev.d ]] |
343 |
then |
344 |
ewarn "You still have the directory /etc/dev.d on your system." |
345 |
ewarn "This is no longer used by udev and can be removed." |
346 |
fi |
347 |
fi |
348 |
|
349 |
# 64-device-mapper.rules now gets installed by sys-fs/device-mapper |
350 |
# remove it if user don't has sys-fs/device-mapper installed, 27 Jun 2007 |
351 |
if [[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] && |
352 |
! has_version sys-fs/device-mapper |
353 |
then |
354 |
rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules |
355 |
einfo "Removed unneeded file 64-device-mapper.rules" |
356 |
fi |
357 |
|
358 |
# requested in Bug #225033: |
359 |
elog |
360 |
elog "persistent-net assigns fixed names to network devices." |
361 |
elog "If you have problems with the persistent-net rules," |
362 |
elog "just delete the rules file" |
363 |
elog "\trm ${ROOT}etc/udev/rules.d/70-persistent-net.rules" |
364 |
elog "then reboot." |
365 |
elog |
366 |
elog "This may however number your devices in a different way than they are now." |
367 |
|
368 |
ewarn |
369 |
ewarn "If you build an initramfs including udev, then please" |
370 |
ewarn "make sure that the /usr/bin/udevadm binary gets included," |
371 |
ewarn "and your scripts changed to use it,as it replaces the" |
372 |
ewarn "old helper apps udevinfo, udevtrigger, ..." |
373 |
|
374 |
ewarn |
375 |
ewarn "mount options for directory /dev are no longer" |
376 |
ewarn "set in /etc/udev/udev.conf, but in /etc/fstab" |
377 |
ewarn "as for other directories." |
378 |
|
379 |
ewarn |
380 |
ewarn "If you use /dev/md/*, /dev/loop/* or /dev/rd/*," |
381 |
ewarn "then please migrate over to using the device names" |
382 |
ewarn "/dev/md*, /dev/loop* and /dev/ram*." |
383 |
ewarn "The devfs-compat rules have been removed." |
384 |
ewarn "For reference see Bug #269359." |
385 |
|
386 |
ewarn |
387 |
ewarn "Rules for /dev/hd* devices have been removed" |
388 |
ewarn "Please migrate to libata." |
389 |
|
390 |
ewarn |
391 |
ewarn "action_modeswitch has been removed by upstream." |
392 |
ewarn "Please use sys-apps/usb_modeswitch." |
393 |
|
394 |
if ismounted /usr |
395 |
then |
396 |
ewarn |
397 |
ewarn "Your system has /usr on a separate partition. This means" |
398 |
ewarn "you will need to use an initramfs to pre-mount /usr before" |
399 |
ewarn "udev runs." |
400 |
ewarn "This must be set up before your next reboot, or you may" |
401 |
ewarn "experience failures which are very difficult to troubleshoot." |
402 |
ewarn "For a more detailed explanation, see the following URL:" |
403 |
ewarn "http://www.freedesktop.org/wiki/Software/systemd/separate-usr-is-broken" |
404 |
fi |
405 |
|
406 |
elog |
407 |
elog "For more information on udev on Gentoo, writing udev rules, and" |
408 |
elog " fixing known issues visit:" |
409 |
elog " http://www.gentoo.org/doc/en/udev-guide.xml" |
410 |
} |