summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/debian/watch
diff options
context:
space:
mode:
Diffstat (limited to 't/recipes/checks/debian/watch')
-rw-r--r--t/recipes/checks/debian/watch/changes-upstream-signature-missing/build-spec/debian/upstream/signing-key.asc1
-rw-r--r--t/recipes/checks/debian/watch/changes-upstream-signature-missing/build-spec/fill-values6
-rwxr-xr-xt/recipes/checks/debian/watch/changes-upstream-signature-missing/build-spec/pre-build18
-rw-r--r--t/recipes/checks/debian/watch/changes-upstream-signature-missing/eval/desc3
-rw-r--r--t/recipes/checks/debian/watch/changes-upstream-signature-missing/eval/hints2
-rw-r--r--t/recipes/checks/debian/watch/filenamemangle/build-spec/debian/watch5
-rw-r--r--t/recipes/checks/debian/watch/filenamemangle/build-spec/fill-values3
-rw-r--r--t/recipes/checks/debian/watch/filenamemangle/eval/desc2
-rw-r--r--t/recipes/checks/debian/watch/filenamemangle/eval/hints2
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/README.Debian6
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/changelog.in5
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/compat.in1
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/control.in13
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/copyright24
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/cron.d.ex4
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/dirs2
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/docs1
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/emacsen-install.ex45
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/emacsen-remove.ex15
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/emacsen-startup.ex25
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.default.ex10
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.doc-base.EX22
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/init.d.ex157
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/init.d.lsb.ex296
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/manpage.1.ex59
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/manpage.sgml.ex156
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/manpage.xml.ex291
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/menu.ex2
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/postinst.ex41
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/postrm.ex39
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/preinst.ex37
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/prerm.ex40
-rwxr-xr-xt/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/rules91
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/watch.ex23
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/fill-values7
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/orig/Makefile4
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/orig/README13
-rwxr-xr-xt/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/pre-build.in5
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/eval/desc4
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/eval/hints1
-rw-r--r--t/recipes/checks/debian/watch/generic-dh-make-2008/eval/post-test1
-rw-r--r--t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/README.Debian7
-rw-r--r--t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/changelog.in31
-rw-r--r--t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/control30
-rw-r--r--t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/copyright7
-rwxr-xr-xt/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/rules36
-rw-r--r--t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/watch6
-rw-r--r--t/recipes/checks/debian/watch/legacy-foo++/build-spec/fill-values5
-rw-r--r--t/recipes/checks/debian/watch/legacy-foo++/eval/desc2
-rw-r--r--t/recipes/checks/debian/watch/legacy-foo++/eval/hints1
-rw-r--r--t/recipes/checks/debian/watch/legacy-foo++/eval/post-test1
-rw-r--r--t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/changelog.in57
-rw-r--r--t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/control.in18
-rw-r--r--t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/postinst181
-rw-r--r--t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/postrm47
-rw-r--r--t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/preinst18
-rw-r--r--t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/prerm188
-rwxr-xr-xt/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/rules35
-rw-r--r--t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/triggers4
-rw-r--r--t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/watch11
-rw-r--r--t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/fill-values6
-rw-r--r--t/recipes/checks/debian/watch/legacy-maintainer-scripts/eval/desc2
-rw-r--r--t/recipes/checks/debian/watch/legacy-maintainer-scripts/eval/hints4
-rw-r--r--t/recipes/checks/debian/watch/legacy-maintainer-scripts/eval/post-test1
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/changelog.in41
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/control.in16
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/copyright5
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/00list11
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/00list.sparc1
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/00options1
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch7
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch5
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch7
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/postinst14
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/postrm9
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/preinst15
-rwxr-xr-xt/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/rules105
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/scripts.conffiles6
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/watch8
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/fill-values6
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/csh-foo2
-rwxr-xr-xt/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/envfoo4
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/fish-foo2
-rwxr-xr-xt/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/gccbug.dpatch39
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/guile-bizarre6
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-lsb-broken34
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-lsb-other22
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-no-lsb17
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-skeleton150
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/jruby-broken2
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/lefty-foo2
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/make-foo3
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perl-bizarre-111
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perl-bizarre-27
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perl-bizarre-36
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perlfoo3
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/phpenvfoo7
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/phpfoo7
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/rubyfoo4
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/sh-broken2
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/suidperlfoo3
-rwxr-xr-xt/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/tkfoo31
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/wishfoo4
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/xsession-test3
-rwxr-xr-xt/recipes/checks/debian/watch/legacy-scripts/build-spec/pre-build5
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/eval/desc2
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/eval/hints7
-rw-r--r--t/recipes/checks/debian/watch/legacy-scripts/eval/post-test1
-rw-r--r--t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/build-spec/debian/watch11
-rw-r--r--t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/build-spec/fill-values4
-rw-r--r--t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/eval/desc2
-rw-r--r--t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/eval/hints1
-rw-r--r--t/recipes/checks/debian/watch/standard/comments-only/build-spec/debian/watch2
-rw-r--r--t/recipes/checks/debian/watch/standard/comments-only/build-spec/fill-values3
-rw-r--r--t/recipes/checks/debian/watch/standard/comments-only/eval/desc7
-rw-r--r--t/recipes/checks/debian/watch/standard/comments-only/eval/hints1
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/README.Debian7
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/changelog.in31
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/control30
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/copyright7
-rwxr-xr-xt/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/rules36
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/watch6
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/fill-values5
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-foo++/eval/desc2
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-foo++/eval/hints1
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-foo++/eval/post-test1
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/changelog.in41
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/control.in16
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/copyright5
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/00list11
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/00list.sparc1
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/00options1
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch7
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch5
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch7
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/postinst14
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/postrm9
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/preinst15
-rwxr-xr-xt/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/rules105
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/scripts.conffiles6
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/watch8
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/fill-values6
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/csh-foo2
-rwxr-xr-xt/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/envfoo4
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/fish-foo2
-rwxr-xr-xt/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/gccbug.dpatch39
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/guile-bizarre6
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-lsb-broken34
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-lsb-other22
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-no-lsb17
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-skeleton150
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/jruby-broken2
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/lefty-foo2
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/make-foo3
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perl-bizarre-111
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perl-bizarre-27
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perl-bizarre-36
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perlfoo3
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/phpenvfoo7
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/phpfoo7
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/rubyfoo4
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/sh-broken2
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/suidperlfoo3
-rwxr-xr-xt/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/tkfoo31
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/wishfoo4
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/xsession-test3
-rwxr-xr-xt/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/pre-build5
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/eval/desc2
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/eval/hints3
-rw-r--r--t/recipes/checks/debian/watch/standard/legacy-scripts/eval/post-test1
-rw-r--r--t/recipes/checks/debian/watch/standard/no-version/build-spec/debian/watch1
-rw-r--r--t/recipes/checks/debian/watch/standard/no-version/build-spec/fill-values3
-rw-r--r--t/recipes/checks/debian/watch/standard/no-version/eval/desc2
-rw-r--r--t/recipes/checks/debian/watch/standard/no-version/eval/hints1
-rw-r--r--t/recipes/checks/debian/watch/standard/version-1/build-spec/debian/watch2
-rw-r--r--t/recipes/checks/debian/watch/standard/version-1/build-spec/fill-values3
-rw-r--r--t/recipes/checks/debian/watch/standard/version-1/eval/desc2
-rw-r--r--t/recipes/checks/debian/watch/standard/version-1/eval/hints1
-rw-r--r--t/recipes/checks/debian/watch/standard/version-2/build-spec/debian/watch2
-rw-r--r--t/recipes/checks/debian/watch/standard/version-2/build-spec/fill-values3
-rw-r--r--t/recipes/checks/debian/watch/standard/version-2/eval/desc2
-rw-r--r--t/recipes/checks/debian/watch/standard/version-2/eval/hints2
-rw-r--r--t/recipes/checks/debian/watch/standard/version-3/build-spec/debian/watch2
-rw-r--r--t/recipes/checks/debian/watch/standard/version-3/build-spec/fill-values3
-rw-r--r--t/recipes/checks/debian/watch/standard/version-3/eval/desc2
-rw-r--r--t/recipes/checks/debian/watch/standard/version-3/eval/hints2
-rw-r--r--t/recipes/checks/debian/watch/standard/version-4/build-spec/debian/watch2
-rw-r--r--t/recipes/checks/debian/watch/standard/version-4/build-spec/fill-values3
-rw-r--r--t/recipes/checks/debian/watch/standard/version-4/eval/desc2
-rw-r--r--t/recipes/checks/debian/watch/standard/version-4/eval/hints1
-rw-r--r--t/recipes/checks/debian/watch/standard/version-5/build-spec/debian/watch2
-rw-r--r--t/recipes/checks/debian/watch/standard/version-5/build-spec/fill-values3
-rw-r--r--t/recipes/checks/debian/watch/standard/version-5/eval/desc2
-rw-r--r--t/recipes/checks/debian/watch/standard/version-5/eval/hints1
-rw-r--r--t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/debian/changelog.in14
-rw-r--r--t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/debian/upstream/signing-key.asc52
-rw-r--r--t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/debian/watch32
-rw-r--r--t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/fill-values4
-rw-r--r--t/recipes/checks/debian/watch/standard/watch-file-general/eval/desc3
-rw-r--r--t/recipes/checks/debian/watch/standard/watch-file-general/eval/hints4
-rw-r--r--t/recipes/checks/debian/watch/two-upstream-components/build-spec/debian/watch6
-rw-r--r--t/recipes/checks/debian/watch/two-upstream-components/build-spec/fill-values3
-rw-r--r--t/recipes/checks/debian/watch/two-upstream-components/eval/desc2
-rw-r--r--t/recipes/checks/debian/watch/two-upstream-components/eval/hints3
-rw-r--r--t/recipes/checks/debian/watch/watch-file-bug-765995/build-spec/debian/upstream/signing-key.asc1
-rw-r--r--t/recipes/checks/debian/watch/watch-file-bug-765995/build-spec/debian/watch4
-rw-r--r--t/recipes/checks/debian/watch/watch-file-bug-765995/build-spec/fill-values4
-rw-r--r--t/recipes/checks/debian/watch/watch-file-bug-765995/eval/desc2
-rw-r--r--t/recipes/checks/debian/watch/watch-file-bug-765995/eval/hints3
-rw-r--r--t/recipes/checks/debian/watch/watch-file-general/build-spec/debian/changelog.in14
-rw-r--r--t/recipes/checks/debian/watch/watch-file-general/build-spec/debian/upstream/signing-key.asc52
-rw-r--r--t/recipes/checks/debian/watch/watch-file-general/build-spec/debian/watch32
-rw-r--r--t/recipes/checks/debian/watch/watch-file-general/build-spec/fill-values4
-rw-r--r--t/recipes/checks/debian/watch/watch-file-general/eval/desc3
-rw-r--r--t/recipes/checks/debian/watch/watch-file-general/eval/hints24
-rw-r--r--t/recipes/checks/debian/watch/watch-file-native/build-spec/debian/watch5
-rw-r--r--t/recipes/checks/debian/watch/watch-file-native/build-spec/fill-values3
-rw-r--r--t/recipes/checks/debian/watch/watch-file-native/eval/desc2
-rw-r--r--t/recipes/checks/debian/watch/watch-file-native/eval/hints2
-rw-r--r--t/recipes/checks/debian/watch/watch-file-old-upstream-version/build-spec/debian/changelog.in14
-rw-r--r--t/recipes/checks/debian/watch/watch-file-old-upstream-version/build-spec/debian/watch3
-rw-r--r--t/recipes/checks/debian/watch/watch-file-old-upstream-version/build-spec/fill-values4
-rw-r--r--t/recipes/checks/debian/watch/watch-file-old-upstream-version/eval/desc2
-rw-r--r--t/recipes/checks/debian/watch/watch-file-old-upstream-version/eval/hints2
-rw-r--r--t/recipes/checks/debian/watch/watch-file-pgpmode-next/build-spec/debian/upstream/signing-key.asc1
-rw-r--r--t/recipes/checks/debian/watch/watch-file-pgpmode-next/build-spec/debian/watch5
-rw-r--r--t/recipes/checks/debian/watch/watch-file-pgpmode-next/build-spec/fill-values4
-rw-r--r--t/recipes/checks/debian/watch/watch-file-pgpmode-next/eval/desc4
-rw-r--r--t/recipes/checks/debian/watch/watch-file-pgpmode-next/eval/hints1
-rw-r--r--t/recipes/checks/debian/watch/watch-file-pgpmode-none/build-spec/debian/watch3
-rw-r--r--t/recipes/checks/debian/watch/watch-file-pgpmode-none/build-spec/fill-values4
-rw-r--r--t/recipes/checks/debian/watch/watch-file-pgpmode-none/eval/desc4
-rw-r--r--t/recipes/checks/debian/watch/watch-file-pgpmode-none/eval/hints1
-rw-r--r--t/recipes/checks/debian/watch/watch-file-prerelease/build-spec/debian/watch3
-rw-r--r--t/recipes/checks/debian/watch/watch-file-prerelease/build-spec/fill-values4
-rw-r--r--t/recipes/checks/debian/watch/watch-file-prerelease/eval/desc2
-rw-r--r--t/recipes/checks/debian/watch/watch-file-prerelease/eval/hints2
-rw-r--r--t/recipes/checks/debian/watch/watch-file-pubkey-missing/build-spec/debian/watch3
-rw-r--r--t/recipes/checks/debian/watch/watch-file-pubkey-missing/build-spec/fill-values4
-rw-r--r--t/recipes/checks/debian/watch/watch-file-pubkey-missing/eval/desc2
-rw-r--r--t/recipes/checks/debian/watch/watch-file-pubkey-missing/eval/hints2
-rw-r--r--t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/build-spec/debian/watch4
-rw-r--r--t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/build-spec/fill-values4
-rw-r--r--t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/eval/desc4
-rw-r--r--t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/eval/hints1
-rw-r--r--t/recipes/checks/debian/watch/watch-file-should-mangle/build-spec/debian/watch11
-rw-r--r--t/recipes/checks/debian/watch/watch-file-should-mangle/build-spec/fill-values4
-rw-r--r--t/recipes/checks/debian/watch/watch-file-should-mangle/eval/desc2
-rw-r--r--t/recipes/checks/debian/watch/watch-file-should-mangle/eval/hints3
-rw-r--r--t/recipes/checks/debian/watch/watch-file-template/build-spec/debian/watch3
-rw-r--r--t/recipes/checks/debian/watch/watch-file-template/build-spec/fill-values3
-rw-r--r--t/recipes/checks/debian/watch/watch-file-template/eval/desc2
-rw-r--r--t/recipes/checks/debian/watch/watch-file-template/eval/hints3
253 files changed, 4064 insertions, 0 deletions
diff --git a/t/recipes/checks/debian/watch/changes-upstream-signature-missing/build-spec/debian/upstream/signing-key.asc b/t/recipes/checks/debian/watch/changes-upstream-signature-missing/build-spec/debian/upstream/signing-key.asc
new file mode 100644
index 0000000..bd03c4e
--- /dev/null
+++ b/t/recipes/checks/debian/watch/changes-upstream-signature-missing/build-spec/debian/upstream/signing-key.asc
@@ -0,0 +1 @@
+Too lazy to fake this file
diff --git a/t/recipes/checks/debian/watch/changes-upstream-signature-missing/build-spec/fill-values b/t/recipes/checks/debian/watch/changes-upstream-signature-missing/build-spec/fill-values
new file mode 100644
index 0000000..c3943fa
--- /dev/null
+++ b/t/recipes/checks/debian/watch/changes-upstream-signature-missing/build-spec/fill-values
@@ -0,0 +1,6 @@
+Testname: changes-upstream-signature-missing
+Skeleton: upload-non-native
+Source-Format: 3.0 (quilt)
+Description: No upstream signature included but package contains a signing key
+Extra-Build-Depends: dpkg (>= 1.18.5)
+# dpkg 1.18.5 required in order to create multiple tarballs with detached signatures
diff --git a/t/recipes/checks/debian/watch/changes-upstream-signature-missing/build-spec/pre-build b/t/recipes/checks/debian/watch/changes-upstream-signature-missing/build-spec/pre-build
new file mode 100755
index 0000000..2d5a158
--- /dev/null
+++ b/t/recipes/checks/debian/watch/changes-upstream-signature-missing/build-spec/pre-build
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+DIR="$1"
+NAME="changes-upstream-signature-missing"
+VERSION="1.0"
+
+# Check all components
+cp ${DIR}/../${NAME}_${VERSION}.orig.tar.gz ${DIR}/../${NAME}_${VERSION}.orig-component.tar.gz
+
+# Don't emit if we have a signature
+cp ${DIR}/../${NAME}_${VERSION}.orig.tar.gz ${DIR}/../${NAME}_${VERSION}.orig-signed.tar.gz
+touch ${DIR}/../${NAME}_${VERSION}.orig-signed.tar.gz.asc
+
+# Don't emit if we have .tar.asc (NB. not a .tar.gz.asc)
+cp ${DIR}/../${NAME}_${VERSION}.orig.tar.gz ${DIR}/../${NAME}_${VERSION}.orig-noext.tar.gz
+touch ${DIR}/../${NAME}_${VERSION}.orig-noext.tar.gz.asc
diff --git a/t/recipes/checks/debian/watch/changes-upstream-signature-missing/eval/desc b/t/recipes/checks/debian/watch/changes-upstream-signature-missing/eval/desc
new file mode 100644
index 0000000..6c8544d
--- /dev/null
+++ b/t/recipes/checks/debian/watch/changes-upstream-signature-missing/eval/desc
@@ -0,0 +1,3 @@
+Testname: changes-upstream-signature-missing
+Check: debian/watch
+# dpkg 1.18.5 required in order to create multiple tarballs with detached signatures
diff --git a/t/recipes/checks/debian/watch/changes-upstream-signature-missing/eval/hints b/t/recipes/checks/debian/watch/changes-upstream-signature-missing/eval/hints
new file mode 100644
index 0000000..a1301ce
--- /dev/null
+++ b/t/recipes/checks/debian/watch/changes-upstream-signature-missing/eval/hints
@@ -0,0 +1,2 @@
+changes-upstream-signature-missing (source): debian-watch-does-not-check-openpgp-signature [debian/watch]
+changes-upstream-signature-missing (source): debian-watch-could-verify-download debian/upstream/signing-key.asc [debian/watch]
diff --git a/t/recipes/checks/debian/watch/filenamemangle/build-spec/debian/watch b/t/recipes/checks/debian/watch/filenamemangle/build-spec/debian/watch
new file mode 100644
index 0000000..c266694
--- /dev/null
+++ b/t/recipes/checks/debian/watch/filenamemangle/build-spec/debian/watch
@@ -0,0 +1,5 @@
+version=4
+opts=\
+ downloadurlmangle=s/\/releases\/tag\/(\d\S+)$/\/archive\/$1\.tar\.gz/,\
+ filenamemangle=s/.+\/tag\/(\d\S+)$/foot-$1\.tar\.gz/ \
+https://codeberg.org/dnkl/foot/releases .*/releases/tag/(\d\S+)
diff --git a/t/recipes/checks/debian/watch/filenamemangle/build-spec/fill-values b/t/recipes/checks/debian/watch/filenamemangle/build-spec/fill-values
new file mode 100644
index 0000000..b0aec17
--- /dev/null
+++ b/t/recipes/checks/debian/watch/filenamemangle/build-spec/fill-values
@@ -0,0 +1,3 @@
+Skeleton: source-non-native
+Testname: filenamemangle
+Description: Option filenamemangle in d/watch
diff --git a/t/recipes/checks/debian/watch/filenamemangle/eval/desc b/t/recipes/checks/debian/watch/filenamemangle/eval/desc
new file mode 100644
index 0000000..9c5d3bc
--- /dev/null
+++ b/t/recipes/checks/debian/watch/filenamemangle/eval/desc
@@ -0,0 +1,2 @@
+Testname: filenamemangle
+Check: debian/watch
diff --git a/t/recipes/checks/debian/watch/filenamemangle/eval/hints b/t/recipes/checks/debian/watch/filenamemangle/eval/hints
new file mode 100644
index 0000000..3cb3be0
--- /dev/null
+++ b/t/recipes/checks/debian/watch/filenamemangle/eval/hints
@@ -0,0 +1,2 @@
+filenamemangle (source): prefer-uscan-symlink filenamemangle s/.+\/tag\/(\d\S+)$/foot-$1\.tar\.gz/ [debian/watch:5]
+filenamemangle (source): debian-watch-does-not-check-openpgp-signature [debian/watch]
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/README.Debian b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/README.Debian
new file mode 100644
index 0000000..69112e6
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/README.Debian
@@ -0,0 +1,6 @@
+generic-dh-make-2008 for Debian
+-------------------------------
+
+<possible notes regarding this package - if none, delete this file>
+
+ -- Russ Allbery <rra@debian.org> Mon, 29 Dec 2008 17:33:59 -0800
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/changelog.in b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/changelog.in
new file mode 100644
index 0000000..8d16a3d
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/changelog.in
@@ -0,0 +1,5 @@
+generic-dh-make-2008 ([% $version %]) [% $distribution %]; urgency=low
+
+ * Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
+
+ -- Russ Allbery <rra@debian.org> Mon, 29 Dec 2008 17:33:59 -0800
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/compat.in b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/compat.in
new file mode 100644
index 0000000..640a566
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/compat.in
@@ -0,0 +1 @@
+[% $dh_compat_level %]
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/control.in b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/control.in
new file mode 100644
index 0000000..a668392
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/control.in
@@ -0,0 +1,13 @@
+Source: generic-dh-make-2008
+Section: unknown
+Priority: optional
+Maintainer: Russ Allbery <rra@debian.org>
+Build-Depends: debhelper (>= 7)
+Standards-Version: 3.7.3
+Homepage: <insert the upstream URL, if relevant>
+
+Package: generic-dh-make-2008
+Architecture: [% $package_architecture %]
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: <insert up to 60 chars description>
+ <insert long description, indented with spaces>
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/copyright b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/copyright
new file mode 100644
index 0000000..31b796a
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/copyright
@@ -0,0 +1,24 @@
+This package was debianized by Russ Allbery <rra@debian.org> on
+Mon, 29 Dec 2008 17:33:59 -0800.
+
+It was downloaded from <url://example.com>
+
+Upstream Author(s):
+
+ <put author's name and email here>
+ <likewise for another author>
+
+Copyright:
+
+ <Copyright (C) YYYY Name OfAuthor>
+ <likewise for another author>
+
+License:
+
+ <Put the license of the package here indented by 4 spaces>
+
+The Debian packaging is (C) 2008, Russ Allbery <rra@debian.org> and
+is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
+
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/cron.d.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/cron.d.ex
new file mode 100644
index 0000000..d00b7d0
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/cron.d.ex
@@ -0,0 +1,4 @@
+#
+# Regular cron jobs for the generic-dh-make-2008 package
+#
+0 4 * * * root [ -x /usr/bin/generic-dh-make-2008_maintenance ] && /usr/bin/generic-dh-make-2008_maintenance
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/dirs b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/dirs
new file mode 100644
index 0000000..ca882bb
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/dirs
@@ -0,0 +1,2 @@
+usr/bin
+usr/sbin
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/docs b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/docs
new file mode 100644
index 0000000..e845566
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/docs
@@ -0,0 +1 @@
+README
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/emacsen-install.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/emacsen-install.ex
new file mode 100644
index 0000000..393594b
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/emacsen-install.ex
@@ -0,0 +1,45 @@
+#! /bin/sh -e
+# /usr/lib/emacsen-common/packages/install/generic-dh-make-2008
+
+# Written by Jim Van Zandt <jrv@debian.org>, borrowing heavily
+# from the install scripts for gettext by Santiago Vila
+# <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
+
+FLAVOR=$1
+PACKAGE=generic-dh-make-2008
+
+if [ ${FLAVOR} = emacs ]; then exit 0; fi
+
+echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
+
+#FLAVORTEST=`echo $FLAVOR | cut -c-6`
+#if [ ${FLAVORTEST} = xemacs ] ; then
+# SITEFLAG="-no-site-file"
+#else
+# SITEFLAG="--no-site-file"
+#fi
+FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
+
+ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+# Install-info-altdir does not actually exist.
+# Maybe somebody will write it.
+if test -x /usr/sbin/install-info-altdir; then
+ echo install/${PACKAGE}: install Info links for ${FLAVOR}
+ install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/share/info/${PACKAGE}.info.gz
+fi
+
+install -m 755 -d ${ELCDIR}
+cd ${ELDIR}
+FILES=`echo *.el`
+cp ${FILES} ${ELCDIR}
+cd ${ELCDIR}
+
+cat << EOF > path.el
+(setq load-path (cons "." load-path) byte-compile-warnings nil)
+EOF
+${FLAVOR} ${FLAGS} ${FILES}
+rm -f *.el path.el
+
+exit 0
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/emacsen-remove.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/emacsen-remove.ex
new file mode 100644
index 0000000..c48d194
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/emacsen-remove.ex
@@ -0,0 +1,15 @@
+#!/bin/sh -e
+# /usr/lib/emacsen-common/packages/remove/generic-dh-make-2008
+
+FLAVOR=$1
+PACKAGE=generic-dh-make-2008
+
+if [ ${FLAVOR} != emacs ]; then
+ if test -x /usr/sbin/install-info-altdir; then
+ echo remove/${PACKAGE}: removing Info links for ${FLAVOR}
+ install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/share/info/generic-dh-make-2008.info.gz
+ fi
+
+ echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
+ rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+fi
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/emacsen-startup.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/emacsen-startup.ex
new file mode 100644
index 0000000..b51657a
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/emacsen-startup.ex
@@ -0,0 +1,25 @@
+;; -*-emacs-lisp-*-
+;;
+;; Emacs startup file, e.g. /etc/emacs/site-start.d/50generic-dh-make-2008.el
+;; for the Debian generic-dh-make-2008 package
+;;
+;; Originally contributed by Nils Naumann <naumann@unileoben.ac.at>
+;; Modified by Dirk Eddelbuettel <edd@debian.org>
+;; Adapted for dh-make by Jim Van Zandt <jrv@debian.org>
+
+;; The generic-dh-make-2008 package follows the Debian/GNU Linux 'emacsen' policy and
+;; byte-compiles its elisp files for each 'emacs flavor' (emacs19,
+;; xemacs19, emacs20, xemacs20...). The compiled code is then
+;; installed in a subdirectory of the respective site-lisp directory.
+;; We have to add this to the load-path:
+(let ((package-dir (concat "/usr/share/"
+ (symbol-name flavor)
+ "/site-lisp/generic-dh-make-2008")))
+;; If package-dir does not exist, the generic-dh-make-2008 package must have
+;; removed but not purged, and we should skip the setup.
+ (when (file-directory-p package-dir)
+ (setq load-path (cons package-dir load-path))
+ (autoload 'generic-dh-make-2008-mode "generic-dh-make-2008-mode"
+ "Major mode for editing generic-dh-make-2008 files." t)
+ (add-to-list 'auto-mode-alist '("\\.generic-dh-make-2008$" . generic-dh-make-2008-mode))))
+
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.default.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.default.ex
new file mode 100644
index 0000000..d770c6e
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.default.ex
@@ -0,0 +1,10 @@
+# Defaults for generic-dh-make-2008 initscript
+# sourced by /etc/init.d/generic-dh-make-2008
+# installed at /etc/default/generic-dh-make-2008 by the maintainer scripts
+
+#
+# This is a POSIX shell fragment
+#
+
+# Additional options that are passed to the Daemon.
+DAEMON_OPTS=""
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.doc-base.EX b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.doc-base.EX
new file mode 100644
index 0000000..3b966d1
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.doc-base.EX
@@ -0,0 +1,22 @@
+Document: generic-dh-make-2008
+Title: Debian generic-dh-make-2008 Manual
+Author: <insert document author here>
+Abstract: This manual describes what generic-dh-make-2008 is
+ and how it can be used to
+ manage online manuals on Debian systems.
+Section: unknown
+
+Format: debiandoc-sgml
+Files: /usr/share/doc/generic-dh-make-2008/generic-dh-make-2008.sgml.gz
+
+Format: postscript
+Files: /usr/share/doc/generic-dh-make-2008/generic-dh-make-2008.ps.gz
+
+Format: text
+Files: /usr/share/doc/generic-dh-make-2008/generic-dh-make-2008.text.gz
+
+Format: HTML
+Index: /usr/share/doc/generic-dh-make-2008/html/index.html
+Files: /usr/share/doc/generic-dh-make-2008/html/*.html
+
+
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/init.d.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/init.d.ex
new file mode 100644
index 0000000..b464594
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/init.d.ex
@@ -0,0 +1,157 @@
+#! /bin/sh
+#
+# skeleton example file to build /etc/init.d/ scripts.
+# This file should be used to construct scripts for /etc/init.d.
+#
+# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
+# Modified for Debian
+# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
+# Further changes by Javier Fernandez-Sanguino <jfs@debian.org>
+#
+# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl
+#
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/generic-dh-make-2008
+NAME=generic-dh-make-2008
+DESC=generic-dh-make-2008
+
+test -x $DAEMON || exit 0
+
+LOGDIR=/var/log/generic-dh-make-2008
+PIDFILE=/var/run/$NAME.pid
+DODTIME=1 # Time to wait for the server to die, in seconds
+ # If this value is set too low you might not
+ # let some servers to die gracefully and
+ # 'restart' will not work
+
+# Include generic-dh-make-2008 defaults if available
+if [ -f /etc/default/generic-dh-make-2008 ] ; then
+ . /etc/default/generic-dh-make-2008
+fi
+
+set -e
+
+running_pid()
+{
+ # Check if a given process pid's cmdline matches a given name
+ pid=$1
+ name=$2
+ [ -z "$pid" ] && return 1
+ [ ! -d /proc/$pid ] && return 1
+ cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1`
+ # Is this the expected child?
+ [ "$cmd" != "$name" ] && return 1
+ return 0
+}
+
+running()
+{
+# Check if the process is running looking at /proc
+# (works for all users)
+
+ # No pidfile, probably no daemon present
+ [ ! -f "$PIDFILE" ] && return 1
+ # Obtain the pid and check it against the binary name
+ pid=`cat $PIDFILE`
+ running_pid $pid $DAEMON || return 1
+ return 0
+}
+
+force_stop() {
+# Forcefully kill the process
+ [ ! -f "$PIDFILE" ] && return
+ if running ; then
+ kill -15 $pid
+ # Is it really dead?
+ [ -n "$DODTIME" ] && sleep "$DODTIME"s
+ if running ; then
+ kill -9 $pid
+ [ -n "$DODTIME" ] && sleep "$DODTIME"s
+ if running ; then
+ echo "Cannot kill $LABEL (pid=$pid)!"
+ exit 1
+ fi
+ fi
+ fi
+ rm -f $PIDFILE
+ return 0
+}
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: "
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ --exec $DAEMON -- $DAEMON_OPTS
+ if running ; then
+ echo "$NAME."
+ else
+ echo " ERROR."
+ fi
+ ;;
+ stop)
+ echo -n "Stopping $DESC: "
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+ --exec $DAEMON
+ echo "$NAME."
+ ;;
+ force-stop)
+ echo -n "Forcefully stopping $DESC: "
+ force_stop
+ if ! running ; then
+ echo "$NAME."
+ else
+ echo " ERROR."
+ fi
+ ;;
+ #reload)
+ #
+ # If the daemon can reload its config files on the fly
+ # for example by sending it SIGHUP, do it here.
+ #
+ # If the daemon responds to changes in its config file
+ # directly anyway, make this a do-nothing entry.
+ #
+ # echo "Reloading $DESC configuration files."
+ # start-stop-daemon --stop --signal 1 --quiet --pidfile \
+ # /var/run/$NAME.pid --exec $DAEMON
+ #;;
+ force-reload)
+ #
+ # If the "reload" option is implemented, move the "force-reload"
+ # option to the "reload" entry above. If not, "force-reload" is
+ # just the same as "restart" except that it does nothing if the
+ # daemon isn't already running.
+ # check wether $DAEMON is running. If so, restart
+ start-stop-daemon --stop --test --quiet --pidfile \
+ /var/run/$NAME.pid --exec $DAEMON \
+ && $0 restart \
+ || exit 0
+ ;;
+ restart)
+ echo -n "Restarting $DESC: "
+ start-stop-daemon --stop --quiet --pidfile \
+ /var/run/$NAME.pid --exec $DAEMON
+ [ -n "$DODTIME" ] && sleep $DODTIME
+ start-stop-daemon --start --quiet --pidfile \
+ /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
+ echo "$NAME."
+ ;;
+ status)
+ echo -n "$LABEL is "
+ if running ; then
+ echo "running"
+ else
+ echo " not running."
+ exit 1
+ fi
+ ;;
+ *)
+ N=/etc/init.d/$NAME
+ # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/init.d.lsb.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/init.d.lsb.ex
new file mode 100644
index 0000000..b3559de
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/init.d.lsb.ex
@@ -0,0 +1,296 @@
+#!/bin/sh
+#
+# Example init.d script with LSB support.
+#
+# Please read this init.d carefully and modify the sections to
+# adjust it to the program you want to run.
+#
+# Copyright (c) 2007 Javier Fernandez-Sanguino <jfs@debian.org>
+#
+# This 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.
+#
+# You should have received a copy of the GNU General Public License with
+# the Debian operating system, in /usr/share/common-licenses/GPL; if
+# not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA 02111-1307 USA
+#
+### BEGIN INIT INFO
+# Provides: generic-dh-make-2008
+# Required-Start: $network $local_fs
+# Required-Stop:
+# Should-Start: $named
+# Should-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: <Enter a short description of the sortware>
+# Description: <Enter a long description of the software>
+# <...>
+# <...>
+### END INIT INFO
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+DAEMON=/usr/sbin/generic-dh-make-2008 # Introduce the server's location here
+NAME=#PACKAGE # Introduce the short server's name here
+DESC=#PACKAGE # Introduce a short description here
+LOGDIR=/var/log/generic-dh-make-2008 # Log directory to use
+
+PIDFILE=/var/run/$NAME.pid
+
+test -x $DAEMON || exit 0
+
+. /lib/lsb/init-functions
+
+# Default options, these can be overriden by the information
+# at /etc/default/$NAME
+DAEMON_OPTS="" # Additional options given to the server
+
+DIETIME=10 # Time to wait for the server to die, in seconds
+ # If this value is set too low you might not
+ # let some servers to die gracefully and
+ # 'restart' will not work
+
+#STARTTIME=2 # Time to wait for the server to start, in seconds
+ # If this value is set each time the server is
+ # started (on start or restart) the script will
+ # stall to try to determine if it is running
+ # If it is not set and the server takes time
+ # to setup a pid file the log message might
+ # be a false positive (says it did not start
+ # when it actually did)
+
+LOGFILE=$LOGDIR/$NAME.log # Server logfile
+#DAEMONUSER=generic-dh-make-2008 # Users to run the daemons as. If this value
+ # is set start-stop-daemon will chuid the server
+
+# Include defaults if available
+if [ -f /etc/default/$NAME ] ; then
+ . /etc/default/$NAME
+fi
+
+# Use this if you want the user to explicitly set 'RUN' in
+# /etc/default/
+#if [ "x$RUN" != "xyes" ] ; then
+# log_failure_msg "$NAME disabled, please adjust the configuration to your needs "
+# log_failure_msg "and then set RUN to 'yes' in /etc/default/$NAME to enable it."
+# exit 1
+#fi
+
+# Check that the user exists (if we set a user)
+# Does the user exist?
+if [ -n "$DAEMONUSER" ] ; then
+ if getent passwd | grep -q "^$DAEMONUSER:"; then
+ # Obtain the uid and gid
+ DAEMONUID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $3}'`
+ DAEMONGID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $4}'`
+ else
+ log_failure_msg "The user $DAEMONUSER, required to run $NAME does not exist."
+ exit 1
+ fi
+fi
+
+
+set -e
+
+running_pid() {
+# Check if a given process pid's cmdline matches a given name
+ pid=$1
+ name=$2
+ [ -z "$pid" ] && return 1
+ [ ! -d /proc/$pid ] && return 1
+ cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1`
+ # Is this the expected server
+ [ "$cmd" != "$name" ] && return 1
+ return 0
+}
+
+running() {
+# Check if the process is running looking at /proc
+# (works for all users)
+
+ # No pidfile, probably no daemon present
+ [ ! -f "$PIDFILE" ] && return 1
+ pid=`cat $PIDFILE`
+ running_pid $pid $DAEMON || return 1
+ return 0
+}
+
+start_server() {
+# Start the process using the wrapper
+ if [ -z "$DAEMONUSER" ] ; then
+ start_daemon -p $PIDFILE $DAEMON -- $DAEMON_OPTS
+ errcode=$?
+ else
+# if we are using a daemonuser then change the user id
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ --chuid $DAEMONUSER \
+ --exec $DAEMON -- $DAEMON_OPTS
+ errcode=$?
+ fi
+ return $errcode
+}
+
+stop_server() {
+# Stop the process using the wrapper
+ if [ -z "$DAEMONUSER" ] ; then
+ killproc -p $PIDFILE $DAEMON
+ errcode=$?
+ else
+# if we are using a daemonuser then look for process that match
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+ --user $DAEMONUSER \
+ --exec $DAEMON
+ errcode=$?
+ fi
+
+ return $errcode
+}
+
+reload_server() {
+ [ ! -f "$PIDFILE" ] && return 1
+ pid=pidofproc $PIDFILE # This is the daemon's pid
+ # Send a SIGHUP
+ kill -1 $pid
+ return $?
+}
+
+force_stop() {
+# Force the process to die killing it manually
+ [ ! -e "$PIDFILE" ] && return
+ if running ; then
+ kill -15 $pid
+ # Is it really dead?
+ sleep "$DIETIME"s
+ if running ; then
+ kill -9 $pid
+ sleep "$DIETIME"s
+ if running ; then
+ echo "Cannot kill $NAME (pid=$pid)!"
+ exit 1
+ fi
+ fi
+ fi
+ rm -f $PIDFILE
+}
+
+
+case "$1" in
+ start)
+ log_daemon_msg "Starting $DESC " "$NAME"
+ # Check if it's running first
+ if running ; then
+ log_progress_msg "apparently already running"
+ log_end_msg 0
+ exit 0
+ fi
+ if start_server ; then
+ # NOTE: Some servers might die some time after they start,
+ # this code will detect this issue if STARTTIME is set
+ # to a reasonable value
+ [ -n "$STARTTIME" ] && sleep $STARTTIME # Wait some time
+ if running ; then
+ # It's ok, the server started and is running
+ log_end_msg 0
+ else
+ # It is not running after we did start
+ log_end_msg 1
+ fi
+ else
+ # Either we could not start it
+ log_end_msg 1
+ fi
+ ;;
+ stop)
+ log_daemon_msg "Stopping $DESC" "$NAME"
+ if running ; then
+ # Only stop the server if we see it running
+ errcode=0
+ stop_server || errcode=$?
+ log_end_msg $errcode
+ else
+ # If it's not running don't do anything
+ log_progress_msg "apparently not running"
+ log_end_msg 0
+ exit 0
+ fi
+ ;;
+ force-stop)
+ # First try to stop gracefully the program
+ $0 stop
+ if running; then
+ # If it's still running try to kill it more forcefully
+ log_daemon_msg "Stopping (force) $DESC" "$NAME"
+ errcode=0
+ force_stop || errcode=$?
+ log_end_msg $errcode
+ fi
+ ;;
+ restart|force-reload)
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ errcode=0
+ stop_server || errcode=$?
+ # Wait some sensible amount, some server need this
+ [ -n "$DIETIME" ] && sleep $DIETIME
+ start_server || errcode=$?
+ [ -n "$STARTTIME" ] && sleep $STARTTIME
+ running || errcode=$?
+ log_end_msg $errcode
+ ;;
+ status)
+
+ log_daemon_msg "Checking status of $DESC" "$NAME"
+ if running ; then
+ log_progress_msg "running"
+ log_end_msg 0
+ else
+ log_progress_msg "apparently not running"
+ log_end_msg 1
+ exit 1
+ fi
+ ;;
+ # Use this if the daemon cannot reload
+ reload)
+ log_warning_msg "Reloading $NAME daemon: not implemented, as the daemon"
+ log_warning_msg "cannot re-read the config file (use restart)."
+ ;;
+ # And this if it cann
+ #reload)
+ #
+ # If the daemon can reload its config files on the fly
+ # for example by sending it SIGHUP, do it here.
+ #
+ # If the daemon responds to changes in its config file
+ # directly anyway, make this a do-nothing entry.
+ #
+ # log_daemon_msg "Reloading $DESC configuration files" "$NAME"
+ # if running ; then
+ # reload_server
+ # if ! running ; then
+ # Process died after we tried to reload
+ # log_progress_msg "died on reload"
+ # log_end_msg 1
+ # exit 1
+ # fi
+ # else
+ # log_progress_msg "server is not running"
+ # log_end_msg 1
+ # exit 1
+ # fi
+ #;;
+
+ *)
+ N=/etc/init.d/$NAME
+ echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/manpage.1.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/manpage.1.ex
new file mode 100644
index 0000000..d67baa2
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/manpage.1.ex
@@ -0,0 +1,59 @@
+.\" Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH GENERIC-DH-MAKE-2008 SECTION "December 29, 2008"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh disable hyphenation
+.\" .hy enable hyphenation
+.\" .ad l left justify
+.\" .ad b justify to both left and right margins
+.\" .nf disable filling
+.\" .fi enable filling
+.\" .br insert line break
+.\" .sp <n> insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+generic-dh-make-2008 \- program to do something
+.SH SYNOPSIS
+.B generic-dh-make-2008
+.RI [ options ] " files" ...
+.br
+.B bar
+.RI [ options ] " files" ...
+.SH DESCRIPTION
+This manual page documents briefly the
+.B generic-dh-make-2008
+and
+.B bar
+commands.
+.PP
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
+.\" respectively.
+\fBgeneric-dh-make-2008\fP is a program that...
+.SH OPTIONS
+These programs follow the usual GNU command line syntax, with long
+options starting with two dashes (`-').
+A summary of options is included below.
+For a complete description, see the Info files.
+.TP
+.B \-h, \-\-help
+Show summary of options.
+.TP
+.B \-v, \-\-version
+Show version of program.
+.SH SEE ALSO
+.BR bar (1),
+.BR baz (1).
+.br
+The programs are documented fully by
+.IR "The Rise and Fall of a Fooish Bar" ,
+available via the Info system.
+.SH AUTHOR
+generic-dh-make-2008 was written by <upstream author>.
+.PP
+This manual page was written by Russ Allbery <rra@debian.org>,
+for the Debian project (but may be used by others).
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/manpage.sgml.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/manpage.sgml.ex
new file mode 100644
index 0000000..26b3e0c
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/manpage.sgml.ex
@@ -0,0 +1,156 @@
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+
+<!-- Process this file with docbook-to-man to generate an nroff manual
+ page: `docbook-to-man manpage.sgml > manpage.1'. You may view
+ the manual page with: `docbook-to-man manpage.sgml | nroff -man |
+ less'. A typical entry in a Makefile or Makefile.am is:
+
+manpage.1: manpage.sgml
+ docbook-to-man $< > $@
+
+
+ The docbook-to-man binary is found in the docbook-to-man package.
+ Please remember that if you create the nroff version in one of the
+ debian/rules file targets (such as build), you will need to include
+ docbook-to-man in your Build-Depends control field.
+
+ -->
+
+ <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+ <!ENTITY dhfirstname "<firstname>FIRSTNAME</firstname>">
+ <!ENTITY dhsurname "<surname>SURNAME</surname>">
+ <!-- Please adjust the date whenever revising the manpage. -->
+ <!ENTITY dhdate "<date>December 29, 2008</date>">
+ <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+ allowed: see man(7), man(1). -->
+ <!ENTITY dhsection "<manvolnum>SECTION</manvolnum>">
+ <!ENTITY dhemail "<email>rra@debian.org</email>">
+ <!ENTITY dhusername "Russ Allbery">
+ <!ENTITY dhucpackage "<refentrytitle>GENERIC-DH-MAKE-2008</refentrytitle>">
+ <!ENTITY dhpackage "generic-dh-make-2008">
+
+ <!ENTITY debian "<productname>Debian</productname>">
+ <!ENTITY gnu "<acronym>GNU</acronym>">
+ <!ENTITY gpl "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+ <refentryinfo>
+ <address>
+ &dhemail;
+ </address>
+ <author>
+ &dhfirstname;
+ &dhsurname;
+ </author>
+ <copyright>
+ <year>2003</year>
+ <holder>&dhusername;</holder>
+ </copyright>
+ &dhdate;
+ </refentryinfo>
+ <refmeta>
+ &dhucpackage;
+
+ &dhsection;
+ </refmeta>
+ <refnamediv>
+ <refname>&dhpackage;</refname>
+
+ <refpurpose>program to do something</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>&dhpackage;</command>
+
+ <arg><option>-e <replaceable>this</replaceable></option></arg>
+
+ <arg><option>--example <replaceable>that</replaceable></option></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>DESCRIPTION</title>
+
+ <para>This manual page documents briefly the
+ <command>&dhpackage;</command> and <command>bar</command>
+ commands.</para>
+
+ <para>This manual page was written for the &debian; distribution
+ because the original program does not have a manual page.
+ Instead, it has documentation in the &gnu;
+ <application>Info</application> format; see below.</para>
+
+ <para><command>&dhpackage;</command> is a program that...</para>
+
+ </refsect1>
+ <refsect1>
+ <title>OPTIONS</title>
+
+ <para>These programs follow the usual &gnu; command line syntax,
+ with long options starting with two dashes (`-'). A summary of
+ options is included below. For a complete description, see the
+ <application>Info</application> files.</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><option>-h</option>
+ <option>--help</option>
+ </term>
+ <listitem>
+ <para>Show summary of options.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-v</option>
+ <option>--version</option>
+ </term>
+ <listitem>
+ <para>Show version of program.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+ <refsect1>
+ <title>SEE ALSO</title>
+
+ <para>bar (1), baz (1).</para>
+
+ <para>The programs are documented fully by <citetitle>The Rise and
+ Fall of a Fooish Bar</citetitle> available via the
+ <application>Info</application> system.</para>
+ </refsect1>
+ <refsect1>
+ <title>AUTHOR</title>
+
+ <para>This manual page was written by &dhusername; &dhemail; for
+ the &debian; system (but may be used by others). Permission is
+ granted to copy, distribute and/or modify this document under
+ the terms of the &gnu; General Public License, Version 2 any
+ later version published by the Free Software Foundation.
+ </para>
+ <para>
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in /usr/share/common-licenses/GPL.
+ </para>
+
+ </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
+
+
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/manpage.xml.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/manpage.xml.ex
new file mode 100644
index 0000000..2d01c6f
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/manpage.xml.ex
@@ -0,0 +1,291 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+
+<!--
+
+`xsltproc -''-nonet \
+ -''-param man.charmap.use.subset "0" \
+ -''-param make.year.ranges "1" \
+ -''-param make.single.year.ranges "1" \
+ /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl \
+ manpage.xml'
+
+A manual page <package>.<section> will be generated. You may view the
+manual page with: nroff -man <package>.<section> | less'. A typical entry
+in a Makefile or Makefile.am is:
+
+DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
+XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0"
+
+manpage.1: manpage.xml
+ $(XP) $(DB2MAN) $<
+
+The xsltproc binary is found in the xsltproc package. The XSL files are in
+docbook-xsl. A description of the parameters you can use can be found in the
+docbook-xsl-doc-* packages. Please remember that if you create the nroff
+version in one of the debian/rules file targets (such as build), you will need
+to include xsltproc and docbook-xsl in your Build-Depends control field.
+Alternatively use the xmlto command/package. That will also automatically
+pull in xsltproc and docbook-xsl.
+
+Notes for using docbook2x: docbook2x-man does not automatically create the
+AUTHOR(S) and COPYRIGHT sections. In this case, please add them manually as
+<refsect1> ... </refsect1>.
+
+To disable the automatic creation of the AUTHOR(S) and COPYRIGHT sections
+read /usr/share/doc/docbook-xsl/doc/manpages/authors.html. This file can be
+found in the docbook-xsl-doc-html package.
+
+Validation can be done using: `xmllint -''-noout -''-valid manpage.xml`
+
+General documentation about man-pages and man-page-formatting:
+man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/
+
+-->
+
+ <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+ <!ENTITY dhfirstname "FIRSTNAME">
+ <!ENTITY dhsurname "SURNAME">
+ <!-- dhusername could also be set to "&firstname; &surname;". -->
+ <!ENTITY dhusername "Russ Allbery">
+ <!ENTITY dhemail "rra@debian.org">
+ <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+ allowed: see man(7), man(1) and
+ http://www.tldp.org/HOWTO/Man-Page/q2.html. -->
+ <!ENTITY dhsection "SECTION">
+ <!-- TITLE should be something like "User commands" or similar (see
+ http://www.tldp.org/HOWTO/Man-Page/q2.html). -->
+ <!ENTITY dhtitle "generic-dh-make-2008 User Manual">
+ <!ENTITY dhucpackage "GENERIC-DH-MAKE-2008">
+ <!ENTITY dhpackage "generic-dh-make-2008">
+]>
+
+<refentry>
+ <refentryinfo>
+ <title>&dhtitle;</title>
+ <productname>&dhpackage;</productname>
+ <authorgroup>
+ <author>
+ <firstname>&dhfirstname;</firstname>
+ <surname>&dhsurname;</surname>
+ <contrib>Wrote this manpage for the Debian system.</contrib>
+ <address>
+ <email>&dhemail;</email>
+ </address>
+ </author>
+ </authorgroup>
+ <copyright>
+ <year>2007</year>
+ <holder>&dhusername;</holder>
+ </copyright>
+ <legalnotice>
+ <para>This manual page was written for the Debian system
+ (but may be used by others).</para>
+ <para>Permission is granted to copy, distribute and/or modify this
+ document under the terms of the GNU General Public License,
+ Version 2 or (at your option) any later version published by
+ the Free Software Foundation.</para>
+ <para>On Debian systems, the complete text of the GNU General Public
+ License can be found in
+ <filename>/usr/share/common-licenses/GPL</filename>.</para>
+ </legalnotice>
+ </refentryinfo>
+ <refmeta>
+ <refentrytitle>&dhucpackage;</refentrytitle>
+ <manvolnum>&dhsection;</manvolnum>
+ </refmeta>
+ <refnamediv>
+ <refname>&dhpackage;</refname>
+ <refpurpose>program to do something</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>&dhpackage;</command>
+ <!-- These are several examples, how syntaxes could look -->
+ <arg choice="plain"><option>-e <replaceable>this</replaceable></option></arg>
+ <arg choice="opt"><option>--example=<parameter>that</parameter></option></arg>
+ <arg choice="opt">
+ <group choice="req">
+ <arg choice="plain"><option>-e</option></arg>
+ <arg choice="plain"><option>--example</option></arg>
+ </group>
+ <replaceable class="option">this</replaceable>
+ </arg>
+ <arg choice="opt">
+ <group choice="req">
+ <arg choice="plain"><option>-e</option></arg>
+ <arg choice="plain"><option>--example</option></arg>
+ </group>
+ <group choice="req">
+ <arg choice="plain"><replaceable>this</replaceable></arg>
+ <arg choice="plain"><replaceable>that</replaceable></arg>
+ </group>
+ </arg>
+ </cmdsynopsis>
+ <cmdsynopsis>
+ <command>&dhpackage;</command>
+ <!-- Normally the help and version options make the programs stop
+ right after outputting the requested information. -->
+ <group choice="opt">
+ <arg choice="plain">
+ <group choice="req">
+ <arg choice="plain"><option>-h</option></arg>
+ <arg choice="plain"><option>--help</option></arg>
+ </group>
+ </arg>
+ <arg choice="plain">
+ <group choice="req">
+ <arg choice="plain"><option>-v</option></arg>
+ <arg choice="plain"><option>--version</option></arg>
+ </group>
+ </arg>
+ </group>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1 id="description">
+ <title>DESCRIPTION</title>
+ <para>This manual page documents briefly the
+ <command>&dhpackage;</command> and <command>bar</command>
+ commands.</para>
+ <para>This manual page was written for the Debian distribution
+ because the original program does not have a manual page.
+ Instead, it has documentation in the GNU <citerefentry>
+ <refentrytitle>info</refentrytitle>
+ <manvolnum>1</manvolnum>
+ </citerefentry> format; see below.</para>
+ <para><command>&dhpackage;</command> is a program that...</para>
+ </refsect1>
+ <refsect1 id="options">
+ <title>OPTIONS</title>
+ <para>The program follows the usual GNU command line syntax,
+ with long options starting with two dashes (`-'). A summary of
+ options is included below. For a complete description, see the
+ <citerefentry>
+ <refentrytitle>info</refentrytitle>
+ <manvolnum>1</manvolnum>
+ </citerefentry> files.</para>
+ <variablelist>
+ <!-- Use the variablelist.term.separator and the
+ variablelist.term.break.after parameters to
+ control the term elements. -->
+ <varlistentry>
+ <term><option>-e <replaceable>this</replaceable></option></term>
+ <term><option>--example=<replaceable>that</replaceable></option></term>
+ <listitem>
+ <para>Does this and that.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-h</option></term>
+ <term><option>--help</option></term>
+ <listitem>
+ <para>Show summary of options.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-v</option></term>
+ <term><option>--version</option></term>
+ <listitem>
+ <para>Show version of program.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+ <refsect1 id="files">
+ <title>FILES</title>
+ <variablelist>
+ <varlistentry>
+ <term><filename>/etc/foo.conf</filename></term>
+ <listitem>
+ <para>The system-wide configuration file to control the
+ behaviour of <application>&dhpackage;</application>. See
+ <citerefentry>
+ <refentrytitle>foo.conf</refentrytitle>
+ <manvolnum>5</manvolnum>
+ </citerefentry> for further details.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>${HOME}/.foo.conf</filename></term>
+ <listitem>
+ <para>The per-user configuration file to control the
+ behaviour of <application>&dhpackage;</application>. See
+ <citerefentry>
+ <refentrytitle>foo.conf</refentrytitle>
+ <manvolnum>5</manvolnum>
+ </citerefentry> for further details.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+ <refsect1 id="environment">
+ <title>ENVIONMENT</title>
+ <variablelist>
+ <varlistentry>
+ <term><envar>FOO_CONF</envar></term>
+ <listitem>
+ <para>If used, the defined file is used as configuration
+ file (see also <xref linkend="files"/>).</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+ <refsect1 id="diagnostics">
+ <title>DIAGNOSTICS</title>
+ <para>The following diagnostics may be issued
+ on <filename class="devicefile">stderr</filename>:</para>
+ <variablelist>
+ <varlistentry>
+ <term><errortext>Bad configuration file. Exiting.</errortext></term>
+ <listitem>
+ <para>The configuration file seems to contain a broken configuration
+ line. Use the <option>--verbose</option> option, to get more info.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <para><command>&dhpackage;</command> provides some return codes, that can
+ be used in scripts:</para>
+ <segmentedlist>
+ <segtitle>Code</segtitle>
+ <segtitle>Diagnostic</segtitle>
+ <seglistitem>
+ <seg><errorcode>0</errorcode></seg>
+ <seg>Program exited successfully.</seg>
+ </seglistitem>
+ <seglistitem>
+ <seg><errorcode>1</errorcode></seg>
+ <seg>The configuration file seems to be broken.</seg>
+ </seglistitem>
+ </segmentedlist>
+ </refsect1>
+ <refsect1 id="bugs">
+ <!-- Or use this section to tell about upstream BTS. -->
+ <title>BUGS</title>
+ <para>The program is currently limited to only work
+ with the <package>foobar</package> library.</para>
+ <para>The upstreams <acronym>BTS</acronym> can be found
+ at <ulink url="http://bugzilla.foo.tld"/>.</para>
+ </refsect1>
+ <refsect1 id="see_also">
+ <title>SEE ALSO</title>
+ <!-- In alpabetical order. -->
+ <para><citerefentry>
+ <refentrytitle>bar</refentrytitle>
+ <manvolnum>1</manvolnum>
+ </citerefentry>, <citerefentry>
+ <refentrytitle>baz</refentrytitle>
+ <manvolnum>1</manvolnum>
+ </citerefentry>, <citerefentry>
+ <refentrytitle>foo.conf</refentrytitle>
+ <manvolnum>5</manvolnum>
+ </citerefentry></para>
+ <para>The programs are documented fully by <citetitle>The Rise and
+ Fall of a Fooish Bar</citetitle> available via the <citerefentry>
+ <refentrytitle>info</refentrytitle>
+ <manvolnum>1</manvolnum>
+ </citerefentry> system.</para>
+ </refsect1>
+</refentry>
+
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/menu.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/menu.ex
new file mode 100644
index 0000000..8a67e62
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/menu.ex
@@ -0,0 +1,2 @@
+?package(generic-dh-make-2008):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\
+ title="generic-dh-make-2008" command="/usr/bin/generic-dh-make-2008"
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/postinst.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/postinst.ex
new file mode 100644
index 0000000..b5f5ca7
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/postinst.ex
@@ -0,0 +1,41 @@
+#!/bin/sh
+# postinst script for generic-dh-make-2008
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <postinst> `abort-remove'
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ configure)
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/postrm.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/postrm.ex
new file mode 100644
index 0000000..1d8a18a
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/postrm.ex
@@ -0,0 +1,39 @@
+#!/bin/sh
+# postrm script for generic-dh-make-2008
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <overwriter>
+# <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/preinst.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/preinst.ex
new file mode 100644
index 0000000..3134ccf
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/preinst.ex
@@ -0,0 +1,37 @@
+#!/bin/sh
+# preinst script for generic-dh-make-2008
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <new-preinst> `install'
+# * <new-preinst> `install' <old-version>
+# * <new-preinst> `upgrade' <old-version>
+# * <old-preinst> `abort-upgrade' <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ install|upgrade)
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/prerm.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/prerm.ex
new file mode 100644
index 0000000..4e5dd3f
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/prerm.ex
@@ -0,0 +1,40 @@
+#!/bin/sh
+# prerm script for generic-dh-make-2008
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <prerm> `remove'
+# * <old-prerm> `upgrade' <new-version>
+# * <new-prerm> `failed-upgrade' <old-version>
+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+# * <deconfigured's-prerm> `deconfigure' `in-favour'
+# <package-being-installed> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ ;;
+
+ failed-upgrade)
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/rules b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/rules
new file mode 100755
index 0000000..92aa2b1
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/rules
@@ -0,0 +1,91 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+
+
+
+configure: configure-stamp
+configure-stamp:
+ dh_testdir
+ # Add here commands to configure the package.
+
+ touch configure-stamp
+
+
+build: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+
+ # Add here commands to compile the package.
+ $(MAKE)
+ #docbook-to-man debian/generic-dh-make-2008.sgml > generic-dh-make-2008.1
+
+ touch $@
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+
+ # Add here commands to clean up after the build process.
+ $(MAKE) clean
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/generic-dh-make-2008.
+ $(MAKE) DESTDIR=$(CURDIR)/debian/generic-dh-make-2008 install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_installchangelogs
+ dh_installdocs
+ dh_installexamples
+# dh_install
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_python
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+ dh_installman
+ dh_link
+ dh_strip
+ dh_compress
+ dh_fixperms
+# dh_perl
+# dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/watch.ex b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/watch.ex
new file mode 100644
index 0000000..e62d18f
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/debian/watch.ex
@@ -0,0 +1,23 @@
+# Example watch control file for uscan
+# Rename this file to "watch" and then you can run the "uscan" command
+# to check for upstream updates and more.
+# See uscan(1) for format
+
+# Compulsory line, this is a version 3 file
+version=3
+
+# Uncomment to examine a Webpage
+# <Webpage URL> <string match>
+#http://www.example.com/downloads.php generic-dh-make-2008-(.*)\.tar\.gz
+
+# Uncomment to examine a Webserver directory
+#http://www.example.com/pub/generic-dh-make-2008-(.*)\.tar\.gz
+
+# Uncommment to examine a FTP server
+#ftp://ftp.example.com/pub/generic-dh-make-2008-(.*)\.tar\.gz debian uupdate
+
+# Uncomment to find new files on sourceforge, for devscripts >= 2.9
+# http://sf.net/generic-dh-make-2008/generic-dh-make-2008-(.*)\.tar\.gz
+
+# Uncomment to find new files on GooglePages
+# http://example.googlepages.com/foo.html generic-dh-make-2008-(.*)\.tar\.gz
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/fill-values b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/fill-values
new file mode 100644
index 0000000..ef7a896
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/fill-values
@@ -0,0 +1,7 @@
+Testname: generic-dh-make-2008
+Skeleton: upload-builder-only
+Author: Russ Allbery <rra@debian.org>
+Package-Architecture: any
+Dh-Compat-Level: 7
+Description: Generic dh_make template generated in 2008
+Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~)
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/orig/Makefile b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/orig/Makefile
new file mode 100644
index 0000000..4f762d8
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/orig/Makefile
@@ -0,0 +1,4 @@
+# Stub Makefile that's just enough so that the default rules file doesn't
+# error out.
+
+clean install:
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/orig/README b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/orig/README
new file mode 100644
index 0000000..6a3c009
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/orig/README
@@ -0,0 +1,13 @@
+dh_make 0.46 test
+=================
+
+This is the results of running dh_make 0.46 on an upstream tarball
+containing only this file. It's a useful test for the various dh_make
+template and boilerplate tags, as well as many tags for ways of doing
+things dh_make used to promote but are now deprecated or old debhelper
+commands that are now deprecated.
+
+Please don't modify anything about the files in this package; instead, add
+new tags as needed when Lintian adds new checks. This test case is
+intended to continue to be a test of Lintian's handling of old and
+template packages.
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/pre-build.in b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/pre-build.in
new file mode 100755
index 0000000..bbdb5cb
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/build-spec/pre-build.in
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+# not using any templates, but dh_clean requires compat
+
+echo "[% $dh_compat_level %]" > "$1/debian/compat"
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/eval/desc b/t/recipes/checks/debian/watch/generic-dh-make-2008/eval/desc
new file mode 100644
index 0000000..8b1333e
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/eval/desc
@@ -0,0 +1,4 @@
+Testname: generic-dh-make-2008
+Check: debian/watch
+See-Also:
+ Bug#497347
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/eval/hints b/t/recipes/checks/debian/watch/generic-dh-make-2008/eval/hints
new file mode 100644
index 0000000..3e324c4
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/eval/hints
@@ -0,0 +1 @@
+generic-dh-make-2008 (source): debian-watch-file-is-missing
diff --git a/t/recipes/checks/debian/watch/generic-dh-make-2008/eval/post-test b/t/recipes/checks/debian/watch/generic-dh-make-2008/eval/post-test
new file mode 100644
index 0000000..faeef0b
--- /dev/null
+++ b/t/recipes/checks/debian/watch/generic-dh-make-2008/eval/post-test
@@ -0,0 +1 @@
+s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/
diff --git a/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/README.Debian b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/README.Debian
new file mode 100644
index 0000000..87bfcdf
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/README.Debian
@@ -0,0 +1,7 @@
+foo++ for Debian
+----------------
+
+This should trigger a warning, as i use a fake mail address.
+
+ -- Marc 'HE' Brockschmidt <foo@unknown>, Wed, 14 Apr 2004 01:44:18 +0200
+
diff --git a/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/changelog.in b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/changelog.in
new file mode 100644
index 0000000..f838939
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/changelog.in
@@ -0,0 +1,31 @@
+foo++ ([% $version %]) [% $distribution %]; urgency=low
+
+ * Add a fake README.Debian to trigger a warning.
+ * This should trigger
+ debian-changelog-file-contains-debmake-default-email-address.
+
+ -- Marc 'HE' Brockschmidt <he@unknown> Wed, 14 Apr 2003 01:35:47 +0200
+
+foo++ (4) unstable; urgency=low
+
+ * This changelog now includes a ISO-8859-1 character: 'ä'
+
+ -- Frank Lichtenheld <djpig@debian.org> Fri, 5 Mar 2004 13:41:39 +0100
+
+foo++ (3) unstable; urgency=low
+
+ * Set maintainers + uploaders incorrectly
+
+ -- Jeroen van Wolffelaar <jeroen@wolffelaar.nl> Fri, 5 Mar 2004 04:20:24 +0100
+
+foo++ (2) unstable; urgency=low
+
+ * Added a foo++-helper package to try and catch even more ++ bugs.
+
+ -- Sean 'Shaleh' Perry <shaleh@debian.org> Sat, 10 Feb 2001 23:16:17 -0800
+
+foo++ (1) unstable; urgency=low
+
+ * Initial version
+
+ -- Sean 'Shaleh' Perry <shaleh@debian.org> Thu, 16 Nov 2000 09:11:40 -0800
diff --git a/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/control b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/control
new file mode 100644
index 0000000..57a489c
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/control
@@ -0,0 +1,30 @@
+Source: foo++
+Section: misc
+Priority: optional
+Maintainer: Lintian Maintainer <debian-qa@lists.debian.org>
+Uploaders: Marc 'HE' Brockschmidt <he@unknown>, Jeroen van Wolffelaar<jeroen@localhost.localdomain>,
+ Frank <djpig@debian.org>, Yama@gotchi, Josip,
+ I am afraid of spam and think this helps <no_spam_please AT debian.org>
+Standards-Version: 3.1.1
+XS-Dm-Upload-Allowed: no
+
+Package: foo++
+Architecture: all
+Build-Depends: test
+Depends: test, libssl0.9.7
+Description: see how lintian reacts to plus signs in the package name
+ Regression test to see if lintian tests work on a package with plus signs in
+ its name.
+ .
+ This description uses only UTF-8 high bytes chars.
+
+Package: foo++-helper
+Architecture: all
+Depends: test, foo++
+Description: see how lintian reacts to plus signs in the package name
+ Regression test to see if lintian tests work on a package with plus signs in
+ its name. This has /usr/share/doc links to foo++ to trigger even more checks.
+ .
+ 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.
diff --git a/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/copyright b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/copyright
new file mode 100644
index 0000000..e2d6d93
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/copyright
@@ -0,0 +1,7 @@
+A reference to /usr/share/common-licenses/GPL to make it look like this
+package is under the GPL and trigger the OpenSSL warning.
+
+However, there is also a reference to /usr/share/common-licenses/LGPL, so
+who knows what bits actually depend on libssl.
+
+Copr. 2007 Somebody.
diff --git a/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/rules b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/rules
new file mode 100755
index 0000000..63bb4db
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/rules
@@ -0,0 +1,36 @@
+#!/usr/bin/make -f
+
+foo=foo++
+helper=foo++-helper
+
+build-arch:
+
+build-indep:
+
+build: build-arch build-indep
+
+binary-arch:
+
+binary-indep:
+ install -d debian/$(foo)/DEBIAN
+ install -d debian/$(foo)/usr/share/doc/$(foo)
+ install -m 644 debian/changelog \
+ debian/$(foo)/usr/share/doc/$(foo)/changelog
+ gzip -n -9 debian/$(foo)/usr/share/doc/$(foo)/changelog
+ install -m 644 debian/README.Debian \
+ debian/$(foo)/usr/share/doc/$(foo)/README.Debian
+ gzip -n -9 debian/$(foo)/usr/share/doc/$(foo)/README.Debian
+ dpkg-gencontrol -isp -p$(foo) -Pdebian/$(foo)
+ dpkg --build debian/$(foo) ..
+
+ install -d debian/$(helper)/DEBIAN
+ install -d debian/$(helper)/usr/share/doc/
+ ln -sf $(foo) debian/$(helper)/usr/share/doc/$(helper)
+ dpkg-gencontrol -isp -p$(helper) -Pdebian/$(helper)
+ dpkg --build debian/$(helper) ..
+
+binary: binary-arch binary-indep
+
+clean:
+
+.PHONY: build-arch build-indep build binary-arch binary-indep binary clean
diff --git a/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/watch b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/watch
new file mode 100644
index 0000000..26f9a3c
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/debian/watch
@@ -0,0 +1,6 @@
+# A comment \
+version=0
+
+# uscan does not interpret the backslash above, it is just part of the comment
+
+http://domain.tld/file-(.*)\.tar\.gz
diff --git a/t/recipes/checks/debian/watch/legacy-foo++/build-spec/fill-values b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/fill-values
new file mode 100644
index 0000000..86d43bc
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-foo++/build-spec/fill-values
@@ -0,0 +1,5 @@
+Skeleton: upload-native
+Testname: legacy-foo++
+Source: foo++
+Version: 5
+Description: Legacy test "foo++"
diff --git a/t/recipes/checks/debian/watch/legacy-foo++/eval/desc b/t/recipes/checks/debian/watch/legacy-foo++/eval/desc
new file mode 100644
index 0000000..b8bd838
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-foo++/eval/desc
@@ -0,0 +1,2 @@
+Testname: legacy-foo++
+Check: debian/watch
diff --git a/t/recipes/checks/debian/watch/legacy-foo++/eval/hints b/t/recipes/checks/debian/watch/legacy-foo++/eval/hints
new file mode 100644
index 0000000..5607bd3
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-foo++/eval/hints
@@ -0,0 +1 @@
+foo++ (source): debian-watch-file-in-native-package [debian/watch]
diff --git a/t/recipes/checks/debian/watch/legacy-foo++/eval/post-test b/t/recipes/checks/debian/watch/legacy-foo++/eval/post-test
new file mode 100644
index 0000000..faeef0b
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-foo++/eval/post-test
@@ -0,0 +1 @@
+s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/
diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/changelog.in b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/changelog.in
new file mode 100644
index 0000000..a12fc8c
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/changelog.in
@@ -0,0 +1,57 @@
+maintainer-scripts ([% $version %]) [% $distribution %]; urgency=low
+
+ * Doing an upload for QA but I fail to give it a correct version number,
+ have some uploaders, and also fail to mention it... Bad me ;)
+
+ -- Jeroen van Wolffelaar <jeroen@wolffelaar.nl> Sun, 18 Apr 2004 02:05:29 +0200
+
+maintainer-scripts (6.1) unstable; urgency=low
+
+ * I made this entry on my local PC, oops ;)
+
+ -- Jeroen van Wolffelaar <jeroen@mordor> Sat, 21 Feb 2004 18:29:37 +0100
+
+maintainer-scripts (6) unstable; urgency=low
+
+ * added ldconfig calls to postrm to check test the postrm tests
+ from shared-libs
+
+ -- Frank Lichtenheld <djpig@debian.org> Sat, 21 Feb 2004 18:29:36 +0100
+
+maintainer-scripts (5) unstable; urgency=low
+
+ * added bash style arrays to postinst, this one is for you Torsten (-:
+
+ -- Sean 'Shaleh' Perry <shaleh@debian.org> Fri, 30 Mar 2001 23:27:06 -0800
+
+maintainer-scripts (4) unstable; urgency=low
+
+ * added a here document to the prerm, along with two more bashisms
+ * made postrm a bash script to check that bash scripts are not searched
+
+ -- Sean 'Shaleh' Perry <shaleh@debian.org> Mon, 26 Feb 2001 13:02:57 -0800
+
+maintainer-scripts (3) unstable; urgency=low
+
+ * Added check for '.' called as '. foo || bar', lintian 1.11.15 failed this
+ thinking the '||' was a argument.
+ * also added an invalid call to '. foo bar'
+ * postinst now has a space between the #! and /bin/sh to test the interpreter
+ checking code.
+
+ -- Sean 'Shaleh' Perry <shaleh@debian.org> Tue, 9 Jan 2001 23:06:25 -0800
+
+maintainer-scripts (2) unstable; urgency=low
+
+ * Fix location of changelog.
+ * prerm and postrm do 'update-alternatives --remove'; should only complain
+ about postrm.
+
+ -- Colin Watson <cjw44@flatline.org.uk> Fri, 29 Dec 2000 06:01:24 +0000
+
+maintainer-scripts (1) unstable; urgency=low
+
+ * Initial version
+ * postinst and prerm set the usr/doc symlink
+
+ -- Sean 'Shaleh' Perry <shaleh@debian.org> Thu, 16 Nov 2000 09:11:40 -0800
diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/control.in b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/control.in
new file mode 100644
index 0000000..63dd2db
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/control.in
@@ -0,0 +1,18 @@
+Source: maintainer-scripts
+Section: misc
+Priority: optional
+Maintainer: QA group <packages@qa.debian.org>
+Uploaders: Anyone but Jeroen <jeroen@wolffelaar.nl>
+Build-Depends: [% $build_depends %]
+Standards-Version: 3.1.1
+Rules-Requires-Root: binary-targets
+XS-Dm-Upload-Allowed: Yes
+
+Package: maintainer-scripts
+Architecture: [% $package_architecture %]
+Depends: test
+Description: test lintian's maintainer script checks
+ 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/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/postinst b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/postinst
new file mode 100644
index 0000000..e56ed3b
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/postinst
@@ -0,0 +1,181 @@
+#! /bin/sh -e
+
+if [ "$1" = "configure" ]; then
+ if [ -d /usr/doc -a ! -e /usr/doc/maintainer-scripts -a -d /usr/share/doc/maintainer-scripts ]; then
+ ln -sf ../share/doc/maintainer-scripts /usr/doc/maintainer-scripts
+ fi
+fi
+
+# valid
+. /usr/share/lintian/shell || exit 0
+. /usr/share/lintian/shell >/dev/null
+. /usr/share/lintian/shell 2>/dev/null
+. /usr/share/lintian/shell </dev/null
+. "$(dirname $0)/shell" ; bar
+# invalid
+. /usr/share/lintian/shell foo
+. "$(dirname $0)/shell" bar
+
+print "Hit enter to continue"
+read
+
+H[0]='this is a string'
+echo ${H[0]}
+echo "Index 0's length is ${#H[0]}"
+echo "All of the array is: ${H[@]}"
+
+install-info /usr/share/info/foo \
+ --quiet \ # make it so
+ --section foo
+
+echo Please use update-rc.d or invoke-rc.d to set up blah blah.
+
+chown root.root /usr/share/doc/maintainer-scripts/changelog
+chown root:root /usr/share/doc/maintainer-scripts/changelog
+
+$FOO=bar
+update-rc.d foo defaults >/dev/null
+update-rc.d $FOO defaults
+update-rc.d foo remove
+
+# valid
+FOO=/tmp
+FOO=/var/tmp
+: ${FOO:=/tmp}
+FOO=`mktemp /tmp/scripts.XXXXXX`
+rm "$FOO"
+FOO=`tempfile -n/tmp/scripts.tmp`
+mkdir /var/tmp/scripts
+FOO="/tmp/false.positive.XXXXXX"
+# invalid
+echo foo >>/tmp/scripts.tmp
+rm /tmp/scripts.tmp
+rmdir /var/tmp/scripts
+
+# invalid, maintainer-script-hides-init-failure
+invoke-rc.d foo start || exit 0
+
+# The right way to invoke an rc script
+if which invoke-rc.d >/dev/null 2>&1; then
+ invoke-rc.d package start
+else
+ /etc/init.d/package start
+fi
+
+# Example ucf invocation.
+ucf /usr/share/foo/configuration /etc/foo.conf
+
+# Calling gconftool directly.
+gconftool-2 --makefile-install-rule foo.schema
+
+# Calling gconf-schemas with no dependency.
+gconf-schemas --register foo.schema
+
+# Calling update-xmlcatalog with no dependency.
+update-xmlcatalog --add --type system --id "/usr/share/sgml/dtd/foo" \
+ --package maintainer-scripts --root
+
+# Maintainer scripts shouldn't touch /var/lib/dpkg/status. This is the old
+# recipe from the dpkg wiki that should be replaced with dpkg-query.
+sed -n -e \"/^Conffiles:/,/^[^ ]/{\\\\' /etc/conffile'{s/.* //;p}}\" \
+ /var/lib/dpkg/status
+
+# Don't modify these files.
+echo 'broken 6714/tcp' >> /etc/services
+cp /nonexistent /etc/protocols
+mv /usr/share/doc/rpc /etc/rpc
+
+# But this is okay.
+cp /etc/protocols /etc/protocols.new
+
+# This is also wrong.
+echo 'broken' > /etc/inetd.conf
+cp /etc/inetd.conf.new /etc/inetd.conf
+
+# But this is fine.
+cp /etc/inetd.conf /srv/chroot/etc/inetd.conf
+
+# Deprecated
+install-sgmlcatalog --install package
+install-sgmlcatalog --remove package
+
+# This too is a heredoc.
+some-program > /etc/config-file <<'EOF'
+echo "All of the array is: ${H[@]}"
+EOF
+
+# But this isn't.
+cat '<<EOF'
+echo "All of the array is: ${H[@]}"
+EOF
+
+# This is a heredoc
+cat <<-EOF
+echo "All of the array is ${H[@]}"
+EOF
+
+# As is this
+cat <<';'
+echo "All of the array is ${H[@]}"
+;
+
+# and this
+cat <<foo
+echo "All of the array is ${H[@]}"
+foobar
+echo $HOSTNAME
+foo
+
+# and again
+cat <<\bar
+echo "All of the array is ${H[@]}"
+bar
+
+# yet another
+cat <<"x++"
+echo "All of the array is ${H[@]}"
+x++
+
+# Recognize single quotes even if they start at the beginning of a line.
+echo not a bashism \
+'/{ptex,tex}/{amstex,plain,generic,}'
+
+# More bashisms.
+echo -e 'foo\n'
+echo "${!foo}"
+cat $(\< file)
+select foo in a b ; do echo $foo ; done
+cnt=$((cnt + 1))
+if false ; then
+ exec -l /bin/sh
+ exec -c /bin/sh
+ exec -a foo /bin/sh
+fi
+let cnt++
+if test -a /etc/default ; then
+ echo "$RANDOM|stuff"
+fi
+
+# Calling start-stop-daemon directly in an init script.
+start-stop-daemon --start --quiet --name foo --startas /usr/bin/foo
+
+# But stopping it is fine -- we may be working around something else.
+start-stop-daemon --stop --quiet --name foo --startas /usr/bin/foo
+
+# Deprecated chown use with flags.
+chown -R root.root /usr/share/doc/maintainer-scripts
+
+case $mainscript in
+ /usr/bin/foo) foobarbaz;;
+esac
+
+/usr/bin/baz; echo bar
+
+# Some comment checking
+# This should flag $RANDOM
+test $# -gt 2 && echo $RANDOM
+# But these shouldn't
+test 1=1 # echo $RANDOM
+(test 1=1)# echo $RANDOM
+test 1=1;# echo $RANDOM
+backgroundtask &#echo $RA
diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/postrm b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/postrm
new file mode 100644
index 0000000..c0aaf19
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/postrm
@@ -0,0 +1,47 @@
+#!/bin/bash
+#set -e
+
+update-alternatives --remove dummy /usr/bin/dummy-alternative
+
+# Normally read in a maintainer script is not kosher, but here we're going
+# to do it only if debconf doesn't exist.
+if ! test -f /usr/share/debconf/confmodule ; then
+ echo "Hit enter"
+ read
+fi
+
+# neither of the following should be detected as postrm-unsafe-ldconfig
+# intended, without quotes
+ if [ "$1" = remove ]; then
+ ldconfig
+ fi
+# reversed, many whitespace
+if [ 'remove' = "$1" ]
+then
+
+ ldconfig
+fi
+
+[ "remove" ="$1" ] && ldconfig
+
+update-rc.d bar remove
+
+# Shouldn't provoke an error despite no invoke-rc.d.
+echo "/etc/init.d/package stop to stop something"
+
+# Shouldn't require a ucf dependency. Unfortunately, right now that's
+# just because postrm isn't checked, not because we ensure that the
+# invocation is conditional.
+if which ucf >/dev/null; then
+ ucf --purge /etc/foo.conf
+fi
+
+# This isn't allowed.
+rm /tmp/foo /dev/device
+rm /dev/device1
+
+# But this is okay.
+rm /tmp/foo > /dev/null
+
+# Not allowed here even with remove.
+install-sgmlcatalog --remove package
diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/preinst b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/preinst
new file mode 100644
index 0000000..6058978
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/preinst
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+update-rc.d foo remove
+update-rc.d bar defaults
+
+# Obsolete dpkg assertions.
+dpkg --assert-support-predepends || exit 1
+dpkg --assert-working-epoch || exit 1
+dpkg --assert-long-filenames || exit 1
+dpkg --assert-multi-conrep || exit 1
+
+/bin/grep -E --mmap "^Package: foo$" /var/lib/dpkg/status
+
+# continuation lines
+update-alternatives --install /usr/bin/fakeroot fakeroot \
+ /usr/bin/fakeroot-ng 5 \
+ --slave /usr/share/man/man1/fakeroot.1.gz \
+ fakeroot.1.gz /usr/share/man/man1/fakeroot-ng.1.gz
diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/prerm b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/prerm
new file mode 100644
index 0000000..076ecaf
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/prerm
@@ -0,0 +1,188 @@
+#!/bin/sh
+
+if [ "$1" != "upgrade" ]; then
+ update-alternatives --remove dummy /usr/bin/dummy-alternative
+fi
+
+if ([ "$1" = "upgrade" ] || [ "$1" = "remove" ]) && [ -L /usr/doc/maintainer-scripts ]; the
+n
+ rm -f /usr/doc/maintainer-scripts
+fi
+
+cat <<EOF
+This is all really bad bash specific code!!!
+read
+source /bar/baz/bat foo
+EOF
+
+# ok, back to checking
+if [ "$2" == "purge" ]; then
+ rm -r /bar/baz
+fi
+
+function foo( ) {
+ # but not here: local
+ local bar
+ echo "foo" &>/dev/null
+}
+
+source $FOO
+
+trap "echo hi" EXIT HUP 3
+
+if [[ "$2" = "purge" ]]; then
+ kill -HUP $$
+fi
+
+#this is ok though
+if test -n $(echo foo | perl -pe 's/[[:space:]]//go'); then
+ echo 1
+fi
+
+update-rc.d foo remove
+
+# More false positives for bashism checks. None of these are errors.
+echo "$line" | grep -q '{fonts/map,}/{\$progname,pdftex,dvips,}//'
+echo "$line" | grep -q "${fonts},${foo}"
+echo '$[1+2]'
+printf "foo |& bar"
+perl -e "print q( kill -HUP $? )"
+
+# Still catch disallowed expansions in double-quotes, though.
+echo "${line:3:1}"
+
+# The wrong way to run an init script (no invoke-rc.d).
+/etc/init.d/package stop
+
+# This is the only install-sgmlcatalog call that's allowed.
+install-sgmlcatalog --quiet --remove package
+
+# More bashisms checks
+
+read -x foo
+read -x
+read -r foo
+read foo
+read
+
+echo "a\\b"
+echo 'a\nb'
+
+echo "${UID}"
+echo "$EUID"
+echo "$SHLVL"
+echo "$DIRSTACK"
+echo "$SECONDS"
+echo "$BASH"
+echo "$BASH_FOO"
+echo "$SHELLOPTS"
+echo "$PIPESTATUS"
+
+bar="$(cut '-d|' -f2 <<< "$foo")"
+
+VAR=1
+VAR+=a
+
+echos() {
+ echo -n -e "bar"
+ echo -e -n "bar"
+ echo -en "bar"
+ echo -ne "bar"
+ echo "bar"
+ echo "echo -e foo"
+}
+
+ech.os() {
+ echo foo >& 2
+ echo foo >&bar
+ echo foo >& bar
+}
+
+echoes() {
+ echo "abc\nxyz"
+ echo 'xyz\rabc'
+ echo foo\cbar
+
+ echo -e "abc\nxyz"
+ echo -net 'xyz\rabc'
+ echo -e foo\cbar
+}
+
+foobar.() {
+ suspend x
+ suspended x
+ caller x
+ complete x
+ compgen x
+ declare -a foo
+}
+
+.foobar() {
+ typeset -x bar
+ disown 1
+ builtin foo
+ set -B
+ alias -p
+ unalias -a
+}
+
+IFS="()"
+
+ulimit
+shopt
+type -v bar
+time ls
+dirs
+diff <(tac a) <(tac b)
+
+pushd
+
+local foo=bar
+local -x foo
+
+popd
+
+readonly -f
+
+echo bar > /dev/tcp
+export x
+export -x x
+export -p x
+
+sh -x
+sh -D
+sh --foo
+sh +O
+
+# Brace expansion checks
+echo {a,b}
+echo {abc},{bcd}
+
+foobar()
+{
+ # This is a function
+}
+
+ foo.bar()
+(
+ # This is a function with a bad name
+)
+
+foobar@()
+{
+ # As is this
+}
+
+# This is ok
+read -r foo
+# but these aren't
+read -r
+read -p "Would you like to restart the service?" foo bar
+read --fish
+
+set -e
+
+source "$BAR"
+source '$BAR'
+source ~/bar
+source a
diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/rules b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/rules
new file mode 100755
index 0000000..5fcef00
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/rules
@@ -0,0 +1,35 @@
+#!/usr/bin/make -f
+
+build-arch:
+
+build-indep:
+
+build: build-arch build-indep
+
+binary-arch:
+
+binary-indep:
+ install -d debian/tmp/DEBIAN
+ install -m 0755 debian/preinst debian/tmp/DEBIAN
+ install -m 0755 debian/postinst debian/tmp/DEBIAN
+ install -m 0755 debian/prerm debian/tmp/DEBIAN
+ install -m 0755 debian/postrm debian/tmp/DEBIAN
+ install -m 0644 debian/triggers debian/tmp/DEBIAN
+ install -d debian/tmp/usr/share/doc/maintainer-scripts
+ install -m 0644 debian/changelog \
+ debian/tmp/usr/share/doc/maintainer-scripts/changelog
+ gzip -n -9 debian/tmp/usr/share/doc/maintainer-scripts/changelog
+ dpkg-gencontrol -isp
+ dpkg --build debian/tmp ..
+
+binary: binary-arch binary-indep
+
+# Make sure we see dh_clean even in a rule clean depends on. Not the point of
+# this test suite, but a convenient place to put it.
+clean: clean1 clean2 clean3
+clean1:
+clean2:
+ dh_clean
+clean3:
+
+.PHONY: build-arch build-indep build binary-arch binary-indep binary clean
diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/triggers b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/triggers
new file mode 100644
index 0000000..f627094
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/triggers
@@ -0,0 +1,4 @@
+# Example triggers file
+activate foo
+
+interest bar
diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/watch b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/watch
new file mode 100644
index 0000000..430eea3
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/debian/watch
@@ -0,0 +1,11 @@
+# A whitespace is fine for uscan:
+ version=5
+
+# Following line should not be matched:
+#opts=uversionmangle=s/$/+debian/,dversionmangle=s/foo/bar/ \
+# Following one is incorrect, there's a missing backslash at the end
+opts=uversionmangle=s/$/+dfsg/,dversionmangle=s/foo/bar/
+
+# 'active' is useless here, but it works anyway
+options=active \
+http://domain.tld/foo-(.+)\.tar\.gz \ No newline at end of file
diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/fill-values b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/fill-values
new file mode 100644
index 0000000..c281e87
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/build-spec/fill-values
@@ -0,0 +1,6 @@
+Skeleton: upload-non-native
+Testname: legacy-maintainer-scripts
+Source: maintainer-scripts
+Version: 7+dfsg-0.1
+Description: Legacy test "maintainer-scripts"
+Extra-Build-Depends: dash (>= 0.5.10.2)
diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/eval/desc b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/eval/desc
new file mode 100644
index 0000000..15e1052
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/eval/desc
@@ -0,0 +1,2 @@
+Testname: legacy-maintainer-scripts
+Check: debian/watch
diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/eval/hints b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/eval/hints
new file mode 100644
index 0000000..900fab6
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/eval/hints
@@ -0,0 +1,4 @@
+maintainer-scripts (source): debian-watch-uses-insecure-uri http://domain.tld/foo-(.+)\.tar\.gz [debian/watch:11]
+maintainer-scripts (source): debian-watch-not-mangling-version opts=uversionmangle=s/$/+dfsg/,dversionmangle=s/foo/bar/ [debian/watch:7]
+maintainer-scripts (source): debian-watch-not-mangling-version options=active http://domain.tld/foo-(.+)\.tar\.gz [debian/watch:11]
+maintainer-scripts (source): debian-watch-does-not-check-openpgp-signature [debian/watch]
diff --git a/t/recipes/checks/debian/watch/legacy-maintainer-scripts/eval/post-test b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/eval/post-test
new file mode 100644
index 0000000..faeef0b
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-maintainer-scripts/eval/post-test
@@ -0,0 +1 @@
+s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/changelog.in b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/changelog.in
new file mode 100644
index 0000000..935c633
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/changelog.in
@@ -0,0 +1,41 @@
+scripts ([% $version %]) [% $distribution %]; urgency=low
+
+ * I'm also not able to write my name.
+ * Added a script in /etc/Xsession.d
+ * Bizarre version number courtesy of
+ https://wiki.ubuntu.com/SecurityUpdateProcedures#Prepare
+
+ -- Mark 'HE' Brokschmitt <he@debian.org> Thu, 23 Jun 2005 14:32:39 +0200
+
+scripts (5-1) unstable; urgency=low
+
+ * I'm making a typo in my own name... And I want lintian to warn me about
+ it.
+
+ -- Jeroen van Wolffelaar <jeroen@wolffelaar.nl> Sun, 18 Apr 2004 02:26:34 +0200
+
+scripts (4-1) unstable; urgency=low
+
+ * Add new example to check that not executable files with a shebang line
+ called *in don't trigger the script-not-executable warning.
+
+ -- Marc 'HE' Brockschmidt <he@debian.org> Wed, 14 Apr 2004 19:44:04 +0200
+
+scripts (3-3) unstable; urgency=low
+
+ * Add suidperlfoo and some code in debian/rules to
+ check the new suidperl checks
+
+ -- Frank Lichtenheld <djpig@debian.org> Wed, 31 Mar 2004 21:06:20 +0000
+
+scripts (2-1) unstable; urgency=low
+
+ * Add tkfoo script for tk checkings
+
+ -- Lintian Maintainers <lintian-maint@debian.org> Sat, 21 Feb 2004 17:13:36 +0100
+
+scripts (1-0) unstable; urgency=low
+
+ * Initial version
+
+ -- Lintian Maintainers <lintian-maint@debian.org> Sat, 10 Feb 2001 15:37:31 -0800
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/control.in b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/control.in
new file mode 100644
index 0000000..75a521f
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/control.in
@@ -0,0 +1,16 @@
+Source: scripts
+Section: interpreters
+Priority: optional
+Maintainer: Lintian Maintainers <lintian-maint@debian.org>
+Uploaders: Jeroen van Wolfelaar <jeroen@wolffelaar.nl>, Marc 'HE' Brockschmidt <he@debian.org>
+Build-Depends-Indep: dpatch
+Standards-Version: 3.2.1
+
+Package: scripts
+Architecture: [% $package_architecture %]
+Depends: test, ruby1.8, build-essential, libssl0.9.7, php7.0-cli
+Recommends: tk8.4 | wish
+Description: test lintian's script file checks
+ 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.
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/copyright b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/copyright
new file mode 100644
index 0000000..ad8a119
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/copyright
@@ -0,0 +1,5 @@
+This file contains the phrase "under the same terms as Perl itself" to
+trigger warnings about not having common-licenses references.
+
+This file contains the phrase "public domain" which should suppress
+warnings about no copyright date.
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/00list b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/00list
new file mode 100644
index 0000000..3b9d37e
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/00list
@@ -0,0 +1,11 @@
+01_not_here_right_now.dpatch
+
+# some comment
+/* some more
+ elaborate comment
+ which needs DPATCH_OPTION_CPP=1
+ */02_i_dont_have_a_description.patch 03_specified_without_dpatch
+
+// and again a comment
+
+04_i_dont_have_a_description_either.patch
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/00list.sparc b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/00list.sparc
new file mode 100644
index 0000000..8b47ab3
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/00list.sparc
@@ -0,0 +1 @@
+01_some_other_patch_thats_not_in_the_package.dpatch
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/00options b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/00options
new file mode 100644
index 0000000..57ffeb6
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/00options
@@ -0,0 +1 @@
+DPATCH_OPTION_CPP=1
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch
new file mode 100644
index 0000000..9279c1b
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch
@@ -0,0 +1,7 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_i_dont_have_a_description.patch.dpatch by Marc 'HE' Brockschmidt <Marc 'HE' Brockschmidt <he@debian.org>>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch
new file mode 100644
index 0000000..8303ac6
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch
@@ -0,0 +1,5 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Listed in 00list without .dpatch suffix.
+
+@DPATCH@
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch
new file mode 100644
index 0000000..b603f16
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch
@@ -0,0 +1,7 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04_i_dont_have_a_description_either.patch by Adam D. Barratt <adam@adam-barratt.org.uk>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP:
+
+@DPATCH@
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/postinst b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/postinst
new file mode 100644
index 0000000..7c5baf1
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/postinst
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+if [ -x "/etc/init.d/lsb-broken" ] ; then
+ update-rc.d lsb-broken defaults >/dev/null
+fi
+if [ -x "/etc/init.d/no-lsb" ] ; then
+ update-rc.d no-lsb defaults >/dev/null
+fi
+if [ -x "/etc/init.d/skeleton" ] ; then
+ update-rc.d skeleton defaults >/dev/null
+fi
+if [ -x "/etc/init.d/lsb-other" ] ; then
+ update-rc.d lsb-other defaults >/dev/null
+fi
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/postrm b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/postrm
new file mode 100644
index 0000000..8fa75a2
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/postrm
@@ -0,0 +1,9 @@
+#!/bin/sh -e
+
+if [ "$1" = purge ] ; then
+ update-rc.d lsb-broken remove >/dev/null
+ update-rc.d no-lsb remove >/dev/null
+ update-rc.d skeleton remove >/dev/null
+ update-rc.d lsb-other remove >/dev/null
+ update-rc.d lsb-other remove >/dev/null
+fi
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/preinst b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/preinst
new file mode 100644
index 0000000..0799557
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/preinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+set -x
+
+#
+# Some comments here
+#
+
+# This serves as an example of an "empty" script, so
+# please do not add any real code here, thank you :)
+
+#DEBHELPER#
+
+exit 0
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/rules b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/rules
new file mode 100755
index 0000000..ee3677e
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/rules
@@ -0,0 +1,105 @@
+#!/usr/bin/make -f
+
+tmp=debian/tmp
+
+build-arch:
+ echo "Hi, in an arch: all package, I am a bug!"
+
+build-indep:
+
+build: build-arch build-indep
+
+binary-arch:
+ echo "Hi, in an arch: all package, I am a bug!"
+
+binary-indep:
+ install -d $(tmp)/usr/bin/
+ install -d $(tmp)/etc/X11/Xsession.d/
+ install -d $(tmp)/etc/init.d/
+ install -d $(tmp)/etc/csh/login.d/
+ install -d $(tmp)/etc/fish.d/
+ install -d $(tmp)/usr/share/scripts/
+ install -d $(tmp)/usr/share/doc/scripts/
+ install -d $(tmp)/usr/lib/cgi-bin
+ install -d $(tmp)/usr/src/scripts
+ install -d $(tmp)/DEBIAN
+
+ install -m 755 csh-foo $(tmp)/etc/csh/login.d/
+ install -m 755 envfoo $(tmp)/usr/bin/
+ install -m 755 fish-foo $(tmp)/etc/fish.d/
+ install -m 755 jruby-broken $(tmp)/usr/bin/
+ install -m 755 perlfoo $(tmp)/usr/bin/
+ install -m 755 rubyfoo $(tmp)/usr/bin/
+# This doesn't use "env" but should also trigger script-in-usr-share-doc
+ install -m 755 rubyfoo $(tmp)/usr/share/doc/scripts/
+ install -m 755 make-foo $(tmp)/usr/bin/
+ install -m 755 lefty-foo $(tmp)/usr/bin/
+ install -m 4751 perlfoo $(tmp)/usr/bin/suidperlfoo2
+ install -m 755 sh-broken $(tmp)/usr/bin/
+ install -m 4555 suidperlfoo $(tmp)/usr/bin/
+ install -m 755 tkfoo $(tmp)/usr/bin/
+ install -m 755 wishfoo $(tmp)/usr/bin/
+ install -m 644 xsession-test $(tmp)/etc/X11/Xsession.d/
+
+# Permissions here aren't part of what's being tested, but let us exercise
+# some other errors.
+ install -m 755 perl-bizarre-1 $(tmp)/usr/bin/
+ install -m 750 perl-bizarre-2 $(tmp)/usr/bin/
+ install -m 754 perl-bizarre-3 $(tmp)/usr/bin/
+ install -m 705 guile-bizarre $(tmp)/usr/bin/
+
+# First one should produce a warning; second one shouldn't.
+ install -m 755 gccbug.dpatch $(tmp)/usr/share/scripts/
+ install -m 755 gccbug.dpatch $(tmp)/usr/src/scripts/
+
+ install -m 644 init-skeleton $(tmp)/etc/init.d/skeleton
+ install -m 755 init-no-lsb $(tmp)/etc/init.d/no-lsb
+ install -m 755 init-lsb-broken $(tmp)/etc/init.d/lsb-broken
+ install -m 755 init-lsb-other $(tmp)/etc/init.d/lsb-other
+
+ install -m 755 phpfoo $(tmp)/usr/share/scripts/
+ sed 's/php$$/php7.0/' phpfoo > $(tmp)/usr/share/scripts/php7.0foo
+ chmod 755 $(tmp)/usr/share/scripts/php7.0foo
+
+ install -m 755 phpenvfoo $(tmp)/usr/share/scripts/
+ sed 's/php$$/php7.0/' phpenvfoo > $(tmp)/usr/share/scripts/php7.0envfoo
+ chmod 755 $(tmp)/usr/share/scripts/php7.0envfoo
+
+ echo "#!/usr/bin/perl" >> $(tmp)/usr/share/scripts/foobar.in
+ chmod 644 $(tmp)/usr/share/scripts/foobar.in
+
+ touch $(tmp)/usr/share/scripts/mono.exe
+ chmod 755 $(tmp)/usr/share/scripts/mono.exe
+
+ echo "#!/bin/sh" > $(tmp)/usr/share/scripts/foo\$$bar
+ chmod 755 $(tmp)/usr/share/scripts/foo\$$bar
+
+ echo "#!/bin/sh" > $(tmp)/usr/lib/cgi-bin/cgi-script
+ chmod 755 $(tmp)/usr/lib/cgi-bin/cgi-script
+
+ echo "#!/bin/sh" > $(tmp)/usr/bin/test.sh
+ chmod 755 $(tmp)/usr/bin/test.sh
+
+
+ dh_testroot # dummy to test missing debhelper dependency
+
+
+ install -m 644 debian/changelog $(tmp)/usr/share/doc/scripts/changelog.Debian
+ gzip -n -9 $(tmp)/usr/share/doc/scripts/changelog.Debian
+ install -m 644 debian/copyright $(tmp)/usr/share/doc/scripts/copyright
+
+ install -m 644 debian/scripts.conffiles $(tmp)/DEBIAN/conffiles
+ install -m 755 debian/preinst $(tmp)/DEBIAN/preinst
+ install -m 755 debian/postinst $(tmp)/DEBIAN/postinst
+ install -m 755 debian/postrm $(tmp)/DEBIAN/postrm
+ touch $(tmp)/DEBIAN/prerm
+ chmod 755 $(tmp)/DEBIAN/prerm
+ dpkg-gencontrol -isp
+ dpkg --build $(tmp) ..
+
+binary: binary-arch binary-indep
+
+clean:
+ rm -rf debian/files $(tmp) debian/substvars
+
+.PHONY: build-arch build-indep build binary-arch binary-indep binary clean
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/scripts.conffiles b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/scripts.conffiles
new file mode 100644
index 0000000..01a371a
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/scripts.conffiles
@@ -0,0 +1,6 @@
+/etc/init.d/lsb-broken
+/etc/init.d/lsb-other
+/etc/init.d/no-lsb
+/etc/X11/Xsession.d/xsession-test
+/etc/csh/login.d/csh-foo
+/etc/fish.d/fish-foo
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/watch b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/watch
new file mode 100644
index 0000000..dba5815
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/debian/watch
@@ -0,0 +1,8 @@
+# watch file with upstream version mangling
+
+version=2
+opts="uversionmangle=s/$/ds/" \
+http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate
+
+version=3
+http://ftp.sf.net/foo/foo_bar(.+)\.Z 5 uupdate \ No newline at end of file
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/fill-values b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/fill-values
new file mode 100644
index 0000000..8a68457
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/fill-values
@@ -0,0 +1,6 @@
+Testname: legacy-scripts
+Source: scripts
+Version: 6ds-1ubuntu0.5.10.1
+Package-Architecture: all
+Skeleton: upload-non-native
+Description: Legacy test "scripts"
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/csh-foo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/csh-foo
new file mode 100644
index 0000000..eaf47a1
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/csh-foo
@@ -0,0 +1,2 @@
+#! /bin/csh
+
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/envfoo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/envfoo
new file mode 100755
index 0000000..e005037
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/envfoo
@@ -0,0 +1,4 @@
+#! /bin/env python
+
+if __name__ == '__main__':
+ print 'Hi there'
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/fish-foo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/fish-foo
new file mode 100644
index 0000000..7f59139
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/fish-foo
@@ -0,0 +1,2 @@
+#! /usr/bin/fish
+
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/gccbug.dpatch b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/gccbug.dpatch
new file mode 100755
index 0000000..65cbf37
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/gccbug.dpatch
@@ -0,0 +1,39 @@
+#! /bin/sh -e
+
+# DP: Use sensible-editor instead of vi as fallback editor
+
+# Taken from gcc-4.1-source. Chokes bash -n (due to the patch) despite being
+# a valid dpatch, so don't warn about it if it's in /usr/src.
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+--- gcc/gccbug.in~ 2003-03-01 00:51:42.000000000 +0100
++++ gcc/gccbug.in 2003-03-02 12:08:36.000000000 +0100
+@@ -134,7 +134,7 @@
+ # If they don't have a preferred editor set, then use
+ if [ -z "$VISUAL" ]; then
+ if [ -z "$EDITOR" ]; then
+- EDIT=vi
++ EDIT=/usr/bin/sensible-editor
+ else
+ EDIT="$EDITOR"
+ fi
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/guile-bizarre b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/guile-bizarre
new file mode 100644
index 0000000..70e2c74
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/guile-bizarre
@@ -0,0 +1,6 @@
+#! /bin/sh
+# -*- scheme -*-
+exec guile -s $0 $*
+# Seen in the wild as build-guile-gtk in libguilegtk-1.2-dev (0.31-5.1)
+# Tests script_is_evil_and_wrong
+!#
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-lsb-broken b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-lsb-broken
new file mode 100644
index 0000000..e4dfa92
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-lsb-broken
@@ -0,0 +1,34 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: bad-lsb
+# Required-Start: $local_fs $remote_fs
+# Required-Stop:
+# Default-Start: 1 2 3 4 5
+# Default-Stop: S 0 1 6 X
+# Short-Description: Example Lintian initscript
+# but this can't be continued
+# Description: An example of a bad LSB section in an init script.
+# This continuation is allowed (with spaces).
+# This one is too (with tabs).
+# X-Debian-Foo: Some unknown but valid keyword.
+# Foo: Some invalid keyword.
+
+# Whoops, no terminating line.
+
+# And then we have this duplicate section.
+### BEGIN INIT INFO
+# Required-Start: This one doesn't count.
+### END INIT INFO
+
+# Hey, look at all of those missing actions! But stop isn't missing.
+case "$1" in
+ start|stop)
+ echo "Blah"
+ ;;
+ *)
+ echo "Usage: foo start" >&2
+ exit 3
+ ;;
+esac
+
+:
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-lsb-other b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-lsb-other
new file mode 100644
index 0000000..adb4795
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-lsb-other
@@ -0,0 +1,22 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: lsb-other
+# Required-Start: $local_fs $remote_fs
+# Required-Stop: $local_fs $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Description: This is another LSB script test, which has a missing
+# Short-Description.
+### END INIT INFO
+
+case "$1" in
+ start|stop|restart|reload|force-reload)
+ echo "Blah"
+ ;;
+ *)
+ echo "Usage: foo start" >&2
+ exit 3
+ ;;
+esac
+
+:
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-no-lsb b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-no-lsb
new file mode 100644
index 0000000..6b994dd
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-no-lsb
@@ -0,0 +1,17 @@
+#! /bin/sh
+# No LSB section, but otherwise okay. (Well, the messages are bad, but we
+# don't check that yet.)
+
+case "$1" in
+ start)
+ echo "Blah starting"
+ ;;
+ stop)
+ echo "Blah stopping"
+ ;;
+ restart|force-reload)
+ echo "Blah restarting"
+ ;;
+esac
+
+:
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-skeleton b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-skeleton
new file mode 100644
index 0000000..c868508
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/init-skeleton
@@ -0,0 +1,150 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: skeleton
+# Required-Start: $local_fs $remote_fs
+# Required-Stop: $local_fs $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: S 0 1 6
+# Short-Description: Example Lintian initscript
+# Description: This file should be used to construct scripts to be
+# placed in /etc/init.d.
+### END INIT INFO
+
+# Do NOT "set -e"
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
+DESC="Description of the service"
+NAME=daemonexecutablename
+DAEMON=/usr/sbin/$NAME
+DAEMON_ARGS="--options args"
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+ # Return
+ # 0 if daemon has been started
+ # 1 if daemon was already running
+ # 2 if daemon could not be started
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
+ || return 1
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+ $DAEMON_ARGS \
+ || return 2
+ # Add code here, if necessary, that waits for the process to be ready
+ # to handle requests from services started subsequently which depend
+ # on this one. As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+ # Return
+ # 0 if daemon has been stopped
+ # 1 if daemon was already stopped
+ # 2 if daemon could not be stopped
+ # other if a failure occurred
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+ RETVAL="$?"
+ [ "$RETVAL" = 2 ] && return 2
+ # Wait for children to finish too if this is a daemon that forks
+ # and if the daemon is only ever run from this initscript.
+ # If the above conditions are not satisfied then add some other code
+ # that waits for the process to drop all resources that could be
+ # needed by services started subsequently. A last resort is to
+ # sleep for some time.
+ start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
+ [ "$?" = 2 ] && return 2
+ # Many daemons don't delete their pidfiles when they exit.
+ rm -f $PIDFILE
+ return "$RETVAL"
+}
+
+#
+# Function that sends a SIGHUP to the daemon/service
+#
+do_reload() {
+ #
+ # If the daemon can reload its configuration without
+ # restarting (for example, when it is sent a SIGHUP),
+ # then implement that here.
+ #
+ start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
+ return 0
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ #reload|force-reload)
+ #
+ # If do_reload() is not implemented then leave this commented out
+ # and leave 'force-reload' as an alias for 'restart'.
+ #
+ #log_daemon_msg "Reloading $DESC" "$NAME"
+ #do_reload
+ #log_end_msg $?
+ #;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented then remove the
+ # 'force-reload' alias
+ #
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ *)
+ #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
+
+:
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/jruby-broken b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/jruby-broken
new file mode 100644
index 0000000..56f574d
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/jruby-broken
@@ -0,0 +1,2 @@
+#!/usr/bin/jruby
+# There's no non-versioned jruby, so this should be an error.
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/lefty-foo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/lefty-foo
new file mode 100644
index 0000000..52c003e
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/lefty-foo
@@ -0,0 +1,2 @@
+#!/usr/local/bin/lefty
+
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/make-foo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/make-foo
new file mode 100644
index 0000000..6b787b5
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/make-foo
@@ -0,0 +1,3 @@
+#!/usr/bin/make
+
+
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perl-bizarre-1 b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perl-bizarre-1
new file mode 100644
index 0000000..fc632c8
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perl-bizarre-1
@@ -0,0 +1,11 @@
+#! /bin/sh
+eval '(exit $?0)' && eval 'PERL_BADLANG=x;export PERL_BADLANG;: \
+;exec perl -x -S -- "$0" ${1+"$@"};#'if 0;
+eval 'setenv PERL_BADLANG x;exec perl -x -S -- "$0" $argv:q;#'.q+
+#!perl -w
+package Htex::a2ping; $0=~/(.*)/s;unshift@INC,'.';do($1);die$@if$@;__END__+if !1;
+# This Perl script was generated by JustLib2 at Wed Apr 23 09:14:13 2003.
+# Don't touch/remove any lines above; http://www.inf.bme.hu/~pts/justlib
+
+# The above was actually seen in the wild and stresses the
+# script_is_evil_and_wrong test.
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perl-bizarre-2 b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perl-bizarre-2
new file mode 100644
index 0000000..afd9cfe
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perl-bizarre-2
@@ -0,0 +1,7 @@
+#!/bin/sh
+eval 'exec /usr/bin/perl -wS $0 ${1+"$@"}'
+ if $running_under_some_shell;
+
+# I'm someone following perlrun except without using the Perl #! line.
+# Now something to choke bash.
+while (<>) { if (/%#/) { print } }
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perl-bizarre-3 b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perl-bizarre-3
new file mode 100644
index 0000000..44baf75
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perl-bizarre-3
@@ -0,0 +1,6 @@
+eval '(exit $?0)' && eval 'exec perl -wS $0 ${1+"$@"}'
+& eval 'exec /usr/bin/perl -wS $0 $argv:q'
+ if $running_under_some_shell;
+
+# More utterly bizarreness from perlrun. This one even doesn't work if
+# there's a valid #! line on the first line. I don't understand why....
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perlfoo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perlfoo
new file mode 100644
index 0000000..5b27ed0
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/perlfoo
@@ -0,0 +1,3 @@
+#! /usr/bin/perl
+
+print "Hello, World!";
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/phpenvfoo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/phpenvfoo
new file mode 100644
index 0000000..cbbfb2e
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/phpenvfoo
@@ -0,0 +1,7 @@
+#!/usr/bin/env php
+<html>
+<head>
+<title>Dumb PHP script</title>
+</head>
+<body><? print(Date("l F d, Y")); ?></body>
+</html>
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/phpfoo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/phpfoo
new file mode 100644
index 0000000..e0595e6
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/phpfoo
@@ -0,0 +1,7 @@
+#!/usr/bin/php
+<html>
+<head>
+<title>Dumb PHP script</title>
+</head>
+<body><? print(Date("l F d, Y")); ?></body>
+</html>
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/rubyfoo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/rubyfoo
new file mode 100644
index 0000000..8024605
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/rubyfoo
@@ -0,0 +1,4 @@
+#!/bin/ruby1.8
+
+# Ok, that example is really pathetic, but until we have
+# some better code in checks/scripts, it will do
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/sh-broken b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/sh-broken
new file mode 100644
index 0000000..7b79074
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/sh-broken
@@ -0,0 +1,2 @@
+#!/bin/sh
+if fi
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/suidperlfoo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/suidperlfoo
new file mode 100644
index 0000000..bcbc471
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/suidperlfoo
@@ -0,0 +1,3 @@
+#! /usr/bin/suidperl
+
+print "Hello, World!";
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/tkfoo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/tkfoo
new file mode 100755
index 0000000..533595a
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/tkfoo
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# Insane amount of empty lines and comments
+
+#
+#
+#
+#
+
+#
+#
+
+#
+#
+#
+
+#
+#
+
+#
+# This line makes the next one a comment in Tcl \
+exec wish "$0" -- ${1+"$@"}
+
+# lintian should not check the following for syntax
+# if it detects the line above correctly
+# Code snippet taken from eTkTab
+
+if { [array names prefs keybindings] != "" } {
+ # Read in the file
+ array set unparsed_bindings [ read_settings_file $prefs(keybindings)]
+}
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/wishfoo b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/wishfoo
new file mode 100644
index 0000000..035c9ad
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/wishfoo
@@ -0,0 +1,4 @@
+#!/usr/bin/wish
+#
+# This is not actually a wish script, here to force a test of wish
+# dependencies.
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/xsession-test b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/xsession-test
new file mode 100644
index 0000000..ca49d72
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/orig/xsession-test
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+echo "Foo."
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/build-spec/pre-build b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/pre-build
new file mode 100755
index 0000000..b5649a8
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/build-spec/pre-build
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+DIR="$1"
+
+rm -f "$DIR/debian/compat"
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/eval/desc b/t/recipes/checks/debian/watch/legacy-scripts/eval/desc
new file mode 100644
index 0000000..dc395d0
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/eval/desc
@@ -0,0 +1,2 @@
+Testname: legacy-scripts
+Check: debian/watch
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/eval/hints b/t/recipes/checks/debian/watch/legacy-scripts/eval/hints
new file mode 100644
index 0000000..eb22aa3
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/eval/hints
@@ -0,0 +1,7 @@
+scripts (source): debian-watch-uses-insecure-uri http://qa.debian.org/watch/sf.php?project=foo [debian/watch:5]
+scripts (source): debian-watch-uses-insecure-uri http://ftp.sf.net/foo/foo_bar(.+)\.Z [debian/watch:8]
+scripts (source): debian-watch-mangles-debian-version-improperly opts="uversionmangle=s/$/ds/" http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate [debian/watch:5]
+scripts (source): debian-watch-lacks-sourceforge-redirector http://ftp.sf.net/foo/foo_bar(.+)\.Z 5 uupdate [debian/watch:8]
+scripts (source): debian-watch-file-uses-deprecated-sf-redirector-method http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate [debian/watch:5]
+scripts (source): debian-watch-file-specifies-old-upstream-version 5 [debian/watch]
+scripts (source): debian-watch-does-not-check-openpgp-signature [debian/watch]
diff --git a/t/recipes/checks/debian/watch/legacy-scripts/eval/post-test b/t/recipes/checks/debian/watch/legacy-scripts/eval/post-test
new file mode 100644
index 0000000..faeef0b
--- /dev/null
+++ b/t/recipes/checks/debian/watch/legacy-scripts/eval/post-test
@@ -0,0 +1 @@
+s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/
diff --git a/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/build-spec/debian/watch b/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/build-spec/debian/watch
new file mode 100644
index 0000000..6cc9db4
--- /dev/null
+++ b/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/build-spec/debian/watch
@@ -0,0 +1,11 @@
+# watch file with no version mangling, even though there's a dfsg in the
+# package version number.
+
+version=2
+https://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz debian uupdate
+
+# version mangling is not needed in this case:
+https://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz 0.24 uupdate
+
+# version mangling *is* needed in this case:
+https://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz
diff --git a/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/build-spec/fill-values b/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/build-spec/fill-values
new file mode 100644
index 0000000..a804d99
--- /dev/null
+++ b/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/build-spec/fill-values
@@ -0,0 +1,4 @@
+Testname: repack-indicator-in-debian-revision
+Skeleton: upload-non-native
+Version: 1-debian1
+Description: Avoid false positives in Devuan (#931846)
diff --git a/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/eval/desc b/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/eval/desc
new file mode 100644
index 0000000..cff1b33
--- /dev/null
+++ b/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/eval/desc
@@ -0,0 +1,2 @@
+Testname: repack-indicator-in-debian-revision
+Check: debian/watch
diff --git a/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/eval/hints b/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/eval/hints
new file mode 100644
index 0000000..e758710
--- /dev/null
+++ b/t/recipes/checks/debian/watch/repack-indicator-in-debian-revision/eval/hints
@@ -0,0 +1 @@
+repack-indicator-in-debian-revision (source): debian-watch-does-not-check-openpgp-signature [debian/watch]
diff --git a/t/recipes/checks/debian/watch/standard/comments-only/build-spec/debian/watch b/t/recipes/checks/debian/watch/standard/comments-only/build-spec/debian/watch
new file mode 100644
index 0000000..b0c64af
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/comments-only/build-spec/debian/watch
@@ -0,0 +1,2 @@
+# explanation for why this file is empty
+# presumably similar to the file that gave rise to Bug#965385
diff --git a/t/recipes/checks/debian/watch/standard/comments-only/build-spec/fill-values b/t/recipes/checks/debian/watch/standard/comments-only/build-spec/fill-values
new file mode 100644
index 0000000..f599495
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/comments-only/build-spec/fill-values
@@ -0,0 +1,3 @@
+Testname: comments-only
+Skeleton: source-non-native
+Description: Only comments in watch file (false positive)
diff --git a/t/recipes/checks/debian/watch/standard/comments-only/eval/desc b/t/recipes/checks/debian/watch/standard/comments-only/eval/desc
new file mode 100644
index 0000000..7edcb5e
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/comments-only/eval/desc
@@ -0,0 +1,7 @@
+Testname: comments-only
+Check: debian/watch/standard
+Test-Against:
+ missing-debian-watch-file-standard
+See-Also:
+ Bug#965385,
+ Bug#992569
diff --git a/t/recipes/checks/debian/watch/standard/comments-only/eval/hints b/t/recipes/checks/debian/watch/standard/comments-only/eval/hints
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/comments-only/eval/hints
@@ -0,0 +1 @@
+
diff --git a/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/README.Debian b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/README.Debian
new file mode 100644
index 0000000..87bfcdf
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/README.Debian
@@ -0,0 +1,7 @@
+foo++ for Debian
+----------------
+
+This should trigger a warning, as i use a fake mail address.
+
+ -- Marc 'HE' Brockschmidt <foo@unknown>, Wed, 14 Apr 2004 01:44:18 +0200
+
diff --git a/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/changelog.in b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/changelog.in
new file mode 100644
index 0000000..f838939
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/changelog.in
@@ -0,0 +1,31 @@
+foo++ ([% $version %]) [% $distribution %]; urgency=low
+
+ * Add a fake README.Debian to trigger a warning.
+ * This should trigger
+ debian-changelog-file-contains-debmake-default-email-address.
+
+ -- Marc 'HE' Brockschmidt <he@unknown> Wed, 14 Apr 2003 01:35:47 +0200
+
+foo++ (4) unstable; urgency=low
+
+ * This changelog now includes a ISO-8859-1 character: 'ä'
+
+ -- Frank Lichtenheld <djpig@debian.org> Fri, 5 Mar 2004 13:41:39 +0100
+
+foo++ (3) unstable; urgency=low
+
+ * Set maintainers + uploaders incorrectly
+
+ -- Jeroen van Wolffelaar <jeroen@wolffelaar.nl> Fri, 5 Mar 2004 04:20:24 +0100
+
+foo++ (2) unstable; urgency=low
+
+ * Added a foo++-helper package to try and catch even more ++ bugs.
+
+ -- Sean 'Shaleh' Perry <shaleh@debian.org> Sat, 10 Feb 2001 23:16:17 -0800
+
+foo++ (1) unstable; urgency=low
+
+ * Initial version
+
+ -- Sean 'Shaleh' Perry <shaleh@debian.org> Thu, 16 Nov 2000 09:11:40 -0800
diff --git a/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/control b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/control
new file mode 100644
index 0000000..57a489c
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/control
@@ -0,0 +1,30 @@
+Source: foo++
+Section: misc
+Priority: optional
+Maintainer: Lintian Maintainer <debian-qa@lists.debian.org>
+Uploaders: Marc 'HE' Brockschmidt <he@unknown>, Jeroen van Wolffelaar<jeroen@localhost.localdomain>,
+ Frank <djpig@debian.org>, Yama@gotchi, Josip,
+ I am afraid of spam and think this helps <no_spam_please AT debian.org>
+Standards-Version: 3.1.1
+XS-Dm-Upload-Allowed: no
+
+Package: foo++
+Architecture: all
+Build-Depends: test
+Depends: test, libssl0.9.7
+Description: see how lintian reacts to plus signs in the package name
+ Regression test to see if lintian tests work on a package with plus signs in
+ its name.
+ .
+ This description uses only UTF-8 high bytes chars.
+
+Package: foo++-helper
+Architecture: all
+Depends: test, foo++
+Description: see how lintian reacts to plus signs in the package name
+ Regression test to see if lintian tests work on a package with plus signs in
+ its name. This has /usr/share/doc links to foo++ to trigger even more checks.
+ .
+ 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.
diff --git a/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/copyright b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/copyright
new file mode 100644
index 0000000..e2d6d93
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/copyright
@@ -0,0 +1,7 @@
+A reference to /usr/share/common-licenses/GPL to make it look like this
+package is under the GPL and trigger the OpenSSL warning.
+
+However, there is also a reference to /usr/share/common-licenses/LGPL, so
+who knows what bits actually depend on libssl.
+
+Copr. 2007 Somebody.
diff --git a/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/rules b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/rules
new file mode 100755
index 0000000..63bb4db
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/rules
@@ -0,0 +1,36 @@
+#!/usr/bin/make -f
+
+foo=foo++
+helper=foo++-helper
+
+build-arch:
+
+build-indep:
+
+build: build-arch build-indep
+
+binary-arch:
+
+binary-indep:
+ install -d debian/$(foo)/DEBIAN
+ install -d debian/$(foo)/usr/share/doc/$(foo)
+ install -m 644 debian/changelog \
+ debian/$(foo)/usr/share/doc/$(foo)/changelog
+ gzip -n -9 debian/$(foo)/usr/share/doc/$(foo)/changelog
+ install -m 644 debian/README.Debian \
+ debian/$(foo)/usr/share/doc/$(foo)/README.Debian
+ gzip -n -9 debian/$(foo)/usr/share/doc/$(foo)/README.Debian
+ dpkg-gencontrol -isp -p$(foo) -Pdebian/$(foo)
+ dpkg --build debian/$(foo) ..
+
+ install -d debian/$(helper)/DEBIAN
+ install -d debian/$(helper)/usr/share/doc/
+ ln -sf $(foo) debian/$(helper)/usr/share/doc/$(helper)
+ dpkg-gencontrol -isp -p$(helper) -Pdebian/$(helper)
+ dpkg --build debian/$(helper) ..
+
+binary: binary-arch binary-indep
+
+clean:
+
+.PHONY: build-arch build-indep build binary-arch binary-indep binary clean
diff --git a/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/watch b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/watch
new file mode 100644
index 0000000..26f9a3c
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/debian/watch
@@ -0,0 +1,6 @@
+# A comment \
+version=0
+
+# uscan does not interpret the backslash above, it is just part of the comment
+
+http://domain.tld/file-(.*)\.tar\.gz
diff --git a/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/fill-values b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/fill-values
new file mode 100644
index 0000000..86d43bc
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-foo++/build-spec/fill-values
@@ -0,0 +1,5 @@
+Skeleton: upload-native
+Testname: legacy-foo++
+Source: foo++
+Version: 5
+Description: Legacy test "foo++"
diff --git a/t/recipes/checks/debian/watch/standard/legacy-foo++/eval/desc b/t/recipes/checks/debian/watch/standard/legacy-foo++/eval/desc
new file mode 100644
index 0000000..fd35332
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-foo++/eval/desc
@@ -0,0 +1,2 @@
+Testname: legacy-foo++
+Check: debian/watch/standard
diff --git a/t/recipes/checks/debian/watch/standard/legacy-foo++/eval/hints b/t/recipes/checks/debian/watch/standard/legacy-foo++/eval/hints
new file mode 100644
index 0000000..6322360
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-foo++/eval/hints
@@ -0,0 +1 @@
+foo++ (source): unknown-debian-watch-file-standard 0 [debian/watch]
diff --git a/t/recipes/checks/debian/watch/standard/legacy-foo++/eval/post-test b/t/recipes/checks/debian/watch/standard/legacy-foo++/eval/post-test
new file mode 100644
index 0000000..faeef0b
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-foo++/eval/post-test
@@ -0,0 +1 @@
+s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/changelog.in b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/changelog.in
new file mode 100644
index 0000000..935c633
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/changelog.in
@@ -0,0 +1,41 @@
+scripts ([% $version %]) [% $distribution %]; urgency=low
+
+ * I'm also not able to write my name.
+ * Added a script in /etc/Xsession.d
+ * Bizarre version number courtesy of
+ https://wiki.ubuntu.com/SecurityUpdateProcedures#Prepare
+
+ -- Mark 'HE' Brokschmitt <he@debian.org> Thu, 23 Jun 2005 14:32:39 +0200
+
+scripts (5-1) unstable; urgency=low
+
+ * I'm making a typo in my own name... And I want lintian to warn me about
+ it.
+
+ -- Jeroen van Wolffelaar <jeroen@wolffelaar.nl> Sun, 18 Apr 2004 02:26:34 +0200
+
+scripts (4-1) unstable; urgency=low
+
+ * Add new example to check that not executable files with a shebang line
+ called *in don't trigger the script-not-executable warning.
+
+ -- Marc 'HE' Brockschmidt <he@debian.org> Wed, 14 Apr 2004 19:44:04 +0200
+
+scripts (3-3) unstable; urgency=low
+
+ * Add suidperlfoo and some code in debian/rules to
+ check the new suidperl checks
+
+ -- Frank Lichtenheld <djpig@debian.org> Wed, 31 Mar 2004 21:06:20 +0000
+
+scripts (2-1) unstable; urgency=low
+
+ * Add tkfoo script for tk checkings
+
+ -- Lintian Maintainers <lintian-maint@debian.org> Sat, 21 Feb 2004 17:13:36 +0100
+
+scripts (1-0) unstable; urgency=low
+
+ * Initial version
+
+ -- Lintian Maintainers <lintian-maint@debian.org> Sat, 10 Feb 2001 15:37:31 -0800
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/control.in b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/control.in
new file mode 100644
index 0000000..75a521f
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/control.in
@@ -0,0 +1,16 @@
+Source: scripts
+Section: interpreters
+Priority: optional
+Maintainer: Lintian Maintainers <lintian-maint@debian.org>
+Uploaders: Jeroen van Wolfelaar <jeroen@wolffelaar.nl>, Marc 'HE' Brockschmidt <he@debian.org>
+Build-Depends-Indep: dpatch
+Standards-Version: 3.2.1
+
+Package: scripts
+Architecture: [% $package_architecture %]
+Depends: test, ruby1.8, build-essential, libssl0.9.7, php7.0-cli
+Recommends: tk8.4 | wish
+Description: test lintian's script file checks
+ 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.
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/copyright b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/copyright
new file mode 100644
index 0000000..ad8a119
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/copyright
@@ -0,0 +1,5 @@
+This file contains the phrase "under the same terms as Perl itself" to
+trigger warnings about not having common-licenses references.
+
+This file contains the phrase "public domain" which should suppress
+warnings about no copyright date.
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/00list b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/00list
new file mode 100644
index 0000000..3b9d37e
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/00list
@@ -0,0 +1,11 @@
+01_not_here_right_now.dpatch
+
+# some comment
+/* some more
+ elaborate comment
+ which needs DPATCH_OPTION_CPP=1
+ */02_i_dont_have_a_description.patch 03_specified_without_dpatch
+
+// and again a comment
+
+04_i_dont_have_a_description_either.patch
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/00list.sparc b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/00list.sparc
new file mode 100644
index 0000000..8b47ab3
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/00list.sparc
@@ -0,0 +1 @@
+01_some_other_patch_thats_not_in_the_package.dpatch
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/00options b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/00options
new file mode 100644
index 0000000..57ffeb6
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/00options
@@ -0,0 +1 @@
+DPATCH_OPTION_CPP=1
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch
new file mode 100644
index 0000000..9279c1b
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/02_i_dont_have_a_description.patch
@@ -0,0 +1,7 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_i_dont_have_a_description.patch.dpatch by Marc 'HE' Brockschmidt <Marc 'HE' Brockschmidt <he@debian.org>>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch
new file mode 100644
index 0000000..8303ac6
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/03_specified_without_dpatch.dpatch
@@ -0,0 +1,5 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Listed in 00list without .dpatch suffix.
+
+@DPATCH@
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch
new file mode 100644
index 0000000..b603f16
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/patches/04_i_dont_have_a_description_either.patch
@@ -0,0 +1,7 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04_i_dont_have_a_description_either.patch by Adam D. Barratt <adam@adam-barratt.org.uk>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP:
+
+@DPATCH@
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/postinst b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/postinst
new file mode 100644
index 0000000..7c5baf1
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/postinst
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+if [ -x "/etc/init.d/lsb-broken" ] ; then
+ update-rc.d lsb-broken defaults >/dev/null
+fi
+if [ -x "/etc/init.d/no-lsb" ] ; then
+ update-rc.d no-lsb defaults >/dev/null
+fi
+if [ -x "/etc/init.d/skeleton" ] ; then
+ update-rc.d skeleton defaults >/dev/null
+fi
+if [ -x "/etc/init.d/lsb-other" ] ; then
+ update-rc.d lsb-other defaults >/dev/null
+fi
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/postrm b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/postrm
new file mode 100644
index 0000000..8fa75a2
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/postrm
@@ -0,0 +1,9 @@
+#!/bin/sh -e
+
+if [ "$1" = purge ] ; then
+ update-rc.d lsb-broken remove >/dev/null
+ update-rc.d no-lsb remove >/dev/null
+ update-rc.d skeleton remove >/dev/null
+ update-rc.d lsb-other remove >/dev/null
+ update-rc.d lsb-other remove >/dev/null
+fi
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/preinst b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/preinst
new file mode 100644
index 0000000..0799557
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/preinst
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+set -e
+set -x
+
+#
+# Some comments here
+#
+
+# This serves as an example of an "empty" script, so
+# please do not add any real code here, thank you :)
+
+#DEBHELPER#
+
+exit 0
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/rules b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/rules
new file mode 100755
index 0000000..ee3677e
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/rules
@@ -0,0 +1,105 @@
+#!/usr/bin/make -f
+
+tmp=debian/tmp
+
+build-arch:
+ echo "Hi, in an arch: all package, I am a bug!"
+
+build-indep:
+
+build: build-arch build-indep
+
+binary-arch:
+ echo "Hi, in an arch: all package, I am a bug!"
+
+binary-indep:
+ install -d $(tmp)/usr/bin/
+ install -d $(tmp)/etc/X11/Xsession.d/
+ install -d $(tmp)/etc/init.d/
+ install -d $(tmp)/etc/csh/login.d/
+ install -d $(tmp)/etc/fish.d/
+ install -d $(tmp)/usr/share/scripts/
+ install -d $(tmp)/usr/share/doc/scripts/
+ install -d $(tmp)/usr/lib/cgi-bin
+ install -d $(tmp)/usr/src/scripts
+ install -d $(tmp)/DEBIAN
+
+ install -m 755 csh-foo $(tmp)/etc/csh/login.d/
+ install -m 755 envfoo $(tmp)/usr/bin/
+ install -m 755 fish-foo $(tmp)/etc/fish.d/
+ install -m 755 jruby-broken $(tmp)/usr/bin/
+ install -m 755 perlfoo $(tmp)/usr/bin/
+ install -m 755 rubyfoo $(tmp)/usr/bin/
+# This doesn't use "env" but should also trigger script-in-usr-share-doc
+ install -m 755 rubyfoo $(tmp)/usr/share/doc/scripts/
+ install -m 755 make-foo $(tmp)/usr/bin/
+ install -m 755 lefty-foo $(tmp)/usr/bin/
+ install -m 4751 perlfoo $(tmp)/usr/bin/suidperlfoo2
+ install -m 755 sh-broken $(tmp)/usr/bin/
+ install -m 4555 suidperlfoo $(tmp)/usr/bin/
+ install -m 755 tkfoo $(tmp)/usr/bin/
+ install -m 755 wishfoo $(tmp)/usr/bin/
+ install -m 644 xsession-test $(tmp)/etc/X11/Xsession.d/
+
+# Permissions here aren't part of what's being tested, but let us exercise
+# some other errors.
+ install -m 755 perl-bizarre-1 $(tmp)/usr/bin/
+ install -m 750 perl-bizarre-2 $(tmp)/usr/bin/
+ install -m 754 perl-bizarre-3 $(tmp)/usr/bin/
+ install -m 705 guile-bizarre $(tmp)/usr/bin/
+
+# First one should produce a warning; second one shouldn't.
+ install -m 755 gccbug.dpatch $(tmp)/usr/share/scripts/
+ install -m 755 gccbug.dpatch $(tmp)/usr/src/scripts/
+
+ install -m 644 init-skeleton $(tmp)/etc/init.d/skeleton
+ install -m 755 init-no-lsb $(tmp)/etc/init.d/no-lsb
+ install -m 755 init-lsb-broken $(tmp)/etc/init.d/lsb-broken
+ install -m 755 init-lsb-other $(tmp)/etc/init.d/lsb-other
+
+ install -m 755 phpfoo $(tmp)/usr/share/scripts/
+ sed 's/php$$/php7.0/' phpfoo > $(tmp)/usr/share/scripts/php7.0foo
+ chmod 755 $(tmp)/usr/share/scripts/php7.0foo
+
+ install -m 755 phpenvfoo $(tmp)/usr/share/scripts/
+ sed 's/php$$/php7.0/' phpenvfoo > $(tmp)/usr/share/scripts/php7.0envfoo
+ chmod 755 $(tmp)/usr/share/scripts/php7.0envfoo
+
+ echo "#!/usr/bin/perl" >> $(tmp)/usr/share/scripts/foobar.in
+ chmod 644 $(tmp)/usr/share/scripts/foobar.in
+
+ touch $(tmp)/usr/share/scripts/mono.exe
+ chmod 755 $(tmp)/usr/share/scripts/mono.exe
+
+ echo "#!/bin/sh" > $(tmp)/usr/share/scripts/foo\$$bar
+ chmod 755 $(tmp)/usr/share/scripts/foo\$$bar
+
+ echo "#!/bin/sh" > $(tmp)/usr/lib/cgi-bin/cgi-script
+ chmod 755 $(tmp)/usr/lib/cgi-bin/cgi-script
+
+ echo "#!/bin/sh" > $(tmp)/usr/bin/test.sh
+ chmod 755 $(tmp)/usr/bin/test.sh
+
+
+ dh_testroot # dummy to test missing debhelper dependency
+
+
+ install -m 644 debian/changelog $(tmp)/usr/share/doc/scripts/changelog.Debian
+ gzip -n -9 $(tmp)/usr/share/doc/scripts/changelog.Debian
+ install -m 644 debian/copyright $(tmp)/usr/share/doc/scripts/copyright
+
+ install -m 644 debian/scripts.conffiles $(tmp)/DEBIAN/conffiles
+ install -m 755 debian/preinst $(tmp)/DEBIAN/preinst
+ install -m 755 debian/postinst $(tmp)/DEBIAN/postinst
+ install -m 755 debian/postrm $(tmp)/DEBIAN/postrm
+ touch $(tmp)/DEBIAN/prerm
+ chmod 755 $(tmp)/DEBIAN/prerm
+ dpkg-gencontrol -isp
+ dpkg --build $(tmp) ..
+
+binary: binary-arch binary-indep
+
+clean:
+ rm -rf debian/files $(tmp) debian/substvars
+
+.PHONY: build-arch build-indep build binary-arch binary-indep binary clean
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/scripts.conffiles b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/scripts.conffiles
new file mode 100644
index 0000000..01a371a
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/scripts.conffiles
@@ -0,0 +1,6 @@
+/etc/init.d/lsb-broken
+/etc/init.d/lsb-other
+/etc/init.d/no-lsb
+/etc/X11/Xsession.d/xsession-test
+/etc/csh/login.d/csh-foo
+/etc/fish.d/fish-foo
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/watch b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/watch
new file mode 100644
index 0000000..dba5815
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/debian/watch
@@ -0,0 +1,8 @@
+# watch file with upstream version mangling
+
+version=2
+opts="uversionmangle=s/$/ds/" \
+http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate
+
+version=3
+http://ftp.sf.net/foo/foo_bar(.+)\.Z 5 uupdate \ No newline at end of file
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/fill-values b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/fill-values
new file mode 100644
index 0000000..8a68457
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/fill-values
@@ -0,0 +1,6 @@
+Testname: legacy-scripts
+Source: scripts
+Version: 6ds-1ubuntu0.5.10.1
+Package-Architecture: all
+Skeleton: upload-non-native
+Description: Legacy test "scripts"
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/csh-foo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/csh-foo
new file mode 100644
index 0000000..eaf47a1
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/csh-foo
@@ -0,0 +1,2 @@
+#! /bin/csh
+
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/envfoo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/envfoo
new file mode 100755
index 0000000..e005037
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/envfoo
@@ -0,0 +1,4 @@
+#! /bin/env python
+
+if __name__ == '__main__':
+ print 'Hi there'
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/fish-foo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/fish-foo
new file mode 100644
index 0000000..7f59139
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/fish-foo
@@ -0,0 +1,2 @@
+#! /usr/bin/fish
+
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/gccbug.dpatch b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/gccbug.dpatch
new file mode 100755
index 0000000..65cbf37
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/gccbug.dpatch
@@ -0,0 +1,39 @@
+#! /bin/sh -e
+
+# DP: Use sensible-editor instead of vi as fallback editor
+
+# Taken from gcc-4.1-source. Chokes bash -n (due to the patch) despite being
+# a valid dpatch, so don't warn about it if it's in /usr/src.
+
+dir=
+if [ $# -eq 3 -a "$2" = '-d' ]; then
+ pdir="-d $3"
+ dir="$3/"
+elif [ $# -ne 1 ]; then
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+fi
+case "$1" in
+ -patch)
+ patch $pdir -f --no-backup-if-mismatch -p0 < $0
+ ;;
+ -unpatch)
+ patch $pdir -f --no-backup-if-mismatch -R -p0 < $0
+ ;;
+ *)
+ echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+ exit 1
+esac
+exit 0
+
+--- gcc/gccbug.in~ 2003-03-01 00:51:42.000000000 +0100
++++ gcc/gccbug.in 2003-03-02 12:08:36.000000000 +0100
+@@ -134,7 +134,7 @@
+ # If they don't have a preferred editor set, then use
+ if [ -z "$VISUAL" ]; then
+ if [ -z "$EDITOR" ]; then
+- EDIT=vi
++ EDIT=/usr/bin/sensible-editor
+ else
+ EDIT="$EDITOR"
+ fi
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/guile-bizarre b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/guile-bizarre
new file mode 100644
index 0000000..70e2c74
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/guile-bizarre
@@ -0,0 +1,6 @@
+#! /bin/sh
+# -*- scheme -*-
+exec guile -s $0 $*
+# Seen in the wild as build-guile-gtk in libguilegtk-1.2-dev (0.31-5.1)
+# Tests script_is_evil_and_wrong
+!#
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-lsb-broken b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-lsb-broken
new file mode 100644
index 0000000..e4dfa92
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-lsb-broken
@@ -0,0 +1,34 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: bad-lsb
+# Required-Start: $local_fs $remote_fs
+# Required-Stop:
+# Default-Start: 1 2 3 4 5
+# Default-Stop: S 0 1 6 X
+# Short-Description: Example Lintian initscript
+# but this can't be continued
+# Description: An example of a bad LSB section in an init script.
+# This continuation is allowed (with spaces).
+# This one is too (with tabs).
+# X-Debian-Foo: Some unknown but valid keyword.
+# Foo: Some invalid keyword.
+
+# Whoops, no terminating line.
+
+# And then we have this duplicate section.
+### BEGIN INIT INFO
+# Required-Start: This one doesn't count.
+### END INIT INFO
+
+# Hey, look at all of those missing actions! But stop isn't missing.
+case "$1" in
+ start|stop)
+ echo "Blah"
+ ;;
+ *)
+ echo "Usage: foo start" >&2
+ exit 3
+ ;;
+esac
+
+:
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-lsb-other b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-lsb-other
new file mode 100644
index 0000000..adb4795
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-lsb-other
@@ -0,0 +1,22 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: lsb-other
+# Required-Start: $local_fs $remote_fs
+# Required-Stop: $local_fs $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Description: This is another LSB script test, which has a missing
+# Short-Description.
+### END INIT INFO
+
+case "$1" in
+ start|stop|restart|reload|force-reload)
+ echo "Blah"
+ ;;
+ *)
+ echo "Usage: foo start" >&2
+ exit 3
+ ;;
+esac
+
+:
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-no-lsb b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-no-lsb
new file mode 100644
index 0000000..6b994dd
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-no-lsb
@@ -0,0 +1,17 @@
+#! /bin/sh
+# No LSB section, but otherwise okay. (Well, the messages are bad, but we
+# don't check that yet.)
+
+case "$1" in
+ start)
+ echo "Blah starting"
+ ;;
+ stop)
+ echo "Blah stopping"
+ ;;
+ restart|force-reload)
+ echo "Blah restarting"
+ ;;
+esac
+
+:
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-skeleton b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-skeleton
new file mode 100644
index 0000000..c868508
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/init-skeleton
@@ -0,0 +1,150 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: skeleton
+# Required-Start: $local_fs $remote_fs
+# Required-Stop: $local_fs $remote_fs
+# Default-Start: 2 3 4 5
+# Default-Stop: S 0 1 6
+# Short-Description: Example Lintian initscript
+# Description: This file should be used to construct scripts to be
+# placed in /etc/init.d.
+### END INIT INFO
+
+# Do NOT "set -e"
+
+# PATH should only include /usr/* if it runs after the mountnfs.sh script
+PATH=/usr/sbin:/usr/bin:/sbin:/bin
+DESC="Description of the service"
+NAME=daemonexecutablename
+DAEMON=/usr/sbin/$NAME
+DAEMON_ARGS="--options args"
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+
+# Exit if the package is not installed
+[ -x "$DAEMON" ] || exit 0
+
+# Read configuration variable file if it is present
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+# Load the VERBOSE setting and other rcS variables
+[ -f /etc/default/rcS ] && . /etc/default/rcS
+
+# Define LSB log_* functions.
+# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
+. /lib/lsb/init-functions
+
+#
+# Function that starts the daemon/service
+#
+do_start()
+{
+ # Return
+ # 0 if daemon has been started
+ # 1 if daemon was already running
+ # 2 if daemon could not be started
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
+ || return 1
+ start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
+ $DAEMON_ARGS \
+ || return 2
+ # Add code here, if necessary, that waits for the process to be ready
+ # to handle requests from services started subsequently which depend
+ # on this one. As a last resort, sleep for some time.
+}
+
+#
+# Function that stops the daemon/service
+#
+do_stop()
+{
+ # Return
+ # 0 if daemon has been stopped
+ # 1 if daemon was already stopped
+ # 2 if daemon could not be stopped
+ # other if a failure occurred
+ start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
+ RETVAL="$?"
+ [ "$RETVAL" = 2 ] && return 2
+ # Wait for children to finish too if this is a daemon that forks
+ # and if the daemon is only ever run from this initscript.
+ # If the above conditions are not satisfied then add some other code
+ # that waits for the process to drop all resources that could be
+ # needed by services started subsequently. A last resort is to
+ # sleep for some time.
+ start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON
+ [ "$?" = 2 ] && return 2
+ # Many daemons don't delete their pidfiles when they exit.
+ rm -f $PIDFILE
+ return "$RETVAL"
+}
+
+#
+# Function that sends a SIGHUP to the daemon/service
+#
+do_reload() {
+ #
+ # If the daemon can reload its configuration without
+ # restarting (for example, when it is sent a SIGHUP),
+ # then implement that here.
+ #
+ start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
+ return 0
+}
+
+case "$1" in
+ start)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+ do_start
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ stop)
+ [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
+ 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+ esac
+ ;;
+ #reload|force-reload)
+ #
+ # If do_reload() is not implemented then leave this commented out
+ # and leave 'force-reload' as an alias for 'restart'.
+ #
+ #log_daemon_msg "Reloading $DESC" "$NAME"
+ #do_reload
+ #log_end_msg $?
+ #;;
+ restart|force-reload)
+ #
+ # If the "reload" option is implemented then remove the
+ # 'force-reload' alias
+ #
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+ *)
+ #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
+
+:
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/jruby-broken b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/jruby-broken
new file mode 100644
index 0000000..56f574d
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/jruby-broken
@@ -0,0 +1,2 @@
+#!/usr/bin/jruby
+# There's no non-versioned jruby, so this should be an error.
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/lefty-foo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/lefty-foo
new file mode 100644
index 0000000..52c003e
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/lefty-foo
@@ -0,0 +1,2 @@
+#!/usr/local/bin/lefty
+
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/make-foo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/make-foo
new file mode 100644
index 0000000..6b787b5
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/make-foo
@@ -0,0 +1,3 @@
+#!/usr/bin/make
+
+
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perl-bizarre-1 b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perl-bizarre-1
new file mode 100644
index 0000000..fc632c8
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perl-bizarre-1
@@ -0,0 +1,11 @@
+#! /bin/sh
+eval '(exit $?0)' && eval 'PERL_BADLANG=x;export PERL_BADLANG;: \
+;exec perl -x -S -- "$0" ${1+"$@"};#'if 0;
+eval 'setenv PERL_BADLANG x;exec perl -x -S -- "$0" $argv:q;#'.q+
+#!perl -w
+package Htex::a2ping; $0=~/(.*)/s;unshift@INC,'.';do($1);die$@if$@;__END__+if !1;
+# This Perl script was generated by JustLib2 at Wed Apr 23 09:14:13 2003.
+# Don't touch/remove any lines above; http://www.inf.bme.hu/~pts/justlib
+
+# The above was actually seen in the wild and stresses the
+# script_is_evil_and_wrong test.
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perl-bizarre-2 b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perl-bizarre-2
new file mode 100644
index 0000000..afd9cfe
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perl-bizarre-2
@@ -0,0 +1,7 @@
+#!/bin/sh
+eval 'exec /usr/bin/perl -wS $0 ${1+"$@"}'
+ if $running_under_some_shell;
+
+# I'm someone following perlrun except without using the Perl #! line.
+# Now something to choke bash.
+while (<>) { if (/%#/) { print } }
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perl-bizarre-3 b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perl-bizarre-3
new file mode 100644
index 0000000..44baf75
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perl-bizarre-3
@@ -0,0 +1,6 @@
+eval '(exit $?0)' && eval 'exec perl -wS $0 ${1+"$@"}'
+& eval 'exec /usr/bin/perl -wS $0 $argv:q'
+ if $running_under_some_shell;
+
+# More utterly bizarreness from perlrun. This one even doesn't work if
+# there's a valid #! line on the first line. I don't understand why....
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perlfoo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perlfoo
new file mode 100644
index 0000000..5b27ed0
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/perlfoo
@@ -0,0 +1,3 @@
+#! /usr/bin/perl
+
+print "Hello, World!";
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/phpenvfoo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/phpenvfoo
new file mode 100644
index 0000000..cbbfb2e
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/phpenvfoo
@@ -0,0 +1,7 @@
+#!/usr/bin/env php
+<html>
+<head>
+<title>Dumb PHP script</title>
+</head>
+<body><? print(Date("l F d, Y")); ?></body>
+</html>
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/phpfoo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/phpfoo
new file mode 100644
index 0000000..e0595e6
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/phpfoo
@@ -0,0 +1,7 @@
+#!/usr/bin/php
+<html>
+<head>
+<title>Dumb PHP script</title>
+</head>
+<body><? print(Date("l F d, Y")); ?></body>
+</html>
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/rubyfoo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/rubyfoo
new file mode 100644
index 0000000..8024605
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/rubyfoo
@@ -0,0 +1,4 @@
+#!/bin/ruby1.8
+
+# Ok, that example is really pathetic, but until we have
+# some better code in checks/scripts, it will do
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/sh-broken b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/sh-broken
new file mode 100644
index 0000000..7b79074
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/sh-broken
@@ -0,0 +1,2 @@
+#!/bin/sh
+if fi
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/suidperlfoo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/suidperlfoo
new file mode 100644
index 0000000..bcbc471
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/suidperlfoo
@@ -0,0 +1,3 @@
+#! /usr/bin/suidperl
+
+print "Hello, World!";
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/tkfoo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/tkfoo
new file mode 100755
index 0000000..533595a
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/tkfoo
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# Insane amount of empty lines and comments
+
+#
+#
+#
+#
+
+#
+#
+
+#
+#
+#
+
+#
+#
+
+#
+# This line makes the next one a comment in Tcl \
+exec wish "$0" -- ${1+"$@"}
+
+# lintian should not check the following for syntax
+# if it detects the line above correctly
+# Code snippet taken from eTkTab
+
+if { [array names prefs keybindings] != "" } {
+ # Read in the file
+ array set unparsed_bindings [ read_settings_file $prefs(keybindings)]
+}
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/wishfoo b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/wishfoo
new file mode 100644
index 0000000..035c9ad
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/wishfoo
@@ -0,0 +1,4 @@
+#!/usr/bin/wish
+#
+# This is not actually a wish script, here to force a test of wish
+# dependencies.
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/xsession-test b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/xsession-test
new file mode 100644
index 0000000..ca49d72
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/orig/xsession-test
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+echo "Foo."
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/pre-build b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/pre-build
new file mode 100755
index 0000000..b5649a8
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/build-spec/pre-build
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+DIR="$1"
+
+rm -f "$DIR/debian/compat"
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/eval/desc b/t/recipes/checks/debian/watch/standard/legacy-scripts/eval/desc
new file mode 100644
index 0000000..b13e704
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/eval/desc
@@ -0,0 +1,2 @@
+Testname: legacy-scripts
+Check: debian/watch/standard
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/eval/hints b/t/recipes/checks/debian/watch/standard/legacy-scripts/eval/hints
new file mode 100644
index 0000000..8c75be5
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/eval/hints
@@ -0,0 +1,3 @@
+scripts (source): older-debian-watch-file-standard 3 [debian/watch]
+scripts (source): multiple-debian-watch-file-standards 2 3 [debian/watch]
+scripts (source): debian-watch-file-standard 3 [debian/watch]
diff --git a/t/recipes/checks/debian/watch/standard/legacy-scripts/eval/post-test b/t/recipes/checks/debian/watch/standard/legacy-scripts/eval/post-test
new file mode 100644
index 0000000..faeef0b
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/legacy-scripts/eval/post-test
@@ -0,0 +1 @@
+s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/
diff --git a/t/recipes/checks/debian/watch/standard/no-version/build-spec/debian/watch b/t/recipes/checks/debian/watch/standard/no-version/build-spec/debian/watch
new file mode 100644
index 0000000..4d3b502
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/no-version/build-spec/debian/watch
@@ -0,0 +1 @@
+http://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz debian uupdate
diff --git a/t/recipes/checks/debian/watch/standard/no-version/build-spec/fill-values b/t/recipes/checks/debian/watch/standard/no-version/build-spec/fill-values
new file mode 100644
index 0000000..41649e0
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/no-version/build-spec/fill-values
@@ -0,0 +1,3 @@
+Testname: no-version
+Skeleton: upload-non-native
+Description: Watch file with no version
diff --git a/t/recipes/checks/debian/watch/standard/no-version/eval/desc b/t/recipes/checks/debian/watch/standard/no-version/eval/desc
new file mode 100644
index 0000000..c16a93c
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/no-version/eval/desc
@@ -0,0 +1,2 @@
+Testname: no-version
+Check: debian/watch/standard
diff --git a/t/recipes/checks/debian/watch/standard/no-version/eval/hints b/t/recipes/checks/debian/watch/standard/no-version/eval/hints
new file mode 100644
index 0000000..b3051e0
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/no-version/eval/hints
@@ -0,0 +1 @@
+no-version (source): missing-debian-watch-file-standard [debian/watch]
diff --git a/t/recipes/checks/debian/watch/standard/version-1/build-spec/debian/watch b/t/recipes/checks/debian/watch/standard/version-1/build-spec/debian/watch
new file mode 100644
index 0000000..8cd5a87
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/version-1/build-spec/debian/watch
@@ -0,0 +1,2 @@
+version=1
+http://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz debian uupdate
diff --git a/t/recipes/checks/debian/watch/standard/version-1/build-spec/fill-values b/t/recipes/checks/debian/watch/standard/version-1/build-spec/fill-values
new file mode 100644
index 0000000..1f9c306
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/version-1/build-spec/fill-values
@@ -0,0 +1,3 @@
+Testname: version-1
+Skeleton: upload-non-native
+Description: Watch file of version 1
diff --git a/t/recipes/checks/debian/watch/standard/version-1/eval/desc b/t/recipes/checks/debian/watch/standard/version-1/eval/desc
new file mode 100644
index 0000000..0304f2e
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/version-1/eval/desc
@@ -0,0 +1,2 @@
+Testname: version-1
+Check: debian/watch/standard
diff --git a/t/recipes/checks/debian/watch/standard/version-1/eval/hints b/t/recipes/checks/debian/watch/standard/version-1/eval/hints
new file mode 100644
index 0000000..6d27d24
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/version-1/eval/hints
@@ -0,0 +1 @@
+version-1 (source): unknown-debian-watch-file-standard 1 [debian/watch]
diff --git a/t/recipes/checks/debian/watch/standard/version-2/build-spec/debian/watch b/t/recipes/checks/debian/watch/standard/version-2/build-spec/debian/watch
new file mode 100644
index 0000000..a201846
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/version-2/build-spec/debian/watch
@@ -0,0 +1,2 @@
+version=2
+http://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz debian uupdate
diff --git a/t/recipes/checks/debian/watch/standard/version-2/build-spec/fill-values b/t/recipes/checks/debian/watch/standard/version-2/build-spec/fill-values
new file mode 100644
index 0000000..d00cdfa
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/version-2/build-spec/fill-values
@@ -0,0 +1,3 @@
+Testname: version-2
+Skeleton: upload-non-native
+Description: Watch file of version 2
diff --git a/t/recipes/checks/debian/watch/standard/version-2/eval/desc b/t/recipes/checks/debian/watch/standard/version-2/eval/desc
new file mode 100644
index 0000000..3d5177c
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/version-2/eval/desc
@@ -0,0 +1,2 @@
+Testname: version-2
+Check: debian/watch/standard
diff --git a/t/recipes/checks/debian/watch/standard/version-2/eval/hints b/t/recipes/checks/debian/watch/standard/version-2/eval/hints
new file mode 100644
index 0000000..fd0f141
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/version-2/eval/hints
@@ -0,0 +1,2 @@
+version-2 (source): obsolete-debian-watch-file-standard 2 [debian/watch]
+version-2 (source): debian-watch-file-standard 2 [debian/watch]
diff --git a/t/recipes/checks/debian/watch/standard/version-3/build-spec/debian/watch b/t/recipes/checks/debian/watch/standard/version-3/build-spec/debian/watch
new file mode 100644
index 0000000..5750c6f
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/version-3/build-spec/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz debian uupdate
diff --git a/t/recipes/checks/debian/watch/standard/version-3/build-spec/fill-values b/t/recipes/checks/debian/watch/standard/version-3/build-spec/fill-values
new file mode 100644
index 0000000..ec6b701
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/version-3/build-spec/fill-values
@@ -0,0 +1,3 @@
+Testname: version-3
+Skeleton: upload-non-native
+Description: Watch file of version 3
diff --git a/t/recipes/checks/debian/watch/standard/version-3/eval/desc b/t/recipes/checks/debian/watch/standard/version-3/eval/desc
new file mode 100644
index 0000000..fbb5105
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/version-3/eval/desc
@@ -0,0 +1,2 @@
+Testname: version-3
+Check: debian/watch/standard
diff --git a/t/recipes/checks/debian/watch/standard/version-3/eval/hints b/t/recipes/checks/debian/watch/standard/version-3/eval/hints
new file mode 100644
index 0000000..31501a1
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/version-3/eval/hints
@@ -0,0 +1,2 @@
+version-3 (source): older-debian-watch-file-standard 3 [debian/watch]
+version-3 (source): debian-watch-file-standard 3 [debian/watch]
diff --git a/t/recipes/checks/debian/watch/standard/version-4/build-spec/debian/watch b/t/recipes/checks/debian/watch/standard/version-4/build-spec/debian/watch
new file mode 100644
index 0000000..259bb88
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/version-4/build-spec/debian/watch
@@ -0,0 +1,2 @@
+version=4
+http://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz debian uupdate
diff --git a/t/recipes/checks/debian/watch/standard/version-4/build-spec/fill-values b/t/recipes/checks/debian/watch/standard/version-4/build-spec/fill-values
new file mode 100644
index 0000000..d7fd7de
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/version-4/build-spec/fill-values
@@ -0,0 +1,3 @@
+Testname: version-4
+Skeleton: upload-non-native
+Description: Watch file of version 4
diff --git a/t/recipes/checks/debian/watch/standard/version-4/eval/desc b/t/recipes/checks/debian/watch/standard/version-4/eval/desc
new file mode 100644
index 0000000..4c3c00e
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/version-4/eval/desc
@@ -0,0 +1,2 @@
+Testname: version-4
+Check: debian/watch/standard
diff --git a/t/recipes/checks/debian/watch/standard/version-4/eval/hints b/t/recipes/checks/debian/watch/standard/version-4/eval/hints
new file mode 100644
index 0000000..244ebd0
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/version-4/eval/hints
@@ -0,0 +1 @@
+version-4 (source): debian-watch-file-standard 4 [debian/watch]
diff --git a/t/recipes/checks/debian/watch/standard/version-5/build-spec/debian/watch b/t/recipes/checks/debian/watch/standard/version-5/build-spec/debian/watch
new file mode 100644
index 0000000..6b8a6f4
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/version-5/build-spec/debian/watch
@@ -0,0 +1,2 @@
+version=5
+http://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz debian uupdate
diff --git a/t/recipes/checks/debian/watch/standard/version-5/build-spec/fill-values b/t/recipes/checks/debian/watch/standard/version-5/build-spec/fill-values
new file mode 100644
index 0000000..7f069bb
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/version-5/build-spec/fill-values
@@ -0,0 +1,3 @@
+Testname: version-5
+Skeleton: upload-non-native
+Description: Watch file of version 5
diff --git a/t/recipes/checks/debian/watch/standard/version-5/eval/desc b/t/recipes/checks/debian/watch/standard/version-5/eval/desc
new file mode 100644
index 0000000..cd8cc36
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/version-5/eval/desc
@@ -0,0 +1,2 @@
+Testname: version-5
+Check: debian/watch/standard
diff --git a/t/recipes/checks/debian/watch/standard/version-5/eval/hints b/t/recipes/checks/debian/watch/standard/version-5/eval/hints
new file mode 100644
index 0000000..5ebdc82
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/version-5/eval/hints
@@ -0,0 +1 @@
+version-5 (source): unknown-debian-watch-file-standard 5 [debian/watch]
diff --git a/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/debian/changelog.in b/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/debian/changelog.in
new file mode 100644
index 0000000..2340930
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/debian/changelog.in
@@ -0,0 +1,14 @@
+[% $source %] ([% $version %]) unstable; urgency=low
+
+ * Lintian Test Suite.
+ * Test: [% $testname %]
+
+ * Suppress "should close ITP bug" messages. (Closes: #123456)
+
+ -- [% $author %] [% $date %]
+
+[% $source %] (1.0-1) unstable; urgency=low
+
+ * Provoke debian-watch-file-specifies-old-upstream-version.
+
+ -- [% $author %] Thu, 01 Jan 2009 08:34:20 -0800
diff --git a/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/debian/upstream/signing-key.asc b/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/debian/upstream/signing-key.asc
new file mode 100644
index 0000000..d83f52c
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/debian/upstream/signing-key.asc
@@ -0,0 +1,52 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mQINBFpEMFgBEADNYEVhITIZ/rVECuLWxDJUk4rV+v6IfJCxJzuXRfqbjkdLNsCD
+P83FOdvcxNQSrWPdSCgV1tDeDc18pNmfWDnu90zrLRipR1u7ln/ajTpx0RI7tHaO
+SCIJfo42iw7firz9IoegqZaH8LKCh63EaXxLD98MgRA9fcBTEaBSD+Wxh8yYL/5b
+bjdUu2FNNEi8f0POBAB3XInu80mqkEeVYPijd2T8Tc5xaxD90OBuuNGSiqKrJ+lB
+9TSxwr5E/9N+6fnCjrR4FVkZtyTELAdZm4CpQN26tinVolG1gDpMz5B27471oXPY
+9K92/UzTRllwuZ09pdBwpd4gu9mTXMLwOJ/S/+LJeSfCmby7QZiM/61NpS5EyaYg
+h+m8YyTUtulFqpWd2HxttXz0ii5C01LKUrNPqlQrxmfrACJ1tHvcngVQm4wyqMHq
+Uw5LYJ8FM7eS3JPeHpHqFGpY1VKx3nZAZGx+1As1ClvT7Og1KyuVY59w8qNaeJ8C
+eA9XrwGVbMm9PiTP+fyBykMaYpf5aGucH+GeBtkvmpyOyXqf7zrOqyRvY0QaMgt1
+n3jXcD7AZKHCp0wY6LYVa/sKqrDJtxoloBA6kV2Ui3kClOWmlfvm+i1Ecg7vCG8d
+QrJtZxo1Wu54dIr+g0qMFjlBA69OFYRXPzoaWFW1BKtNAYFoej9vW/f+0wARAQAB
+tDtMaW50aWFuIFRlc3QgVXBzdHJlYW0gS2V5IChXb3JraW5nLCBObyBFeHBpcmF0
+aW9uLCBNaW5pbWFsKYkCTgQTAQoAOBYhBPr6VG+KNaSTu27AqFtc4nOV5lb+BQJa
+RDBYAhsDBQsJCAcDBRUKCQgLBRYDAgEAAh4BAheAAAoJEFtc4nOV5lb+B3kQAMMm
+umaOq12REmLdKWMN7GOsxzV6fTF5xBjTgKfY9DCBeNV7tSuJGpGT9MaxRD5Yu/1p
+PDMGC9TkDxOEULBucmp7M//3FCuSnGQFBcObHNXY9FmLQ5MZJ32QUi8KLNIcDjuF
+AKMEYJ5AT50pBsGyLVGXL27HWndNV7jMeIX64gIN5chPKMHqCn0g/wTTaPY/kkEs
+MYirGmBQ83cIAv/1nywtIPeBnj+02Vu3B1hJIZYgmDQZwjZdd7HTxsVW0LAZEXs5
+gtWArfHO3zNKy6WkVE+xhNgZuVO3EyV46JW0bQ2RC7yY70/qFxX71co6p2+VaZgf
+198QtRddq9cKaSe68BnZesIp9YnT3xJVYeL6IrrMYNIZxlslL4/b+gKU3epHyFes
+tQP1tqkhnmC+Bxds6kx0ngPVfTfWM4Ruaeot51BuenZu82S1B3FB5B0qruCNyKre
+nl53nPaNkOERPOF654AXoIODTgnyaocCaQTPztOYm52X8u9qogf9wf1eEA9EZIBI
+WSbn3eCohN6qWvsdC0MMRDu0HB4S1QUyyOceNflXePg6SPvJSPHuOG/5DShcN6ah
+mgVMH44ecAWsh/8Uj1+Z39Ea07nfE3lCU/WR+DXJb56WaQChXN7AKITrNRd/Q61X
+jqrB6jWRSeVBKDidsFwI7oALdSgONE/ZEy+M4j76uQINBFpEMFgBEADCWJECQ6K1
+HgH7OwX7eY8ggEdCOYI/cTGx9rfzdqx67tc7fsF63BrO+nTHylcwXi9IAs695zvp
+miCnCu1EUVjfM+nD52kocVEhzFc/lcCq6d9ac7H9ItJgf3Qc2HpwcqvsNUTWPDMU
+VjQ8ciZ57qq601kIjVPuHjKRY96K9iHxUeVGh2n74JLYZL5IKO08WtQgPmPVLFDX
+X2iZXnZdW/X4xTYB+/+V/D1LyUIP3X7CzBNzJuYjP3vGDH3h4ulLWnDSmxKs6Aep
+a0sKu6+YD14/xXOi+buc0m6ghP7WePl9gYi6XePLdVPeLC9aiDi1tCWEVbbsinhw
+ODxLwndXCGUc+AVySdUrUMuRchNRI6Z5PW/a/RsuVmyORg1RSuFGLeJQZj1pAw6x
+WjxgioqoqydECIx4gCwGO/0GNZCfe5n11vuMEZ7SKbnrf5d58EQXOgV+yZumRKkz
+OmdKICjql6w5CealrvP/si2kfD3oVwqBeuM0aM8HmWTfrdESWrd8xqAxBlcDsIun
+mpsJ6obGN2mOaMFmOljukdzDFgMJMIrcS4UcGNzyQWUbz6JOSfPq96RkrTVsXMKy
+40Ygtwe63PS9lXGT2ojmiV193UrGJqEUjuAL79KXWkxTRFxvFwck9qK5RAX2F1GQ
+4ELDAFSKr8t6IpiYiTXaA3OTJfxJMK191QARAQABiQI2BBgBCgAgFiEE+vpUb4o1
+pJO7bsCoW1zic5XmVv4FAlpEMFgCGwwACgkQW1zic5XmVv4VEA//dOFj60ktKKsl
+CgRdtnuo9Sdd7IjShic67qoT0gFZRiMATaryM4ifjAcl03rxzGk5MOsltHFJr5h+
+RmaudKhCyksd1nQ2dBpFgPHyxVTS5/k+wMelP9kPailqiGUA735SP5mO/28YOT8v
+Xa4rwnTn6s9Ga7+lMN4I7LKRo47uGG89Og381tHSkW8DjFuLTme3TQDysG2MGlSY
+vTPJmF7xPCuG3s8J5RIrVwWbN0orWen9YWT1923+0CAZG8M+7AFxU5xxCFIBRKMw
+2tw/ovjtE9czuT743LMPlUJRc1pveYjVhLY9xUMQsPO6j41pdIL2X7txFjQqzjFl
+hpIJviupVWlV0vSS0Q7nAtvLTsjhXSyQriKqmfdsdcxXBz7LGRxEi5l/9zuW5GMy
+kD5ikQ05li6wkBdQYLS3ZBYkrj94LpNEqNZE3sfX33Yc5cpE2Bc4Ga+MxYxQwrfz
+sNNSp8jdf2FyFvlvRkO8UUgsW5PPOuwthb05bx7dQGfKvqySpd0JLrhxw8G8odJh
+PGzl0ig4F8xEitMc0lms5yzQGvtpEvSYLUs+4EJaf/XN9nRS+4e+GciTmp9XUM/5
+EtKOKXVuhHyaizqfpF4VR0Tbg65HHE3zLJMr7XTUGC0Zr+bj0n/V177R0XgptY7Y
+jr6SfdNikIDjGYa+yuN6KGQsriza1aA=
+=CYsi
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/debian/watch b/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/debian/watch
new file mode 100644
index 0000000..dc196dd
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/debian/watch
@@ -0,0 +1,32 @@
+# watch file with upstream version mangling
+
+version=2
+opts="uversionmangle=s/$/ds/" \
+http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate
+
+version=3
+http://ftp.sf.net/foo/foo_bar(.+)\.Z 5 uupdate
+
+# Test additional Sourceforge patterns. (See Bug#510398)
+ftp://upload.sourceforge.net/pub/sourceforge/s/so/soprano/ \
+ soprano-(.*)\.tar\.bz2
+http://sourceforge.net/project/showfiles.php?group_id=100501 \
+ .*/octaviz/octaviz-([\d\.]+).tar.gz.*
+http://sourceforge.net/projects/synce/files http://downloads.sourceforge.net/.+/kcemirror-(.+).tar.gz.*
+
+# Unknown version number.
+version=42
+
+# Specifies the same version number as the package.
+https://example.com/ foo([\d.]+)\.tar\.gz 2.0.ds1-1 uupdate
+
+# Deprecated githubredir
+http://githubredir.debian.net/github/username/project /(.*).tar.gz
+
+# without any pgpsigurlmangle
+
+http://insecure.com /(.*).tar.gz
+https://secure.com /(.*).tar.gz
+
+# False positive for debian-watch-uses-insecure-uri
+http://sf.net/uses/redirector-([^-]+)\.tar\.gz
diff --git a/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/fill-values b/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/fill-values
new file mode 100644
index 0000000..185084f
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/watch-file-general/build-spec/fill-values
@@ -0,0 +1,4 @@
+Testname: watch-file-general
+Skeleton: upload-non-native
+Version: 2.0.ds1-1
+Description: General watch file checks
diff --git a/t/recipes/checks/debian/watch/standard/watch-file-general/eval/desc b/t/recipes/checks/debian/watch/standard/watch-file-general/eval/desc
new file mode 100644
index 0000000..f376aa2
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/watch-file-general/eval/desc
@@ -0,0 +1,3 @@
+Testname: watch-file-general
+See-Also: Debian Bug#510398
+Check: debian/watch/standard
diff --git a/t/recipes/checks/debian/watch/standard/watch-file-general/eval/hints b/t/recipes/checks/debian/watch/standard/watch-file-general/eval/hints
new file mode 100644
index 0000000..75c45f7
--- /dev/null
+++ b/t/recipes/checks/debian/watch/standard/watch-file-general/eval/hints
@@ -0,0 +1,4 @@
+watch-file-general (source): unknown-debian-watch-file-standard 42 [debian/watch]
+watch-file-general (source): older-debian-watch-file-standard 3 [debian/watch]
+watch-file-general (source): multiple-debian-watch-file-standards 2 3 42 [debian/watch]
+watch-file-general (source): debian-watch-file-standard 3 [debian/watch]
diff --git a/t/recipes/checks/debian/watch/two-upstream-components/build-spec/debian/watch b/t/recipes/checks/debian/watch/two-upstream-components/build-spec/debian/watch
new file mode 100644
index 0000000..ae00c12
--- /dev/null
+++ b/t/recipes/checks/debian/watch/two-upstream-components/build-spec/debian/watch
@@ -0,0 +1,6 @@
+version=4
+https://www.kernel.org/pub/linux/utils/raid/mdadm/mdadm-([.[:digit:]]+).tar.gz
+
+opts="component=x1" https://github.com/a/x1/tags archives/v?([\d\-]+)\.tar\.gz
+
+opts="component=x2" https://github.com/a/x2 archives/v?([\d\-]+)\.tar\.gz
diff --git a/t/recipes/checks/debian/watch/two-upstream-components/build-spec/fill-values b/t/recipes/checks/debian/watch/two-upstream-components/build-spec/fill-values
new file mode 100644
index 0000000..b98e8f2
--- /dev/null
+++ b/t/recipes/checks/debian/watch/two-upstream-components/build-spec/fill-values
@@ -0,0 +1,3 @@
+Testname: two-upstream-components
+Skeleton: upload-non-native
+Description: Contains a watch file with 2 components
diff --git a/t/recipes/checks/debian/watch/two-upstream-components/eval/desc b/t/recipes/checks/debian/watch/two-upstream-components/eval/desc
new file mode 100644
index 0000000..37a05ff
--- /dev/null
+++ b/t/recipes/checks/debian/watch/two-upstream-components/eval/desc
@@ -0,0 +1,2 @@
+Testname: two-upstream-components
+Check: debian/watch
diff --git a/t/recipes/checks/debian/watch/two-upstream-components/eval/hints b/t/recipes/checks/debian/watch/two-upstream-components/eval/hints
new file mode 100644
index 0000000..d7b3f59
--- /dev/null
+++ b/t/recipes/checks/debian/watch/two-upstream-components/eval/hints
@@ -0,0 +1,3 @@
+two-upstream-components (source): debian-watch-upstream-component https://github.com/a/x2 x2 [debian/watch:6]
+two-upstream-components (source): debian-watch-upstream-component https://github.com/a/x1/tags x1 [debian/watch:4]
+two-upstream-components (source): debian-watch-does-not-check-openpgp-signature [debian/watch]
diff --git a/t/recipes/checks/debian/watch/watch-file-bug-765995/build-spec/debian/upstream/signing-key.asc b/t/recipes/checks/debian/watch/watch-file-bug-765995/build-spec/debian/upstream/signing-key.asc
new file mode 100644
index 0000000..bd03c4e
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-bug-765995/build-spec/debian/upstream/signing-key.asc
@@ -0,0 +1 @@
+Too lazy to fake this file
diff --git a/t/recipes/checks/debian/watch/watch-file-bug-765995/build-spec/debian/watch b/t/recipes/checks/debian/watch/watch-file-bug-765995/build-spec/debian/watch
new file mode 100644
index 0000000..6f30e20
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-bug-765995/build-spec/debian/watch
@@ -0,0 +1,4 @@
+version=3
+# Trailing whitespace and missing continuation backslash intentional!
+opts=pgpsigurlmangle=s/$/.asc/
+https://www.example.com/Downloads/code-(.+)code\.zip
diff --git a/t/recipes/checks/debian/watch/watch-file-bug-765995/build-spec/fill-values b/t/recipes/checks/debian/watch/watch-file-bug-765995/build-spec/fill-values
new file mode 100644
index 0000000..b764faa
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-bug-765995/build-spec/fill-values
@@ -0,0 +1,4 @@
+Testname: watch-file-bug-765995
+Skeleton: upload-non-native
+Version: 2.0-1
+Description: Watch file that caused undef warning
diff --git a/t/recipes/checks/debian/watch/watch-file-bug-765995/eval/desc b/t/recipes/checks/debian/watch/watch-file-bug-765995/eval/desc
new file mode 100644
index 0000000..ff09232
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-bug-765995/eval/desc
@@ -0,0 +1,2 @@
+Testname: watch-file-bug-765995
+Check: debian/watch
diff --git a/t/recipes/checks/debian/watch/watch-file-bug-765995/eval/hints b/t/recipes/checks/debian/watch/watch-file-bug-765995/eval/hints
new file mode 100644
index 0000000..93efc33
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-bug-765995/eval/hints
@@ -0,0 +1,3 @@
+watch-file-bug-765995 (source): debian-watch-line-invalid opts=pgpsigurlmangle=s/$/.asc/ [debian/watch:3]
+watch-file-bug-765995 (source): debian-watch-does-not-check-openpgp-signature [debian/watch]
+watch-file-bug-765995 (source): debian-watch-could-verify-download debian/upstream/signing-key.asc [debian/watch]
diff --git a/t/recipes/checks/debian/watch/watch-file-general/build-spec/debian/changelog.in b/t/recipes/checks/debian/watch/watch-file-general/build-spec/debian/changelog.in
new file mode 100644
index 0000000..2340930
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-general/build-spec/debian/changelog.in
@@ -0,0 +1,14 @@
+[% $source %] ([% $version %]) unstable; urgency=low
+
+ * Lintian Test Suite.
+ * Test: [% $testname %]
+
+ * Suppress "should close ITP bug" messages. (Closes: #123456)
+
+ -- [% $author %] [% $date %]
+
+[% $source %] (1.0-1) unstable; urgency=low
+
+ * Provoke debian-watch-file-specifies-old-upstream-version.
+
+ -- [% $author %] Thu, 01 Jan 2009 08:34:20 -0800
diff --git a/t/recipes/checks/debian/watch/watch-file-general/build-spec/debian/upstream/signing-key.asc b/t/recipes/checks/debian/watch/watch-file-general/build-spec/debian/upstream/signing-key.asc
new file mode 100644
index 0000000..d83f52c
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-general/build-spec/debian/upstream/signing-key.asc
@@ -0,0 +1,52 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mQINBFpEMFgBEADNYEVhITIZ/rVECuLWxDJUk4rV+v6IfJCxJzuXRfqbjkdLNsCD
+P83FOdvcxNQSrWPdSCgV1tDeDc18pNmfWDnu90zrLRipR1u7ln/ajTpx0RI7tHaO
+SCIJfo42iw7firz9IoegqZaH8LKCh63EaXxLD98MgRA9fcBTEaBSD+Wxh8yYL/5b
+bjdUu2FNNEi8f0POBAB3XInu80mqkEeVYPijd2T8Tc5xaxD90OBuuNGSiqKrJ+lB
+9TSxwr5E/9N+6fnCjrR4FVkZtyTELAdZm4CpQN26tinVolG1gDpMz5B27471oXPY
+9K92/UzTRllwuZ09pdBwpd4gu9mTXMLwOJ/S/+LJeSfCmby7QZiM/61NpS5EyaYg
+h+m8YyTUtulFqpWd2HxttXz0ii5C01LKUrNPqlQrxmfrACJ1tHvcngVQm4wyqMHq
+Uw5LYJ8FM7eS3JPeHpHqFGpY1VKx3nZAZGx+1As1ClvT7Og1KyuVY59w8qNaeJ8C
+eA9XrwGVbMm9PiTP+fyBykMaYpf5aGucH+GeBtkvmpyOyXqf7zrOqyRvY0QaMgt1
+n3jXcD7AZKHCp0wY6LYVa/sKqrDJtxoloBA6kV2Ui3kClOWmlfvm+i1Ecg7vCG8d
+QrJtZxo1Wu54dIr+g0qMFjlBA69OFYRXPzoaWFW1BKtNAYFoej9vW/f+0wARAQAB
+tDtMaW50aWFuIFRlc3QgVXBzdHJlYW0gS2V5IChXb3JraW5nLCBObyBFeHBpcmF0
+aW9uLCBNaW5pbWFsKYkCTgQTAQoAOBYhBPr6VG+KNaSTu27AqFtc4nOV5lb+BQJa
+RDBYAhsDBQsJCAcDBRUKCQgLBRYDAgEAAh4BAheAAAoJEFtc4nOV5lb+B3kQAMMm
+umaOq12REmLdKWMN7GOsxzV6fTF5xBjTgKfY9DCBeNV7tSuJGpGT9MaxRD5Yu/1p
+PDMGC9TkDxOEULBucmp7M//3FCuSnGQFBcObHNXY9FmLQ5MZJ32QUi8KLNIcDjuF
+AKMEYJ5AT50pBsGyLVGXL27HWndNV7jMeIX64gIN5chPKMHqCn0g/wTTaPY/kkEs
+MYirGmBQ83cIAv/1nywtIPeBnj+02Vu3B1hJIZYgmDQZwjZdd7HTxsVW0LAZEXs5
+gtWArfHO3zNKy6WkVE+xhNgZuVO3EyV46JW0bQ2RC7yY70/qFxX71co6p2+VaZgf
+198QtRddq9cKaSe68BnZesIp9YnT3xJVYeL6IrrMYNIZxlslL4/b+gKU3epHyFes
+tQP1tqkhnmC+Bxds6kx0ngPVfTfWM4Ruaeot51BuenZu82S1B3FB5B0qruCNyKre
+nl53nPaNkOERPOF654AXoIODTgnyaocCaQTPztOYm52X8u9qogf9wf1eEA9EZIBI
+WSbn3eCohN6qWvsdC0MMRDu0HB4S1QUyyOceNflXePg6SPvJSPHuOG/5DShcN6ah
+mgVMH44ecAWsh/8Uj1+Z39Ea07nfE3lCU/WR+DXJb56WaQChXN7AKITrNRd/Q61X
+jqrB6jWRSeVBKDidsFwI7oALdSgONE/ZEy+M4j76uQINBFpEMFgBEADCWJECQ6K1
+HgH7OwX7eY8ggEdCOYI/cTGx9rfzdqx67tc7fsF63BrO+nTHylcwXi9IAs695zvp
+miCnCu1EUVjfM+nD52kocVEhzFc/lcCq6d9ac7H9ItJgf3Qc2HpwcqvsNUTWPDMU
+VjQ8ciZ57qq601kIjVPuHjKRY96K9iHxUeVGh2n74JLYZL5IKO08WtQgPmPVLFDX
+X2iZXnZdW/X4xTYB+/+V/D1LyUIP3X7CzBNzJuYjP3vGDH3h4ulLWnDSmxKs6Aep
+a0sKu6+YD14/xXOi+buc0m6ghP7WePl9gYi6XePLdVPeLC9aiDi1tCWEVbbsinhw
+ODxLwndXCGUc+AVySdUrUMuRchNRI6Z5PW/a/RsuVmyORg1RSuFGLeJQZj1pAw6x
+WjxgioqoqydECIx4gCwGO/0GNZCfe5n11vuMEZ7SKbnrf5d58EQXOgV+yZumRKkz
+OmdKICjql6w5CealrvP/si2kfD3oVwqBeuM0aM8HmWTfrdESWrd8xqAxBlcDsIun
+mpsJ6obGN2mOaMFmOljukdzDFgMJMIrcS4UcGNzyQWUbz6JOSfPq96RkrTVsXMKy
+40Ygtwe63PS9lXGT2ojmiV193UrGJqEUjuAL79KXWkxTRFxvFwck9qK5RAX2F1GQ
+4ELDAFSKr8t6IpiYiTXaA3OTJfxJMK191QARAQABiQI2BBgBCgAgFiEE+vpUb4o1
+pJO7bsCoW1zic5XmVv4FAlpEMFgCGwwACgkQW1zic5XmVv4VEA//dOFj60ktKKsl
+CgRdtnuo9Sdd7IjShic67qoT0gFZRiMATaryM4ifjAcl03rxzGk5MOsltHFJr5h+
+RmaudKhCyksd1nQ2dBpFgPHyxVTS5/k+wMelP9kPailqiGUA735SP5mO/28YOT8v
+Xa4rwnTn6s9Ga7+lMN4I7LKRo47uGG89Og381tHSkW8DjFuLTme3TQDysG2MGlSY
+vTPJmF7xPCuG3s8J5RIrVwWbN0orWen9YWT1923+0CAZG8M+7AFxU5xxCFIBRKMw
+2tw/ovjtE9czuT743LMPlUJRc1pveYjVhLY9xUMQsPO6j41pdIL2X7txFjQqzjFl
+hpIJviupVWlV0vSS0Q7nAtvLTsjhXSyQriKqmfdsdcxXBz7LGRxEi5l/9zuW5GMy
+kD5ikQ05li6wkBdQYLS3ZBYkrj94LpNEqNZE3sfX33Yc5cpE2Bc4Ga+MxYxQwrfz
+sNNSp8jdf2FyFvlvRkO8UUgsW5PPOuwthb05bx7dQGfKvqySpd0JLrhxw8G8odJh
+PGzl0ig4F8xEitMc0lms5yzQGvtpEvSYLUs+4EJaf/XN9nRS+4e+GciTmp9XUM/5
+EtKOKXVuhHyaizqfpF4VR0Tbg65HHE3zLJMr7XTUGC0Zr+bj0n/V177R0XgptY7Y
+jr6SfdNikIDjGYa+yuN6KGQsriza1aA=
+=CYsi
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/t/recipes/checks/debian/watch/watch-file-general/build-spec/debian/watch b/t/recipes/checks/debian/watch/watch-file-general/build-spec/debian/watch
new file mode 100644
index 0000000..dc196dd
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-general/build-spec/debian/watch
@@ -0,0 +1,32 @@
+# watch file with upstream version mangling
+
+version=2
+opts="uversionmangle=s/$/ds/" \
+http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate
+
+version=3
+http://ftp.sf.net/foo/foo_bar(.+)\.Z 5 uupdate
+
+# Test additional Sourceforge patterns. (See Bug#510398)
+ftp://upload.sourceforge.net/pub/sourceforge/s/so/soprano/ \
+ soprano-(.*)\.tar\.bz2
+http://sourceforge.net/project/showfiles.php?group_id=100501 \
+ .*/octaviz/octaviz-([\d\.]+).tar.gz.*
+http://sourceforge.net/projects/synce/files http://downloads.sourceforge.net/.+/kcemirror-(.+).tar.gz.*
+
+# Unknown version number.
+version=42
+
+# Specifies the same version number as the package.
+https://example.com/ foo([\d.]+)\.tar\.gz 2.0.ds1-1 uupdate
+
+# Deprecated githubredir
+http://githubredir.debian.net/github/username/project /(.*).tar.gz
+
+# without any pgpsigurlmangle
+
+http://insecure.com /(.*).tar.gz
+https://secure.com /(.*).tar.gz
+
+# False positive for debian-watch-uses-insecure-uri
+http://sf.net/uses/redirector-([^-]+)\.tar\.gz
diff --git a/t/recipes/checks/debian/watch/watch-file-general/build-spec/fill-values b/t/recipes/checks/debian/watch/watch-file-general/build-spec/fill-values
new file mode 100644
index 0000000..185084f
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-general/build-spec/fill-values
@@ -0,0 +1,4 @@
+Testname: watch-file-general
+Skeleton: upload-non-native
+Version: 2.0.ds1-1
+Description: General watch file checks
diff --git a/t/recipes/checks/debian/watch/watch-file-general/eval/desc b/t/recipes/checks/debian/watch/watch-file-general/eval/desc
new file mode 100644
index 0000000..9f9961f
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-general/eval/desc
@@ -0,0 +1,3 @@
+Testname: watch-file-general
+See-Also: Debian Bug#510398
+Check: debian/watch
diff --git a/t/recipes/checks/debian/watch/watch-file-general/eval/hints b/t/recipes/checks/debian/watch/watch-file-general/eval/hints
new file mode 100644
index 0000000..7383a4c
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-general/eval/hints
@@ -0,0 +1,24 @@
+watch-file-general (source): debian-watch-uses-insecure-uri http://sourceforge.net/projects/synce/files [debian/watch:15]
+watch-file-general (source): debian-watch-uses-insecure-uri http://sourceforge.net/project/showfiles.php?group_id=100501 [debian/watch:14]
+watch-file-general (source): debian-watch-uses-insecure-uri http://qa.debian.org/watch/sf.php?project=foo [debian/watch:5]
+watch-file-general (source): debian-watch-uses-insecure-uri http://insecure.com [debian/watch:28]
+watch-file-general (source): debian-watch-uses-insecure-uri http://githubredir.debian.net/github/username/project [debian/watch:24]
+watch-file-general (source): debian-watch-uses-insecure-uri http://ftp.sf.net/foo/foo_bar(.+)\.Z [debian/watch:8]
+watch-file-general (source): debian-watch-uses-insecure-uri ftp://upload.sourceforge.net/pub/sourceforge/s/so/soprano/ [debian/watch:12]
+watch-file-general (source): debian-watch-not-mangling-version https://secure.com /(.*).tar.gz [debian/watch:29]
+watch-file-general (source): debian-watch-not-mangling-version http://sourceforge.net/projects/synce/files http://downloads.sourceforge.net/.+/kcemirror-(.+).tar.gz.* [debian/watch:15]
+watch-file-general (source): debian-watch-not-mangling-version http://sourceforge.net/project/showfiles.php?group_id=100501 .*/octaviz/octaviz-([\d\.]+).tar.gz.* [debian/watch:14]
+watch-file-general (source): debian-watch-not-mangling-version http://sf.net/uses/redirector-([^-]+)\.tar\.gz [debian/watch:32]
+watch-file-general (source): debian-watch-not-mangling-version http://insecure.com /(.*).tar.gz [debian/watch:28]
+watch-file-general (source): debian-watch-not-mangling-version http://githubredir.debian.net/github/username/project /(.*).tar.gz [debian/watch:24]
+watch-file-general (source): debian-watch-not-mangling-version ftp://upload.sourceforge.net/pub/sourceforge/s/so/soprano/ soprano-(.*)\.tar\.bz2 [debian/watch:12]
+watch-file-general (source): debian-watch-mangles-debian-version-improperly opts="uversionmangle=s/$/ds/" http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate [debian/watch:5]
+watch-file-general (source): debian-watch-lacks-sourceforge-redirector http://sourceforge.net/projects/synce/files http://downloads.sourceforge.net/.+/kcemirror-(.+).tar.gz.* [debian/watch:15]
+watch-file-general (source): debian-watch-lacks-sourceforge-redirector http://sourceforge.net/project/showfiles.php?group_id=100501 .*/octaviz/octaviz-([\d\.]+).tar.gz.* [debian/watch:14]
+watch-file-general (source): debian-watch-lacks-sourceforge-redirector http://ftp.sf.net/foo/foo_bar(.+)\.Z 5 uupdate [debian/watch:8]
+watch-file-general (source): debian-watch-lacks-sourceforge-redirector ftp://upload.sourceforge.net/pub/sourceforge/s/so/soprano/ soprano-(.*)\.tar\.bz2 [debian/watch:12]
+watch-file-general (source): debian-watch-file-uses-deprecated-sf-redirector-method http://qa.debian.org/watch/sf.php?project=foo scripts\.([\d.]+)\.tar\.gz debian uupdate [debian/watch:5]
+watch-file-general (source): debian-watch-file-uses-deprecated-githubredir http://githubredir.debian.net/github/username/project /(.*).tar.gz [debian/watch:24]
+watch-file-general (source): debian-watch-file-specifies-wrong-upstream-version 2.0.ds1-1 [debian/watch]
+watch-file-general (source): debian-watch-does-not-check-openpgp-signature [debian/watch]
+watch-file-general (source): debian-watch-could-verify-download debian/upstream/signing-key.asc [debian/watch]
diff --git a/t/recipes/checks/debian/watch/watch-file-native/build-spec/debian/watch b/t/recipes/checks/debian/watch/watch-file-native/build-spec/debian/watch
new file mode 100644
index 0000000..23b829d
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-native/build-spec/debian/watch
@@ -0,0 +1,5 @@
+# watch file with upstream version mangling
+
+version=3
+https://somewhere.debian.org/foo/foo_bar(.+)\.tar\.gz 5 uupdate
+
diff --git a/t/recipes/checks/debian/watch/watch-file-native/build-spec/fill-values b/t/recipes/checks/debian/watch/watch-file-native/build-spec/fill-values
new file mode 100644
index 0000000..72168c2
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-native/build-spec/fill-values
@@ -0,0 +1,3 @@
+Skeleton: upload-native
+Testname: watch-file-native
+Description: Native package with a watch file
diff --git a/t/recipes/checks/debian/watch/watch-file-native/eval/desc b/t/recipes/checks/debian/watch/watch-file-native/eval/desc
new file mode 100644
index 0000000..bd769e4
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-native/eval/desc
@@ -0,0 +1,2 @@
+Testname: watch-file-native
+Check: debian/watch
diff --git a/t/recipes/checks/debian/watch/watch-file-native/eval/hints b/t/recipes/checks/debian/watch/watch-file-native/eval/hints
new file mode 100644
index 0000000..c38b1c2
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-native/eval/hints
@@ -0,0 +1,2 @@
+watch-file-native (source): debian-watch-file-in-native-package [debian/watch]
+watch-file-native (source): debian-watch-does-not-check-openpgp-signature [debian/watch]
diff --git a/t/recipes/checks/debian/watch/watch-file-old-upstream-version/build-spec/debian/changelog.in b/t/recipes/checks/debian/watch/watch-file-old-upstream-version/build-spec/debian/changelog.in
new file mode 100644
index 0000000..0aaa2a6
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-old-upstream-version/build-spec/debian/changelog.in
@@ -0,0 +1,14 @@
+[% $source %] ([% $version %]) unstable; urgency=low
+
+ * New upstream release.
+ * Lintian Test Suite.
+ * Test: [% $testname %]
+ * We forgot to update the watch file, lalala.
+
+ -- [% $author %] [% $date %]
+
+[% $source %] (1.0-1) unstable; urgency=low
+
+ * An earlier non-native version.
+
+ -- [% $author %] Tue, 1 Jan 2008 22:45:57 +0000
diff --git a/t/recipes/checks/debian/watch/watch-file-old-upstream-version/build-spec/debian/watch b/t/recipes/checks/debian/watch/watch-file-old-upstream-version/build-spec/debian/watch
new file mode 100644
index 0000000..ebaecbd
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-old-upstream-version/build-spec/debian/watch
@@ -0,0 +1,3 @@
+version=3
+
+https://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz 1.0 uupdate
diff --git a/t/recipes/checks/debian/watch/watch-file-old-upstream-version/build-spec/fill-values b/t/recipes/checks/debian/watch/watch-file-old-upstream-version/build-spec/fill-values
new file mode 100644
index 0000000..e8c0c43
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-old-upstream-version/build-spec/fill-values
@@ -0,0 +1,4 @@
+Testname: watch-file-old-upstream-version
+Skeleton: upload-non-native
+Version: 2.0-1
+Description: Watch file with old upstream version
diff --git a/t/recipes/checks/debian/watch/watch-file-old-upstream-version/eval/desc b/t/recipes/checks/debian/watch/watch-file-old-upstream-version/eval/desc
new file mode 100644
index 0000000..fdffb7d
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-old-upstream-version/eval/desc
@@ -0,0 +1,2 @@
+Testname: watch-file-old-upstream-version
+Check: debian/watch
diff --git a/t/recipes/checks/debian/watch/watch-file-old-upstream-version/eval/hints b/t/recipes/checks/debian/watch/watch-file-old-upstream-version/eval/hints
new file mode 100644
index 0000000..7cdf746
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-old-upstream-version/eval/hints
@@ -0,0 +1,2 @@
+watch-file-old-upstream-version (source): debian-watch-file-specifies-old-upstream-version 1.0 [debian/watch]
+watch-file-old-upstream-version (source): debian-watch-does-not-check-openpgp-signature [debian/watch]
diff --git a/t/recipes/checks/debian/watch/watch-file-pgpmode-next/build-spec/debian/upstream/signing-key.asc b/t/recipes/checks/debian/watch/watch-file-pgpmode-next/build-spec/debian/upstream/signing-key.asc
new file mode 100644
index 0000000..bd03c4e
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-pgpmode-next/build-spec/debian/upstream/signing-key.asc
@@ -0,0 +1 @@
+Too lazy to fake this file
diff --git a/t/recipes/checks/debian/watch/watch-file-pgpmode-next/build-spec/debian/watch b/t/recipes/checks/debian/watch/watch-file-pgpmode-next/build-spec/debian/watch
new file mode 100644
index 0000000..139bc40
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-pgpmode-next/build-spec/debian/watch
@@ -0,0 +1,5 @@
+version=4
+opts="pgpmode=next" https://alioth.debian.org/frs/?group_id=30928 \
+ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
+opts="pgpmode=previous" https://alioth.debian.org/frs/?group_id=30928 \
+ (?:.*)/@PACKAGE@@ANY_VERSION@@SIGNATURE_EXT@ previous
diff --git a/t/recipes/checks/debian/watch/watch-file-pgpmode-next/build-spec/fill-values b/t/recipes/checks/debian/watch/watch-file-pgpmode-next/build-spec/fill-values
new file mode 100644
index 0000000..061e5ae
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-pgpmode-next/build-spec/fill-values
@@ -0,0 +1,4 @@
+Testname: watch-file-pgpmode-next
+Skeleton: upload-non-native
+Version: 2.0-1
+Description: Watch file with pgpmode=next
diff --git a/t/recipes/checks/debian/watch/watch-file-pgpmode-next/eval/desc b/t/recipes/checks/debian/watch/watch-file-pgpmode-next/eval/desc
new file mode 100644
index 0000000..10373e6
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-pgpmode-next/eval/desc
@@ -0,0 +1,4 @@
+Testname: watch-file-pgpmode-next
+Test-Against: debian-watch-does-not-check-openpgp-signature
+See-Also: #841000
+Check: debian/watch
diff --git a/t/recipes/checks/debian/watch/watch-file-pgpmode-next/eval/hints b/t/recipes/checks/debian/watch/watch-file-pgpmode-next/eval/hints
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-pgpmode-next/eval/hints
@@ -0,0 +1 @@
+
diff --git a/t/recipes/checks/debian/watch/watch-file-pgpmode-none/build-spec/debian/watch b/t/recipes/checks/debian/watch/watch-file-pgpmode-none/build-spec/debian/watch
new file mode 100644
index 0000000..190a7c5
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-pgpmode-none/build-spec/debian/watch
@@ -0,0 +1,3 @@
+version=4
+opts="pgpmode=none" https://alioth.debian.org/frs/?group_id=30928 \
+ (?:.*)/@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@ debian
diff --git a/t/recipes/checks/debian/watch/watch-file-pgpmode-none/build-spec/fill-values b/t/recipes/checks/debian/watch/watch-file-pgpmode-none/build-spec/fill-values
new file mode 100644
index 0000000..e419c0a
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-pgpmode-none/build-spec/fill-values
@@ -0,0 +1,4 @@
+Testname: watch-file-pgpmode-none
+Skeleton: upload-non-native
+Version: 2.0-1
+Description: Watch file with pgpmode=none
diff --git a/t/recipes/checks/debian/watch/watch-file-pgpmode-none/eval/desc b/t/recipes/checks/debian/watch/watch-file-pgpmode-none/eval/desc
new file mode 100644
index 0000000..9797f85
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-pgpmode-none/eval/desc
@@ -0,0 +1,4 @@
+Testname: watch-file-pgpmode-none
+Test-Against: debian-watch-file-pubkey-file-is-missing
+See-Also: #841000
+Check: debian/watch
diff --git a/t/recipes/checks/debian/watch/watch-file-pgpmode-none/eval/hints b/t/recipes/checks/debian/watch/watch-file-pgpmode-none/eval/hints
new file mode 100644
index 0000000..da03c49
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-pgpmode-none/eval/hints
@@ -0,0 +1 @@
+watch-file-pgpmode-none (source): debian-watch-does-not-check-openpgp-signature [debian/watch]
diff --git a/t/recipes/checks/debian/watch/watch-file-prerelease/build-spec/debian/watch b/t/recipes/checks/debian/watch/watch-file-prerelease/build-spec/debian/watch
new file mode 100644
index 0000000..8038deb
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-prerelease/build-spec/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts=dversionmangle=s/~rc/-rc/ \
+ https://www.example.com/software/foo/ .*/foo-([^-]+)\.tar\.gz
diff --git a/t/recipes/checks/debian/watch/watch-file-prerelease/build-spec/fill-values b/t/recipes/checks/debian/watch/watch-file-prerelease/build-spec/fill-values
new file mode 100644
index 0000000..759c2e9
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-prerelease/build-spec/fill-values
@@ -0,0 +1,4 @@
+Testname: watch-file-prerelease
+Skeleton: upload-non-native
+Version: 1~rc1-1
+Description: Check mangling tags for upstream prereleases
diff --git a/t/recipes/checks/debian/watch/watch-file-prerelease/eval/desc b/t/recipes/checks/debian/watch/watch-file-prerelease/eval/desc
new file mode 100644
index 0000000..130e146
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-prerelease/eval/desc
@@ -0,0 +1,2 @@
+Testname: watch-file-prerelease
+Check: debian/watch
diff --git a/t/recipes/checks/debian/watch/watch-file-prerelease/eval/hints b/t/recipes/checks/debian/watch/watch-file-prerelease/eval/hints
new file mode 100644
index 0000000..9f86dc6
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-prerelease/eval/hints
@@ -0,0 +1,2 @@
+watch-file-prerelease (source): debian-watch-mangles-upstream-version-improperly opts=dversionmangle=s/~rc/-rc/ https://www.example.com/software/foo/ .*/foo-([^-]+)\.tar\.gz [debian/watch:3]
+watch-file-prerelease (source): debian-watch-does-not-check-openpgp-signature [debian/watch]
diff --git a/t/recipes/checks/debian/watch/watch-file-pubkey-missing/build-spec/debian/watch b/t/recipes/checks/debian/watch/watch-file-pubkey-missing/build-spec/debian/watch
new file mode 100644
index 0000000..7ac78bc
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-pubkey-missing/build-spec/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts="uversionmangle=s/-/./,dversionmangle=s/\.dfsg\d+$//,pgpsigurlmangle=s/$/.asc/" \
+ftp://ftp.imagemagick.org/pub/ImageMagick/ ImageMagick-(.*)\.tar\.xz
diff --git a/t/recipes/checks/debian/watch/watch-file-pubkey-missing/build-spec/fill-values b/t/recipes/checks/debian/watch/watch-file-pubkey-missing/build-spec/fill-values
new file mode 100644
index 0000000..31946e9
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-pubkey-missing/build-spec/fill-values
@@ -0,0 +1,4 @@
+Testname: watch-file-pubkey-missing
+Skeleton: upload-non-native
+Version: 1+dfsg-1
+Description: Watch file if verify signature should check d/upstream/signing-key.{pgp,asc}
diff --git a/t/recipes/checks/debian/watch/watch-file-pubkey-missing/eval/desc b/t/recipes/checks/debian/watch/watch-file-pubkey-missing/eval/desc
new file mode 100644
index 0000000..de6e776
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-pubkey-missing/eval/desc
@@ -0,0 +1,2 @@
+Testname: watch-file-pubkey-missing
+Check: debian/watch
diff --git a/t/recipes/checks/debian/watch/watch-file-pubkey-missing/eval/hints b/t/recipes/checks/debian/watch/watch-file-pubkey-missing/eval/hints
new file mode 100644
index 0000000..a7ae561
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-pubkey-missing/eval/hints
@@ -0,0 +1,2 @@
+watch-file-pubkey-missing (source): debian-watch-uses-insecure-uri ftp://ftp.imagemagick.org/pub/ImageMagick/ [debian/watch:3]
+watch-file-pubkey-missing (source): debian-watch-file-pubkey-file-is-missing [debian/watch]
diff --git a/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/build-spec/debian/watch b/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/build-spec/debian/watch
new file mode 100644
index 0000000..9104ee4
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/build-spec/debian/watch
@@ -0,0 +1,4 @@
+version=4
+opts="uversionmangle=s/.pre/~pre/,dversionmangle=s/@DEB_EXT@//,repacksuffix=+ds1" \
+ https://github.com/user/project/tags \
+ (?:.*?/)project@ANr_VERSION@\.tar\.gz
diff --git a/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/build-spec/fill-values b/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/build-spec/fill-values
new file mode 100644
index 0000000..8d0af82
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/build-spec/fill-values
@@ -0,0 +1,4 @@
+Testname: watch-file-should-mangle-unrel
+Skeleton: upload-non-native
+Version: 1+dfsg-1
+Description: Watch file should mangle version (false-positive)
diff --git a/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/eval/desc b/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/eval/desc
new file mode 100644
index 0000000..67f3d93
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/eval/desc
@@ -0,0 +1,4 @@
+Testname: watch-file-should-mangle-unrel
+Test-Against:
+ debian-watch-not-mangling-version
+Check: debian/watch
diff --git a/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/eval/hints b/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/eval/hints
new file mode 100644
index 0000000..e5e98dc
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-should-mangle-unrel/eval/hints
@@ -0,0 +1 @@
+watch-file-should-mangle-unrel (source): debian-watch-does-not-check-openpgp-signature [debian/watch]
diff --git a/t/recipes/checks/debian/watch/watch-file-should-mangle/build-spec/debian/watch b/t/recipes/checks/debian/watch/watch-file-should-mangle/build-spec/debian/watch
new file mode 100644
index 0000000..6cc9db4
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-should-mangle/build-spec/debian/watch
@@ -0,0 +1,11 @@
+# watch file with no version mangling, even though there's a dfsg in the
+# package version number.
+
+version=2
+https://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz debian uupdate
+
+# version mangling is not needed in this case:
+https://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz 0.24 uupdate
+
+# version mangling *is* needed in this case:
+https://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz
diff --git a/t/recipes/checks/debian/watch/watch-file-should-mangle/build-spec/fill-values b/t/recipes/checks/debian/watch/watch-file-should-mangle/build-spec/fill-values
new file mode 100644
index 0000000..8a8df44
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-should-mangle/build-spec/fill-values
@@ -0,0 +1,4 @@
+Testname: watch-file-should-mangle
+Skeleton: upload-non-native
+Version: 1+dfsg-1
+Description: Watch file should mangle version
diff --git a/t/recipes/checks/debian/watch/watch-file-should-mangle/eval/desc b/t/recipes/checks/debian/watch/watch-file-should-mangle/eval/desc
new file mode 100644
index 0000000..584f10d
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-should-mangle/eval/desc
@@ -0,0 +1,2 @@
+Testname: watch-file-should-mangle
+Check: debian/watch
diff --git a/t/recipes/checks/debian/watch/watch-file-should-mangle/eval/hints b/t/recipes/checks/debian/watch/watch-file-should-mangle/eval/hints
new file mode 100644
index 0000000..ed53e0f
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-should-mangle/eval/hints
@@ -0,0 +1,3 @@
+watch-file-should-mangle (source): debian-watch-not-mangling-version https://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz debian uupdate [debian/watch:5]
+watch-file-should-mangle (source): debian-watch-not-mangling-version https://www.example.com/dist/ dh7-test\.([\d.]+)\.tar\.gz [debian/watch:11]
+watch-file-should-mangle (source): debian-watch-does-not-check-openpgp-signature [debian/watch]
diff --git a/t/recipes/checks/debian/watch/watch-file-template/build-spec/debian/watch b/t/recipes/checks/debian/watch/watch-file-template/build-spec/debian/watch
new file mode 100644
index 0000000..fdbc536
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-template/build-spec/debian/watch
@@ -0,0 +1,3 @@
+version=3
+# Example watch control file for uscan
+http://www.example.com/software/foo/ .*/<project>-([^-]+)\.tar\.gz
diff --git a/t/recipes/checks/debian/watch/watch-file-template/build-spec/fill-values b/t/recipes/checks/debian/watch/watch-file-template/build-spec/fill-values
new file mode 100644
index 0000000..fdad29e
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-template/build-spec/fill-values
@@ -0,0 +1,3 @@
+Testname: watch-file-template
+Skeleton: upload-non-native
+Description: Test for dh_make(1) templates
diff --git a/t/recipes/checks/debian/watch/watch-file-template/eval/desc b/t/recipes/checks/debian/watch/watch-file-template/eval/desc
new file mode 100644
index 0000000..c96ef04
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-template/eval/desc
@@ -0,0 +1,2 @@
+Testname: watch-file-template
+Check: debian/watch
diff --git a/t/recipes/checks/debian/watch/watch-file-template/eval/hints b/t/recipes/checks/debian/watch/watch-file-template/eval/hints
new file mode 100644
index 0000000..b0dd19d
--- /dev/null
+++ b/t/recipes/checks/debian/watch/watch-file-template/eval/hints
@@ -0,0 +1,3 @@
+watch-file-template (source): debian-watch-uses-insecure-uri http://www.example.com/software/foo/ [debian/watch:3]
+watch-file-template (source): debian-watch-does-not-check-openpgp-signature [debian/watch]
+watch-file-template (source): debian-watch-contains-dh_make-template Example watch control file for uscan [debian/watch]