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