diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:42:30 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:42:30 +0000 |
commit | 75808db17caf8b960b351e3408e74142f4c85aac (patch) | |
tree | 7989e9c09a4240248bf4658a22208a0a52d991c4 /t/recipes/checks/fields/description | |
parent | Initial commit. (diff) | |
download | lintian-upstream.tar.xz lintian-upstream.zip |
Adding upstream version 2.117.0.upstream/2.117.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 't/recipes/checks/fields/description')
161 files changed, 3796 insertions, 0 deletions
diff --git a/t/recipes/checks/fields/description/description-empty-paragraph/build-spec/debian/control.in b/t/recipes/checks/fields/description/description-empty-paragraph/build-spec/debian/control.in new file mode 100644 index 0000000..dce8164 --- /dev/null +++ b/t/recipes/checks/fields/description/description-empty-paragraph/build-spec/debian/control.in @@ -0,0 +1,41 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: package to test empty first paragraph + . + The first paragraph + of this description + is empty. It is also an empty package. + +Package: [% $source %]-2 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: package to test empty last paragraph + The last paragraph + of this description + is empty. It is also an empty package. + . + Unfortunately this doesn't trigger the warning, an empty last paragraph + seems to get stripped out already before it is handed over. + . + +Package: [% $source %]-3 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: package to test empty paragraph in the middle + There is an + empty paragraph + in between. It is also an empty package. + . + . + There is an + empty paragraph + in between. It is also an empty package. diff --git a/t/recipes/checks/fields/description/description-empty-paragraph/build-spec/fill-values b/t/recipes/checks/fields/description/description-empty-paragraph/build-spec/fill-values new file mode 100644 index 0000000..a469492 --- /dev/null +++ b/t/recipes/checks/fields/description/description-empty-paragraph/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: description-empty-paragraph +Description: Tests of empty paragraphs in descriptions diff --git a/t/recipes/checks/fields/description/description-empty-paragraph/eval/desc b/t/recipes/checks/fields/description/description-empty-paragraph/eval/desc new file mode 100644 index 0000000..ec9d013 --- /dev/null +++ b/t/recipes/checks/fields/description/description-empty-paragraph/eval/desc @@ -0,0 +1,2 @@ +Testname: description-empty-paragraph +Check: fields/description diff --git a/t/recipes/checks/fields/description/description-empty-paragraph/eval/hints b/t/recipes/checks/fields/description/description-empty-paragraph/eval/hints new file mode 100644 index 0000000..e501c2b --- /dev/null +++ b/t/recipes/checks/fields/description/description-empty-paragraph/eval/hints @@ -0,0 +1,2 @@ +description-empty-paragraph-3 (binary): extended-description-contains-empty-paragraph +description-empty-paragraph (binary): extended-description-contains-empty-paragraph diff --git a/t/recipes/checks/fields/description/description-general/build-spec/debian/control.in b/t/recipes/checks/fields/description/description-general/build-spec/debian/control.in new file mode 100644 index 0000000..1fffbc6 --- /dev/null +++ b/t/recipes/checks/fields/description/description-general/build-spec/debian/control.in @@ -0,0 +1,155 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $source %] is a package which tests lintian's description checks + missing + The the synopsis should not start with the package's name. Moreover, + the long description + should + not + contain tabs. + .control statements are not allowed as well. + . + All all all of of these these should be matched matched matched + . + This description was automagically extracted from the module by dh-make-perl + . + No, not really... (dummy) + +Package: [% $source %]-2 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Don't use tabs in the synopsis and restrict yourself to less than 80 characters, otherwise Lintian will complain + Oh, and don't start the long description with spaces. + Now here comes a list: + - which is + - unfortunately + - not correctly indented. (dummy) + +Package: [% $source %]-3 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: + There should really be a synopsis. + The line in an extended description should be less than 80 characters, otherwise you'll get + a Lintian warning. + . + And the old man said "he he is the one!" + "No, I am am not", he replied (dummy) + +Package: [% $source %]-4 +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: some Lintian test package + some Lintian test package + . + Some mroe stuff about this debian test package. (dummy) + . + Homepage: <http://lintian.debian.org/> + +Package: [% $source %]-short +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Short + The description is too short. One word is not enough. + Second line to avoid the warning. + . + And a third. (dummy) + +Package: foo-duplicate +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: foo duplicate + The description is the same as the package name. + A real description would be appreciated + . + And a third. (dummy) + +Package: foo-bar-duplicate +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: foo bar duplicate + The description is the same as the package name. + A real description would be appreciated + . + And a third. (dummy) + +Package: [% $source %]-dummy +Section: oldlibs +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: test package (transitional package) + Transitional packages can have short long descriptions. + +Package: [% $source %]-empty +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: test package with empty extended description (dummy) + +Package: [% $source %]-utf8-long +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: test package with UTF-8 description (“héh锓héh锓héh锓héhé”) + Not really too long: “héh锓héh锓héh锓héh锓héh锓héhé” + . + 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. + +Package: [% $source %]-not-dup +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: test package with duplicated words that aren't + Lossless JPEG is defined in ITU-T T.81, ISO/IEC IS 10918-1. + Contain the strings " link to ", " -> ", or ": ". + This is train A, a particularly fast train. + . + "hallo" or "evening" or "farewell" should not trigger a duplicate + "or or" warning. Also "or" "or" does not trigger the warning + either. + . + 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. + +Package: [% $source %]-syn-article +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: the synopsis starts with an article + A good synopsis should start not start with "a", "an" and "the" + according to developer-reference 6.2.2. + . + 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. + +Package: [% $source %]-syn-spelling +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: test for spelling - debian developement + Some Lintian test package. + . + Some more stuff about this Debian test package. (dummy) + . + Duplicate: Duplicate (false positive due to colon) + . + FOO (FOO Owsome Object) is a recursive acronym. + +Package: [% $source %]-control-statements +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: test for overly-indented control statements + Some Lintian test package. + . + Some more stuff about this Debian test package. (dummy) diff --git a/t/recipes/checks/fields/description/description-general/build-spec/fill-values b/t/recipes/checks/fields/description/description-general/build-spec/fill-values new file mode 100644 index 0000000..e3f3295 --- /dev/null +++ b/t/recipes/checks/fields/description/description-general/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: description-general +Description: Tests of various description tags diff --git a/t/recipes/checks/fields/description/description-general/eval/desc b/t/recipes/checks/fields/description/description-general/eval/desc new file mode 100644 index 0000000..96d4df7 --- /dev/null +++ b/t/recipes/checks/fields/description/description-general/eval/desc @@ -0,0 +1,4 @@ +Testname: description-general +Test-Against: + synopsis-is-a-sentence +Check: fields/description diff --git a/t/recipes/checks/fields/description/description-general/eval/hints b/t/recipes/checks/fields/description/description-general/eval/hints new file mode 100644 index 0000000..b5cafb3 --- /dev/null +++ b/t/recipes/checks/fields/description/description-general/eval/hints @@ -0,0 +1,28 @@ +foo-duplicate (binary): description-is-pkg-name foo duplicate +foo-bar-duplicate (binary): description-is-pkg-name foo bar duplicate +description-general-syn-spelling (binary): spelling-error-in-description-synopsis developement development +description-general-syn-spelling (binary): capitalization-error-in-description-synopsis debian Debian +description-general-syn-article (binary): description-synopsis-starts-with-article +description-general-short (binary): description-too-short Short +description-general-empty (binary): extended-description-is-empty +description-general-control-statements (binary): description-contains-invalid-control-statement line 2 +description-general-4 (binary): spelling-error-in-description mroe more +description-general-4 (binary): description-synopsis-is-duplicated line 1 +description-general-4 (binary): description-contains-homepage line 5 +description-general-4 (binary): capitalization-error-in-description debian Debian +description-general-3 (binary): using-first-person-in-description line 6: I +description-general-3 (binary): extended-description-line-too-long line 2 +description-general-3 (binary): description-synopsis-is-empty +description-general-2 (binary): synopsis-too-long +description-general-2 (binary): possible-unindented-list-in-extended-description line 5 +description-general-2 (binary): description-starts-with-leading-spaces line 1 +description-general-2 (binary): description-contains-tabs +description-general (binary): spelling-error-in-description these these (duplicate word) these +description-general (binary): spelling-error-in-description of of (duplicate word) of +description-general (binary): spelling-error-in-description matched matched (duplicate word) matched +description-general (binary): spelling-error-in-description all all (duplicate word) all +description-general (binary): description-starts-with-package-name +description-general (binary): description-is-debmake-template line 1 +description-general (binary): description-contains-tabs line 3 +description-general (binary): description-contains-invalid-control-statement line 7 +description-general (binary): description-contains-dh-make-perl-template line 11 diff --git a/t/recipes/checks/fields/description/description-homepage/build-spec/debian/control.in b/t/recipes/checks/fields/description/description-homepage/build-spec/debian/control.in new file mode 100644 index 0000000..9cd042a --- /dev/null +++ b/t/recipes/checks/fields/description/description-homepage/build-spec/debian/control.in @@ -0,0 +1,18 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + See the package web site at <http://lintian.debian.org/>. diff --git a/t/recipes/checks/fields/description/description-homepage/build-spec/fill-values b/t/recipes/checks/fields/description/description-homepage/build-spec/fill-values new file mode 100644 index 0000000..e1e9ee6 --- /dev/null +++ b/t/recipes/checks/fields/description/description-homepage/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: description-homepage +Description: Test for a homepage reference in the description diff --git a/t/recipes/checks/fields/description/description-homepage/eval/desc b/t/recipes/checks/fields/description/description-homepage/eval/desc new file mode 100644 index 0000000..5debe32 --- /dev/null +++ b/t/recipes/checks/fields/description/description-homepage/eval/desc @@ -0,0 +1,2 @@ +Testname: description-homepage +Check: fields/description diff --git a/t/recipes/checks/fields/description/description-homepage/eval/hints b/t/recipes/checks/fields/description/description-homepage/eval/hints new file mode 100644 index 0000000..49fd6e2 --- /dev/null +++ b/t/recipes/checks/fields/description/description-homepage/eval/hints @@ -0,0 +1 @@ +description-homepage (binary): description-possibly-contains-homepage http://lintian.debian.org/ diff --git a/t/recipes/checks/fields/description/description-mentions-planned-features/build-spec/debian/control.in b/t/recipes/checks/fields/description/description-mentions-planned-features/build-spec/debian/control.in new file mode 100644 index 0000000..51cdeb2 --- /dev/null +++ b/t/recipes/checks/fields/description/description-mentions-planned-features/build-spec/debian/control.in @@ -0,0 +1,25 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Foo will soon allow something. + Foo soon will allow something. + Foo soon will be able something. + Foo will soon be able something. + Foo will soon support something. + Foo SOON WILL SUPPORT something. + Support for foo is planned. + Support is also planned for foo. diff --git a/t/recipes/checks/fields/description/description-mentions-planned-features/build-spec/fill-values b/t/recipes/checks/fields/description/description-mentions-planned-features/build-spec/fill-values new file mode 100644 index 0000000..1bdede6 --- /dev/null +++ b/t/recipes/checks/fields/description/description-mentions-planned-features/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: description-mentions-planned-features +Description: Test for a packages mentioning upcoming features diff --git a/t/recipes/checks/fields/description/description-mentions-planned-features/eval/desc b/t/recipes/checks/fields/description/description-mentions-planned-features/eval/desc new file mode 100644 index 0000000..38ffdd7 --- /dev/null +++ b/t/recipes/checks/fields/description/description-mentions-planned-features/eval/desc @@ -0,0 +1,2 @@ +Testname: description-mentions-planned-features +Check: fields/description diff --git a/t/recipes/checks/fields/description/description-mentions-planned-features/eval/hints b/t/recipes/checks/fields/description/description-mentions-planned-features/eval/hints new file mode 100644 index 0000000..5552914 --- /dev/null +++ b/t/recipes/checks/fields/description/description-mentions-planned-features/eval/hints @@ -0,0 +1,8 @@ +description-mentions-planned-features (binary): description-mentions-planned-features (line 9) +description-mentions-planned-features (binary): description-mentions-planned-features (line 8) +description-mentions-planned-features (binary): description-mentions-planned-features (line 7) +description-mentions-planned-features (binary): description-mentions-planned-features (line 6) +description-mentions-planned-features (binary): description-mentions-planned-features (line 13) +description-mentions-planned-features (binary): description-mentions-planned-features (line 12) +description-mentions-planned-features (binary): description-mentions-planned-features (line 11) +description-mentions-planned-features (binary): description-mentions-planned-features (line 10) diff --git a/t/recipes/checks/fields/description/description-perl/build-spec/debian/control.in b/t/recipes/checks/fields/description/description-perl/build-spec/debian/control.in new file mode 100644 index 0000000..ac66abe --- /dev/null +++ b/t/recipes/checks/fields/description/description-perl/build-spec/debian/control.in @@ -0,0 +1,27 @@ +Source: [% $source %] +Priority: optional +Section: perl +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: libdeb-long-description-perl +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: lintian dummy package to test a module name related check + This package is solely meant for testing a lintian check to argue + about not mentioning the contained perl module. + . + For testing and length-ish purposes, with Long::Description a similar + name is mentioned though. + +Package: libdeb-long-description-proper-perl +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: lintian dummy package to test a module name related false positive + This package is solely meant for testing a lintian check to argue + about not mentioning the contained perl module. + . + This is a package which checks the test for false positives, so it + actually mentions Deb::Long::Description::Proper. diff --git a/t/recipes/checks/fields/description/description-perl/build-spec/debian/libdeb-long-description-perl.install b/t/recipes/checks/fields/description/description-perl/build-spec/debian/libdeb-long-description-perl.install new file mode 100644 index 0000000..306e16a --- /dev/null +++ b/t/recipes/checks/fields/description/description-perl/build-spec/debian/libdeb-long-description-perl.install @@ -0,0 +1 @@ +lib/Deb/Long/Description.pm usr/share/perl5/Deb/Long diff --git a/t/recipes/checks/fields/description/description-perl/build-spec/debian/libdeb-long-description-proper-perl.install b/t/recipes/checks/fields/description/description-perl/build-spec/debian/libdeb-long-description-proper-perl.install new file mode 100644 index 0000000..5c2f399 --- /dev/null +++ b/t/recipes/checks/fields/description/description-perl/build-spec/debian/libdeb-long-description-proper-perl.install @@ -0,0 +1 @@ +lib/Deb/Long/Description/Proper.pm usr/share/perl5/Deb/Long/Description diff --git a/t/recipes/checks/fields/description/description-perl/build-spec/fill-values b/t/recipes/checks/fields/description/description-perl/build-spec/fill-values new file mode 100644 index 0000000..f3c08da --- /dev/null +++ b/t/recipes/checks/fields/description/description-perl/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: description-perl +Description: Tests of perl-related description tags diff --git a/t/recipes/checks/fields/description/description-perl/build-spec/orig/lib/Deb/Long/Description.pm b/t/recipes/checks/fields/description/description-perl/build-spec/orig/lib/Deb/Long/Description.pm new file mode 100644 index 0000000..e86bca4 --- /dev/null +++ b/t/recipes/checks/fields/description/description-perl/build-spec/orig/lib/Deb/Long/Description.pm @@ -0,0 +1,5 @@ +# Dummy Perl module for lintian testing purposes. + +package Deb::Long::Description; + +return 1; diff --git a/t/recipes/checks/fields/description/description-perl/build-spec/orig/lib/Deb/Long/Description/Proper.pm b/t/recipes/checks/fields/description/description-perl/build-spec/orig/lib/Deb/Long/Description/Proper.pm new file mode 100644 index 0000000..67230b9 --- /dev/null +++ b/t/recipes/checks/fields/description/description-perl/build-spec/orig/lib/Deb/Long/Description/Proper.pm @@ -0,0 +1,5 @@ +# Dummy Perl module for lintian testing purposes. + +package Deb::Long::Description::Proper; + +return 1; diff --git a/t/recipes/checks/fields/description/description-perl/eval/desc b/t/recipes/checks/fields/description/description-perl/eval/desc new file mode 100644 index 0000000..9c7aaa4 --- /dev/null +++ b/t/recipes/checks/fields/description/description-perl/eval/desc @@ -0,0 +1,2 @@ +Testname: description-perl +Check: fields/description diff --git a/t/recipes/checks/fields/description/description-perl/eval/hints b/t/recipes/checks/fields/description/description-perl/eval/hints new file mode 100644 index 0000000..f9566f4 --- /dev/null +++ b/t/recipes/checks/fields/description/description-perl/eval/hints @@ -0,0 +1 @@ +libdeb-long-description-perl (binary): perl-module-name-not-mentioned-in-description Deb::Long::Description diff --git a/t/recipes/checks/fields/description/description-synopsis-might-not-be-phrased-properly/build-spec/debian/control.in b/t/recipes/checks/fields/description/description-synopsis-might-not-be-phrased-properly/build-spec/debian/control.in new file mode 100644 index 0000000..ae4bdbd --- /dev/null +++ b/t/recipes/checks/fields/description/description-synopsis-might-not-be-phrased-properly/build-spec/debian/control.in @@ -0,0 +1,117 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %]-full-stop +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: This synopsis ends with a full-stop. + This description ends with a full-stop. + . + 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. + +Package: [% $source %]-no-full-stop +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: This synopsis does not end with a full stop + This description does not end with a full stop + . + 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. + +Package: [% $source %]-two-sentences +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: This synopsis starts a sentence. Then starts another. + This description starts a sentence. Then starts another. + . + 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. + +Package: [% $source %]-etc +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: This synopsis ends with, etc. + This description ends with, etc. + . + 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. + +Package: [% $source %]-eg +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: This synopsis contains, e.g. /foo/bar/baz.conf + This description contains, e.g. /foo/bar/baz.conf + . + 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. + +Package: [% $source %]-eg-variant +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: This synopsis contains, eg. /foo/bar/baz.conf + This description contains, eg. /foo/bar/baz.conf + . + 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. + +Package: [% $source %]-2-ellipsis +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: This synopsis contains a 2-ellipsis .. and other words + This description contains a 2-ellipsis .. and other words + . + 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. + +Package: [% $source %]-3-ellipsis +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: This synopsis contains a 3-ellipsis ... and other words + This description contains a 3-ellipsis ... and other words + . + 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. + +Package: [% $source %]-4-ellipsis +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: This synopsis contains a 4-ellipsis .... and other words + This description contains a 4-ellipsis .... and other words + . + 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. + +Package: [% $source %]-misspelt +Architecture: all +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: This synopsis ends with mispelling of stretc. + This description ends with mispelling of stretc. + . + 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/fields/description/description-synopsis-might-not-be-phrased-properly/build-spec/fill-values b/t/recipes/checks/fields/description/description-synopsis-might-not-be-phrased-properly/build-spec/fill-values new file mode 100644 index 0000000..0daadc2 --- /dev/null +++ b/t/recipes/checks/fields/description/description-synopsis-might-not-be-phrased-properly/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: description-synopsis-might-not-be-phrased-properly +Description: Tests for fullstop detection diff --git a/t/recipes/checks/fields/description/description-synopsis-might-not-be-phrased-properly/eval/desc b/t/recipes/checks/fields/description/description-synopsis-might-not-be-phrased-properly/eval/desc new file mode 100644 index 0000000..cc9e633 --- /dev/null +++ b/t/recipes/checks/fields/description/description-synopsis-might-not-be-phrased-properly/eval/desc @@ -0,0 +1,2 @@ +Testname: description-synopsis-might-not-be-phrased-properly +Check: fields/description diff --git a/t/recipes/checks/fields/description/description-synopsis-might-not-be-phrased-properly/eval/hints b/t/recipes/checks/fields/description/description-synopsis-might-not-be-phrased-properly/eval/hints new file mode 100644 index 0000000..d6611a9 --- /dev/null +++ b/t/recipes/checks/fields/description/description-synopsis-might-not-be-phrased-properly/eval/hints @@ -0,0 +1,5 @@ +description-synopsis-might-not-be-phrased-properly-two-sentences (binary): synopsis-is-a-sentence "This synopsis starts a sentence. Then starts another." +description-synopsis-might-not-be-phrased-properly-misspelt (binary): synopsis-is-a-sentence "This synopsis ends with mispelling of stretc." +description-synopsis-might-not-be-phrased-properly-full-stop (binary): synopsis-is-a-sentence "This synopsis ends with a full-stop." +description-synopsis-might-not-be-phrased-properly-4-ellipsis (binary): synopsis-is-a-sentence "This synopsis contains a 4-ellipsis .... and other words" +description-synopsis-might-not-be-phrased-properly-2-ellipsis (binary): synopsis-is-a-sentence "This synopsis contains a 2-ellipsis .. and other words" diff --git a/t/recipes/checks/fields/description/description-wording/build-spec/debian/control.in b/t/recipes/checks/fields/description/description-wording/build-spec/debian/control.in new file mode 100644 index 0000000..3f6fb5b --- /dev/null +++ b/t/recipes/checks/fields/description/description-wording/build-spec/debian/control.in @@ -0,0 +1,17 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. You should not install it like a regular package, we can guarantee + you that. This is a test package. This package does nothing useful at all. + It may be an empty package. diff --git a/t/recipes/checks/fields/description/description-wording/build-spec/fill-values b/t/recipes/checks/fields/description/description-wording/build-spec/fill-values new file mode 100644 index 0000000..85f0d6a --- /dev/null +++ b/t/recipes/checks/fields/description/description-wording/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: description-wording +Description: Tests for description wording diff --git a/t/recipes/checks/fields/description/description-wording/eval/desc b/t/recipes/checks/fields/description/description-wording/eval/desc new file mode 100644 index 0000000..a047232 --- /dev/null +++ b/t/recipes/checks/fields/description/description-wording/eval/desc @@ -0,0 +1,2 @@ +Testname: description-wording +Check: fields/description diff --git a/t/recipes/checks/fields/description/description-wording/eval/hints b/t/recipes/checks/fields/description/description-wording/eval/hints new file mode 100644 index 0000000..412e2a7 --- /dev/null +++ b/t/recipes/checks/fields/description/description-wording/eval/hints @@ -0,0 +1 @@ +description-wording (binary): using-first-person-in-description line 3: we diff --git a/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/README.Debian b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/README.Debian new file mode 100644 index 0000000..69112e6 --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/debian/changelog.in b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/changelog.in new file mode 100644 index 0000000..8d16a3d --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/debian/compat.in b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/control.in b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/control.in new file mode 100644 index 0000000..a668392 --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/debian/copyright b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/copyright new file mode 100644 index 0000000..31b796a --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/debian/cron.d.ex b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/cron.d.ex new file mode 100644 index 0000000..d00b7d0 --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/debian/dirs b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/dirs new file mode 100644 index 0000000..ca882bb --- /dev/null +++ b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/dirs @@ -0,0 +1,2 @@ +usr/bin +usr/sbin diff --git a/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/docs b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/docs new file mode 100644 index 0000000..e845566 --- /dev/null +++ b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/docs @@ -0,0 +1 @@ +README diff --git a/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/emacsen-install.ex b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/emacsen-install.ex new file mode 100644 index 0000000..393594b --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/debian/emacsen-remove.ex b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/emacsen-remove.ex new file mode 100644 index 0000000..c48d194 --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/debian/emacsen-startup.ex b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/emacsen-startup.ex new file mode 100644 index 0000000..b51657a --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.default.ex b/t/recipes/checks/fields/description/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/fields/description/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/fields/description/generic-dh-make-2008/build-spec/debian/generic-dh-make-2008.doc-base.EX b/t/recipes/checks/fields/description/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/fields/description/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/fields/description/generic-dh-make-2008/build-spec/debian/init.d.ex b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/init.d.ex new file mode 100644 index 0000000..b464594 --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/debian/init.d.lsb.ex b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/init.d.lsb.ex new file mode 100644 index 0000000..b3559de --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/debian/manpage.1.ex b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/manpage.1.ex new file mode 100644 index 0000000..d67baa2 --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/debian/manpage.sgml.ex b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/manpage.sgml.ex new file mode 100644 index 0000000..26b3e0c --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/debian/manpage.xml.ex b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/manpage.xml.ex new file mode 100644 index 0000000..2d01c6f --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/debian/menu.ex b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/menu.ex new file mode 100644 index 0000000..8a67e62 --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/debian/postinst.ex b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/postinst.ex new file mode 100644 index 0000000..b5f5ca7 --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/debian/postrm.ex b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/postrm.ex new file mode 100644 index 0000000..1d8a18a --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/debian/preinst.ex b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/preinst.ex new file mode 100644 index 0000000..3134ccf --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/debian/prerm.ex b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/prerm.ex new file mode 100644 index 0000000..4e5dd3f --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/debian/rules b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/rules new file mode 100755 index 0000000..92aa2b1 --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/debian/watch.ex b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/debian/watch.ex new file mode 100644 index 0000000..e62d18f --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/fill-values b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/fill-values new file mode 100644 index 0000000..ef7a896 --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/orig/Makefile b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/orig/Makefile new file mode 100644 index 0000000..4f762d8 --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/orig/README b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/orig/README new file mode 100644 index 0000000..6a3c009 --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/build-spec/pre-build.in b/t/recipes/checks/fields/description/generic-dh-make-2008/build-spec/pre-build.in new file mode 100755 index 0000000..bbdb5cb --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/generic-dh-make-2008/eval/desc b/t/recipes/checks/fields/description/generic-dh-make-2008/eval/desc new file mode 100644 index 0000000..adbc1d9 --- /dev/null +++ b/t/recipes/checks/fields/description/generic-dh-make-2008/eval/desc @@ -0,0 +1,4 @@ +Testname: generic-dh-make-2008 +Check: fields/description +See-Also: + Bug#497347 diff --git a/t/recipes/checks/fields/description/generic-dh-make-2008/eval/hints b/t/recipes/checks/fields/description/generic-dh-make-2008/eval/hints new file mode 100644 index 0000000..193183c --- /dev/null +++ b/t/recipes/checks/fields/description/generic-dh-make-2008/eval/hints @@ -0,0 +1,2 @@ +generic-dh-make-2008 (binary): extended-description-is-probably-too-short +generic-dh-make-2008 (binary): description-is-dh_make-template diff --git a/t/recipes/checks/fields/description/generic-dh-make-2008/eval/post-test b/t/recipes/checks/fields/description/generic-dh-make-2008/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/fields/description/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/fields/description/legacy-binary/build-spec/debian/NEWS.Debian b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/NEWS.Debian new file mode 100644 index 0000000..29f561c --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/NEWS.Debian @@ -0,0 +1,12 @@ +binary (4-1.1) UNRELEASED; urgency=high + + This is a Debian NEWS entry that isn't encoded properly in UTF-8: . + It also has a usefull speling error. + + -- Russ Allbery <rra@debian.org> Sun, 14 Oct 2007 17:11:36 -0700 + +binary (1) unstable; urgency=low + + This is another entry but this one isn't syntactically valid. + + -- Russ Allbery 2007-10-14 diff --git a/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/README.Debian b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/README.Debian new file mode 100644 index 0000000..94bcc0a --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/README.Debian @@ -0,0 +1,5 @@ +this is a binary package to test lintian's handling of bins. +Check handling of D-Bus and dbus (neither of which should produce +warnings). + + -- Russ Allbery <rra@debian.org>, Wed, 6 Feb 2008 18:35:11 -0800 diff --git a/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/changelog.in b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/changelog.in new file mode 100644 index 0000000..39301d6 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/changelog.in @@ -0,0 +1,47 @@ +binary ([% $version %]) [% $distribution %]; urgency=low + + * I'm doing an comaintainer-upload, acknowledging a NMU, but with a version + number which suggests I'm doing a NMU myself. + + Lintian-maintainers: Please don't update this changelog, otherwise you'll + probably break the checks/nmu checks. + + -- Jeroen van Wolffelaar <jeroen@wolffelaar.nl> Sun, 18 Apr 2004 01:49:42 +0200 + +binary (4-1) unstable; urgency=low + + * Weird version number for the new check for accidents with native + packaging. + * Date was fixed by BR and this test was put on changelog-file-strange-date + due to dpkg bug, see #794674. + + -- Marc 'HE' Brockschmidt <he@debian.org> Thu, 15 Apr 2004 23:33:51 +0200 + +binary (4) unstable; urgency=low + + * Add big file to /usr/share to trigger the big-usr-share check + + -- Jeroen van Wolffelaar <jeroen@wolffelaar.nl> Fri, 27 Feb 2004 10:15:59 +0100 + +binary (3) unstable; urgency=unlimited + + * Add some bogus menu entries using su-to-root in a bogus way + + -- Jeroen van Wolffelaar <jeroen@wolffelaar.nl> Thu, 12 Feb 2004 20:11:22 +0100 + +binary (2) unstable; urgency=low + + * Added an INSTALL document which policy 6.3 suggests not to do + + -- Sean 'Shaleh' Perry <shaleh@debian.org> Tue, 30 Jan 2001 15:23:59 -0800 + +binary (1) unstable; urgency=low + + * hello.c added + * hello-static is same as hello, but compiled statically + * added a menu entry which lacks a Section + * added a postinst + * postinst calls suidregister which is no longer policy compliant + + -- Sean 'Shaleh' Perry <shaleh@debian.org> Wed, 10 Jan 2001 08:55:34 -0800 + diff --git a/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/conffiles b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/conffiles new file mode 100644 index 0000000..d1a0843 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/conffiles @@ -0,0 +1 @@ +/etc/menu-methods/lintian diff --git a/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/control b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/control new file mode 100644 index 0000000..c797357 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/control @@ -0,0 +1,42 @@ +Source: binary +Section: misc +Priority: optional +Maintainer: Lintian Maintainers <lintian-maint@debian.org> +Uploaders: Co-maintainer one <one@debian.org>, Jeroen van Wolffelaar <jeroen@wolffelaar.nl>, Co-maintainer three <three@debian.org> +Standards-Version: 3.2.1 +Homepage: http://lintian.debian.org/ +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +XS-Vcs-Browser: http://svn.wolffelaar.nl/lintian/trunk +XS-Dm-Upload-Allowed: yes + +Package: binary +Architecture: any +Pre-Depends: ${shlibs:Depends}, xorg, binary-data (= ${source:Version}), libssl0.9.8 +Homepage: <http://lintian.debian.org/> +Vcs-Svn: http://svn.wolffelaar.nl/lintian/trunk +Description: test handling of binary files + Regression test for lintian's handling of binary files for debian. This + is checked for picky spelling errors. + . + This package list [ subversion | gconf ] should not be flagged as a spelling + mistake. The spelling correction for dont should be correct. + . + Homepage: http://lintian.debian.org/ + +Package: binary-data +Architecture: all +Depends: binary (= ${source:Version}), libssl-not-openssl, + libssl0.9.8 | or-something-else +Description: test handling of binary relationships + Regression test for lintian's checking of package relationships between + arch:any and arch:all packages. + . + This mention of subversion should be flagged as a spelling mistake. + +#Package: binary-comment +#Architecture: space-almonds +#Depends: * +#Depends: * +#Description: test comment support +# Yes, comments are actually allowed in debian/control, so none of the +# above should produce errors. diff --git a/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/copyright b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/copyright new file mode 100644 index 0000000..1d6806d --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/copyright @@ -0,0 +1,15 @@ +hello.c is released under public domain. 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. + +A reference to /usr/share/common-licenses/GPL-2 to make it look like this +package is under the GPL and trigger the OpenSSL warning. + +Test for old FSF address: + +Free Software Foundation, Inc., 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. + +Test for deprecated ntionl ncoding. + +Improper capitalization of linux or debian isn't caught here. diff --git a/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/doc-base b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/doc-base new file mode 100644 index 0000000..7e5b38f --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/doc-base @@ -0,0 +1,41 @@ +Document: binary!docs +Title: Broken debian binary doc-base control file +Author: Russ Allbery +Abstract: This control file exercises various tests of doc-base control + files, including several things that aren't tested yet. The third and + fourth one has trailing whitespace. + . + This section has a speling error and bad character. + . + The above separator was fine. +Section: Non/Existant +Unknown: Some field + + + +Format: debiandoc-sgML +Files: /usr/share/doc/binary/binary.sgml.gz +Unknown: Some field + +Format: ESP +Index: /usr/share/doc/binary/binary.txt + +Index: /usr/share/doc/binary/html/index.html + /usr/share/doc/binary/html/ch1.html + /usr/share/doc/binary/html/ch4.html + + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch?.h*l + /usr/share/doc/binary/hml/*.html + +Format: inFO +Files: /usr/share/info/binary.info.gz + +Format: HTML +Index: /usr/share/doc/binary/html/index.html +Files: /usr/share/doc/binary/html/ch5.html + /usr/share/doc/binary/html/ch6.html + + diff --git a/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/goodbye.desktop b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/goodbye.desktop new file mode 100644 index 0000000..f6ce8e3 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/goodbye.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Name:Goodbye +# Name=Goodbye +Comment=Say hello! +SpecialTag=This doesn't exist! +Exec=goodbye +icon=hello +Terminal=true +Type=Application +Categories=WeirdStuff;Screensaver; +Encoding=ISO-10646-1 +[Other Entry] +Name=Goodbye diff --git a/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/hello.desktop b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/hello.desktop new file mode 100644 index 0000000..f795468 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/hello.desktop @@ -0,0 +1,14 @@ +# some random comment + +# [Foo Bar] +[KDE Desktop Entry] +Name=Hello +Name[en_US]=Hello +Comment=Say hello!
+Exec=kdesu hello +Icon=hello +Terminal=true +Type=Application +Categories=GNOME;GTK;System;Applet;X-Foo;Settings; +Encoding=UTF-8 +OnlyShowIn=GNOME; diff --git a/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/menu b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/menu new file mode 100644 index 0000000..e8972f4 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/menu @@ -0,0 +1,26 @@ +?package(binary):needs=text title="Hello World" command="/usr/bin/hello" +?package(binary):needs=text section="Applications/System" title="Run cfdisk (0)" command="/usr/bin/su-to-root cfdisk" +?package(binary):needs="text" section="Applications/System/Hardware" title="Run cfdisk (1)" command="sux -p cfdisk" +?package(binary):needs="x11" section="Window Managers" title="Run xfdisk" command="/usr/sbin/su-to-root -c xfdisk" +?package(binary):needs="wm" section="Applications/System/Administration" title="Run fdisk-wm" command="su-to-root -c hello" +?package(binary):section="Apps/Games" title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Apps/System" title="I'm not here!" command="/imnothere" +?package(binary,other-binary):\ + needs="text"\ + section="Applications/Shells"\ + title="more than one required"\ + command="other-bin -s omething" +?package(binary):needs="wmmodule" section="WindowManagers/Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="wmmodule" section="FVWM Modules" title="somemodule" command="ModuleCmd" +?package(binary):needs="text" section="Applications/System/Administration" title="I'm not in /usr/bin!" command="iminusrbin" +?package(binary):needs="text"\ + section="Applications/System/Administration"\ + title="I'm not root!" command="su-to-root -c imnothere" +?package(binary):needs="text" section="Applications/System/Administration"\ + title="Run cfdisk (0)" command="cfdisk" +?package(binary):needs="text" section="Applications/System/Administration" title="Hello World" command="/usr/bin/hello" +?package(binary):needs="wm" section="FVWM Modules" title="Fake Module" command="hello" +?package(binary):needs="fvwmmodule" section="Window Maker" title="Fake Module"\ + command="hello" +?package(binary):needs="x11" section="Applications/System/Hardware" title="Run xfdisk" command="su-to-root -c 'xfdisk -f'" +?package(binary):needs="text" section="Applications/System/Administration" title="foo" command="sh /path/to/foo" diff --git a/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/menu-method b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/menu-method new file mode 100644 index 0000000..9f07bd7 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/menu-method @@ -0,0 +1,22 @@ +#!/usr/bin/install-menu + +# -*- mode: shell-script; -*- +#I need menu-1! +# + +!include notmenu.h + +compat="menu-2" + +outputencoding="UTF-8"; +outputlanguage="C"; + +x11 = AppEntry("false"); +text = AppEntry("true"); + +startmenu = ""; +endmenu = ""; +submenutitle = ""; +rootprefix = "/var/lib/lintian/menu"; +userprefix = ".local/share/lintian/menu"; + diff --git a/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/postinst b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/postinst new file mode 100644 index 0000000..29e1861 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/postinst @@ -0,0 +1,6 @@ +#! /bin/bash -e + +if [ $1 eq 'configure' ] +then + suidregister hello-static root root 4755 +fi diff --git a/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/rules b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/rules new file mode 100755 index 0000000..a962ea9 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/rules @@ -0,0 +1,92 @@ +#!/usr/bin/make -f + +tmp=debian/tmp + +# This reference to $(PWD) should not cause an error but the one below +# should. +build-arch: + make + echo $(PWD) + +build: build-arch + +clean: + make -i clean + [ ! -f debian/files ] || rm -f debian/files + [ ! -f debian/substvars ] || rm -f debian/substvars + [ ! -d debian/tmp ] || rm -rf debian/tmp + [ ! -d debian/binary ] || rm -rf debian/binary + [ ! -d debian/binary-data ] || rm -rf debian/binary-data + +binary-arch: build + install -d $(tmp)/usr/bin + install -d $(tmp)/boot/hello + install -m 755 hello $(tmp)/usr/bin + touch $(tmp)/usr/bin/iminusrbin + chmod 755 $(tmp)/usr/bin/iminusrbin + install -m 755 hello-static $(tmp)/usr/bin + strip $(tmp)/usr/bin/hello-static + install -m 755 hello-static $(tmp)/usr/bin/hello.static + strip --remove-section=.comment --remove-section=.note $(tmp)/usr/bin/hello.static + ln $(tmp)/usr/bin/hello.static $(tmp)/usr/bin/static-hello + install -m 755 hello-static $(tmp)/boot/hello + strip --remove-section=.comment --remove-section=.note $(tmp)/boot/hello/hello-static + install -d $(tmp)/usr/share/doc/binary + install -m 644 INSTALL $(tmp)/usr/share/doc/binary + install -d $(tmp)/usr/share/doc/binary/html + echo '<html></html>' > $(tmp)/usr/share/doc/binary/html/index.html + echo '<html></html>' > $(tmp)/usr/share/doc/binary/html/ch1.html + ln -s ../html/./ch1.html $(tmp)/usr/share/doc/binary/html/ch2.html + ln -s /usr/share/doc/binary/htm/ch1.html $(tmp)/usr/share/doc/binary/html/ch3.html + echo '<html></html>' > $(tmp)/usr/share/doc/binary/html/ch5.html + ln $(tmp)/usr/share/doc/binary/html/ch5.html \ + $(tmp)/usr/share/doc/binary/html/ch6.html + install -d $(tmp)/usr/share/menu + install -d $(tmp)/usr/lib/menu + install -d $(tmp)/usr/share/binary + install -m 644 debian/menu $(tmp)/usr/share/menu/binary + install -m 644 debian/menu $(tmp)/usr/lib/menu/binary + install -d $(tmp)/etc/menu-methods + install -m 755 debian/menu-method $(tmp)/etc/menu-methods/lintian + install -d $(tmp)/usr/share/doc-base + install -m 644 debian/doc-base $(tmp)/usr/share/doc-base/binary + touch '$(tmp)/usr/share/doc-base/space ' + install -m 644 debian/README.Debian $(tmp)/usr/share/doc/binary + install -m 644 debian/NEWS.Debian $(tmp)/usr/share/doc/binary + gzip -n -9 $(tmp)/usr/share/doc/binary/NEWS.Debian + install -m 644 debian/copyright $(tmp)/usr/share/doc/binary + install -m 644 debian/changelog $(tmp)/usr/share/doc/binary + #gzip -n -9 $(tmp)/usr/share/doc/binary/changelog + install -d $(tmp)/DEBIAN + install -m 755 debian/postinst $(tmp)/DEBIAN + install -m 644 debian/conffiles $(tmp)/DEBIAN + + install -d $(tmp)/usr/share/applications + install -m 644 debian/hello.desktop \ + $(tmp)/usr/share/applications/hello.desktop + install -m 755 debian/goodbye.desktop \ + $(tmp)/usr/share/applications/goodbye.desktop + + # should be ok... + echo boe > $(tmp)/usr/bar + ln $(tmp)/usr/bar $(tmp)/usr/foo + # but this isn't + echo boe > $(tmp)/usr/bar2 + ln $(tmp)/usr/bar2 $(tmp)/usr/share/baz + + dd if=/dev/zero of=$(tmp)/usr/share/binary/largefile bs=1024 count=4000 + + install -d debian/binary-data/DEBIAN + install -d debian/binary-data/usr/share/doc + ln -s binary debian/binary-data/usr/share/doc/binary-data + + dpkg-shlibdeps $(tmp)/usr/bin/hello + dpkg-gencontrol -pbinary -isp + dpkg-gencontrol -pbinary-data -Pdebian/binary-data -isp + + dpkg --build debian/tmp .. + dpkg --build debian/binary-data .. + +binary: binary-arch + +.PHONY: build-arch build binary-arch binary clean diff --git a/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/templates b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/templates new file mode 100644 index 0000000..3d92861 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-binary/build-spec/debian/templates @@ -0,0 +1,16 @@ +# The debconf templates defined here are the sort that you'd use if +# providing a wordlist and an ispell dictionary for the language +# "perl". This shouldn't trigger warnings about not using debconf-po. + +Template: shared/packages-ispell +Type: text +Description: + +Template: shared/packages-wordlist +Type: text +Description: + +Template: miscfiles/languages +Type: text +Default: perl (Pathologically Eclectic Rubbish Lister) +Description: diff --git a/t/recipes/checks/fields/description/legacy-binary/build-spec/fill-values b/t/recipes/checks/fields/description/legacy-binary/build-spec/fill-values new file mode 100644 index 0000000..b503871 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-binary/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-binary +Source: binary +Version: 4-1.1 +Description: Legacy test "binary" diff --git a/t/recipes/checks/fields/description/legacy-binary/build-spec/orig/INSTALL b/t/recipes/checks/fields/description/legacy-binary/build-spec/orig/INSTALL new file mode 100644 index 0000000..3b50ea9 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-binary/build-spec/orig/INSTALL @@ -0,0 +1,176 @@ +Basic Installation +================== + + These are generic installation instructions. + + The `configure' shell script attempts to guess correct values for +various system-dependent variables used during compilation. It uses +those values to create a `Makefile' in each directory of the package. +It may also create one or more `.h' files containing system-dependent +definitions. Finally, it creates a shell script `config.status' that +you can run in the future to recreate the current configuration, a file +`config.cache' that saves the results of its tests to speed up +reconfiguring, and a file `config.log' containing compiler output +(useful mainly for debugging `configure'). + + If you need to do unusual things to compile the package, please try +to figure out how `configure' could check whether to do them, and mail +diffs or instructions to the address given in the `README' so they can +be considered for the next release. If at some point `config.cache' +contains results you don't want to keep, you may remove or edit it. + + The file `configure.in' is used to create `configure' by a program +called `autoconf'. You only need `configure.in' if you want to change +it or regenerate `configure' using a newer version of `autoconf'. + +The simplest way to compile this package is: + + 1. `cd' to the directory containing the package's source code and type + `./configure' to configure the package for your system. If you're + using `csh' on an old version of System V, you might need to type + `sh ./configure' instead to prevent `csh' from trying to execute + `configure' itself. + + Running `configure' takes a while. While running, it prints some + messages telling which features it is checking for. + + 2. Type `make' to compile the package. + + 3. Optionally, type `make check' to run any self-tests that come with + the package. + + 4. Type `make install' to install the programs and any data files and + documentation. + + 5. You can remove the program binaries and object files from the + source code directory by typing `make clean'. To also remove the + files that `configure' created (so you can compile the package for + a different kind of computer), type `make distclean'. There is + also a `make maintainer-clean' target, but that is intended mainly + for the package's developers. If you use it, you may have to get + all sorts of other programs in order to regenerate files that came + with the distribution. + +Compilers and Options +===================== + + Some systems require unusual options for compilation or linking that +the `configure' script does not know about. You can give `configure' +initial values for variables by setting them in the environment. Using +a Bourne-compatible shell, you can do that on the command line like +this: + CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure + +Or on systems that have the `env' program, you can do it like this: + env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure + +Compiling For Multiple Architectures +==================================== + + You can compile the package for more than one kind of computer at the +same time, by placing the object files for each architecture in their +own directory. To do this, you must use a version of `make' that +supports the `VPATH' variable, such as GNU `make'. `cd' to the +directory where you want the object files and executables to go and run +the `configure' script. `configure' automatically checks for the +source code in the directory that `configure' is in and in `..'. + + If you have to use a `make' that does not supports the `VPATH' +variable, you have to compile the package for one architecture at a time +in the source code directory. After you have installed the package for +one architecture, use `make distclean' before reconfiguring for another +architecture. + +Installation Names +================== + + By default, `make install' will install the package's files in +`/usr/local/bin', `/usr/local/man', etc. You can specify an +installation prefix other than `/usr/local' by giving `configure' the +option `--prefix=PATH'. + + You can specify separate installation prefixes for +architecture-specific files and architecture-independent files. If you +give `configure' the option `--exec-prefix=PATH', the package will use +PATH as the prefix for installing programs and libraries. +Documentation and other data files will still use the regular prefix. + + If the package supports it, you can cause programs to be installed +with an extra prefix or suffix on their names by giving `configure' the +option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. + +Optional Features +================= + + Some packages pay attention to `--enable-FEATURE' options to +`configure', where FEATURE indicates an optional part of the package. +They may also pay attention to `--with-PACKAGE' options, where PACKAGE +is something like `gnu-as' or `x' (for the X Window System). The +`README' should mention any `--enable-' and `--with-' options that the +package recognizes. + + For packages that use the X Window System, `configure' can usually +find the X include and library files automatically, but if it doesn't, +you can use the `configure' options `--x-includes=DIR' and +`--x-libraries=DIR' to specify their locations. + +Specifying the System Type +========================== + + There may be some features `configure' can not figure out +automatically, but needs to determine by the type of host the package +will run on. Usually `configure' can figure that out, but if it prints +a message saying it can not guess the host type, give it the +`--host=TYPE' option. TYPE can either be a short name for the system +type, such as `sun4', or a canonical name with three fields: + CPU-COMPANY-SYSTEM + +See the file `config.sub' for the possible values of each field. If +`config.sub' isn't included in this package, then this package doesn't +need to know the host type. + + If you are building compiler tools for cross-compiling, you can also +use the `--target=TYPE' option to select the type of system they will +produce code for and the `--build=TYPE' option to select the type of +system on which you are compiling the package. + +Sharing Defaults +================ + + If you want to set default values for `configure' scripts to share, +you can create a site shell script called `config.site' that gives +default values for variables like `CC', `cache_file', and `prefix'. +`configure' looks for `PREFIX/share/config.site' if it exists, then +`PREFIX/etc/config.site' if it exists. Or, you can set the +`CONFIG_SITE' environment variable to the location of the site script. +A warning: not all `configure' scripts look for a site script. + +Operation Controls +================== + + `configure' recognizes the following options to control how it +operates. + +`--cache-file=FILE' + Use and save the results of the tests in FILE instead of + `./config.cache'. Set FILE to `/dev/null' to disable caching, for + debugging `configure'. + +`--help' + Print a summary of the options to `configure', and exit. + +`--quiet' +`--silent' +`-q' + Do not print messages saying which checks are being made. + +`--srcdir=DIR' + Look for the package's source code in directory DIR. Usually + `configure' can determine that directory automatically. + +`--version' + Print the version of Autoconf used to generate the `configure' + script, and exit. + +`configure' also accepts some other, not widely useful, options. + diff --git a/t/recipes/checks/fields/description/legacy-binary/build-spec/orig/Makefile b/t/recipes/checks/fields/description/legacy-binary/build-spec/orig/Makefile new file mode 100644 index 0000000..da1dc55 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-binary/build-spec/orig/Makefile @@ -0,0 +1,12 @@ +all: hello hello-static + +hello: hello.c + gcc hello.c -o hello + +hello-static: hello.c + gcc -static hello.c -o hello-static + +clean: + rm -f hello hello-static + +distclean: clean diff --git a/t/recipes/checks/fields/description/legacy-binary/build-spec/orig/hello.c b/t/recipes/checks/fields/description/legacy-binary/build-spec/orig/hello.c new file mode 100644 index 0000000..2fb04e1 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-binary/build-spec/orig/hello.c @@ -0,0 +1,8 @@ +#include <stdio.h> +#include <stdlib.h> + +int main(int argc, char *argv[]) { + + printf("Hello, World!\n"); + exit(0); +} diff --git a/t/recipes/checks/fields/description/legacy-binary/eval/desc b/t/recipes/checks/fields/description/legacy-binary/eval/desc new file mode 100644 index 0000000..cdb33ca --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-binary/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-binary +Check: fields/description diff --git a/t/recipes/checks/fields/description/legacy-binary/eval/hints b/t/recipes/checks/fields/description/legacy-binary/eval/hints new file mode 100644 index 0000000..fe61ed8 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-binary/eval/hints @@ -0,0 +1,4 @@ +binary-data (binary): capitalization-error-in-description subversion Subversion +binary (binary): spelling-error-in-description dont don't +binary (binary): description-contains-homepage line 7 +binary (binary): capitalization-error-in-description debian Debian diff --git a/t/recipes/checks/fields/description/legacy-binary/eval/post-test b/t/recipes/checks/fields/description/legacy-binary/eval/post-test new file mode 100644 index 0000000..3deefd5 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-binary/eval/post-test @@ -0,0 +1,3 @@ +s/arch-dep-package-has-big-usr-share .*kB .*%/arch-dep-package-has-big-usr-share/ +/: hardening-.*/ d +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/changelog.in b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/changelog.in new file mode 100644 index 0000000..f5e308e --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/changelog.in @@ -0,0 +1,6 @@ +debconf ([% $version %]) [% $distribution %]; urgency=low + + * Initial Release + * Changelog line with exactly 80 characters which tests the line-too-long tag. + + -- Lintian Maintainers <debian-lint-maint@debian.org> Wed, 3 May 2006 18:07:19 -0500 diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/compat.in b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/compat.in new file mode 100644 index 0000000..640a566 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/compat.in @@ -0,0 +1 @@ +[% $dh_compat_level %] diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/control b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/control new file mode 100644 index 0000000..bf9f4e9 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/control @@ -0,0 +1,52 @@ +Source: debconf +Section: utils +Priority: optional +Build-Depends: debhelper (>= 4), dpatch +Maintainer: Lintian Maintainers <debian-lint-maint@debian.org> +Standards-Version: 3.7.2 + +Package: debconf-test +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (dummy) + +Package: debconf-test-noscripts +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (noscripts) + Package missing postinst/postrm/config. + . + 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. + +Package: debconf-test-preinst +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (preinst) + Package uses debconf only in preinst. + . + 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. + +Package: debconf-test-postinst +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Test package for the debconf checks of lintian (postinst) + Package uses debconf only in postinst. + . + 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. + +Package: debconf-udeb +Section: debian-installer +XC-Package-Type: udeb +XB-Installer-Menu-Item: 100 +Architecture: any +Depends: ${shlibs:Depends} +Description: Test udeb package for the debconf checks of lintian (dummy) diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/copyright b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/copyright new file mode 100644 index 0000000..84843ee --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/copyright @@ -0,0 +1,10 @@ +Copyright (C) 2004 Frank Lichtenheld <djpig@debian.org> + +Test for really old FSF address: + +Free Software Foundation, Inc., 675 Mass Ave, Cambridge, +MA 02139, USA. + +Test for a dh-make boilerplate: +# 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/fields/description/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates new file mode 100644 index 0000000..93f8071 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test-noscripts.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Foo bar (1) diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst new file mode 100644 index 0000000..56ab871 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test-postinst.postinst @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +. /usr/share/debconf/confmodule + +db_input medium debconf/test + +#DEBHELPER# + +true diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm new file mode 100644 index 0000000..cbf5e3b --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test-postinst.postrm @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi +#DEBHELPER# diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test-postinst.templates b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test-postinst.templates new file mode 100644 index 0000000..2a2a8ab --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test-postinst.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Enter something: diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm new file mode 100644 index 0000000..cbf5e3b --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test-preinst.postrm @@ -0,0 +1,7 @@ +#!/bin/sh +set -e +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi +#DEBHELPER# diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst new file mode 100644 index 0000000..bf6f074 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test-preinst.preinst @@ -0,0 +1,13 @@ +#!/bin/sh +set -e + +# Obsolete name for the confmodule +. /usr/share/debconf/confmodule.sh + +. /usr/share/debconf/confmodule + +db_input medium debconf/test + +#DEBHELPER# + +true diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test-preinst.templates b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test-preinst.templates new file mode 100644 index 0000000..2a2a8ab --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test-preinst.templates @@ -0,0 +1,3 @@ +Template: debconf/test +Type: text +_description: Enter something: diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test.config b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test.config new file mode 100644 index 0000000..9e32d06 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test.config @@ -0,0 +1,24 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +db_settitle "Funky lintian test" + +# Bad priorities. +db_text LOW debconf/test +db_input normal debconf/test + +# Valid priorities. +db_text \ +high debconf/test +foo=medium +db_input $foo debconf/test +db_input "$foo" debconf/test +db_input 'medium' debconf/test + +# debconf/transtring should not be flagged as unused +# (it's aliased to debconf/alias, which is used) +db_register debconf/transtring debconf/alias +db_input medium debconf/alias diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test.postinst b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test.postinst new file mode 100644 index 0000000..b387037 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test.postinst @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +# Not supposed to do this here. +db_input medium debconf/test + +true diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test.templates b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test.templates new file mode 100644 index 0000000..811bb6c --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test.templates @@ -0,0 +1,101 @@ +Template: debconf/test +Type: text +_description: Foo bar (1) + +Template: debconf/testmulti +Type: multiselect +__Choices: foo, bar, boo +_Description: test comma usages in choices fields + +Template: debconf/testmulti-escape +Type: multiselect +_Choices: foo\, bar, boo +_Description: test escaped comma usages in choices fields: + +Template: debconf/testboolean +Type: boolean +_Description: Enter yes or no: + Do you want to answer this question? + +Template: debconf/teststring +Type: string +_Description: This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + This template goes on and on. + +Template: debconf/testnote +Type: note +Description: This should be a title and not a really long sentence that ends in a regular period. + +Template: debconf/1st-person +Type: select +__Choices: one, two +_Description: Select one of these: + I am a stupid test of first-person syntax that tells you to select yes + even though yes isn't an option in this prompt. + +Template: debconf/internal +Type: boolean +Description: For internal use only + We are testing that style checks are not applied to templates that are + marked as internal. + +Template: debconf/no-description +Type: string + +Template: debconf/translate +Type: boolean +_Default: false +_Description: Should this really be translated? + +Template: debconf/transtring +Type: string +_Default: 1 +_Description: Count of templates: + The number of useless numbers that a translator would have to translate + for this template. + +Template: debconf/language +__Choices: English, Spanish, German, French +# This is the default choice. Translators should put their own language, +# if available, here instead, but the value MUST be the English version +# of the value for the package scripts to work properly. +_Default: English[ translators, see the comment in the PO files] +_Description: The default language, an example of a default that should + be translated. + +Template: debconf/error +Type: error +_Description: An error occurred + This is a sample Debconf error template. + +Template: debconf/should-be-boolean +Type: select +__Choices: yes, no +_Description: Choose: + Pick yes or no. + +Template: debconf/should-be-no-longer-a-problem +Type: boolean +_Description: Decide, lintian + Using "no longer" should no longer be detected as + making-assumptions-about-interfaces-in-templates by lintian. diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test.templates.de b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test.templates.de new file mode 100644 index 0000000..f9ea121 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test.templates.de @@ -0,0 +1,3 @@ +Template: debconf/testmulti +Type: multiselect +Choices: foo, bar\, boo, boo diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test.templates.in b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test.templates.in new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-test.templates.in diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-udeb.postinst b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-udeb.postinst new file mode 100644 index 0000000..4ce41f0 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-udeb.postinst @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +ldconfig + +true diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-udeb.templates b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-udeb.templates new file mode 100644 index 0000000..5d7cf5a --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/debconf-udeb.templates @@ -0,0 +1,3 @@ +Template: debian-installer/debconf-udeb/title +Type: text +_description: This is just a test diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/POTFILES.in b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/POTFILES.in new file mode 100644 index 0000000..d0c82f0 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/POTFILES.in @@ -0,0 +1,2 @@ +[type: gettext/rfc822deb] debconf-test.templates +[type: gettext/rfc822deb] debconf-udeb.templates diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/de.po b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/de.po new file mode 100644 index 0000000..86c5796 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/de.po @@ -0,0 +1,66 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2004-12-06 01:01+0100\n" +"Last-Translator: Frank Lichtenheld <djpig@debian.org>\n" +"Language-Team: debian-l10n-german@l.d.o\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "foo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "bar, boo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "boo" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:11 +msgid "foo\\, bar, boo" +msgstr "foo, bar, boo" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr "Dies ist nur ein Test" diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/fr.po b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/fr.po new file mode 100644 index 0000000..c74deb2 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/fr.po @@ -0,0 +1,60 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"Last-Translator: Frank Lichtenheld <djpig@debian.org>\n" +"Language-Team: debian-l10n-german@l.d.o\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "foo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "bar, boo" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "boo" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr " diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/lang.po b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/lang.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/lang.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/nds.po b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/nds.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/nds.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/output b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/output new file mode 100644 index 0000000..c3df1a5 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/output @@ -0,0 +1 @@ +2 utf8 diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/pt_BR.po b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/pt_BR.po new file mode 100644 index 0000000..7ac498a --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/pt_BR.po @@ -0,0 +1,15 @@ +msgid "" +msgstr "" +"Project-Id-Version: debconf-test 1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: 2005-10-13 15:03+0200\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/sample-file.po b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/sample-file.po new file mode 100644 index 0000000..8dcc0ff --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/sample-file.po @@ -0,0 +1 @@ +This is some file that isn't actually a valid .po file. diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/templates.pot b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/templates.pot new file mode 100644 index 0000000..914c77f --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/po/templates.pot @@ -0,0 +1,61 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2004-12-06 00:51+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: text +#. description +#: ../debconf-test.templates:3 +msgid "Foo bar (2)" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "foo" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "bar" +msgstr "" + +#. Type: multiselect +#. Choices +#: ../debconf-test.templates:7 +msgid "boo" +msgstr "" + +#. Type: multiselect +#. Description +#: ../debconf-test.templates:8 +msgid "test comma usages in choices fields" +msgstr "" + +#. Type: text +#. description +#: ../debconf-udeb.templates:3 +msgid "This is just a test" +msgstr "" diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/pycompat b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/pycompat new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/pycompat @@ -0,0 +1 @@ +2 diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/pyversions b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/pyversions new file mode 100644 index 0000000..6f290b0 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/pyversions @@ -0,0 +1 @@ +>= 2.7 diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/rules b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/rules new file mode 100755 index 0000000..933901a --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/debian/rules @@ -0,0 +1,64 @@ +#!/usr/bin/make -f + +deb_dir = debian/debconf +udeb_dir = debian/debconf-udeb +build_dirs = $(deb_dir) $(udeb_dir) + +build-indep: +# There are no architecture-independent files to be built +# by this package. If there were any they would be made +# here. + +build-arch: + dh_testdir + touch build + +build: build-indep build-arch + +clean: + dh_testdir + dh_testroot + -rm -f build + + dh_clean + +binary-indep: build +# There are no architecture-independent files to be uploaded +# generated by this package. If there were any they would be +# made here. + +binary-arch: build + dh_testdir + dh_testroot + dh_prep + dh_installdirs -a + + dh_installchangelogs -a + dh_installdocs -a + dh_installdebconf -pdebconf-test + dh_installdebconf -pdebconf-test-noscripts --noscripts + dh_installdebconf -pdebconf-test-preinst --noscripts + dh_installdebconf -pdebconf-test-postinst --noscripts + dh_installdebconf -pdebconf-udeb + + + + + dh_compress -a + dh_fixperms -a + +# The shlibs stuff doesn't matter here so do it in a weird order to +# test warnings. + dh_installdeb -a + dh_shlibdeps -a + dh_makeshlibs -a + dh_gencontrol -a + dh_md5sums + dh_builddeb -a + dh_makeshlibs -a + +# Below here is fairly generic really + +binary: binary-indep binary-arch + +.PHONY: build-arch build-indep build binary binary-arch binary-indep clean checkroot diff --git a/t/recipes/checks/fields/description/legacy-debconf/build-spec/fill-values b/t/recipes/checks/fields/description/legacy-debconf/build-spec/fill-values new file mode 100644 index 0000000..186615f --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/build-spec/fill-values @@ -0,0 +1,6 @@ +Skeleton: upload-native +Testname: legacy-debconf +Source: debconf +Version: 1~rc1 +Description: Legacy test "debconf" +Default-Build-Depends: debhelper (>= [% $dh_compat_level %]~) diff --git a/t/recipes/checks/fields/description/legacy-debconf/eval/desc b/t/recipes/checks/fields/description/legacy-debconf/eval/desc new file mode 100644 index 0000000..905640f --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-debconf +Check: fields/description diff --git a/t/recipes/checks/fields/description/legacy-debconf/eval/hints b/t/recipes/checks/fields/description/legacy-debconf/eval/hints new file mode 100644 index 0000000..54027ec --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/eval/hints @@ -0,0 +1 @@ +debconf-test (binary): extended-description-is-empty diff --git a/t/recipes/checks/fields/description/legacy-debconf/eval/post-test b/t/recipes/checks/fields/description/legacy-debconf/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-debconf/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/debian/README.Debian b/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/debian/README.Debian new file mode 100644 index 0000000..e289bfb --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/debian/README.Debian @@ -0,0 +1,5 @@ +this is a package to test lintian's handling of files in /etc. +Also, there's a random mention of /usr/doc here to prompt a warning. +But /usr/documentation doesn't. + + -- Russ Allbery <rra@debian.org>, Mon, 18 Feb 2008 16:40:55 -0800 diff --git a/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/debian/changelog.in b/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/debian/changelog.in new file mode 100644 index 0000000..00cdc77 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/debian/changelog.in @@ -0,0 +1,7 @@ +etcfiles ([% $version %]) [% $distribution %]; urgency=low + + * Acknowledge NMU (Closes: #123456). + * initial setup + + -- Lintian Maintainers <lintian-maint@debian.org> Fri, 21 Sep 2001 11:56:02 -0700 + diff --git a/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/debian/conffiles b/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/debian/conffiles new file mode 100644 index 0000000..76032b7 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/debian/conffiles @@ -0,0 +1,5 @@ +/etc/proper +/var/lib/foo +/etc/cron.daily/cronfile-normal +/etc/cron.daily/.cronfile-begins-with-fullstop +/etc/cron.daily/cronfile-contains.fullstop diff --git a/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/debian/conffiles.only b/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/debian/conffiles.only new file mode 100644 index 0000000..a4b3895 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/debian/conffiles.only @@ -0,0 +1,2 @@ +/etc/etcfiles/foo +/etc/etcfiles/bar diff --git a/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/debian/control b/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/debian/control new file mode 100644 index 0000000..f3dbda7 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/debian/control @@ -0,0 +1,20 @@ +Source: etcfiles +Section: misc +Priority: optional +Maintainer: Lintian Maintainers <lintian-maint@debian.org> +Standards-Version: 3.5.0 + +Package: etcfiles +Architecture: any +Depends: ${shlibs:Depends} +Description: test handling of files in /etc + Regression test for lintian's handling of files in /etc. + . + 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. + +Package: only-etcfiles +Architecture: all +Depends: etcfiles (= ${source:Version}) +Description: test handling of conffile-only package diff --git a/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/debian/rules b/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/debian/rules new file mode 100755 index 0000000..97ff09f --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/debian/rules @@ -0,0 +1,64 @@ +#!/usr/bin/make -f + +tmp=debian/tmp +tmponly=debian/only-etcfiles + +clean: + rm -f debian/files debian/substvars + rm -rf debian/tmp + rm -rf debian/only-etcfiles + +build: +build-arch: +build-indep: +binary-indep: + install -d $(tmp)/etc + install -m 644 proper $(tmp)/etc + install -m 644 improper $(tmp)/etc + mkdir $(tmp)/etc/cron.daily + touch $(tmp)/etc/cron.daily/cronfile-normal + touch $(tmp)/etc/cron.daily/.cronfile-begins-with-fullstop + touch $(tmp)/etc/cron.daily/cronfile-contains.fullstop + ln $(tmp)/etc/improper $(tmp)/etc/improper-link + install -d $(tmp)/usr/share/doc/etcfiles + install -d $(tmp)/var/lib + install -m 644 proper $(tmp)/var/lib/foo + install -m 644 debian/README.Debian $(tmp)/usr/share/doc/etcfiles + install -m 644 debian/changelog $(tmp)/usr/share/doc/etcfiles + #gzip -9 $(tmp)/usr/share/doc/etcfiles/changelog + install -d $(tmp)/DEBIAN + install -m 644 debian/conffiles $(tmp)/DEBIAN + + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/cronfile-normal' \ + > debian/tmp/DEBIAN/md5sums + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/.cronfile-begins-with-fullstop' \ + >> debian/tmp/DEBIAN/md5sums + echo 'd41d8cd98f00b204e9800998ecf8427e ./etc/cron.daily/cronfile-contains.fullstop' \ + >> debian/tmp/DEBIAN/md5sums + echo '05c72cacce994208128b7d081116b04a ./etc/proper' \ + >> debian/tmp/DEBIAN/md5sums + echo 'ab371382468880299e5ebd05921764ce etc/improper' \ + >> debian/tmp/DEBIAN/md5sums + echo 'ab371382468880299e5ebd05921764ce usr/bin/foo' \ + >> debian/tmp/DEBIAN/md5sums + echo 'this is a malformed line' \ + >> debian/tmp/DEBIAN/md5sums + echo '56fb27e455dd86d8801f1ecd3a4cee49 usr/share/doc/etcfiles/README.Debian' \ + >> debian/tmp/DEBIAN/md5sums + + install -d $(tmponly)/etc/etcfiles + touch $(tmponly)/etc/etcfiles/foo + touch $(tmponly)/etc/etcfiles/bar + install -d $(tmponly)/usr/share/doc + cd $(tmponly)/usr/share/doc && ln -s etcfiles only-etcfiles + install -d $(tmponly)/DEBIAN + install -m 644 debian/conffiles.only $(tmponly)/DEBIAN/conffiles + + dpkg-gencontrol -isp -petcfiles + dpkg-gencontrol -isp -ponly-etcfiles -P$(tmponly) + dpkg --build $(tmp) .. + dpkg --build $(tmponly) .. + +binary: binary-indep + +.PHONY: binary-indep binary clean diff --git a/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/fill-values b/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/fill-values new file mode 100644 index 0000000..86deb10 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-etcfiles +Source: etcfiles +Version: 1 +Description: Legacy test "etcfiles" diff --git a/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/orig/improper b/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/orig/improper new file mode 100644 index 0000000..23656f4 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/orig/improper @@ -0,0 +1,2 @@ +[config] + var = value
\ No newline at end of file diff --git a/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/orig/proper b/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/orig/proper new file mode 100644 index 0000000..f3dc68b --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-etcfiles/build-spec/orig/proper @@ -0,0 +1,2 @@ +# i am a config file +foo = var
\ No newline at end of file diff --git a/t/recipes/checks/fields/description/legacy-etcfiles/eval/desc b/t/recipes/checks/fields/description/legacy-etcfiles/eval/desc new file mode 100644 index 0000000..9c4c8ec --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-etcfiles/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-etcfiles +Check: fields/description diff --git a/t/recipes/checks/fields/description/legacy-etcfiles/eval/hints b/t/recipes/checks/fields/description/legacy-etcfiles/eval/hints new file mode 100644 index 0000000..376f471 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-etcfiles/eval/hints @@ -0,0 +1 @@ +only-etcfiles (binary): extended-description-is-empty diff --git a/t/recipes/checks/fields/description/legacy-etcfiles/eval/post-test b/t/recipes/checks/fields/description/legacy-etcfiles/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-etcfiles/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/fields/description/legacy-filenames/build-spec/debian/changelog.in b/t/recipes/checks/fields/description/legacy-filenames/build-spec/debian/changelog.in new file mode 100644 index 0000000..b79c4ca --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-filenames/build-spec/debian/changelog.in @@ -0,0 +1,78 @@ +filenames ([% $version %]) [% $distribution %]; urgency=low + + * /me is doing a correct NMU of this package, bumping the epoch too. + + -- Jeroen van Wolffelaar <jeroen@wolffelaar.nl> Sun, 18 Apr 2004 02:04:39 +0200 + +filenames (11) unstable; urgency=low + + * Add a README.macos. + + -- Marc 'HE' Brockschmidt <he@debian.org> Mon, 12 Apr 2004 23:35:24 +0200 + +filenames (10) unstable; urgency=low + + * Some new files to check the checks for the use of /usr/*/X11 and + /usr/X11R6/*. + + -- Marc 'HE' Brockschmidt <he@debian.org> Sun, 11 Apr 2004 17:35:20 +0200 + +filenames (9) unstable; urgency=low + + * Add a two *.ali files, one with the right permission, one with + the more common, but false one. + + -- Marc 'HE' Brockschmidt <he@debian.org> Sun, 11 Apr 2004 00:18:16 +0200 + +filenames (8) unstable; urgency=low + + * Add a real ancient file + + -- Frank Lichtenheld <djpig@debian.org> Thu, 8 Apr 2004 22:22:40 +0200 + +filenames (7) unstable; urgency=low + + * Add a dozen symlinks, some correct, some not + + -- Jeroen van Wolffelaar <jeroen@wolffelaar.nl> Fri, 27 Feb 2004 01:28:42 +0100 + +filenames (6) unstable; urgency=low + + * Add perl files to check if + package-installs-nonbinary-perl-in-usr-lib-perl5 is correctly + issued even after attempting to suppress it in some cases + + -- Frank Lichtenheld <djpig@debian.org> Fri, 27 Feb 2004 00:49:44 +0100 + +filenames (5) unstable; urgency=low + + * Added check for too long symlink + + -- Sean 'Shaleh' Perry <shaleh@debian.org> Wed, 3 Jan 2001 13:20:31 -0800 + +filenames (4) unstable; urgency=low + + * Add /usr/lib/menu/menu file to test the bad-menu-file-name tag. + * Add /usr/lib/menu/README to test the new execption for it. + + -- Richard Braakman <dark@xs4all.nl> Thu, 22 Oct 1998 15:42:52 +0200 + +filenames (3) unstable; urgency=low + + * Don't rely on the installer's umask. + + -- Richard Braakman <dark@xs4all.nl> Thu, 20 Aug 1998 12:45:47 +0200 + +filenames (2) unstable; urgency=low + + * Noted more limitations on what filenames lintian handles. + * Added Changes.gz in /usr/doc/filenames and made a symlink from changelog.gz + to Changes.gz. + + -- Richard Braakman <dark@xs4all.nl> Sat, 4 Jul 1998 15:46:11 +0200 + +filenames (1) unstable; urgency=low + + * Initial version + + -- Richard Braakman <dark@xs4all.nl> Sat, 4 Jul 1998 15:25:01 +0200 diff --git a/t/recipes/checks/fields/description/legacy-filenames/build-spec/debian/control b/t/recipes/checks/fields/description/legacy-filenames/build-spec/debian/control new file mode 100644 index 0000000..1ff9c50 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-filenames/build-spec/debian/control @@ -0,0 +1,42 @@ +Source: filenames +Maintainer: Lintian Maintainer <lintian-maint@debian.org> +Standards-Version: 3.1.1 +Rules-Requires-Root: binary-targets + +Package: filenames +Architecture: any +Description: see how lintian reacts to weird filenames + This package contains files with the most evil names I could find, + except for ones that lintian is explicitly not designed to handle. + . + Lintian does not handle filenames containing newlines, or filenames + that contain the strings " link to ", " -> ", or ": ". The last one + is used as a separator by the file command, the others are used as + separators by tar. + . + Lintian also does not handle filenames that contain backslashes, or + other characters that are mangled by tar's -tv output. + +Package: filename-games +Architecture: all +Depends: filenames +Section: games +Description: Test game filename/location checks + This package contains files with slightly less evil names than + filenames. + . + 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. + +Package: more-filename-games +Architecture: all +Depends: filenames, filename-games +Section: games +Priority: optional +Description: More test for game filename/location checks + This package contains no evil names, only evil locations. + . + 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/fields/description/legacy-filenames/build-spec/debian/doc-base b/t/recipes/checks/fields/description/legacy-filenames/build-spec/debian/doc-base new file mode 100644 index 0000000..e5a611b --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-filenames/build-spec/debian/doc-base @@ -0,0 +1,11 @@ +Document: testing +Title: Working doc-base control file +Author: Russ Allbery +Abstract: This control file ensures that we don't get false positives for + correct doc-base files. + . + There isn't anything wrong with this one. +Section: Education + +Format: Text +Files: /usr/share/doc/filenames/README.macosx diff --git a/t/recipes/checks/fields/description/legacy-filenames/build-spec/debian/rules b/t/recipes/checks/fields/description/legacy-filenames/build-spec/debian/rules new file mode 100755 index 0000000..0b9e87c --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-filenames/build-spec/debian/rules @@ -0,0 +1,231 @@ +#!/usr/bin/make -f + +# Copyright (C) 1998 Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +VENDORARCH := $(shell perl -MConfig -wE'say substr($$Config{vendorarch},1)') + +clean: + mkdir -p .svn CVS "{arch}" .arch-ids .bzr + touch data/.cvsignore data/svn-commit.tmp data/svk-commitsEr9P.tmp + touch data/.arch-inventory + touch 'data/.#Maelstrom Sound.1.1.1' 'data/Maelstrom Sounce.r121' + touch 'data/Maelstrom Sound.mine' + touch "data/'\\ " + touch filenames.c~ + +build-arch: + +build-indep: + +build: build-arch build-indep + + +binary-arch: + +binary-indep: + install -d debian/tmp/DEBIAN + cp -a data debian/tmp/files + chmod -R go=rX debian/tmp/files + + install -d debian/tmp/usr/lib/filenames + install -m 555 -d debian/tmp/usr/lib/filenames/readonly + touch debian/tmp/usr/lib/filenames/readonly/test + + install -d debian/tmp/usr/lib/menu + install -d debian/tmp/usr/share/menu + touch debian/tmp/usr/lib/menu/README + touch debian/tmp/usr/share/menu/README + touch debian/tmp/usr/lib/menu/menu + touch debian/tmp/usr/share/menu/menu + chmod 644 debian/tmp/usr/lib/menu/* + + install -d debian/tmp/$(VENDORARCH)/foo + mkdir debian/tmp/$(VENDORARCH)/.svn + mkdir debian/tmp/$(VENDORARCH)/CVS + mkdir "debian/tmp/$(VENDORARCH)/{arch}" + mkdir debian/tmp/$(VENDORARCH)/.arch-ids + mkdir debian/tmp/$(VENDORARCH)/.bzr + mkdir debian/tmp/$(VENDORARCH)/.be + mkdir debian/tmp/$(VENDORARCH)/.ditrack + install -d debian/tmp/usr/share/perl5 + echo foo > debian/tmp/$(VENDORARCH)/foo/.gitignore + echo foo > debian/tmp/$(VENDORARCH)/foo/.hgignore + echo foo > debian/tmp/$(VENDORARCH)/foo/.hgtags + echo foo > debian/tmp/$(VENDORARCH)/foo/.hg_archival.txt + + touch debian/tmp/$(VENDORARCH)/foo/.packlist + chmod 644 debian/tmp/$(VENDORARCH)/foo/.packlist + touch debian/tmp/$(VENDORARCH)/foo/bar.pm + TZ=UTC touch -t 197501010101 debian/tmp/$(VENDORARCH)/foo/ancient.pm + chmod 644 debian/tmp/$(VENDORARCH)/foo/bar.pm + + install -d debian/tmp/usr/share/pixmaps + install -d debian/tmp/usr/share/pixmaps/foo + touch debian/tmp/usr/share/pixmaps/license.jpeg + touch debian/tmp/usr/share/pixmaps/licence.jpg + touch debian/tmp/usr/share/pixmaps/copying.xpm + touch debian/tmp/usr/share/pixmaps/foo/COPYING.svg + touch debian/tmp/usr/share/pixmaps/foo/copying.png + touch debian/tmp/usr/share/pixmaps/license.txt + touch debian/tmp/usr/share/pixmaps/license.foo + touch debian/tmp/usr/share/pixmaps/COPYING + + install -d debian/tmp/usr/share/linda/overrides + echo 'foo' > debian/tmp/usr/share/linda/overrides/filenames + + install -d debian/tmp/usr/share/doc/filenames + touch debian/tmp/usr/share/doc/filenames/README.macosx + + echo foo > debian/tmp/usr/share/doc/filenames/bokmål + echo foo > debian/tmp/usr/share/doc/filenames/bokm\\ål + echo foo > debian/tmp/usr/share/doc/filenames/bokml + echo foo > debian/tmp/usr/share/doc/filenames/bokm\\l + + echo foo > debian/tmp/usr/share/doc/filenames/Thumbs.db + echo foo > debian/tmp/usr/share/doc/filenames/.DS_Store + echo foo > debian/tmp/usr/share/doc/filenames/._NEWS.Debian + + touch debian/tmp/usr/share/doc/filenames/news.debian + gzip -n debian/tmp/usr/share/doc/filenames/news.debian + touch debian/tmp/usr/share/doc/filenames/NEWS.Debian + + echo foo > debian/tmp/usr/share/doc/filenames/link-one + ln debian/tmp/usr/share/doc/filenames/link-one \ + debian/tmp/usr/share/doc/filenames/link-two + + install -d debian/tmp/usr/share/doc/filenames/examples + touch debian/tmp/usr/share/doc/filenames/examples/__init__.py + touch debian/tmp/usr/share/doc/filenames/examples/very_interesting_example + touch debian/tmp/usr/share/doc/filenames/examples/very_interesting_example2 + gzip -n debian/tmp/usr/share/doc/filenames/examples/very_interesting_example2 + + install -d debian/tmp/usr/lib/ada/adalib/ + touch debian/tmp/usr/lib/ada/adalib/test.ali debian/tmp/usr/lib/ada/adalib/test2.ali + chmod 0644 debian/tmp/usr/lib/ada/adalib/test.ali + chmod 0444 debian/tmp/usr/lib/ada/adalib/test2.ali + + install -d debian/tmp/usr/bin/X11/ + touch debian/tmp/usr/bin/X11/testxbin + install -d debian/tmp/usr/X11R6/bin + touch debian/tmp/usr/X11R6/bin/testxbin2 + install -d debian/tmp/usr/include/X11 + touch debian/tmp/usr/include/X11/foo.h + + install -d debian/tmp/usr/bin/mh + touch debian/tmp/usr/bin/mh/read + chmod 755 debian/tmp/usr/bin/mh/read + install -d debian/tmp/usr/bin/bin + touch debian/tmp/usr/bin/bin/bad + chmod 755 debian/tmp/usr/bin/bin/bad + + install -m 644 debian/changelog debian/tmp/usr/share/doc/filenames/Changes + gzip -n -9 debian/tmp/usr/share/doc/filenames/Changes + ln -s Changes.gz debian/tmp/usr/share/doc/filenames/changelog.gz + + install -d debian/tmp/var/www + echo foo > debian/tmp/var/www/foo + + install -d debian/tmp/srv/foo + touch debian/tmp/srv/foo/bar + install -d debian/tmp/opt/foo + touch debian/tmp/opt/foo/bar + + install -d debian/tmp/etc/gconf/schemas + touch debian/tmp/etc/gconf/schemas/test.schema + + install -d debian/tmp/usr/lib/sgml + touch debian/tmp/usr/lib/sgml/package + + install -d debian/tmp/usr/share/gnome/apps/System + touch debian/tmp/usr/share/gnome/apps/System/foo.desktop + + install -d debian/tmp/usr/share/filenames + touch debian/tmp/usr/share/filenames/jquery.js + touch debian/tmp/usr/share/filenames/jquery.lite.js + touch debian/tmp/usr/share/filenames/jquery.min.js + touch debian/tmp/usr/share/filenames/jquery.pack.js + touch debian/tmp/usr/share/filenames/mochikit.js + touch debian/tmp/usr/share/filenames/prototype-1.2.3.4.js + touch debian/tmp/usr/share/filenames/prototype.js + touch debian/tmp/usr/share/filenames/prototype.js.gz + touch debian/tmp/usr/share/filenames/scriptaculous.js + touch debian/tmp/usr/share/filenames/yahoo-dom-event.js + touch debian/tmp/usr/share/filenames/yahoo-min.js + + ln -s '../filenames/doc/version6.txt.gz' debian/tmp/usr/share/doc/filenames/version.txt.gz + ln -s ../../share/symlink debian/tmp/usr/lib/filenames/symlink1ok + ln -s ../../../etc/symlink debian/tmp/usr/lib/filenames/symlink1wrong + ln -s ../../../../etc/symlink debian/tmp/usr/lib/filenames/symlink2wrong + ln -s /etc/symlink debian/tmp/usr/lib/filenames/symlink2ok + ln -s /usr/lib/filenames/symlink2 debian/tmp/usr/lib/filenames/symlink3wrong + ln -s test debian/tmp/usr/lib/filenames/symlink3ok + ln -s ../filenames/symlink2 debian/tmp/usr/lib/filenames/symlink4wrong + ln -s ../menu/../somethingelse debian/tmp/usr/lib/filenames/symlink5wrong + ln -s ../menu/somethingelse debian/tmp/usr/lib/filenames/symlink4ok + ln -s ./file4 debian/tmp/usr/lib/filenames/symlink6wrong + ln -s ../menu/./something debian/tmp/usr/lib/filenames/symlink7wrong + ln -s ../menu//something debian/tmp/usr/lib/filenames/symlink8wrong + ln -s ../menu/something/ debian/tmp/usr/lib/filenames/symlink9wrong + ln -s .. debian/tmp/usr/lib/filenames/symlink5ok+warn + ln -s . debian/tmp/usr/lib/filenames/symlink6ok+warn + ln -s / debian/tmp/usr/lib/filenames/symlink7ok+warn + ln -s ../../.. debian/tmp/usr/lib/filenames/symlink10wrong + +# devhelp tests. Files in /usr/share/gtk-doc/html or /usr/share/devhelp/books +# are okay. Files elsewhere are okay iff their parent path is symlinked into +# one of those paths. + install -d debian/tmp/usr/share/devhelp/books/filenames + echo 'Not really XML' > debian/tmp/usr/share/devhelp/books/filenames/a.devhelp + echo 'Not really XML' > debian/tmp/usr/share/devhelp/books/filenames/.devhelp2 + gzip -n -9 debian/tmp/usr/share/devhelp/books/filenames/.devhelp2 + install -d debian/tmp/usr/share/gtk-doc/html/filenames + echo 'Not really XML' > debian/tmp/usr/share/gtk-doc/html/filenames/b.devhelp + gzip -n -9 debian/tmp/usr/share/gtk-doc/html/filenames/b.devhelp + install -d debian/tmp/usr/share/doc/filenames/good-devhelp + echo 'Not really XML' > debian/tmp/usr/share/doc/filenames/good-devhelp/.devhelp2 + install -d debian/tmp/usr/share/doc/filenames/bad-devhelp + echo 'Not really XML' > debian/tmp/usr/share/doc/filenames/bad-devhelp/c.devhelp + gzip -n -9 debian/tmp/usr/share/doc/filenames/bad-devhelp/c.devhelp + ln -s ../../doc/filenames/good-devhelp debian/tmp/usr/share/gtk-doc/html/good + ln -s ../doc/filenames/bad-devhelp debian/tmp/usr/share/gtk-doc/html/bad + + install -d debian/tmp/usr/share/doc-base + install -m 644 debian/doc-base debian/tmp/usr/share/doc-base/filenames + + dpkg-gencontrol -pfilenames -Pdebian/tmp + dpkg --build debian/tmp .. + + install -d debian/filename-games debian/filename-games/DEBIAN + install -d debian/filename-games/usr debian/filename-games/usr/games debian/filename-games/usr/bin + echo '#! /bin/sh' > debian/filename-games/usr/bin/test-game + chmod 755 debian/filename-games/usr/bin/test-game + dpkg-gencontrol -pfilename-games -Pdebian/filename-games + dpkg --build debian/filename-games .. + + install -d debian/more-filename-games debian/more-filename-games/DEBIAN + install -d debian/more-filename-games/usr debian/more-filename-games/usr/games debian/more-filename-games/usr/bin + echo '#! /bin/sh' > debian/more-filename-games/usr/bin/another-test-game + echo '#! /bin/sh' > debian/more-filename-games/usr/games/yet-another-test-game + chmod 755 debian/more-filename-games/usr/bin/another-test-game debian/more-filename-games/usr/games/yet-another-test-game + dpkg-gencontrol -pmore-filename-games -Pdebian/more-filename-games + dpkg --build debian/more-filename-games .. + +binary: binary-arch binary-indep + +.PHONY: build-indep build-arch build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/fields/description/legacy-filenames/build-spec/fill-values b/t/recipes/checks/fields/description/legacy-filenames/build-spec/fill-values new file mode 100644 index 0000000..062a1ea --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-filenames/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-non-native +Testname: legacy-filenames +Source: filenames +Version: 1:12-0.1 +Description: Legacy test "filenames" diff --git a/t/recipes/checks/fields/description/legacy-filenames/build-spec/orig/data/ .tif b/t/recipes/checks/fields/description/legacy-filenames/build-spec/orig/data/ .tif new file mode 100644 index 0000000..07fd914 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-filenames/build-spec/orig/data/ .tif @@ -0,0 +1,2 @@ +This filename was inspired by the ".tif used by fnlib. The real package +uses space.tif. diff --git a/t/recipes/checks/fields/description/legacy-filenames/build-spec/orig/data/".tif b/t/recipes/checks/fields/description/legacy-filenames/build-spec/orig/data/".tif new file mode 100644 index 0000000..e005775 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-filenames/build-spec/orig/data/".tif @@ -0,0 +1 @@ +This filename is really used, by fnlib. diff --git a/t/recipes/checks/fields/description/legacy-filenames/build-spec/orig/data/Maelstrom Sound b/t/recipes/checks/fields/description/legacy-filenames/build-spec/orig/data/Maelstrom Sound new file mode 100644 index 0000000..4110410 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-filenames/build-spec/orig/data/Maelstrom Sound @@ -0,0 +1 @@ +This filename occurs in the maelstrom package. diff --git a/t/recipes/checks/fields/description/legacy-filenames/eval/desc b/t/recipes/checks/fields/description/legacy-filenames/eval/desc new file mode 100644 index 0000000..995240c --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-filenames/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-filenames +Check: fields/description diff --git a/t/recipes/checks/fields/description/legacy-filenames/eval/hints b/t/recipes/checks/fields/description/legacy-filenames/eval/hints new file mode 100644 index 0000000..3553bda --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-filenames/eval/hints @@ -0,0 +1 @@ +filenames (binary): using-first-person-in-description line 1: I diff --git a/t/recipes/checks/fields/description/legacy-filenames/eval/post-test b/t/recipes/checks/fields/description/legacy-filenames/eval/post-test new file mode 100644 index 0000000..571e35d --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-filenames/eval/post-test @@ -0,0 +1,3 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ +s,usr/lib/([^\/]*/)?perl[0-9]*(/[0-9]*\.[0-9]*)?/,usr/lib/ma-dir/perl/version/,g +/package-installs-packlist/ d diff --git a/t/recipes/checks/fields/description/legacy-relations/build-spec/debian/changelog.in b/t/recipes/checks/fields/description/legacy-relations/build-spec/debian/changelog.in new file mode 100644 index 0000000..9a82ea7 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-relations/build-spec/debian/changelog.in @@ -0,0 +1,33 @@ +relations ([% $version %]) [% $distribution %]; urgency=low + + * I'm orphaning this package -- I'm sick of it: it's completely broken, + lintian complains all over the place. + + -- Jeroen van Wolffelaar <jeroen@wolffelaar.nl> Sun, 02 Dec 2007 15:59:59 -0800 + +relations (4) unstable; urgency=low + + * Added a package that tests dependencies for multiple versions of + libraries, and test some description stuff in there as well. + + -- Josip Rodin <jrodin@jagor.srce.hr> Fri, 29 Nov 2002 20:13:33 +0100 + +relations (3) unstable; urgency=low + + * Added a virtual provides to test against my virtual depends without + a real package first test + + -- Sean 'Shaleh' Perry <shaleh@debian.org> Thu, 8 Feb 2001 11:29:53 -0800 + +relations (2) unstable; urgency=low + + * Added a depends on dpkg (violates policy) and a versioned depends + on bash (follows policy) + + -- Sean 'Shaleh' Perry <shaleh@debian.org> Fri, 2 Feb 2001 12:37:17 -0800 + +relations (1) unstable; urgency=low + + * Initial version + + -- Richard Braakman <dark@xs4all.nl> Tue, 7 Jul 1998 16:27:56 +0200 diff --git a/t/recipes/checks/fields/description/legacy-relations/build-spec/debian/control b/t/recipes/checks/fields/description/legacy-relations/build-spec/debian/control new file mode 100644 index 0000000..6cd1c04 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-relations/build-spec/debian/control @@ -0,0 +1,51 @@ +Source: relations +Section: misc +Priority: optional +Build-Depends: mail-transport-agent, libc6-dev, findutils, foo (= 3) [!amd64 !i386], bar, arch-test1 [i386], arch-test2 [!i386], quilt (>= 0.40), perl +Build-Depends-Indep: make, bash, debmake, build-essential, baz (= 2.0), ghostscript | gs, + car (>= 1.0), car (<= 2.0), caz (= 1.0) [amd64], caz (>= 2.0) [i386], + caz (= 2.0) [powerpc], perl (>= 5.0), foo (<< 4) [!amd64 !i386], libfoo (>= 1.2-1), bozzle [kfreebsd-i386] +Build-Conflicts: foo [amd64 i386], bar [alpha test], xlibs-dev, arch-test1 [powerpc], arch-test2 [!sparc] +Build-Conflicts-Indep: debmake [!powerpc] +Maintainer: Debian QA Group <packages@qa.debian.org> +Standards-Version: 3.7.3 +Homepage: lintian.debian.org +Origin: Debian +Bugs: debbugs://bugs.debian.org/ + +Package: relations +Architecture: all +Section: contrib/misc +Pre-Depends: awk|gawk +Depends: relations(<< 3), dpkg, bash (>> 2.0 ), mail-transport-agent, gawk | awk, foo (>> 2.0), foo (<< 2.2), coreutils, ,null (>= 0), ${misc:Depends}, makedev +Provides: mail-reader +Replaces: relations +Conflicts: foobar (<< 5+5), foo, relations, + gnuwdf, +Suggests: alpha, gnu (>= 44-3-4-8-11.4) | ung (<< 89beta) | nug | ngu, beta, some-other-package +Recommends: emacs21 | emacsen, dpkg, null, some-other-package, ${f-oo:b-ar}, gs | ghostscript | gs-aladdin +Description: Strange dependency relationships (dummy) + This package declares relationships designed to tickle lintian's "fields" + check. It should generate a number of tags for these. + . + The package is built with "dpkg --build --no-check", because some of the + relationships used here are normally rejected by dpkg. + +Package: relations-multiple-libs +Architecture: all +Section: non-free/misc +Depends: libstdc++2.10, libstdc++2.10-glibc2.2, libstdc++3.0, tk8.2, tk8.3, tcl8.0, tcl8.2, tkx8.2, tkx8.3, tclx8.2, libpng2, libpng3, xorg, ${shlibs:Depends}, makedev | udev +Provides: awk +Enhances: foo +Recommends: ${shlibs:Depends}, relations-multiple-libs, gs | gs-gpl, makedev +Breaks: libpng3 (<< 1.0), libpng2 +Suggests: x-dev, ghostscript | gs +Description: Duplicate library dependency relationships. + Duplicate library dependency relationships. + This tests the depending on different versions of the same library + at the same time. + . + At the same time, it conveniently tests some description file checks. :) + . + It is a metapackage from the lintian perspective, so the xorg dependency + should be allowed. diff --git a/t/recipes/checks/fields/description/legacy-relations/build-spec/debian/rules b/t/recipes/checks/fields/description/legacy-relations/build-spec/debian/rules new file mode 100755 index 0000000..5027f33 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-relations/build-spec/debian/rules @@ -0,0 +1,49 @@ +#!/usr/bin/make -f + +# Copyright (C) 1998 Richard Braakman +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, you can find it on the World Wide +# Web at https://www.gnu.org/copyleft/gpl.html, or write to the Free +# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, +# MA 02110-1301, USA. + +build-arch: + +build-indep: + +build: build-arch build-indep + +binary-arch: + +binary-indep: + install -d debian/tmp/DEBIAN + dpkg-gencontrol -prelations -isp + dpkg --build debian/tmp ../relations_5_all.deb + install -d debian/tmp/usr/share/doc/ + ln -s relations debian/tmp/usr/share/doc/relations-multiple-libs + dpkg-gencontrol -prelations-multiple-libs -isp + dpkg --build debian/tmp ../relations-multiple-libs_5_all.deb + +binary: binary-arch binary-indep + +clean:: + rm -rf debian/tmp debian/files + +# Test allowing quilt Build-Depends for manual quilt invocations. + TESTING=foo ANOTHER=bar quilt || true + +# Test requiring perl Build-Depends for manual perl invocations. + [ ! -f Build ] || $(PERL) Build distclean + +.PHONY: build-arch build-indep build binary-arch binary-indep binary clean diff --git a/t/recipes/checks/fields/description/legacy-relations/build-spec/debian/tmp/DEBIAN/control b/t/recipes/checks/fields/description/legacy-relations/build-spec/debian/tmp/DEBIAN/control new file mode 100644 index 0000000..87e7fe6 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-relations/build-spec/debian/tmp/DEBIAN/control @@ -0,0 +1,14 @@ +Package: relations-multiple-libs +Version: 4 +Section: misc +Priority: optional +Architecture: all +Depends: libstdc++2.10, libstdc++2.10-glibc2.2, libstdc++3.0, tk8.2, tk8.3, tcl8.0, tcl8.2, tkx8.2, tkx8.3, tclx8.2, libpng2, libpng3 +Installed-Size: 12 +Maintainer: Lintian Maintainer <lintian-maint@debian.org> +Source: relations +Description: Duplicate library dependency relationships. + Duplicate library dependency relationships. This tests the depending on + different versions of the same library at the same time. + . + At the same time, it conveniently tests some description file checks. :) diff --git a/t/recipes/checks/fields/description/legacy-relations/build-spec/fill-values b/t/recipes/checks/fields/description/legacy-relations/build-spec/fill-values new file mode 100644 index 0000000..7e4661b --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-relations/build-spec/fill-values @@ -0,0 +1,5 @@ +Skeleton: upload-native +Testname: legacy-relations +Source: relations +Version: 5 +Description: Legacy test "relations" diff --git a/t/recipes/checks/fields/description/legacy-relations/eval/desc b/t/recipes/checks/fields/description/legacy-relations/eval/desc new file mode 100644 index 0000000..d7b5846 --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-relations/eval/desc @@ -0,0 +1,2 @@ +Testname: legacy-relations +Check: fields/description diff --git a/t/recipes/checks/fields/description/legacy-relations/eval/hints b/t/recipes/checks/fields/description/legacy-relations/eval/hints new file mode 100644 index 0000000..e509d1c --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-relations/eval/hints @@ -0,0 +1,2 @@ +relations-multiple-libs (binary): synopsis-is-a-sentence "Duplicate library dependency relationships." +relations-multiple-libs (binary): description-synopsis-is-duplicated line 1 diff --git a/t/recipes/checks/fields/description/legacy-relations/eval/post-test b/t/recipes/checks/fields/description/legacy-relations/eval/post-test new file mode 100644 index 0000000..faeef0b --- /dev/null +++ b/t/recipes/checks/fields/description/legacy-relations/eval/post-test @@ -0,0 +1 @@ +s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/ diff --git a/t/recipes/checks/fields/description/spelling-multiword/build-spec/debian/control.in b/t/recipes/checks/fields/description/spelling-multiword/build-spec/debian/control.in new file mode 100644 index 0000000..2826a24 --- /dev/null +++ b/t/recipes/checks/fields/description/spelling-multiword/build-spec/debian/control.in @@ -0,0 +1,27 @@ +Source: [% $source %] +Priority: optional +Section: [% $section %] +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: [% $source %] +Architecture: [% $package_architecture %] +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: [% $description %] + This is a test package designed to exercise some feature or tag of + Lintian. It is part of the Lintian test suite and may do very odd + things. It should not be installed like a regular package. It may + be an empty package. + . + Spelling errors: + * Allows to + * An other error + * Debian/GNU Linux + * Permits to + * This packages + * This packages (again, but only tagged once) + . + Not errors: + * These packages diff --git a/t/recipes/checks/fields/description/spelling-multiword/build-spec/fill-values b/t/recipes/checks/fields/description/spelling-multiword/build-spec/fill-values new file mode 100644 index 0000000..edba989 --- /dev/null +++ b/t/recipes/checks/fields/description/spelling-multiword/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: spelling-multiword +Description: Multi-word spelling errors detection diff --git a/t/recipes/checks/fields/description/spelling-multiword/eval/desc b/t/recipes/checks/fields/description/spelling-multiword/eval/desc new file mode 100644 index 0000000..7339c3b --- /dev/null +++ b/t/recipes/checks/fields/description/spelling-multiword/eval/desc @@ -0,0 +1,2 @@ +Testname: spelling-multiword +Check: fields/description diff --git a/t/recipes/checks/fields/description/spelling-multiword/eval/hints b/t/recipes/checks/fields/description/spelling-multiword/eval/hints new file mode 100644 index 0000000..aa17173 --- /dev/null +++ b/t/recipes/checks/fields/description/spelling-multiword/eval/hints @@ -0,0 +1,5 @@ +spelling-multiword (binary): spelling-error-in-description "This packages" "These packages" +spelling-multiword (binary): spelling-error-in-description "Permits to" "Permits one to" +spelling-multiword (binary): spelling-error-in-description "Debian/GNU Linux" "Debian GNU/Linux" +spelling-multiword (binary): spelling-error-in-description "An other" "Another" +spelling-multiword (binary): spelling-error-in-description "Allows to" "Allows one to" diff --git a/t/recipes/checks/fields/description/spelling-package-name/build-spec/debian/control.in b/t/recipes/checks/fields/description/spelling-package-name/build-spec/debian/control.in new file mode 100644 index 0000000..f032563 --- /dev/null +++ b/t/recipes/checks/fields/description/spelling-package-name/build-spec/debian/control.in @@ -0,0 +1,20 @@ +Source: [% $source %] +Priority: optional +Section: devel +Maintainer: [% $author %] +Standards-Version: [% $standards_version %] +Build-Depends: [% $build_depends %] +Rules-Requires-Root: no + +Package: nam +Architecture: [% $package_architecture %] +Depends: ${misc:Depends}, +Description: [% $description %] + This is a test to see if the spell checker realizes that nam is + not a spelling mistake, but the name of the package. + . + 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/fields/description/spelling-package-name/build-spec/fill-values b/t/recipes/checks/fields/description/spelling-package-name/build-spec/fill-values new file mode 100644 index 0000000..2047e0d --- /dev/null +++ b/t/recipes/checks/fields/description/spelling-package-name/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: spelling-package-name +Description: Spell check test for excluding package name diff --git a/t/recipes/checks/fields/description/spelling-package-name/eval/desc b/t/recipes/checks/fields/description/spelling-package-name/eval/desc new file mode 100644 index 0000000..f1922f7 --- /dev/null +++ b/t/recipes/checks/fields/description/spelling-package-name/eval/desc @@ -0,0 +1,4 @@ +Testname: spelling-package-name +Test-Against: + spelling-error-in-description +Check: fields/description diff --git a/t/recipes/checks/fields/description/spelling-package-name/eval/hints b/t/recipes/checks/fields/description/spelling-package-name/eval/hints new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/t/recipes/checks/fields/description/spelling-package-name/eval/hints diff --git a/t/recipes/checks/fields/description/squeezed-comma/build-spec/fill-values b/t/recipes/checks/fields/description/squeezed-comma/build-spec/fill-values new file mode 100644 index 0000000..d4d5fcb --- /dev/null +++ b/t/recipes/checks/fields/description/squeezed-comma/build-spec/fill-values @@ -0,0 +1,3 @@ +Skeleton: upload-native +Testname: squeezed-comma +Description: Squeezed comma illustration ,without whitespace diff --git a/t/recipes/checks/fields/description/squeezed-comma/eval/desc b/t/recipes/checks/fields/description/squeezed-comma/eval/desc new file mode 100644 index 0000000..bea355f --- /dev/null +++ b/t/recipes/checks/fields/description/squeezed-comma/eval/desc @@ -0,0 +1,3 @@ +Testname: squeezed-comma +Check: fields/description +See-Also: Bug#591665, Bug#591664 diff --git a/t/recipes/checks/fields/description/squeezed-comma/eval/hints b/t/recipes/checks/fields/description/squeezed-comma/eval/hints new file mode 100644 index 0000000..bad9e41 --- /dev/null +++ b/t/recipes/checks/fields/description/squeezed-comma/eval/hints @@ -0,0 +1 @@ +squeezed-comma (binary): odd-mark-in-description comma not followed by whitespace (synopsis) |