Gentoo Archives: gentoo-commits

From: "Anthony G. Basile (blueness)" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-fs/eudev: eudev-1.5.3-r1.ebuild ChangeLog
Date: Fri, 28 Mar 2014 12:32:57
Message-Id: 20140328123246.E8A9520051@flycatcher.gentoo.org
1 blueness 14/03/28 12:32:46
2
3 Modified: ChangeLog
4 Added: eudev-1.5.3-r1.ebuild
5 Log:
6 Backport multilib libgudev, bug #506002
7
8 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)
9
10 Revision Changes Path
11 1.96 sys-fs/eudev/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/eudev/ChangeLog?rev=1.96&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/eudev/ChangeLog?rev=1.96&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/eudev/ChangeLog?r1=1.95&r2=1.96
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-fs/eudev/ChangeLog,v
20 retrieving revision 1.95
21 retrieving revision 1.96
22 diff -u -r1.95 -r1.96
23 --- ChangeLog 27 Mar 2014 22:57:43 -0000 1.95
24 +++ ChangeLog 28 Mar 2014 12:32:46 -0000 1.96
25 @@ -1,6 +1,11 @@
26 # ChangeLog for sys-fs/eudev
27 # Copyright 1999- Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-fs/eudev/ChangeLog,v 1.95 2014/03/27 22:57:43 blueness Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/eudev/ChangeLog,v 1.96 2014/03/28 12:32:46 blueness Exp $
30 +
31 +*eudev-1.5.3-r1 (28 Mar 2014)
32 +
33 + 28 Mar 2014; Anthony G. Basile <blueness@g.o> +eudev-1.5.3-r1.ebuild:
34 + Backport multilib libgudev, bug #506002
35
36 27 Mar 2014; Anthony G. Basile <blueness@g.o> eudev-9999.ebuild:
37 Install multilib libgudev, bug #506002
38
39
40
41 1.1 sys-fs/eudev/eudev-1.5.3-r1.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/eudev/eudev-1.5.3-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/eudev/eudev-1.5.3-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: eudev-1.5.3-r1.ebuild
47 ===================================================================
48 # Copyright 1999-2014 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/sys-fs/eudev/eudev-1.5.3-r1.ebuild,v 1.1 2014/03/28 12:32:46 blueness Exp $
51
52 EAPI="5"
53
54 KV_min=2.6.31
55
56 inherit autotools eutils multilib linux-info multilib-minimal
57
58 if [[ ${PV} = 9999* ]]
59 then
60 EGIT_REPO_URI="git://github.com/gentoo/eudev.git"
61 inherit git-2
62 else
63 SRC_URI="http://dev.gentoo.org/~blueness/${PN}/${P}.tar.gz"
64 KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~x86"
65 fi
66
67 DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)"
68 HOMEPAGE="https://github.com/gentoo/eudev"
69
70 LICENSE="LGPL-2.1 MIT GPL-2"
71 SLOT="0"
72 IUSE="doc gudev +hwdb kmod introspection +keymap +modutils +openrc +rule-generator selinux static-libs test"
73
74 COMMON_DEPEND="gudev? ( dev-libs/glib:2[${MULTILIB_USEDEP}] )
75 kmod? ( sys-apps/kmod )
76 introspection? ( >=dev-libs/gobject-introspection-1.31.1 )
77 selinux? ( sys-libs/libselinux )
78 >=sys-apps/util-linux-2.20
79 !<sys-libs/glibc-2.11
80 abi_x86_32? (
81 !<=app-emulation/emul-linux-x86-baselibs-20130224-r7
82 !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)]
83 )"
84
85 DEPEND="${COMMON_DEPEND}
86 keymap? ( dev-util/gperf )
87 >=dev-util/intltool-0.40.0
88 virtual/pkgconfig
89 virtual/os-headers
90 !<sys-kernel/linux-headers-${KV_min}
91 doc? ( dev-util/gtk-doc )
92 app-text/docbook-xsl-stylesheets
93 dev-libs/libxslt
94 test? ( app-text/tree dev-lang/perl )"
95
96 RDEPEND="${COMMON_DEPEND}
97 !sys-fs/udev
98 !sys-apps/coldplug
99 !sys-apps/systemd
100 !<sys-fs/lvm2-2.02.97
101 !sys-fs/device-mapper
102 !<sys-fs/udev-init-scripts-18"
103
104 PDEPEND="hwdb? ( >=sys-apps/hwids-20130717-r1[udev] )
105 keymap? ( >=sys-apps/hwids-20130717-r1[udev] )
106 >=virtual/udev-206-r2
107 openrc? ( >=sys-fs/udev-init-scripts-18 )"
108
109 REQUIRED_USE="keymap? ( hwdb )"
110
111 pkg_pretend()
112 {
113 if ! use rule-generator; then
114 ewarn
115 ewarn "As of 2013-01-29, ${P} provides the new interface renaming functionality,"
116 ewarn "as described in the URL below:"
117 ewarn "http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames"
118 ewarn
119 ewarn "This functionality is enabled BY DEFAULT because eudev has no means of synchronizing"
120 ewarn "between the default or user-modified choice of sys-fs/udev. If you wish to disable"
121 ewarn "this new iface naming, please be sure that /etc/udev/rules.d/80-net-name-slot.rules"
122 ewarn "exists:"
123 ewarn "\ttouch /etc/udev/rules.d/80-net-name-slot.rules"
124 ewarn
125 ewarn "We are working on a better solution for the next beta release."
126 ewarn
127 fi
128 }
129
130 pkg_setup()
131 {
132 linux-info_pkg_setup
133 get_running_version
134
135 # These are required kernel options, but we don't error out on them
136 # because you can build under one kernel and run under another.
137 CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~SIGNALFD ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2"
138
139 if kernel_is lt ${KV_min//./ }; then
140 ewarn
141 ewarn "Your current running kernel version ${KV_FULL} is too old to run ${P}."
142 ewarn "Make sure to run udev under kernel version ${KV_min} or above."
143 ewarn
144 fi
145 }
146
147 src_prepare()
148 {
149 # change rules back to group uucp instead of dialout for now
150 sed -e 's/GROUP="dialout"/GROUP="uucp"/' -i rules/*.rules \
151 || die "failed to change group dialout to uucp"
152
153 epatch_user
154
155 if [[ ! -e configure ]]
156 then
157 if use doc
158 then
159 gtkdocize --docdir docs || die "gtkdocize failed"
160 else
161 echo 'EXTRA_DIST =' > docs/gtk-doc.make
162 fi
163 eautoreconf
164 else
165 elibtoolize
166 fi
167 }
168
169 multilib_src_configure()
170 {
171 local econf_args
172
173 econf_args=(
174 ac_cv_search_cap_init=
175 ac_cv_header_sys_capability_h=yes
176 DBUS_CFLAGS=' '
177 DBUS_LIBS=' '
178 --with-rootprefix=
179 --docdir=/usr/share/doc/${PF}
180 --libdir=/usr/$(get_libdir)
181 --with-firmware-path="${EPREFIX}usr/lib/firmware/updates:${EPREFIX}usr/lib/firmware:${EPREFIX}lib/firmware/updates:${EPREFIX}lib/firmware"
182 --with-html-dir="/usr/share/doc/${PF}/html"
183 --enable-split-usr
184 --exec-prefix=/
185
186 $(use_enable gudev)
187 )
188
189 # Only build libudev for non-native_abi, and only install it to libdir,
190 # that means all options only apply to native_abi
191 if multilib_build_binaries; then econf_args+=(
192 --with-rootlibdir=/$(get_libdir)
193 $(use_enable doc gtk-doc)
194 $(use_enable introspection)
195 $(use_enable keymap)
196 $(use_enable kmod libkmod)
197 $(usex kmod --enable-modules $(use_enable modutils modules))
198 $(use_enable static-libs static)
199 $(use_enable selinux)
200 $(use_enable rule-generator)
201 )
202 else econf_args+=(
203 $(echo --disable-{gtk-doc,introspection,keymap,libkmod,modules,static,selinux,rule-generator})
204 )
205 fi
206 ECONF_SOURCE="${S}" econf "${econf_args[@]}"
207 }
208
209 multilib_src_compile()
210 {
211 if multilib_build_binaries; then
212 emake
213 else
214 emake -C src/libudev
215 emake -C src/gudev
216 fi
217 }
218
219 multilib_src_install()
220 {
221 if multilib_build_binaries; then
222 emake DESTDIR="${D}" install
223 else
224 emake -C src/libudev DESTDIR="${D}" install
225 emake -C src/gudev DESTDIR="${D}" install
226 fi
227 }
228
229 multilib_src_test()
230 {
231 # make sandbox get out of the way
232 # these are safe because there is a fake root filesystem put in place,
233 # but sandbox seems to evaluate the paths of the test i/o instead of the
234 # paths of the actual i/o that results.
235 # also only test for native abi
236 if multilib_build_binaries; then
237 addread /sys
238 addwrite /dev
239 addwrite /run
240 default_src_test
241 fi
242 }
243
244 # disable header checks because we only install libudev headers for non-native abi
245 multilib_check_headers()
246 {
247 :
248 }
249
250 multilib_src_install_all()
251 {
252 prune_libtool_files --all
253 rm -rf "${ED}"/usr/share/doc/${PF}/LICENSE.*
254
255 use rule-generator && use openrc && doinitd "${FILESDIR}"/udev-postmount
256
257 # drop distributed hwdb files, they override sys-apps/hwids
258 rm -f "${ED}"/etc/udev/hwdb.d/*.hwdb
259
260 insinto /lib/udev/rules.d
261 doins "${FILESDIR}"/40-gentoo.rules
262 }
263
264 pkg_preinst()
265 {
266 local htmldir
267 for htmldir in gudev libudev; do
268 if [[ -d ${EROOT}usr/share/gtk-doc/html/${htmldir} ]]
269 then
270 rm -rf "${EROOT}"usr/share/gtk-doc/html/${htmldir}
271 fi
272 if [[ -d ${ED}/usr/share/doc/${PF}/html/${htmldir} ]]
273 then
274 dosym ../../doc/${PF}/html/${htmldir} \
275 /usr/share/gtk-doc/html/${htmldir}
276 fi
277 done
278 }
279
280 pkg_postinst()
281 {
282 mkdir -p "${EROOT}"run
283
284 # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766
285 # So try to remove it here (will only work if empty).
286 rmdir "${EROOT}"dev/loop 2>/dev/null
287 if [[ -d ${EROOT}dev/loop ]]
288 then
289 ewarn "Please make sure you remove /dev/loop, else losetup"
290 ewarn "may be confused when looking for unused devices."
291 fi
292
293 # 64-device-mapper.rules now gets installed by sys-fs/device-mapper
294 # remove it if user don't has sys-fs/device-mapper installed, 27 Jun 2007
295 if [[ -f ${EROOT}etc/udev/rules.d/64-device-mapper.rules ]] &&
296 ! has_version sys-fs/device-mapper
297 then
298 rm -f "${EROOT}"etc/udev/rules.d/64-device-mapper.rules
299 einfo "Removed unneeded file 64-device-mapper.rules"
300 fi
301
302 if use hwdb && has_version 'sys-apps/hwids[udev]'; then
303 udevadm hwdb --update --root="${ROOT%/}"
304
305 # http://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda
306 # reload database after it has be rebuilt, but only if we are not upgrading
307 # also pass if we are -9999 since who knows what hwdb related changes there might be
308 if [[ ${REPLACING_VERSIONS%-r*} == ${PV} || -z ${REPLACING_VERSIONS} ]] && \
309 [[ ${ROOT%/} == "" ]] && [[ ${PV} != "9999" ]]; then
310 udevadm control --reload
311 fi
312 fi
313
314 ewarn
315 ewarn "You need to restart eudev as soon as possible to make the"
316 ewarn "upgrade go into effect:"
317 ewarn "\t/etc/init.d/udev --nodeps restart"
318
319 if use rule-generator && use openrc; then
320 ewarn
321 ewarn "Please add the udev-postmount init script to your default runlevel"
322 ewarn "to ensure the legacy rule-generator functionality works as reliably"
323 ewarn "as possible."
324 ewarn "\trc-update add udev-postmount default"
325 fi
326
327 elog
328 elog "For more information on eudev on Gentoo, writing udev rules, and"
329 elog "fixing known issues visit:"
330 elog " http://www.gentoo.org/doc/en/udev-guide.xml"
331 elog
332 }