1 |
commit: ae1bc12dba420f1f1f0375f813b4a257f7851e2d |
2 |
Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Oct 31 21:49:49 2018 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Oct 31 21:58:02 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae1bc12d |
7 |
|
8 |
sys-apps/util-linux: Rev bump 2.32.1-r1, support multiple python vers |
9 |
|
10 |
This will build the libmount python bindings for all python versions in |
11 |
PYTHON_TARGETS rather than just what is in PYTHON_SINGLE_TARGET. |
12 |
|
13 |
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> |
14 |
Package-Manager: Portage-2.3.51, Repoman-2.3.11 |
15 |
|
16 |
sys-apps/util-linux/util-linux-2.32.1-r1.ebuild | 296 ++++++++++++++++++++++++ |
17 |
1 file changed, 296 insertions(+) |
18 |
|
19 |
diff --git a/sys-apps/util-linux/util-linux-2.32.1-r1.ebuild b/sys-apps/util-linux/util-linux-2.32.1-r1.ebuild |
20 |
new file mode 100644 |
21 |
index 00000000000..8334aa825c1 |
22 |
--- /dev/null |
23 |
+++ b/sys-apps/util-linux/util-linux-2.32.1-r1.ebuild |
24 |
@@ -0,0 +1,296 @@ |
25 |
+# Copyright 1999-2018 Gentoo Authors |
26 |
+# Copyright 2018 Sony Interactive Entertainment Inc. |
27 |
+# Distributed under the terms of the GNU General Public License v2 |
28 |
+ |
29 |
+EAPI=6 |
30 |
+ |
31 |
+PYTHON_COMPAT=( python2_7 python3_{4,5,6,7} ) |
32 |
+ |
33 |
+inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 \ |
34 |
+ pam python-r1 multilib-minimal multiprocessing systemd |
35 |
+ |
36 |
+MY_PV="${PV/_/-}" |
37 |
+MY_P="${PN}-${MY_PV}" |
38 |
+ |
39 |
+if [[ ${PV} == 9999 ]] ; then |
40 |
+ inherit git-r3 autotools |
41 |
+ EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git" |
42 |
+else |
43 |
+ [[ "${PV}" = *_rc* ]] || \ |
44 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux" |
45 |
+ SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz" |
46 |
+fi |
47 |
+ |
48 |
+DESCRIPTION="Various useful Linux utilities" |
49 |
+HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/ https://github.com/karelzak/util-linux" |
50 |
+ |
51 |
+LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain" |
52 |
+SLOT="0" |
53 |
+IUSE="build caps +cramfs fdformat kill ncurses nls pam python +readline selinux slang static-libs +suid systemd test tty-helpers udev unicode userland_GNU" |
54 |
+ |
55 |
+# Most lib deps here are related to programs rather than our libs, |
56 |
+# so we rarely need to specify ${MULTILIB_USEDEP}. |
57 |
+RDEPEND="caps? ( sys-libs/libcap-ng ) |
58 |
+ cramfs? ( sys-libs/zlib:= ) |
59 |
+ ncurses? ( >=sys-libs/ncurses-5.2-r2:0=[unicode?] ) |
60 |
+ nls? ( virtual/libintl[${MULTILIB_USEDEP}] ) |
61 |
+ pam? ( sys-libs/pam ) |
62 |
+ python? ( ${PYTHON_DEPS} ) |
63 |
+ readline? ( sys-libs/readline:0= ) |
64 |
+ selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] ) |
65 |
+ slang? ( sys-libs/slang ) |
66 |
+ !build? ( systemd? ( sys-apps/systemd ) ) |
67 |
+ udev? ( virtual/libudev:= )" |
68 |
+DEPEND="${RDEPEND} |
69 |
+ virtual/pkgconfig |
70 |
+ nls? ( sys-devel/gettext ) |
71 |
+ test? ( sys-devel/bc ) |
72 |
+ virtual/os-headers" |
73 |
+RDEPEND+=" |
74 |
+ kill? ( |
75 |
+ !sys-apps/coreutils[kill] |
76 |
+ !sys-process/procps[kill] |
77 |
+ ) |
78 |
+ !net-wireless/rfkill |
79 |
+ !sys-process/schedutils |
80 |
+ !sys-apps/setarch |
81 |
+ !<sys-apps/sysvinit-2.88-r7 |
82 |
+ !<sys-libs/e2fsprogs-libs-1.41.8 |
83 |
+ !<sys-fs/e2fsprogs-1.41.8 |
84 |
+ !<app-shells/bash-completion-2.7-r1" |
85 |
+ |
86 |
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" |
87 |
+ |
88 |
+S="${WORKDIR}/${MY_P}" |
89 |
+ |
90 |
+PATCHES=( |
91 |
+ "${FILESDIR}/util-linux-2.32-python3-tests.patch" |
92 |
+) |
93 |
+ |
94 |
+src_prepare() { |
95 |
+ default |
96 |
+ |
97 |
+ eapply "${FILESDIR}"/${PN}-2.32-add-missing-lintl.patch |
98 |
+ touch -r "${S}"/configure "${S}"/libsmartcols/src/Makemodule.am || die |
99 |
+ touch -r "${S}"/configure "${S}"/libuuid/src/Makemodule.am || die |
100 |
+ |
101 |
+ # Prevent uuidd test failure due to socket path limit. #593304 |
102 |
+ sed -i \ |
103 |
+ -e "s|UUIDD_SOCKET=\"\$(mktemp -u \"\${TS_OUTDIR}/uuiddXXXXXXXXXXXXX\")\"|UUIDD_SOCKET=\"\$(mktemp -u \"${T}/uuiddXXXXXXXXXXXXX.sock\")\"|g" \ |
104 |
+ tests/ts/uuid/uuidd || die "Failed to fix uuidd test" |
105 |
+ |
106 |
+ if ! use userland_GNU; then |
107 |
+ # test runner is using GNU-specific xargs call |
108 |
+ sed -i -e 's:xargs:gxargs:' tests/run.sh || die |
109 |
+ # test requires util-linux uuidgen (which we don't build) |
110 |
+ rm tests/ts/uuid/oids || die |
111 |
+ fi |
112 |
+ |
113 |
+ if [[ ${PV} == 9999 ]] ; then |
114 |
+ po/update-potfiles |
115 |
+ eautoreconf |
116 |
+ fi |
117 |
+ |
118 |
+ # Undo bad ncurses handling by upstream. #601530 |
119 |
+ sed -i -E \ |
120 |
+ -e '/NCURSES_/s:(ncursesw?)[56]-config:$PKG_CONFIG \1:' \ |
121 |
+ -e 's:(ncursesw?)[56]-config --version:$PKG_CONFIG --exists --print-errors \1:' \ |
122 |
+ configure || die |
123 |
+ |
124 |
+ elibtoolize |
125 |
+} |
126 |
+ |
127 |
+lfs_fallocate_test() { |
128 |
+ # Make sure we can use fallocate with LFS #300307 |
129 |
+ cat <<-EOF > "${T}"/fallocate.${ABI}.c |
130 |
+ #define _GNU_SOURCE |
131 |
+ #include <fcntl.h> |
132 |
+ main() { return fallocate(0, 0, 0, 0); } |
133 |
+ EOF |
134 |
+ append-lfs-flags |
135 |
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \ |
136 |
+ || export ac_cv_func_fallocate=no |
137 |
+ rm -f "${T}"/fallocate.${ABI}.c |
138 |
+} |
139 |
+ |
140 |
+python_configure() { |
141 |
+ local myeconfargs=( |
142 |
+ --disable-all-programs |
143 |
+ --disable-bash-completion |
144 |
+ --without-systemdsystemunitdir |
145 |
+ --with-python |
146 |
+ ) |
147 |
+ if use userland_GNU; then |
148 |
+ myeconfargs+=( |
149 |
+ --enable-libblkid |
150 |
+ --enable-libmount |
151 |
+ --enable-pylibmount |
152 |
+ ) |
153 |
+ fi |
154 |
+ mkdir "${BUILD_DIR}" || die |
155 |
+ pushd "${BUILD_DIR}" >/dev/null || die |
156 |
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" |
157 |
+ popd >/dev/null || die |
158 |
+} |
159 |
+ |
160 |
+multilib_src_configure() { |
161 |
+ lfs_fallocate_test |
162 |
+ # The scanf test in a run-time test which fails while cross-compiling. |
163 |
+ # Blindly assume a POSIX setup since we require libmount, and libmount |
164 |
+ # itself fails when the scanf test fails. #531856 |
165 |
+ tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms |
166 |
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486 |
167 |
+ export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042 |
168 |
+ |
169 |
+ local myeconfargs=( |
170 |
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" |
171 |
+ --with-bashcompletiondir="$(get_bashcompdir)" |
172 |
+ --without-python |
173 |
+ $(multilib_native_use_enable suid makeinstall-chown) |
174 |
+ $(multilib_native_use_enable suid makeinstall-setuid) |
175 |
+ $(multilib_native_use_with readline) |
176 |
+ $(multilib_native_use_with slang) |
177 |
+ $(multilib_native_use_with systemd) |
178 |
+ $(multilib_native_use_with udev) |
179 |
+ $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw') |
180 |
+ $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses') |
181 |
+ $(tc-has-tls || echo --disable-tls) |
182 |
+ $(use_enable nls) |
183 |
+ $(use_enable unicode widechar) |
184 |
+ $(use_enable static-libs static) |
185 |
+ $(use_with selinux) |
186 |
+ $(usex ncurses '' '--without-tinfo') |
187 |
+ ) |
188 |
+ # build programs only on GNU, on *BSD we want libraries only |
189 |
+ if multilib_is_native_abi && use userland_GNU; then |
190 |
+ myeconfargs+=( |
191 |
+ --disable-chfn-chsh |
192 |
+ --disable-login |
193 |
+ --disable-nologin |
194 |
+ --disable-pylibmount |
195 |
+ --disable-su |
196 |
+ --enable-agetty |
197 |
+ --enable-bash-completion |
198 |
+ --enable-line |
199 |
+ --enable-partx |
200 |
+ --enable-raw |
201 |
+ --enable-rename |
202 |
+ --enable-rfkill |
203 |
+ --enable-schedutils |
204 |
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" |
205 |
+ $(use_enable caps setpriv) |
206 |
+ $(use_enable cramfs) |
207 |
+ $(use_enable fdformat) |
208 |
+ $(use_enable tty-helpers mesg) |
209 |
+ $(use_enable tty-helpers wall) |
210 |
+ $(use_enable tty-helpers write) |
211 |
+ $(use_enable kill) |
212 |
+ ) |
213 |
+ else |
214 |
+ myeconfargs+=( |
215 |
+ --disable-all-programs |
216 |
+ --disable-bash-completion |
217 |
+ --without-systemdsystemunitdir |
218 |
+ # build libraries |
219 |
+ --enable-libuuid |
220 |
+ --enable-libblkid |
221 |
+ --enable-libsmartcols |
222 |
+ --enable-libfdisk |
223 |
+ ) |
224 |
+ if use userland_GNU; then |
225 |
+ # those libraries don't work on *BSD |
226 |
+ myeconfargs+=( |
227 |
+ --enable-libmount |
228 |
+ ) |
229 |
+ fi |
230 |
+ fi |
231 |
+ ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" |
232 |
+ |
233 |
+ if multilib_is_native_abi && use python; then |
234 |
+ python_foreach_impl python_configure |
235 |
+ fi |
236 |
+} |
237 |
+ |
238 |
+python_compile() { |
239 |
+ pushd "${BUILD_DIR}" >/dev/null || die |
240 |
+ emake all |
241 |
+ popd >/dev/null || die |
242 |
+} |
243 |
+ |
244 |
+multilib_src_compile() { |
245 |
+ emake all |
246 |
+ |
247 |
+ if multilib_is_native_abi && use python; then |
248 |
+ python_foreach_impl python_compile |
249 |
+ fi |
250 |
+} |
251 |
+ |
252 |
+python_test() { |
253 |
+ pushd "${BUILD_DIR}" >/dev/null || die |
254 |
+ emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot" |
255 |
+ popd >/dev/null || die |
256 |
+} |
257 |
+ |
258 |
+multilib_src_test() { |
259 |
+ emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot" |
260 |
+ if multilib_is_native_abi && use python; then |
261 |
+ python_foreach_impl python_test |
262 |
+ fi |
263 |
+} |
264 |
+ |
265 |
+python_install() { |
266 |
+ pushd "${BUILD_DIR}" >/dev/null || die |
267 |
+ emake DESTDIR="${D}" install |
268 |
+ python_optimize |
269 |
+ popd >/dev/null || die |
270 |
+} |
271 |
+ |
272 |
+multilib_src_install() { |
273 |
+ emake DESTDIR="${D}" install |
274 |
+ |
275 |
+ if multilib_is_native_abi && use userland_GNU; then |
276 |
+ # need the libs in / |
277 |
+ gen_usr_ldscript -a blkid fdisk mount smartcols uuid |
278 |
+ fi |
279 |
+ |
280 |
+ if multilib_is_native_abi && use python; then |
281 |
+ python_foreach_impl python_install |
282 |
+ fi |
283 |
+} |
284 |
+ |
285 |
+multilib_src_install_all() { |
286 |
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*} |
287 |
+ |
288 |
+ # e2fsprogs-libs didnt install .la files, and .pc work fine |
289 |
+ find "${ED}" -name "*.la" -delete || die |
290 |
+ |
291 |
+ if ! use userland_GNU; then |
292 |
+ # manpage collisions |
293 |
+ # TODO: figure out a good way to keep them |
294 |
+ rm "${ED%/}"/usr/share/man/man3/uuid* || die |
295 |
+ fi |
296 |
+ |
297 |
+ if use pam; then |
298 |
+ newpamd "${FILESDIR}/runuser.pamd" runuser |
299 |
+ newpamd "${FILESDIR}/runuser-l.pamd" runuser-l |
300 |
+ fi |
301 |
+ |
302 |
+ # Note: |
303 |
+ # Bash completion for "runuser" command is provided by same file which |
304 |
+ # would also provide bash completion for "su" command. However, we don't |
305 |
+ # use "su" command from this package. |
306 |
+ # This triggers a known QA warning which we ignore for now to magically |
307 |
+ # keep bash completion for "su" command which shadow package does not |
308 |
+ # provide. |
309 |
+} |
310 |
+ |
311 |
+pkg_postinst() { |
312 |
+ if ! use tty-helpers; then |
313 |
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers." |
314 |
+ fi |
315 |
+ |
316 |
+ if [[ -z ${REPLACING_VERSIONS} ]]; then |
317 |
+ elog "The agetty util now clears the terminal by default. You" |
318 |
+ elog "might want to add --noclear to your /etc/inittab lines." |
319 |
+ fi |
320 |
+} |