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