commit:     f5755f0b3c4aa1512d88099514bd291bf6e2082a
Author:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 13 06:21:36 2025 +0000
Commit:     Fabian Groffen <grobian <AT> gentoo <DOT> org>
CommitDate: Sun Apr 13 06:21:36 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=f5755f0b

sys-apps/coreutils-9.7: sync with gx86

Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org>

 sys-apps/coreutils/Manifest                        |   3 +
 ...oreutils-9.1-r2.ebuild => coreutils-9.7.ebuild} | 126 +++++++++++++++------
 2 files changed, 95 insertions(+), 34 deletions(-)

diff --git a/sys-apps/coreutils/Manifest b/sys-apps/coreutils/Manifest
index 6b82603fbe..9bedac3992 100644
--- a/sys-apps/coreutils/Manifest
+++ b/sys-apps/coreutils/Manifest
@@ -6,3 +6,6 @@ DIST coreutils-9.3.tar.xz.sig 833 BLAKE2B 
c45ae10ff706907ae65d31228e432f7d6f34ac
 DIST coreutils-9.5-patches.tar.xz 5912 BLAKE2B 
873fbe1a60f8f8034b3d35796146765ce388952d649c32dc81ca0e4c2823c9f2f00b69bc5cb3af686434867459b6dc378fb9a6d59563d28b87c3ee1eceeedbb3
 SHA512 
4b4ad356615d046b8d67ea35b789f887a787ab01ece3234f6344518aef33cd30ca364fef5d85e11acfdb24003114c16ffdab82922fb135d5425fbcd541064a76
 DIST coreutils-9.5.tar.xz 6007136 BLAKE2B 
6fd3a77697c9e85f31415c6ad66559faf18acc7d346677a89d4a999c2027886551e78842a7283e7b3b44fe8ef2fde04ba2f88df32a7844d5f69d45bcb7a04b6f
 SHA512 
2ca0deac4dc10a80fd0c6fd131252e99d457fd03b7bd626a6bc74fe5a0529c0a3d48ce1f5da1d3b3a7a150a1ce44f0fbb6b68a6ac543dfd5baa3e71f5d65401c
 DIST coreutils-9.5.tar.xz.sig 833 BLAKE2B 
37c29984bceee0ff3bffde76712f71dbb118c228e328dc230d5c53c37da12f5ec2130e0123b97fda4a561f556c3be307fdbe1f0c21279db2c84030818386f626
 SHA512 
029997e0f4ee64e561853cff7c8a124f58cc891598595b44c4a46f9813b4b71c9d677464bc8a26d294e9971832f4b87c23777fea4fac6e8e30f06ad93b9957d5
+DIST coreutils-9.6-patches.tar.xz 5904 BLAKE2B 
1abe214914007804362b9d7c1a7c39f07d74c51857e84484179f11bb8fa512356ee97c811ef62469aaa52db5cc90f2f7587c2dc57ed130ebbfdacc59755dcb90
 SHA512 
5a609b21da7c78e41184e5d7bca87da4f868975635b6e8aa4bd8f4d18c98a2fabd5b7e8ad6bf7780ca77f6d532bfa5cb1ed618e4bc32617ba2977d4b8a885b9f
+DIST coreutils-9.7.tar.xz 6158960 BLAKE2B 
e5e5f7ec26c3952eb6a25988f78d3a1f8a70cf97a2fbc7b433dfcd1721cd38e6e0a8b9cb83f854a22df325bcb5ea8c4534c5a217273762cd5d575b381db69ee8
 SHA512 
fe81e6ba4fb492095153d5baac1eca8f07ece0957849de746a2a858cf007893cc2ded595a31a5e5d43d13216cc44b9d74a3245d9f23221ecc8cd00f428f27414
+DIST coreutils-9.7.tar.xz.sig 833 BLAKE2B 
18dee5a1b5dc1811b277748fe6ee079dc6320bc6d67e01f108415c6afe21ad0367ece46f8c6dfb0976b1e5f62ae15c2d61fba916ea232c71a1b2f66c81b983bf
 SHA512 
48d86a19cee3c153f01f7478847f4621685c02e59942540bb20b30e314df05230817b87d0e73acd953e79fab35718e5bea57f25fe511a2c275a85ced4b317bae

