summaryrefslogtreecommitdiff
path: root/sys-apps/coreutils
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-10-01 20:54:53 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-10-01 20:54:53 +0100
commit391b5b359a346aff490103da7dddc85047f83830 (patch)
tree29eea460a0bd7e1ff21d43b9d6df9af4d8a175e1 /sys-apps/coreutils
parentc719fdcee603a5a706a45d10cb598762d56a727d (diff)
gentoo resync : 01.10.2021
Diffstat (limited to 'sys-apps/coreutils')
-rw-r--r--sys-apps/coreutils/Manifest6
-rw-r--r--sys-apps/coreutils/coreutils-8.32-r1.ebuild1
-rw-r--r--sys-apps/coreutils/coreutils-9.0-r1.ebuild223
-rw-r--r--sys-apps/coreutils/coreutils-9.0.ebuild1
-rw-r--r--sys-apps/coreutils/files/coreutils-9.0-fix-chmod-symlink-exit.patch35
5 files changed, 264 insertions, 2 deletions
diff --git a/sys-apps/coreutils/Manifest b/sys-apps/coreutils/Manifest
index 8999b776e326..cef7e114cd5b 100644
--- a/sys-apps/coreutils/Manifest
+++ b/sys-apps/coreutils/Manifest
@@ -1,8 +1,10 @@
AUX coreutils-8.32-ls-restore-8.31-behavior.patch 2824 BLAKE2B 7df44f4e330225a429678b3d5f20736d7c5c4f7d09f51f71d7e1111c3181d494aa12796c823244473063f7905aef35b74703860343c5e30f38520ee340690ede SHA512 6d55806aa16e0f654b15bfefb20f2c16193c7e9fcf7c087309b3254272d20467dea69ac53fff345b510751e165c33197c3053b7308578f79492afba0a1eeb6e5
AUX coreutils-8.32-sandbox-env-test.patch 1958 BLAKE2B 570f62115f0853abb35290174ad6dd3157be16a28c527b37d1c58b421538a6238e93317689e6cd35b7dc5a0f480a4322c432986697a9e0af60019650eae92c0a SHA512 fd3573cf5a4b4fbba132d0fac5ad6eb4af5aa548a8c0c747653e47acfb97c01e31d7430db543df47d9a2680792d2583de70e1f1d49b2feb75887e9f8638527b7
+AUX coreutils-9.0-fix-chmod-symlink-exit.patch 1133 BLAKE2B 28a3adfb2c8b4e8d557a713d9e83fb61672e74dbc7dc8a8f7adf497825be0e53e1c08bff37122750a6144da70737af558dc018a06816e279879f31daf746a4d1 SHA512 392b94d55c5864e5de637567f7207e5c789a722710c29bead72c41b9f85f535f96f84f4abc64b35ee218c5ec5bc129837a65ec95cbb88113877b302823491991
DIST coreutils-8.30-patches-01.tar.xz 5788 BLAKE2B a41511ce39ac570cb14b7f12d125eebef92217469a9490808719fa0665f5e5c0adb96fbd02c4bac4d280d1502295669575790a81dbc01afe2ca3a9d384cbefb0 SHA512 b1e1933637de4581d5f8c6ede4e80a012435d13f0cf5550a76ab5bbe9441e3c15ce19ef3f78a7ea3b8368d5e9a3bb17c1207c471d26171b59786f38adeba0454
DIST coreutils-8.32.tar.xz 5547836 BLAKE2B 0ad99c176c19ec214fcfd0845523e5362f0151827707c759bd46c0fe8d2501c6ad1c29c5b71266f6525857bc0d56c472db0d7fe29953b6c65e2e6c76bdf3c515 SHA512 1c8f3584efd61b4b02e7ac5db8e103b63cfb2063432caaf1e64cb2dcc56d8c657d1133bbf10bd41468d6a1f31142e6caa81d16ae68fa3e6e84075c253613a145
DIST coreutils-9.0.tar.xz 5612752 BLAKE2B 59617cd25fd4c70f51bfbef851bd83e73f9c9ba5c11eb539f7f75c0184d55832e004b28e9268fb8064db145cb071ead2b9c0c3346bc35a11934ffe1b15bf17ac SHA512 9be08212891dbf48e5b22e7689dc27dac50df4631ebf29313470b72b7921f0b2aa5242917d05587785358495ca56e3b21f5b3ca81043d53cab92354da6c53a03
-EBUILD coreutils-8.32-r1.ebuild 5952 BLAKE2B f36627a733cc12af6662232d75938deb476470daa22084be267487a38d0ae42d32ff79c17f42dda25f8d8a7d95fb5b5f8a487de0bec45f364249bd25bceeeec8 SHA512 ec173a036db1b88010acfa13b301370ac80c7da2f1e29ee4b9c8c36e64ed60d98c5c9c111d0f14d93bf3c34b517fe47a98b3c30d3ccf0e17dcedbeec17d93908
-EBUILD coreutils-9.0.ebuild 5904 BLAKE2B b4e36bdb7300dc1dd33e180543d239813980cfcede24e201ed7f4c57dfe4af15bc1da7b37c0000b655980e7163f266ffb7716f68735230a589b092b38cf83299 SHA512 85b98a9e7ccf84d97b4f6a3d9d4f8a649a1179e2bbc71a7e4374610ce1c08f09d19ef4100c056aaf8ac7907954d02ff1da2a653f64f3c67ae792c0b204e037b9
+EBUILD coreutils-8.32-r1.ebuild 5967 BLAKE2B e4111bbbcd2c83ee5f25783434a8d841f75bb14dd9cbeb223558bf6c3d22f93ec7ba3d6c4ec740243473c53575776e9700004a0f9695b91a5468837a62b6c4c6 SHA512 adbd3c99b3e3e126e13a468bc66109005a1abdd603c11ea02bf8d8c2c8232ea48f6e2da768439ce4480789df0aa412eaff3849a24f3c81def5efd4479c87c27c
+EBUILD coreutils-9.0-r1.ebuild 5990 BLAKE2B aae844fd5650c162c268d9906d533a56d2a6e2e44cc106a031f75ca10fdfbe023e64909cf21409a5994638300e037f6a4be28dbac1d799b0991bca1ad58b0572 SHA512 4c023ab56b5070c52326a42099f8b14597ea3ce0efcb54bfe7098b37e6866f2332281f750a7b552bc38f4236e27c2e5b1ef79ff65662f3a7cf54d5d46d677325
+EBUILD coreutils-9.0.ebuild 5919 BLAKE2B a972080d2584b0bd38e48ee317b44a848767c182fed84f2b740bf3b8fefa79ffced03e885fdb64b689cbc88ac0929b73ecd478ae6071bd2bdaee3bfddf9d95b7 SHA512 5de0a279ed98b04c981f9b37a4e759d95cfa820af642813bf63ffc24a1e819349dd16a4a82c2c2bf93e11c0c29f00093f79add5ad0c97d74dad4aec8781321d0
MISC metadata.xml 959 BLAKE2B 7db7eff5a6e1c45c37e20d66e299b44b7a8334b20f970eac2bb7dbf0f8e149784bb19f28c0baa228bdbfbfe0335793080a99aee7f92a9976864ae53a35fc0ac8 SHA512 c69fdd7a27b7980c6e537387a510cfab65d0b252492576ffae3caac930bd2efad29edb604f654c194cc0a485894c8fbd3a5dc63e44359c95fc62fd055066b595
diff --git a/sys-apps/coreutils/coreutils-8.32-r1.ebuild b/sys-apps/coreutils/coreutils-8.32-r1.ebuild
index 47b5462e103f..1a139279ad85 100644
--- a/sys-apps/coreutils/coreutils-8.32-r1.ebuild
+++ b/sys-apps/coreutils/coreutils-8.32-r1.ebuild
@@ -36,6 +36,7 @@ DEPEND="
"
BDEPEND="
app-arch/xz-utils
+ dev-lang/perl
test? (
dev-lang/perl
dev-perl/Expect
diff --git a/sys-apps/coreutils/coreutils-9.0-r1.ebuild b/sys-apps/coreutils/coreutils-9.0-r1.ebuild
new file mode 100644
index 000000000000..ffbc9ea3ef92
--- /dev/null
+++ b/sys-apps/coreutils/coreutils-9.0-r1.ebuild
@@ -0,0 +1,223 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{8..10} )
+
+inherit flag-o-matic python-any-r1 toolchain-funcs
+
+PATCH="${PN}-8.30-patches-01"
+DESCRIPTION="Standard GNU utilities (chmod, cp, dd, ls, sort, tr, head, wc, who,...)"
+HOMEPAGE="https://www.gnu.org/software/coreutils/"
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
+ !vanilla? (
+ mirror://gentoo/${PATCH}.tar.xz
+ https://dev.gentoo.org/~polynomial-c/dist/${PATCH}.tar.xz
+ )"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux"
+IUSE="acl caps gmp hostname kill multicall nls selinux +split-usr static test vanilla xattr"
+RESTRICT="!test? ( test )"
+
+LIB_DEPEND="acl? ( sys-apps/acl[static-libs] )
+ caps? ( sys-libs/libcap )
+ gmp? ( dev-libs/gmp:=[static-libs] )
+ xattr? ( sys-apps/attr[static-libs] )"
+RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs]} )
+ selinux? ( sys-libs/libselinux )
+ nls? ( virtual/libintl )"
+DEPEND="
+ ${RDEPEND}
+ static? ( ${LIB_DEPEND} )
+"
+BDEPEND="
+ app-arch/xz-utils
+ dev-lang/perl
+ test? (
+ dev-lang/perl
+ dev-perl/Expect
+ dev-util/strace
+ ${PYTHON_DEPS}
+ )
+"
+RDEPEND+="
+ hostname? ( !sys-apps/net-tools[hostname] )
+ kill? (
+ !sys-apps/util-linux[kill]
+ !sys-process/procps[kill]
+ )
+ !app-misc/realpath
+ !<sys-apps/util-linux-2.13
+ !<sys-apps/sandbox-2.10-r4
+ !sys-apps/stat
+ !net-mail/base64
+ !sys-apps/mktemp
+ !<app-forensics/tct-1.18-r1
+ !<net-fs/netatalk-2.0.3-r4"
+
+pkg_setup() {
+ if use test ; then
+ python-any-r1_pkg_setup
+ fi
+}
+
+src_prepare() {
+ local PATCHES=(
+ # Upstream patches
+ "${FILESDIR}"/${P}-fix-chmod-symlink-exit.patch
+ )
+
+ if ! use vanilla ; then
+ PATCHES+=( "${WORKDIR}"/patch )
+ PATCHES+=( "${FILESDIR}"/${PN}-8.32-sandbox-env-test.patch )
+ fi
+
+ default
+
+ # Since we've patched many .c files, the make process will try to
+ # re-build the manpages by running `./bin --help`. When doing a
+ # cross-compile, we can't do that since 'bin' isn't a native bin.
+ #
+ # Also, it's not like we changed the usage on any of these things,
+ # so let's just update the timestamps and skip the help2man step.
+ set -- man/*.x
+ touch ${@/%x/1} || die
+
+ # Avoid perl dep for compiled in dircolors default (bug #348642)
+ if ! has_version dev-lang/perl ; then
+ touch src/dircolors.h || die
+ touch ${@/%x/1} || die
+ fi
+}
+
+src_configure() {
+ local myconf=(
+ --with-packager="Gentoo"
+ --with-packager-version="${PVR} (p${PATCH_VER:-0})"
+ --with-packager-bug-reports="https://bugs.gentoo.org/"
+ # kill/uptime - procps
+ # groups/su - shadow
+ # hostname - net-tools
+ --enable-install-program="arch,$(usev hostname),$(usev kill)"
+ --enable-no-install-program="groups,$(usev !hostname),$(usev !kill),su,uptime"
+ --enable-largefile
+ $(usex caps '' --disable-libcap)
+ $(use_enable nls)
+ $(use_enable acl)
+ $(use_enable multicall single-binary)
+ $(use_enable xattr)
+ $(use_with gmp libgmp)
+ )
+
+ if tc-is-cross-compiler && [[ ${CHOST} == *linux* ]] ; then
+ # bug #311569
+ export fu_cv_sys_stat_statfs2_bsize=yes
+ # bug #416629
+ export gl_cv_func_realpath_works=yes
+ fi
+
+ # bug #409919
+ export gl_cv_func_mknod_works=yes
+
+ if use static ; then
+ append-ldflags -static
+ # bug #321821
+ sed -i '/elf_sys=yes/s:yes:no:' configure || die
+ fi
+
+ if ! use selinux ; then
+ # bug #301782
+ export ac_cv_{header_selinux_{context,flash,selinux}_h,search_setfilecon}=no
+ fi
+
+ econf "${myconf[@]}"
+}
+
+src_test() {
+ # Known to fail with FEATURES=usersandbox (bug #439574):
+ # - tests/du/long-from-unreadable.sh} (bug #413621)
+ # - tests/rm/deep-2.sh (bug #413621)
+ # - tests/dd/no-allocate.sh (bug #629660)
+ if has usersandbox ${FEATURES} ; then
+ ewarn "You are emerging ${P} with 'usersandbox' enabled." \
+ "Expect some test failures or emerge with 'FEATURES=-usersandbox'!"
+ fi
+
+ # Non-root tests will fail if the full path isn't
+ # accessible to non-root users
+ chmod -R go-w "${WORKDIR}" || die
+ chmod a+rx "${WORKDIR}" || die
+
+ # coreutils tests like to do `mount` and such with temp dirs,
+ # so make sure:
+ # - /etc/mtab is writable (bug #265725)
+ # - /dev/loop* can be mounted (bug #269758)
+ mkdir -p "${T}"/mount-wrappers || die
+ mkwrap() {
+ local w ww
+ for w in "${@}" ; do
+ ww="${T}/mount-wrappers/${w}"
+ cat <<-EOF > "${ww}"
+ #!${EPREFIX}/bin/sh
+ exec env SANDBOX_WRITE="\${SANDBOX_WRITE}:/etc/mtab:/dev/loop" $(type -P ${w}) "\$@"
+ EOF
+ chmod a+rx "${ww}" || die
+ done
+ }
+ mkwrap mount umount
+
+ addwrite /dev/full
+ #export RUN_EXPENSIVE_TESTS="yes"
+ #export FETISH_GROUPS="portage wheel"
+ env PATH="${T}/mount-wrappers:${PATH}" \
+ emake -j1 -k check
+}
+
+src_install() {
+ default
+
+ insinto /etc
+ newins src/dircolors.hin DIR_COLORS
+
+ if use split-usr ; then
+ cd "${ED}"/usr/bin || die
+ dodir /bin
+
+ # Move critical binaries into /bin (required by FHS)
+ local fhs="cat chgrp chmod chown cp date dd df echo false ln ls
+ mkdir mknod mv pwd rm rmdir stty sync true uname"
+ mv ${fhs} ../../bin/ || die "Could not move FHS bins!"
+
+ if use hostname ; then
+ mv hostname ../../bin/ || die
+ fi
+
+ if use kill ; then
+ mv kill ../../bin/ || die
+ fi
+
+ # Move critical binaries into /bin (common scripts)
+ # (Why are these required for booting?)
+ local com="basename chroot cut dir dirname du env expr head mkfifo
+ mktemp readlink seq sleep sort tail touch tr tty vdir wc yes"
+ mv ${com} ../../bin/ || die "Could not move common bins!"
+
+ # Create a symlink for uname in /usr/bin/ since autotools require it.
+ # (Other than uname, we need to figure out why we are
+ # creating symlinks for these in /usr/bin instead of leaving
+ # the files there in the first place...)
+ local x
+ for x in ${com} uname ; do
+ dosym ../../bin/${x} /usr/bin/${x}
+ done
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Make sure you run 'hash -r' in your active shells."
+ ewarn "You should also re-source your shell settings for LS_COLORS"
+ ewarn " changes, such as: source /etc/profile"
+}
diff --git a/sys-apps/coreutils/coreutils-9.0.ebuild b/sys-apps/coreutils/coreutils-9.0.ebuild
index 0f0aec04b0bd..b373e1d79b29 100644
--- a/sys-apps/coreutils/coreutils-9.0.ebuild
+++ b/sys-apps/coreutils/coreutils-9.0.ebuild
@@ -35,6 +35,7 @@ DEPEND="
"
BDEPEND="
app-arch/xz-utils
+ dev-lang/perl
test? (
dev-lang/perl
dev-perl/Expect
diff --git a/sys-apps/coreutils/files/coreutils-9.0-fix-chmod-symlink-exit.patch b/sys-apps/coreutils/files/coreutils-9.0-fix-chmod-symlink-exit.patch
new file mode 100644
index 000000000000..25b2b72bcb80
--- /dev/null
+++ b/sys-apps/coreutils/files/coreutils-9.0-fix-chmod-symlink-exit.patch
@@ -0,0 +1,35 @@
+https://git.savannah.gnu.org/cgit/coreutils.git/patch/?id=e8b56ebd536e82b15542a00c888109471936bfda
+https://lists.gnu.org/archive/html/bug-coreutils/2021-09/msg00031.html
+(and https://lists.gnu.org/archive/html/bug-coreutils/2021-09/msg00035.html)
+
+From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
+Date: Fri, 24 Sep 2021 20:57:41 +0100
+Subject: chmod: fix exit status when ignoring symlinks
+
+* src/chmod.c: Reorder enum so CH_NOT_APPLIED
+can be treated as a non error.
+* tests/chmod/ignore-symlink.sh: A new test.
+* tests/local.mk: Reference the new test.
+* NEWS: Mention the bug fix.
+Fixes https://bugs.gnu.org/50784
+--- a/src/chmod.c
++++ b/src/chmod.c
+@@ -44,8 +44,8 @@ struct change_status
+ enum
+ {
+ CH_NO_STAT,
+- CH_NOT_APPLIED,
+ CH_FAILED,
++ CH_NOT_APPLIED,
+ CH_NO_CHANGE_REQUESTED,
+ CH_SUCCEEDED
+ }
+@@ -322,7 +322,7 @@ process_file (FTS *fts, FTSENT *ent)
+ if ( ! recurse)
+ fts_set (fts, ent, FTS_SKIP);
+
+- return CH_NO_CHANGE_REQUESTED <= ch.status;
++ return CH_NOT_APPLIED <= ch.status;
+ }
+
+ /* Recursively change the modes of the specified FILES (the last entry