first commit
This commit is contained in:
parent
3f9e4560e3
commit
1851f67493
BIN
patchutils-0.3.4.tar.xz
Normal file
BIN
patchutils-0.3.4.tar.xz
Normal file
Binary file not shown.
51
patchutils-bz1226985.patch
Normal file
51
patchutils-bz1226985.patch
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
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
|
||||||
21
patchutils-format-str.patch
Normal file
21
patchutils-format-str.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
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, ®ex[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, ®ex[num_regex - 1], errstr,
|
||||||
|
sizeof (errstr));
|
||||||
|
- error (EXIT_FAILURE, 0, errstr);
|
||||||
|
+ error (EXIT_FAILURE, 0, "%s", errstr);
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
|
}
|
||||||
51
patchutils.spec
Normal file
51
patchutils.spec
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
Name: patchutils
|
||||||
|
Version: 0.3.4
|
||||||
|
Release: 13
|
||||||
|
Summary: A small collection of programs that operate on patch files
|
||||||
|
License: GPLv2+
|
||||||
|
URL: http://cyberelk.net/tim/patchutils/
|
||||||
|
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
|
||||||
|
Provides: interdiff = 0.0.11
|
||||||
|
Requires: patch
|
||||||
|
BuildRequires: automake, autoconf perl-generators xmlto
|
||||||
|
|
||||||
|
%description
|
||||||
|
This is a collection of programs that can manipulate patch files in a variety of ways,
|
||||||
|
such as interpolating between two pre-patches, combining two incremental patches, fixing
|
||||||
|
line numbers in manually edited patches, and only listing modifications by patches document.
|
||||||
|
|
||||||
|
%package help
|
||||||
|
Summary: This package contains help documents
|
||||||
|
|
||||||
|
%description help
|
||||||
|
Files for help with patchutils.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p1
|
||||||
|
autoreconf
|
||||||
|
|
||||||
|
%build
|
||||||
|
touch doc/patchutils.xml
|
||||||
|
%configure
|
||||||
|
%make_build
|
||||||
|
|
||||||
|
%check
|
||||||
|
make check
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
|
||||||
|
%files
|
||||||
|
%doc AUTHORS README COPYING
|
||||||
|
%{_bindir}/*
|
||||||
|
|
||||||
|
%files help
|
||||||
|
%doc ChangeLog BUGS NEWS
|
||||||
|
%{_mandir}/*/*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Nov 27 2019 wangyiru <wangyiru1@huawei.com> - 0.3.4-13
|
||||||
|
- Package init
|
||||||
Loading…
x
Reference in New Issue
Block a user