summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/files/symbolic-links/cruft-unsafe-symlinks/build-spec/pre-build
diff options
context:
space:
mode:
Diffstat (limited to 't/recipes/checks/files/symbolic-links/cruft-unsafe-symlinks/build-spec/pre-build')
-rwxr-xr-xt/recipes/checks/files/symbolic-links/cruft-unsafe-symlinks/build-spec/pre-build12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/recipes/checks/files/symbolic-links/cruft-unsafe-symlinks/build-spec/pre-build b/t/recipes/checks/files/symbolic-links/cruft-unsafe-symlinks/build-spec/pre-build
new file mode 100755
index 0000000..dfc51e8
--- /dev/null
+++ b/t/recipes/checks/files/symbolic-links/cruft-unsafe-symlinks/build-spec/pre-build
@@ -0,0 +1,12 @@
+#!/bin/sh
+SOURCE_ROOT="$1"
+LINK_TARGET=non-existent/path/lintian-should-not-open
+
+
+mkdir -p "$SOURCE_ROOT/bad-symlinks" "$SOURCE_ROOT/tests/"
+ln -s "../../$LINK_TARGET" "$SOURCE_ROOT/bad-symlinks/relative-escape"
+ln -s "/../../$LINK_TARGET" "$SOURCE_ROOT/bad-symlinks/absolute-escape"
+
+# Lintian no longer ignores these
+ln -s "../../$LINK_TARGET" "$SOURCE_ROOT/tests/relative-escape-from-tests"
+ln -s "/../../$LINK_TARGET" "$SOURCE_ROOT/tests/absolute-escape-from-tests"