summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/files/hierarchy/standard/files-tar-traps
diff options
context:
space:
mode:
Diffstat (limited to 't/recipes/checks/files/hierarchy/standard/files-tar-traps')
-rw-r--r--t/recipes/checks/files/hierarchy/standard/files-tar-traps/build-spec/debian/dirs1
-rw-r--r--t/recipes/checks/files/hierarchy/standard/files-tar-traps/build-spec/debian/install1
-rw-r--r--t/recipes/checks/files/hierarchy/standard/files-tar-traps/build-spec/fill-values3
-rwxr-xr-xt/recipes/checks/files/hierarchy/standard/files-tar-traps/build-spec/pre-build28
-rw-r--r--t/recipes/checks/files/hierarchy/standard/files-tar-traps/eval/desc2
-rw-r--r--t/recipes/checks/files/hierarchy/standard/files-tar-traps/eval/hints8
6 files changed, 43 insertions, 0 deletions
diff --git a/t/recipes/checks/files/hierarchy/standard/files-tar-traps/build-spec/debian/dirs b/t/recipes/checks/files/hierarchy/standard/files-tar-traps/build-spec/debian/dirs
new file mode 100644
index 0000000..8c0b6f0
--- /dev/null
+++ b/t/recipes/checks/files/hierarchy/standard/files-tar-traps/build-spec/debian/dirs
@@ -0,0 +1 @@
+/strangename
diff --git a/t/recipes/checks/files/hierarchy/standard/files-tar-traps/build-spec/debian/install b/t/recipes/checks/files/hierarchy/standard/files-tar-traps/build-spec/debian/install
new file mode 100644
index 0000000..e85577a
--- /dev/null
+++ b/t/recipes/checks/files/hierarchy/standard/files-tar-traps/build-spec/debian/install
@@ -0,0 +1 @@
+strangename strangename
diff --git a/t/recipes/checks/files/hierarchy/standard/files-tar-traps/build-spec/fill-values b/t/recipes/checks/files/hierarchy/standard/files-tar-traps/build-spec/fill-values
new file mode 100644
index 0000000..11058e5
--- /dev/null
+++ b/t/recipes/checks/files/hierarchy/standard/files-tar-traps/build-spec/fill-values
@@ -0,0 +1,3 @@
+Skeleton: upload-native
+Testname: files-tar-traps
+Description: Test tags for tar common bugs
diff --git a/t/recipes/checks/files/hierarchy/standard/files-tar-traps/build-spec/pre-build b/t/recipes/checks/files/hierarchy/standard/files-tar-traps/build-spec/pre-build
new file mode 100755
index 0000000..bbc0e83
--- /dev/null
+++ b/t/recipes/checks/files/hierarchy/standard/files-tar-traps/build-spec/pre-build
@@ -0,0 +1,28 @@
+#!/bin/sh
+dir="$1/strangename"
+mkdir -p "$dir"
+
+# All file names are quoted twice, once for the shell and once for tar
+# (-T)
+
+# File named <quote><backslash><space>
+echo "foo" > "$dir/'\\ "
+# File named <backslash>
+echo "bar" > "$dir/\\"
+# File named <backslash><backslash>
+# - causes md5sums-lists-nonexistent-file
+echo "bar" > "$dir/\\\\"
+
+# File named a<backslash><backslash>b
+# - causes md5sums-lists-nonexistent-file
+echo "bar" > "$dir/a\\\\b"
+
+# Symlink to file named a<backslash><backslash>b
+ln -s 'a\\b' "$dir/link-to-weird-file1"
+
+# Because the above is not insane enough...
+# If Lintian gets this wrong, it will become an
+# "unsafe-symlink".
+mkdir -p "$dir/\\.\\./\\.\\."
+echo "golf" > "$dir/\\.\\./\\.\\./\\.\\."
+ln -s '\.\./\.\./\.\.' "$dir/some-file"
diff --git a/t/recipes/checks/files/hierarchy/standard/files-tar-traps/eval/desc b/t/recipes/checks/files/hierarchy/standard/files-tar-traps/eval/desc
new file mode 100644
index 0000000..78b5d4b
--- /dev/null
+++ b/t/recipes/checks/files/hierarchy/standard/files-tar-traps/eval/desc
@@ -0,0 +1,2 @@
+Testname: files-tar-traps
+Check: files/hierarchy/standard
diff --git a/t/recipes/checks/files/hierarchy/standard/files-tar-traps/eval/hints b/t/recipes/checks/files/hierarchy/standard/files-tar-traps/eval/hints
new file mode 100644
index 0000000..8ed0726
--- /dev/null
+++ b/t/recipes/checks/files/hierarchy/standard/files-tar-traps/eval/hints
@@ -0,0 +1,8 @@
+files-tar-traps (binary): non-standard-toplevel-dir [strangename/]
+files-tar-traps (binary): file-in-unusual-dir [strangename/strangename/some-file]
+files-tar-traps (binary): file-in-unusual-dir [strangename/strangename/link-to-weird-file1]
+files-tar-traps (binary): file-in-unusual-dir [strangename/strangename/a\\b]
+files-tar-traps (binary): file-in-unusual-dir [strangename/strangename/\]
+files-tar-traps (binary): file-in-unusual-dir [strangename/strangename/\\]
+files-tar-traps (binary): file-in-unusual-dir [strangename/strangename/\.\./\.\./\.\.]
+files-tar-traps (binary): file-in-unusual-dir [strangename/strangename/'\ ]