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-2.1.1.ebuild ChangeLog eudev-2.1.ebuild
Date: Wed, 29 Oct 2014 20:54:40
Message-Id: 20141029205434.A9D429065@oystercatcher.gentoo.org
1 blueness 14/10/29 20:54:34
2
3 Modified: ChangeLog
4 Added: eudev-2.1.1.ebuild
5 Removed: eudev-2.1.ebuild
6 Log:
7 Version bump, fixes build on musl
8
9 (Portage version: 2.2.8-r2/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)
10
11 Revision Changes Path
12 1.152 sys-fs/eudev/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/eudev/ChangeLog?rev=1.152&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/eudev/ChangeLog?rev=1.152&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/eudev/ChangeLog?r1=1.151&r2=1.152
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/sys-fs/eudev/ChangeLog,v
21 retrieving revision 1.151
22 retrieving revision 1.152
23 diff -u -r1.151 -r1.152
24 --- ChangeLog 29 Oct 2014 01:00:34 -0000 1.151
25 +++ ChangeLog 29 Oct 2014 20:54:34 -0000 1.152
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.151 2014/10/29 01:00:34 blueness Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/eudev/ChangeLog,v 1.152 2014/10/29 20:54:34 blueness Exp $
31 +
32 +*eudev-2.1.1 (29 Oct 2014)
33 +
34 + 29 Oct 2014; Anthony G. Basile <blueness@g.o> +eudev-2.1.1.ebuild,
35 + -eudev-2.1.ebuild:
36 + Version bump, fixes build on musl
37
38 *eudev-2.1 (29 Oct 2014)
39
40
41
42
43 1.1 sys-fs/eudev/eudev-2.1.1.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/eudev/eudev-2.1.1.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/eudev/eudev-2.1.1.ebuild?rev=1.1&content-type=text/plain
47
48 Index: eudev-2.1.1.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-2.1.1.ebuild,v 1.1 2014/10/29 20:54:34 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 +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=">=sys-fs/udev-init-scripts-26
108 hwdb? ( >=sys-apps/hwids-20140304[udev] )
109 keymap? ( >=sys-apps/hwids-20140304[udev] )"
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 epatch_user
157
158 if use doc; then
159 gtkdocize --docdir docs || die "gtkdocize failed"
160 else
161 echo 'EXTRA_DIST =' > docs/gtk-doc.make
162 fi
163 # This may break without WANT_AUTOMAKE=1.13, but we
164 # we want this so we can fix problems upstream.
165 eautoreconf
166 }
167
168 multilib_src_configure() {
169 tc-export CC #463846
170 export cc_cv_CFLAGS__flto=no #502950
171
172 # Keep sorted by ./configure --help and only pass --disable flags
173 # when *required* to avoid external deps or unnecessary compile
174 local econf_args
175 econf_args=(
176 ac_cv_search_cap_init=
177 ac_cv_header_sys_capability_h=yes
178 DBUS_CFLAGS=' '
179 DBUS_LIBS=' '
180 --with-rootprefix=
181 --docdir=/usr/share/doc/${PF}
182 --libdir=/usr/$(get_libdir)
183 --with-rootlibexecdir=/lib/udev
184 --with-html-dir="/usr/share/doc/${PF}/html"
185 --enable-split-usr
186 --exec-prefix=/
187
188 $(use_enable gudev)
189 )
190
191 # Only build libudev for non-native_abi, and only install it to libdir,
192 # that means all options only apply to native_abi
193 if multilib_is_native_abi; then
194 econf_args+=(
195 --with-rootlibdir=/$(get_libdir)
196 $(use_enable doc gtk-doc)
197 $(use_enable introspection)
198 $(use_enable keymap)
199 $(use_enable kmod libkmod)
200 $(usex kmod --enable-modules $(use_enable modutils modules))
201 $(use_enable static-libs static)
202 $(use_enable selinux)
203 $(use_enable rule-generator)
204 )
205 else
206 econf_args+=(
207 --disable-static
208 --disable-gtk-doc
209 --disable-introspection
210 --disable-keymap
211 --disable-libkmod
212 --disable-modules
213 --disable-selinux
214 --disable-rule-generator
215 )
216 fi
217 ECONF_SOURCE="${S}" econf "${econf_args[@]}"
218 }
219
220 multilib_src_compile() {
221 if multilib_is_native_abi; then
222 emake
223 else
224 emake -C src/shared
225 emake -C src/libudev
226 use gudev && emake -C src/gudev
227 fi
228 }
229
230 multilib_src_install() {
231 if multilib_is_native_abi; then
232 emake DESTDIR="${D}" install
233 else
234 emake -C src/libudev DESTDIR="${D}" install
235 use gudev && emake -C src/gudev DESTDIR="${D}" install
236 fi
237 }
238
239 multilib_src_test() {
240 # make sandbox get out of the way
241 # these are safe because there is a fake root filesystem put in place,
242 # but sandbox seems to evaluate the paths of the test i/o instead of the
243 # paths of the actual i/o that results.
244 # also only test for native abi
245 if multilib_is_native_abi; then
246 addread /sys
247 addwrite /dev
248 addwrite /run
249 default_src_test
250 fi
251 }
252
253 multilib_src_install_all() {
254 prune_libtool_files --all
255 rm -rf "${ED}"/usr/share/doc/${PF}/LICENSE.*
256
257 use rule-generator && doinitd "${FILESDIR}"/udev-postmount
258
259 # drop distributed hwdb files, they override sys-apps/hwids
260 rm -f "${ED}"/etc/udev/hwdb.d/*.hwdb
261
262 insinto /lib/udev/rules.d
263 doins "${FILESDIR}"/40-gentoo.rules
264
265 insinto /usr/share/doc/${PF}/html/gudev
266 doins "${S}"/docs/gudev/html/*
267
268 insinto /usr/share/doc/${PF}/html/libudev
269 doins "${S}"/docs/libudev/html/*
270 }
271
272 pkg_preinst() {
273 local htmldir
274 for htmldir in gudev libudev; do
275 if [[ -d ${EROOT}usr/share/gtk-doc/html/${htmldir} ]]; then
276 rm -rf "${EROOT}"usr/share/gtk-doc/html/${htmldir}
277 fi
278 if [[ -d ${ED}/usr/share/doc/${PF}/html/${htmldir} ]]; then
279 dosym ../../doc/${PF}/html/${htmldir} \
280 /usr/share/gtk-doc/html/${htmldir}
281 fi
282 done
283 }
284
285 pkg_postinst() {
286 mkdir -p "${EROOT}"run
287
288 # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766
289 # So try to remove it here (will only work if empty).
290 rmdir "${EROOT}"dev/loop 2>/dev/null
291 if [[ -d ${EROOT}dev/loop ]]; then
292 ewarn "Please make sure your remove /dev/loop,"
293 ewarn "else losetup may be confused when looking for unused devices."
294 fi
295
296 if use hwdb && has_version 'sys-apps/hwids[udev]'; then
297 udevadm hwdb --update --root="${ROOT%/}"
298
299 # http://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda
300 # reload database after it has be rebuilt, but only if we are not upgrading
301 # also pass if we are -9999 since who knows what hwdb related changes there might be
302 if [[ ${REPLACING_VERSIONS%-r*} == ${PV} || -z ${REPLACING_VERSIONS} ]] && \
303 [[ ${ROOT%/} == "" ]] && [[ ${PV} != "9999" ]]; then
304 udevadm control --reload
305 fi
306 fi
307
308 ewarn
309 ewarn "You need to restart eudev as soon as possible to make the"
310 ewarn "upgrade go into effect:"
311 ewarn "\t/etc/init.d/udev --nodeps restart"
312
313 if use rule-generator && \
314 [[ -x $(type -P rc-update) ]] && rc-update show | grep udev-postmount | grep -qsv 'boot\|default\|sysinit'; then
315 ewarn
316 ewarn "Please add the udev-postmount init script to your default runlevel"
317 ewarn "to ensure the legacy rule-generator functionality works as reliably"
318 ewarn "as possible."
319 ewarn "\trc-update add udev-postmount default"
320 fi
321
322 elog
323 elog "For more information on eudev on Gentoo, writing udev rules, and"
324 elog "fixing known issues visit:"
325 elog " http://www.gentoo.org/doc/en/udev-guide.xml"
326 elog
327
328 # http://cgit.freedesktop.org/systemd/systemd/commit/rules/50-udev-default.rules?id=3dff3e00e044e2d53c76fa842b9a4759d4a50e69
329 # http://bugs.gentoo.org/246847
330 # http://bugs.gentoo.org/514174
331 enewgroup input
332
333 # Update hwdb database in case the format is changed by udev version.
334 if has_version 'sys-apps/hwids[udev]'; then
335 udevadm hwdb --update --root="${ROOT%/}"
336 # Only reload when we are not upgrading to avoid potential race w/ incompatible hwdb.bin and the running udevd
337 if [[ -z ${REPLACING_VERSIONS} ]]; then
338 # http://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda
339 if [[ ${ROOT} != "" ]] && [[ ${ROOT} != "/" ]]; then
340 return 0
341 fi
342 udevadm control --reload
343 fi
344 fi
345 }