diff options
| author | Eli Schwartz <eschwartz@gentoo.org> | 2025-03-30 23:00:58 -0400 |
|---|---|---|
| committer | Eli Schwartz <eschwartz@gentoo.org> | 2025-03-30 23:09:27 -0400 |
| commit | f397aace304e804cafe17b147c1e3f4ea782981f (patch) | |
| tree | c9ecacba4ad8b1eb04587ff046f58e8cea3656d9 /sys-devel/patch | |
| parent | 5e6edcfeecd94a3eab748ef82bb2b82f5e65734e (diff) | |
| download | gentoo-f397aace304e804cafe17b147c1e3f4ea782981f.tar.gz gentoo-f397aace304e804cafe17b147c1e3f4ea782981f.tar.bz2 gentoo-f397aace304e804cafe17b147c1e3f4ea782981f.zip | |
sys-devel/patch: add 2.8
This is the long-awaited final release after:
https://lists.gnu.org/archive/html/bug-patch/2024-05/msg00000.html
After slightly more than 7 years we have gotten some nice new features,
as well as cleared the list of backported `patch`es that need to be
applied before building the `patch` command.
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
Diffstat (limited to 'sys-devel/patch')
| -rw-r--r-- | sys-devel/patch/Manifest | 4 | ||||
| -rw-r--r-- | sys-devel/patch/files/patch-2.7.6_p20250206-no-backup-if-mismatch-regression.patch | 51 | ||||
| -rw-r--r-- | sys-devel/patch/files/patch-2.7.6_p20250206-traditional-diff-lines.patch | 36 | ||||
| -rw-r--r-- | sys-devel/patch/patch-2.8.ebuild (renamed from sys-devel/patch/patch-2.7.6_p20250206-r1.ebuild) | 10 |
4 files changed, 4 insertions, 97 deletions
diff --git a/sys-devel/patch/Manifest b/sys-devel/patch/Manifest index ebef4b3a0b52..4da493786801 100644 --- a/sys-devel/patch/Manifest +++ b/sys-devel/patch/Manifest @@ -1,4 +1,4 @@ DIST patch-2.7.6.tar.xz 783756 BLAKE2B e3dd2d155a94c39cb60eafc26677e84de14c3a6d5814dff69de091ded52f21862490970254297795f2c42a0c3203f7e88a8f65bb66968f8dfd6e066bf53f2dfb SHA512 fcca87bdb67a88685a8a25597f9e015f5e60197b9a269fa350ae35a7991ed8da553939b4bbc7f7d3cfd863c67142af403b04165633acbce4339056a905e87fbd DIST patch-2.7.6.tar.xz.sig 801 BLAKE2B 8f2decb10402ecf0208d05ea7cce3bae565d31ee2bb2a118367c117d25b158d8bd525cae654ec0c0e2c036cc8f47a331edc1bb10b100683ade64dfa3b651988b SHA512 1302a1110dcda4f3d83b5263415d72be55c46dae0efb1c123e9c346154e09def5657004bbe7249e2d014555349410e7a5217140dd8852331235f75bcc757351b -DIST patch-2.7.6_p20250206.tar.xz 906596 BLAKE2B f110bcf19b655c900327088ba023743fd845161dd00cab228675d3c0992fa397916adf153c35775fc5ff8e733b559ce8a05eac71eec7156403f4c9ab17ff2a3e SHA512 2dd05af5f9f0864b0cccc5c5194d0ba4ca427fc366b91210e2f539a50bd2006d7142606f8f223b45c5d426eafef7e6b17c6b67c2ef9b7ec75589bb3d9fce68d3 -DIST patch-2.7.6_p20250206.tar.xz.sig 833 BLAKE2B 8363136c58bbde5c349a4c96cd277588f3b679a98ea1c21da39bcf375c2b85c0d36165f1dceab453a09bcc2745d5ab6959d5ba28020e138591e7530dbf72f180 SHA512 a114f836502bb02910c8f88d7e667ce92ef6b0b9a26eb466ee9bd1ad8956036867801b19ea3ee27418fe0fb6e673e3d5d2aad2b9c05f7e99fd8bb1a9d604ea6f +DIST patch-2.8.tar.xz 907208 BLAKE2B 687f566201adb2e32c3832b911adaddd9994aacb25b66886d6315bfe2752e09fd551b3856a39024b8472b2d95efebf412d4a7c085812a13620de811073a397ad SHA512 d689d696660a662753e8660792733c3be0a94c76abfe7a28b0f9f70300c3a42d6437d081553a59bfde6e1b0d5ee13ed89be48d0b00b6da2cadbfc14a15ada603 +DIST patch-2.8.tar.xz.sig 833 BLAKE2B 6890bd25e2b4b5633b58073949f28f7c71c57667af9e4d92acc8f1736740c6433adf7078bf9ed3199158bd9734d080dba5b7eb46577d5714aa487d79fd938603 SHA512 8050bc11cd52ee930025e40550afe6c1a866a4a74fdc99332087c2d0fe8358b83d031322bf64480333fe682a7f52127fba7aceffa0cf6747e1ee3f239539f5f7 diff --git a/sys-devel/patch/files/patch-2.7.6_p20250206-no-backup-if-mismatch-regression.patch b/sys-devel/patch/files/patch-2.7.6_p20250206-no-backup-if-mismatch-regression.patch deleted file mode 100644 index 0891b855d998..000000000000 --- a/sys-devel/patch/files/patch-2.7.6_p20250206-no-backup-if-mismatch-regression.patch +++ /dev/null @@ -1,51 +0,0 @@ -From b5d2124e2e6019ee5d329b49ef6904a0daec74a1 Mon Sep 17 00:00:00 2001 -From: Paul Eggert <eggert@cs.ucla.edu> -Date: Mon, 24 Feb 2025 22:59:51 -0800 -Subject: [PATCH] patch: fix --no-backup-if-mismatch regression - -Problem reported by Sam James in: -https://lists.gnu.org/archive/html/bug-patch/2025-02/msg00014.html -https://bugs.gentoo.org/show_bug.cgi?id=949834 -* src/patch.c (backup_if_mismatch_specified): New static var. -(get_some_switches): Set it. -(main): Default backup_if_mismatch only if not set on command line. -* tests/no-backup: New file. -* tests/Makefile.am (TESTS): Add it. ---- - src/patch.c | 6 ++++- - 3 files changed, 62 insertions(+), 1 deletion(-) - -diff --git a/src/patch.c b/src/patch.c -index 6c460f7..e4d0524 100644 ---- a/src/patch.c -+++ b/src/patch.c -@@ -118,6 +118,7 @@ static bool merge; - static enum diff reject_format = NO_DIFF; /* automatic */ - static bool make_backups; - static bool backup_if_mismatch; -+static bool backup_if_mismatch_specified; - static char const *version_control; - static char const *version_control_context; - static bool remove_empty_files; -@@ -196,7 +197,8 @@ main (int argc, char **argv) - if (set_utc && setenv ("TZ", "UTC0", 1) < 0) - pfatal ("setenv"); - -- backup_if_mismatch = ! posixly_correct; -+ if (!backup_if_mismatch_specified) -+ backup_if_mismatch = !posixly_correct; - if (make_backups | backup_if_mismatch) - backup_type = get_version (version_control_context, version_control); - -@@ -1050,9 +1052,11 @@ get_some_switches (int argc, char **argv) - usage (stdout, EXIT_SUCCESS); - case CHAR_MAX + 5: - backup_if_mismatch = true; -+ backup_if_mismatch_specified = true; - break; - case CHAR_MAX + 6: - backup_if_mismatch = false; -+ backup_if_mismatch_specified = true; - break; - case CHAR_MAX + 7: - posixly_correct = true; diff --git a/sys-devel/patch/files/patch-2.7.6_p20250206-traditional-diff-lines.patch b/sys-devel/patch/files/patch-2.7.6_p20250206-traditional-diff-lines.patch deleted file mode 100644 index f33a79980f3e..000000000000 --- a/sys-devel/patch/files/patch-2.7.6_p20250206-traditional-diff-lines.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 29fced6251928e6334fa15fd28bf2c198acd4cd4 Mon Sep 17 00:00:00 2001 -From: Paul Eggert <eggert@cs.ucla.edu> -Date: Wed, 26 Feb 2025 16:44:48 -0800 -Subject: [PATCH 1/2] Count traditional diff pattern lines correctly -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -This fixes a bug I introduced on Thu Sep 5 16:37:50 2024 -0700. -Problem reported by Petr Vaněk in: -https://lists.gnu.org/archive/html/bug-patch/2025-02/msg00017.html -* src/pch.c (another_hunk): Fix method for counting number -of lines in a traditional diff hunk. ---- - src/pch.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/pch.c b/src/pch.c -index 63c9a0c..d9f5c61 100644 ---- a/src/pch.c -+++ b/src/pch.c -@@ -1765,9 +1765,10 @@ another_hunk (enum diff difftype, bool rev) - if (*s == ',') { - idx_t last; - s = scan_linenum (s + 1, &last); -- if (p_first >= IDX_MAX - p_ptrn_lines) -+ ptrdiff_t diff = last - p_first; -+ if (! (-1 <= diff && diff < IDX_MAX)) - malformed (); -- p_ptrn_lines += 1 - p_first; -+ p_ptrn_lines = diff + 1; - } - else - p_ptrn_lines = (*s != 'a'); --- -2.45.3 diff --git a/sys-devel/patch/patch-2.7.6_p20250206-r1.ebuild b/sys-devel/patch/patch-2.8.ebuild index fbaa5fd97f05..c410f22ffd4f 100644 --- a/sys-devel/patch/patch-2.7.6_p20250206-r1.ebuild +++ b/sys-devel/patch/patch-2.8.ebuild @@ -21,8 +21,9 @@ elif [[ ${PV} = *_p* ]] ; then else SRC_URI="mirror://gnu/patch/${P}.tar.xz" SRC_URI+=" verify-sig? ( mirror://gnu/patch/${P}.tar.xz.sig )" + + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" fi -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris" LICENSE="GPL-3+" SLOT="0" @@ -36,13 +37,6 @@ BDEPEND=" verify-sig? ( >=sec-keys/openpgp-keys-patch-20250206 ) " -PATCHES=( - # backport fix for https://bugs.gentoo.org/949834 - "${FILESDIR}"/${P}-no-backup-if-mismatch-regression.patch - # backport https://lists.gnu.org/archive/html/bug-patch/2025-02/msg00017.html - "${FILESDIR}"/${P}-traditional-diff-lines.patch -) - src_unpack() { if [[ ${PV} == 9999 ]] ; then git-r3_src_unpack |
