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