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