This commit is contained in:
Tim Waugh 2020-07-16 14:23:50 +01:00
parent 96b85fab8b
commit e69506dfac
No known key found for this signature in database
GPG Key ID: B7C20D079491EA63
5 changed files with 16 additions and 82 deletions

Binary file not shown.

View File

@ -0,0 +1,11 @@
-----BEGIN PGP SIGNATURE-----
iQEzBAABCAAdFiEERimv6WDsIL7BLjEEt8INB5SR6mMFAl8QU30ACgkQt8INB5SR
6mNdjgf/UVRlluhj43OqQvj3ogM8M6EabsVdfWanP03l7zMlslxfwbS8CalaXj4I
wQgsTtxZ789Iu1N3ih96wnDeHEarbXnMnHkkv0VfOwnZuPAh433XoLZziV8BHXIu
YNBWM+DlaE4PejuSsmX+GE6q7Lgnmpl3PNAlweSBv+PxQ7yhJAfwaQTonfhAckuj
axrk4RjvxrNAfRR5euza3MMqL8uVLvHQIcsTxQNjKA6QhgbRnb34WCj1HSWlR9ST
PEwp6kpFvaDYz9IJ2BaPwxKg1DP1LIaBs/ldJGT9V4M6t4bebmWXtXPeIvlZwrWS
Yi9y3YYG8yBt0cYvq00aQVPdrrSUKQ==
=2w0Y
-----END PGP SIGNATURE-----

View File

@ -1,51 +0,0 @@
diff -up patchutils-0.3.4/Makefile.am.bz1226985 patchutils-0.3.4/Makefile.am
--- patchutils-0.3.4/Makefile.am.bz1226985 2015-04-14 17:32:18.000000000 +0100
+++ patchutils-0.3.4/Makefile.am 2015-06-09 17:13:52.497904051 +0100
@@ -216,7 +216,8 @@ TESTS = tests/newline1/run-test \
tests/stdin/run-test \
tests/splitdiffD/run-test \
tests/fullheader1/run-test \
- tests/fullheader2/run-test
+ tests/fullheader2/run-test \
+ tests/fullheader3/run-test
# These ones don't work yet.
# Feel free to send me patches. :-)
diff -up patchutils-0.3.4/src/filterdiff.c.bz1226985 patchutils-0.3.4/src/filterdiff.c
--- patchutils-0.3.4/src/filterdiff.c.bz1226985 2015-04-14 17:13:07.000000000 +0100
+++ patchutils-0.3.4/src/filterdiff.c 2015-06-09 17:13:52.498904087 +0100
@@ -910,7 +910,7 @@ out:
return ret;
}
-#define MAX_HEADERS 5
+#define MAX_HEADERS 6
static int filterdiff (FILE *f, const char *patchname)
{
static unsigned long linenum = 1;
diff -up patchutils-0.3.4/tests/fullheader3/run-test.bz1226985 patchutils-0.3.4/tests/fullheader3/run-test
--- patchutils-0.3.4/tests/fullheader3/run-test.bz1226985 2015-06-09 17:13:52.498904087 +0100
+++ patchutils-0.3.4/tests/fullheader3/run-test 2015-06-09 17:13:52.498904087 +0100
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# This is a filterdiff(1) testcase.
+# Handle git format-patch output containing remove-file diffs.
+# From: https://bugzilla.redhat.com/show_bug.cgi?id=1226985
+
+. ${top_srcdir-.}/tests/common.sh
+
+cat <<"EOF" > git-output
+diff --git a/a b/a
+deleted file mode 100644
+index 7898192..0000000
+--- a/a
++++ /dev/null
+@@ -1 +0,0 @@
+-a
+EOF
+
+${FILTERDIFF} git-output 2>errors >output || { cat errors; exit 1; }
+[ -s errors ] && { cat errors; exit 1; }
+cmp git-output output || exit 1
+exit 0

View File

@ -1,21 +0,0 @@
diff -up patchutils-0.3.4/src/filterdiff.c.format-str patchutils-0.3.4/src/filterdiff.c
--- patchutils-0.3.4/src/filterdiff.c.format-str 2017-05-15 11:54:20.203918650 +0100
+++ patchutils-0.3.4/src/filterdiff.c 2017-05-15 11:54:58.631833806 +0100
@@ -1355,7 +1355,7 @@ read_regex_file (const char *file)
char errstr[300];
regerror (err, &regex[num_regex - 1], errstr,
sizeof (errstr));
- error (EXIT_FAILURE, 0, errstr);
+ error (EXIT_FAILURE, 0, "%s", errstr);
exit (1);
}
}
@@ -1613,7 +1613,7 @@ int main (int argc, char *argv[])
char errstr[300];
regerror (err, &regex[num_regex - 1], errstr,
sizeof (errstr));
- error (EXIT_FAILURE, 0, errstr);
+ error (EXIT_FAILURE, 0, "%s", errstr);
exit (1);
}
}

View File

@ -1,12 +1,10 @@
Summary: A collection of programs for manipulating patch files Summary: A collection of programs for manipulating patch files
Name: patchutils Name: patchutils
Version: 0.3.4 Version: 0.4.0
Release: 15%{?dist} Release: 1%{?dist}
License: GPLv2+ License: GPLv2+
URL: http://cyberelk.net/tim/patchutils/ URL: http://cyberelk.net/tim/patchutils/
Source0: http://cyberelk.net/tim/data/patchutils/stable/%{name}-%{version}.tar.xz Source0: http://cyberelk.net/tim/data/patchutils/stable/%{name}-%{version}.tar.xz
Patch1: patchutils-bz1226985.patch
Patch2: patchutils-format-str.patch
Obsoletes: interdiff <= 0.0.10 Obsoletes: interdiff <= 0.0.10
Provides: interdiff = 0.0.11 Provides: interdiff = 0.0.11
Requires: patch Requires: patch
@ -24,12 +22,6 @@ patches, and simply listing the files modified by a patch.
%prep %prep
%setup -q %setup -q
# Fixed handling of delete-file diffs from git (bug #1226985).
%patch1 -p1 -b .bz1226985
# Don't use regerror() result as format string.
%patch2 -p1 -b .format-str
autoreconf autoreconf
%build %build
@ -51,6 +43,9 @@ make DESTDIR=%{buildroot} install
%{_mandir}/*/* %{_mandir}/*/*
%changelog %changelog
* Thu Jul 16 2020 Tim Waugh <twaugh@redhat.com> - 0.4.0-1
- 0.4.0.
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.4-15 * Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.4-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild