From 419f2742e792b251c2522805ce97ac6e97f15bb2 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sun, 2 Oct 2022 20:11:21 +0100 Subject: [PATCH 1/2] repart: workaround spurious maybe-uninitialized warning Build fails on Ubuntu Jammy --- src/partition/repart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/partition/repart.c b/src/partition/repart.c index 7a24e8ffec8..cbda6e408bd 100644 --- a/src/partition/repart.c +++ b/src/partition/repart.c @@ -3788,7 +3788,7 @@ static int context_verity_sig(Context *context) { _cleanup_free_ char *text = NULL; Partition *hp; uint8_t fp[X509_FINGERPRINT_SIZE]; - size_t sigsz, padsz; + size_t sigsz = 0, padsz; /* avoid false maybe-uninitialized warning */ if (p->dropped) continue; From 8e3b2ec5a5d0c6ae9ad9e11c941899dd3bce86d2 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Sun, 2 Oct 2022 20:12:02 +0100 Subject: [PATCH 2/2] test-70: check if LUKS2 plugins are actually installed, not just supported We don't build them in Debian/Ubuntu yet, even though cryptsetup supports them --- test/units/testsuite-70.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/units/testsuite-70.sh b/test/units/testsuite-70.sh index 97536c812cc..b1cf7e83c4b 100755 --- a/test/units/testsuite-70.sh +++ b/test/units/testsuite-70.sh @@ -33,7 +33,8 @@ env PIN=123456 /usr/lib/systemd/systemd-cryptsetup attach test-volume $img - tpm env PIN=123457 /usr/lib/systemd/systemd-cryptsetup attach test-volume $img - tpm2-device=auto,headless=1 && { echo 'unexpected success'; exit 1; } # Check LUKS2 token plugin unlock (i.e. without specifying tpm2-device=auto) -if cryptsetup --help | grep -q 'LUKS2 external token plugin support is compiled-in'; then +if cryptsetup --help | grep -q 'LUKS2 external token plugin support is compiled-in' && \ + [ -f "$(cryptsetup --help | sed -n -r 's/.*LUKS2 external token plugin path: (.*)\./\1/p')/libcryptsetup-token-systemd-tpm2.so" ]; then env PIN=123456 /usr/lib/systemd/systemd-cryptsetup attach test-volume $img - headless=1 /usr/lib/systemd/systemd-cryptsetup detach test-volume