From cbffab246997fb5a06211dfb706b54e5ae5bb59f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 16:58:51 +0200 Subject: Adding upstream version 1.21.22. Signed-off-by: Daniel Baumann --- tests/t-control-bogus/Makefile | 32 ++++++++++++++++++++++ .../t-control-bogus/pkg-bogus-blank/DEBIAN/control | 18 ++++++++++++ .../t-control-bogus/pkg-bogus-colon/DEBIAN/control | 8 ++++++ .../pkg-bogus-fieldname-empty/DEBIAN/control | 8 ++++++ .../pkg-bogus-fieldname-partial/DEBIAN/control | 7 +++++ .../pkg-bogus-format-string/DEBIAN/control | 7 +++++ 6 files changed, 80 insertions(+) create mode 100644 tests/t-control-bogus/Makefile create mode 100644 tests/t-control-bogus/pkg-bogus-blank/DEBIAN/control create mode 100644 tests/t-control-bogus/pkg-bogus-colon/DEBIAN/control create mode 100644 tests/t-control-bogus/pkg-bogus-fieldname-empty/DEBIAN/control create mode 100644 tests/t-control-bogus/pkg-bogus-fieldname-partial/DEBIAN/control create mode 100644 tests/t-control-bogus/pkg-bogus-format-string/DEBIAN/control (limited to 'tests/t-control-bogus') diff --git a/tests/t-control-bogus/Makefile b/tests/t-control-bogus/Makefile new file mode 100644 index 0000000..ec042dd --- /dev/null +++ b/tests/t-control-bogus/Makefile @@ -0,0 +1,32 @@ +include ../Test.mk + +test-case: + # test building package with bogus control files + ! $(DPKG_BUILD_DEB) pkg-bogus-colon + ! $(DPKG_BUILD_DEB) pkg-bogus-blank + ! $(DPKG_BUILD_DEB) pkg-bogus-fieldname-empty + ! $(DPKG_BUILD_DEB) pkg-bogus-fieldname-partial + ! $(DPKG_BUILD_DEB) pkg-bogus-format-string + + # build bogus packages + $(DPKG_BUILD_DEB) --nocheck pkg-bogus-colon + $(DPKG_BUILD_DEB) --nocheck pkg-bogus-blank + $(DPKG_BUILD_DEB) --nocheck pkg-bogus-fieldname-empty + $(DPKG_BUILD_DEB) --nocheck pkg-bogus-fieldname-partial + $(DPKG_BUILD_DEB) --nocheck pkg-bogus-format-string + + # test installing packages with bogus control files + ! $(DPKG_INSTALL) pkg-bogus-colon.deb + $(call pkg_is_not_installed,pkg-bogus-colon) + ! $(DPKG_INSTALL) pkg-bogus-blank.deb + $(call pkg_is_not_installed,pkg-bogus-blank) + ! $(DPKG_INSTALL) pkg-bogus-fieldname-empty.deb + $(call pkg_is_not_installed,pkg-bogus-fieldname-empty) + ! $(DPKG_INSTALL) pkg-bogus-fieldname-partial.deb + $(call pkg_is_not_installed,pkg-bogus-fieldname-partial) + ! $(DPKG_INSTALL) pkg-bogus-format-string.deb + $(call pkg_is_not_installed,pkg-bogus-format-string) + +test-clean: + rm -f pkg-bogus-colon.deb + rm -f pkg-bogus-blank.deb diff --git a/tests/t-control-bogus/pkg-bogus-blank/DEBIAN/control b/tests/t-control-bogus/pkg-bogus-blank/DEBIAN/control new file mode 100644 index 0000000..7904382 --- /dev/null +++ b/tests/t-control-bogus/pkg-bogus-blank/DEBIAN/control @@ -0,0 +1,18 @@ +Package: pkg-bogus-blank +Version: 0.0-1 +Section: test +Priority: extra +Maintainer: Dpkg Developers +Architecture: all +Description: test package - bogus control file w/ blank lines in fields + This is an invalid description, containing lines with one space: + + or two: + + or even more: + + Instead of the correct blank line using a dot as delimiter: + . + Or valid lines with multiple spaces with content: + line 1 + line 2 diff --git a/tests/t-control-bogus/pkg-bogus-colon/DEBIAN/control b/tests/t-control-bogus/pkg-bogus-colon/DEBIAN/control new file mode 100644 index 0000000..3b32476 --- /dev/null +++ b/tests/t-control-bogus/pkg-bogus-colon/DEBIAN/control @@ -0,0 +1,8 @@ +Package: pkg-bogus +BOGUS-LINE +Version: 0.0-1 +Section: test +Priority: extra +Maintainer: Dpkg Developers +Architecture: all +Description: test package - bogus control file diff --git a/tests/t-control-bogus/pkg-bogus-fieldname-empty/DEBIAN/control b/tests/t-control-bogus/pkg-bogus-fieldname-empty/DEBIAN/control new file mode 100644 index 0000000..ad433ca --- /dev/null +++ b/tests/t-control-bogus/pkg-bogus-fieldname-empty/DEBIAN/control @@ -0,0 +1,8 @@ +Package: pkg-bogus-fieldname-empty +Version: 0.0-1 +Section: test +Priority: extra +Maintainer: Dpkg Developers +Architecture: all +: value +Description: test package - bogus control file w/ empty field name diff --git a/tests/t-control-bogus/pkg-bogus-fieldname-partial/DEBIAN/control b/tests/t-control-bogus/pkg-bogus-fieldname-partial/DEBIAN/control new file mode 100644 index 0000000..dd28c0b --- /dev/null +++ b/tests/t-control-bogus/pkg-bogus-fieldname-partial/DEBIAN/control @@ -0,0 +1,7 @@ +Pack: pkg-bogus-fieldname-partial +Vers: 0.0-1 +Sect: test +Prio: extra +Main: Dpkg Developers +Arch: all +Desc: test package - bogus control file w/ partial field names diff --git a/tests/t-control-bogus/pkg-bogus-format-string/DEBIAN/control b/tests/t-control-bogus/pkg-bogus-format-string/DEBIAN/control new file mode 100644 index 0000000..bbb181a --- /dev/null +++ b/tests/t-control-bogus/pkg-bogus-format-string/DEBIAN/control @@ -0,0 +1,7 @@ +Package: %s +Version: 0.0-1 +Section: test +Priority: extra +Maintainer: Dpkg Developers +Architecture: %s +Description: test package - bogus control file w/ format string in values -- cgit v1.2.3