[packages/patch] - up to 2.7.2
arekm
arekm at pld-linux.org
Wed Jan 21 19:23:42 CET 2015
commit 895bf328bfab118c6cc8e958e8014bf3c1e2d720
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed Jan 21 19:23:37 2015 +0100
- up to 2.7.2
patch-git.patch | 436 --------------------------------------------------------
patch.spec | 10 +-
2 files changed, 4 insertions(+), 442 deletions(-)
---
diff --git a/patch.spec b/patch.spec
index fabfbd7..395209c 100644
--- a/patch.spec
+++ b/patch.spec
@@ -7,14 +7,13 @@ Summary(ru.UTF-8): Утилита GNU patch, для модификации/ап
Summary(tr.UTF-8): GNU yama yardımcı programları
Summary(uk.UTF-8): Утиліта GNU patch, для модифікації/апгрейду файлів
Name: patch
-Version: 2.7.1
-Release: 2
+Version: 2.7.2
+Release: 1
License: GPL v3+
Group: Applications/Text
Source0: http://ftp.gnu.org/gnu/patch/%{name}-%{version}.tar.xz
-# Source0-md5: e9ae5393426d3ad783a300a338c09b72
+# Source0-md5: 0b0217d45d3d45d3f07d6b241abbeb2a
Source1: %{name}.1.pl
-Patch0: %{name}-git.patch
URL: http://www.gnu.org/software/patch/
BuildRequires: autoconf >= 2.65
BuildRequires: automake >= 1:1.11.2
@@ -74,7 +73,6 @@ Patch - це програма, яка допомогає в модифікаці
%prep
%setup -q
-%patch -p1
%build
%{__aclocal} -I m4
@@ -108,7 +106,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog NEWS README TODO
+%doc AUTHORS ChangeLog NEWS README
%attr(755,root,root) %{_bindir}/patch
%{_mandir}/man1/patch.1*
%lang(pl) %{_mandir}/pl/man1/patch.1*
diff --git a/patch-git.patch b/patch-git.patch
deleted file mode 100644
index ef4836c..0000000
--- a/patch-git.patch
+++ /dev/null
@@ -1,436 +0,0 @@
-diff --git a/NEWS b/NEWS
-index 28d0e91..42afed7 100644
---- a/NEWS
-+++ b/NEWS
-@@ -1,3 +1,9 @@
-+* When a file isn't being deleted because the file contents don't match the
-+ patch, the resulting message is now "Not deleting file ... as content
-+ differs from patch" instead of "File ... is not empty after patch; not
-+ deleting".
-+* Function names in hunks (from diff -p) are now preserved in reject files.
-+
- Changes in version 2.7.1:
-
- * Two critical bug fixes in the "diff --git" format support.
-diff --git a/configure.ac b/configure.ac
-index dc837d6..f078469 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -33,7 +33,7 @@ AM_CONDITIONAL([ENABLE_MERGE], [test "$enableval" != no])
- AM_CONDITIONAL([ALPHA_VERSION],
- [[echo "$PACKAGE_VERSION" | grep -- "-[0-9a-f][0-9a-f]*\\(-dirty\\)\\?$" >/dev/null]])
-
--AM_INIT_AUTOMAKE([1.11.2 -Wall -Werror gnu dist-bzip2 dist-xz color-tests parallel-tests])
-+AM_INIT_AUTOMAKE([1.11.2 -Wall gnu dist-bzip2 dist-xz color-tests parallel-tests])
- AM_SILENT_RULES([yes])
-
- AC_CONFIG_HEADER([config.h:config.hin])
-diff --git a/patch.man b/patch.man
-index c5cc5c4..2c9def5 100644
---- a/patch.man
-+++ b/patch.man
-@@ -1,14 +1,10 @@
- .\" patch man page
--.de Id
--.ds Dt \\$4
--..
- .ds = \-\^\-
- .de Sp
- .if t .sp .3
- .if n .sp
- ..
--.TH PATCH 1 \*(Dt GNU
--.ta 3n
-+.TH PATCH 1 "" GNU
- .SH NAME
- patch \- apply a diff file to an original
- .SH SYNOPSIS
-@@ -241,7 +237,9 @@ asks for confirmation before proceeding.
- The upshot of all this is that you should be able to say, while in a news
- interface, something like the following:
- .Sp
-- \fB| patch \-d /usr/src/local/blurfl\fP
-+.RS
-+\fB| patch \-d /usr/src/local/blurfl\fP
-+.RE
- .Sp
- and patch a file in the
- .B blurfl
-@@ -445,8 +443,8 @@ This option implies \fB\*=forward\fP and does not take the
- Interpret the patch file as a normal diff.
- .TP
- \fB\-N\fP or \fB\*=forward\fP
--Ignore patches that seem to be reversed or already applied. It is only checked if
--the first hunk of a patch can be reversed.
-+When a patch does not apply, patch usually checks if the patch looks like it
-+has been reversed. The \fB\*=forward\fP option prevents that.
- See also
- .BR \-R .
- .TP
-@@ -470,7 +468,9 @@ you keep your files in a different directory than the person who sent
- out the patch.
- For example, supposing the file name in the patch file was
- .Sp
-- \fB/u/howard/src/blurfl/blurfl.c\fP
-+.RS
-+\fB/u/howard/src/blurfl/blurfl.c\fP
-+.RE
- .Sp
- setting
- .B \-p0
-@@ -478,13 +478,17 @@ gives the entire file name unmodified,
- .B \-p1
- gives
- .Sp
-- \fBu/howard/src/blurfl/blurfl.c\fP
-+.RS
-+\fBu/howard/src/blurfl/blurfl.c\fP
-+.RE
- .Sp
- without the leading slash,
- .B \-p4
- gives
- .Sp
-- \fBblurfl/blurfl.c\fP
-+.RS
-+\fBblurfl/blurfl.c\fP
-+.RE
- .Sp
- and not specifying
- .B \-p
-@@ -876,7 +880,9 @@ or
- option.
- Here is an example command, using Bourne shell syntax:
- .Sp
-- \fBLC_ALL=C TZ=UTC0 diff \-Naur gcc\-2.7 gcc\-2.8\fP
-+.RS
-+\fBLC_ALL=C TZ=UTC0 diff \-Naur gcc\-2.7 gcc\-2.8\fP
-+.RE
- .PP
- Tell your recipients how to apply the patch
- by telling them which directory to
-@@ -925,14 +931,16 @@ If the recipient is supposed to use the
- .BI \-p N
- option, do not send output that looks like this:
- .Sp
--.ft B
-+.RS
-+.ft CW
- .ne 3
-- diff \-Naur v2.0.29/prog/README prog/README
-+diff \-Naur v2.0.29/prog/README prog/README
- .br
-- \-\^\-\^\- v2.0.29/prog/README Mon Mar 10 15:13:12 1997
-+\-\^\-\^\- v2.0.29/prog/README Mon Mar 10 15:13:12 1997
- .br
-- +\^+\^+ prog/README Mon Mar 17 14:58:22 1997
-++\^+\^+ prog/README Mon Mar 17 14:58:22 1997
- .ft
-+.RE
- .Sp
- because the two file names have different numbers of slashes,
- and different versions of
-@@ -940,14 +948,16 @@ and different versions of
- interpret the file names differently.
- To avoid confusion, send output that looks like this instead:
- .Sp
--.ft B
-+.RS
-+.ft CW
- .ne 3
-- diff \-Naur v2.0.29/prog/README v2.0.30/prog/README
-+diff \-Naur v2.0.29/prog/README v2.0.30/prog/README
- .br
-- \-\^\-\^\- v2.0.29/prog/README Mon Mar 10 15:13:12 1997
-+\-\^\-\^\- v2.0.29/prog/README Mon Mar 10 15:13:12 1997
- .br
-- +\^+\^+ v2.0.30/prog/README Mon Mar 17 14:58:22 1997
-++\^+\^+ v2.0.30/prog/README Mon Mar 17 14:58:22 1997
- .ft
-+.RE
- .Sp
- .PP
- Avoid sending patches that compare backup file names like
-diff --git a/src/patch.c b/src/patch.c
-index 828943b..12028a9 100644
---- a/src/patch.c
-+++ b/src/patch.c
-@@ -150,6 +150,10 @@ main (int argc, char **argv)
- else if ((version_control = getenv ("VERSION_CONTROL")))
- version_control_context = "$VERSION_CONTROL";
-
-+ init_backup_hash_table ();
-+ init_files_to_delete ();
-+ init_files_to_output ();
-+
- /* parse switches */
- Argc = argc;
- Argv = argv;
-@@ -162,10 +166,6 @@ main (int argc, char **argv)
- if (make_backups | backup_if_mismatch)
- backup_type = get_version (version_control_context, version_control);
-
-- init_backup_hash_table ();
-- init_files_to_delete ();
-- init_files_to_output ();
--
- init_output (&outstate);
- if (outfile)
- outstate.ofp = open_outfile (outfile);
-@@ -519,7 +519,7 @@ main (int argc, char **argv)
- mismatch = true;
- somefailed = true;
- if (verbosity != SILENT)
-- say ("File %s is not empty after patch; not deleting\n",
-+ say ("Not deleting file %s as content differs from patch\n",
- quotearg (outname));
- }
-
-@@ -646,8 +646,8 @@ main (int argc, char **argv)
- if (outstate.ofp && (ferror (outstate.ofp) || fclose (outstate.ofp) != 0))
- write_fatal ();
- output_files (NULL);
-- delete_files ();
- cleanup ();
-+ delete_files ();
- if (somefailed)
- exit (1);
- return 0;
-@@ -762,7 +762,7 @@ static char const *const option_help[] =
- "",
- " -D NAME --ifdef=NAME Make merged if-then-else output using NAME.",
- #ifdef ENABLE_MERGE
--" -m --merge Merge using conflict markers instead of creating reject files.",
-+" --merge Merge using conflict markers instead of creating reject files.",
- #endif
- " -E --remove-empty-files Remove output files that are empty after patching.",
- "",
-@@ -1237,6 +1237,7 @@ abort_hunk_unified (bool header, bool reverse)
- lin old = 1;
- lin lastline = pch_ptrn_lines ();
- lin new = lastline + 1;
-+ char const *c_function = pch_c_function();
-
- if (header)
- {
-@@ -1251,7 +1252,7 @@ abort_hunk_unified (bool header, bool reverse)
- print_unidiff_range (rejfp, pch_first () + out_offset, lastline);
- fprintf (rejfp, " +");
- print_unidiff_range (rejfp, pch_newfirst () + out_offset, pch_repl_lines ());
-- fprintf (rejfp, " @@\n");
-+ fprintf (rejfp, " @@%s\n", c_function ? c_function : "");
-
- while (pch_char (new) == '=' || pch_char (new) == '\n')
- new++;
-diff --git a/src/util.c b/src/util.c
-index 1cc1a68..0af6013 100644
---- a/src/util.c
-+++ b/src/util.c
-@@ -1599,7 +1599,7 @@ make_tempfile (char const **name, char letter, char const *real_name,
- int try_makedirs_errno = ENOENT;
- char *template;
-
-- if (real_name)
-+ if (real_name && ! dry_run)
- {
- char *dirname, *basename;
-
-diff --git a/tests/Makefile.am b/tests/Makefile.am
-index 02fc6de..cfc4f37 100644
---- a/tests/Makefile.am
-+++ b/tests/Makefile.am
-@@ -20,6 +20,7 @@ TESTS = \
- asymmetric-hunks \
- backup-prefix-suffix \
- bad-filenames \
-+ bad-usage \
- concat-git-diff \
- copy-rename \
- corrupt-reject-files \
-@@ -49,6 +50,7 @@ TESTS = \
- reject-format \
- remember-backup-files \
- remember-reject-files \
-+ remove-directories \
- symlinks \
- unmodified-files
-
-diff --git a/tests/bad-usage b/tests/bad-usage
-new file mode 100644
-index 0000000..022eeda
---- /dev/null
-+++ b/tests/bad-usage
-@@ -0,0 +1,18 @@
-+# Copyright (C) 2009, 2011-2012 Free Software Foundation, Inc.
-+#
-+# Copying and distribution of this file, with or without modification,
-+# in any medium, are permitted without royalty provided the copyright
-+# notice and this notice are preserved.
-+
-+. $srcdir/test-lib.sh
-+
-+require_cat
-+use_local_patch
-+use_tmpdir
-+
-+# ==============================================================
-+
-+check 'patch -px || echo "status: $?"' <<EOF
-+$PATCH: **** strip count x is not a number
-+status: 2
-+EOF
-diff --git a/tests/create-delete b/tests/create-delete
-index 7c46166..404d99e 100644
---- a/tests/create-delete
-+++ b/tests/create-delete
-@@ -182,7 +182,7 @@ EOF
-
- check 'patch -p0 < p.diff || echo status: $?' <<EOF
- patching file target
--File target is not empty after patch; not deleting
-+Not deleting file target as content differs from patch
- status: 1
- EOF
-
-@@ -202,7 +202,7 @@ EOF
-
- check 'patch -p0 < p.diff || echo status: $?' <<EOF
- patching file target
--File target is not empty after patch; not deleting
-+Not deleting file target as content differs from patch
- status: 1
- EOF
-
-@@ -212,23 +212,27 @@ EOF
-
- # --------------------------------------------------------------
- printf '\0' > target
--cat > p.diff <<EOF
-+if ! test -s target; then
-+ echo "Failed to printf a null character; skipping this test"
-+else
-+ cat > p.diff <<EOF
- diff --git a/target b/target
- deleted file mode 100644
- index f76dd23..0000000
- Binary files a/target and /dev/null differ
- EOF
-
--check 'patch -p1 -b < p.diff || echo status: $?' <<EOF
-+ check 'patch -p1 -b < p.diff || echo status: $?' <<EOF
- patching file target
--File target is not empty after patch; not deleting
-+Not deleting file target as content differs from patch
- status: 1
- EOF
-
--ncheck 'test -e target'
-+ ncheck 'test -e target'
-
- # Patch creates a backup file even when the original file remains unchanged:
--ncheck 'test -e target.orig'
-+ ncheck 'test -e target.orig'
-+fi
-
- # ================================================================
- # File not expected to become empty does become empty
-diff --git a/tests/create-directory b/tests/create-directory
-index f02ce6e..9fc3288 100644
---- a/tests/create-directory
-+++ b/tests/create-directory
-@@ -4,15 +4,14 @@
- # in any medium, are permitted without royalty provided the copyright
- # notice and this notice are preserved.
-
--# Check whether patch correctly creates directories before creating
--# new files.
--
- . $srcdir/test-lib.sh
-
- use_local_patch
- use_tmpdir
-
- # ==============================================================
-+# Check whether patch correctly creates directories before creating
-+# new files.
-
- cat > f.diff <<EOF
- --- /dev/null
-@@ -25,3 +24,20 @@ EOF
- check 'patch -p0 < f.diff' <<EOF
- patching file b/newfile
- EOF
-+
-+# ==============================================================
-+# Make sure it doesn't create files or directories in the target
-+# location in --dry-run mode
-+mkdir d
-+cat > f.diff <<EOF
-+--- /dev/null
-++++ d/e/f
-+@@ -0,0 +1 @@
-++f
-+EOF
-+
-+chmod u-w d
-+check 'patch -p0 --dry-run < f.diff' <<EOF
-+checking file d/e/f
-+EOF
-+chmod u+w d
-diff --git a/tests/reject-format b/tests/reject-format
-index be710f5..0b02af6 100644
---- a/tests/reject-format
-+++ b/tests/reject-format
-@@ -79,7 +79,7 @@ check 'cat f.rej' <<EOF
- Index: f
- --- f.orig
- +++ f
--@@ -2,6 +2,6 @@
-+@@ -2,6 +2,6 @@ a() {
- 2
- 3
- $preserve_trailing_blank
-@@ -102,7 +102,7 @@ EOF
- check 'cat f.rej' <<EOF
- --- f.orig
- +++ f
--@@ -2,6 +2,6 @@
-+@@ -2,6 +2,6 @@ a() {
- 2
- 3
- $preserve_trailing_blank
-diff --git a/tests/remove-directories b/tests/remove-directories
-new file mode 100644
-index 0000000..6acdc49
---- /dev/null
-+++ b/tests/remove-directories
-@@ -0,0 +1,29 @@
-+# Copyright (C) 2013 Free Software Foundation, Inc.
-+#
-+# Copying and distribution of this file, with or without modification,
-+# in any medium, are permitted without royalty provided the copyright
-+# notice and this notice are preserved.
-+
-+. $srcdir/test-lib.sh
-+
-+require_cat
-+use_local_patch
-+use_tmpdir
-+
-+# ==============================================================
-+# Remove empty parent diectories when removing a file
-+
-+mkdir dir
-+echo foobar > dir/file
-+cat > apatch <<EOF
-+--- dir/file
-++++ /dev/null
-+@@ -1 +0,0 @@
-+-foobar
-+EOF
-+
-+check 'patch -p0 -E < apatch' <<EOF
-+patching file dir/file
-+EOF
-+
-+ncheck '! test -e dir'
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/patch.git/commitdiff/895bf328bfab118c6cc8e958e8014bf3c1e2d720
More information about the pld-cvs-commit
mailing list