summaryrefslogtreecommitdiffstats
path: root/t/templates
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:42:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:42:30 +0000
commit75808db17caf8b960b351e3408e74142f4c85aac (patch)
tree7989e9c09a4240248bf4658a22208a0a52d991c4 /t/templates
parentInitial commit. (diff)
downloadlintian-75808db17caf8b960b351e3408e74142f4c85aac.tar.xz
lintian-75808db17caf8b960b351e3408e74142f4c85aac.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/templates')
-rw-r--r--t/templates/binary-control/control.in12
-rw-r--r--t/templates/changes-simple-filler/Makefile.in17
-rw-r--r--t/templates/changes-simple-filler/fill-values.d/changes-simple-filler.values2
-rw-r--r--t/templates/deb-make-builder/Makefile.in121
-rw-r--r--t/templates/deb-make-builder/control-members2
-rw-r--r--t/templates/deb-make-builder/deb-members3
-rw-r--r--t/templates/deb-make-builder/fill-values.d/deb-make-builder.values2
-rw-r--r--t/templates/deb-make-builder/members/debian-binary1
-rwxr-xr-xt/templates/deb-make-builder/tar-control13
-rwxr-xr-xt/templates/deb-make-builder/tar-data7
-rw-r--r--t/templates/debian-extra-non-native/upstream/metadata2
-rw-r--r--t/templates/debian-extra-non-native/watch2
-rw-r--r--t/templates/debian-native/changelog.in17
-rw-r--r--t/templates/debian-native/control.in19
-rw-r--r--t/templates/debian-native/copyright29
-rwxr-xr-xt/templates/debian-native/rules13
-rw-r--r--t/templates/debian-native/source/format.in1
-rw-r--r--t/templates/debian-native/tests/control1
-rwxr-xr-xt/templates/debian-native/tests/test2
-rw-r--r--t/templates/lintian-invocation/fill-values.d/lintian-invocation.values1
-rw-r--r--t/templates/mandatory-docs/changelog.in17
-rw-r--r--t/templates/mandatory-docs/copyright29
-rw-r--r--t/templates/source-make-builder/Makefile.in86
-rw-r--r--t/templates/source-make-builder/fill-values.d/source-make-builder.values3
-rwxr-xr-xt/templates/source-make-builder/tar-orig8
-rw-r--r--t/templates/test-runner-tags/generic.t42
-rw-r--r--t/templates/upload-make-builder/Makefile.in90
-rw-r--r--t/templates/upload-make-builder/fill-values.d/upload-make-builder.values4
28 files changed, 546 insertions, 0 deletions
diff --git a/t/templates/binary-control/control.in b/t/templates/binary-control/control.in
new file mode 100644
index 0000000..7d912d8
--- /dev/null
+++ b/t/templates/binary-control/control.in
@@ -0,0 +1,12 @@
+Package: [% $source %]
+Version: [% $version %]
+Architecture: all
+Maintainer: [% $author %]
+Section: [% $section %]
+Priority: optional
+Description: [% $description %]
+ This is a test package designed to exercise some feature or tag of
+ Lintian. It is part of the Lintian test suite and may do very odd
+ things. It should not be installed like a regular package. It may
+ be an empty package.
+
diff --git a/t/templates/changes-simple-filler/Makefile.in b/t/templates/changes-simple-filler/Makefile.in
new file mode 100644
index 0000000..286cc6d
--- /dev/null
+++ b/t/templates/changes-simple-filler/Makefile.in
@@ -0,0 +1,17 @@
+ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+
+product = [% $build_product %]
+
+references = $(ROOT_DIR)/referenced-files
+
+.DEFAULT_GOAL := $(product)
+
+$(product): $(ROOT_DIR)/$(product)
+ if [ -d $(references) ] ; then \
+ cp -rp $(references)/. . ; \
+ fi
+ cp $(ROOT_DIR)/$(product) $(product)
+
+.PHONY: clean
+clean:
+ rm -f $(product)
diff --git a/t/templates/changes-simple-filler/fill-values.d/changes-simple-filler.values b/t/templates/changes-simple-filler/fill-values.d/changes-simple-filler.values
new file mode 100644
index 0000000..5332dd2
--- /dev/null
+++ b/t/templates/changes-simple-filler/fill-values.d/changes-simple-filler.values
@@ -0,0 +1,2 @@
+Build-Product: test.changes
+Build-Command: make -f [% $source_path %]/Makefile
diff --git a/t/templates/deb-make-builder/Makefile.in b/t/templates/deb-make-builder/Makefile.in
new file mode 100644
index 0000000..3a89ab2
--- /dev/null
+++ b/t/templates/deb-make-builder/Makefile.in
@@ -0,0 +1,121 @@
+ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+
+name = [% $source %]
+
+package = $(name).deb
+
+datadir = $(ROOT_DIR)/root
+controldir = $(ROOT_DIR)/DEBIAN
+
+builddir = build
+debiandir = $(builddir)/DEBIAN
+rootdir = $(builddir)/root
+docdir = $(rootdir)/usr/share/doc/$(name)
+
+mandatorydir = $(ROOT_DIR)/doc
+changelogfile = $(mandatorydir)/changelog
+copyrightfile = $(mandatorydir)/copyright
+
+version = [% $version %]
+
+ifeq "$(findstring -, $(version))" ""
+changelogtarget = $(docdir)/changelog
+else
+changelogtarget = $(docdir)/changelog.Debian
+endif
+
+pre_build = $(ROOT_DIR)/pre-build
+pre_data = $(ROOT_DIR)/pre-data
+tar_data = $(ROOT_DIR)/tar-data
+pre_control = $(ROOT_DIR)/pre-control
+tar_control = $(ROOT_DIR)/tar-control
+post_build = $(ROOT_DIR)/post-build
+
+deb_member_source_path = $(ROOT_DIR)/members
+deb_member_build_path = members
+
+debmembers = $(shell tr '\n' ' ' < $(ROOT_DIR)/deb-members)
+controlmembers = $(shell tr '\n' ' ' < $(ROOT_DIR)/control-members)
+
+$(package): fix-perm
+ -mkdir -p $(deb_member_build_path)
+ if [ -d $(deb_member_source_path) \
+ -a $(deb_member_source_path) != $(deb_member_build_path) ] ; then \
+ cp -rp $(deb_member_source_path)/. $(deb_member_build_path) ; \
+ fi
+
+ -mkdir -p $(rootdir)
+ if [ -d $(datadir) ] ; then \
+ cp -rp $(datadir)/. $(rootdir) ; \
+ fi
+
+ if [ -x $(pre_build) ] ; then \
+ $(pre_build) "$(rootdir)" "$(name)" ; \
+ fi
+
+ -mkdir -p $(docdir)
+ -if [ -f $(changelogfile) ] ; then \
+ install --mode 0644 $(changelogfile) $(changelogtarget) ; \
+ gzip -9nf $(changelogtarget) ; \
+ fi
+ if [ -f $(copyrightfile) ] ; then \
+ install --mode 0644 $(copyrightfile) $(docdir) ; \
+ fi
+
+ # pass package name to pre-data script
+ if [ -x $(pre_data) ] ; then \
+ $(pre_data) "$(rootdir)" "$(name)" ; \
+ fi
+
+ if [ -x $(tar_data) ] ; then \
+ $(tar_data) "$(rootdir)" ; \
+ fi
+
+ -mkdir $(debiandir)
+ if [ -d $(controldir) ] ; then \
+ cp -rp $(controldir)/. $(debiandir) ; \
+ fi
+
+ # prevents 'control-file-has-bad-permissions' on CI runners with strange umasks
+ find $(debiandir) -type d -exec chmod 0755 \{\} +
+ find $(debiandir) -type f -exec chmod 0644 \{\} +
+
+ (cd $(rootdir); find . -type f -a -! -ipath etc -exec md5sum -- \{\} +) > $(debiandir)/md5sums
+
+ # pass package name to pre-control script
+ if [ -x $(pre_control) ] ; then \
+ $(pre_control) "$(debiandir)" "$(name)" ; \
+ fi
+ if [ -x $(tar_control) ] ; then \
+ $(tar_control) "$(debiandir)" "$(controlmembers)" ; \
+ fi
+
+ ar rc $(package) $(debmembers)
+
+ # pass package name to post-build script
+ if [ -x $(post_build) ] ; then \
+ $(post_build) "$(name)" ; \
+ fi
+
+
+.PHONY: clean
+clean:
+ rm -f $(package)
+ rm -rf $(builddir)
+
+# If root/ exists, it is because the test ships with it. Since the
+# test may have been checked out (or unpacked) with a "whack umask"
+# (anything but 0022), we reset the permissions to a reasonable
+# default.
+#
+# The contents of the deb usually is not what is tested by this suite
+# (t/tests is preferred for this), so the below merely handles the
+# AVERAGE CASE. Tests that need special permissions (anything but
+# 0644 for files and 0755 for dirs) require manually setting the
+# permissions.
+.PHONY: fix-perm
+fix-perm:
+ if [ -d $(datadir) ] ; then \
+ find $(datadir) -type d | xargs -r chmod 0755 ; \
+ find $(datadir) -type f | xargs -r chmod 0644 ; \
+ fi
diff --git a/t/templates/deb-make-builder/control-members b/t/templates/deb-make-builder/control-members
new file mode 100644
index 0000000..cf97afe
--- /dev/null
+++ b/t/templates/deb-make-builder/control-members
@@ -0,0 +1,2 @@
+control
+md5sums
diff --git a/t/templates/deb-make-builder/deb-members b/t/templates/deb-make-builder/deb-members
new file mode 100644
index 0000000..57c72d4
--- /dev/null
+++ b/t/templates/deb-make-builder/deb-members
@@ -0,0 +1,3 @@
+members/debian-binary
+members/control.tar.gz
+members/data.tar.gz
diff --git a/t/templates/deb-make-builder/fill-values.d/deb-make-builder.values b/t/templates/deb-make-builder/fill-values.d/deb-make-builder.values
new file mode 100644
index 0000000..610b6f6
--- /dev/null
+++ b/t/templates/deb-make-builder/fill-values.d/deb-make-builder.values
@@ -0,0 +1,2 @@
+Build-Product: [% $source %].deb
+Build-Command: fakeroot make --trace -f [% $source_path %]/Makefile DEFAULT_DH_COMPAT=[% $dh_compat_level %]
diff --git a/t/templates/deb-make-builder/members/debian-binary b/t/templates/deb-make-builder/members/debian-binary
new file mode 100644
index 0000000..cd5ac03
--- /dev/null
+++ b/t/templates/deb-make-builder/members/debian-binary
@@ -0,0 +1 @@
+2.0
diff --git a/t/templates/deb-make-builder/tar-control b/t/templates/deb-make-builder/tar-control
new file mode 100755
index 0000000..feb065b
--- /dev/null
+++ b/t/templates/deb-make-builder/tar-control
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+debiandir="$1"
+controlmembers="$2"
+
+tar --create \
+ --owner=root:0 --group=root:0 \
+ --file members/control.tar.gz \
+ --gzip \
+ --directory "$debiandir" \
+ $controlmembers
diff --git a/t/templates/deb-make-builder/tar-data b/t/templates/deb-make-builder/tar-data
new file mode 100755
index 0000000..fcb7dc3
--- /dev/null
+++ b/t/templates/deb-make-builder/tar-data
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -e
+
+rootdir="$1"
+
+tar --create --file members/data.tar.gz --gzip --directory "$rootdir" .
diff --git a/t/templates/debian-extra-non-native/upstream/metadata b/t/templates/debian-extra-non-native/upstream/metadata
new file mode 100644
index 0000000..948ec52
--- /dev/null
+++ b/t/templates/debian-extra-non-native/upstream/metadata
@@ -0,0 +1,2 @@
+Contact: John Doe
+Name: foo \ No newline at end of file
diff --git a/t/templates/debian-extra-non-native/watch b/t/templates/debian-extra-non-native/watch
new file mode 100644
index 0000000..81615fd
--- /dev/null
+++ b/t/templates/debian-extra-non-native/watch
@@ -0,0 +1,2 @@
+# Empty watch file, except for version
+version=3
diff --git a/t/templates/debian-native/changelog.in b/t/templates/debian-native/changelog.in
new file mode 100644
index 0000000..525cea7
--- /dev/null
+++ b/t/templates/debian-native/changelog.in
@@ -0,0 +1,17 @@
+[% $source %] ([% $version %]) [% $distribution %]; urgency=low
+
+ * Lintian Test Suite.
+ * Test: [% $testname %]
+
+ * Suppress "should close ITP bug" messages. (Closes: #123456)
+
+ -- [% $author %] [% $date %]
+
+[% $source %] ([% $prev_version %]) [% $distribution %]; urgency=low
+
+ * Lintian Test Suite.
+ * Test: [% $testname %]
+
+ * Suppress "should close ITP bug" messages. (Closes: #123456)
+
+ -- [% $author %] [% $prev_date %]
diff --git a/t/templates/debian-native/control.in b/t/templates/debian-native/control.in
new file mode 100644
index 0000000..4cc1a12
--- /dev/null
+++ b/t/templates/debian-native/control.in
@@ -0,0 +1,19 @@
+Source: [% $source %]
+Priority: [% $priority %]
+Section: [% $section %]
+Maintainer: [% $author %]
+Standards-Version: [% $standards_version %]
+Build-Depends: [% $build_depends %]
+Rules-Requires-Root: [% $rules_requires_root %]
+Homepage: [% $homepage %]
+
+Package: [% $source %]
+Architecture: [% $package_architecture %]
+Pre-Depends: ${misc:Pre-Depends}
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: [% $description %]
+ This is a test package designed to exercise some feature or tag of
+ Lintian. It is part of the Lintian test suite and may do very odd
+ things. It should not be installed like a regular package.
+ .
+ This package probably has no meaningful contents.
diff --git a/t/templates/debian-native/copyright b/t/templates/debian-native/copyright
new file mode 100644
index 0000000..021a1f3
--- /dev/null
+++ b/t/templates/debian-native/copyright
@@ -0,0 +1,29 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Lintian
+Upstream-Contact: <debian-lint-maint@lists.debian.org>
+Source: http://lintian.debian.org
+Comment: This is part of the testsuite of lintian.
+ See the file debian/copyright
+ in the lintian source directory for more details.
+
+Files: *
+Copyright:
+ 2008 Frank Lichtenheld <djpig@debian.org>
+ 2009 Russ Allbery <rra@debian.org>
+ 2018 Felix Lechner <felix.lechner@lease-up.com>
+License: GPL-2+
+ This program is free software; you may redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+ .
+ This is distributed in the hope that it will be useful, but without
+ any warranty; without even the implied warranty of merchantability or
+ fitness for a particular purpose. See the GNU General Public License
+ for more details.
+ .
+ A copy of the GNU General Public License version 2 is available as
+ /usr/share/common-licenses/GPL-2 in the Debian GNU/Linux distribution
+ or at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+ You can also obtain it by writing to the Free Software Foundation, Inc.,
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/t/templates/debian-native/rules b/t/templates/debian-native/rules
new file mode 100755
index 0000000..4411cbf
--- /dev/null
+++ b/t/templates/debian-native/rules
@@ -0,0 +1,13 @@
+#!/usr/bin/make -f
+
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+
+%:
+ dh $@
+
+# In Ubuntu, dh does not catch this file by default.
+# They have diffed it to reduce the size of packages.
+ifneq (,$(strip $(wildcard Changes)))
+override_dh_installchangelogs:
+ dh_installchangelogs Changes
+endif
diff --git a/t/templates/debian-native/source/format.in b/t/templates/debian-native/source/format.in
new file mode 100644
index 0000000..4fc5420
--- /dev/null
+++ b/t/templates/debian-native/source/format.in
@@ -0,0 +1 @@
+[% $source_format %]
diff --git a/t/templates/debian-native/tests/control b/t/templates/debian-native/tests/control
new file mode 100644
index 0000000..db2fda9
--- /dev/null
+++ b/t/templates/debian-native/tests/control
@@ -0,0 +1 @@
+Tests: test
diff --git a/t/templates/debian-native/tests/test b/t/templates/debian-native/tests/test
new file mode 100755
index 0000000..039e4d0
--- /dev/null
+++ b/t/templates/debian-native/tests/test
@@ -0,0 +1,2 @@
+#!/bin/sh
+exit 0
diff --git a/t/templates/lintian-invocation/fill-values.d/lintian-invocation.values b/t/templates/lintian-invocation/fill-values.d/lintian-invocation.values
new file mode 100644
index 0000000..4fb41b4
--- /dev/null
+++ b/t/templates/lintian-invocation/fill-values.d/lintian-invocation.values
@@ -0,0 +1 @@
+Lintian-Command-Line: --no-user-dirs [% $options %] --profile [% $profile %] --allow-root --no-cfg --exp-output format=[% $output_format %] [% $default_lintian_options %]
diff --git a/t/templates/mandatory-docs/changelog.in b/t/templates/mandatory-docs/changelog.in
new file mode 100644
index 0000000..525cea7
--- /dev/null
+++ b/t/templates/mandatory-docs/changelog.in
@@ -0,0 +1,17 @@
+[% $source %] ([% $version %]) [% $distribution %]; urgency=low
+
+ * Lintian Test Suite.
+ * Test: [% $testname %]
+
+ * Suppress "should close ITP bug" messages. (Closes: #123456)
+
+ -- [% $author %] [% $date %]
+
+[% $source %] ([% $prev_version %]) [% $distribution %]; urgency=low
+
+ * Lintian Test Suite.
+ * Test: [% $testname %]
+
+ * Suppress "should close ITP bug" messages. (Closes: #123456)
+
+ -- [% $author %] [% $prev_date %]
diff --git a/t/templates/mandatory-docs/copyright b/t/templates/mandatory-docs/copyright
new file mode 100644
index 0000000..021a1f3
--- /dev/null
+++ b/t/templates/mandatory-docs/copyright
@@ -0,0 +1,29 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Lintian
+Upstream-Contact: <debian-lint-maint@lists.debian.org>
+Source: http://lintian.debian.org
+Comment: This is part of the testsuite of lintian.
+ See the file debian/copyright
+ in the lintian source directory for more details.
+
+Files: *
+Copyright:
+ 2008 Frank Lichtenheld <djpig@debian.org>
+ 2009 Russ Allbery <rra@debian.org>
+ 2018 Felix Lechner <felix.lechner@lease-up.com>
+License: GPL-2+
+ This program is free software; you may redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+ .
+ This is distributed in the hope that it will be useful, but without
+ any warranty; without even the implied warranty of merchantability or
+ fitness for a particular purpose. See the GNU General Public License
+ for more details.
+ .
+ A copy of the GNU General Public License version 2 is available as
+ /usr/share/common-licenses/GPL-2 in the Debian GNU/Linux distribution
+ or at http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+ You can also obtain it by writing to the Free Software Foundation, Inc.,
+ 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
diff --git a/t/templates/source-make-builder/Makefile.in b/t/templates/source-make-builder/Makefile.in
new file mode 100644
index 0000000..f527523
--- /dev/null
+++ b/t/templates/source-make-builder/Makefile.in
@@ -0,0 +1,86 @@
+ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+
+name = [% $source %]
+version = [% $upstream_version %]
+type = [% $type %]
+
+packagedir = $(name)-$(version)
+underscored = $(name)_$(version)
+
+origdata = $(ROOT_DIR)/orig
+origstem = $(underscored).orig
+
+debiandata = $(ROOT_DIR)/debian
+
+formatfile = $(debiandata)/source/format
+
+watchfile = $(packagedir)/debian/watch
+
+post_clean = $(ROOT_DIR)/post-clean
+pre_orig = $(ROOT_DIR)/pre-orig
+tar_orig = $(ROOT_DIR)/tar-orig
+pre_build = $(ROOT_DIR)/pre-build
+post_build = $(ROOT_DIR)/post-build
+
+product = [% $build_product %]
+
+ifneq (,$(wildcard $(ROOT_DIR)/dpkg-overrides))
+dpkgoverrides = $(shell cat $(ROOT_DIR)/dpkg-overrides)
+endif
+
+ifeq ($(type),native)
+dpkgoptions = -sn
+else
+dpkgoptions = -sp
+endif
+
+.DEFAULT_GOAL := $(product)
+
+$(product):
+ -mkdir -p $(packagedir)
+ if [ -x $(post_clean) ] ; then \
+ $(post_clean) $(packagedir) ; \
+ fi
+
+ mkdir $(origdata) || true
+ cp -rp $(origdata)/. $(packagedir)
+
+ if [ "[% $type %]" != "native" ] ; then \
+ if [ -x $(pre_orig) ] ; then \
+ $(pre_orig) $(shell realpath $(packagedir)) ; \
+ fi ; \
+ if [ -x $(tar_orig) ] ; then \
+ $(tar_orig) $(origstem) $(packagedir) ; \
+ fi ; \
+ if [ -f $(formatfile) ] && grep --quiet "^3\.. (quilt)$$" $(formatfile) ; then \
+ rm -rf $(packagedir)/debian ; \
+ fi ; \
+ fi
+
+ -mkdir -p $(packagedir)/debian
+ if [ -d $(debiandata) ] ; then \
+ cp -rp $(debiandata)/. $(packagedir)/debian ; \
+ fi
+ if [ "[% $type %]" != "native" ] ; then \
+ if [ ! -f $(watchfile) ] ; then \
+ echo '# Empty watch file' > $(watchfile) ; \
+ fi ; \
+ fi
+
+ if [ -x $(pre_build) ] ; then \
+ $(pre_build) $(shell realpath $(packagedir)) ; \
+ fi
+ if [ -f $(formatfile) ] && grep --quiet "^3\.. (quilt)$$" $(formatfile) ; then \
+ dpkg-source $(dpkgoverrides) -b $(packagedir) ; \
+ else \
+ dpkg-source $(dpkgoverrides) $(dpkgoptions) -b $(packagedir) ; \
+ fi
+ if [ -x $(post_build) ] ; then \
+ $(post_build) $(product) ; \
+ fi
+
+
+.PHONY: clean
+clean:
+ rm -rf $(packagedir)
+ rm -f $(underscored)*
diff --git a/t/templates/source-make-builder/fill-values.d/source-make-builder.values b/t/templates/source-make-builder/fill-values.d/source-make-builder.values
new file mode 100644
index 0000000..41e08da
--- /dev/null
+++ b/t/templates/source-make-builder/fill-values.d/source-make-builder.values
@@ -0,0 +1,3 @@
+Build-Product: [% $source %]_[% $version %].dsc
+Build-Command: fakeroot make --trace -f [% $source_path %]/Makefile DEFAULT_DH_COMPAT=[% $dh_compat_level %]
+Default-Build-Depends: debhelper-compat (= [% $dh_compat_level %])
diff --git a/t/templates/source-make-builder/tar-orig b/t/templates/source-make-builder/tar-orig
new file mode 100755
index 0000000..791bca4
--- /dev/null
+++ b/t/templates/source-make-builder/tar-orig
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+set -e
+
+tarstem="$1"
+directory="$2"
+
+tar --create --file "$tarstem.tar.gz" --gzip "$directory"
diff --git a/t/templates/test-runner-tags/generic.t b/t/templates/test-runner-tags/generic.t
new file mode 100644
index 0000000..2dbd03a
--- /dev/null
+++ b/t/templates/test-runner-tags/generic.t
@@ -0,0 +1,42 @@
+#!/usr/bin/perl
+
+# Copyright (C) 2018 Felix Lechner
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, you can find it on the World Wide
+# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
+# MA 02110-1301, USA
+
+use strict;
+use warnings;
+
+BEGIN {
+ die('Cannot find LINTIAN_BASE')
+ unless length $ENV{'LINTIAN_BASE'};
+}
+
+use Cwd qw(realpath);
+use File::Basename qw(dirname);
+use List::Util qw(max);
+
+use lib "$ENV{'LINTIAN_BASE'}/lib";
+
+use Test::Lintian::Run qw(logged_runner);
+use Test::ScriptAge qw(our_modification_epoch perl_modification_epoch);
+
+$ENV{'RUNNER_EPOCH'}= max(our_modification_epoch, perl_modification_epoch);
+
+my $runpath = realpath(dirname($0));
+
+logged_runner($runpath);
diff --git a/t/templates/upload-make-builder/Makefile.in b/t/templates/upload-make-builder/Makefile.in
new file mode 100644
index 0000000..d67f796
--- /dev/null
+++ b/t/templates/upload-make-builder/Makefile.in
@@ -0,0 +1,90 @@
+ROOT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
+
+package = [% $source %]
+upstream_version = [% $upstream_version %]
+type = [% $type %]
+
+packagedir = $(package)-$(upstream_version)
+
+origdata = $(ROOT_DIR)/orig
+origtargz = $(package)_$(upstream_version).orig.tar.gz
+
+debiandata = $(ROOT_DIR)/debian
+formatfile = $(debiandata)/source/format
+
+diffdata = $(ROOT_DIR)/diff
+
+private_key = $(ROOT_DIR)/upstream/private-key.asc
+
+pre_build = $(ROOT_DIR)/pre-build
+post_build = $(ROOT_DIR)/post-build
+pre_upstream = $(ROOT_DIR)/pre-upstream
+
+product = [% $build_product %]
+upload_type = [% $upload_type %]
+
+ifeq ($(upload_type),source)
+extraflags = -S
+else
+extraflags =
+endif
+
+.DEFAULT_GOAL := $(product)
+
+$(product): $(origtargz)
+ if [ -r $(origtargz) -a -r $(private_key) ] ; then \
+ tmpdir=$(shell mktemp -d) ; \
+ gpg --homedir "$$tmpdir" --import $(private_key) ; \
+ gpg --homedir "$$tmpdir" --batch --yes --armor --output $(origtargz).asc \
+ --detach-sign $(origtargz) ; \
+ gpg-connect-agent --homedir "$$tmpdir" KILLAGENT /bye ; \
+ rm -rf "$$tmpdir" ; \
+ fi
+ if [ -d $(diffdata)/. ] ; then \
+ cp -rp $(diffdata)/. $(packagedir) ; \
+ fi
+ if [ -d $(debiandata)/. ] ; then \
+ cp -rp $(debiandata)/. $(packagedir)/debian ; \
+ fi
+
+ if [ -x $(pre_build) ] ; then \
+ $(pre_build) $(shell realpath $(packagedir)) ; \
+ fi
+
+ cd $(packagedir) && dpkg-buildpackage -rfakeroot $(extraflags) -us -uc -d \
+ -iNEVER_MATCH_ANYTHING -INEVER_MATCH_ANYTHING --source-option=--auto-commit
+
+ if [ -x $(post_build) ] ; then \
+ $(post_build) $(shell realpath $(packagedir)) ; \
+ fi
+
+ifeq ($(type),native)
+$(origtargz):
+ -mkdir $(packagedir)
+ if [ -d $(origdata)/. ] ; then \
+ cp -rp $(origdata)/. $(packagedir) ; \
+ fi
+else
+$(origtargz):
+ -mkdir $(packagedir)
+ if [ -d $(origdata)/. ] ; then \
+ cp -rp $(origdata)/. $(packagedir) ; \
+ fi
+
+ if [ -x $(pre_upstream) ] ; then \
+ $(pre_upstream) $(shell realpath $(packagedir)) ; \
+ fi
+
+ tar czf $(origtargz) $(packagedir)
+
+ if [ -f $(formatfile) ] && grep --quiet "^3\.. (quilt)$$" $(formatfile) ; then \
+ rm -rf $(packagedir)/debian ; \
+ fi
+endif
+
+.PHONY: clean
+clean:
+ rm -rf $(packagedir)
+ if [ "$(type)" = "native" ] ; then \
+ rm -f $(origtargz) ; \
+ fi
diff --git a/t/templates/upload-make-builder/fill-values.d/upload-make-builder.values b/t/templates/upload-make-builder/fill-values.d/upload-make-builder.values
new file mode 100644
index 0000000..ec90e55
--- /dev/null
+++ b/t/templates/upload-make-builder/fill-values.d/upload-make-builder.values
@@ -0,0 +1,4 @@
+Upload-Type: [% $host_architecture %]
+Build-Product: [% $source %]_[% $no_epoch %]_[% $upload_type %].changes
+Build-Command: make --trace -f [% $source_path %]/Makefile DEFAULT_DH_COMPAT=[% $dh_compat_level %]
+Default-Build-Depends: debhelper-compat (= [% $dh_compat_level %])