util.ChrootableTarget: skip rename of resolv.conf if not present in target
A target OS may not include an /etc/resolv.conf. ChrootableTarget attempts
to move the in-chroot resolv.conf out of the way and copy in the host
resolv.conf. If the target image does not have /etc/resolv.conf then we
fail when we call os.rename. Avoid this error by only invoking the
rename if the target image has a resolv.conf.
block: Add opportunistic zkey encryption if supported
On s390x, systems with a crypto accelerator may be present
and enabled for sure. When handling a type: dm_crypt block
configuration, curtin will test if zkey is available and if
so, use the zkey command to generate keys and encrypt the
block device using zkey-based secrets.
In the case that zkey is not available, curtin will fallback
to using normal cryptsetup.
This has the same behaviour as apt_proxy, but allows developers to
override it globally without affecting other applications. apt_proxy
will continue to work, but CURTIN_VMTEST_APT_PROXY will be preferred if
it is present in the environment.
(This change is applied to both the Python vmtests code, and to the
tools/launch shell script.)
vmtests: add use of CURTIN_VMTEST_ prefixed envvars to image sync
Specifically, add the use of CURTIN_VMTEST_IMAGE_SRC_URL,
CURTIN_VMTEST_IMAGE_DIR, and CURTIN_VMTEST_IMAGE_SRC_KEYRING. Each of
these behaves exactly the same as its un-prefixed environment variable.
If both are present in the environment, the prefixed variable will be
preferred.
This change allows developers to set these globally in their shell,
without worrying about the generic names conflicting with environment
variables used by other applications. Use of the old environment
variable names is retained so existing users aren't broken.
(The CURTIN_VMTEST_ prefix matches that used for many of the other
environment variables used by the vmtests.)
Raising SkipTest in class definition breaks the test loader
resulting in tools/vmtest-sync-images failing. Remove skipTest
and leave the message as a comment.