diff --git a/.cvsignore b/.cvsignore index ab22b20..1b77c72 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1,2 +1,3 @@ patch-2.5.4.tar.gz patch-2.6.tar.xz +patch-2.6.1.tar.xz diff --git a/patch-2.6.1.tar.xz.sig b/patch-2.6.1.tar.xz.sig new file mode 100644 index 0000000..fee87dc --- /dev/null +++ b/patch-2.6.1.tar.xz.sig @@ -0,0 +1,7 @@ +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.12 (GNU/Linux) + +iEYEABECAAYFAks7frsACgkQ9+hy/rlxVNONpwCgr0yqYFoW0Q1USWGBcA8dGNEn +XUMAn1RB5jT/EoiNi9ZrjawqxAT83JzB +=/8JO +-----END PGP SIGNATURE----- diff --git a/patch-2.6.tar.xz.sig b/patch-2.6.tar.xz.sig deleted file mode 100644 index 23b7e79..0000000 --- a/patch-2.6.tar.xz.sig +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.12 (GNU/Linux) - -iEYEABECAAYFAkr9aWMACgkQ9+hy/rlxVNMK0wCgg0Jg3HqcXm2Eh8jR66YADk8L -Si8AmwZ1EDTTvYmeQmae0zrYK6+4HRTR -=KgtY ------END PGP SIGNATURE----- diff --git a/patch-best-name.patch b/patch-best-name.patch deleted file mode 100644 index 810e403..0000000 --- a/patch-best-name.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- patch-2.6/src/pch.c 2009-11-02 19:09:57.000000000 +0000 -+++ patch-2.6-4-ge2218ac/src/pch.c 2009-12-22 23:03:27.000000000 +0000 -@@ -195,23 +195,22 @@ - } - - static bool --maybe_reverse (char const *name, bool nonexistent, bool empty) -+maybe_reverse (char const *name, bool nonexistent, bool is_empty) - { -- bool is_empty = nonexistent || empty; -- bool r; -+ bool looks_reversed = (! is_empty) < p_says_nonexistent[reverse ^ is_empty]; - -- r = (! is_empty) < p_says_nonexistent[reverse ^ is_empty] -- && ok_to_reverse ("The next patch%s would %s the file %s,\nwhich %s!", -- reverse ? ", when reversed," : "", -- (nonexistent ? "delete" -- : empty ? "empty out" -- : "create"), -- quotearg (name), -- (nonexistent ? "does not exist" -- : empty ? "is already empty" -- : "already exists")); -- reverse ^= r; -- return r; -+ if (looks_reversed) -+ reverse ^= -+ ok_to_reverse ("The next patch%s would %s the file %s,\nwhich %s!", -+ reverse ? ", when reversed," : "", -+ (nonexistent ? "delete" -+ : is_empty ? "empty out" -+ : "create"), -+ quotearg (name), -+ (nonexistent ? "does not exist" -+ : is_empty ? "is already empty" -+ : "already exists")); -+ return looks_reversed; - } - - /* True if the remainder of the patch file contains a diff of some sort. */ -@@ -638,6 +637,7 @@ - - if (! posixly_correct) - { -+ /* The best of all existing files. */ - i = best_name (p_name, stat_errno); - - if (i == NONE && patch_get) -@@ -680,12 +680,10 @@ - } - } - -- if (i != NONE && st[i].st_size > 0) -- i0 = i; - if (i0 != NONE -- && ! maybe_reverse (p_name[i0], i == NONE, -- i == NONE || st[i].st_size == 0)) -- i = i0; -+ && maybe_reverse (p_name[i0], i == NONE, -+ i == NONE || st[i].st_size == 0)) -+ i = i0; - - if (i == NONE && p_says_nonexistent[reverse]) - { -@@ -706,6 +704,7 @@ - if (p_name[i]) - distance_from_minimum[i] = newdirs[i] - newdirs_min; - -+ /* The best of the filenames which create the fewest directories. */ - i = best_name (p_name, distance_from_minimum); - } - } diff --git a/patch.spec b/patch.spec index 0e4245f..37752fa 100644 --- a/patch.spec +++ b/patch.spec @@ -1,17 +1,17 @@ Summary: Utility for modifying/upgrading files Name: patch -Version: 2.6 -Release: 2%{?dist} +Version: 2.6.1 +Release: 1%{?dist} License: GPLv2+ URL: http://www.gnu.org/software/patch/patch.html Group: Development/Tools Source: ftp://ftp.gnu.org/gnu/patch/patch-%{version}.tar.xz Patch1: patch-2.5.4-sigsegv.patch -Patch2: patch-best-name.patch Patch100: patch-selinux.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libselinux-devel +BuildRequires: ed %description The patch program applies diff files to originals. The diff command @@ -26,7 +26,6 @@ applications. %prep %setup -q %patch1 -p1 -b .sigsegv -%patch2 -p1 -b .best-name %patch100 -p1 -b .selinux %build @@ -57,6 +56,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/*/* %changelog +* Mon Jan 4 2010 Tim Waugh 2.6.1-1 +- 2.6.1 (bug #551569). No longer need best-name patch. + * Thu Dec 24 2009 Tim Waugh 2.6-2 - Applied upstream patch to prevent incorrect filename being chosen when adding a new file (bug #549122). diff --git a/sources b/sources index a05172a..1dd45ef 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -ee5ae84d115f051d87fcaaef3b4ae782 patch-2.5.4.tar.gz -d9d62cb7b98a8a17e42dab910fd2adc9 patch-2.6.tar.xz +057d78436e858c3ed086a544f5e1fe7e patch-2.6.1.tar.xz