summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/scripts/scripts-exec
diff options
context:
space:
mode:
Diffstat (limited to 't/recipes/checks/scripts/scripts-exec')
-rw-r--r--t/recipes/checks/scripts/scripts-exec/build-spec/debian/clean1
-rw-r--r--t/recipes/checks/scripts/scripts-exec/build-spec/debian/install1
-rw-r--r--t/recipes/checks/scripts/scripts-exec/build-spec/debian/manpages1
-rwxr-xr-xt/recipes/checks/scripts/scripts-exec/build-spec/debian/rules22
-rw-r--r--t/recipes/checks/scripts/scripts-exec/build-spec/fill-values3
-rw-r--r--t/recipes/checks/scripts/scripts-exec/build-spec/orig/01-normal-script3
-rw-r--r--t/recipes/checks/scripts/scripts-exec/build-spec/orig/02-no-exec-script3
-rw-r--r--t/recipes/checks/scripts/scripts-exec/build-spec/orig/03-hardlink-script1
-rw-r--r--t/recipes/checks/scripts/scripts-exec/build-spec/orig/04-not-a-script2
-rw-r--r--t/recipes/checks/scripts/scripts-exec/build-spec/orig/script.pod18
-rw-r--r--t/recipes/checks/scripts/scripts-exec/eval/desc2
-rw-r--r--t/recipes/checks/scripts/scripts-exec/eval/hints1
12 files changed, 58 insertions, 0 deletions
diff --git a/t/recipes/checks/scripts/scripts-exec/build-spec/debian/clean b/t/recipes/checks/scripts/scripts-exec/build-spec/debian/clean
new file mode 100644
index 0000000..8f76e67
--- /dev/null
+++ b/t/recipes/checks/scripts/scripts-exec/build-spec/debian/clean
@@ -0,0 +1 @@
+man/
diff --git a/t/recipes/checks/scripts/scripts-exec/build-spec/debian/install b/t/recipes/checks/scripts/scripts-exec/build-spec/debian/install
new file mode 100644
index 0000000..0486c9a
--- /dev/null
+++ b/t/recipes/checks/scripts/scripts-exec/build-spec/debian/install
@@ -0,0 +1 @@
+*-script usr/bin/
diff --git a/t/recipes/checks/scripts/scripts-exec/build-spec/debian/manpages b/t/recipes/checks/scripts/scripts-exec/build-spec/debian/manpages
new file mode 100644
index 0000000..bf519d7
--- /dev/null
+++ b/t/recipes/checks/scripts/scripts-exec/build-spec/debian/manpages
@@ -0,0 +1 @@
+man/*.1
diff --git a/t/recipes/checks/scripts/scripts-exec/build-spec/debian/rules b/t/recipes/checks/scripts/scripts-exec/build-spec/debian/rules
new file mode 100755
index 0000000..ef51115
--- /dev/null
+++ b/t/recipes/checks/scripts/scripts-exec/build-spec/debian/rules
@@ -0,0 +1,22 @@
+#!/usr/bin/make -f
+
+TMP:=debian/$(shell dh_listpackages)/
+%:
+ dh $@
+
+override_dh_fixperms:
+ dh_fixperms
+ chmod 0755 $(TMP)/usr/bin/01-normal-script
+ chmod 0644 $(TMP)/usr/bin/02-no-exec-script
+ rm -f $(TMP)/usr/bin/03-hardlink-script
+ ln $(TMP)/usr/bin/01-normal-script $(TMP)/usr/bin/03-hardlink-script
+ chmod 0755 $(TMP)/usr/bin/04-not-a-script
+
+override_dh_auto_build:
+ mkdir man
+ for FILE in *-script ; do \
+ sed s/@SCRIPT@/$$FILE/g script.pod | \
+ pod2man --name="$$(echo "$$FILE" | tr a-z A-Z )" \
+ --section=1 > man/$$FILE.1 ; \
+ done
+
diff --git a/t/recipes/checks/scripts/scripts-exec/build-spec/fill-values b/t/recipes/checks/scripts/scripts-exec/build-spec/fill-values
new file mode 100644
index 0000000..f442e51
--- /dev/null
+++ b/t/recipes/checks/scripts/scripts-exec/build-spec/fill-values
@@ -0,0 +1,3 @@
+Skeleton: upload-native
+Testname: scripts-exec
+Description: Check for exec bit related issues for scripts
diff --git a/t/recipes/checks/scripts/scripts-exec/build-spec/orig/01-normal-script b/t/recipes/checks/scripts/scripts-exec/build-spec/orig/01-normal-script
new file mode 100644
index 0000000..97fd3b7
--- /dev/null
+++ b/t/recipes/checks/scripts/scripts-exec/build-spec/orig/01-normal-script
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+echo "Hallo world"
diff --git a/t/recipes/checks/scripts/scripts-exec/build-spec/orig/02-no-exec-script b/t/recipes/checks/scripts/scripts-exec/build-spec/orig/02-no-exec-script
new file mode 100644
index 0000000..98b699f
--- /dev/null
+++ b/t/recipes/checks/scripts/scripts-exec/build-spec/orig/02-no-exec-script
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+echo "Goodbye world"
diff --git a/t/recipes/checks/scripts/scripts-exec/build-spec/orig/03-hardlink-script b/t/recipes/checks/scripts/scripts-exec/build-spec/orig/03-hardlink-script
new file mode 100644
index 0000000..e7959bb
--- /dev/null
+++ b/t/recipes/checks/scripts/scripts-exec/build-spec/orig/03-hardlink-script
@@ -0,0 +1 @@
+Not actually installed/tested; just here to ensure manpage is generated.
diff --git a/t/recipes/checks/scripts/scripts-exec/build-spec/orig/04-not-a-script b/t/recipes/checks/scripts/scripts-exec/build-spec/orig/04-not-a-script
new file mode 100644
index 0000000..84cf6d3
--- /dev/null
+++ b/t/recipes/checks/scripts/scripts-exec/build-spec/orig/04-not-a-script
@@ -0,0 +1,2 @@
+# This is not a script nor an ELF executable, but yet it will be marked
+# executable. Tsk tsk tsk.
diff --git a/t/recipes/checks/scripts/scripts-exec/build-spec/orig/script.pod b/t/recipes/checks/scripts/scripts-exec/build-spec/orig/script.pod
new file mode 100644
index 0000000..8ffa2d0
--- /dev/null
+++ b/t/recipes/checks/scripts/scripts-exec/build-spec/orig/script.pod
@@ -0,0 +1,18 @@
+=head1 NAME
+
+@SCRIPT@ - Cool script to do stuff written in some script language.
+
+=head1 SYNOPSIS
+
+@SCRIPT@ --cool-argument
+
+=head1 DESCRIPTION
+
+This script is very awesome and does something you do not even know
+you need.
+
+=head1 AUTHOR
+
+I made this
+
+
diff --git a/t/recipes/checks/scripts/scripts-exec/eval/desc b/t/recipes/checks/scripts/scripts-exec/eval/desc
new file mode 100644
index 0000000..1fc7bcc
--- /dev/null
+++ b/t/recipes/checks/scripts/scripts-exec/eval/desc
@@ -0,0 +1,2 @@
+Testname: scripts-exec
+Check: scripts
diff --git a/t/recipes/checks/scripts/scripts-exec/eval/hints b/t/recipes/checks/scripts/scripts-exec/eval/hints
new file mode 100644
index 0000000..8e17f03
--- /dev/null
+++ b/t/recipes/checks/scripts/scripts-exec/eval/hints
@@ -0,0 +1 @@
+scripts-exec (binary): script-not-executable [usr/bin/02-no-exec-script]