Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/util-linux/
Date: Fri, 16 Apr 2021 12:37:44
Message-Id: 1618576644.9c60fbd393d906cd0b4434edd5b4fc994288ff0b.polynomial-c@gentoo
1 commit: 9c60fbd393d906cd0b4434edd5b4fc994288ff0b
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Fri Apr 16 12:25:55 2021 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri Apr 16 12:37:24 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c60fbd3
7
8 sys-apps/util-linux: Bump to version 2.37_rc1
9
10 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
11
12 sys-apps/util-linux/Manifest | 2 +
13 sys-apps/util-linux/util-linux-2.37_rc1.ebuild | 352 +++++++++++++++++++++++++
14 2 files changed, 354 insertions(+)
15
16 diff --git a/sys-apps/util-linux/Manifest b/sys-apps/util-linux/Manifest
17 index 28e0e06cfd4..1132a971d53 100644
18 --- a/sys-apps/util-linux/Manifest
19 +++ b/sys-apps/util-linux/Manifest
20 @@ -3,3 +3,5 @@ DIST util-linux-2.34.tar.xz 4974812 BLAKE2B d26b2f74d490eaee0a40d4c75a1a351ba165
21 DIST util-linux-2.35.2.tar.xz 5150488 BLAKE2B 93eb90ab33db7795b46425ec4ec87f8a2d3d6e0dad671345375ea02efd654bf72041932d30b41bea494e4b62952e2fd14ea9f9e6c738d4eb4b050bd170b9bb0e SHA512 59e038ba71aa74c9af6f927b357483a965f675ab3ffcd25cf0c1b043656312d2d2d07c55659fd3da69ede165bec313e0ae7e1cd73758e49681ae610604b399a2
22 DIST util-linux-2.36.1.tar.xz 5231880 BLAKE2B 52d867aa0b722a84828c37958d80b0bdcc1ceaae4e46fa6550ad0f2f152c52e4aaf2c8bc5fdf4f27b522037a870ff2554382abac0eaa50a6791d8b8016e3d74c SHA512 9dfd01ae4c16fa35015dafd222d555988b72e4d1d2fbadd140791b9ef78f84fa8254d4d08dc67cabf41e873338867f19e786b989d708ccfe5161c4f7679bba7a
23 DIST util-linux-2.36.2.tar.xz 5348032 BLAKE2B 17e49515f8d0430f3ed26b80bf1d6e811d847141020d0dae1340dc92887549b7b711f3db6e3913120871fc912435def73586a7aef09d8d9cc6ff7ca331b2770f SHA512 6ab141f44ca4cb6b600081f10eae17e15d23abd122a37eb3ac6c845513a6a4396dc9dcff30b3032de80116ddde50e27dfbc86f92708c1051f84f0c919194664b
24 +DIST util-linux-2.37-rc1-manpages.tar.xz 160524 BLAKE2B 3d301478b772f944c7d4cd713130fe9800cc32fb14ac46967c6a64fdca6e561d91f642f839c77cded6f4af8b4487cf3f36ac3f6a72aea50a75c020a1c9862ee0 SHA512 44f45356c2a97f482dc4b0a762e4c2e04fbce0d2268cd765fcff87c40554d0ef3016ff5e1c1165ba93c05ff8390d76ea14fd30f419ce4c86fc5678858cede54b
25 +DIST util-linux-2.37-rc1.tar.xz 5269776 BLAKE2B cc964e8f1bb50f704d7f207bd166b41d6b70d138b52e140687fe58f77626097d6151ae3f3efdb655b8495a67ad33cdf7fcdb0cf71839ba34963b0f14aace98a5 SHA512 5c3125a0ac42e17c8837f398cc3d59a538f18e823fab4feb9d7756a4c7523dd70fe7a5c94baab2a329d1ce99d85bdb19a14dd5d32d72d479a398f7dbc3003c1a
26
27 diff --git a/sys-apps/util-linux/util-linux-2.37_rc1.ebuild b/sys-apps/util-linux/util-linux-2.37_rc1.ebuild
28 new file mode 100644
29 index 00000000000..a4c2dbb25ac
30 --- /dev/null
31 +++ b/sys-apps/util-linux/util-linux-2.37_rc1.ebuild
32 @@ -0,0 +1,352 @@
33 +# Copyright 1999-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +PYTHON_COMPAT=( python3_{7..9} )
39 +
40 +inherit toolchain-funcs libtool flag-o-matic bash-completion-r1 usr-ldscript \
41 + pam python-r1 multilib-minimal multiprocessing systemd
42 +
43 +MY_PV="${PV/_/-}"
44 +MY_P="${PN}-${MY_PV}"
45 +
46 +if [[ ${PV} == 9999 ]] ; then
47 + inherit git-r3 autotools
48 + EGIT_REPO_URI="https://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
49 +else
50 + [[ "${PV}" = *_rc* ]] || \
51 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
52 + SRC_URI="https://www.kernel.org/pub/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz
53 + https://dev.gentoo.org/~polynomial-c/${MY_P}-manpages.tar.xz"
54 +fi
55 +
56 +DESCRIPTION="Various useful Linux utilities"
57 +HOMEPAGE="https://www.kernel.org/pub/linux/utils/util-linux/ https://github.com/karelzak/util-linux"
58 +
59 +LICENSE="GPL-2 GPL-3 LGPL-2.1 BSD-4 MIT public-domain"
60 +SLOT="0"
61 +IUSE="audit build caps +cramfs cryptsetup fdformat hardlink kill +logger ncurses nls pam python +readline selinux slang static-libs su +suid systemd test tty-helpers udev unicode userland_GNU"
62 +
63 +# Most lib deps here are related to programs rather than our libs,
64 +# so we rarely need to specify ${MULTILIB_USEDEP}.
65 +RDEPEND="
66 + virtual/libcrypt:=
67 + audit? ( >=sys-process/audit-2.6:= )
68 + caps? ( sys-libs/libcap-ng )
69 + cramfs? ( sys-libs/zlib:= )
70 + cryptsetup? ( sys-fs/cryptsetup )
71 + hardlink? ( dev-libs/libpcre2:= )
72 + ncurses? ( >=sys-libs/ncurses-5.2-r2:0=[unicode?] )
73 + nls? ( virtual/libintl[${MULTILIB_USEDEP}] )
74 + pam? ( sys-libs/pam )
75 + ppc? ( sys-libs/librtas )
76 + ppc64? ( sys-libs/librtas )
77 + python? ( ${PYTHON_DEPS} )
78 + readline? ( sys-libs/readline:0= )
79 + selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
80 + slang? ( sys-libs/slang )
81 + !build? ( systemd? ( sys-apps/systemd ) )
82 + udev? ( virtual/libudev:= )"
83 +BDEPEND="
84 + virtual/pkgconfig
85 + nls? ( sys-devel/gettext )
86 + test? ( sys-devel/bc )
87 +"
88 +DEPEND="
89 + ${RDEPEND}
90 + virtual/os-headers
91 +"
92 +RDEPEND+="
93 + hardlink? ( !app-arch/hardlink )
94 + logger? ( !>=app-admin/sysklogd-2.0[logger] )
95 + kill? (
96 + !sys-apps/coreutils[kill]
97 + !sys-process/procps[kill]
98 + )
99 + su? (
100 + !<sys-apps/shadow-4.7-r2
101 + !>=sys-apps/shadow-4.7-r2[su]
102 + )
103 + !net-wireless/rfkill
104 + !<app-shells/bash-completion-2.7-r1
105 +"
106 +
107 +# Required for man-page generation
108 +if [[ "${PV}" == 9999 ]] ; then
109 + BDEPEND+="
110 + dev-ruby/asciidoctor
111 + "
112 +fi
113 +
114 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
115 +RESTRICT="!test? ( test )"
116 +
117 +S="${WORKDIR}/${MY_P}"
118 +
119 +PATCHES=(
120 +)
121 +
122 +rm_man() {
123 + [[ -n $1 ]] || die
124 + local el
125 + for el in $1 ; do
126 + find "${WORKDIR}/man" -type f -name "${el}.?" -delete \
127 + || die
128 + done
129 +}
130 +
131 +src_prepare() {
132 + default
133 +
134 + # Prevent uuidd test failure due to socket path limit. #593304
135 + sed -i \
136 + -e "s|UUIDD_SOCKET=\"\$(mktemp -u \"\${TS_OUTDIR}/uuiddXXXXXXXXXXXXX\")\"|UUIDD_SOCKET=\"\$(mktemp -u \"${T}/uuiddXXXXXXXXXXXXX.sock\")\"|g" \
137 + tests/ts/uuid/uuidd || die "Failed to fix uuidd test"
138 +
139 + if ! use userland_GNU ; then
140 + # test runner is using GNU-specific xargs call
141 + sed -i -e 's:xargs:gxargs:' tests/run.sh || die
142 + # test requires util-linux uuidgen (which we don't build)
143 + rm tests/ts/uuid/oids || die
144 + fi
145 +
146 + if [[ ${PV} == 9999 ]] ; then
147 + po/update-potfiles
148 + eautoreconf
149 + else
150 + # Conditionally remove some man-pages
151 + use hardlink || rm_man "hardlink"
152 + use kill || rm_man "kill"
153 + use logger || rm_man "logger"
154 + use ncurses || rm_man "pg"
155 + use su || rm_man "su"
156 + use tty-helpers || rm_man "mesg wall write"
157 + fi
158 +
159 + elibtoolize
160 +}
161 +
162 +lfs_fallocate_test() {
163 + # Make sure we can use fallocate with LFS #300307
164 + cat <<-EOF > "${T}"/fallocate.${ABI}.c
165 + #define _GNU_SOURCE
166 + #include <fcntl.h>
167 + main() { return fallocate(0, 0, 0, 0); }
168 + EOF
169 + append-lfs-flags
170 + $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
171 + || export ac_cv_func_fallocate=no
172 + rm -f "${T}"/fallocate.${ABI}.c
173 +}
174 +
175 +python_configure() {
176 + local myeconfargs=(
177 + "${commonargs[@]}"
178 + --disable-all-programs
179 + --disable-bash-completion
180 + --without-systemdsystemunitdir
181 + --with-python
182 + )
183 + if use userland_GNU ; then
184 + myeconfargs+=(
185 + --enable-libblkid
186 + --enable-libmount
187 + --enable-pylibmount
188 + )
189 + fi
190 + mkdir "${BUILD_DIR}" || die
191 + pushd "${BUILD_DIR}" >/dev/null || die
192 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
193 + popd >/dev/null || die
194 +}
195 +
196 +multilib_src_configure() {
197 + lfs_fallocate_test
198 + # The scanf test in a run-time test which fails while cross-compiling.
199 + # Blindly assume a POSIX setup since we require libmount, and libmount
200 + # itself fails when the scanf test fails. #531856
201 + tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
202 + export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
203 + export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042
204 +
205 + # Undo bad ncurses handling by upstream. Fall back to pkg-config. #601530
206 + export NCURSES6_CONFIG=false NCURSES5_CONFIG=false
207 + export NCURSESW6_CONFIG=false NCURSESW5_CONFIG=false
208 +
209 + # configure args shared by python and non-python builds
210 + local commonargs=(
211 + --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin"
212 + )
213 +
214 + local myeconfargs=(
215 + "${commonargs[@]}"
216 + --with-bashcompletiondir="$(get_bashcompdir)"
217 + --without-python
218 + $(multilib_native_use_enable suid makeinstall-chown)
219 + $(multilib_native_use_enable suid makeinstall-setuid)
220 + $(multilib_native_use_with readline)
221 + $(multilib_native_use_with slang)
222 + $(multilib_native_use_with systemd)
223 + $(multilib_native_use_with udev)
224 + $(multilib_native_usex ncurses "$(use_with unicode ncursesw)" '--without-ncursesw')
225 + $(multilib_native_usex ncurses "$(use_with !unicode ncurses)" '--without-ncurses')
226 + $(multilib_native_use_with audit)
227 + $(tc-has-tls || echo --disable-tls)
228 + $(use_enable nls)
229 + $(use_enable unicode widechar)
230 + $(use_enable static-libs static)
231 + $(use_with ncurses tinfo)
232 + $(use_with selinux)
233 + )
234 + # build programs only on GNU, on *BSD we want libraries only
235 + if multilib_is_native_abi && use userland_GNU ; then
236 + myeconfargs+=(
237 + --disable-chfn-chsh
238 + --disable-login
239 + --disable-newgrp
240 + --disable-nologin
241 + --disable-pylibmount
242 + --disable-vipw
243 + --enable-agetty
244 + --enable-bash-completion
245 + --enable-line
246 + --enable-partx
247 + --enable-raw
248 + --enable-rename
249 + --enable-rfkill
250 + --enable-schedutils
251 + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)"
252 + $(use_enable caps setpriv)
253 + $(use_enable cramfs)
254 + $(use_enable fdformat)
255 + $(use_enable hardlink)
256 + $(use_enable kill)
257 + $(use_enable logger)
258 + $(use_enable ncurses pg)
259 + $(use_enable su)
260 + $(use_enable tty-helpers mesg)
261 + $(use_enable tty-helpers wall)
262 + $(use_enable tty-helpers write)
263 + $(use_with cryptsetup)
264 + )
265 + if [[ ${PV} == *9999 ]] ; then
266 + myeconfargs+=( --enable-asciidoc )
267 + else
268 + # We ship pre-generated man-pages for releases
269 + myeconfargs+=( --disable-asciidoc )
270 + fi
271 + else
272 + myeconfargs+=(
273 + --disable-all-programs
274 + --disable-asciidoc
275 + --disable-bash-completion
276 + --without-systemdsystemunitdir
277 + # build libraries
278 + --enable-libuuid
279 + --enable-libblkid
280 + --enable-libsmartcols
281 + --enable-libfdisk
282 + )
283 + if use userland_GNU ; then
284 + # those libraries don't work on *BSD
285 + myeconfargs+=(
286 + --enable-libmount
287 + )
288 + fi
289 + fi
290 + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
291 +
292 + if multilib_is_native_abi && use python ; then
293 + python_foreach_impl python_configure
294 + fi
295 +}
296 +
297 +python_compile() {
298 + pushd "${BUILD_DIR}" >/dev/null || die
299 + emake all
300 + popd >/dev/null || die
301 +}
302 +
303 +multilib_src_compile() {
304 + emake all
305 +
306 + if multilib_is_native_abi && use python ; then
307 + python_foreach_impl python_compile
308 + fi
309 +}
310 +
311 +python_test() {
312 + pushd "${BUILD_DIR}" >/dev/null || die
313 + emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
314 + popd >/dev/null || die
315 +}
316 +
317 +multilib_src_test() {
318 + emake check TS_OPTS="--parallel=$(makeopts_jobs) --nonroot"
319 + if multilib_is_native_abi && use python ; then
320 + python_foreach_impl python_test
321 + fi
322 +}
323 +
324 +python_install() {
325 + pushd "${BUILD_DIR}" >/dev/null || die
326 + emake DESTDIR="${D}" install
327 + python_optimize
328 + popd >/dev/null || die
329 +}
330 +
331 +multilib_src_install() {
332 + if multilib_is_native_abi && use python ; then
333 + python_foreach_impl python_install
334 + fi
335 +
336 + # This needs to be called AFTER python_install call (#689190)
337 + emake DESTDIR="${D}" install
338 +
339 + if multilib_is_native_abi && use userland_GNU ; then
340 + # need the libs in /
341 + gen_usr_ldscript -a blkid fdisk mount smartcols uuid
342 + fi
343 +}
344 +
345 +multilib_src_install_all() {
346 + dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
347 +
348 + # e2fsprogs-libs didnt install .la files, and .pc work fine
349 + find "${ED}" -name "*.la" -delete || die
350 +
351 + if [[ ${PV} != 9999 ]] ; then
352 + doman "${WORKDIR}"/man/man*/*
353 + fi
354 +
355 + if ! use userland_GNU ; then
356 + # manpage collisions
357 + # TODO: figure out a good way to keep them
358 + rm "${ED}"/usr/share/man/man3/uuid* || die
359 + fi
360 +
361 + if use pam ; then
362 + newpamd "${FILESDIR}/runuser.pamd" runuser
363 + newpamd "${FILESDIR}/runuser-l.pamd" runuser-l
364 + fi
365 +
366 + # Note:
367 + # Bash completion for "runuser" command is provided by same file which
368 + # would also provide bash completion for "su" command. However, we don't
369 + # use "su" command from this package.
370 + # This triggers a known QA warning which we ignore for now to magically
371 + # keep bash completion for "su" command which shadow package does not
372 + # provide.
373 +}
374 +
375 +pkg_postinst() {
376 + if ! use tty-helpers ; then
377 + elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
378 + fi
379 +
380 + if [[ -z ${REPLACING_VERSIONS} ]] ; then
381 + elog "The agetty util now clears the terminal by default. You"
382 + elog "might want to add --noclear to your /etc/inittab lines."
383 + fi
384 +}