summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/files/symbolic-links/files-symlinks
diff options
context:
space:
mode:
Diffstat (limited to 't/recipes/checks/files/symbolic-links/files-symlinks')
-rw-r--r--t/recipes/checks/files/symbolic-links/files-symlinks/build-spec/debian/install11
-rw-r--r--t/recipes/checks/files/symbolic-links/files-symlinks/build-spec/debian/rules23
-rw-r--r--t/recipes/checks/files/symbolic-links/files-symlinks/build-spec/fill-values3
-rw-r--r--t/recipes/checks/files/symbolic-links/files-symlinks/build-spec/orig/data-file1
-rw-r--r--t/recipes/checks/files/symbolic-links/files-symlinks/build-spec/orig/pkg.conf1
-rw-r--r--t/recipes/checks/files/symbolic-links/files-symlinks/eval/desc2
-rw-r--r--t/recipes/checks/files/symbolic-links/files-symlinks/eval/hints9
7 files changed, 50 insertions, 0 deletions
diff --git a/t/recipes/checks/files/symbolic-links/files-symlinks/build-spec/debian/install b/t/recipes/checks/files/symbolic-links/files-symlinks/build-spec/debian/install
new file mode 100644
index 0000000..45fcdc1
--- /dev/null
+++ b/t/recipes/checks/files/symbolic-links/files-symlinks/build-spec/debian/install
@@ -0,0 +1,11 @@
+data-file usr/share/lintian/data/
+pkg.conf etc/lintian/
+symlinks/data-file.old usr/share/lintian/data/
+symlinks/etc-lintian* usr/share/
+symlinks/pkg*.conf usr/share/lintian/data/
+symlinks/self-recursive usr/share/lintian/data/
+symlinks/spurious usr/share/lintian/data/
+symlinks/comp-data usr/lib/lintian/data/
+symlinks/1024 usr/lib/lintian/data/
+
+tmp/comp-data.gz usr/share/lintian/data/
diff --git a/t/recipes/checks/files/symbolic-links/files-symlinks/build-spec/debian/rules b/t/recipes/checks/files/symbolic-links/files-symlinks/build-spec/debian/rules
new file mode 100644
index 0000000..7a23a1c
--- /dev/null
+++ b/t/recipes/checks/files/symbolic-links/files-symlinks/build-spec/debian/rules
@@ -0,0 +1,23 @@
+#!/usr/bin/make -f
+
+%:
+ dh $@
+
+override_dh_auto_build:
+ mkdir tmp
+ gzip -n -9c < data-file > tmp/comp-data.gz
+ mkdir symlinks/
+ ln -s ../../../../etc/lintian/pkg.conf symlinks/pkg-old.conf
+ ln -s ../..//..//..//../etc/lintian/pkg.conf symlinks/pkg.conf
+ ln -s /usr/share/lintian/data/data-file symlinks/data-file.old
+ ln -s /etc/lintian/ symlinks/etc-lintian
+ ln -s / symlinks/self-recursive
+ ln -s ../../lintian-old/../lintian/data/data-file symlinks/spurious
+ ln -s ../../../share/lintian/data/comp-data.gz symlinks/comp-data
+ ln -s /var/lib/sbuild/1024 symlinks/1024
+
+override_dh_auto_clean:
+ rm -fr symlinks/ tmp
+
+override_dh_link:
+ # it will fix our symlinks and ruin the test, so skip it.
diff --git a/t/recipes/checks/files/symbolic-links/files-symlinks/build-spec/fill-values b/t/recipes/checks/files/symbolic-links/files-symlinks/build-spec/fill-values
new file mode 100644
index 0000000..69857b1
--- /dev/null
+++ b/t/recipes/checks/files/symbolic-links/files-symlinks/build-spec/fill-values
@@ -0,0 +1,3 @@
+Skeleton: upload-native
+Testname: files-symlinks
+Description: Test tags about symlinks
diff --git a/t/recipes/checks/files/symbolic-links/files-symlinks/build-spec/orig/data-file b/t/recipes/checks/files/symbolic-links/files-symlinks/build-spec/orig/data-file
new file mode 100644
index 0000000..9a50fd7
--- /dev/null
+++ b/t/recipes/checks/files/symbolic-links/files-symlinks/build-spec/orig/data-file
@@ -0,0 +1 @@
+# Some data file. \ No newline at end of file
diff --git a/t/recipes/checks/files/symbolic-links/files-symlinks/build-spec/orig/pkg.conf b/t/recipes/checks/files/symbolic-links/files-symlinks/build-spec/orig/pkg.conf
new file mode 100644
index 0000000..b3138c3
--- /dev/null
+++ b/t/recipes/checks/files/symbolic-links/files-symlinks/build-spec/orig/pkg.conf
@@ -0,0 +1 @@
+# sample config file
diff --git a/t/recipes/checks/files/symbolic-links/files-symlinks/eval/desc b/t/recipes/checks/files/symbolic-links/files-symlinks/eval/desc
new file mode 100644
index 0000000..31be296
--- /dev/null
+++ b/t/recipes/checks/files/symbolic-links/files-symlinks/eval/desc
@@ -0,0 +1,2 @@
+Testname: files-symlinks
+Check: files/symbolic-links
diff --git a/t/recipes/checks/files/symbolic-links/files-symlinks/eval/hints b/t/recipes/checks/files/symbolic-links/files-symlinks/eval/hints
new file mode 100644
index 0000000..c291d39
--- /dev/null
+++ b/t/recipes/checks/files/symbolic-links/files-symlinks/eval/hints
@@ -0,0 +1,9 @@
+files-symlinks (binary): symlink-target-in-build-tree /var/lib/sbuild/1024 [usr/lib/lintian/data/1024]
+files-symlinks (binary): symlink-is-self-recursive / [usr/share/lintian/data/self-recursive]
+files-symlinks (binary): symlink-has-too-many-up-segments ../..//..//..//../etc/lintian/pkg.conf [usr/share/lintian/data/pkg.conf]
+files-symlinks (binary): symlink-has-double-slash ../..//..//..//../etc/lintian/pkg.conf [usr/share/lintian/data/pkg.conf]
+files-symlinks (binary): symlink-ends-with-slash /etc/lintian/ [usr/share/etc-lintian]
+files-symlinks (binary): symlink-contains-spurious-segments ../../lintian-old/../lintian/data/data-file [usr/share/lintian/data/spurious]
+files-symlinks (binary): relative-symlink ../../../../etc/lintian/pkg.conf [usr/share/lintian/data/pkg-old.conf]
+files-symlinks (binary): compressed-symlink-with-wrong-ext ../../../share/lintian/data/comp-data.gz [usr/lib/lintian/data/comp-data]
+files-symlinks (binary): absolute-symlink-in-top-level-folder /usr/share/lintian/data/data-file [usr/share/lintian/data/data-file.old]