diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-06-09 15:48:37 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-06-09 15:48:37 +0100 |
commit | 60010a4cd6d7c12aaa62f00b5e8a158ed24efba6 (patch) | |
tree | a961dd82d2d2719fe5bede9343e9e83cce856d9f /sys-apps/coreutils | |
parent | 65a4d80ebaba5d4d407b3d09320b337e0ca20f0a (diff) |
gentoo auto-resync : 09:06:2023 - 15:48:36
Diffstat (limited to 'sys-apps/coreutils')
-rw-r--r-- | sys-apps/coreutils/Manifest | 2 | ||||
-rw-r--r-- | sys-apps/coreutils/coreutils-9.3-r2.ebuild | 273 | ||||
-rw-r--r-- | sys-apps/coreutils/files/coreutils-9.3-old-kernel-copy_file_range.patch | 89 |
3 files changed, 364 insertions, 0 deletions
diff --git a/sys-apps/coreutils/Manifest b/sys-apps/coreutils/Manifest index 8e903662cda6..4dce13778b95 100644 --- a/sys-apps/coreutils/Manifest +++ b/sys-apps/coreutils/Manifest @@ -4,6 +4,7 @@ AUX coreutils-9.1-fix-rename-simple-backups.patch 1343 BLAKE2B b284b2b7d33fe7650 AUX coreutils-9.2-cksum-result-reporting.patch 2601 BLAKE2B 934e21d41fa93074aca8395bcb860c8bce6ac6de18120bcac728d67c0731242aa8163c411468caf7e64f71c731095e3e8070e5889d2fd93945a53ef50e31b831 SHA512 f1cb22d77d4b4c50f85e94153418cc6b774eeefc8955df725a4370844c8ceeb17ae0b3844269455ae36d23328a2faae1c5c762891384ea6f7eae46e89c291218 AUX coreutils-9.2-cp-reflink-auto-fallback.patch 5690 BLAKE2B d0fe6e930a83675c7490c46edf16236d1c58edf734ec292df9148f13923e7467ae84dc3eb8c61789b4c4365dae537a32071b9db14e118f1171fe34b59c089d93 SHA512 d30aee98d9fe60e28534ffd388cb6a6911ffa751f2b03cd5d2339ccdd41cf512099afd9e67137da1690d489948faf1ed265ae1f6875379b558a25e9eee5a214f AUX coreutils-9.3-cp-parents-preserve-permissions.patch 3436 BLAKE2B de9fa1038b34ec2134c39758840e5a619ed5b3e60ebd9ad280e3e1a117f76143ccec852f74ac8da3f29604e8bdc92dcc134a19da756b759fb15d5bc632dda74c SHA512 e19afd35150c188a4ad14844463181f391ab6fbc9b4b812677df693f6181045f3dc63c42f2755e19f03bc2a608d041f3e0943537bc9d783b03819ce9928a962b +AUX coreutils-9.3-old-kernel-copy_file_range.patch 3009 BLAKE2B 29be489f9544a1434708c73bc886605002e34fe430cbda062396cebb7fcb12bfb6062e1c032bb7ca2e49e2306b35150ca14e49a0a84d9b3a40ce0603dfa14c09 SHA512 5106a85a00aa7781514102e64ea2528221399009e9bfe842b0717bc1746cf9e4875aa00f9a3e56326ce2edc65a4cfc19c140a50a6528cd9131a7e41b4c785514 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_p20220409-patches-01.tar.xz 6244 BLAKE2B 8ca9855680719660782931467ec70095c826e66b9850890b8cf456963f8114f63940707386b97c766172d01e55e17b7db2aa1c329208a873a76e2293b29f565f SHA512 4b43c25832122d241f33e6b4eff24bc1fa045b9ca5af45a49d22ecb1fa282986c4e4a045ef24c34b3d94fd9a2247247c42c344261e3f464d881969e6f3351d3f @@ -17,6 +18,7 @@ EBUILD coreutils-8.32-r1.ebuild 5968 BLAKE2B ae5871d55509dbcd48c3f8b33938edfffca EBUILD coreutils-9.1-r2.ebuild 7114 BLAKE2B 6f52424f7e9f065d56dacc6fbbee0ac279289b2604a0b964267c5cfa05dbe881b14811ad6a3194bbd072701f1213df2f59320c0999a2d32c21722d521f297f4a SHA512 172d981fb9297862b6b2a8b69f549973fd04ea5e25a7375255ccf40b619054f599b6fe971161e687a5d868449b40f421511e83c7551b24262b200a1c2f790236 EBUILD coreutils-9.2-r2.ebuild 7602 BLAKE2B 858fd03a8ff42630b11bdd4a3c26d195d40ec93073fed28ee309475731c2ff054e54f3580ca17a536b88751293e26cd95cb82130431b963cd2d0abf5e6167faf SHA512 2934bf8602114f68e10f5f72c24b4e0cb07e95ab1d24f738b208754d3d58df21f0d72b1d01ba29897827bf9f961bd6536e1f3190a5a79d91839909e955812a53 EBUILD coreutils-9.3-r1.ebuild 7604 BLAKE2B 2dfda62928900111a402e353402ac7e7f545ab72d37a626202933806a8591095b35c8e86b149f0aa784e7d5ac9b6325f72d5c8c7b49f2d6adb049fb42b9379dd SHA512 76430d1fa83857e9392a2973d797479ee130256c232f911157ae4056493b826ec436fdeb7e0ed93a01cf9de925f29cb0f7b5f29c1eb3059bf3a7031a9f97a5d6 +EBUILD coreutils-9.3-r2.ebuild 7794 BLAKE2B 5b043bc597928643cd313d14941c32d8a9fe495090c4577eee02115775fe5605ca1f2c1c704e71f24ad5353520e36ba34b05fe814be072f38e486f750fde28fd SHA512 b4d7c5bbba946f60af46e4a2f1dec9f449d48c71dc18d592a2f30ac0c44c8ea5a75aedb86f0d15398c931cde2c7a73f3209ad2c6a22a8e4c6d122454be09fd15 EBUILD coreutils-9.3.ebuild 7478 BLAKE2B 8e857aeeb4a557ade9a6a85eb88814a414ba9f1a5c99efafd859c87cf644d21eac3592c033b505564ac54c0b827184faa295a2a7632fa2270a9c6225b790ce1f SHA512 7ec70783e2c978f6591ac16d1b137677e2927b961053a3e3e66a40dc5f9e576d9fbfae27f07f79110d3a2c4d93017ce92e3b32358e94cf5fe0509258ca2e4112 EBUILD coreutils-9999.ebuild 7550 BLAKE2B a169a42a5e795e8cfb568d05c9744a46e687627bcc905178f5d0f5ee977f4a5c661a6cfe6f46c7dbaa04ab941f49de950af4546d22daf8ccd66e83a0df667c88 SHA512 cfb15372aa67eff7c67fee803b9d53500205e9d2e093cc9495e09fc48b453894ff183536d984b3ffc0fef25244f5285ebbf598ebeb3c74fe8bf35de0a99c0a7e MISC metadata.xml 1093 BLAKE2B 68a653fe54fc668c7f2c7c01904cfca5a071192de4370dcbba427e673f8e9ec33b5104a868a5493117ef24e277446181383140c621b105689797aec4e077b86e SHA512 bf8f2653a1a81edb6e4090b127c5660e0c5ab41a33c985dea1b5cb05c6656b04f42084ce4e561f4550c3e54630893314d3084011c673e7d5aded022be1c065d1 diff --git a/sys-apps/coreutils/coreutils-9.3-r2.ebuild b/sys-apps/coreutils/coreutils-9.3-r2.ebuild new file mode 100644 index 000000000000..a85afed513e4 --- /dev/null +++ b/sys-apps/coreutils/coreutils-9.3-r2.ebuild @@ -0,0 +1,273 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +# 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} ) +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/coreutils.asc +inherit flag-o-matic python-any-r1 toolchain-funcs verify-sig + +MY_PATCH="${PN}-9.0_p20220409-patches-01" +DESCRIPTION="Standard GNU utilities (chmod, cp, dd, ls, sort, tr, head, wc, who,...)" +HOMEPAGE="https://www.gnu.org/software/coreutils/" + +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).18-ffd62" + 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 ) + " + + KEYWORDS="~alpha amd64 ~arm ~arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ~ppc64 ~riscv ~s390 sparc ~x86 ~x86-linux" +fi + +SRC_URI+=" !vanilla? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${MY_PATCH}.tar.xz )" + +LICENSE="GPL-3+" +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] ) + 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]} ) + 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} + ) + verify-sig? ( sec-keys/openpgp-keys-coreutils ) +" +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_unpack() { + 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 + + default +} + +src_prepare() { + local PATCHES=( + # Upstream patches + "${FILESDIR}"/${P}-cp-parents-preserve-permissions.patch + "${FILESDIR}"/${P}-old-kernel-copy_file_range.patch + ) + + if ! use vanilla && [[ -d "${WORKDIR}"/patch ]] ; then + PATCHES+=( "${WORKDIR}"/patch ) + fi + + default + + # Just for ${P}-old-kernel-copy_file_range.patch + touch aclocal.m4 configure.ac Makefile.in gnulib-tests/Makefile.in configure || die + + # 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" + $(usex caps '' --disable-libcap) + $(use_enable nls) + $(use_enable acl) + $(use_enable multicall single-binary) + $(use_enable xattr) + $(use_with gmp libgmp) + $(use_with openssl) + ) + + if use gmp ; then + myconf+=( --with-libgmp-prefix="${ESYSROOT}"/usr ) + fi + + 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}" gl_public_submodule_commit= \ + emake -k check VERBOSE=yes +} + +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/files/coreutils-9.3-old-kernel-copy_file_range.patch b/sys-apps/coreutils/files/coreutils-9.3-old-kernel-copy_file_range.patch new file mode 100644 index 000000000000..27767e312500 --- /dev/null +++ b/sys-apps/coreutils/files/coreutils-9.3-old-kernel-copy_file_range.patch @@ -0,0 +1,89 @@ +https://bugs.gentoo.org/907474 + +From 87b95c17dc8611f9483b966d052eefc930f43927 Mon Sep 17 00:00:00 2001 +From: Paul Eggert <eggert@cs.ucla.edu> +Date: Mon, 5 Jun 2023 22:04:37 -0700 +Subject: [PATCH] copy-file-range: support building for older kernels + +* m4/copy-file-range.m4 (gl_FUNC_COPY_FILE_RANGE): +Remove static check, to support the dubious practice of +building for platforms that predate the build platform. +On working kernels this adds an extra syscall the first time +that copy_file_range is used. Problem reported for Gentoo by +Sam James <https://bugs.gnu.org/63850>. +--- a/m4/copy-file-range.m4 ++++ b/m4/copy-file-range.m4 +@@ -39,21 +39,9 @@ AC_DEFUN([gl_FUNC_COPY_FILE_RANGE], + + case $host_os in + linux*) +- AC_CACHE_CHECK([whether copy_file_range is known to work], +- [gl_cv_copy_file_range_known_to_work], +- [AC_COMPILE_IFELSE( +- [AC_LANG_PROGRAM( +- [[#include <linux/version.h> +- ]], +- [[#if LINUX_VERSION_CODE < KERNEL_VERSION (5, 3, 0) +- #error "copy_file_range is buggy" +- #endif +- ]])], +- [gl_cv_copy_file_range_known_to_work=yes], +- [gl_cv_copy_file_range_known_to_work=no])]) +- if test "$gl_cv_copy_file_range_known_to_work" = no; then +- REPLACE_COPY_FILE_RANGE=1 +- fi;; ++ # See copy-file-range.c comment re pre-5.3 Linux kernel bugs. ++ # We should be able to remove this hack in 2025. ++ REPLACE_COPY_FILE_RANGE=1;; + esac + fi + ]) + +--- a/configure ++++ b/configure +@@ -39903,42 +39903,9 @@ printf "%s\n" "#define HAVE_COPY_FILE_RANGE 1" >>confdefs.h + + case $host_os in + linux*) +- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether copy_file_range is known to work" >&5 +-printf %s "checking whether copy_file_range is known to work... " >&6; } +-if test ${gl_cv_copy_file_range_known_to_work+y} +-then : +- printf %s "(cached) " >&6 +-else case e in #( +- e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext +-/* end confdefs.h. */ +-#include <linux/version.h> +- +-int +-main (void) +-{ +-#if LINUX_VERSION_CODE < KERNEL_VERSION (5, 3, 0) +- #error "copy_file_range is buggy" +- #endif +- +- ; +- return 0; +-} +-_ACEOF +-if ac_fn_c_try_compile "$LINENO" +-then : +- gl_cv_copy_file_range_known_to_work=yes +-else case e in #( +- e) gl_cv_copy_file_range_known_to_work=no ;; +-esac +-fi +-rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; +-esac +-fi +-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_copy_file_range_known_to_work" >&5 +-printf "%s\n" "$gl_cv_copy_file_range_known_to_work" >&6; } +- if test "$gl_cv_copy_file_range_known_to_work" = no; then +- REPLACE_COPY_FILE_RANGE=1 +- fi;; ++ # See copy-file-range.c comment re pre-5.3 Linux kernel bugs. ++ # We should be able to remove this hack in 2025. ++ REPLACE_COPY_FILE_RANGE=1;; + esac + fi + |