bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-tar] Bug introduced in tar master for -T option


From: Richard Purdie
Subject: [Bug-tar] Bug introduced in tar master for -T option
Date: Mon, 13 Jul 2015 11:18:44 +0100

dpkg-deb runs commands like:

"tar -cf - --format=gnu --null --no-unquote -T - --no-recursion"

however after the addition of:
http://git.savannah.gnu.org/cgit/tar.git/commit/?id=163e96a0e619a900eab6de827c7c5749ecc9d3f2
("Bugfix: entries read from the -T file did not get proper matching_flag.")

the command doesn't work, only:

"tar -cf - --format=gnu --null --no-unquote --no-recursion -T -"

works. I've included a test case below which works before this change
but not after. The patch is starting to make it into distros like
Fedora22 and leads to really weird archives (the same files referenced
multiple times, hardlinked to each other).

Hopefully this should be easily fixed.

Cheers,

Richard

diff --git a/tests/Makefile.am b/tests/Makefile.am
index c71d294..1aa17fa 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -48,6 +48,7 @@ TESTSUITE_AT = \
  T-empty.at\
  T-null.at\
  T-rec.at\
+ T-recurse.at\
  T-zfile.at\
  T-nonl.at\
  T-mult.at\
diff --git a/tests/T-recurse.at b/tests/T-recurse.at
new file mode 100644
index 0000000..f994bd2
--- /dev/null
+++ b/tests/T-recurse.at
@@ -0,0 +1,46 @@
+# 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/>.
+
+# Specifing the --no-recursion option after -T broke post 1.28 in git
+#
+# Reported-by: Richard Purdie <address@hidden>
+
+AT_SETUP([recursive inclusion of files disabled])
+AT_KEYWORDS([T-recurse])
+AT_TAR_CHECK([
+mkdir dir
+genfile -f dir/file1
+genfile -f dir/file2
+mkdir dir2
+genfile -f dir2/file1
+genfile -f dir2/file2
+echo dir > list
+echo dir2/file1 >> list
+tar cf archive -T - --no-recursion <list
+rm -rf dir
+rm -rf dir2
+tar xfv archive
+],
+[0],
+[dir/
+dir2/file1
+])
+AT_CLEANUP
+
diff --git a/tests/testsuite.at b/tests/testsuite.at
index f28e86c..c18c556 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -200,6 +200,7 @@ AT_BANNER([The -T option])
 m4_include([T-mult.at])
 m4_include([T-nest.at])
 m4_include([T-rec.at])
+m4_include([T-recurse.at])
 m4_include([T-cd.at])
 m4_include([T-empty.at])
 m4_include([T-null.at])





reply via email to

[Prev in Thread] Current Thread [Next in Thread]