1 |
commit: 1db0242be8b34f23c028fd7c259752e270a656b7 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Sep 21 20:34:45 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 21 20:44:31 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1db0242b |
7 |
|
8 |
sys-apps/coreutils: add 8.32_p20210921 (unkeyworded) |
9 |
|
10 |
Add testing release from upstream to find any problems |
11 |
pre-release, given that upstream releases are rather |
12 |
infrequent usually. |
13 |
|
14 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
15 |
|
16 |
sys-apps/coreutils/Manifest | 1 + |
17 |
sys-apps/coreutils/coreutils-8.32_p20210921.ebuild | 230 +++++++++++++++++++++ |
18 |
2 files changed, 231 insertions(+) |
19 |
|
20 |
diff --git a/sys-apps/coreutils/Manifest b/sys-apps/coreutils/Manifest |
21 |
index 0f0d568b69c..74fe837fbf3 100644 |
22 |
--- a/sys-apps/coreutils/Manifest |
23 |
+++ b/sys-apps/coreutils/Manifest |
24 |
@@ -1,2 +1,3 @@ |
25 |
DIST coreutils-8.30-patches-01.tar.xz 5788 BLAKE2B a41511ce39ac570cb14b7f12d125eebef92217469a9490808719fa0665f5e5c0adb96fbd02c4bac4d280d1502295669575790a81dbc01afe2ca3a9d384cbefb0 SHA512 b1e1933637de4581d5f8c6ede4e80a012435d13f0cf5550a76ab5bbe9441e3c15ce19ef3f78a7ea3b8368d5e9a3bb17c1207c471d26171b59786f38adeba0454 |
26 |
DIST coreutils-8.32.tar.xz 5547836 BLAKE2B 0ad99c176c19ec214fcfd0845523e5362f0151827707c759bd46c0fe8d2501c6ad1c29c5b71266f6525857bc0d56c472db0d7fe29953b6c65e2e6c76bdf3c515 SHA512 1c8f3584efd61b4b02e7ac5db8e103b63cfb2063432caaf1e64cb2dcc56d8c657d1133bbf10bd41468d6a1f31142e6caa81d16ae68fa3e6e84075c253613a145 |
27 |
+DIST coreutils-8.32_p20210921.tar.xz 5602064 BLAKE2B 3ef970efb4c8b68a9e0f67d2fa791ba14086dab187a27cf4de27ab2a812c9b06c8c29e56a94c91d82d8e45267c0c71404787cad719162ccbc26c681a82524f0b SHA512 9b395860a6c15704c65a0b05f742b669b8b5e76b074382434a64b0537dda6bac3c2627f20d1504393aeb3d7235f1db7299d80a52aeda30a1a2d426993aca9893 |
28 |
|
29 |
diff --git a/sys-apps/coreutils/coreutils-8.32_p20210921.ebuild b/sys-apps/coreutils/coreutils-8.32_p20210921.ebuild |
30 |
new file mode 100644 |
31 |
index 00000000000..a0c7c0c594b |
32 |
--- /dev/null |
33 |
+++ b/sys-apps/coreutils/coreutils-8.32_p20210921.ebuild |
34 |
@@ -0,0 +1,230 @@ |
35 |
+# Copyright 1999-2021 Gentoo Authors |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+ |
38 |
+EAPI=7 |
39 |
+ |
40 |
+PYTHON_COMPAT=( python3_{7..10} ) |
41 |
+ |
42 |
+inherit flag-o-matic python-any-r1 toolchain-funcs |
43 |
+ |
44 |
+PATCH="${PN}-8.30-patches-01" |
45 |
+DESCRIPTION="Standard GNU utilities (chmod, cp, dd, ls, sort, tr, head, wc, who,...)" |
46 |
+HOMEPAGE="https://www.gnu.org/software/coreutils/" |
47 |
+ |
48 |
+if [[ ${PV} == *_p* ]] ; then |
49 |
+ # Note: could put this in devspace, but if it's gone, we don't want |
50 |
+ # it in tree anyway. It's just for testing. |
51 |
+ SRC_URI="https://pixelbeat.org/cu/coreutils-ss.tar.xz -> ${P}.tar.xz" |
52 |
+ S="${WORKDIR}"/${PN}-8.32.251-7b0db |
53 |
+else |
54 |
+ SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" |
55 |
+fi |
56 |
+ |
57 |
+SRC_URI+=" |
58 |
+ !vanilla? ( |
59 |
+ mirror://gentoo/${PATCH}.tar.xz |
60 |
+ https://dev.gentoo.org/~polynomial-c/dist/${PATCH}.tar.xz |
61 |
+ )" |
62 |
+ |
63 |
+LICENSE="GPL-3" |
64 |
+SLOT="0" |
65 |
+#KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux" |
66 |
+IUSE="acl caps gmp hostname kill multicall nls selinux +split-usr static test vanilla xattr" |
67 |
+RESTRICT="!test? ( test )" |
68 |
+ |
69 |
+LIB_DEPEND="acl? ( sys-apps/acl[static-libs] ) |
70 |
+ caps? ( sys-libs/libcap ) |
71 |
+ gmp? ( dev-libs/gmp:=[static-libs] ) |
72 |
+ xattr? ( sys-apps/attr[static-libs] )" |
73 |
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs]} ) |
74 |
+ selinux? ( sys-libs/libselinux ) |
75 |
+ nls? ( virtual/libintl )" |
76 |
+DEPEND=" |
77 |
+ ${RDEPEND} |
78 |
+ static? ( ${LIB_DEPEND} ) |
79 |
+" |
80 |
+BDEPEND=" |
81 |
+ app-arch/xz-utils |
82 |
+ test? ( |
83 |
+ dev-lang/perl |
84 |
+ dev-perl/Expect |
85 |
+ dev-util/strace |
86 |
+ ${PYTHON_DEPS} |
87 |
+ ) |
88 |
+" |
89 |
+RDEPEND+=" |
90 |
+ hostname? ( !sys-apps/net-tools[hostname] ) |
91 |
+ kill? ( |
92 |
+ !sys-apps/util-linux[kill] |
93 |
+ !sys-process/procps[kill] |
94 |
+ ) |
95 |
+ !app-misc/realpath |
96 |
+ !<sys-apps/util-linux-2.13 |
97 |
+ !<sys-apps/sandbox-2.10-r4 |
98 |
+ !sys-apps/stat |
99 |
+ !net-mail/base64 |
100 |
+ !sys-apps/mktemp |
101 |
+ !<app-forensics/tct-1.18-r1 |
102 |
+ !<net-fs/netatalk-2.0.3-r4" |
103 |
+ |
104 |
+pkg_setup() { |
105 |
+ if use test ; then |
106 |
+ python-any-r1_pkg_setup |
107 |
+ fi |
108 |
+} |
109 |
+ |
110 |
+src_prepare() { |
111 |
+ local PATCHES=( |
112 |
+ ) |
113 |
+ |
114 |
+ if ! use vanilla ; then |
115 |
+ PATCHES+=( "${WORKDIR}"/patch ) |
116 |
+ PATCHES+=( "${FILESDIR}"/${PN}-8.32-sandbox-env-test.patch ) |
117 |
+ fi |
118 |
+ |
119 |
+ default |
120 |
+ |
121 |
+ # Since we've patched many .c files, the make process will try to |
122 |
+ # re-build the manpages by running `./bin --help`. When doing a |
123 |
+ # cross-compile, we can't do that since 'bin' isn't a native bin. |
124 |
+ # |
125 |
+ # Also, it's not like we changed the usage on any of these things, |
126 |
+ # so let's just update the timestamps and skip the help2man step. |
127 |
+ set -- man/*.x |
128 |
+ touch ${@/%x/1} || die |
129 |
+ |
130 |
+ # Avoid perl dep for compiled in dircolors default (bug #348642) |
131 |
+ if ! has_version dev-lang/perl ; then |
132 |
+ touch src/dircolors.h || die |
133 |
+ touch ${@/%x/1} || die |
134 |
+ fi |
135 |
+} |
136 |
+ |
137 |
+src_configure() { |
138 |
+ local myconf=( |
139 |
+ --with-packager="Gentoo" |
140 |
+ --with-packager-version="${PVR} (p${PATCH_VER:-0})" |
141 |
+ --with-packager-bug-reports="https://bugs.gentoo.org/" |
142 |
+ # kill/uptime - procps |
143 |
+ # groups/su - shadow |
144 |
+ # hostname - net-tools |
145 |
+ --enable-install-program="arch,$(usev hostname),$(usev kill)" |
146 |
+ --enable-no-install-program="groups,$(usev !hostname),$(usev !kill),su,uptime" |
147 |
+ --enable-largefile |
148 |
+ $(usex caps '' --disable-libcap) |
149 |
+ $(use_enable nls) |
150 |
+ $(use_enable acl) |
151 |
+ $(use_enable multicall single-binary) |
152 |
+ $(use_enable xattr) |
153 |
+ $(use_with gmp libgmp) |
154 |
+ ) |
155 |
+ |
156 |
+ if tc-is-cross-compiler && [[ ${CHOST} == *linux* ]] ; then |
157 |
+ # bug #311569 |
158 |
+ export fu_cv_sys_stat_statfs2_bsize=yes |
159 |
+ # bug #416629 |
160 |
+ export gl_cv_func_realpath_works=yes |
161 |
+ fi |
162 |
+ |
163 |
+ # bug #409919 |
164 |
+ export gl_cv_func_mknod_works=yes |
165 |
+ |
166 |
+ if use static ; then |
167 |
+ append-ldflags -static |
168 |
+ # bug #321821 |
169 |
+ sed -i '/elf_sys=yes/s:yes:no:' configure || die |
170 |
+ fi |
171 |
+ |
172 |
+ if ! use selinux ; then |
173 |
+ # bug #301782 |
174 |
+ export ac_cv_{header_selinux_{context,flash,selinux}_h,search_setfilecon}=no |
175 |
+ fi |
176 |
+ |
177 |
+ econf "${myconf[@]}" |
178 |
+} |
179 |
+ |
180 |
+src_test() { |
181 |
+ # Known to fail with FEATURES=usersandbox (bug #439574): |
182 |
+ # - tests/du/long-from-unreadable.sh} (bug #413621) |
183 |
+ # - tests/rm/deep-2.sh (bug #413621) |
184 |
+ # - tests/dd/no-allocate.sh (bug #629660) |
185 |
+ if has usersandbox ${FEATURES} ; then |
186 |
+ ewarn "You are emerging ${P} with 'usersandbox' enabled." \ |
187 |
+ "Expect some test failures or emerge with 'FEATURES=-usersandbox'!" |
188 |
+ fi |
189 |
+ |
190 |
+ # Non-root tests will fail if the full path isn't |
191 |
+ # accessible to non-root users |
192 |
+ chmod -R go-w "${WORKDIR}" || die |
193 |
+ chmod a+rx "${WORKDIR}" || die |
194 |
+ |
195 |
+ # coreutils tests like to do `mount` and such with temp dirs, |
196 |
+ # so make sure: |
197 |
+ # - /etc/mtab is writable (bug #265725) |
198 |
+ # - /dev/loop* can be mounted (bug #269758) |
199 |
+ mkdir -p "${T}"/mount-wrappers || die |
200 |
+ mkwrap() { |
201 |
+ local w ww |
202 |
+ for w in "${@}" ; do |
203 |
+ ww="${T}/mount-wrappers/${w}" |
204 |
+ cat <<-EOF > "${ww}" |
205 |
+ #!${EPREFIX}/bin/sh |
206 |
+ exec env SANDBOX_WRITE="\${SANDBOX_WRITE}:/etc/mtab:/dev/loop" $(type -P ${w}) "\$@" |
207 |
+ EOF |
208 |
+ chmod a+rx "${ww}" || die |
209 |
+ done |
210 |
+ } |
211 |
+ mkwrap mount umount |
212 |
+ |
213 |
+ addwrite /dev/full |
214 |
+ #export RUN_EXPENSIVE_TESTS="yes" |
215 |
+ #export FETISH_GROUPS="portage wheel" |
216 |
+ env PATH="${T}/mount-wrappers:${PATH}" \ |
217 |
+ emake -j1 -k check |
218 |
+} |
219 |
+ |
220 |
+src_install() { |
221 |
+ default |
222 |
+ |
223 |
+ insinto /etc |
224 |
+ newins src/dircolors.hin DIR_COLORS |
225 |
+ |
226 |
+ if use split-usr ; then |
227 |
+ cd "${ED}"/usr/bin || die |
228 |
+ dodir /bin |
229 |
+ |
230 |
+ # Move critical binaries into /bin (required by FHS) |
231 |
+ local fhs="cat chgrp chmod chown cp date dd df echo false ln ls |
232 |
+ mkdir mknod mv pwd rm rmdir stty sync true uname" |
233 |
+ mv ${fhs} ../../bin/ || die "Could not move FHS bins!" |
234 |
+ |
235 |
+ if use hostname ; then |
236 |
+ mv hostname ../../bin/ || die |
237 |
+ fi |
238 |
+ |
239 |
+ if use kill ; then |
240 |
+ mv kill ../../bin/ || die |
241 |
+ fi |
242 |
+ |
243 |
+ # Move critical binaries into /bin (common scripts) |
244 |
+ # (Why are these required for booting?) |
245 |
+ local com="basename chroot cut dir dirname du env expr head mkfifo |
246 |
+ mktemp readlink seq sleep sort tail touch tr tty vdir wc yes" |
247 |
+ mv ${com} ../../bin/ || die "Could not move common bins!" |
248 |
+ |
249 |
+ # Create a symlink for uname in /usr/bin/ since autotools require it. |
250 |
+ # (Other than uname, we need to figure out why we are |
251 |
+ # creating symlinks for these in /usr/bin instead of leaving |
252 |
+ # the files there in the first place...) |
253 |
+ local x |
254 |
+ for x in ${com} uname ; do |
255 |
+ dosym ../../bin/${x} /usr/bin/${x} |
256 |
+ done |
257 |
+ fi |
258 |
+} |
259 |
+ |
260 |
+pkg_postinst() { |
261 |
+ ewarn "Make sure you run 'hash -r' in your active shells." |
262 |
+ ewarn "You should also re-source your shell settings for LS_COLORS" |
263 |
+ ewarn " changes, such as: source /etc/profile" |
264 |
+} |