Commit Graph

32 Commits

Author SHA1 Message Date
Marcus Schäfer
720d34ddd8
Delete check_grub_efi_installed_for_efi_firmware
The motivation is nice to check if the required grub module
package is part of the package list if the efi firmware is
requested, but as long as there is no distribution wide
standard for packaging grub this check will cause more trouble
than it is of help. Currently it failed for the arm architecture
and the grub2-arm64-efi package. We decided to prevent checking
against static lists and dropped this runtime check. Missing
grub modules will be recognized at the grub stage when we
search for them.
2019-04-09 12:08:33 +02:00
David Cassany
c21570ac7b
Add the possibility to disable runtime checks
This commit adds runtime configuration parameters to disable the runtime
checks. This is specially handy if someone does not want to use the kiwi
dracut modules and provide custom ones instead. In orde disable some
runtime check consider a runtime config yaml like:

runtime_checks:
    - disable:
        - check_dracut_module_for_oem_install_in_package_list
        - check_dracut_module_for_live_iso_in_package_list

This commit fixes #893
2019-04-02 16:00:03 +02:00
David Cassany
0baa783965
Add buildah tool support for OCI and Docker types
This commit adds buildah tool support for OCI and Docker types. It
requires buildah and skopeo to be installed in the host. The use of
umoci (kept as default choice) or buildah is configured using the
runtime configuration file; consider the following structure:

```
oci:
    - archive_tool: buildah
```
2019-03-29 10:15:48 +01:00
Marcus Schäfer
00b8213ac9
Check for multiple allsize volumes setup
Added runtime check check_volume_setup_defines_multiple_fullsize_volumes
which reads the volume setup and counts the number of volumes that
define a 'all' volume. Only one is allowed
2019-03-07 11:28:30 +01:00
David Cassany
0f4b0b34bb
Add a runtime check for preferences metadata
This commit adds a runtime check for preferences metadata. More
specfic verifies there is a packagemanager defined and an image version
defined.

Fixes #925
2019-01-28 17:16:31 +01:00
Marcus Schäfer
2983ef0265
Added runtime check for label use
Added check_volume_label_used_with_lvm to check if
custom volume labels are used in the scope of LVM
2018-07-13 10:29:30 +02:00
David Cassany
87769a3201 Add additionaltags containerconfig attribute
This commit adds `additionaltags` attribute, so multiple tags to
a container image can be defined in a comma separated value.

Fixes #713
2018-05-14 17:04:07 +02:00
Marcus Schäfer
a27562d8c4
Update boot description search path
With the move of the boot descriptions in its own package
the kiwi search path needs to be adapted to look for boot
descriptions in /usr/share/kiwi/custom_boot. In addition
a runtime check to exit early if the boot description could
not be found or is not specified will be provided. Related
to Issue #576
2018-02-13 12:27:15 +01:00
Robert Schweikert
d6a67460cb
- Expand consistency check for grub efi package to cover debian based
and RH distros
2018-02-05 18:33:10 -05:00
Robert Schweikert
7cff2e93b9
- Early exit if firmware is efi or uefi but the expected grub module is
not part of the package list
2018-02-05 09:29:07 -05:00
Marcus Schäfer
f704c3c7b2
Added runtime check for dracut-kiwi-oem-dump
The installation of the above mentioned dracut module package
is required for oem images which uses dracut as initrd system
and have the creation of an installation image requested.
This is related to Issue #576
2018-01-17 14:59:59 +01:00
Marcus Schäfer
6f39ddde91
Added runtime check for dracut-kiwi-oem-repart
OEM images if configured to use dracut as initrd system
requires the KIWI provided dracut-kiwi-oem-repart module
2017-11-15 12:41:27 +01:00
Marcus Schäfer
054a7e072b
Extend checkmedia runtime check
In addition to the correct architecture the check also includes
the lookup of the required tagmedia tool to be present on the
building host. This Fixes #538
2017-11-06 16:32:28 +01:00
Marcus Schäfer
77fa8de510
Make get_initrd_system a state method
Make sure the default initrd_system is set to dracut
for the vmx image type and to kiwi if no initrd_system
is specified. This allows to simplify other code parts
as we can trust there is a value set
2017-09-06 18:01:37 +02:00
Marcus Schäfer
f7f8ee0057 Added runtime checks for overlay disk images
Checking if the dracut-kiwi-overlay package will be installed
as part of the build and also for the supported EFI setup
since the EFI secure boot setup would try to perform changes
on the filesystem which is a readonly squashfs, this is not
supported
2017-09-06 17:08:10 +02:00
Marcus Schäfer
b0074c2132 Added runtime check for dracut module on live iso
Live ISO images uses a dracut initrd to boot and requires
the KIWI provided kiwi-live dracut module to be installed
at the time dracut is called. Thus this runtime check
examines if the required package is part of the package
list in the image description
2017-09-06 09:53:18 +02:00
Marcus Schäfer
40b9973611
Update expected compatible major version
every version of umoci/skopeo <= major v1.x.x is expected
to work with the implementation used in kiwi
2017-08-01 15:33:42 +02:00
Marcus Schäfer
2e0bb07665
Extend scope of check_docker_tool_chain_installed
The runtime check only checks for the presence of the docker
tools umoci and skopeo but as we are expecting incompatible
api changes in the next major version release the check has
been extended to look at the major versions of the installed
tools as well. Fixes #454
2017-08-01 10:24:17 +02:00
David Cassany
642b514a59 Add runtimecheck for mediacheck attribute on non x86 hosts
This commit rearranges some method and variable names and includes
a new runtimecheck to ensure the mediacheck attribute is not set
when building non x86 images.

