1 |
zzam 08/12/02 12:58:38 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: udev-135.ebuild |
5 |
Log: |
6 |
Version bumped. This should solve bug #249222. |
7 |
(Portage version: 2.1.6_rc2/cvs/Linux 2.6.27-gentoo-r1 i686) |
8 |
|
9 |
Revision Changes Path |
10 |
1.424 sys-fs/udev/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/ChangeLog?rev=1.424&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/ChangeLog?rev=1.424&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/ChangeLog?r1=1.423&r2=1.424 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v |
19 |
retrieving revision 1.423 |
20 |
retrieving revision 1.424 |
21 |
diff -u -r1.423 -r1.424 |
22 |
--- ChangeLog 28 Nov 2008 12:51:54 -0000 1.423 |
23 |
+++ ChangeLog 2 Dec 2008 12:58:38 -0000 1.424 |
24 |
@@ -1,6 +1,11 @@ |
25 |
# ChangeLog for sys-fs/udev |
26 |
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.423 2008/11/28 12:51:54 zzam Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.424 2008/12/02 12:58:38 zzam Exp $ |
29 |
+ |
30 |
+*udev-135 (02 Dec 2008) |
31 |
+ |
32 |
+ 02 Dec 2008; Matthias Schwarzott <zzam@g.o> +udev-135.ebuild: |
33 |
+ Version bumped. This should solve bug #249222. |
34 |
|
35 |
28 Nov 2008; Matthias Schwarzott <zzam@g.o> udev-122-r1.ebuild, |
36 |
udev-124-r1.ebuild, udev-125-r2.ebuild, udev-130-r1.ebuild, |
37 |
|
38 |
|
39 |
|
40 |
1.1 sys-fs/udev/udev-135.ebuild |
41 |
|
42 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/udev-135.ebuild?rev=1.1&view=markup |
43 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/udev-135.ebuild?rev=1.1&content-type=text/plain |
44 |
|
45 |
Index: udev-135.ebuild |
46 |
=================================================================== |
47 |
# Copyright 1999-2008 Gentoo Foundation |
48 |
# Distributed under the terms of the GNU General Public License v2 |
49 |
# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-135.ebuild,v 1.1 2008/12/02 12:58:38 zzam Exp $ |
50 |
|
51 |
inherit eutils flag-o-matic multilib toolchain-funcs versionator |
52 |
|
53 |
DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" |
54 |
HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" |
55 |
SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2" |
56 |
|
57 |
LICENSE="GPL-2" |
58 |
SLOT="0" |
59 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
60 |
IUSE="selinux" |
61 |
|
62 |
DEPEND="selinux? ( sys-libs/libselinux )" |
63 |
RDEPEND="!sys-apps/coldplug |
64 |
!<sys-fs/device-mapper-1.02.19-r1" |
65 |
RDEPEND="${DEPEND} ${RDEPEND} |
66 |
>=sys-apps/baselayout-1.12.5" |
67 |
# We need the lib/rcscripts/addon support |
68 |
PROVIDE="virtual/dev-manager" |
69 |
|
70 |
pkg_setup() { |
71 |
udev_helper_dir="/$(get_libdir)/udev" |
72 |
|
73 |
# comparing kernel version without linux-info.eclass to not pull |
74 |
# virtual/linux-sources |
75 |
|
76 |
local KV=$(uname -r) |
77 |
local KV_MAJOR=$(get_major_version ${KV}) |
78 |
local KV_MINOR=$(get_version_component_range 2 ${KV}) |
79 |
local KV_MICRO=$(get_version_component_range 3 ${KV}) |
80 |
|
81 |
local min_micro=15 min_micro_reliable=19 |
82 |
|
83 |
local ok=0 |
84 |
if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 ]] |
85 |
then |
86 |
if [[ ${KV_MICRO} -ge ${min_micro_reliable} ]]; then |
87 |
ok=2 |
88 |
elif [[ ${KV_MICRO} -ge ${min_micro} ]]; then |
89 |
ok=1 |
90 |
fi |
91 |
fi |
92 |
|
93 |
if [[ ${ok} -lt 1 ]] |
94 |
then |
95 |
ewarn |
96 |
ewarn "${P} does not support Linux kernel before version 2.6.${min_micro}!" |
97 |
fi |
98 |
if [[ ${ok} -lt 2 ]]; then |
99 |
ewarn "If you want to use udev reliable you should update" |
100 |
ewarn "to at least kernel version 2.6.${min_micro_reliable}!" |
101 |
ewarn |
102 |
ebeep |
103 |
fi |
104 |
} |
105 |
|
106 |
sed_helper_dir() { |
107 |
sed -e "s#/lib/udev#${udev_helper_dir}#" -i "$@" |
108 |
} |
109 |
|
110 |
src_unpack() { |
111 |
unpack ${A} |
112 |
|
113 |
cd "${S}" |
114 |
|
115 |
# patches go here... |
116 |
|
117 |
# Make sure there is no sudden changes to upstream rules file |
118 |
# (more for my own needs than anything else ...) |
119 |
MD5=$(md5sum < "${S}/rules/rules.d/50-udev-default.rules") |
120 |
MD5=${MD5/ -/} |
121 |
if [[ ${MD5} != 1425ecb365439f74b9aa2242f0503f1e ]] |
122 |
then |
123 |
echo |
124 |
eerror "50-udev-default.rules has been updated, please validate!" |
125 |
die "50-udev-default.rules has been updated, please validate!" |
126 |
fi |
127 |
|
128 |
sed_helper_dir \ |
129 |
rules/rules.d/50-udev-default.rules \ |
130 |
extras/rule_generator/write_*_rules \ |
131 |
udev/udev-util.c \ |
132 |
udev/udev-rules.c \ |
133 |
udev/udevd.c || die "sed failed" |
134 |
} |
135 |
|
136 |
src_compile() { |
137 |
filter-flags -fprefetch-loop-arrays |
138 |
|
139 |
econf \ |
140 |
--prefix=/usr \ |
141 |
--sysconfdir=/etc \ |
142 |
--exec-prefix= \ |
143 |
--with-libdir-name=$(get_libdir) \ |
144 |
--enable-logging \ |
145 |
$(use_with selinux) |
146 |
|
147 |
emake || die "compiling udev failed" |
148 |
} |
149 |
|
150 |
src_install() { |
151 |
into / |
152 |
emake DESTDIR="${D}" install || die "make install failed" |
153 |
if [[ "$(get_libdir)" != "lib" ]]; then |
154 |
# we can not just rename /lib to /lib64, because |
155 |
# make install creates /lib64 and /lib |
156 |
mkdir -p "${D}/$(get_libdir)" |
157 |
mv "${D}"/lib/* "${D}/$(get_libdir)/" |
158 |
rmdir "${D}"/lib |
159 |
fi |
160 |
|
161 |
exeinto "${udev_helper_dir}" |
162 |
newexe "${FILESDIR}"/net-130-r1.sh net.sh || die "net.sh not installed properly" |
163 |
newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \ |
164 |
|| die "move_tmp_persistent_rules.sh not installed properly" |
165 |
newexe "${FILESDIR}"/write_root_link_rule-125 write_root_link_rule \ |
166 |
|| die "write_root_link_rule not installed properly" |
167 |
newexe "${FILESDIR}"/shell-compat-118-r3.sh shell-compat.sh \ |
168 |
|| die "shell-compat.sh not installed properly" |
169 |
|
170 |
keepdir "${udev_helper_dir}"/state |
171 |
keepdir "${udev_helper_dir}"/devices |
172 |
|
173 |
# create symlinks for these utilities to /sbin |
174 |
# where multipath-tools expect them to be (Bug #168588) |
175 |
dosym "..${udev_helper_dir}/vol_id" /sbin/vol_id |
176 |
dosym "..${udev_helper_dir}/scsi_id" /sbin/scsi_id |
177 |
|
178 |
# Add gentoo stuff to udev.conf |
179 |
echo "# If you need to change mount-options, do it in /etc/fstab" \ |
180 |
>> "${D}"/etc/udev/udev.conf |
181 |
|
182 |
# let the dir exist at least |
183 |
keepdir /etc/udev/rules.d |
184 |
|
185 |
# Now installing rules |
186 |
cd "${S}"/rules |
187 |
insinto "${udev_helper_dir}"/rules.d/ |
188 |
|
189 |
# Our rules files |
190 |
doins gentoo/??-*.rules |
191 |
doins packages/40-alsa.rules |
192 |
|
193 |
# Adding arch specific rules |
194 |
if [[ -f packages/40-${ARCH}.rules ]] |
195 |
then |
196 |
doins "packages/40-${ARCH}.rules" |
197 |
fi |
198 |
cd "${S}" |
199 |
|
200 |
# our udev hooks into the rc system |
201 |
insinto /$(get_libdir)/rcscripts/addons |
202 |
newins "${FILESDIR}"/udev-start-133.sh udev-start.sh |
203 |
newins "${FILESDIR}"/udev-stop-126.sh udev-stop.sh |
204 |
|
205 |
# The udev-post init-script |
206 |
newinitd "${FILESDIR}"/udev-postmount-130-r2.initd udev-postmount |
207 |
|
208 |
# init-script for >=openrc-0.3.1, Bug #240984 |
209 |
newinitd "${FILESDIR}/udev.initd" udev |
210 |
|
211 |
# config file for init-script and start-addon |
212 |
newconfd "${FILESDIR}/udev.confd" udev |
213 |
|
214 |
insinto /etc/modprobe.d |
215 |
newins "${FILESDIR}"/blacklist-110 blacklist |
216 |
doins "${FILESDIR}"/pnp-aliases |
217 |
|
218 |
# convert /lib/udev to real used dir |
219 |
sed_helper_dir \ |
220 |
"${D}/$(get_libdir)"/rcscripts/addons/*.sh \ |
221 |
"${D}"/etc/init.d/udev* \ |
222 |
"${D}"/etc/modprobe.d/* |
223 |
|
224 |
# documentation |
225 |
dodoc ChangeLog README TODO || die "failed installing docs" |
226 |
|
227 |
cd docs/writing_udev_rules |
228 |
mv index.html writing_udev_rules.html |
229 |
dohtml *.html |
230 |
|
231 |
cd "${S}" |
232 |
|
233 |
newdoc extras/volume_id/README README_volume_id |
234 |
|
235 |
echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev |
236 |
doenvd 20udev |
237 |
} |
238 |
|
239 |
pkg_preinst() { |
240 |
if [[ -d ${ROOT}/lib/udev-state ]] |
241 |
then |
242 |
mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/ |
243 |
rm -r "${ROOT}"/lib/udev-state |
244 |
fi |
245 |
|
246 |
if [[ -f ${ROOT}/etc/udev/udev.config && |
247 |
! -f ${ROOT}/etc/udev/udev.rules ]] |
248 |
then |
249 |
mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules |
250 |
fi |
251 |
|
252 |
# delete the old udev.hotplug symlink if it is present |
253 |
if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]] |
254 |
then |
255 |
rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug |
256 |
fi |
257 |
|
258 |
# delete the old wait_for_sysfs.hotplug symlink if it is present |
259 |
if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]] |
260 |
then |
261 |
rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug |
262 |
fi |
263 |
|
264 |
# delete the old wait_for_sysfs.hotplug symlink if it is present |
265 |
if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]] |
266 |
then |
267 |
rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug |
268 |
fi |
269 |
|
270 |
# is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind) |
271 |
coldplug_stale="" |
272 |
if [[ -f ${ROOT}/etc/init.d/coldplug ]] |
273 |
then |
274 |
coldplug_stale="1" |
275 |
fi |
276 |
|
277 |
has_version "=${CATEGORY}/${PN}-103-r3" |
278 |
previous_equal_to_103_r3=$? |
279 |
|
280 |
has_version "<${CATEGORY}/${PN}-104-r5" |
281 |
previous_less_than_104_r5=$? |
282 |
|
283 |
has_version "<${CATEGORY}/${PN}-106-r5" |
284 |
previous_less_than_106_r5=$? |
285 |
|
286 |
has_version "<${CATEGORY}/${PN}-113" |
287 |
previous_less_than_113=$? |
288 |
|
289 |
has_version "<${CATEGORY}/${PN}-133" |
290 |
previous_less_than_133=$? |
291 |
} |
292 |
|
293 |
# enable udev init-script, else system will no longer boot |
294 |
# after update to openrc-0.3.1, Bug #240984 |
295 |
enable_udev_init_script() { |
296 |
local result=msg |
297 |
|
298 |
if [[ -e "${ROOT}"/etc/runlevels/sysinit/udev ]] |
299 |
then |
300 |
# already enabled |
301 |
result=enabled |
302 |
elif has_version ">=sys-apps/openrc-0.3.1" |
303 |
then |
304 |
# openrc without addon calls - no idea what to do, so just print msg |
305 |
result=msg |
306 |
else |
307 |
local rc_devices= |
308 |
if has_version "sys-apps/openrc"; then |
309 |
# openrc with udev addon calls |
310 |
rc_devices=$(source ${ROOT}/etc/rc.conf; echo $rc_devices) |
311 |
[[ -z "$rc_devices" ]] && rc_devices=auto |
312 |
else |
313 |
# old baselayout |
314 |
rc_devices=$(source ${ROOT}/etc/conf.d/rc; echo $RC_DEVICES) |
315 |
fi |
316 |
|
317 |
case ${rc_devices} in |
318 |
auto|udev) result=add ;; |
319 |
esac |
320 |
fi |
321 |
|
322 |
case "$result" in |
323 |
enabled) |
324 |
einfo "udev init-script is already enabled, nothing to do." |
325 |
;; |
326 |
add) |
327 |
# enable udev init-script for new openrc |
328 |
elog "Auto adding udev init script to the sysinit runlevel" |
329 |
mkdir -p "${ROOT}"/etc/runlevels/sysinit |
330 |
ln -sf /etc/init.d/udev "${ROOT}"/etc/runlevels/sysinit |
331 |
;; |
332 |
msg) |
333 |
ewarn |
334 |
ewarn "You need to add the udev init script to the runlevel sysinit," |
335 |
ewarn "else your system will not be able to boot" |
336 |
ewarn "after updating to >=openrc-0.3.1" |
337 |
ewarn "Run this to enable udev for >=openrc-0.3.1:" |
338 |
ewarn "\trc-update add udev sysinit" |
339 |
ewarn |
340 |
;; |
341 |
esac |
342 |
} |
343 |
|
344 |
fix_old_persistent_net_rules() { |
345 |
local rules=${ROOT}/etc/udev/rules.d/70-persistent-net.rules |
346 |
[[ -f ${rules} ]] || return |
347 |
|
348 |
elog |
349 |
elog "Updating persistent-net rules file" |
350 |
|
351 |
# Change ATTRS to ATTR matches, Bug #246927 |
352 |
sed -i -e 's/ATTRS{/ATTR{/g' "${rules}" |
353 |
|
354 |
# Add KERNEL matches if missing, Bug #246849 |
355 |
sed -ri \ |
356 |
-e '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \ |
357 |
"${rules}" |
358 |
} |
359 |
|
360 |
# See Bug #129204 for a discussion about restarting udevd |
361 |
restart_udevd() { |
362 |
# need to merge to our system |
363 |
[[ ${ROOT} = / ]] || return |
364 |
|
365 |
# check if root of init-process is identical to ours (not in chroot) |
366 |
[[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] || return |
367 |
|
368 |
# abort if there is no udevd running |
369 |
[[ -n $(pidof udevd) ]] || return |
370 |
|
371 |
# abort if no /dev/.udev exists |
372 |
[[ -e /dev/.udev ]] || return |
373 |
|
374 |
elog |
375 |
elog "restarting udevd now." |
376 |
|
377 |
killall -15 udevd &>/dev/null |
378 |
sleep 1 |
379 |
killall -9 udevd &>/dev/null |
380 |
|
381 |
/sbin/udevd --daemon |
382 |
} |
383 |
|
384 |
pkg_postinst() { |
385 |
fix_old_persistent_net_rules |
386 |
|
387 |
restart_udevd |
388 |
|
389 |
if [[ $previous_less_than_133 = 0 ]] |
390 |
then |
391 |
enable_udev_init_script |
392 |
fi |
393 |
|
394 |
# people want reminders, I'll give them reminders. Odds are they will |
395 |
# just ignore them anyway... |
396 |
|
397 |
if [[ ${coldplug_stale} == 1 ]] |
398 |
then |
399 |
ewarn "A stale coldplug init script found. You should run:" |
400 |
ewarn |
401 |
ewarn " rc-update del coldplug" |
402 |
ewarn " rm -f /etc/init.d/coldplug" |
403 |
ewarn |
404 |
ewarn "udev now provides its own coldplug functionality." |
405 |
fi |
406 |
|
407 |
# delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules |
408 |
if [[ $previous_equal_to_103_r3 = 0 ]] && |
409 |
[[ -e ${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules ]] |
410 |
then |
411 |
ewarn "Deleting stray 40-scsi-hotplug.rules" |
412 |
ewarn "installed by sys-fs/udev-103-r3" |
413 |
rm -f "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules |
414 |
fi |
415 |
|
416 |
# Removing some device-nodes we thought we need some time ago |
417 |
if [[ -d ${ROOT}/lib/udev/devices ]] |
418 |
then |
419 |
rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom} |
420 |
fi |
421 |
|
422 |
# Removing some old file |
423 |
if [[ $previous_less_than_104_r5 = 0 ]] |
424 |
then |
425 |
rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev |
426 |
rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null |
427 |
fi |
428 |
|
429 |
if [[ $previous_less_than_106_r5 = 0 ]] && |
430 |
[[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]] |
431 |
then |
432 |
rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules |
433 |
fi |
434 |
|
435 |
# Try to remove /etc/dev.d as that is obsolete |
436 |
if [[ -d ${ROOT}/etc/dev.d ]] |
437 |
then |
438 |
rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null |
439 |
if [[ -d ${ROOT}/etc/dev.d ]] |
440 |
then |
441 |
ewarn "You still have the directory /etc/dev.d on your system." |
442 |
ewarn "This is no longer used by udev and can be removed." |
443 |
fi |
444 |
fi |
445 |
|
446 |
# 64-device-mapper.rules now gets installed by sys-fs/device-mapper |
447 |
# remove it if user don't has sys-fs/device-mapper installed |
448 |
if [[ $previous_less_than_113 = 0 ]] && |
449 |
[[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] && |
450 |
! has_version sys-fs/device-mapper |
451 |
then |
452 |
rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules |
453 |
einfo "Removed unneeded file 64-device-mapper.rules" |
454 |
fi |
455 |
|
456 |
# requested in Bug #225033: |
457 |
elog |
458 |
elog "persistent-net does assigning fixed names to network devices." |
459 |
elog "If you have problems with the persistent-net rules," |
460 |
elog "just delete the rules file" |
461 |
elog "\trm ${ROOT}etc/udev/rules.d/70-persistent-net.rules" |
462 |
elog "and then reboot." |
463 |
elog |
464 |
elog "This may however number your devices in a different way than they are now." |
465 |
|
466 |
ewarn |
467 |
ewarn "If you build an initramfs including udev, then please" |
468 |
ewarn "make sure that the /sbin/udevadm binary gets included," |
469 |
ewarn "and your scripts changed to use it,as it replaces the" |
470 |
ewarn "old helper apps udevinfo, udevtrigger, ..." |
471 |
|
472 |
ewarn |
473 |
ewarn "mount options for directory /dev are no longer" |
474 |
ewarn "set in /etc/udev/udev.conf, but in /etc/fstab" |
475 |
ewarn "as for other directories." |
476 |
|
477 |
elog |
478 |
elog "For more information on udev on Gentoo, writing udev rules, and" |
479 |
elog " fixing known issues visit:" |
480 |
elog " http://www.gentoo.org/doc/en/udev-guide.xml" |
481 |
} |