mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
mkosi: Make sure the mkosi image can be built without the source tree available (#37068)
Let's make sure the mkosi can be built (with `NO_BUILD` enabled) without the source tree available. This allows running the integration tests when only distribution packages are available but the source tree is not.
This commit is contained in:
@@ -9,5 +9,5 @@ Environment=
|
||||
GIT_URL=https://salsa.debian.org/systemd-team/systemd.git
|
||||
GIT_SUBDIR=debian
|
||||
GIT_BRANCH=debian/master
|
||||
GIT_COMMIT=46432631232015b78071f84e5a3fb944621c83f7
|
||||
GIT_COMMIT=11efce9445f987f1e588719c182a93794eba2565
|
||||
PKG_SUBDIR=debian
|
||||
|
||||
@@ -34,8 +34,9 @@ done
|
||||
# systemd-journald.
|
||||
rm -rf "$BUILDROOT/var/log/journal"
|
||||
|
||||
# Make sure our own nsswitch.conf from the repository is used instead of the distribution's by deleting the
|
||||
# distribution's and relying on tmpfiles to put ours in place during boot.
|
||||
rm -f /etc/nsswitch.conf
|
||||
cp "$SRCDIR/factory/etc/nsswitch.conf" /etc/nsswitch.conf
|
||||
|
||||
# Remove to make TEST-73-LOCALE pass on Ubuntu.
|
||||
rm -f /etc/default/keyboard
|
||||
@@ -58,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() {
|
||||
@@ -132,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"
|
||||
@@ -144,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"
|
||||
|
||||
@@ -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' : [
|
||||
|
||||
Reference in New Issue
Block a user