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