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