1 |
robbat2 10/04/20 02:53:14 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: udev-146-r3.ebuild |
5 |
Log: |
6 |
Alpha cannot use the 151-r2 version due to non-availability of newer kernels, so provide an older ebuild with static libraries for lvm2 bumping. |
7 |
(Portage version: 2.2_rc67/cvs/Linux i686) |
8 |
|
9 |
Revision Changes Path |
10 |
1.536 sys-fs/udev/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/ChangeLog?rev=1.536&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/ChangeLog?rev=1.536&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/ChangeLog?r1=1.535&r2=1.536 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v |
19 |
retrieving revision 1.535 |
20 |
retrieving revision 1.536 |
21 |
diff -p -w -b -B -u -u -r1.535 -r1.536 |
22 |
--- ChangeLog 19 Apr 2010 20:57:35 -0000 1.535 |
23 |
+++ ChangeLog 20 Apr 2010 02:53:14 -0000 1.536 |
24 |
@@ -1,6 +1,13 @@ |
25 |
# ChangeLog for sys-fs/udev |
26 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.535 2010/04/19 20:57:35 robbat2 Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.536 2010/04/20 02:53:14 robbat2 Exp $ |
29 |
+ |
30 |
+*udev-146-r3 (20 Apr 2010) |
31 |
+ |
32 |
+ 20 Apr 2010; Robin H. Johnson <robbat2@g.o> +udev-146-r3.ebuild: |
33 |
+ Alpha cannot use the 151-r2 version due to non-availability of newer |
34 |
+ kernels, so provide an older ebuild with static libraries for lvm2 |
35 |
+ bumping. |
36 |
|
37 |
*udev-151-r2 (19 Apr 2010) |
38 |
|
39 |
|
40 |
|
41 |
|
42 |
1.1 sys-fs/udev/udev-146-r3.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/udev-146-r3.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/udev-146-r3.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: udev-146-r3.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2010 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-146-r3.ebuild,v 1.1 2010/04/20 02:53:14 robbat2 Exp $ |
52 |
|
53 |
EAPI="1" |
54 |
|
55 |
inherit eutils flag-o-matic multilib toolchain-funcs linux-info |
56 |
|
57 |
PATCHSET=${P}-gentoo-patchset-v1 |
58 |
|
59 |
if [[ ${PV} == "9999" ]]; then |
60 |
EGIT_REPO_URI="git://git.kernel.org/pub/scm/linux/hotplug/udev.git" |
61 |
EGIT_BRANCH="master" |
62 |
inherit git autotools |
63 |
else |
64 |
SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2 |
65 |
mirror://gentoo/${PATCHSET}.tar.bz2" |
66 |
fi |
67 |
DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" |
68 |
HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" |
69 |
|
70 |
LICENSE="GPL-2" |
71 |
SLOT="0" |
72 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
73 |
IUSE="selinux +devfs-compat -extras" |
74 |
|
75 |
RESTRICT="test" |
76 |
|
77 |
COMMON_DEPEND="selinux? ( sys-libs/libselinux ) |
78 |
extras? ( |
79 |
sys-apps/acl |
80 |
>=sys-apps/usbutils-0.82 |
81 |
virtual/libusb:0 |
82 |
sys-apps/pciutils |
83 |
dev-libs/glib:2 |
84 |
) |
85 |
>=sys-apps/util-linux-2.16 |
86 |
>=sys-libs/glibc-2.7" |
87 |
|
88 |
DEPEND="${COMMON_DEPEND} |
89 |
extras? ( dev-util/gperf )" |
90 |
|
91 |
RDEPEND="${COMMON_DEPEND} |
92 |
!sys-apps/coldplug |
93 |
!<sys-fs/lvm2-2.02.45 |
94 |
!sys-fs/device-mapper |
95 |
>=sys-apps/baselayout-1.12.5" |
96 |
|
97 |
if [[ ${PV} == "9999" ]]; then |
98 |
# for documentation processing with xsltproc |
99 |
DEPEND="${DEPEND} |
100 |
app-text/docbook-xsl-stylesheets |
101 |
app-text/docbook-xml-dtd |
102 |
dev-util/gtk-doc" |
103 |
fi |
104 |
|
105 |
# required kernel options |
106 |
CONFIG_CHECK="~INOTIFY_USER ~SIGNALFD ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2" |
107 |
|
108 |
# We need the lib/rcscripts/addon support |
109 |
PROVIDE="virtual/dev-manager" |
110 |
|
111 |
udev_check_KV() { |
112 |
local ok=0 |
113 |
if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 ]] |
114 |
then |
115 |
if kernel_is -ge 2 6 ${KV_PATCH_reliable} ; then |
116 |
ok=2 |
117 |
elif kernel_is -ge 2 6 ${KV_PATCH_min} ; then |
118 |
ok=1 |
119 |
fi |
120 |
fi |
121 |
return $ok |
122 |
} |
123 |
|
124 |
pkg_setup() { |
125 |
linux-info_pkg_setup |
126 |
|
127 |
udev_libexec_dir="/$(get_libdir)/udev" |
128 |
|
129 |
# udev requires signalfd introduced in kernel 2.6.25, |
130 |
# but a glibc compiled against >=linux-headers-2.6.27 uses the |
131 |
# new signalfd syscall introduced in kernel 2.6.27 without falling back |
132 |
# to the old one. So we just depend on 2.6.27 here, see Bug #281312. |
133 |
KV_PATCH_min=25 |
134 |
KV_PATCH_reliable=27 |
135 |
KV_min=2.6.${KV_PATCH_min} |
136 |
KV_reliable=2.6.${KV_PATCH_reliable} |
137 |
|
138 |
# always print kernel version requirements |
139 |
ewarn |
140 |
ewarn "${P} does not support Linux kernel before version ${KV_min}!" |
141 |
if [[ ${KV_PATCH_min} != ${KV_PATCH_reliable} ]]; then |
142 |
ewarn "For a reliable udev, use at least kernel ${KV_reliable}" |
143 |
fi |
144 |
|
145 |
echo |
146 |
# We don't care about the secondary revision of the kernel. |
147 |
# 2.6.30.4 -> 2.6.30 is all we check |
148 |
udev_check_KV |
149 |
case "$?" in |
150 |
2) einfo "Your kernel version (${KV_FULL}) is new enough to run ${P} reliably." ;; |
151 |
1) ewarn "Your kernel version (${KV_FULL}) is new enough to run ${P}," |
152 |
ewarn "but it may be unreliable in some cases." |
153 |
ebeep ;; |
154 |
0) eerror "Your kernel version (${KV_FULL}) is too old to run ${P}" |
155 |
ebeep ;; |
156 |
esac |
157 |
echo |
158 |
|
159 |
KV_FULL_SRC=${KV_FULL} |
160 |
get_running_version |
161 |
udev_check_KV |
162 |
if [[ "$?" = "0" ]]; then |
163 |
eerror |
164 |
eerror "udev cannot be restarted after emerging," |
165 |
eerror "as your running kernel version (${KV_FULL}) is too old." |
166 |
eerror "You really need to use a newer kernel after a reboot!" |
167 |
NO_RESTART=1 |
168 |
ebeep |
169 |
fi |
170 |
} |
171 |
|
172 |
sed_libexec_dir() { |
173 |
sed -e "s#/lib/udev#${udev_libexec_dir}#" -i "$@" |
174 |
} |
175 |
|
176 |
src_unpack() { |
177 |
if [[ ${PV} == "9999" ]] ; then |
178 |
git_src_unpack |
179 |
else |
180 |
unpack ${A} |
181 |
fi |
182 |
|
183 |
cd "${S}" |
184 |
|
185 |
# patches go here... |
186 |
|
187 |
# backport some patches |
188 |
EPATCH_SOURCE="${WORKDIR}/${PATCHSET}" EPATCH_SUFFIX="patch" \ |
189 |
EPATCH_FORCE="yes" epatch |
190 |
|
191 |
if ! use devfs-compat; then |
192 |
# see Bug #269359 |
193 |
epatch "${FILESDIR}"/udev-141-remove-devfs-names.diff |
194 |
fi |
195 |
|
196 |
# change rules back to group uucp instead of dialout for now |
197 |
sed -e 's/GROUP="dialout"/GROUP="uucp"/' \ |
198 |
-i rules/{rules.d,packages,gentoo}/*.rules \ |
199 |
|| die "failed to change group dialout to uucp" |
200 |
|
201 |
if [[ ${PV} != 9999 ]]; then |
202 |
# Make sure there is no sudden changes to upstream rules file |
203 |
# (more for my own needs than anything else ...) |
204 |
MD5=$(md5sum < "${S}/rules/rules.d/50-udev-default.rules") |
205 |
MD5=${MD5/ -/} |
206 |
if [[ ${MD5} != d2fdf2614797f525677001d9146509a0 ]] |
207 |
then |
208 |
echo |
209 |
eerror "50-udev-default.rules has been updated, please validate!" |
210 |
eerror "md5sum=${MD5}" |
211 |
die "50-udev-default.rules has been updated, please validate!" |
212 |
fi |
213 |
fi |
214 |
|
215 |
sed_libexec_dir \ |
216 |
rules/rules.d/50-udev-default.rules \ |
217 |
rules/rules.d/78-sound-card.rules \ |
218 |
extras/rule_generator/write_*_rules \ |
219 |
|| die "sed failed" |
220 |
|
221 |
if [[ ${PV} == 9999 ]]; then |
222 |
gtkdocize --copy |
223 |
eautoreconf |
224 |
fi |
225 |
} |
226 |
|
227 |
src_compile() { |
228 |
filter-flags -fprefetch-loop-arrays |
229 |
|
230 |
econf \ |
231 |
--prefix=/usr \ |
232 |
--sysconfdir=/etc \ |
233 |
--sbindir=/sbin \ |
234 |
--libdir=/usr/$(get_libdir) \ |
235 |
--with-rootlibdir=/$(get_libdir) \ |
236 |
--libexecdir="${udev_libexec_dir}" \ |
237 |
--enable-logging \ |
238 |
--enable-static \ |
239 |
$(use_with selinux) \ |
240 |
$(use_enable extras) |
241 |
|
242 |
emake || die "compiling udev failed" |
243 |
} |
244 |
|
245 |
src_install() { |
246 |
local scriptdir="${FILESDIR}/147" |
247 |
|
248 |
into / |
249 |
emake DESTDIR="${D}" install || die "make install failed" |
250 |
# without this code, multilib-strict is angry |
251 |
if [[ "$(get_libdir)" != "lib" ]]; then |
252 |
# check if this code is needed, bug #281338 |
253 |
if [[ -d "${D}/lib" ]]; then |
254 |
# we can not just rename /lib to /lib64, because |
255 |
# make install creates /lib64 and /lib |
256 |
einfo "Moving lib to $(get_libdir)" |
257 |
mkdir -p "${D}/$(get_libdir)" |
258 |
mv "${D}"/lib/* "${D}/$(get_libdir)/" |
259 |
rmdir "${D}"/lib |
260 |
else |
261 |
einfo "There is no ${D}/lib, move code can be deleted." |
262 |
fi |
263 |
fi |
264 |
|
265 |
exeinto "${udev_libexec_dir}" |
266 |
newexe "${FILESDIR}"/net-130-r1.sh net.sh || die "net.sh not installed properly" |
267 |
newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \ |
268 |
|| die "move_tmp_persistent_rules.sh not installed properly" |
269 |
newexe "${FILESDIR}"/write_root_link_rule-125 write_root_link_rule \ |
270 |
|| die "write_root_link_rule not installed properly" |
271 |
|
272 |
doexe "${scriptdir}"/shell-compat-KV.sh \ |
273 |
|| die "shell-compat.sh not installed properly" |
274 |
doexe "${scriptdir}"/shell-compat-addon.sh \ |
275 |
|| die "shell-compat.sh not installed properly" |
276 |
|
277 |
keepdir "${udev_libexec_dir}"/state |
278 |
keepdir "${udev_libexec_dir}"/devices |
279 |
|
280 |
# create symlinks for these utilities to /sbin |
281 |
# where multipath-tools expect them to be (Bug #168588) |
282 |
dosym "..${udev_libexec_dir}/scsi_id" /sbin/scsi_id |
283 |
|
284 |
# Add gentoo stuff to udev.conf |
285 |
echo "# If you need to change mount-options, do it in /etc/fstab" \ |
286 |
>> "${D}"/etc/udev/udev.conf |
287 |
|
288 |
# let the dir exist at least |
289 |
keepdir /etc/udev/rules.d |
290 |
|
291 |
# Now installing rules |
292 |
cd "${S}"/rules |
293 |
insinto "${udev_libexec_dir}"/rules.d/ |
294 |
|
295 |
# Our rules files |
296 |
doins gentoo/??-*.rules |
297 |
doins packages/40-alsa.rules |
298 |
doins packages/40-isdn.rules |
299 |
|
300 |
# Adding arch specific rules |
301 |
if [[ -f packages/40-${ARCH}.rules ]] |
302 |
then |
303 |
doins "packages/40-${ARCH}.rules" |
304 |
fi |
305 |
cd "${S}" |
306 |
|
307 |
# our udev hooks into the rc system |
308 |
insinto /$(get_libdir)/rcscripts/addons |
309 |
doins "${scriptdir}"/udev-start.sh \ |
310 |
|| die "udev-start.sh not installed properly" |
311 |
doins "${scriptdir}"/udev-stop.sh \ |
312 |
|| die "udev-stop.sh not installed properly" |
313 |
|
314 |
local init |
315 |
# udev-postmount and init-scripts for >=openrc-0.3.1, Bug #240984 |
316 |
for init in udev udev-mount udev-dev-tarball udev-postmount; do |
317 |
newinitd "${scriptdir}/${init}.initd" "${init}" \ |
318 |
|| die "initscript ${init} not installed properly" |
319 |
done |
320 |
|
321 |
# insert minimum kernel versions |
322 |
sed -e "s/%KV_MIN%/${KV_min}/" \ |
323 |
-e "s/%KV_MIN_RELIABLE%/${KV_reliable}/" \ |
324 |
-i "${D}"/etc/init.d/udev-mount |
325 |
|
326 |
# config file for init-script and start-addon |
327 |
newconfd "${scriptdir}/udev.confd" udev \ |
328 |
|| die "config file not installed properly" |
329 |
|
330 |
insinto /etc/modprobe.d |
331 |
newins "${FILESDIR}"/blacklist-146 blacklist.conf |
332 |
newins "${FILESDIR}"/pnp-aliases pnp-aliases.conf |
333 |
|
334 |
# convert /lib/udev to real used dir |
335 |
sed_libexec_dir \ |
336 |
"${D}/$(get_libdir)"/rcscripts/addons/*.sh \ |
337 |
"${D}/${udev_libexec_dir}"/write_root_link_rule \ |
338 |
"${D}"/etc/conf.d/udev \ |
339 |
"${D}"/etc/init.d/udev* \ |
340 |
"${D}"/etc/modprobe.d/* |
341 |
|
342 |
# documentation |
343 |
dodoc ChangeLog README TODO || die "failed installing docs" |
344 |
|
345 |
# keep doc in just one directory, Bug #281137 |
346 |
rm -rf "${D}/usr/share/doc/${PN}" |
347 |
if use extras; then |
348 |
dodoc extras/keymap/README.keymap.txt || die "failed installing docs" |
349 |
fi |
350 |
|
351 |
cd docs/writing_udev_rules |
352 |
mv index.html writing_udev_rules.html |
353 |
dohtml *.html |
354 |
cd "${S}" |
355 |
|
356 |
echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev |
357 |
doenvd 20udev |
358 |
} |
359 |
|
360 |
pkg_preinst() { |
361 |
# moving old files to support newer modprobe, 12 May 2009 |
362 |
local f dir=${ROOT}/etc/modprobe.d/ |
363 |
for f in pnp-aliases blacklist; do |
364 |
if [[ -f $dir/$f && ! -f $dir/$f.conf ]] |
365 |
then |
366 |
elog "Moving $dir/$f to $f.conf" |
367 |
mv -f "$dir/$f" "$dir/$f.conf" |
368 |
fi |
369 |
done |
370 |
|
371 |
if [[ -d ${ROOT}/lib/udev-state ]] |
372 |
then |
373 |
mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/ |
374 |
rm -r "${ROOT}"/lib/udev-state |
375 |
fi |
376 |
|
377 |
if [[ -f ${ROOT}/etc/udev/udev.config && |
378 |
! -f ${ROOT}/etc/udev/udev.rules ]] |
379 |
then |
380 |
mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules |
381 |
fi |
382 |
|
383 |
# delete the old udev.hotplug symlink if it is present |
384 |
if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]] |
385 |
then |
386 |
rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug |
387 |
fi |
388 |
|
389 |
# delete the old wait_for_sysfs.hotplug symlink if it is present |
390 |
if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]] |
391 |
then |
392 |
rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug |
393 |
fi |
394 |
|
395 |
# delete the old wait_for_sysfs.hotplug symlink if it is present |
396 |
if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]] |
397 |
then |
398 |
rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug |
399 |
fi |
400 |
|
401 |
has_version "=${CATEGORY}/${PN}-103-r3" |
402 |
previous_equal_to_103_r3=$? |
403 |
|
404 |
has_version "<${CATEGORY}/${PN}-104-r5" |
405 |
previous_less_than_104_r5=$? |
406 |
|
407 |
has_version "<${CATEGORY}/${PN}-106-r5" |
408 |
previous_less_than_106_r5=$? |
409 |
|
410 |
has_version "<${CATEGORY}/${PN}-113" |
411 |
previous_less_than_113=$? |
412 |
} |
413 |
|
414 |
# 19 Nov 2008 |
415 |
fix_old_persistent_net_rules() { |
416 |
local rules=${ROOT}/etc/udev/rules.d/70-persistent-net.rules |
417 |
[[ -f ${rules} ]] || return |
418 |
|
419 |
elog |
420 |
elog "Updating persistent-net rules file" |
421 |
|
422 |
# Change ATTRS to ATTR matches, Bug #246927 |
423 |
sed -i -e 's/ATTRS{/ATTR{/g' "${rules}" |
424 |
|
425 |
# Add KERNEL matches if missing, Bug #246849 |
426 |
sed -ri \ |
427 |
-e '/KERNEL/ ! { s/NAME="(eth|wlan|ath)([0-9]+)"/KERNEL=="\1*", NAME="\1\2"/}' \ |
428 |
"${rules}" |
429 |
} |
430 |
|
431 |
# See Bug #129204 for a discussion about restarting udevd |
432 |
restart_udevd() { |
433 |
if [[ ${NO_RESTART} = "1" ]]; then |
434 |
ewarn "Not restarting udevd, as your kernel is too old!" |
435 |
return |
436 |
fi |
437 |
|
438 |
# need to merge to our system |
439 |
[[ ${ROOT} = / ]] || return |
440 |
|
441 |
# check if root of init-process is identical to ours (not in chroot) |
442 |
[[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] || return |
443 |
|
444 |
# abort if there is no udevd running |
445 |
[[ -n $(pidof udevd) ]] || return |
446 |
|
447 |
# abort if no /dev/.udev exists |
448 |
[[ -e /dev/.udev ]] || return |
449 |
|
450 |
elog |
451 |
elog "restarting udevd now." |
452 |
|
453 |
killall -15 udevd &>/dev/null |
454 |
sleep 1 |
455 |
killall -9 udevd &>/dev/null |
456 |
|
457 |
/sbin/udevd --daemon |
458 |
sleep 3 |
459 |
if [[ ! -n $(pidof udevd) ]]; then |
460 |
eerror "FATAL: udev died, please check your kernel is" |
461 |
eerror "new enough and configured correctly for ${P}." |
462 |
eerror |
463 |
eerror "Please have a look at this before rebooting." |
464 |
eerror "If in doubt, please downgrade udev back to your old version" |
465 |
ebeep |
466 |
fi |
467 |
} |
468 |
|
469 |
postinst_init_scripts() { |
470 |
# FIXME: we may need some code that detects if this is a system bootstrap |
471 |
# and auto-enables udev then |
472 |
# |
473 |
# FIXME: inconsistent handling of init-scripts here |
474 |
# * udev is added to sysinit in openrc-ebuild |
475 |
# * we add udev-postmount to default in here |
476 |
# |
477 |
|
478 |
# migration to >=openrc-0.4 |
479 |
if [[ -e "${ROOT}"/etc/runlevels/sysinit && ! -e "${ROOT}"/etc/runlevels/sysinit/udev ]] |
480 |
then |
481 |
ewarn |
482 |
ewarn "You need to add the udev init script to the runlevel sysinit," |
483 |
ewarn "else your system will not be able to boot" |
484 |
ewarn "after updating to >=openrc-0.4.0" |
485 |
ewarn "Run this to enable udev for >=openrc-0.4.0:" |
486 |
ewarn "\trc-update add udev sysinit" |
487 |
ewarn |
488 |
fi |
489 |
|
490 |
# add udev-postmount to default runlevel instead of that ugly injecting |
491 |
# like a hotplug event, 2009/10/15 |
492 |
|
493 |
# already enabled? |
494 |
[[ -e "${ROOT}"/etc/runlevels/default/udev-postmount ]] && return |
495 |
|
496 |
local enable_postmount=0 |
497 |
[[ -e "${ROOT}"/etc/runlevels/sysinit/udev ]] && enable_postmount=1 |
498 |
[[ "${ROOT}" = "/" && -d /dev/.udev/ ]] && enable_postmount=1 |
499 |
|
500 |
if [[ ${enable_postmount} = 1 ]] |
501 |
then |
502 |
local initd=udev-postmount |
503 |
|
504 |
if [[ -e ${ROOT}/etc/init.d/${initd} ]] && \ |
505 |
[[ ! -e ${ROOT}/etc/runlevels/default/${initd} ]] |
506 |
then |
507 |
ln -snf /etc/init.d/${initd} "${ROOT}"/etc/runlevels/default/${initd} |
508 |
elog "Auto-adding '${initd}' service to your default runlevel" |
509 |
fi |
510 |
else |
511 |
elog "You should add the udev-postmount service to default runlevel." |
512 |
elog "Run this to add it:" |
513 |
elog "\trc-update add udev-postmount default" |
514 |
fi |
515 |
} |
516 |
|
517 |
pkg_postinst() { |
518 |
fix_old_persistent_net_rules |
519 |
|
520 |
restart_udevd |
521 |
|
522 |
postinst_init_scripts |
523 |
|
524 |
# people want reminders, I'll give them reminders. Odds are they will |
525 |
# just ignore them anyway... |
526 |
|
527 |
# delete 40-scsi-hotplug.rules, it is integrated in 50-udev.rules, 19 Jan 2007 |
528 |
if [[ $previous_equal_to_103_r3 = 0 ]] && |
529 |
[[ -e ${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules ]] |
530 |
then |
531 |
ewarn "Deleting stray 40-scsi-hotplug.rules" |
532 |
ewarn "installed by sys-fs/udev-103-r3" |
533 |
rm -f "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules |
534 |
fi |
535 |
|
536 |
# Removing some device-nodes we thought we need some time ago, 25 Jan 2007 |
537 |
if [[ -d ${ROOT}/lib/udev/devices ]] |
538 |
then |
539 |
rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom} |
540 |
fi |
541 |
|
542 |
# Removing some old file, 29 Jan 2007 |
543 |
if [[ $previous_less_than_104_r5 = 0 ]] |
544 |
then |
545 |
rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev |
546 |
rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null |
547 |
fi |
548 |
|
549 |
# 19 Mar 2007 |
550 |
if [[ $previous_less_than_106_r5 = 0 ]] && |
551 |
[[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]] |
552 |
then |
553 |
rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules |
554 |
fi |
555 |
|
556 |
# Try to remove /etc/dev.d as that is obsolete, 23 Apr 2007 |
557 |
if [[ -d ${ROOT}/etc/dev.d ]] |
558 |
then |
559 |
rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null |
560 |
if [[ -d ${ROOT}/etc/dev.d ]] |
561 |
then |
562 |
ewarn "You still have the directory /etc/dev.d on your system." |
563 |
ewarn "This is no longer used by udev and can be removed." |
564 |
fi |
565 |
fi |
566 |
|
567 |
# 64-device-mapper.rules now gets installed by sys-fs/device-mapper |
568 |
# remove it if user don't has sys-fs/device-mapper installed, 27 Jun 2007 |
569 |
if [[ $previous_less_than_113 = 0 ]] && |
570 |
[[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] && |
571 |
! has_version sys-fs/device-mapper |
572 |
then |
573 |
rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules |
574 |
einfo "Removed unneeded file 64-device-mapper.rules" |
575 |
fi |
576 |
|
577 |
# requested in bug #275974, added 2009/09/05 |
578 |
ewarn |
579 |
ewarn "If after the udev update removable devices or CD/DVD drives" |
580 |
ewarn "stop working, try re-emerging HAL before filling a bug report" |
581 |
|
582 |
# requested in Bug #225033: |
583 |
elog |
584 |
elog "persistent-net does assigning fixed names to network devices." |
585 |
elog "If you have problems with the persistent-net rules," |
586 |
elog "just delete the rules file" |
587 |
elog "\trm ${ROOT}etc/udev/rules.d/70-persistent-net.rules" |
588 |
elog "and then reboot." |
589 |
elog |
590 |
elog "This may however number your devices in a different way than they are now." |
591 |
|
592 |
ewarn |
593 |
ewarn "If you build an initramfs including udev, then please" |
594 |
ewarn "make sure that the /sbin/udevadm binary gets included," |
595 |
ewarn "and your scripts changed to use it,as it replaces the" |
596 |
ewarn "old helper apps udevinfo, udevtrigger, ..." |
597 |
|
598 |
ewarn |
599 |
ewarn "mount options for directory /dev are no longer" |
600 |
ewarn "set in /etc/udev/udev.conf, but in /etc/fstab" |
601 |
ewarn "as for other directories." |
602 |
|
603 |
if use devfs-compat; then |
604 |
ewarn |
605 |
ewarn "devfs-compat use flag is enabled (by default)." |
606 |
ewarn "This enables devfs compatible device names." |
607 |
ewarn "If you use /dev/md/*, /dev/loop/* or /dev/rd/*," |
608 |
ewarn "then please migrate over to using the device names" |
609 |
ewarn "/dev/md*, /dev/loop* and /dev/ram*." |
610 |
ewarn "The devfs-compat rules will be removed in the future." |
611 |
ewarn "For reference see Bug #269359." |
612 |
fi |
613 |
|
614 |
elog |
615 |
elog "For more information on udev on Gentoo, writing udev rules, and" |
616 |
elog " fixing known issues visit:" |
617 |
elog " http://www.gentoo.org/doc/en/udev-guide.xml" |
618 |
} |