On Sat, 28 Mar 2020 at 17:05:07 +0000, Simon McVittie wrote:
> Fixed here: https://salsa.debian.org/efi-team/libjcat/-/merge_requests/1

salsa seems to have some maintenance downtime at the moment, so here are
the patches in a more traditional format.

    smcv
>From 5608512c17487448427c87111179e7185afe3652 Mon Sep 17 00:00:00 2001
From: Simon McVittie <s...@debian.org>
Date: Sat, 28 Mar 2020 16:33:05 +0000
Subject: [PATCH 1/9] Add missing B-D on help2man

Signed-off-by: Simon McVittie <s...@debian.org>
---
 debian/control | 1 +
 1 file changed, 1 insertion(+)

diff --git a/debian/control b/debian/control
index fe2c064..7790953 100644
--- a/debian/control
+++ b/debian/control
@@ -5,6 +5,7 @@ Maintainer: Debian EFI team <debian-...@lists.debian.org>
 Uploaders: Steve McIntyre <93...@debian.org>,
            Mario Limonciello <mario.limoncie...@dell.com>
 Build-Depends: debhelper-compat (=12),
+	       help2man,
 	       gnutls-bin,
 	       gnutls-dev,
 	       gobject-introspection,
-- 
2.26.0

>From 45e388cfa4cdb5ded858c4a166ac4ba02ea4889f Mon Sep 17 00:00:00 2001
From: Simon McVittie <s...@debian.org>
Date: Sat, 28 Mar 2020 16:47:58 +0000
Subject: [PATCH 2/9] jcat-self-test: Sign /etc/os-release instead of
 /etc/machine-id

The autobuilders use a minimal chroot that doesn't necessarily have
a machine ID, but base-files gives us /etc/os-release.

Signed-off-by: Simon McVittie <s...@debian.org>
Closes: #955234
---
 ...tc-os-release-instead-of-etc-machine.patch | 25 +++++++++++++++++++
 debian/patches/series                         |  1 +
 2 files changed, 26 insertions(+)
 create mode 100644 debian/patches/jcat-self-test-Sign-etc-os-release-instead-of-etc-machine.patch
 create mode 100644 debian/patches/series

diff --git a/debian/patches/jcat-self-test-Sign-etc-os-release-instead-of-etc-machine.patch b/debian/patches/jcat-self-test-Sign-etc-os-release-instead-of-etc-machine.patch
new file mode 100644
index 0000000..0dc89db
--- /dev/null
+++ b/debian/patches/jcat-self-test-Sign-etc-os-release-instead-of-etc-machine.patch
@@ -0,0 +1,25 @@
+From: Simon McVittie <s...@debian.org>
+Date: Sat, 28 Mar 2020 16:46:44 +0000
+Subject: jcat-self-test: Sign /etc/os-release instead of /etc/machine-id
+
+Containers and minimal autobuilder environments don't always have
+a systemd machine ID, but os-release is fairly ubiquitous.
+
+Signed-off-by: Simon McVittie <s...@debian.org>
+---
+ libjcat/jcat-self-test.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libjcat/jcat-self-test.c b/libjcat/jcat-self-test.c
+index 93de1fd..7c3558b 100644
+--- a/libjcat/jcat-self-test.c
++++ b/libjcat/jcat-self-test.c
+@@ -486,7 +486,7 @@ jcat_pkcs7_engine_self_signed_func (void)
+ 	g_assert_no_error (error);
+ 	g_assert_nonnull (engine);
+ 
+-	payload = jcat_get_contents_bytes ("/etc/machine-id", &error);
++	payload = jcat_get_contents_bytes ("/etc/os-release", &error);
+ 	g_assert_no_error (error);
+ 	g_assert_nonnull (payload);
+ 	signature = jcat_engine_self_sign (engine, payload, JCAT_SIGN_FLAG_ADD_TIMESTAMP, &error);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..d685412
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+jcat-self-test-Sign-etc-os-release-instead-of-etc-machine.patch
-- 
2.26.0

>From bbff070bf43ebc0d1c0f06f7e2ea545fc42686ab Mon Sep 17 00:00:00 2001
From: Simon McVittie <s...@debian.org>
Date: Sat, 28 Mar 2020 16:48:35 +0000
Subject: [PATCH 3/9] Update changelog

Signed-off-by: Simon McVittie <s...@debian.org>
---
 debian/changelog | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 54b9ad3..525b60a 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,14 @@
+libjcat (0.1.0-2) UNRELEASED; urgency=medium
+
+  * Fix FTBFS:
+    - Add missing B-D on help2man
+    - jcat-self-test: Sign /etc/os-release instead of /etc/machine-id.
+      The autobuilders use a minimal chroot that doesn't necessarily have
+      a machine ID, but base-files gives us /etc/os-release.
+    (Closes: #955234)
+
+ -- Simon McVittie <s...@debian.org>  Sat, 28 Mar 2020 16:48:23 +0000
+
 libjcat (0.1.0-1) unstable; urgency=medium
 
   * Initial release (Closes: #953565)
-- 
2.26.0

Reply via email to