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