summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Buchert <tomasz@debian.org>2019-01-23 23:23:36 +0100
committerTomasz Buchert <tomasz@debian.org>2019-01-23 23:23:36 +0100
commitb3c08a61523ea255322e185ff4f2ed09faaab7a7 (patch)
tree6050b0763dd17ebeda9997eef60babd1fbb72733
parente553d59585e946b515ea77326ffa8276f1d743fa (diff)
unquote filenames (closes: #902115)
-rw-r--r--debian/tests/control2
-rwxr-xr-xpristine-tar2
-rw-r--r--test/samples/tarballs/systemd_239.orig.tar.gzbin0 -> 400 bytes
-rw-r--r--test/test_roundtrip.sh4
4 files changed, 6 insertions, 2 deletions
diff --git a/debian/tests/control b/debian/tests/control
index 9ba67c0..e2defc1 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,3 +1,3 @@
Tests: xdelta xdelta3 regression-tests
-Depends: @, shunit2, git, moreutils
+Depends: git, moreutils, shunit2, @
Restrictions: needs-recommends
diff --git a/pristine-tar b/pristine-tar
index c5de937..0fe132e 100755
--- a/pristine-tar
+++ b/pristine-tar
@@ -664,7 +664,7 @@ sub genmanifest {
chomp;
# ./ or / in the manifest just confuses tar
s/^\.?\/+//;
- print OUT "$_\n" if length $_;
+ print OUT unquote_filename($_) . "\n" if length $_;
}
close IN;
close OUT;
diff --git a/test/samples/tarballs/systemd_239.orig.tar.gz b/test/samples/tarballs/systemd_239.orig.tar.gz
new file mode 100644
index 0000000..120efb6
--- /dev/null
+++ b/test/samples/tarballs/systemd_239.orig.tar.gz
Binary files differ
diff --git a/test/test_roundtrip.sh b/test/test_roundtrip.sh
index 9479c44..ab6c240 100644
--- a/test/test_roundtrip.sh
+++ b/test/test_roundtrip.sh
@@ -55,4 +55,8 @@ test_gz_16_rsyncable() {
assertWorksWithTarball $SAMPLES/tarballs/libinotify-kqueue-1.6rsyncable_20120419.orig.tar.gz
}
+test_escaping() {
+ assertWorksWithTarball $SAMPLES/tarballs/systemd_239.orig.tar.gz
+}
+
. shunit2