summaryrefslogtreecommitdiffstats
path: root/t/recipes/checks/fields/essential
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:42:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:42:30 +0000
commit75808db17caf8b960b351e3408e74142f4c85aac (patch)
tree7989e9c09a4240248bf4658a22208a0a52d991c4 /t/recipes/checks/fields/essential
parentInitial commit. (diff)
downloadlintian-75808db17caf8b960b351e3408e74142f4c85aac.tar.xz
lintian-75808db17caf8b960b351e3408e74142f4c85aac.zip
Adding upstream version 2.117.0.upstream/2.117.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--t/recipes/checks/fields/essential/fields-essential-yes-source/build-spec/debian/control.in21
-rw-r--r--t/recipes/checks/fields/essential/fields-essential-yes-source/build-spec/fill-values3
-rw-r--r--t/recipes/checks/fields/essential/fields-essential-yes-source/eval/desc5
-rw-r--r--t/recipes/checks/fields/essential/fields-essential-yes-source/eval/hints0
-rw-r--r--t/recipes/checks/fields/essential/fields-essential/build-spec/debian/control.in28
-rwxr-xr-xt/recipes/checks/fields/essential/fields-essential/build-spec/debian/rules9
-rw-r--r--t/recipes/checks/fields/essential/fields-essential/build-spec/fill-values3
-rw-r--r--t/recipes/checks/fields/essential/fields-essential/eval/desc2
-rw-r--r--t/recipes/checks/fields/essential/fields-essential/eval/hints4
-rw-r--r--t/recipes/checks/fields/essential/legacy-fields/build-spec/debian/changelog.in10
-rw-r--r--t/recipes/checks/fields/essential/legacy-fields/build-spec/debian/control28
-rwxr-xr-xt/recipes/checks/fields/essential/legacy-fields/build-spec/debian/rules33
-rw-r--r--t/recipes/checks/fields/essential/legacy-fields/build-spec/fill-values5
-rw-r--r--t/recipes/checks/fields/essential/legacy-fields/eval/desc2
-rw-r--r--t/recipes/checks/fields/essential/legacy-fields/eval/hints2
-rw-r--r--t/recipes/checks/fields/essential/legacy-fields/eval/post-test1
16 files changed, 156 insertions, 0 deletions
diff --git a/t/recipes/checks/fields/essential/fields-essential-yes-source/build-spec/debian/control.in b/t/recipes/checks/fields/essential/fields-essential-yes-source/build-spec/debian/control.in
new file mode 100644
index 0000000..1dffa2a
--- /dev/null
+++ b/t/recipes/checks/fields/essential/fields-essential-yes-source/build-spec/debian/control.in
@@ -0,0 +1,21 @@
+Source: [% $source %]
+Priority: optional
+Section: [% $section %]
+Maintainer: [% $author %]
+Standards-Version: [% $standards_version %]
+Essential: yes
+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.
+ .
+ In the, unlikely, event that dpkg-gencontrol starts considering the
+ source-level Essential field this test should break so that lintian is
+ fixed accordingly.
diff --git a/t/recipes/checks/fields/essential/fields-essential-yes-source/build-spec/fill-values b/t/recipes/checks/fields/essential/fields-essential-yes-source/build-spec/fill-values
new file mode 100644
index 0000000..eb113c6
--- /dev/null
+++ b/t/recipes/checks/fields/essential/fields-essential-yes-source/build-spec/fill-values
@@ -0,0 +1,3 @@
+Skeleton: upload-native
+Testname: fields-essential-yes-source
+Description: Canary test for Essential field-related checks and assumptions
diff --git a/t/recipes/checks/fields/essential/fields-essential-yes-source/eval/desc b/t/recipes/checks/fields/essential/fields-essential-yes-source/eval/desc
new file mode 100644
index 0000000..c7a7d6b
--- /dev/null
+++ b/t/recipes/checks/fields/essential/fields-essential-yes-source/eval/desc
@@ -0,0 +1,5 @@
+Testname: fields-essential-yes-source
+Test-Against:
+ new-essential-package
+ essential-in-source-package
+Check: fields/essential
diff --git a/t/recipes/checks/fields/essential/fields-essential-yes-source/eval/hints b/t/recipes/checks/fields/essential/fields-essential-yes-source/eval/hints
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/t/recipes/checks/fields/essential/fields-essential-yes-source/eval/hints
diff --git a/t/recipes/checks/fields/essential/fields-essential/build-spec/debian/control.in b/t/recipes/checks/fields/essential/fields-essential/build-spec/debian/control.in
new file mode 100644
index 0000000..185ef5f
--- /dev/null
+++ b/t/recipes/checks/fields/essential/fields-essential/build-spec/debian/control.in
@@ -0,0 +1,28 @@
+Source: [% $source %]
+Priority: optional
+Section: [% $section %]
+Maintainer: [% $author %]
+Standards-Version: [% $standards_version %]
+XS-Essential: no
+Build-Depends: [% $build_depends %]
+Rules-Requires-Root: binary-targets
+
+Package: [% $source %]
+Essential: yes
+Architecture: all
+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.
+
+Package: [% $source %]2
+Essential: maybe
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: [% $description %] -- maybe
+ This is another 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/essential/fields-essential/build-spec/debian/rules b/t/recipes/checks/fields/essential/fields-essential/build-spec/debian/rules
new file mode 100755
index 0000000..41937bf
--- /dev/null
+++ b/t/recipes/checks/fields/essential/fields-essential/build-spec/debian/rules
@@ -0,0 +1,9 @@
+#!/usr/bin/make -f
+pkg=fields-essential
+export DH_VERBOSE=1
+%:
+ dh $@
+
+override_dh_builddeb:
+ dh_builddeb --package=$(pkg)
+ dpkg-deb --nocheck --build debian/$(pkg)2 ../$(pkg)2_1.0_all.deb
diff --git a/t/recipes/checks/fields/essential/fields-essential/build-spec/fill-values b/t/recipes/checks/fields/essential/fields-essential/build-spec/fill-values
new file mode 100644
index 0000000..ca276e8
--- /dev/null
+++ b/t/recipes/checks/fields/essential/fields-essential/build-spec/fill-values
@@ -0,0 +1,3 @@
+Skeleton: upload-native
+Testname: fields-essential
+Description: Test for Essential field-related errors
diff --git a/t/recipes/checks/fields/essential/fields-essential/eval/desc b/t/recipes/checks/fields/essential/fields-essential/eval/desc
new file mode 100644
index 0000000..c67c837
--- /dev/null
+++ b/t/recipes/checks/fields/essential/fields-essential/eval/desc
@@ -0,0 +1,2 @@
+Testname: fields-essential
+Check: fields/essential
diff --git a/t/recipes/checks/fields/essential/fields-essential/eval/hints b/t/recipes/checks/fields/essential/fields-essential/eval/hints
new file mode 100644
index 0000000..7b55a71
--- /dev/null
+++ b/t/recipes/checks/fields/essential/fields-essential/eval/hints
@@ -0,0 +1,4 @@
+fields-essential (source): essential-no-not-needed
+fields-essential (source): essential-in-source-package
+fields-essential2 (binary): unknown-essential-value
+fields-essential (binary): new-essential-package
diff --git a/t/recipes/checks/fields/essential/legacy-fields/build-spec/debian/changelog.in b/t/recipes/checks/fields/essential/legacy-fields/build-spec/debian/changelog.in
new file mode 100644
index 0000000..38fc4e9
--- /dev/null
+++ b/t/recipes/checks/fields/essential/legacy-fields/build-spec/debian/changelog.in
@@ -0,0 +1,10 @@
+fields ([% $version %]) [% $distribution %]; urgency=low
+
+ * This package adds tests for the following tags:
+ - debian-revision-not-well-formed
+ - depends-on-python-minimal
+ - essential-no-not-needed
+ - debian-revision-should-not-be-zero
+ - new-essential-package
+
+ -- Tobias Quathamer <toddy@debian.org> Sun, 10 Apr 2011 14:30:00 +0100
diff --git a/t/recipes/checks/fields/essential/legacy-fields/build-spec/debian/control b/t/recipes/checks/fields/essential/legacy-fields/build-spec/debian/control
new file mode 100644
index 0000000..d980a6e
--- /dev/null
+++ b/t/recipes/checks/fields/essential/legacy-fields/build-spec/debian/control
@@ -0,0 +1,28 @@
+Source: fields
+Section: does-not-exist
+Priority: standard
+Maintainer: Lintian Maintainers <lintian-maint@debian.org>
+Standards-Version: 3.9.2
+
+Package: fields
+Essential: no
+Architecture: all
+Depends: python-minimal
+Description: Generate some errors
+ 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: another-version
+Essential: yes
+Section: admin
+Architecture: all
+Description: Also generate some errors
+ This package gets another version number and tries to sneak in a new
+ essential 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/essential/legacy-fields/build-spec/debian/rules b/t/recipes/checks/fields/essential/legacy-fields/build-spec/debian/rules
new file mode 100755
index 0000000..11ad4a7
--- /dev/null
+++ b/t/recipes/checks/fields/essential/legacy-fields/build-spec/debian/rules
@@ -0,0 +1,33 @@
+#!/usr/bin/make -f
+
+tmp=debian/tmp
+
+build-arch:
+
+build-indep:
+
+build: build-arch build-indep
+
+binary-arch:
+
+binary-indep:
+ install -d $(tmp)/usr/share/doc/fields
+ install -m 644 debian/changelog \
+ $(tmp)/usr/share/doc/fields/changelog
+ gzip -n -9 $(tmp)/usr/share/doc/fields/changelog
+ dh_md5sums -pfields -P$(tmp)
+ dpkg-gencontrol -pfields -P$(tmp)
+ dpkg --build $(tmp) ..
+ rm -rf $(tmp)
+
+ # Create another package with a different version
+ dh_md5sums -panother-version -P$(tmp)
+ dpkg-gencontrol -panother-version -v123.4-0 -P$(tmp)
+ dpkg --build $(tmp) ..
+
+binary: binary-arch binary-indep
+
+clean:
+ rm -rf debian/files $(tmp) debian/substvars
+
+.PHONY: build-arch build-indep build binary-arch binary-indep binary clean
diff --git a/t/recipes/checks/fields/essential/legacy-fields/build-spec/fill-values b/t/recipes/checks/fields/essential/legacy-fields/build-spec/fill-values
new file mode 100644
index 0000000..fe90eb0
--- /dev/null
+++ b/t/recipes/checks/fields/essential/legacy-fields/build-spec/fill-values
@@ -0,0 +1,5 @@
+Skeleton: upload-non-native
+Testname: legacy-fields
+Source: fields
+Version: 1.5-.3
+Description: Legacy test "fields"
diff --git a/t/recipes/checks/fields/essential/legacy-fields/eval/desc b/t/recipes/checks/fields/essential/legacy-fields/eval/desc
new file mode 100644
index 0000000..6e64c32
--- /dev/null
+++ b/t/recipes/checks/fields/essential/legacy-fields/eval/desc
@@ -0,0 +1,2 @@
+Testname: legacy-fields
+Check: fields/essential
diff --git a/t/recipes/checks/fields/essential/legacy-fields/eval/hints b/t/recipes/checks/fields/essential/legacy-fields/eval/hints
new file mode 100644
index 0000000..dd84e23
--- /dev/null
+++ b/t/recipes/checks/fields/essential/legacy-fields/eval/hints
@@ -0,0 +1,2 @@
+fields (binary): essential-no-not-needed
+another-version (binary): new-essential-package
diff --git a/t/recipes/checks/fields/essential/legacy-fields/eval/post-test b/t/recipes/checks/fields/essential/legacy-fields/eval/post-test
new file mode 100644
index 0000000..faeef0b
--- /dev/null
+++ b/t/recipes/checks/fields/essential/legacy-fields/eval/post-test
@@ -0,0 +1 @@
+s/\(current is ([0-9]+\.)+[0-9]\)/(current is CURRENT)/