Hello community,

here is the log from the commit of package tar.5864 for openSUSE:13.2:Update 
checked in at 2016-11-22 14:57:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:13.2:Update/tar.5864 (Old)
 and      /work/SRC/openSUSE:13.2:Update/.tar.5864.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "tar.5864"

Changes:
--------
New Changes file:

--- /dev/null   2016-10-27 01:54:32.792041256 +0200
+++ /work/SRC/openSUSE:13.2:Update/.tar.5864.new/tar.changes    2016-11-22 
14:57:11.000000000 +0100
@@ -0,0 +1,690 @@
+-------------------------------------------------------------------
+Thu Nov 10 16:38:49 UTC 2016 - kstreit...@suse.com
+
+- add tar-1.28-recursive_files-from.patch to extract files
+  recursively with --files-from [bsc#913058] 
+
+-------------------------------------------------------------------
+Tue Nov  8 17:39:07 UTC 2016 - kstreit...@suse.com
+
+- add tar-1.28-extract_pathname_bypass.patch to fix POINTYFEATHER
+  vulnerability - GNU tar archiver can be tricked into extracting 
+  files and directories in the given destination, regardless of the 
+  path name(s) specified on the command line [bsc#1007188] 
+  [CVE-2016-6321] 
+
+-------------------------------------------------------------------
+Mon Apr 13 10:37:40 UTC 2015 - vci...@suse.com
+
+- Revert tar-recursive--files-from.patch because it causes regression
+  (bnc#918487, bnc#919233)
+
+-------------------------------------------------------------------
+Mon Feb  9 14:00:15 UTC 2015 - vci...@suse.com
+
+- extract files recursively with --files-from (bnc#913058)
+  * added tar-recursive--files-from.patch
+- call autoreconf in %prep
+
+-------------------------------------------------------------------
+Fri Nov 21 15:16:22 UTC 2014 - vci...@suse.com
+
+- compile in ACLs, Xattr and selinux support [boo#906413]
+
+-------------------------------------------------------------------
+Fri Aug 29 19:36:40 UTC 2014 - jeng...@inai.de
+
+- Improve on RPM group classification
+
+-------------------------------------------------------------------
+Sat Aug  2 23:32:30 UTC 2014 - andreas.stie...@gmx.de
+
+- GNU tar 1.28:
+  * New --checkpoint-action=totals
+  * Extended checkpoint format specification
+  * New option --one-top-level
+  * New option --sort
+  * New exclusion options:
+    --exclude-ignore=FILE
+    --exclude-ignore-recursive=FILE
+    --exclude-vcs-ignores
+  * refuses to read input from and write output to a tty
+- packaging changes:
+  * adjust patch for context change: add_readme-tests.patch
+  * remove patch applied upstream:
+    tar-fix_eternal_loop_in_handle_option.patch
+
+-------------------------------------------------------------------
+Mon Jul 28 20:01:53 UTC 2014 - vci...@suse.com
+
+- don't print lone zero blocks warning (bnc#881863)
+  * there are many tar implementations around that create invalid
+    archives with a zero block in the middle
+  * https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=235820
+  * added tar-ignore_lone_zero_blocks.patch from Fedora
+
+-------------------------------------------------------------------
+Wed Mar 26 17:46:39 UTC 2014 - vci...@suse.com
+
+- fix an infinite loop in handle_option (bnc#867919 and bnc#870422)
+  * added tar-fix_eternal_loop_in_handle_option.patch
+
+-------------------------------------------------------------------
+Tue Jan  7 11:09:24 CET 2014 - llipav...@suse.com
+
+- add tests subpackage.
+  * It is the same testsuite that is run during make check.
+  * It is now possible to run it in real system to verify that
+    nothing is broken by incompatible libraries, etc.
+- add add_readme-tests.patch: README for testsuite
+
+-------------------------------------------------------------------
+Tue Nov 19 22:16:18 UTC 2013 - andreas.stie...@gmx.de
+
+- update to 1.27.1
+  * Fix unquoting of file names obtained via the -T option.
+  * Fix GNU long link header timestamp (backward compatibility).
+  * Fix extracting sparse members from star archives.
+
+-------------------------------------------------------------------
+Thu Oct 24 21:57:57 UTC 2013 - andreas.stie...@gmx.de
+
+- update to 1.27
+- bug fixes:
+  * PAX-format sparse archive files no longer restricted to 8 GiB.
+  * adjust diagnostics and output to GNU coding 
+- new features:
+  * The --owner and --group options now accept numeric IDs
+  * restore traditional functionality of --keep-old-files and
+    --skip-old-files, treat existing file as errors for the former
+  * --warning=existing-file gives verbose notice for this
+  * Support for POSIX ACLs, extended attributes and SELinux context
+    --xattrs, --acls and --selinux and their `--no-' counterparts
+    --xattrs-include and --xattrs-exclude allows selective control
+  * Any option taking a command name as its argument now accepts a
+    full command line as well:
+    --checkpoint-action=exec
+    -I, --use-compress-program
+    -F, --info-script
+    --to-command
+  * environment variables supplied to such commands can now be used
+    in the command line itself
+  * New warning control option --warning=[no-]record-size controls
+    display of actual record size, if it differs from the default
+  * New command line option --keep-directory-symlink to disable
+    default behaviour that unlinks exising symbolic link for an
+    extracted directory of the corresponding name
+- packaging changes:
+  * drop tar-1.26-stdio.in.patch, committed upstream
+  * drop config-guess-sub-update.patch, newer version in upstream
+  * verify source signature
+
+-------------------------------------------------------------------
+Thu Aug 22 12:47:33 UTC 2013 - vci...@suse.com
+
+- added fix for paxutils rtapelib which is bundled with tar.
+  the very same fix was added to cpio too (bnc#658031)
+  * paxutils-rtapelib_mtget.patch
+
+-------------------------------------------------------------------
+Fri Apr  5 10:43:39 UTC 2013 - idon...@suse.com
+
+- Add Source URL, see https://en.opensuse.org/SourceUrls 
+
+-------------------------------------------------------------------
+Sat Feb  2 20:38:34 UTC 2013 - sch...@suse.de
+
+- Add config-guess-sub-update.patch:
+  Update config.guess/sub for aarch64
+
+-------------------------------------------------------------------
+Tue Jul 17 08:05:33 UTC 2012 - a...@suse.de
+
+- Fix build failure with undefined gets (glibc 2.16).
+
+-------------------------------------------------------------------
+Wed May 30 13:08:28 UTC 2012 - sweet_...@gmx.de
+
+- avoid automake dependency 
+
+-------------------------------------------------------------------
+Fri Apr 20 19:55:01 UTC 2012 - crrodrig...@opensuse.org
+
+- disable 'runtime checks' in m4/*.m4 that override
+  system calls with custom implementations to workaround
+  very old kernel/libc bugs (dating 2003-2009)
+  we do not ship those buggy components nowdays.
+
+-------------------------------------------------------------------
+Fri Apr 20 15:38:17 UTC 2012 - crrodrig...@opensuse.org
+
+- Switch to default archive type to POSIX.1-2001, which is ten years
+  old and has no limits on filesize,filename length etc.
+
+-------------------------------------------------------------------
+Mon Dec 19 13:43:45 UTC 2011 - tc...@suse.cz
+
+- tar-1.26-remove_O_NONBLOCK.patch:
+  don't use O_NONBLOCK as a flag for read,
+  when file is offline, read with O_NONBLOCK returns EAGAIN,
+  but tar doesn't handle it 
+  (bnc#737331)
+
+-------------------------------------------------------------------
+Sun Oct 30 23:16:20 CET 2011 - dmuel...@suse.de
+
+- disable testsuite on qemu build
+
+-------------------------------------------------------------------
+Wed Oct  5 11:38:57 UTC 2011 - sweet_...@gmx.de
+
+- minor portability fixes
+
+-------------------------------------------------------------------
+Thu Sep 29 11:32:04 UTC 2011 - sweet_...@gmx.de
+
+- spec cleaner, avoid some deprecated macros
+- fix non-utf8-spec-file
+- fix macro-in-comment
+- enable make check
+- remove upstream-fixed/obsolete patches (fortifysourcessigabrt,
+  disable-listed02-test, disable_languages)
+- call help2man inside specfile instead of paching tar's build chain
+
+-------------------------------------------------------------------
+Tue Mar 15 08:18:08 UTC 2011 - pu...@novell.com
+
+- update to tar-1.26 
++++ 493 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:13.2:Update/.tar.5864.new/tar.changes

New:
----
  add_readme-tests.patch
  paxutils-rtapelib_mtget.patch
  tar-1.26-remove_O_NONBLOCK.patch
  tar-1.28-extract_pathname_bypass.patch
  tar-1.28-recursive_files-from.patch
  tar-1.28.tar.bz2
  tar-1.28.tar.bz2.sig
  tar-backup-spec-fix-paths.patch
  tar-ignore_lone_zero_blocks.patch
  tar-recursive--files-from.patch
  tar-wildcards.patch
  tar.changes
  tar.keyring
  tar.spec

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ tar.spec ++++++
#
# spec file for package tar
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


# minimum suse version where the full featured package builds
%define min_suse_ver 1010

Name:           tar
Version:        1.28
Release:        0
Summary:        GNU implementation of tar ((t)ape (ar)chiver)
License:        GPL-3.0+
Group:          Productivity/Archiving/Backup
Url:            http://www.gnu.org/software/tar/
Source0:        http://ftp.gnu.org/gnu/tar/%{name}-%{version}.tar.bz2
Source1:        http://ftp.gnu.org/gnu/tar/%{name}-%{version}.tar.bz2.sig
# http://wwwkeys.pgp.net:11371/pks/lookup?op=get&search=0x3602B07F55D0C732
Source2:        tar.keyring
#
Patch3:         tar-wildcards.patch
Patch6:         tar-backup-spec-fix-paths.patch
Patch7:         tar-1.26-remove_O_NONBLOCK.patch
Patch10:        paxutils-rtapelib_mtget.patch
# don't print warning about zero blocks
# the patch is used in Fedora and Debian
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=235820
Patch11:        tar-ignore_lone_zero_blocks.patch
# The next patch is disabled because it causes a regression:
#https://bugzilla.opensuse.org/show_bug.cgi?id=918487
Patch12:        tar-recursive--files-from.patch
Patch20:        add_readme-tests.patch
Patch21:        tar-1.28-extract_pathname_bypass.patch
Patch22:        tar-1.28-recursive_files-from.patch
%if 0%{?suse_version} >= %min_suse_ver
BuildRequires:  automake
BuildRequires:  help2man
BuildRequires:  libacl-devel
BuildRequires:  libattr-devel
BuildRequires:  libselinux-devel
Recommends:     tar-lang = %{version}
Recommends:     xz
%endif
Requires(pre):  info
Provides:       base:/bin/tar
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%define _bindir  /bin

%description
This package normally also includes the program "rmt", which provides
remote tape drive control. Since there are compatible versions of 'rmt'
in either the 'star' package or the 'dump' package, we didn't put 'rmt'
into this package. If you are planning to use the remote tape features
provided by tar you have to also install the 'dump' or the 'star'
package.

%package backup-scripts
Summary:        Backup scripts
Group:          Productivity/Archiving/Backup
Requires:       %{name} = %{version}

%description backup-scripts
Shell scripts for system backup/restore

%package tests
Summary:        Tests for the package
Group:          Development/Tests
Requires:       %{name} = %{version}

%description tests
Upstream testsuite for the package

%{?lang_package}

%prep
%setup -q
%patch3 -p1
%patch6 -p1
%patch7 -p1
%patch10 -p1
%patch11 -p1
#%patch12 -p1
%patch20 -p1
%patch21 -p0
%patch22 -p1

%build
%define my_cflags -W -Wall -Wpointer-arith -Wstrict-prototypes 
-Wformat-security -Wno-unused-parameter
export CFLAGS="%{optflags} %my_cflags"
export RSH="/usr/bin/rsh"
export DEFAULT_ARCHIVE_FORMAT="POSIX"
autoreconf -fi
%configure \
        gl_cv_func_linkat_follow="yes" \
        --enable-backup-scripts \
        --disable-silent-rules
make %{?_smp_mflags};
cd tests
make genfile
mkdir bin
mv genfile bin
cd -

%check
%if !0%{?qemu_user_space_build:1}
# Checks disabled in qemu because of races happening when we emulate
# multi-threaded programs
make check
%endif

%install
%{?make_install} %{!?make_install:make install DESTDIR=%{buildroot}}
%if 0%{?suse_version} >= %min_suse_ver
install -d -m 755 %{buildroot}/%{_mandir}/man1
help2man ./src/tar --name "The GNU version of the tar archiving utility" -p tar 
\
        | gzip -c > %{buildroot}/%{_mandir}/man1/tar.1.gz
%endif
install -d -m 755 %{buildroot}%{_sysconfdir}/backup
install -D -m 644 scripts/backup-specs 
%{buildroot}%{_sysconfdir}/backup/backup-specs
rm -rf %{buildroot}%{_libexecdir}/rmt
rm -rvf %{buildroot}/%{_mandir}/man8/rmt.8.gz
rm -rvf %{buildroot}/%{_mandir}/man8
rm -f %{buildroot}%{_infodir}/dir
install -d -m 755 %{buildroot}/var/lib/tests
cp -r tests %{buildroot}/var/lib/tests/tar
rm %{buildroot}/var/lib/tests/tar/*.{c,h,o}
rm %{buildroot}/var/lib/tests/tar/package.m4
rm %{buildroot}/var/lib/tests/tar/{atconfig,atlocal,Makefile}*
%find_lang %{name}

%files backup-scripts
%defattr(-,root, root)
%{_sbindir}/backup
%{_sbindir}/restore
%{_libexecdir}/backup.sh
%{_libexecdir}/dump-remind
%dir %{_sysconfdir}/backup
%config(noreplace) %{_sysconfdir}/backup/backup-specs

%if 0%{?lang_package:1}

%files lang -f %{name}.lang

%files tests
%defattr(-,root, root)
/var/lib/tests

%files
%else

%files -f %{name}.lang
%endif
%defattr(-, root, root)
%{_bindir}/tar
%doc README* ABOUT-NLS AUTHORS COPYING NEWS THANKS ChangeLog TODO
%{_infodir}/tar.info*
%if 0%{?suse_version} >= %min_suse_ver
%{_mandir}/man1/tar.1.gz
%endif

%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%clean
rm -rf %{buildroot}

%changelog
++++++ add_readme-tests.patch ++++++
---
 Makefile.in  |    2 +-
 README-tests |   22 ++++++++++++++++++++++
 2 files changed, 23 insertions(+), 1 deletion(-)

Index: tar-1.28/Makefile.in
===================================================================
--- tar-1.28.orig/Makefile.in   2014-07-27 21:33:48.000000000 +0100
+++ tar-1.28/Makefile.in        2014-08-03 00:15:17.000000000 +0100
@@ -141,7 +141,7 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 host_triplet = @host@
-DIST_COMMON = $(srcdir)/Make.rules INSTALL NEWS README AUTHORS \
+DIST_COMMON = $(srcdir)/Make.rules INSTALL NEWS README README-tests AUTHORS \
        ChangeLog THANKS $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
        $(top_srcdir)/configure $(am__configure_deps) \
        $(srcdir)/config.h.in ABOUT-NLS COPYING TODO build-aux/compile \
Index: tar-1.28/README-tests
===================================================================
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
+++ tar-1.28/README-tests       2014-08-03 00:15:17.000000000 +0100
@@ -0,0 +1,22 @@
+Subpackage tar-tests
+====================
+
+The tar-tests package contains the testsuite which is included in tar sources.
+The testsuite is normally run during make phase (make check) and is also
+automatically run when the tar rpm is being build (in %check section of spec
+file).
+
+Normally, there is no reason to need the tar-tests package. It can however be
+used to verify, that tar functions properly in an installed system (e.g. to
+find issues in tar's dependencies, problems with incompatible libraries, etc.).
+
+Testsuite is installed into /var/lib/tests/tar
+
+To run the testsuite:
+
+cd /var/lib/tests/tar
+./testsuite --help # show options
+
+# needed for genfile binary used in tests
+./testsuite AUTOTEST_PATH=/var/lib/tests/tar/bin [other options]
+
++++++ paxutils-rtapelib_mtget.patch ++++++
Index: cpio-2.11/lib/rtapelib.c
===================================================================
--- cpio-2.11.orig/lib/rtapelib.c       2013-07-23 13:18:27.119431054 +0200
+++ cpio-2.11/lib/rtapelib.c    2013-07-23 13:19:35.728188104 +0200
@@ -710,7 +710,7 @@ rmt_ioctl__ (int handle, int operation,
            || (status = get_status (handle), status == -1))
          return -1;
 
-       if (status > sizeof (struct mtop))
+       if (status > sizeof (struct mtget))
          {
            errno = EOVERFLOW;
            return -1;
++++++ tar-1.26-remove_O_NONBLOCK.patch ++++++
Index: tar-1.26/src/tar.c
===================================================================
--- tar-1.26.orig/src/tar.c
+++ tar-1.26/src/tar.c
@@ -2467,10 +2467,14 @@ decode_options (int argc, char **argv)
 
   /* Flags for accessing files to be read from or copied into.  POSIX says
      O_NONBLOCK has unspecified effect on most types of files, but in
-     practice it never harms and sometimes helps.  */
+     practice it never harms and sometimes helps.
+
+     It seems in fact that in practice it never helps and sometimes harms.
+     Removing again.
+   */
   {
     int base_open_flags =
-      (O_BINARY | O_CLOEXEC | O_NOCTTY | O_NONBLOCK
+      (O_BINARY | O_CLOEXEC | O_NOCTTY
        | (dereference_option ? 0 : O_NOFOLLOW)
        | (atime_preserve_option == system_atime_preserve ? O_NOATIME : 0));
     open_read_flags = O_RDONLY | base_open_flags;
++++++ tar-1.28-extract_pathname_bypass.patch ++++++
Index: lib/paxnames.c
===================================================================
--- lib/paxnames.c.orig
+++ lib/paxnames.c
@@ -18,6 +18,7 @@
 #include <system.h>
 #include <hash.h>
 #include <paxlib.h>
+#include <quotearg.h>
 
 
 /* Hash tables of strings.  */
@@ -114,7 +115,15 @@ safer_name_suffix (char const *file_name
       for (p = file_name + prefix_len; *p; )
        {
           if (p[0] == '.' && p[1] == '.' && (ISSLASH (p[2]) || !p[2]))
-           prefix_len = p + 2 - file_name;
+            {
+             static char const *const diagnostic[] =
+             {
+               N_("%s: Member name contains '..'"),
+               N_("%s: Hard link target contains '..'")
+             };
+             FATAL_ERROR ((0, 0, _(diagnostic[link_target]),
+                           quotearg_colon (file_name)));
+           }
 
          do
            {
++++++ tar-1.28-recursive_files-from.patch ++++++
>From http://lists.gnu.org/archive/html/bug-tar/2014-09/msg00009.html

* src/common.h (name_add_file): Change signature.
* src/names.c (name_elt_alloc_matflags): New function.
(name_add_name): Use name_elt_alloc_matflags.
(name_add_file): Take matching flags as third argument.
(read_next_name): Remove trailing slashes.
* src/tar.c (parse_opt): Pass matching_flags to name_add_file.

* tests/T-dir00.at: New file.
* tests/T-dir01.at: New file.
* tests/Makefile.am: Add new testcases.
* tests/testsuite.at: Likewise.
---
 src/common.h       |  2 +-
 src/names.c        | 56 ++++++++++++++++++++++++++++++++++--------------------
 src/tar.c          |  2 +-
 tests/Makefile.am  |  2 ++
 tests/T-dir00.at   | 45 +++++++++++++++++++++++++++++++++++++++++++
 tests/T-dir01.at   | 45 +++++++++++++++++++++++++++++++++++++++++++
 tests/testsuite.at |  2 ++
 7 files changed, 131 insertions(+), 23 deletions(-)
 create mode 100644 tests/T-dir00.at
 create mode 100644 tests/T-dir01.at

Index: tar-1.28/src/common.h
===================================================================
--- tar-1.28.orig/src/common.h  2015-02-09 15:05:47.642772569 +0100
+++ tar-1.28/src/common.h       2015-02-09 15:05:50.076794925 +0100
@@ -725,7 +725,7 @@ int uname_to_uid (char const *uname, uid
 void name_init (void);
 void name_add_name (const char *name, int matching_flags);
 void name_add_dir (const char *name);
-void name_add_file (const char *name, int term);
+void name_add_file (const char *name, int term, int matching_flags);
 void name_term (void);
 const char *name_next (int change_dirs);
 void name_gather (void);
Index: tar-1.28/src/names.c
===================================================================
--- tar-1.28.orig/src/names.c   2015-02-09 15:05:47.642772569 +0100
+++ tar-1.28/src/names.c        2015-02-09 15:05:50.076794925 +0100
@@ -258,6 +258,21 @@ name_elt_alloc (void)
   return elt;
 }
 
+static struct name_elt *
+name_elt_alloc_matflags (int matflags)
+{
+  static int prev_flags = 0; /* FIXME: Or EXCLUDE_ANCHORED? */
+  struct name_elt *ep = name_elt_alloc ();
+  if (prev_flags != matflags)
+    {
+      ep->type = NELT_FMASK;
+      ep->v.matching_flags = matflags;
+      prev_flags = matflags;
+      ep = name_elt_alloc ();
+    }
+  return ep;
+}
+
 static void
 name_list_adjust (void)
 {
@@ -276,20 +291,13 @@ name_list_advance (void)
   free (elt);
 }
 
-/* Add to name_array the file NAME with fnmatch options MATCHING_FLAGS */
+
+/* Add to name_array the file NAME with fnmatch options MATFLAGS */
 void
-name_add_name (const char *name, int matching_flags)
+name_add_name (const char *name, int matflags)
 {
-  static int prev_flags = 0; /* FIXME: Or EXCLUDE_ANCHORED? */
-  struct name_elt *ep = name_elt_alloc ();
+  struct name_elt *ep = name_elt_alloc_matflags (matflags);
 
-  if (prev_flags != matching_flags)
-    {
-      ep->type = NELT_FMASK;
-      ep->v.matching_flags = matching_flags;
-      prev_flags = matching_flags;
-      ep = name_elt_alloc ();
-    }
   ep->type = NELT_NAME;
   ep->v.name = name;
   name_count++;
@@ -305,9 +313,10 @@ name_add_dir (const char *name)
 }
 
 void
-name_add_file (const char *name, int term)
+name_add_file (const char *name, int term, int matflags)
 {
-  struct name_elt *ep = name_elt_alloc ();
+  struct name_elt *ep = name_elt_alloc_matflags (matflags);
+
   ep->type = NELT_FILE;
   ep->v.file.name = name;
   ep->v.file.term = term;
@@ -389,6 +398,15 @@ add_file_id (const char *filename)
   file_id_list = p;
   return 0;
 }
+
+/* Chop trailing slashes.  */
+static void
+chopslash (char *str)
+{
+  char *p = str + strlen (str) - 1;
+  while (p > str && ISSLASH (*p))
+    *p-- = '\0';
+}
 
 enum read_file_list_state  /* Result of reading file name from the list file */
   {
@@ -428,7 +446,7 @@ read_name_from_file (struct name_elt *en
   if (counter == name_buffer_length)
     name_buffer = x2realloc (name_buffer, &name_buffer_length);
   name_buffer[counter] = 0;
-
+  chopslash (name_buffer);
   return (counter == 0 && c == EOF) ? file_list_end : file_list_success;
 }
 
@@ -518,7 +536,6 @@ copy_name (struct name_elt *ep)
 {
   const char *source;
   size_t source_len;
-  char *cursor;
 
   source = ep->v.name;
   source_len = strlen (source);
@@ -536,11 +553,7 @@ copy_name (struct name_elt *ep)
       name_buffer = xmalloc(name_buffer_length + 2);
     }
   strcpy (name_buffer, source);
-
-  /* Zap trailing slashes.  */
-  cursor = name_buffer + strlen (name_buffer) - 1;
-  while (cursor > name_buffer && ISSLASH (*cursor))
-    *cursor-- = '\0';
+  chopslash (name_buffer);
 }
 
 
@@ -553,7 +566,8 @@ static int matching_flags; /* exclude_fn
    the request to change to the given directory.
 
    Entries of type NELT_FMASK cause updates of the matching_flags
-   value. */
+   value.
+*/
 static struct name_elt *
 name_next_elt (int change_dirs)
 {
Index: tar-1.28/src/tar.c
===================================================================
--- tar-1.28.orig/src/tar.c     2015-02-09 15:05:47.642772569 +0100
+++ tar-1.28/src/tar.c  2015-02-09 15:05:50.077794935 +0100
@@ -1641,7 +1641,7 @@ parse_opt (int key, char *arg, struct ar
       break;
 
     case 'T':
-      name_add_file (arg, filename_terminator);
+      name_add_file (arg, filename_terminator, MAKE_INCL_OPTIONS (args));
       /* Indicate we've been given -T option. This is for backward
         compatibility only, so that `tar cfT archive /dev/null will
         succeed */
Index: tar-1.28/tests/Makefile.am
===================================================================
--- tar-1.28.orig/tests/Makefile.am     2015-02-09 15:05:47.642772569 +0100
+++ tar-1.28/tests/Makefile.am  2015-02-09 15:05:50.077794935 +0100
@@ -43,6 +43,8 @@ $(srcdir)/package.m4: $(top_srcdir)/conf
 
 TESTSUITE_AT = \
  T-cd.at\
+ T-dir00.at\
+ T-dir01.at\
  T-empty.at\
  T-null.at\
  T-rec.at\
Index: tar-1.28/tests/T-dir00.at
===================================================================
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
+++ tar-1.28/tests/T-dir00.at   2015-02-09 15:05:50.077794935 +0100
@@ -0,0 +1,45 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2014 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Tar 1.27 and 1.28 did not extract files under directory memberes listed
+# in the file read by --file-from.
+#
+# Reported-by: Jean-Louis Martineau <address@hidden>
+# References: <address@hidden>,
+#             http://lists.gnu.org/archive/html/bug-tar/2014-09/msg00006.html
+
+AT_SETUP([recursive extraction from --files-from])
+AT_KEYWORDS([files-from extract T-dir T-dir00])
+AT_TAR_CHECK([
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir > list
+tar xfTv archive list | sort
+],
+[0],
+[dir/
+dir/file1
+dir/file2
+])
+AT_CLEANUP
+
Index: tar-1.28/tests/T-dir01.at
===================================================================
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
+++ tar-1.28/tests/T-dir01.at   2015-02-09 15:45:52.309679130 +0100
@@ -0,0 +1,45 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2014 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Tar 1.27 and 1.28 did not remove trailing slashes from file names
+# obtained with the --file-from option.
+#
+# Reported-by: Jean-Louis Martineau <address@hidden>
+# References: <address@hidden>,
+#             http://lists.gnu.org/archive/html/bug-tar/2014-09/msg00006.html
+
+AT_SETUP([trailing slash in --files-from])
+AT_KEYWORDS([files-from extract T-dir T-dir01])
+AT_TAR_CHECK([
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir/ > list
+tar xfTv archive list | sort
+],
+[0],
+[dir/
+dir/file1
+dir/file2
+])
+AT_CLEANUP
+
Index: tar-1.28/tests/testsuite.at
===================================================================
--- tar-1.28.orig/tests/testsuite.at    2015-02-09 15:05:47.642772569 +0100
+++ tar-1.28/tests/testsuite.at 2015-02-09 15:05:50.116795293 +0100
@@ -205,6 +205,8 @@ m4_include([T-empty.at])
 m4_include([T-null.at])
 m4_include([T-zfile.at])
 m4_include([T-nonl.at])
+m4_include([T-dir00.at])
+m4_include([T-dir01.at])
 
 AT_BANNER([Various options])
 m4_include([indexfile.at])
++++++ tar-backup-spec-fix-paths.patch ++++++
Index: tar-1.25/scripts/backup-specs
===================================================================
--- tar-1.25.orig/scripts/backup-specs
+++ tar-1.25/scripts/backup-specs
@@ -11,12 +11,12 @@ TAR=/bin/tar
 # (Optional) Path to rsh binary or its equivalent. You may wish to
 # set it to ssh as shown in the example below, to improve security.
 # In this case you will have to use public key authentication.
-RSH=/usr/local/bin/ssh
+RSH=/usr/bin/ssh
 
 # (Optional) Path to rsh binary on remote mashines. This will be
 # passed via --rsh-command option to the remote invocation of
 # tar
-RSH_COMMAND=/usr/local/bin/ssh
+RSH_COMMAND=/usr/bin/ssh
 
 # Name of temporary file to hold volume numbers.  This needs to be accessible
 # by all the machines which have filesystems to be dumped.
++++++ tar-ignore_lone_zero_blocks.patch ++++++
Index: tar-1.26/src/list.c
===================================================================
--- tar-1.26.orig/src/list.c    2011-02-16 23:12:16.000000000 +0100
+++ tar-1.26/src/list.c 2014-06-11 11:48:38.129824435 +0200
@@ -212,6 +212,14 @@ read_and (void (*do_something) (void))
 
          if (!ignore_zeros_option)
            {
+             /*
+              * According to POSIX tar specs, this is wrong, but on the web
+              * there are some tar specs that can trigger this, and some tar
+              * implementations create tars according to that spec.  For now,
+              * let's not be pedantic about issuing the warning.
+              */
+#if 0
+
              char buf[UINTMAX_STRSIZE_BOUND];
 
              status = read_header (&current_header, &current_stat_info,
@@ -221,6 +229,9 @@ read_and (void (*do_something) (void))
              WARNOPT (WARN_ALONE_ZERO_BLOCK,
                       (0, 0, _("A lone zero block at %s"),
                        STRINGIFY_BIGINT (current_block_ordinal (), buf)));
+#endif
+             status = read_header (&current_header, &current_stat_info,
+                                   read_header_auto);
              break;
            }
          status = prev_status;
++++++ tar-recursive--files-from.patch ++++++
>From http://lists.gnu.org/archive/html/bug-tar/2014-09/msg00009.html

* src/common.h (name_add_file): Change signature.
* src/names.c (name_elt_alloc_matflags): New function.
(name_add_name): Use name_elt_alloc_matflags.
(name_add_file): Take matching flags as third argument.
(read_next_name): Remove trailing slashes.
* src/tar.c (parse_opt): Pass matching_flags to name_add_file.

* tests/T-dir00.at: New file.
* tests/T-dir01.at: New file.
* tests/Makefile.am: Add new testcases.
* tests/testsuite.at: Likewise.
---
 src/common.h       |  2 +-
 src/names.c        | 56 ++++++++++++++++++++++++++++++++++--------------------
 src/tar.c          |  2 +-
 tests/Makefile.am  |  2 ++
 tests/T-dir00.at   | 45 +++++++++++++++++++++++++++++++++++++++++++
 tests/T-dir01.at   | 45 +++++++++++++++++++++++++++++++++++++++++++
 tests/testsuite.at |  2 ++
 7 files changed, 131 insertions(+), 23 deletions(-)
 create mode 100644 tests/T-dir00.at
 create mode 100644 tests/T-dir01.at

Index: tar-1.28/src/common.h
===================================================================
--- tar-1.28.orig/src/common.h  2015-02-09 15:05:47.642772569 +0100
+++ tar-1.28/src/common.h       2015-02-09 15:05:50.076794925 +0100
@@ -725,7 +725,7 @@ int uname_to_uid (char const *uname, uid
 void name_init (void);
 void name_add_name (const char *name, int matching_flags);
 void name_add_dir (const char *name);
-void name_add_file (const char *name, int term);
+void name_add_file (const char *name, int term, int matching_flags);
 void name_term (void);
 const char *name_next (int change_dirs);
 void name_gather (void);
Index: tar-1.28/src/names.c
===================================================================
--- tar-1.28.orig/src/names.c   2015-02-09 15:05:47.642772569 +0100
+++ tar-1.28/src/names.c        2015-02-09 15:05:50.076794925 +0100
@@ -258,6 +258,21 @@ name_elt_alloc (void)
   return elt;
 }
 
+static struct name_elt *
+name_elt_alloc_matflags (int matflags)
+{
+  static int prev_flags = 0; /* FIXME: Or EXCLUDE_ANCHORED? */
+  struct name_elt *ep = name_elt_alloc ();
+  if (prev_flags != matflags)
+    {
+      ep->type = NELT_FMASK;
+      ep->v.matching_flags = matflags;
+      prev_flags = matflags;
+      ep = name_elt_alloc ();
+    }
+  return ep;
+}
+
 static void
 name_list_adjust (void)
 {
@@ -276,20 +291,13 @@ name_list_advance (void)
   free (elt);
 }
 
-/* Add to name_array the file NAME with fnmatch options MATCHING_FLAGS */
+
+/* Add to name_array the file NAME with fnmatch options MATFLAGS */
 void
-name_add_name (const char *name, int matching_flags)
+name_add_name (const char *name, int matflags)
 {
-  static int prev_flags = 0; /* FIXME: Or EXCLUDE_ANCHORED? */
-  struct name_elt *ep = name_elt_alloc ();
+  struct name_elt *ep = name_elt_alloc_matflags (matflags);
 
-  if (prev_flags != matching_flags)
-    {
-      ep->type = NELT_FMASK;
-      ep->v.matching_flags = matching_flags;
-      prev_flags = matching_flags;
-      ep = name_elt_alloc ();
-    }
   ep->type = NELT_NAME;
   ep->v.name = name;
   name_count++;
@@ -305,9 +313,10 @@ name_add_dir (const char *name)
 }
 
 void
-name_add_file (const char *name, int term)
+name_add_file (const char *name, int term, int matflags)
 {
-  struct name_elt *ep = name_elt_alloc ();
+  struct name_elt *ep = name_elt_alloc_matflags (matflags);
+
   ep->type = NELT_FILE;
   ep->v.file.name = name;
   ep->v.file.term = term;
@@ -389,6 +398,15 @@ add_file_id (const char *filename)
   file_id_list = p;
   return 0;
 }
+
+/* Chop trailing slashes.  */
+static void
+chopslash (char *str)
+{
+  char *p = str + strlen (str) - 1;
+  while (p > str && ISSLASH (*p))
+    *p-- = '\0';
+}
 
 enum read_file_list_state  /* Result of reading file name from the list file */
   {
@@ -428,7 +446,7 @@ read_name_from_file (struct name_elt *en
   if (counter == name_buffer_length)
     name_buffer = x2realloc (name_buffer, &name_buffer_length);
   name_buffer[counter] = 0;
-
+  chopslash (name_buffer);
   return (counter == 0 && c == EOF) ? file_list_end : file_list_success;
 }
 
@@ -518,7 +536,6 @@ copy_name (struct name_elt *ep)
 {
   const char *source;
   size_t source_len;
-  char *cursor;
 
   source = ep->v.name;
   source_len = strlen (source);
@@ -536,11 +553,7 @@ copy_name (struct name_elt *ep)
       name_buffer = xmalloc(name_buffer_length + 2);
     }
   strcpy (name_buffer, source);
-
-  /* Zap trailing slashes.  */
-  cursor = name_buffer + strlen (name_buffer) - 1;
-  while (cursor > name_buffer && ISSLASH (*cursor))
-    *cursor-- = '\0';
+  chopslash (name_buffer);
 }
 
 
@@ -553,7 +566,8 @@ static int matching_flags; /* exclude_fn
    the request to change to the given directory.
 
    Entries of type NELT_FMASK cause updates of the matching_flags
-   value. */
+   value.
+*/
 static struct name_elt *
 name_next_elt (int change_dirs)
 {
Index: tar-1.28/src/tar.c
===================================================================
--- tar-1.28.orig/src/tar.c     2015-02-09 15:05:47.642772569 +0100
+++ tar-1.28/src/tar.c  2015-02-09 15:05:50.077794935 +0100
@@ -1641,7 +1641,7 @@ parse_opt (int key, char *arg, struct ar
       break;
 
     case 'T':
-      name_add_file (arg, filename_terminator);
+      name_add_file (arg, filename_terminator, MAKE_INCL_OPTIONS (args));
       /* Indicate we've been given -T option. This is for backward
         compatibility only, so that `tar cfT archive /dev/null will
         succeed */
Index: tar-1.28/tests/Makefile.am
===================================================================
--- tar-1.28.orig/tests/Makefile.am     2015-02-09 15:05:47.642772569 +0100
+++ tar-1.28/tests/Makefile.am  2015-02-09 15:05:50.077794935 +0100
@@ -43,6 +43,8 @@ $(srcdir)/package.m4: $(top_srcdir)/conf
 
 TESTSUITE_AT = \
  T-cd.at\
+ T-dir00.at\
+ T-dir01.at\
  T-empty.at\
  T-null.at\
  T-rec.at\
Index: tar-1.28/tests/T-dir00.at
===================================================================
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
+++ tar-1.28/tests/T-dir00.at   2015-02-09 15:05:50.077794935 +0100
@@ -0,0 +1,45 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2014 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Tar 1.27 and 1.28 did not extract files under directory memberes listed
+# in the file read by --file-from.
+#
+# Reported-by: Jean-Louis Martineau <address@hidden>
+# References: <address@hidden>,
+#             http://lists.gnu.org/archive/html/bug-tar/2014-09/msg00006.html
+
+AT_SETUP([recursive extraction from --files-from])
+AT_KEYWORDS([files-from extract T-dir T-dir00])
+AT_TAR_CHECK([
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir > list
+tar xfTv archive list | sort
+],
+[0],
+[dir/
+dir/file1
+dir/file2
+])
+AT_CLEANUP
+
Index: tar-1.28/tests/T-dir01.at
===================================================================
--- /dev/null   1970-01-01 00:00:00.000000000 +0000
+++ tar-1.28/tests/T-dir01.at   2015-02-09 15:45:52.309679130 +0100
@@ -0,0 +1,45 @@
+# Process this file with autom4te to create testsuite. -*- Autotest -*-
+#
+# Test suite for GNU tar.
+# Copyright 2014 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Tar 1.27 and 1.28 did not remove trailing slashes from file names
+# obtained with the --file-from option.
+#
+# Reported-by: Jean-Louis Martineau <address@hidden>
+# References: <address@hidden>,
+#             http://lists.gnu.org/archive/html/bug-tar/2014-09/msg00006.html
+
+AT_SETUP([trailing slash in --files-from])
+AT_KEYWORDS([files-from extract T-dir T-dir01])
+AT_TAR_CHECK([
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+tar cf archive dir
+rm -rf dir
+echo dir/ > list
+tar xfTv archive list | sort
+],
+[0],
+[dir/
+dir/file1
+dir/file2
+])
+AT_CLEANUP
+
Index: tar-1.28/tests/testsuite.at
===================================================================
--- tar-1.28.orig/tests/testsuite.at    2015-02-09 15:05:47.642772569 +0100
+++ tar-1.28/tests/testsuite.at 2015-02-09 15:05:50.116795293 +0100
@@ -205,6 +205,8 @@ m4_include([T-empty.at])
 m4_include([T-null.at])
 m4_include([T-zfile.at])
 m4_include([T-nonl.at])
+m4_include([T-dir00.at])
+m4_include([T-dir01.at])
 
 AT_BANNER([Various options])
 m4_include([indexfile.at])
++++++ tar-wildcards.patch ++++++
Index: tar-1.25/src/names.c
===================================================================
--- tar-1.25.orig/src/names.c
+++ tar-1.25/src/names.c
@@ -970,10 +970,6 @@ collect_and_sort_names (void)
 
       if (name->found_count || name->directory)
        continue;
-      if (name->matching_flags & EXCLUDE_WILDCARDS)
-       /* NOTE: EXCLUDE_ANCHORED is not relevant here */
-       /* FIXME: just skip regexps for now */
-       continue;
       chdir_do (name->change_dir);
 
       if (name->name[0] == 0)

Reply via email to