diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-04-30 00:00:01 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-04-30 00:00:01 +0100 |
commit | 4c2b70adc6484c35ff05e412de08a7b7f50cfb34 (patch) | |
tree | c7557ae36b9b2bfa7134849511e79da938581c5f /sys-apps/grep | |
parent | 5f0030fd1370c4d03dbb2e0d3086f5e618a33749 (diff) |
gentoo auto-resync : 30:04:2024 - 00:00:01
Diffstat (limited to 'sys-apps/grep')
-rw-r--r-- | sys-apps/grep/Manifest | 4 | ||||
-rw-r--r-- | sys-apps/grep/files/grep-3.11-100k-files-dir.patch | 143 | ||||
-rw-r--r-- | sys-apps/grep/grep-3.11-r1.ebuild | 122 | ||||
-rw-r--r-- | sys-apps/grep/metadata.xml | 1 |
4 files changed, 269 insertions, 1 deletions
diff --git a/sys-apps/grep/Manifest b/sys-apps/grep/Manifest index ee89f5a3e67c..b7984e37d275 100644 --- a/sys-apps/grep/Manifest +++ b/sys-apps/grep/Manifest @@ -1,4 +1,6 @@ +AUX grep-3.11-100k-files-dir.patch 4488 BLAKE2B 54d97710fbfe400980cd2fa7385fb7b10a481b138be5f37a17ec43843dab90b18ca61afb957cead8ee3f7dbb4f9b49f28e6cd3b54f33b3dc3e1b3b5d577d3ce3 SHA512 9e1948be0115f225fcca01763f1dbfd25c32b0ba48e543d2c25ad73b0e155f1fc1aa0c6277cce9cf65d226f3b878b718bd42b4b89f7c1f2750382ae54b76b871 DIST grep-3.11.tar.xz 1703776 BLAKE2B e21785bca20b5a090d32bb5dc525fb298af30165106ed4c289b1518ea3d2acdcacfd6309b12f13be29a4b958f19588546119c695deb2b7500d49dcff86357bdc SHA512 f254a1905a08c8173e12fbdd4fd8baed9a200217fba9d7641f0d78e4e002c1f2a621152d67027d9b25f0bb2430898f5233dc70909d8464fd13d7dd9298e65c42 DIST grep-3.11.tar.xz.sig 833 BLAKE2B 5edfba20e3a9f54d25ae63cf04985382bf6afb0ca643979561321090614e68b5d234767b07e48211888722c52c441233093735e183ff69432d5ee2e6a4f53aea SHA512 487aba063373ca0594c519991f19b2a6a33b3da0d74735c890f3828fd0880e7e6f64495d2c8f9efa5da53d1eb2d446609bab2399a4b89dcb4510a632e31ffb54 +EBUILD grep-3.11-r1.ebuild 3169 BLAKE2B ec46924d738bbc7619f040ac07bf7c2f699b5cb4fc0778d883d2a360710965dea449d1b38af89ca594e3c545abdf5452a55a3d291dbd701084e4d7ba82b28bba SHA512 40161b9bc53462f35f4a026892bb3116ca0602cfeeb46db30277208009eb25942518794835b0ac67a5d884f03751b84906eaac30fa0baeeacaf0a1858aa6a187 EBUILD grep-3.11.ebuild 2965 BLAKE2B 90d42080d7615909a4e6554cd6a366e64a3535f12d06a70ebc451771565b3644afa62a524d2e7bd397cfd60f7e577a0568f1f6b0e4dd0ddd5ca639f8e2ba6ee8 SHA512 d04e7d9202f03895b0f0e0919e07b5167ff5d59bd34f751114fbadf50822c8531c6ed6d847649b2f30b9a3475b3778da3383b43b42a5a9c765463243ddd8f53c -MISC metadata.xml 666 BLAKE2B 0c90e38d5363234474093ece5c9e0cbb99c01731a80c52869d700b7367fd74eec23f355653174b315f91ca7b41b4c5c9f5645ffaba043b3918c3c22c2c817ea4 SHA512 8e46c5c28b55063a7c74dfc637eb59785dc35651027e144acf4aea7f0ad7a4e43a3692946252acdf0d4a66ff8bdcfa89664fdf8bae71f1db688c06014c2a6a0f +MISC metadata.xml 712 BLAKE2B 9cc40dc17c2f903378eba194b71412eca93b013576e23f8deafbce55262b52ec799d11612856d30c91c4fddd51236f4c1a670c39ed0b38b2751dcd9c456cbb9f SHA512 46734c74422d8dfe79bbf635d34e200db3b884be830bf275cb95ac0dea5fc2ada7d2745dff1d535efbf6cc4277381347d13f3f2551a2901a6fcdbf598151953b diff --git a/sys-apps/grep/files/grep-3.11-100k-files-dir.patch b/sys-apps/grep/files/grep-3.11-100k-files-dir.patch new file mode 100644 index 000000000000..2862fef02efd --- /dev/null +++ b/sys-apps/grep/files/grep-3.11-100k-files-dir.patch @@ -0,0 +1,143 @@ +https://bugs.gentoo.org/930825 +https://debbugs.gnu.org/64773 +https://bugs.debian.org/1041588 +https://bugs.debian.org/1041588#105 + +We backport the following: +* the fix (https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=d4d8abb39eb02c555f062b1f83ffcfac999c582f) +* a test (https://git.savannah.gnu.org/cgit/grep.git/commit/?id=d1c3fbe7722662b449bae23130b644c726473fe3) +* a fixup commit for the test (https://git.savannah.gnu.org/cgit/grep.git/commit/?id=180e8dd674ede48727c03647dd36c1f8c3379667) + +From d4d8abb39eb02c555f062b1f83ffcfac999c582f Mon Sep 17 00:00:00 2001 +From: Bruno Haible <bruno@clisp.org> +Date: Fri, 5 May 2023 12:02:49 +0200 +Subject: [PATCH] dirfd: Fix bogus override (regression 2023-04-26). + +Reported by Bjarni Ingi Gislason <bjarniig@simnet.is> in +<https://lists.gnu.org/archive/html/bug-gnulib/2023-05/msg00040.html>. + +* m4/dirfd.m4 (gl_FUNC_DIRFD): Fix mistake in last change. +--- a/m4/dirfd.m4 ++++ b/m4/dirfd.m4 +@@ -1,4 +1,4 @@ +-# serial 27 -*- Autoconf -*- ++# serial 28 -*- Autoconf -*- + + dnl Find out how to get the file descriptor associated with an open DIR*. + +@@ -40,10 +40,6 @@ AC_DEFUN([gl_FUNC_DIRFD], + HAVE_DIRFD=0 + else + HAVE_DIRFD=1 +- dnl Replace only if the system declares dirfd already. +- if test $ac_cv_have_decl_dirfd = yes; then +- REPLACE_DIRFD=1 +- fi + dnl Replace dirfd() on native Windows, to support fdopendir(). + AC_REQUIRE([gl_DIRENT_DIR]) + if test $DIR_HAS_FD_MEMBER = 0; then +--- a/configure ++++ b/configure +@@ -31438,9 +31438,6 @@ printf "%s\n" "$gl_cv_func_dirfd_macro" >&6; } + HAVE_DIRFD=0 + else + HAVE_DIRFD=1 +- if test $ac_cv_have_decl_dirfd = yes; then +- REPLACE_DIRFD=1 +- fi + + if test $DIR_HAS_FD_MEMBER = 0; then + REPLACE_DIRFD=1 +From d1c3fbe7722662b449bae23130b644c726473fe3 Mon Sep 17 00:00:00 2001 +From: Jim Meyering <meyering@meta.com> +Date: Fri, 21 Jul 2023 17:42:23 -0700 +Subject: doc: mention the 100,000-entry ENOTSUP bug +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +* NEWS: document the fixed bug. +* tests/100k-entries: New file, to test for this. +Reported by Vincent Lefevre via Santiago Ruano Rincón in +https://bugs.gnu.org/64773 +Fixed by gnulib commit v0.1-6175-gd4d8abb39e. +--- + tests/100k-entries | 15 +++++++++++++++ + 2 files changed, 24 insertions(+) + create mode 100755 tests/100k-entries + +diff --git a/tests/100k-entries b/tests/100k-entries +new file mode 100755 +index 0000000..382ab3c +--- /dev/null ++++ b/tests/100k-entries +@@ -0,0 +1,15 @@ ++#!/bin/sh ++# This would make grep-3.11 fail with ENOTSUP and exit 2. ++. "${srcdir=.}/init.sh"; path_prepend_ ../src ++expensive_ ++ ++fail=0 ++ ++mkdir t || framework_failure_ ++(cd t && seq 100000|xargs touch) || framework_failure_ ++ ++returns_ 1 grep -r x t > out 2> err ++compare /dev/null out || fail=1 ++compare /dev/null err || fail=1 ++ ++Exit $fail +-- +cgit v1.1 + +From 180e8dd674ede48727c03647dd36c1f8c3379667 Mon Sep 17 00:00:00 2001 +From: Jim Meyering <meyering@meta.com> +Date: Sun, 20 Aug 2023 12:42:14 -0700 +Subject: tests: actually package and run the new 100k-entries test + +* tests/Makefile.am (TESTS): Include the new test file name, +100k-entries. +--- + tests/Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/Makefile.am b/tests/Makefile.am +index d566445..94430a9 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -71,6 +71,7 @@ else + endif + + TESTS = \ ++ 100k-entries \ + backref \ + backref-alt \ + backref-multibyte-slow \ +-- +cgit v1.1 +diff --git a/tests/Makefile.in b/tests/Makefile.in +index 8ae7bb4..0007f8d 100644 +--- a/tests/Makefile.in ++++ b/tests/Makefile.in +@@ -1953,6 +1953,7 @@ XFAIL_TESTS = triple-backref glibc-infloop $(am__append_1) + # If you're using older glibc you can upgrade to glibc 2.28 or later, + # configure --with-included-regex, or ignore the test failure. + TESTS = \ ++ 100k-entries \ + backref \ + backref-alt \ + backref-multibyte-slow \ +@@ -2430,6 +2431,13 @@ recheck: all $(check_PROGRAMS) + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? ++100k-entries.log: 100k-entries ++ @p='100k-entries'; \ ++ b='100k-entries'; \ ++ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ ++ --log-file $$b.log --trs-file $$b.trs \ ++ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ ++ "$$tst" $(AM_TESTS_FD_REDIRECT) + backref.log: backref + @p='backref'; \ + b='backref'; \ diff --git a/sys-apps/grep/grep-3.11-r1.ebuild b/sys-apps/grep/grep-3.11-r1.ebuild new file mode 100644 index 000000000000..e330ebb9fbd4 --- /dev/null +++ b/sys-apps/grep/grep-3.11-r1.ebuild @@ -0,0 +1,122 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/grep.asc +inherit flag-o-matic verify-sig + +DESCRIPTION="GNU regular expression matcher" +HOMEPAGE="https://www.gnu.org/software/grep/" + +if [[ ${PV} == *_p* ]] ; then + # Subscribe to the 'platform-testers' ML to find these. + # Useful to test on our especially more niche arches and report issues upstream. + MY_COMMIT="19-2ea9" + MY_P=${PN}-$(ver_cut 1-2).${MY_COMMIT} + SRC_URI="https://meyering.net/${PN}/${MY_P}.tar.xz" + SRC_URI+=" verify-sig? ( https://meyering.net/${PN}/${MY_P}.tar.xz.sig )" + S="${WORKDIR}"/${MY_P} +else + SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" + SRC_URI+=" 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 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" +fi + +LICENSE="GPL-3+" +SLOT="0" +IUSE="+egrep-fgrep nls pcre static" + +# We lack dev-libs/libsigsegv[static-libs] for now +REQUIRED_USE="static? ( !sparc )" + +LIB_DEPEND=" + pcre? ( >=dev-libs/libpcre2-10.42-r1[static-libs(+)] ) + sparc? ( dev-libs/libsigsegv ) +" +RDEPEND=" + !static? ( ${LIB_DEPEND//\[static-libs(+)]} ) + nls? ( virtual/libintl ) + virtual/libiconv +" +DEPEND=" + ${RDEPEND} + static? ( ${LIB_DEPEND} ) +" +BDEPEND=" + virtual/pkgconfig + nls? ( sys-devel/gettext ) + verify-sig? ( sec-keys/openpgp-keys-grep ) +" + +DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) + +QA_CONFIG_IMPL_DECL_SKIP=( + # Either gnulib FPs or fixed in newer autoconf, not worth autoreconf here for now? + MIN + alignof + static_assert +) + +PATCHES=( + "${FILESDIR}"/${P}-100k-files-dir.patch +) + +src_prepare() { + default + + # bug #523898 + sed -i \ + -e "s:@SHELL@:${EPREFIX}/bin/sh:g" \ + -e "s:@grep@:${EPREFIX}/bin/grep:" \ + src/egrep.sh || die + + # Drop when grep-3.11-100k-files-dir.patch is gone + touch aclocal.m4 config.hin configure {,doc/,gnulib-tests/,lib/,src/,tests/}Makefile.in || die +} + +src_configure() { + use static && append-ldflags -static + + # We used to turn this off unconditionally (bug #673524) but we now + # allow it for cases where libsigsegv is better for userspace handling + # of stack overflows. + # In particular, it's necessary for sparc: bug #768135 + export ac_cv_libsigsegv=$(usex sparc) + + local myeconfargs=( + --bindir="${EPREFIX}"/bin + $(use_enable nls) + $(use_enable pcre perl-regexp) + ) + + econf "${myeconfargs[@]}" +} + +src_install() { + default + + if use egrep-fgrep ; then + # Delete the upstream wrapper variants which warn on egrep+fgrep use + rm "${ED}"/bin/{egrep,fgrep} || die + + into / + # Install egrep, fgrep which don't warn. + # + # We do this by default to avoid breakage in old scripts + # and such which don't expect unexpected output on stderr, + # we've had examples of builds failing because foo-config + # starts returning a warning. + # + # https://lists.gnu.org/archive/html/bug-grep/2022-10/msg00000.html + newbin - egrep <<-EOF + #!/usr/bin/env sh + exec "${EPREFIX}/bin/grep" -E "\$@" + EOF + + newbin - fgrep <<-EOF + #!/usr/bin/env sh + exec "${EPREFIX}/bin/grep" -F "\$@" + EOF + fi +} diff --git a/sys-apps/grep/metadata.xml b/sys-apps/grep/metadata.xml index 89eff5cf9f7e..392e432c4d1a 100644 --- a/sys-apps/grep/metadata.xml +++ b/sys-apps/grep/metadata.xml @@ -19,5 +19,6 @@ </use> <upstream> <remote-id type="cpe">cpe:/a:gnu:grep</remote-id> + <remote-id type="savannah">grep</remote-id> </upstream> </pkgmetadata> |