multiple type sections within one preferences section is allowed
in a kiwi image description. However, if multiple type sections
for the same image attribute are configured only the last type
configuration will be ever reachable. The proposed runtime check
in this commit detects this situation and raises an exception
showing the conflicting types including a solution suggestion
which needs to be based on profiles to distinguish between
types of the same image type name.
This commit sets the maintainer and author metadata from the description
section of the image in they are not explicitly specified in
container-config section.
In addition it sets the default container name to `system-container`
instead of `systemContainer` as uppercase letters are not valid for
docker container references.
Fixes#1419
A vmx image is the same disk as an oem just without the dracut
repart/resize feature. This difference is better handled with
an oemconfig parameter <oem-resize> which allows to switch resize
on or off. The extra image type vmx will be dropped and an XSLT
stylesheet automatically transforms a vmx description to be a
oem image with the resize feature switched off.
This Fixes#1425
This commit makes sure that the early boot configuration files
for grub make use of the proper boot path and omiting the `/boot`
prefix if there is a dedicated boot partition.
Fixes#1553
This commit includes the 'loadenv' module to the list of basic grub
modules. This makes sure the module is included in any grub-mkimage
that KIWI does.
Fixes#1547
Before this commit an oem image still had the kiwi initrd_system
set as default. As we are decommission the custom kiwi initrd
concept the default should be changed. It is still possible to
use a custom kiwi initrd but it needs to be explicitly requested
via the initrd_system="kiwi" attribute. In addition to the
changed default a runtime check was introduced that checks
the presence of the boot= attribute which only makes sense
in combination with the kiwi initrd_system. If boot= is
set but initrd_system="kiwi" is not, a message is raised that
explains the situation and either requests setting initrd_system
properly or deleting the boot attribute. The change only
affects people who still use oem with a boot="oemboot/..."
setting and no explicit selection of kiwi as the initrd_system.
As these image type configurations should not be in use anyway
because this is all legacy and announced to go away, we
need to make the next step and enforce a new default in
code. This is related to Issue #1299
Instead of restricting the dynamic linux vs. linuxefi setup
to a specific grub version, support this setup for any version
of grub. This Fixes bsc#1175729 and bsc#1176134
Set options variable in grub loader/entries to match the
kiwi image description setup. This adaption currently
happens only when building in OBS because in this env
the options setup done by grub is a complete mess.
Distributions like Fedora RawHide or CentOS8 applies to the
grub BootLoaderSpec as described here:
https://www.freedesktop.org/wiki/Specifications/BootLoaderSpec
Part of the spec is that menu entries are handled in extra files
below /boot/loader/entries. Unfortunately the grub2-mkconfig code
has still no clue how to find the correct root device in special
environments like obs workers or in overlay systems. To fixup the
result of grub2-mkconfig there is code in kiwi which needs to be
adapted because the file that contains the wrong information is
now no longer grub.cfg but some /boot/loader/entries/*.conf file.
This commit solves the issue.
kiwi copied the same grub.cfg file as it exists in boot/grub2
to the efi path. This is wrong as the setup in the efi boot
directory is used to enable normal grub loading and not providing
the user grub configuration. In addition the changes here makes
sure that the early grub boot code is placed into the system
in any EFI case except for secure boot when shim-install is
present. If shim-install is present it also creates the early
grub boot setup such that kiwi doesn't have to do it.
This Fixes#1491 and Fixes bsc#1172908
Using the --inplace option in rsync helps to save space on
syncing the rootfs data and prevents e.g OBS workers from
running out of VM space when transfering root filesystem
data. Also using --inplace allows to keep hardlinks intact.
This is related to bsc#1096738
To prevent shim-install from calling grub2-install in uefi mode
kiwi temporary replaces the tool by a noop. This acts as a
workaround for an issue in shim-install. However the workaround
left a file copy of grub2-install in the system which should
not happen. This commit Fixes bsc#1173226 and Fixes#1490
This commit removes the creation of the md5 file that includes a
checksum of the image binary for the `tbz` image type. Removing it
as this is the only image type that includes it as part of the result
and because the bundle procedure already creates a sha256 file out of
the results, so there is still the chance to produce validation
checksums.
Reorder tar parameters
When building an oem-image with oem-recovery set to true a tar error appears saying:
"The following options were used after any non-optional arguments in archive create or
update mode". This commit fixes the order of arguments to tar to avoid the error condition.
Fixes#1501
With regards to Issue #1486 a discussion came up that the
way factories are implemented are questionable when thinking
about strong typing for the public kiwi interface. This
commit refactors the FileSystem factory to be a real factory
and to add type hints such that its use from an api perspective
is clear and enforced.
This commit fixes iso images. Due to a change introduced in c7ed1cf
live ISOs were no longer booting as the rootfs.img filesystem was
copied to the squashfs container while being still mounted. Because of
that, at boot time, it refused to mount.
This commit adds umount method for the filesystem base class, so it
can be umounted before deleting the instance.
Fixes#1489 and bsc#1173356
As of SLE15 and onwards /etc/sysconfig/language is considered to be
obsolete and just kept for compatibility purposes. Thus there is no
need to manage the file anymore.
Fixes#1471
When building a custom kiwi initrd the root directory
has the permissions of the mkdtemp created directory
but should have the permissions of a linux root dir
which is 0755. This Fixes#1394
Allow to put a disk.sh script as part of the image description
which is called for the disk image types `vmx` and `oem`
only and runs after the synchronisation of the root tree into the
disk image loop file. At call time of the script the device name
of the currently mapped root device is passed as a parameter.
The chroot environment for the call is the mounted disk itself
which makes this different from the config.sh/images.sh caller
environment. This Fixes#1464
instances of VolumeManager creates temporary directories but
only stores the latest one. The cleanup leaves former directories
behind which is fixed by this commit
In preparation to allow a chroot operation into the loop
mounted disk this commit refactors the process when filesystems
gets umounted and also fixes the canonical order for calling
the destructors. Related to Issue #1464
This commit fixes the patch applied on grub.cfg when EFI mode is
selected and grub < 2.04. There are some distros that make use of the
`linux16` command instead of `linux` in grub configuration, this commit
extends the regex to also consider `linux16` command.
The way the post_init method was used to test custom arguments
leads to a broken I/O wrapper. As consequence the test failed
when called with "pytest -s" and also leaves files around from
other test I/O redirections.
The current way to detect the dracut output file format was
based on a lookup of the format used in the dracut tool itself.
However there are distributions like Ubuntu which calls dracut
and passes the name of the initrd file as options to the call.
This invalidates the checking done by kiwi. The only chance
for kiwi to do the same than the distributions does is by
looking for an initrd file pre-created by the package
installations and use the same format. Only if no such initrd
file exists the former format detection code applies. The
additional code expects any initrd file to match the glob
pattern 'init*'. This Fixes#1450
In kiwi we support a one time patch for the grub config file
that changes the static use of linuxefi to be dynamic. In
grub2 >= 2.04 all this has already been fixed but for grub2
version older than this version we applied the patch. The
patch however was only applied based on the presence of a
grub setting named GRUB_USE_LINUXEFI. It has turned out that
this variable is a custom extension not part of grub upstream
which makes the test functional only on distributions that
supports this setting. The use of linuxefi however is code
that belongs to grub upstream. Therefore this patch changes
the scope of the one time patch to be only based on the
version of grub no matter if GRUB_USE_LINUXEFI is supported
by the distro or not. This Fixes#1453
In addition to the root device setup in grub.cfg we also
need to patch the vendor grubenv file which contains an
invalid kernelopts value written by grub2-mkconfig under
the conditions explained in Issue #1287. This Fixes
Issue #1454
The object that holds the parse result also contains an
information about description_dir and derived_description_dir.
The change on the markup processing impacted the value for
description_dir to be no longer the origin (user provided)
directory. That broke any reference of files that belongs
to the description directory like custom scripts config.sh,
images.sh and so on.
This commit fixes the management of the trusted keyring for apt
repositories. It creates a `trusted.gpg` keyring with the provided
signing keys so APT can check against that the configured repositories.
Fixes#1440
Allow to read multiple markup formats. Supported are XML
and YAML. The parsing and transformation is based on the
anymarkup module. The use of anymarkup is optional and
implemented as an on demand loading module. If a user
uses a yaml config file or a request to convert into
yaml is made without an installed anymarkup module an
exception is thrown
The error code 127 - command not found, was not treated as
an error. This commit adds 127 to be an error condition
along with the other 1xx error codes from zypper that are
handled as errors. This Fixes#1430
So far kiwi used a static serial line setup of the console
type was configured to use a serial console. However if
different parameters are needed there was no way to change
the static setup. This commit adds a new bootloader attribute
called serial_line which allows to specify the serial line
parameters for the grub bootloader e.g
serial_line="serial --speed=9600 --unit=0 --word=8 --parity=no --stop=1"
Please note serial_line takes the value as it is given and
adds this as a line to the grub configuration or as content
to the variable GRUB_SERIAL_COMMAND. No further validation
of the information takes place by kiwi. This Fixes#1401
Grub supports a style setting that influences the display of
the menu depending on the configured timeout value. With this
patch kiwi allows to specify the style via a new bootloader
parameter named timeout_style="hidden|countdown". If not set
the grub default applies which shows the menu in any case.
This Fixes bsc#1165730 and Fixes#1404