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/coreutils/
Date: Mon, 11 Mar 2019 09:33:08
Message-Id: 1552296711.65a602dba08643a6854e3c9f7398da0405222e8a.polynomial-c@gentoo
1 commit: 65a602dba08643a6854e3c9f7398da0405222e8a
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Mar 11 09:19:03 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 11 09:31:51 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=65a602db
7
8 sys-apps/coreutils: Bump to version 8.31
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/coreutils/Manifest | 1 +
14 sys-apps/coreutils/coreutils-8.31.ebuild | 205 +++++++++++++++++++++++++++++++
15 2 files changed, 206 insertions(+)
16
17 diff --git a/sys-apps/coreutils/Manifest b/sys-apps/coreutils/Manifest
18 index bd737f7c5f1..9e4b4c1d5cd 100644
19 --- a/sys-apps/coreutils/Manifest
20 +++ b/sys-apps/coreutils/Manifest
21 @@ -1,2 +1,3 @@
22 DIST coreutils-8.30-patches-01.tar.xz 5788 BLAKE2B a41511ce39ac570cb14b7f12d125eebef92217469a9490808719fa0665f5e5c0adb96fbd02c4bac4d280d1502295669575790a81dbc01afe2ca3a9d384cbefb0 SHA512 b1e1933637de4581d5f8c6ede4e80a012435d13f0cf5550a76ab5bbe9441e3c15ce19ef3f78a7ea3b8368d5e9a3bb17c1207c471d26171b59786f38adeba0454
23 DIST coreutils-8.30.tar.xz 5359532 BLAKE2B b66ccd112a6c2c8b90e58ff1c3371e7f5827937035769329885e5bdae197466189f3715720b8f8cf0b5047fe16d6c86984dcee994117c2d3c7b8dbd597027255 SHA512 25bc132c0d89ce71c33e417f04649c9fcfce6c5ef8b19f093b2e9e2851bfde9b5a31e20499d9c427332228ba54b88d445ddb445551e1944bb8f5cbff5ffa4eda
24 +DIST coreutils-8.31.tar.xz 5410140 BLAKE2B e3ae6be8edbe9df9164b4c9ac8bf14dc23b147fa665f20669e18ac4c6e45ba839dc0dc99e05670eb006d22133475a4a717a5f40b00ebaedfd6e1fbab887674d5 SHA512 ef8941dae845bbf5ae5838bc49e44554a766302930601aada6fa594e8088f0fbad74e481ee392ff89633e68b99e4da3f761fcb5d31ee3b233d540fe2a2d4e1af
25
26 diff --git a/sys-apps/coreutils/coreutils-8.31.ebuild b/sys-apps/coreutils/coreutils-8.31.ebuild
27 new file mode 100644
28 index 00000000000..0f3a9d0bd45
29 --- /dev/null
30 +++ b/sys-apps/coreutils/coreutils-8.31.ebuild
31 @@ -0,0 +1,205 @@
32 +# Copyright 1999-2019 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI="6"
36 +
37 +PYTHON_COMPAT=( python{2_7,3_{4,5,6,7}} )
38 +
39 +inherit eutils flag-o-matic python-any-r1 toolchain-funcs
40 +
41 +PATCH="${PN}-8.30-patches-01"
42 +DESCRIPTION="Standard GNU utilities (chmod, cp, dd, ls, sort, tr, head, wc, who,...)"
43 +HOMEPAGE="https://www.gnu.org/software/coreutils/"
44 +SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
45 + mirror://gentoo/${PATCH}.tar.xz
46 + https://dev.gentoo.org/~polynomial-c/dist/${PATCH}.tar.xz"
47 +
48 +LICENSE="GPL-3"
49 +SLOT="0"
50 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-linux"
51 +IUSE="acl caps gmp hostname kill multicall nls selinux +split-usr static test userland_BSD vanilla xattr"
52 +
53 +LIB_DEPEND="acl? ( sys-apps/acl[static-libs] )
54 + caps? ( sys-libs/libcap )
55 + gmp? ( dev-libs/gmp:=[static-libs] )
56 + xattr? ( !userland_BSD? ( sys-apps/attr[static-libs] ) )"
57 +RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs]} )
58 + selinux? ( sys-libs/libselinux )
59 + nls? ( virtual/libintl )"
60 +DEPEND="${RDEPEND}
61 + static? ( ${LIB_DEPEND} )
62 + app-arch/xz-utils
63 + test? (
64 + dev-lang/perl
65 + dev-perl/Expect
66 + !userland_BSD? (
67 + dev-util/strace
68 + )
69 + ${PYTHON_DEPS}
70 + $(python_gen_any_dep 'dev-python/pyinotify[${PYTHON_USEDEP}]')
71 + )"
72 +RDEPEND+="
73 + hostname? ( !sys-apps/net-tools[hostname] )
74 + kill? (
75 + !sys-apps/util-linux[kill]
76 + !sys-process/procps[kill]
77 + )
78 + !app-misc/realpath
79 + !<sys-apps/util-linux-2.13
80 + !<sys-apps/sandbox-2.10-r4
81 + !sys-apps/stat
82 + !net-mail/base64
83 + !sys-apps/mktemp
84 + !<app-forensics/tct-1.18-r1
85 + !<net-fs/netatalk-2.0.3-r4"
86 +
87 +pkg_setup() {
88 + if use test ; then
89 + python-any-r1_pkg_setup
90 + fi
91 +}
92 +
93 +src_prepare() {
94 + if ! use vanilla ; then
95 + eapply "${WORKDIR}"/patch/*.patch
96 + fi
97 +
98 + eapply_user
99 +
100 + # Since we've patched many .c files, the make process will try to
101 + # re-build the manpages by running `./bin --help`. When doing a
102 + # cross-compile, we can't do that since 'bin' isn't a native bin.
103 + # Also, it's not like we changed the usage on any of these things,
104 + # so let's just update the timestamps and skip the help2man step.
105 + set -- man/*.x
106 + touch ${@/%x/1}
107 +
108 + # Avoid perl dep for compiled in dircolors default #348642
109 + if ! has_version dev-lang/perl ; then
110 + touch src/dircolors.h
111 + touch ${@/%x/1}
112 + fi
113 +}
114 +
115 +src_configure() {
116 + local myconf=(
117 + --with-packager="Gentoo"
118 + --with-packager-version="${PVR} (p${PATCH_VER:-0})"
119 + --with-packager-bug-reports="https://bugs.gentoo.org/"
120 + --enable-install-program="arch,$(usev hostname),$(usev kill)"
121 + --enable-no-install-program="groups,$(usev !hostname),$(usev !kill),su,uptime"
122 + --enable-largefile
123 + $(usex caps '' --disable-libcap)
124 + $(use_enable nls)
125 + $(use_enable acl)
126 + $(use_enable multicall single-binary)
127 + $(use_enable xattr)
128 + $(use_with gmp)
129 + )
130 + if tc-is-cross-compiler && [[ ${CHOST} == *linux* ]] ; then
131 + export fu_cv_sys_stat_statfs2_bsize=yes #311569
132 + export gl_cv_func_realpath_works=yes #416629
133 + fi
134 +
135 + export gl_cv_func_mknod_works=yes #409919
136 + use static && append-ldflags -static && sed -i '/elf_sys=yes/s:yes:no:' configure #321821
137 + use selinux || export ac_cv_{header_selinux_{context,flash,selinux}_h,search_setfilecon}=no #301782
138 + use userland_BSD && myconf+=( -program-prefix=g --program-transform-name=s/stat/nustat/ )
139 + # kill/uptime - procps
140 + # groups/su - shadow
141 + # hostname - net-tools
142 + econf "${myconf[@]}"
143 +}
144 +
145 +src_test() {
146 + # Known to fail with FEATURES=usersandbox (bug #439574):
147 + # - tests/du/long-from-unreadable.sh} (bug #413621)
148 + # - tests/rm/deep-2.sh (bug #413621)
149 + # - tests/dd/no-allocate.sh (bug #629660)
150 + if has usersandbox ${FEATURES} ; then
151 + ewarn "You are emerging ${P} with 'usersandbox' enabled." \
152 + "Expect some test failures or emerge with 'FEATURES=-usersandbox'!"
153 + fi
154 +
155 + # Non-root tests will fail if the full path isn't
156 + # accessible to non-root users
157 + chmod -R go-w "${WORKDIR}"
158 + chmod a+rx "${WORKDIR}"
159 +
160 + # coreutils tests like to do `mount` and such with temp dirs
161 + # so make sure /etc/mtab is writable #265725
162 + # make sure /dev/loop* can be mounted #269758
163 + mkdir -p "${T}"/mount-wrappers || die
164 + mkwrap() {
165 + local w ww
166 + for w in "${@}" ; do
167 + ww="${T}/mount-wrappers/${w}"
168 + cat <<-EOF > "${ww}"
169 + #!${EPREFIX}/bin/sh
170 + exec env SANDBOX_WRITE="\${SANDBOX_WRITE}:/etc/mtab:/dev/loop" $(type -P ${w}) "\$@"
171 + EOF
172 + chmod a+rx "${ww}"
173 + done
174 + }
175 + mkwrap mount umount
176 +
177 + addwrite /dev/full
178 + #export RUN_EXPENSIVE_TESTS="yes"
179 + #export FETISH_GROUPS="portage wheel"
180 + env PATH="${T}/mount-wrappers:${PATH}" \
181 + emake -j1 -k check
182 +}
183 +
184 +src_install() {
185 + default
186 +
187 + insinto /etc
188 + newins src/dircolors.hin DIR_COLORS
189 +
190 + if [[ ${USERLAND} == "GNU" ]] ; then
191 + cd "${ED%/}"/usr/bin || die
192 + dodir /bin
193 + # move critical binaries into /bin (required by FHS)
194 + local fhs="cat chgrp chmod chown cp date dd df echo false ln ls
195 + mkdir mknod mv pwd rm rmdir stty sync true uname"
196 + mv ${fhs} ../../bin/ || die "could not move fhs bins"
197 + if use hostname; then
198 + mv hostname ../../bin/ || die
199 + fi
200 + if use kill; then
201 + mv kill ../../bin/ || die
202 + fi
203 + if use split-usr ; then
204 + # move critical binaries into /bin (common scripts)
205 + local com="basename chroot cut dir dirname du env expr head mkfifo
206 + mktemp readlink seq sleep sort tail touch tr tty vdir wc yes"
207 + mv ${com} ../../bin/ || die "could not move common bins"
208 + # create a symlink for uname in /usr/bin/ since autotools require it
209 + local x
210 + for x in ${com} uname ; do
211 + dosym ../../bin/${x} /usr/bin/${x}
212 + done
213 + fi
214 + else
215 + # For now, drop the man pages, collides with the ones of the system.
216 + rm -rf "${ED%/}"/usr/share/man
217 + fi
218 +
219 +}
220 +
221 +pkg_postinst() {
222 + ewarn "Make sure you run 'hash -r' in your active shells."
223 + ewarn "You should also re-source your shell settings for LS_COLORS"
224 + ewarn " changes, such as: source /etc/profile"
225 +
226 + # Help out users using experimental filesystems
227 + if grep -qs btrfs "${EROOT%/}"/etc/fstab /proc/mounts ; then
228 + case $(uname -r) in
229 + 2.6.[12][0-9]|2.6.3[0-7]*)
230 + ewarn "You are running a system with a buggy btrfs driver."
231 + ewarn "Please upgrade your kernel to avoid silent corruption."
232 + ewarn "See: https://bugs.gentoo.org/353907"
233 + ;;
234 + esac
235 + fi
236 +}