From e2b01571d01dd120584f7be93e2cfdd7f87296d3 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Wed, 9 Apr 2025 15:31:21 +0200 Subject: [PATCH] mkosi: Move TEST-24-CRYPTSETUP files to mkosi/ directory If the integration tests have been installed in the systemd-tests package, the path to these in mkosi.postinst.chroot will be wrong. Let's fix the issue by moving these files into the mkosi/ directory as they're only used by mkosi regardless so they make more sense to be there anyway. --- .../keydev.repart/00-root.conf | 0 .../mkosi.credentials}/keyfile | 0 mkosi/mkosi.postinst.chroot | 8 ++++---- .../TEST-24-CRYPTSETUP => mkosi}/template.cfg | 0 test/integration-tests/TEST-24-CRYPTSETUP/meson.build | 1 - 5 files changed, 4 insertions(+), 5 deletions(-) rename {test/integration-tests/TEST-24-CRYPTSETUP => mkosi}/keydev.repart/00-root.conf (100%) rename {test/integration-tests/TEST-24-CRYPTSETUP => mkosi/mkosi.credentials}/keyfile (100%) rename {test/integration-tests/TEST-24-CRYPTSETUP => mkosi}/template.cfg (100%) diff --git a/test/integration-tests/TEST-24-CRYPTSETUP/keydev.repart/00-root.conf b/mkosi/keydev.repart/00-root.conf similarity index 100% rename from test/integration-tests/TEST-24-CRYPTSETUP/keydev.repart/00-root.conf rename to mkosi/keydev.repart/00-root.conf diff --git a/test/integration-tests/TEST-24-CRYPTSETUP/keyfile b/mkosi/mkosi.credentials/keyfile similarity index 100% rename from test/integration-tests/TEST-24-CRYPTSETUP/keyfile rename to mkosi/mkosi.credentials/keyfile diff --git a/mkosi/mkosi.postinst.chroot b/mkosi/mkosi.postinst.chroot index 1d4c5f4451f..32d2ad00f6f 100755 --- a/mkosi/mkosi.postinst.chroot +++ b/mkosi/mkosi.postinst.chroot @@ -59,8 +59,8 @@ SYSTEMD_REPART_MKFS_OPTIONS_EXT4="" \ --dry-run=no \ --size=auto \ --offline=true \ - --root test/integration-tests/TEST-24-CRYPTSETUP \ - --definitions test/integration-tests/TEST-24-CRYPTSETUP/keydev.repart \ + --root mkosi/mkosi.credentials \ + --definitions mkosi/keydev.repart \ "$OUTPUTDIR/keydev.raw" can_test_pkcs11() { @@ -133,7 +133,7 @@ EOF certtool --generate-self-signed \ --load-privkey="pkcs11:token=TestToken;object=RSATestKey;type=private" \ --load-pubkey="pkcs11:token=TestToken;object=RSATestKey;type=public" \ - --template "test/integration-tests/TEST-24-CRYPTSETUP/template.cfg" \ + --template "mkosi/template.cfg" \ --outder --outfile "/tmp/rsa_test.crt" pkcs11-tool --module "$SOFTHSM_MODULE" --token-label "TestToken" --pin "env:GNUTLS_PIN" --so-pin "env:GNUTLS_SO_PIN" --write-object "/tmp/rsa_test.crt" --type cert --label "RSATestKey" @@ -145,7 +145,7 @@ EOF certtool --generate-self-signed \ --load-privkey="pkcs11:token=TestToken;object=ECTestKey;type=private" \ --load-pubkey="pkcs11:token=TestToken;object=ECTestKey;type=public" \ - --template "test/integration-tests/TEST-24-CRYPTSETUP/template.cfg" \ + --template "mkosi/template.cfg" \ --outder --outfile "/tmp/ec_test.crt" pkcs11-tool --module "$SOFTHSM_MODULE" --token-label "TestToken" --pin "env:GNUTLS_PIN" --so-pin "env:GNUTLS_SO_PIN" --write-object "/tmp/ec_test.crt" --type cert --label "ECTestKey" diff --git a/test/integration-tests/TEST-24-CRYPTSETUP/template.cfg b/mkosi/template.cfg similarity index 100% rename from test/integration-tests/TEST-24-CRYPTSETUP/template.cfg rename to mkosi/template.cfg diff --git a/test/integration-tests/TEST-24-CRYPTSETUP/meson.build b/test/integration-tests/TEST-24-CRYPTSETUP/meson.build index c9e0271e963..bb2b2a15f5e 100644 --- a/test/integration-tests/TEST-24-CRYPTSETUP/meson.build +++ b/test/integration-tests/TEST-24-CRYPTSETUP/meson.build @@ -4,7 +4,6 @@ integration_tests += [ integration_test_template + { 'name' : fs.name(meson.current_source_dir()), 'credentials' : integration_test_template['credentials'] + [ - files('keyfile'), 'fstab.extra="/dev/mapper/test24_varcrypt /var ext4 defaults 0 1"', ], 'cmdline' : [