Patch related to bsc#1049304
2017-07-27 15:44:37 +02:00
Marcus Schäfer
d13f1cca29
Added Xen setup runtime validation
Added check_xen_uniquely_setup_as_server_or_guest runtime
check to check for a unique dom0 or domU guest setup
Fixes #429
2017-07-24 16:30:34 +02:00
Marcus Schäfer
dee0a5af7f Refactor handling of obs repositories
* Delete kiwi internal ibs: and suse: types
* Delete handling for --obs-repo-internal and provide a
  compatibility message to the user
* Buildservice download server url and scope can be configured
  via ~/.config/kiwi/config.yml
* Translate obs urls to http in import_repositories_marked_as_imageinclude
* Use new Uri.is_public method in renamed runtime check
  check_image_include_repos_publicly_resolvable
2017-07-05 16:07:29 +02:00
Marcus Schäfer
51c2b42a5d
Fixup check_target_directory_not_in_shared_cache
The runtime check compared the given target path if it starts
with the cache directory /var/cache/kiwi. This however also
matches for e.g /var/cache/kiwi-foo which would be a valid
target directory. This patch changes the matcher in a way to
really check if the target directory points to the same cache
directory structure.
2017-05-15 11:27:02 +02:00
Marcus Schäfer
2ecf8b98b9 Merge pull request #263 from SUSE/no_relative_imports
No relative imports
2017-03-07 15:01:45 +01:00
Marcus Schäfer
6cc0b2085d Flake cleanup for unit tests 2017-03-07 13:03:10 +01:00
Marcus Schäfer
de3441d7f1
Add runtime check for kernel match
If a kiwi initrd is used, the kernel used to build the kiwi
initrd and the kernel used in the system image must be the
same in order to avoid an inconsistent boot setup. This is
related to (bsc#1027610)
2017-03-06 10:57:28 +01:00
Marcus Schäfer
a03a1e0e27 Added runtime check for boot image reference
If an initrd_system different from kiwi is selected for a
vmx (simple disk) image, it does not make sense to setup a reference
to a kiwi boot image description, because no kiwi boot image will be
built. Despite that it does not hurt it's still an inconsistent
setup. This is related to (bsc#1027610)
2017-03-06 09:18:35 +01:00
Marcus Schäfer
889ce8a98b Add check_docker_tool_chain_installed
Runtime check to check for required docker tools umoci and
skopeo. As long as tools tools are not available in the
core distro of all distributions we avoid spec file requirements
and check at runtime if they can be found
2017-02-27 15:28:38 +01:00
Marcus Schäfer
e3bb8e77f1
Added check_volume_setup_has_no_root_definition
The root volume in a systemdisk setup is handled in a special
way. It is not allowed to setup a custom name or mountpoint for
the root volume. Therefore the size of the root volume can be
setup via the @root volume name. This check looks up the volume
setup and searches if there is a configuration for the '/'
mountpoint which would cause the image build to fail
2016-12-05 12:24:57 +01:00
Marcus Schäfer
d4d711f9e3 Make repository an optional element
So far one repository was mandatory in the XML description.
However, this is not required because all repositories can
be specified on the commandline
2016-08-18 15:34:37 +02:00
Marcus Schäfer
a64a3cbc9a
Added check_target_directory_not_in_shared_cache
Runtime checker method to check if the target directory
was set to - or below the shared cache directory
2016-05-04 18:24:11 +02:00
Marcus Schäfer
3b7c4217eb Add check_image_include_repos_http_resolvable
Runtime checker method to check if repositories marked
with the imageinclude attribute are using a publicly
available protocol
2016-04-29 14:30:15 +00:00
Marcus Schäfer
a07bbcac89 Added RuntimeChecker class
An instance of RuntimeChecker allows to semantically check for
error conditions according to the provided image description
and build options. Related to #20
2016-04-29 14:30:01 +00:00