[dak/master] [tests] add a linux package
---
tests/fixtures/packages/Makefile | 4 ++--
tests/fixtures/packages/linux-42.0/debian/changelog | 5 +++++
tests/fixtures/packages/linux-42.0/debian/compat | 1 +
tests/fixtures/packages/linux-42.0/debian/control | 12 ++++++++++++
tests/fixtures/packages/linux-42.0/debian/rules | 16 ++++++++++++++++
tests/fixtures/packages/linux-42.0/debian/source/format | 1 +
tests/fixtures/packages/linux-42.0/modules/example.ko | 3 +++
7 files changed, 40 insertions(+), 2 deletions(-)
create mode 100644 tests/fixtures/packages/linux-42.0/debian/changelog
create mode 100644 tests/fixtures/packages/linux-42.0/debian/compat
create mode 100644 tests/fixtures/packages/linux-42.0/debian/control
create mode 100755 tests/fixtures/packages/linux-42.0/debian/rules
create mode 100644 tests/fixtures/packages/linux-42.0/debian/source/format
create mode 100644 tests/fixtures/packages/linux-42.0/modules/example.ko
diff --git a/tests/fixtures/packages/Makefile b/tests/fixtures/packages/Makefile
index 7d45be1..99d4fef 100644
--- a/tests/fixtures/packages/Makefile
+++ b/tests/fixtures/packages/Makefile
@@ -1,7 +1,7 @@
export GNUPGHOME = $(CURDIR)/gpg
SHELL = /bin/bash
-TAR = nonfree-package_0.1 package_0.1 package-built-using_0.1
+TAR = linux_42.0 nonfree-package_0.1 package_0.1 package-built-using_0.1
PACKAGES = $(TAR)
all: packages
@@ -26,6 +26,6 @@ clean:
set -e; for p in $(PACKAGES); do \
make -C $${p/_/-} -f debian/rules clean; \
done
- rm -f *.tar.gz *.buildinfo *.dsc *.changes *.diff.gz *.deb
+ rm -f *.tar.gz *.tar.xz *.buildinfo *.dsc *.changes *.diff.gz *.deb
rm -f gpg/*~
rm -f stamp-*
diff --git a/tests/fixtures/packages/linux-42.0/debian/changelog b/tests/fixtures/packages/linux-42.0/debian/changelog
new file mode 100644
index 0000000..e774309
--- /dev/null
+++ b/tests/fixtures/packages/linux-42.0/debian/changelog
@@ -0,0 +1,5 @@
+linux (42.0) unstable; urgency=medium
+
+ * Initial release.
+
+ -- A Maintainer <maint@example.com> Wed, 09 Aug 2017 19:52:37 +0200
diff --git a/tests/fixtures/packages/linux-42.0/debian/compat b/tests/fixtures/packages/linux-42.0/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/tests/fixtures/packages/linux-42.0/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/tests/fixtures/packages/linux-42.0/debian/control b/tests/fixtures/packages/linux-42.0/debian/control
new file mode 100644
index 0000000..6d88490
--- /dev/null
+++ b/tests/fixtures/packages/linux-42.0/debian/control
@@ -0,0 +1,12 @@
+Source: linux
+Section: kernel
+Priority: optional
+Maintainer: A Maintainer <maint@example.com>
+Build-Depends: debhelper (>= 9)
+
+Package: linux-image-42-1-amd64
+Architecture: all
+Depends: ${misc:Depends}
+Description: GNU Emacs editor (kernel)
+ GNU Emacs is the extensible self-documenting text editor.
+ This package contains the kernel component, formerly known as Linux.
diff --git a/tests/fixtures/packages/linux-42.0/debian/rules b/tests/fixtures/packages/linux-42.0/debian/rules
new file mode 100755
index 0000000..d401b49
--- /dev/null
+++ b/tests/fixtures/packages/linux-42.0/debian/rules
@@ -0,0 +1,16 @@
+#! /usr/bin/make -f
+
+include /usr/share/dpkg/pkg-info.mk
+
+byhand=linux-modules_$(DEB_VERSION).tar.xz
+
+%:
+ dh $@
+
+override_dh_builddeb:
+ dh_builddeb
+ tar -cJf ../$(byhand) -C modules .
+
+override_dh_gencontrol:
+ dh_gencontrol
+ echo "$(byhand) byhand -" >> debian/files
diff --git a/tests/fixtures/packages/linux-42.0/debian/source/format b/tests/fixtures/packages/linux-42.0/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/tests/fixtures/packages/linux-42.0/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/tests/fixtures/packages/linux-42.0/modules/example.ko b/tests/fixtures/packages/linux-42.0/modules/example.ko
new file mode 100644
index 0000000..f212999
--- /dev/null
+++ b/tests/fixtures/packages/linux-42.0/modules/example.ko
@@ -0,0 +1,3 @@
+(define-emacs-module
+ '((description . "I am an example emacs-kernel module")
+ (author . "Ansgar Burchardt <ansgar@debian.org")))
--
2.1.4
Reply to: