Gentoo Archives: gentoo-commits

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