diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:42:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:42:30 +0000 |
commit | 75808db17caf8b960b351e3408e74142f4c85aac (patch) | |
tree | 7989e9c09a4240248bf4658a22208a0a52d991c4 /t/recipes/checks/files/names/files-tar-traps/build-spec | |
parent | Initial commit. (diff) | |
download | lintian-upstream.tar.xz lintian-upstream.zip |
Adding upstream version 2.117.0.upstream/2.117.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/recipes/checks/files/names/files-tar-traps/build-spec')
4 files changed, 33 insertions, 0 deletions
diff --git a/t/recipes/checks/files/names/files-tar-traps/build-spec/debian/dirs b/t/recipes/checks/files/names/files-tar-traps/build-spec/debian/dirs new file mode 100644 index 0000000..8c0b6f0 --- /dev/null +++ b/t/recipes/checks/files/names/files-tar-traps/build-spec/debian/dirs @@ -0,0 +1 @@ +/strangename diff --git a/t/recipes/checks/files/names/files-tar-traps/build-spec/debian/install b/t/recipes/checks/files/names/files-tar-traps/build-spec/debian/install new file mode 100644 index 0000000..e85577a --- /dev/null +++ b/t/recipes/checks/files/names/files-tar-traps/build-spec/debian/install @@ -0,0 +1 @@ +strangename strangename diff --git a/t/recipes/checks/files/names/files-tar-traps/build-spec/fill-values b/t/recipes/checks/files/names/files-tar-traps/build-spec/fill-values new file mode 100644 index 0000000..11058e5 --- /dev/null +++ b/t/recipes/checks/files/names/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/names/files-tar-traps/build-spec/pre-build b/t/recipes/checks/files/names/files-tar-traps/build-spec/pre-build new file mode 100755 index 0000000..bbc0e83 --- /dev/null +++ b/t/recipes/checks/files/names/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" |