diff --git a/sys-apps/coreutils/coreutils-9.1-r2.ebuild 
b/sys-apps/coreutils/coreutils-9.7.ebuild
similarity index 70%
rename from sys-apps/coreutils/coreutils-9.1-r2.ebuild
rename to sys-apps/coreutils/coreutils-9.7.ebuild
index cee3a316af..5a7de82364 100644
--- a/sys-apps/coreutils/coreutils-9.1-r2.ebuild
+++ b/sys-apps/coreutils/coreutils-9.7.ebuild
@@ -1,30 +1,42 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI=7
+EAPI=8
+
+# PREFIX LOCAL changes:
+# - Darwin libstdbuf cruft to fix during bootstrap, and use a correct
+#   install_name
 
 # Try to keep an eye on Fedora's packaging: 
https://src.fedoraproject.org/rpms/coreutils
 # The upstream coreutils maintainers also maintain the package in Fedora and 
may
 # backport fixes which we want to pick up.
+#
+# Also recommend subscribing to the coreutils and bug-coreutils MLs.
 
-PYTHON_COMPAT=( python3_{9..11} )
+PYTHON_COMPAT=( python3_{10..13} )
 VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/coreutils.asc
 inherit flag-o-matic python-any-r1 toolchain-funcs verify-sig
+inherit multilib
 
-MY_PATCH="${PN}-9.0_p20220409-patches-01"
+MY_PATCH="${PN}-9.6-patches"
 DESCRIPTION="Standard GNU utilities (chmod, cp, dd, ls, sort, tr, head, wc, 
who,...)"
 HOMEPAGE="https://www.gnu.org/software/coreutils/";
 
-if [[ ${PV} == *_p* ]] ; then
+if [[ ${PV} == 9999 ]] ; then
+       EGIT_REPO_URI="https://git.savannah.gnu.org/git/coreutils.git";
+       inherit git-r3
+elif [[ ${PV} == *_p* ]] ; then
        # Note: could put this in devspace, but if it's gone, we don't want
        # it in tree anyway. It's just for testing.
-       MY_SNAPSHOT="$(ver_cut 1-2).193-54bec"
+       MY_SNAPSHOT="$(ver_cut 1-2).53-14af8"
        SRC_URI="https://www.pixelbeat.org/cu/coreutils-${MY_SNAPSHOT}.tar.xz 
-> ${P}.tar.xz"
        SRC_URI+=" verify-sig? ( 
https://www.pixelbeat.org/cu/coreutils-${MY_SNAPSHOT}.tar.xz.sig -> 
${P}.tar.xz.sig )"
        S="${WORKDIR}"/${PN}-${MY_SNAPSHOT}
 else
-       SRC_URI="mirror://gnu/${PN}/${P}.tar.xz
-               verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )"
+       SRC_URI="
+               mirror://gnu/${PN}/${P}.tar.xz
+               verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )
+       "
 
        KEYWORDS="~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos 
~x64-solaris"
 fi
@@ -36,14 +48,18 @@ SLOT="0"
 IUSE="acl caps gmp hostname kill multicall nls +openssl selinux +split-usr 
static test vanilla xattr"
 RESTRICT="!test? ( test )"
 
-LIB_DEPEND="acl? ( sys-apps/acl[static-libs] )
+LIB_DEPEND="
+       acl? ( sys-apps/acl[static-libs] )
        caps? ( sys-libs/libcap )
        gmp? ( dev-libs/gmp:=[static-libs] )
        openssl? ( dev-libs/openssl:=[static-libs] )
