From fa1587b817c0868367c201fa8f79e49dd9352979d2aed2e3c13665ea48f15028 Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Fri, 4 Apr 2014 09:38:55 +0000 Subject: [PATCH] Accepting request 228999 from home:netsroth:branches:Archiving - Fix bnc#785305 * Add patch zip-3.0-nomutilation.patch OBS-URL: https://build.opensuse.org/request/show/228999 OBS-URL: https://build.opensuse.org/package/show/Archiving/zip?expand=0&rev=13 --- zip-3.0-nomutilation.patch | 47 ++++++++++++++++++++++++++++++++++++++ zip.changes | 6 +++++ zip.spec | 4 +++- 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 zip-3.0-nomutilation.patch diff --git a/zip-3.0-nomutilation.patch b/zip-3.0-nomutilation.patch new file mode 100644 index 0000000..ec7b0d8 --- /dev/null +++ b/zip-3.0-nomutilation.patch @@ -0,0 +1,47 @@ +Date: Thu Apr 3 23:00:00 UTC 2014 +From: tbehrens@suse.com + +Don't clobber include/exclude pattern lists by in2ex/ex2in's chopping +off path prefixes. + +--- zip.c~ 2008-07-05 18:34:06.000000000 +0200 ++++ zip.c 2014-04-03 22:38:36.855065116 +0200 +@@ -3217,9 +3217,14 @@ + /* if nothing matches include list then still create an empty archive */ + allow_empty_archive = 1; + case 'x': /* Exclude following files */ ++ { ++ int old_pathput = pathput; ++ pathput = 1; + add_filter((int) option, value); ++ pathput = old_pathput; + free(value); + break; ++ } + #ifdef S_IFLNK + case 'y': /* Store symbolic links as such */ + linkput = 1; break; +@@ -3322,8 +3327,11 @@ + /* just ignore as just marks what follows as non-option arguments */ + + } else if (kk == 6) { ++ int old_pathput = pathput; ++ pathput = 1; + /* value is R pattern */ + add_filter((int)'R', value); ++ pathput = old_pathput; + free(value); + if (first_listarg == 0) { + first_listarg = argnum; +@@ -3387,8 +3395,11 @@ + { + kk = 4; + if (recurse == 2) { ++ int old_pathput = pathput; ++ pathput = 1; + /* reading patterns from stdin */ + add_filter((int)'R', pp); ++ pathput = old_pathput; + } else { + /* file argument now processed later */ + add_name(pp); diff --git a/zip.changes b/zip.changes index 406903d..9b3d315 100644 --- a/zip.changes +++ b/zip.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Apr 3 23:00:00 UTC 2014 - tbehrens@suse.com + +- Fix bnc#785305 + * Add patch zip-3.0-nomutilation.patch + ------------------------------------------------------------------- Fri Apr 5 07:31:51 UTC 2013 - idonmez@suse.com diff --git a/zip.spec b/zip.spec index 1eacda7..56dfd19 100644 --- a/zip.spec +++ b/zip.spec @@ -1,7 +1,7 @@ # # spec file for package zip # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -31,6 +31,7 @@ Patch4: zip-3.0-nonexec-stack.patch Patch5: zip-3.0-optflags.patch Patch6: zip-3.0-tempfile.patch Patch7: zip-notimestamp.patch +Patch8: zip-3.0-nomutilation.patch Provides: crzip = %{version} Obsoletes: crzip < %{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -47,6 +48,7 @@ PKZIP(tm) 2.04g (Phil Katz ZIP) for MS-DOS systems. %patch5 %patch6 %patch7 +%patch8 %build make %{?_smp_mflags} -f unix/Makefile prefix=/usr CC="gcc %{optflags} -DLARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" generic_gcc