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