1 |
zzam 07/12/19 10:05:14 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: udev-118.ebuild |
5 |
Log: |
6 |
Version bumped. This contains some small fixes, a rules update (solving Bug #193315), and an update rule-writing guide. |
7 |
(Portage version: 2.1.4_rc10) |
8 |
|
9 |
Revision Changes Path |
10 |
1.368 sys-fs/udev/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/ChangeLog?rev=1.368&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/ChangeLog?rev=1.368&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/ChangeLog?r1=1.367&r2=1.368 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v |
19 |
retrieving revision 1.367 |
20 |
retrieving revision 1.368 |
21 |
diff -u -r1.367 -r1.368 |
22 |
--- ChangeLog 19 Nov 2007 07:34:46 -0000 1.367 |
23 |
+++ ChangeLog 19 Dec 2007 10:05:13 -0000 1.368 |
24 |
@@ -1,6 +1,12 @@ |
25 |
# ChangeLog for sys-fs/udev |
26 |
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.367 2007/11/19 07:34:46 kumba Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/ChangeLog,v 1.368 2007/12/19 10:05:13 zzam Exp $ |
29 |
+ |
30 |
+*udev-118 (19 Dec 2007) |
31 |
+ |
32 |
+ 19 Dec 2007; Matthias Schwarzott <zzam@g.o> +udev-118.ebuild: |
33 |
+ Version bumped. This contains some small fixes, a rules update (solving Bug |
34 |
+ #193315), and an update rule-writing guide. |
35 |
|
36 |
19 Nov 2007; Joshua Kinard <kumba@g.o> udev-115-r1.ebuild: |
37 |
Stable on mips, per #195289. |
38 |
|
39 |
|
40 |
|
41 |
1.1 sys-fs/udev/udev-118.ebuild |
42 |
|
43 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/udev-118.ebuild?rev=1.1&view=markup |
44 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sys-fs/udev/udev-118.ebuild?rev=1.1&content-type=text/plain |
45 |
|
46 |
Index: udev-118.ebuild |
47 |
=================================================================== |
48 |
# Copyright 1999-2007 Gentoo Foundation |
49 |
# Distributed under the terms of the GNU General Public License v2 |
50 |
# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/udev-118.ebuild,v 1.1 2007/12/19 10:05:13 zzam Exp $ |
51 |
|
52 |
inherit eutils flag-o-matic multilib toolchain-funcs versionator |
53 |
|
54 |
DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" |
55 |
HOMEPAGE="http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html" |
56 |
SRC_URI="mirror://kernel/linux/utils/kernel/hotplug/${P}.tar.bz2" |
57 |
|
58 |
LICENSE="GPL-2" |
59 |
SLOT="0" |
60 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
61 |
IUSE="selinux" |
62 |
|
63 |
DEPEND="selinux? ( sys-libs/libselinux )" |
64 |
RDEPEND="!sys-apps/coldplug |
65 |
!<sys-fs/device-mapper-1.02.19-r1" |
66 |
RDEPEND="${DEPEND} ${RDEPEND} |
67 |
>=sys-apps/baselayout-1.12.5" |
68 |
# We need the lib/rcscripts/addon support |
69 |
PROVIDE="virtual/dev-manager" |
70 |
|
71 |
pkg_setup() { |
72 |
udev_helper_dir="/$(get_libdir)/udev" |
73 |
|
74 |
myconf= |
75 |
extras="extras/ata_id \ |
76 |
extras/cdrom_id \ |
77 |
extras/edd_id \ |
78 |
extras/firmware \ |
79 |
extras/floppy \ |
80 |
extras/path_id \ |
81 |
extras/scsi_id \ |
82 |
extras/usb_id \ |
83 |
extras/volume_id \ |
84 |
extras/collect \ |
85 |
extras/rule_generator" |
86 |
|
87 |
use selinux && myconf="${myconf} USE_SELINUX=true" |
88 |
|
89 |
# comparing kernel version without linux-info.eclass to not pull |
90 |
# virtual/linux-sources |
91 |
|
92 |
local KV=$(uname -r) |
93 |
local KV_MAJOR=$(get_major_version ${KV}) |
94 |
local KV_MINOR=$(get_version_component_range 2 ${KV}) |
95 |
local KV_MICRO=$(get_version_component_range 3 ${KV}) |
96 |
|
97 |
local ok=0 |
98 |
if [[ ${KV_MAJOR} == 2 && ${KV_MINOR} == 6 && ${KV_MICRO} -ge 15 ]] |
99 |
then |
100 |
ok=1 |
101 |
fi |
102 |
|
103 |
if [[ ${ok} == 0 ]] |
104 |
then |
105 |
ewarn |
106 |
ewarn "${P} does not support Linux kernel before version 2.6.15!" |
107 |
ewarn "If you want to use udev you need to update" |
108 |
ewarn "to kernel >=2.6.15!" |
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 |
unpack ${A} |
120 |
|
121 |
cd "${S}" |
122 |
|
123 |
# patches go here... |
124 |
|
125 |
# No need to clutter the logs ... |
126 |
sed -ie '/^DEBUG/ c\DEBUG = false' Makefile |
127 |
# Do not use optimization flags from the package |
128 |
sed -ie 's|$(OPTIMIZATION)||g' Makefile |
129 |
# Do not require xmlto to refresh manpages |
130 |
sed -ie 's|$(MAN_PAGES)||g' Makefile |
131 |
|
132 |
# Make sure there is no sudden changes to upstream rules file |
133 |
# (more for my own needs than anything else ...) |
134 |
MD5=$(md5sum < "${S}/etc/udev/rules.d/50-udev-default.rules") |
135 |
MD5=${MD5/ -/} |
136 |
if [[ ${MD5} != a71a3459f46eb61b209a73fc0c6a299f ]] |
137 |
then |
138 |
echo |
139 |
eerror "50-udev-default.rules has been updated, please validate!" |
140 |
die "50-udev-default.rules has been updated, please validate!" |
141 |
fi |
142 |
|
143 |
sed_helper_dir \ |
144 |
etc/udev/rules.d/50-udev-default.rules \ |
145 |
extras/rule_generator/write_*_rules \ |
146 |
udev_rules_parse.c \ |
147 |
udev_rules.c |
148 |
|
149 |
# Use correct multilib dir |
150 |
sed -i extras/volume_id/lib/Makefile \ |
151 |
-e "/ =/s-/lib-/$(get_libdir)-" |
152 |
} |
153 |
|
154 |
src_compile() { |
155 |
filter-flags -fprefetch-loop-arrays |
156 |
|
157 |
if [[ -z ${extras} ]]; then |
158 |
eerror "Variable extras is unset!" |
159 |
eerror "It seems you suffer from Bug #190994" |
160 |
die "Variable extras is unset!" |
161 |
fi |
162 |
|
163 |
# Not everyone has full $CHOST-{ld,ar,etc...} yet |
164 |
local mycross="" |
165 |
type -p ${CHOST}-ar && mycross=${CHOST}- |
166 |
|
167 |
emake \ |
168 |
EXTRAS="${extras}" \ |
169 |
libudevdir=${udev_helper_dir} \ |
170 |
CROSS_COMPILE=${mycross} \ |
171 |
OPTFLAGS="" \ |
172 |
${myconf} || die "compiling udev failed" |
173 |
} |
174 |
|
175 |
src_install() { |
176 |
into / |
177 |
emake \ |
178 |
DESTDIR="${D}" \ |
179 |
libudevdir=${udev_helper_dir} \ |
180 |
EXTRAS="${extras}" \ |
181 |
${myconf} \ |
182 |
install || die "make install failed" |
183 |
|
184 |
exeinto "${udev_helper_dir}" |
185 |
newexe "${FILESDIR}"/net-104-r10.sh net.sh || die "net.sh not installed properly" |
186 |
newexe "${FILESDIR}"/move_tmp_persistent_rules-112-r1.sh move_tmp_persistent_rules.sh \ |
187 |
|| die "move_tmp_persistent_rules.sh not installed properly" |
188 |
doexe "${FILESDIR}"/write_root_link_rule \ |
189 |
|| die "write_root_link_rule not installed properly" |
190 |
|
191 |
keepdir "${udev_helper_dir}"/state |
192 |
keepdir "${udev_helper_dir}"/devices |
193 |
|
194 |
# create symlinks for these utilities to /sbin |
195 |
# where multipath-tools expect them to be (Bug #168588) |
196 |
dosym "..${udev_helper_dir}/vol_id" /sbin/vol_id |
197 |
dosym "..${udev_helper_dir}/scsi_id" /sbin/scsi_id |
198 |
|
199 |
# vol_id library (needed by mount and HAL) |
200 |
into / |
201 |
rm "${D}/$(get_libdir)"/libvolume_id.so* 2>/dev/null |
202 |
dolib extras/volume_id/lib/*.so* || die "Failed installing libvolume_id.so" |
203 |
into /usr |
204 |
dolib extras/volume_id/lib/*.a || die "Failed installing libvolume_id.a" |
205 |
|
206 |
# handle static linking bug #4411 |
207 |
rm -f "${D}/usr/$(get_libdir)/libvolume_id.so" |
208 |
gen_usr_ldscript libvolume_id.so |
209 |
|
210 |
# Add gentoo stuff to udev.conf |
211 |
cat "${FILESDIR}"/udev.conf.115-r6 >> "${D}"/etc/udev/udev.conf |
212 |
|
213 |
# Now installing rules |
214 |
cd etc/udev |
215 |
insinto /etc/udev/rules.d/ |
216 |
|
217 |
# Our rules files |
218 |
doins gentoo/??-*.rules |
219 |
doins packages/40-alsa.rules |
220 |
|
221 |
# Adding arch specific rules |
222 |
if [[ -f packages/40-${ARCH}.rules ]] |
223 |
then |
224 |
doins "packages/40-${ARCH}.rules" |
225 |
fi |
226 |
cd "${S}" |
227 |
|
228 |
# our udev hooks into the rc system |
229 |
insinto /$(get_libdir)/rcscripts/addons |
230 |
newins "${FILESDIR}"/udev-start-115-r6.sh udev-start.sh |
231 |
newins "${FILESDIR}"/udev-stop-111-r2.sh udev-stop.sh |
232 |
|
233 |
# The udev-post init-script |
234 |
newinitd "${FILESDIR}"/udev-postmount-initd-111-r2 udev-postmount |
235 |
|
236 |
insinto /etc/modprobe.d |
237 |
newins "${FILESDIR}"/blacklist-110 blacklist |
238 |
doins "${FILESDIR}"/pnp-aliases |
239 |
|
240 |
# convert /lib/udev to real used dir |
241 |
sed_helper_dir \ |
242 |
"${D}/$(get_libdir)"/rcscripts/addons/*.sh \ |
243 |
"${D}"/etc/init.d/udev* \ |
244 |
"${D}"/etc/modprobe.d/* |
245 |
|
246 |
# documentation |
247 |
dodoc ChangeLog FAQ README TODO RELEASE-NOTES |
248 |
dodoc docs/{overview,udev_vs_devfs} |
249 |
|
250 |
cd docs/writing_udev_rules |
251 |
mv index.html writing_udev_rules.html |
252 |
dohtml *.html |
253 |
|
254 |
cd "${S}" |
255 |
|
256 |
newdoc extras/volume_id/README README_volume_id |
257 |
|
258 |
echo "CONFIG_PROTECT_MASK=\"/etc/udev/rules.d\"" > 20udev |
259 |
doenvd 20udev |
260 |
} |
261 |
|
262 |
pkg_preinst() { |
263 |
if [[ -d ${ROOT}/lib/udev-state ]] |
264 |
then |
265 |
mv -f "${ROOT}"/lib/udev-state/* "${D}"/lib/udev/state/ |
266 |
rm -r "${ROOT}"/lib/udev-state |
267 |
fi |
268 |
|
269 |
if [[ -f ${ROOT}/etc/udev/udev.config && |
270 |
! -f ${ROOT}/etc/udev/udev.rules ]] |
271 |
then |
272 |
mv -f "${ROOT}"/etc/udev/udev.config "${ROOT}"/etc/udev/udev.rules |
273 |
fi |
274 |
|
275 |
# delete the old udev.hotplug symlink if it is present |
276 |
if [[ -h ${ROOT}/etc/hotplug.d/default/udev.hotplug ]] |
277 |
then |
278 |
rm -f "${ROOT}"/etc/hotplug.d/default/udev.hotplug |
279 |
fi |
280 |
|
281 |
# delete the old wait_for_sysfs.hotplug symlink if it is present |
282 |
if [[ -h ${ROOT}/etc/hotplug.d/default/05-wait_for_sysfs.hotplug ]] |
283 |
then |
284 |
rm -f "${ROOT}"/etc/hotplug.d/default/05-wait_for_sysfs.hotplug |
285 |
fi |
286 |
|
287 |
# delete the old wait_for_sysfs.hotplug symlink if it is present |
288 |
if [[ -h ${ROOT}/etc/hotplug.d/default/10-udev.hotplug ]] |
289 |
then |
290 |
rm -f "${ROOT}"/etc/hotplug.d/default/10-udev.hotplug |
291 |
fi |
292 |
|
293 |
# is there a stale coldplug initscript? (CONFIG_PROTECT leaves it behind) |
294 |
coldplug_stale="" |
295 |
if [[ -f ${ROOT}/etc/init.d/coldplug ]] |
296 |
then |
297 |
coldplug_stale="1" |
298 |
fi |
299 |
} |
300 |
|
301 |
pkg_postinst() { |
302 |
# people want reminders, I'll give them reminders. Odds are they will |
303 |
# just ignore them anyway... |
304 |
|
305 |
if [[ ${coldplug_stale} == 1 ]] |
306 |
then |
307 |
ewarn "A stale coldplug init script found. You should run:" |
308 |
ewarn |
309 |
ewarn " rc-update del coldplug" |
310 |
ewarn " rm -f /etc/init.d/coldplug" |
311 |
ewarn |
312 |
ewarn "udev now provides its own coldplug functionality." |
313 |
fi |
314 |
|
315 |
# delete 40-scsi-hotplug.rules - all integrated in 50-udev.rules |
316 |
if has_version "=sys-fs/udev-103-r3" && |
317 |
[[ -e ${ROOT}/etc/udev/rules.d/40-scsi-hotplug.rules ]] |
318 |
then |
319 |
ewarn "Deleting stray 40-scsi-hotplug.rules" |
320 |
ewarn "installed by sys-fs/udev-103-r3" |
321 |
rm -f "${ROOT}"/etc/udev/rules.d/40-scsi-hotplug.rules |
322 |
fi |
323 |
|
324 |
# Removing some device-nodes we thought we need some time ago |
325 |
if [[ -d ${ROOT}/lib/udev/devices ]] |
326 |
then |
327 |
rm -f "${ROOT}"/lib/udev/devices/{null,zero,console,urandom} |
328 |
fi |
329 |
|
330 |
# Removing some old file |
331 |
if has_version "<sys-fs/udev-104-r5" |
332 |
then |
333 |
rm -f "${ROOT}"/etc/dev.d/net/hotplug.dev |
334 |
rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/net 2>/dev/null |
335 |
fi |
336 |
|
337 |
if has_version "<sys-fs/udev-106-r5" && |
338 |
[[ -e ${ROOT}/etc/udev/rules.d/95-net.rules ]] |
339 |
then |
340 |
rm -f "${ROOT}"/etc/udev/rules.d/95-net.rules |
341 |
fi |
342 |
|
343 |
# Try to remove /etc/dev.d as that is obsolete |
344 |
if [[ -d ${ROOT}/etc/dev.d ]] |
345 |
then |
346 |
rmdir --ignore-fail-on-non-empty "${ROOT}"/etc/dev.d/default "${ROOT}"/etc/dev.d 2>/dev/null |
347 |
if [[ -d ${ROOT}/etc/dev.d ]] |
348 |
then |
349 |
ewarn "You still have the directory /etc/dev.d on your system." |
350 |
ewarn "This is no longer used by udev and can be removed." |
351 |
fi |
352 |
fi |
353 |
|
354 |
# 64-device-mapper.rules now gets installed by sys-fs/device-mapper |
355 |
# remove it if user don't has sys-fs/device-mapper installed |
356 |
if has_version "<sys-fs/udev-113" && |
357 |
[[ -f ${ROOT}/etc/udev/rules.d/64-device-mapper.rules ]] && |
358 |
! has_version sys-fs/device-mapper |
359 |
then |
360 |
rm -f "${ROOT}"/etc/udev/rules.d/64-device-mapper.rules |
361 |
einfo "Removed unneeded file 64-device-mapper.rules" |
362 |
fi |
363 |
|
364 |
if [[ ${ROOT} == / ]] |
365 |
then |
366 |
# check if root of init-process is identical to ours |
367 |
if [[ -r /proc/1/root && /proc/1/root/ -ef /proc/self/root/ ]] |
368 |
then |
369 |
einfo "restarting udevd now." |
370 |
if [[ -n $(pidof udevd) ]] |
371 |
then |
372 |
killall -15 udevd &>/dev/null |
373 |
sleep 1 |
374 |
killall -9 udevd &>/dev/null |
375 |
fi |
376 |
/sbin/udevd --daemon |
377 |
fi |
378 |
fi |
379 |
|
380 |
ewarn "If you build an initramfs including udev, then please" |
381 |
ewarn "make sure that the /sbin/udevadm binary gets included," |
382 |
ewarn "as the helper apps udevinfo, udevtrigger, ... are now" |
383 |
ewarn "only symlinks to udevadm." |
384 |
|
385 |
einfo |
386 |
einfo "For more information on udev on Gentoo, writing udev rules, and" |
387 |
einfo " fixing known issues visit:" |
388 |
einfo " http://www.gentoo.org/doc/en/udev-guide.xml" |
389 |
} |
390 |
|
391 |
|
392 |
|
393 |
-- |
394 |
gentoo-commits@g.o mailing list |