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