-       xattr? ( sys-apps/attr[static-libs] )"
-RDEPEND="!static? ( ${LIB_DEPEND//\[static-libs]} )
+       xattr? ( sys-apps/attr[static-libs] )
+"
+RDEPEND="
+       !static? ( ${LIB_DEPEND//\[static-libs]} )
        selinux? ( sys-libs/libselinux )
-       nls? ( virtual/libintl )"
+       nls? ( virtual/libintl )
+"
 DEPEND="
        ${RDEPEND}
        static? ( ${LIB_DEPEND} )
@@ -52,9 +68,9 @@ BDEPEND="
        app-arch/xz-utils
        dev-lang/perl
        test? (
+               dev-debug/strace
                dev-lang/perl
                dev-perl/Expect
-               dev-util/strace
                ${PYTHON_DEPS}
        )
        verify-sig? ( sec-keys/openpgp-keys-coreutils )
@@ -65,14 +81,21 @@ RDEPEND+="
                !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"
+       !<net-fs/netatalk-2.0.3-r4
+"
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+       # gnulib FPs (bug #898370)
+       unreachable MIN alignof static_assert
+       # ... and on musl
+       _exit fpurge statvfs64 re_set_syntax re_compile_pattern re_search 
re_match
+)
 
 pkg_setup() {
        if use test ; then
@@ -81,7 +104,14 @@ pkg_setup() {
 }
 
 src_unpack() {
-       if use verify-sig ; then
+       if [[ ${PV} == 9999 ]] ; then
+               git-r3_src_unpack
+
+               cd "${S}" || die
+               ./bootstrap || die
+
+               sed -i -e "s:submodule-checks ?= no-submodule-changes 
public-submodule-commit:submodule-checks ?= no-submodule-changes:" 
gnulib/top/maint.mk || die
+       elif use verify-sig ; then
                # Needed for downloaded patch (which is unsigned, which is fine)
                verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.sig}
        fi
@@ -90,13 +120,13 @@ src_unpack() {
 }
 
 src_prepare() {
+       # TODO: past 2025, we may need to add our own hack for bug #907474.
        local PATCHES=(
                # Upstream patches
-               "${FILESDIR}"/${P}-fix-rename-simple-backups.patch
        )
 
-       if ! use vanilla ; then
-               PATCHES+=( "${WORKDIR}"/patch )
+       if ! use vanilla && [[ -d "${WORKDIR}"/${MY_PATCH} ]] ; then
+               PATCHES+=( "${WORKDIR}"/${MY_PATCH} )
        fi
 
        default
@@ -114,7 +144,7 @@ src_prepare() {
                export MAKEOPTS+=" -j1"
                # set a proper install_name
                sed -i \
-                       -e "/src_libstdbuf_so_LDFLAGS = 
-shared/s:-shared:-dynamiclib -install_name 
${EPREFIX}/usr/libexec/coreutils/libstdbuf.dylib:" \
+                       -e "/src_libstdbuf_so_LDFLAGS = 
-shared/s:-shared:-dynamiclib -install_name 
${EPREFIX}/usr/libexec/coreutils/libstdbuf$(get_libname):" \
                        Makefile.in \
                        || die
 
@@ -143,6 +173,9 @@ src_prepare() {
 }
 
 src_configure() {
+       # TODO: in future (>9.4?), we may want to wire up USE=systemd:
+       # still experimental at the moment, but:
+       # 
https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=85edb4afbd119fb69a0d53e1beb71f46c9525dd0
        local myconf=(
                --with-packager="Gentoo"
                --with-packager-version="${PVR} (p${PATCH_VER:-0})"
@@ -152,8 +185,7 @@ src_configure() {
                # 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)
+               $(usev !caps --disable-libcap)
                $(use_enable nls)
                $(use_enable acl)
                $(use_enable multicall single-binary)
@@ -191,15 +223,6 @@ src_configure() {
 }
 
 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
@@ -224,9 +247,44 @@ src_test() {
        mkwrap mount umount
 
        addwrite /dev/full
-       #export RUN_EXPENSIVE_TESTS="yes"
-       #export FETISH_GROUPS="portage wheel"
-       env PATH="${T}/mount-wrappers:${PATH}" emake -k check VERBOSE=yes
+
+       #local -x RUN_EXPENSIVE_TESTS="yes"
+       #local -x COREUTILS_GROUPS="portage wheel"
+       local -x PATH="${T}/mount-wrappers:${PATH}"
+       local -x gl_public_submodule_commit=
+
+       local xfail_tests=()
+
+       if [[ -n ${SANDBOX_ACTIVE} ]]; then
+               xfail_tests+=(
+                       # bug #629660
+                       # Commented out again in 9.6 as it XPASSes on 
linux-6.12.10
+                       # with sandbox-2.43 on tmpfs. Let's see if it lasts..
+                       #tests/dd/no-allocate.sh
+
+                       # bug #675802
+                       tests/env/env-S
+                       tests/env/env-S.pl
+
+                       # We have a patch which fixes this (bug #259876)
+                       #tests/touch/not-owner
+                       #tests/touch/not-owner.sh
+               )
+       fi
+
+       # This test is flaky (bug #910640).
+       cat > tests/tty/tty-eof.pl <<-EOF || die
+       #!/usr/bin/perl
+       exit 77;
+       EOF
+
+       # We set DISABLE_HARD_ERRORS because some of the tests hard error-out
+       # because of sandbox. They're skipped above but DISABLE_HARD_ERRORS is 
needed
+       # to downgrade them to FAIL.
+       emake -k check \
+               VERBOSE=yes \
+               DISABLE_HARD_ERRORS=yes \
+               XFAIL_TESTS="${xfail_tests[*]}"
 }
 
 src_install() {

Reply via email to