The method returned the basename of the tool if it could
be found by Path.which(). But the method's scope has been
changed in a way that the return value of the method must
be the result from Path.which() to allow working on the
full path name.
This commit ensures that when trying to parse the version of a tool
the comparison is done with the longest match for the given regular
expression. This solves cases such in `grub2` where the tool name
already provides some digit that could be seen as a version.
On systems that uses GRUB_USE_LINUXEFI with grub2 version
less than 2.04 there is no support for dynamic EFI
environment checking. In this condition we extend the grub
setup to add this support. The change kiwi does is as
follows:
* Apply only on grub < 2.04
1. Modify 10_linux to set linux/initrd as variables
2. Write hybrid setup as 01_efihybrid
This Fixes bsc#1165960 and bsc#1168480
The check for the capabilities of the tool were applied to
the tool installed on the host but the later call of the
tool will be done with the tool inside the image root
The creation of the qcow2 format was done in one qemu-img
convert call. That call instructs qemu to compress and
convert in one call. The downside of this approach is that
not all qcow2 options can be used. For example the setup
of:
<type ... formatoptions="preallocation=metadata"/>
failed the build with an error message that compression and
preallocation is not possible at the same time. Thus this patch
changes the way the qcow2 image is created to be done in two
steps. The first step converts the format without compression
and therefore allows for any format option to be used. The
second call only applies the compression and leads to the
final result.
In addition to the existing root/ overlay directory which
applies always there can now also be profile specific overlay
directories. If an overlay directory should be applied for
a specific profile this can now be done by placing this data
in a directory that is named the same as the profile name.
The new element controls the behavior of the repart/resize code
in the oem-repart dracut module. By default the repart/resize
happens on every reboot and therefore also allows for disk
geometry changes during the livetime of the machine. If the
element is set to false the repart/resize operation happens
only once and then never again. To check for this condition
a new profile environment variable kiwi_rootpartuuid which
holds the PARTUUID of the root partition has been added to
the disk builder.
The tools used to check the disk allocation condition
are sfdisk and sgdisk. The problem is that at least sfdisk
is different in behavior and functionality compared across
the distributions we support with kiwi. In addition
the verification for the msdos table cannot be used to
distinguish between intentionaly wanted free space on
disk and a disk that has not yet been resized. Thus
this commit changes two parts:
a) always report unallocated space available for the msdos
table to allow to run kiwi's resize code
b) make sure the table type is taken into consideration
It's important to run the verification based on the
table type (DOS, GPT) where we know the tools to work. In any
other case we report the disk to have unallocated space
and give the resize code a chance
With the new Fstab class from prior pull request there is an
opportunity to handle all fstab related actions to be done
by that class. This commit extends the Fstab class with an
add_entry method such that we can avoid the extra lists
holding raw fstab lines in e.g the disk builder. In the end
all fstab related data is stored in an instance of the Fstab
class. This also extends the KIWI api by an fstab management
class. Related to #1329 and #1349
When building container images an extra create_fstab method
exists that created an empty fstab file. The reasons for this
are historical and also related to appx support from obs.
The obs based support for appx containers was based on the
creation of a kiwi docker image that got modified and turned
into an appx container. Now with native appx support by kiwi
this special fstab handling is no longer needed and should
be deleted. This Fixes#1329
Handling of fstab should be done in its own namespace and class.
The current handling of fstab entries is spread at several places.
There should be only one code that writes the fstab entries and
that code should also care for the correct canonical order of
the mountpoints
Any mount point directly under / should be just right after the root
mountpoint and before the custom mountpoints based on user's subvolume
configuration.
Fixes#1349 and bsc#1164310