1 |
commit: 5ad71de752224d90f6368bd20d030075a55f9fd6 |
2 |
Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Jun 24 13:47:26 2016 +0000 |
4 |
Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jun 24 13:47:26 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5ad71de7 |
7 |
|
8 |
sys-fs/eudev: add live ebuild for testing eudev-4 branch |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
|
12 |
sys-fs/eudev/eudev-4.9999.ebuild | 226 +++++++++++++++++++++++++++++++++++++++ |
13 |
sys-fs/eudev/metadata.xml | 3 + |
14 |
2 files changed, 229 insertions(+) |
15 |
|
16 |
diff --git a/sys-fs/eudev/eudev-4.9999.ebuild b/sys-fs/eudev/eudev-4.9999.ebuild |
17 |
new file mode 100644 |
18 |
index 0000000..fc9ab64 |
19 |
--- /dev/null |
20 |
+++ b/sys-fs/eudev/eudev-4.9999.ebuild |
21 |
@@ -0,0 +1,226 @@ |
22 |
+# Copyright 1999-2016 Gentoo Foundation |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+# $Id$ |
25 |
+ |
26 |
+EAPI="5" |
27 |
+ |
28 |
+KV_min=2.6.39 |
29 |
+ |
30 |
+inherit autotools eutils linux-info multilib multilib-minimal user |
31 |
+ |
32 |
+if [[ ${PV} = 4.9999* ]]; then |
33 |
+ EGIT_REPO_URI="git://github.com/gentoo/eudev.git" |
34 |
+ EGIT_BRANCH="eudev-4" |
35 |
+ inherit git-r3 |
36 |
+else |
37 |
+ SRC_URI="https://dev.gentoo.org/~blueness/${PN}/${P}.tar.gz" |
38 |
+ #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" |
39 |
+ KEYWORDS="" |
40 |
+fi |
41 |
+ |
42 |
+DESCRIPTION="Linux dynamic and persistent device naming support (aka userspace devfs)" |
43 |
+HOMEPAGE="https://github.com/gentoo/eudev" |
44 |
+ |
45 |
+LICENSE="LGPL-2.1 GPL-2" |
46 |
+SLOT="0" |
47 |
+IUSE="+blkid efi +hwdb +kmod selinux smack test" |
48 |
+ |
49 |
+COMMON_DEPEND=">=sys-apps/util-linux-2.20 |
50 |
+ kmod? ( >=sys-apps/kmod-16 ) |
51 |
+ selinux? ( >=sys-libs/libselinux-2.1.9 ) |
52 |
+ !<sys-libs/glibc-2.11 |
53 |
+ !sys-apps/gentoo-systemd-integration |
54 |
+ !sys-apps/systemd |
55 |
+ abi_x86_32? ( |
56 |
+ !<=app-emulation/emul-linux-x86-baselibs-20130224-r7 |
57 |
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] |
58 |
+ )" |
59 |
+DEPEND="${COMMON_DEPEND} |
60 |
+ dev-util/gperf |
61 |
+ virtual/os-headers |
62 |
+ virtual/pkgconfig |
63 |
+ >=sys-devel/make-3.82-r4 |
64 |
+ >=sys-kernel/linux-headers-${KV_min} |
65 |
+ >=dev-util/intltool-0.50 |
66 |
+ test? ( app-text/tree dev-lang/perl )" |
67 |
+ |
68 |
+RDEPEND="${COMMON_DEPEND} |
69 |
+ !<sys-fs/lvm2-2.02.103 |
70 |
+ !<sec-policy/selinux-base-2.20120725-r10 |
71 |
+ !sys-fs/udev |
72 |
+ !sys-apps/systemd" |
73 |
+ |
74 |
+PDEPEND=">=sys-fs/udev-init-scripts-26 |
75 |
+ hwdb? ( >=sys-apps/hwids-20140304[udev] )" |
76 |
+ |
77 |
+# The multilib-build.eclass doesn't handle situation where the installed headers |
78 |
+# are different in ABIs. In this case, we install libgudev headers in native |
79 |
+# ABI but not for non-native ABI. |
80 |
+multilib_check_headers() { :; } |
81 |
+ |
82 |
+pkg_pretend() { |
83 |
+ ewarn |
84 |
+ ewarn "As of 2013-01-29, ${P} provides the new interface renaming functionality," |
85 |
+ ewarn "as described in the URL below:" |
86 |
+ ewarn "https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames" |
87 |
+ ewarn |
88 |
+ ewarn "This functionality is enabled BY DEFAULT because eudev has no means of synchronizing" |
89 |
+ ewarn "between the default or user-modified choice of sys-fs/udev. If you wish to disable" |
90 |
+ ewarn "this new iface naming, please be sure that /etc/udev/rules.d/80-net-name-slot.rules" |
91 |
+ ewarn "exists: touch /etc/udev/rules.d/80-net-name-slot.rules" |
92 |
+ ewarn |
93 |
+} |
94 |
+ |
95 |
+pkg_setup() { |
96 |
+ CONFIG_CHECK="~BLK_DEV_BSG ~DEVTMPFS ~!IDE ~INOTIFY_USER ~!SYSFS_DEPRECATED ~!SYSFS_DEPRECATED_V2 ~SIGNALFD ~EPOLL ~FHANDLE ~NET ~UNIX" |
97 |
+ linux-info_pkg_setup |
98 |
+ get_running_version |
99 |
+ |
100 |
+ # These are required kernel options, but we don't error out on them |
101 |
+ # because you can build under one kernel and run under another. |
102 |
+ if kernel_is lt ${KV_min//./ }; then |
103 |
+ ewarn |
104 |
+ ewarn "Your current running kernel version ${KV_FULL} is too old to run ${P}." |
105 |
+ ewarn "Make sure to run udev under kernel version ${KV_min} or above." |
106 |
+ ewarn |
107 |
+ fi |
108 |
+} |
109 |
+ |
110 |
+src_prepare() { |
111 |
+ # change rules back to group uucp instead of dialout for now |
112 |
+ sed -e 's/GROUP="dialout"/GROUP="uucp"/' -i rules/*.rules \ |
113 |
+ || die "failed to change group dialout to uucp" |
114 |
+ |
115 |
+ epatch_user |
116 |
+ eautoreconf |
117 |
+} |
118 |
+ |
119 |
+multilib_src_configure() { |
120 |
+ tc-export CC #463846 |
121 |
+ export cc_cv_CFLAGS__flto=no #502950 |
122 |
+ |
123 |
+ # Keep sorted by ./configure --help and only pass --disable flags |
124 |
+ # when *required* to avoid external deps or unnecessary compile |
125 |
+ local econf_args |
126 |
+ econf_args=( |
127 |
+ ac_cv_search_cap_init= |
128 |
+ ac_cv_header_sys_capability_h=yes |
129 |
+ DBUS_CFLAGS=' ' |
130 |
+ DBUS_LIBS=' ' |
131 |
+ --libdir=/usr/$(get_libdir) |
132 |
+ --enable-manpages |
133 |
+ --disable-hwdb |
134 |
+ --exec-prefix=/ |
135 |
+ ) |
136 |
+ |
137 |
+ # Only build libudev for non-native_abi, and only install it to libdir, |
138 |
+ # that means all options only apply to native_abi |
139 |
+ if multilib_is_native_abi; then |
140 |
+ econf_args+=( |
141 |
+ $(use_enable blkid) |
142 |
+ $(use_enable efi) |
143 |
+ $(use_enable kmod) |
144 |
+ $(use_enable selinux) |
145 |
+ $(use_enable smack) |
146 |
+ ) |
147 |
+ else |
148 |
+ econf_args+=( |
149 |
+ --disable-blkid |
150 |
+ --disable-efi |
151 |
+ --disable-kmod |
152 |
+ --disable-selinux |
153 |
+ --disable-smack |
154 |
+ ) |
155 |
+ fi |
156 |
+ ECONF_SOURCE="${S}" econf "${econf_args[@]}" |
157 |
+} |
158 |
+ |
159 |
+#multilib_src_compile() { |
160 |
+# if multilib_is_native_abi; then |
161 |
+# emake |
162 |
+# else |
163 |
+# emake -C src/libudev |
164 |
+# fi |
165 |
+#} |
166 |
+ |
167 |
+#multilib_src_install() { |
168 |
+# if multilib_is_native_abi; then |
169 |
+# emake DESTDIR="${D}" install |
170 |
+# else |
171 |
+# emake -C src/libudev DESTDIR="${D}" install |
172 |
+# fi |
173 |
+#} |
174 |
+ |
175 |
+multilib_src_test() { |
176 |
+ # make sandbox get out of the way |
177 |
+ # these are safe because there is a fake root filesystem put in place, |
178 |
+ # but sandbox seems to evaluate the paths of the test i/o instead of the |
179 |
+ # paths of the actual i/o that results. |
180 |
+ # also only test for native abi |
181 |
+ if multilib_is_native_abi; then |
182 |
+ addread /sys |
183 |
+ addwrite /dev |
184 |
+ addwrite /run |
185 |
+ default_src_test |
186 |
+ fi |
187 |
+} |
188 |
+ |
189 |
+multilib_src_install_all() { |
190 |
+ prune_libtool_files --all |
191 |
+ |
192 |
+ insinto /lib/udev/rules.d |
193 |
+ doins "${FILESDIR}"/40-gentoo.rules |
194 |
+} |
195 |
+ |
196 |
+pkg_postinst() { |
197 |
+ mkdir -p "${EROOT}"run |
198 |
+ |
199 |
+ # "losetup -f" is confused if there is an empty /dev/loop/, Bug #338766 |
200 |
+ # So try to remove it here (will only work if empty). |
201 |
+ rmdir "${EROOT}"dev/loop 2>/dev/null |
202 |
+ if [[ -d ${EROOT}dev/loop ]]; then |
203 |
+ ewarn "Please make sure your remove /dev/loop," |
204 |
+ ewarn "else losetup may be confused when looking for unused devices." |
205 |
+ fi |
206 |
+ |
207 |
+ if use hwdb && has_version 'sys-apps/hwids[udev]'; then |
208 |
+ udevadm hwdb --update --root="${ROOT%/}" |
209 |
+ |
210 |
+ # https://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda |
211 |
+ # reload database after it has be rebuilt, but only if we are not upgrading |
212 |
+ # also pass if we are -9999 since who knows what hwdb related changes there might be |
213 |
+ if [[ ${REPLACING_VERSIONS%-r*} == ${PV} || -z ${REPLACING_VERSIONS} ]] && \ |
214 |
+ [[ ${ROOT%/} == "" ]] && [[ ${PV} != "9999" ]]; then |
215 |
+ udevadm control --reload |
216 |
+ fi |
217 |
+ fi |
218 |
+ |
219 |
+ ewarn |
220 |
+ ewarn "You need to restart eudev as soon as possible to make the" |
221 |
+ ewarn "upgrade go into effect:" |
222 |
+ ewarn "\t/etc/init.d/udev --nodeps restart" |
223 |
+ |
224 |
+ elog |
225 |
+ elog "For more information on eudev on Gentoo, writing udev rules, and" |
226 |
+ elog "fixing known issues visit:" |
227 |
+ elog " https://www.gentoo.org/doc/en/udev-guide.xml" |
228 |
+ elog |
229 |
+ |
230 |
+ # https://cgit.freedesktop.org/systemd/systemd/commit/rules/50-udev-default.rules?id=3dff3e00e044e2d53c76fa842b9a4759d4a50e69 |
231 |
+ # https://bugs.gentoo.org/246847 |
232 |
+ # https://bugs.gentoo.org/514174 |
233 |
+ enewgroup input |
234 |
+ |
235 |
+ # Update hwdb database in case the format is changed by udev version. |
236 |
+ if has_version 'sys-apps/hwids[udev]'; then |
237 |
+ udevadm hwdb --update --root="${ROOT%/}" |
238 |
+ # Only reload when we are not upgrading to avoid potential race w/ incompatible hwdb.bin and the running udevd |
239 |
+ if [[ -z ${REPLACING_VERSIONS} ]]; then |
240 |
+ # https://cgit.freedesktop.org/systemd/systemd/commit/?id=1fab57c209035f7e66198343074e9cee06718bda |
241 |
+ if [[ ${ROOT} != "" ]] && [[ ${ROOT} != "/" ]]; then |
242 |
+ return 0 |
243 |
+ fi |
244 |
+ udevadm control --reload |
245 |
+ fi |
246 |
+ fi |
247 |
+} |
248 |
|
249 |
diff --git a/sys-fs/eudev/metadata.xml b/sys-fs/eudev/metadata.xml |
250 |
index 8bd5d67..334d6ee 100644 |
251 |
--- a/sys-fs/eudev/metadata.xml |
252 |
+++ b/sys-fs/eudev/metadata.xml |
253 |
@@ -5,12 +5,15 @@ |
254 |
<email>eudev@g.o</email> |
255 |
</maintainer> |
256 |
<use> |
257 |
+ <flag name="blkid">enable blkid support</flag> |
258 |
+ <flag name="efi">enable EFI support</flag> |
259 |
<flag name="gudev">enable libudev gobject interface</flag> |
260 |
<flag name="hwdb">read vendor/device string database and add it to udev database</flag> |
261 |
<flag name="keymap">map custom hardware's multimedia keys</flag> |
262 |
<flag name="kmod">enable module loading through libkmod</flag> |
263 |
<flag name="modutils">enable module loading support - use modutils calls if kmod not enabled</flag> |
264 |
<flag name="openrc">install the OpenRC init scripts</flag> |
265 |
+ <flag name="smack">enable SMACK security model</flag> |
266 |
<flag name="rule-generator">install legacy rule generator rules and support scripts - note |
267 |
that the functionality within was dropped from sys-fs/udev as it is not stable in |
268 |
all cases; use at your own risk</flag> |