From 89dd5024165a15237349d0419c101cf38da3a3ff52c926e0f68dd64d750880a4 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Thu, 6 Dec 2012 14:43:28 +0000 Subject: [PATCH] - Version 2.7.1 + Patch no longer gets a failed assertion for certain mangled patches. + Ignore destination file names that are absolute or that contain a component of "..", except when working in the root directory. This addresses CVE-2010-4651. + Support for most features of the "diff --git" format, including renames and copies, permission changes, and symlink diffs. Binary diffs are not supported yet; patch will complain and skip them. + Support for double-quoted filenames: when a filename starts with a double quote, it is interpreted as a C string literal. The escape sequences \\, \", \a, \b, \f, \n, \r, \t, \v, and \ooo (a three-digit octal number between 0 and 255) are recognized. + Refuse to apply a normal patch to a symlink. (Previous versions of patch were replacing the symlink with a regular file.) + New --follow-symlinks option to allow to treat symlinks as files: this was patch's behavior before version 2.7. + When trying to modify a read-only file, warn about the potential problem by default. The --read-only command line option allows to change this behavior. + Files to be deleted are deleted once the entire input has been processed, not immediately. This fixes a bug with numbered backup files. + When a timestamp specifies a time zone, honor that instead of assuming the local time zone (--set-date) or Universal Coordinated Time (--set-utc). + Support for nanosecond precision timestamps. + Many bug fixes. + Clarify the message printed when a patch is expected to empty out and delete a file, but the file does not become empty. + Various improvements to messages when applying a patch to a file of different type (regular file vs. symlink), when there are line ending differences (LF vs. CRLF), and when in --dry-run mode. + Ignore when extended attributes cannot be preserved because they are unsupported or because permission to set them is denied. - patch-revert-e0f70752.patch: Dropped, original bug fixed upstream. - patch-stdio.in.patch: Dropped, merged upstream. OBS-URL: https://build.opensuse.org/package/show/devel:tools/patch?expand=0&rev=35 --- patch-2.6.1.136-31a7.tar.bz2 | 3 -- patch-2.7.1.tar.xz | 3 ++ patch-revert-e0f70752.patch | 64 ------------------------------------ patch-stdio.in.patch | 14 -------- patch.changes | 46 ++++++++++++++++++++++++++ patch.spec | 13 +++----- 6 files changed, 53 insertions(+), 90 deletions(-) delete mode 100644 patch-2.6.1.136-31a7.tar.bz2 create mode 100644 patch-2.7.1.tar.xz delete mode 100644 patch-revert-e0f70752.patch delete mode 100644 patch-stdio.in.patch diff --git a/patch-2.6.1.136-31a7.tar.bz2 b/patch-2.6.1.136-31a7.tar.bz2 deleted file mode 100644 index 4860e6d..0000000 --- a/patch-2.6.1.136-31a7.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a20be53db3610f050dcac8b3f3e1e638c0a722e118a3443b205bb23e24fff7e5 -size 705888 diff --git a/patch-2.7.1.tar.xz b/patch-2.7.1.tar.xz new file mode 100644 index 0000000..feb85ba --- /dev/null +++ b/patch-2.7.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9124ba46db0abd873d0995c2ca880e81252676bb6c03e0a37dfc5f608a9b0ceb +size 675896 diff --git a/patch-revert-e0f70752.patch b/patch-revert-e0f70752.patch deleted file mode 100644 index a0b7180..0000000 --- a/patch-revert-e0f70752.patch +++ /dev/null @@ -1,64 +0,0 @@ -References: bnc#755136 - -Revert upstream commit e0f707523cab26f74ec23f4a20a27add8702ed5b. - ---- patch-2.6.1.136-31a7.orig/src/pch.c -+++ patch-2.6.1.136-31a7/src/pch.c -@@ -379,18 +379,11 @@ skip_hex_digits (char const *str) - static bool - name_is_valid (char const *name) - { -- static char const *bad[2]; -- char const *n; -- -- if (bad[0] && ! strcmp (bad[0], name)) -- return false; -- if (bad[1] && ! strcmp (bad[1], name)) -- return false; -+ const char *n = name; - - if (IS_ABSOLUTE_FILE_NAME (name)) - { - say ("Ignoring potentially dangerous file name %s\n", quotearg (name)); -- bad[!! bad[0]] = name; - return false; - } - for (n = name; *n; ) -@@ -398,7 +391,6 @@ name_is_valid (char const *name) - if (*n == '.' && *++n == '.' && ( ! *++n || ISSLASH (*n))) - { - say ("Ignoring potentially dangerous file name %s\n", quotearg (name)); -- bad[!! bad[0]] = name; - return false; - } - while (*n && ! ISSLASH (*n)) ---- patch-2.6.1.136-31a7.orig/tests/bad-filenames -+++ patch-2.6.1.136-31a7/tests/bad-filenames -@@ -114,27 +114,3 @@ echo 1 > g - check 'patch -f -p1 --dry-run < d.diff || echo status: $?' < d.diff <