[unstable][PATCH linux-signed 2/9] UBUNTU: [Packaging] introduce debian/scripts/test-generate-control.sh

Agathe Porte agathe.porte at canonical.com
Tue Oct 8 09:01:25 UTC 2024


The goal of this script is to have some tests to run while refactoring
the generate-control script to be sure that the output stays the same.

It depends on some external files such as debian/control.stub and
debian/package.config, but this is a first step to avoid blind
refactoring.

Signed-off-by: Agathe Porte <agathe.porte at canonical.com>
---
 debian/scripts/generate-control.ref     | 74 +++++++++++++++++++++++++
 debian/scripts/test-generate-control.sh | 17 ++++++
 2 files changed, 91 insertions(+)
 create mode 100644 debian/scripts/generate-control.ref
 create mode 100755 debian/scripts/test-generate-control.sh

diff --git a/debian/scripts/generate-control.ref b/debian/scripts/generate-control.ref
new file mode 100644
index 0000000..b5f016b
--- /dev/null
+++ b/debian/scripts/generate-control.ref
@@ -0,0 +1,74 @@
+Source: linux-signed
+Section: kernel
+Priority: optional
+Maintainer: Canonical Kernel Team <kernel-team at lists.ubuntu.com>
+Build-Depends:
+ debhelper (>= 9),
+ lsb-release,
+ python3,
+ python3-apt,
+Build-Depends-Arch:
+ linux-image-unsigned-6.11.0-8-generic (= 6.11.0-8.8) [amd64 arm64 s390x],
+ linux-buildinfo-6.11.0-8-generic (= 6.11.0-8.8) [amd64 arm64 s390x],
+ linux-image-unsigned-6.11.0-8-generic-64k (= 6.11.0-8.8) [arm64],
+ linux-buildinfo-6.11.0-8-generic-64k (= 6.11.0-8.8) [arm64],
+ ubuntu-core-initramfs [amd64 arm64] <pkg.linux-generate>,
+ linux-generate (= 6.11.0-8.8) <!pkg.linux-generate>,
+ linux-modules-extra-6.11.0-8-generic (= 6.11.0-8.8) [amd64 arm64]  <pkg.linux-generate>,
+ sbsigntool [amd64 arm64],
+ openssl,
+Standards-Version: 3.9.4
+
+Package: linux-image-6.11.0-8-generic
+Architecture: amd64 arm64 s390x
+Depends: ${unsigned:Depends}
+Recommends: ${unsigned:Recommends}
+Suggests: ${unsigned:Suggests}
+Conflicts: ${unsigned:Conflicts}
+Provides: ${unsigned:Provides}
+Built-Using: linux (= 6.11.0-8.8)
+Description: Signed kernel image generic
+ A kernel image for generic.  This version of it is signed with
+ Canonical's signing key.
+
+Package: linux-image-6.11.0-8-generic-64k
+Architecture: arm64
+Depends: ${unsigned:Depends}
+Recommends: ${unsigned:Recommends}
+Suggests: ${unsigned:Suggests}
+Conflicts: ${unsigned:Conflicts}
+Provides: ${unsigned:Provides}
+Built-Using: linux (= 6.11.0-8.8)
+Description: Signed kernel image generic-64k
+ A kernel image for generic-64k.  This version of it is signed with
+ Canonical's signing key.
+
+Package: linux-image-uc-6.11.0-8-generic
+Architecture: amd64 arm64
+Depends: linux-modules-6.11.0-8-generic, linux-modules-extra-6.11.0-8-generic [amd64 arm64]
+Built-Using: linux (= 6.11.0-8.8)
+Description: Signed kernel image generic for Ubuntu Core
+ A kernel image for generic.  This version of it is signed with
+ Canonical's signing key.
+
+Package: linux-image-uc-6.11.0-8-generic-64k
+Architecture: arm64
+Depends: linux-modules-6.11.0-8-generic-64k
+Built-Using: linux (= 6.11.0-8.8)
+Description: Signed kernel image generic-64k for Ubuntu Core
+ A kernel image for generic-64k.  This version of it is signed with
+ Canonical's signing key.
+
+Package: linux-image-6.11.0-8-generic-dbgsym
+Section: devel
+Architecture: amd64 arm64 s390x
+Depends: linux-image-unsigned-6.11.0-8-generic-dbgsym
+Description: Signed kernel image generic
+ A link to the debugging symbols for the generic signed kernel.
+
+Package: linux-image-6.11.0-8-generic-64k-dbgsym
+Section: devel
+Architecture: arm64
+Depends: linux-image-unsigned-6.11.0-8-generic-64k-dbgsym
+Description: Signed kernel image generic-64k
+ A link to the debugging symbols for the generic-64k signed kernel.
diff --git a/debian/scripts/test-generate-control.sh b/debian/scripts/test-generate-control.sh
new file mode 100755
index 0000000..bca8940
--- /dev/null
+++ b/debian/scripts/test-generate-control.sh
@@ -0,0 +1,17 @@
+#!/bin/dash
+
+set -eux
+
+REFERENCE_FILE=debian/scripts/generate-control.ref
+
+debian/scripts/generate-control \
+	oracular \
+	linux-signed \
+	linux-generate \
+	6.11.0-8.8 \
+	linux \
+	6.11.0-8.8 6.11.0-8 \
+	< debian/control.stub | diff -u "$REFERENCE_FILE" -
+
+# Use this line instead to refresh the reference values
+#	< debian/control.stub > "$REFERENCE_FILE"
-- 
2.45.2




More information about the kernel-team mailing list