Commit Graph

41 Commits

Author SHA1 Message Date
Marcus Schäfer
9292a84d20
Improve grub console setup
The console attribute in the bootloader section was used to
target both, output and input console setup using a space separator.
However, there can be multiple consoles specified for output
and input consoles and that turns the idea to handle both in
one attribute into a mess. This commit drops the console attribute
and offers two new attributes output_console and input_console which
can define multiple consoles each using space as a separator.
For example:

    <bootloader ... output_console="console serial" input_console="console"/>

This change comes with a schema version bump to v8.4
An automatic XSL transformation template for the old console
attribute into the new output_console and input_console
attributes is also part of this commit.

This Fixes #2886
2025-11-24 17:50:11 +01:00
Marcus Schäfer
927b24f598
Auto convert unit test XML data to schema v8.3 2025-01-13 10:24:04 +01:00
Marcus Schäfer
d149ab09db
Get rid of debootstrap
Replace debootstrap with an apt-get based pre-download of
packages followed by a dpkg-deb extraction.
This Fixes #2599
2024-08-02 21:57:04 +02:00
Marcus Schäfer
f5d2683776
Update unit test data to schema v8.0 2024-01-11 09:46:23 +01:00
Marcus Schäfer
ae6effd5de
Change package manager dnf to dnf4
With dnf5 there is a successor for dnf but there will also
be a transition period where there will be both, the former
dnf and the new dnf5 available. For a clear distinction
between the two we got the recommendation from the RedHat
team to support both in different namespaces. This commit
now implements a backward compatible change for kiwi which
includes the following modifications:

* XSL stylesheet for automatic schema transformation from

  <packagemanager>dnf</packagemanager> to
  <packagemanager>dnf4</packagemanager>

* Code copy of dnf API interface from

  PackageManagerDnf -> PackageManagerDnf4
  RepositoryDnf -> RepositoryDnf4

* Deprecation of former Dnf API interface

The code change here will force developers to adapt
their code if they used RepositoryDnf / PackageManagerDnf
classes in their python code. After this change developers
will be dropped into a raise condition which exits kiwi
at the time of the call. Related to Issue #2300
and Issue #2262
2023-06-12 17:44:06 +02:00
Marcus Schäfer
370ab24489
Added runtime check for by-partuuid use
Added check_partuuid_persistency_type_used_with_mbr(). Not
every partition table type supports UUIDs. We don't want to
make use of the artifical values created by Linux if the
partition table doesn't support it natively
2022-03-23 16:54:24 +01:00
Marcus Schäfer
a02289495f
validate luksformat options
validate options against the cryptsetup help info
in a runtime check
2022-03-21 23:28:30 +01:00
Marcus Schäfer
4e63703f70
Update descriptions to schema v7.5 2022-03-09 18:19:31 +01:00
David Cassany
332d60f777
Support additional names for docker containers
Docker containers used to support the attribute `additionaltags` which
was used to provide multiple tags for the same image. Since only tags
were supported this commit renames the attribute to `additionalnames`
and now supports tags and names witht he following syntax:

* '<name>:<tag>' -> adds a full docker image reference including name
  and tag
* ':<tag>'       -> adds an additional tag while reusing the former name
* '<name>'       -> adds an additional name while reusing the former tag

Fixes #2045

Signed-off-by: David Cassany <dcassany@suse.com>
2022-03-09 18:19:31 +01:00
Marcus Schäfer
47d48c1a89
Update unit- integration tests to schema v74 2021-03-15 16:13:02 +01:00
Marcus Schäfer
930745268d
Added check_swap_name_used_with_lvm runtime check
The optional oem-swapname is only effective if used together
with the LVM volume manager. A name for the swap space can
only be set if it is created as a LVM volume. In any other
case the name does not apply to the system. This condition
should be checked to avoid useless settings in the image
description.
2020-12-11 15:26:38 +01:00
Marcus Schäfer
8d2d9c214c
Make oem be a superset of vmx
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
2020-09-16 12:56:14 +02:00
Marcus Schäfer
feaf6b0863
Refactor setup of bootloader parameters
The bootloader settings are handled through attributes in the
type element. Over the years some attributes were added and
there are requests for more settings. Therefore the bootloader
setup deservers its own section. With this commit the schema
changes from v7.1 to v7.2 and moves bootloader, bootloader_console
boottimeout and zipl_targettype into a new bootloader subsection
below type. The commit also adds an auto transformation template
such that customers don't have to change their image descriptions.
This is related to Issue #1401
2020-05-08 13:30:43 +02:00
Marcus Schäfer
44a1d78e96
Added new image type: wsl
Support for building appx container images for
Windows Subsystem Linux (WSL). This Fixes #1235
2020-03-26 19:42:25 +01:00
Marcus Schäfer
46a97c96c7
Added check_volume_setup_defines_reserved_labels
Check to prevent using reserved filesystem labels in LVM
volume definitions
2019-11-25 12:05:57 +01:00
Marcus Schäfer
dab7b8732a
Refactor ISO boot, use grub in EFI mode
Before this commit isolinux was used to boot an ISO and
thus forms a hard requirement. isolinux however only
exists for the x86 platform. This limitation did not
allow to create ISO images for other platforms. With this
commit a refactoring of the ISO boot setup is introduced.

* isolinux is only used if the bios firmware is requested
  and the platform matches the x86 architecture. A runtime
  check will check for this condition and exits early if
  not applicable

* in case of the EFI firmware we already used grub in
  EFI mode but still had isolinux in place for the legacy/CSM
  boot. That part is now also replaced by a platform specific
  grub eltorito image and grub's boot_hybrid.img for hybrid
  boot. On platforms that do not provide those modules the
  support for it will be skipped

With this change in place it's possible to control the ISO
boot layout through the firmware setup and all platform
specific modules are handled as such. Therefore we also
deleted the syslinux requirement. This Fixes #1092
2019-07-02 11:56:02 +02:00
Marcus Schäfer
ab59d4d217
Delete obsolete repository types
Deleted red-carpet, slack-site, up2date-mirrors, urpmi and yast2
from the allowed values list of the repository type attribute.
This Fixes #1029
2019-04-22 23:15:42 +02:00
Marcus Schäfer
4a21fcfb05
Auto upgrade all image descriptions to v7.0 schema 2019-04-05 14:28:55 +02: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
4fc38a2b09
XSL Auto update descriptions due to schema change 2018-03-23 09:42:24 +01: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
f304802c53 Auto update all schema descriptions to v6.8 2018-01-17 10:19:37 +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
c1668bcfc5 Added additional required attr schematron rule
The new rule allows to check for required attributes for a specific
image type and is used for the filesystem attribute which is required
for the image type oem, vmx and pxe. This Fixes #476
2017-09-12 12:39:49 +02: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
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
821f20291d Auto update image descriptions to schema v6.7 2017-07-27 14:46:47 +02:00
Marcus Schäfer
d7d631c8a7 Apply schema v6.6 stylesheet to XML descriptions
Updates all XML descriptions to latest schema version and
also includes adaptions to the test XML descriptions for
testing the new Xen guest and server setup
2017-07-20 10:34:37 +02: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
7141ee16e4
Added arch attribute for ignore section
The packages subsection <ignore> only accepted a package
name to become ignored. However a <package> subsection
to install a package allows for an arch selection. The
same should apply to ignore a package. In addition the
allowed content for the arch attribute has been changed
from simple text to a regular expression. Allowed is a
comma seperated list of reserved architecture words like
they are displayed by uname -m
2017-02-01 15:30:06 +01:00
Marcus Schäfer
3c7ba8b924
Auto update image descriptions to schema v6.5 2017-01-09 11:04:10 +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
David Cassany
25bb84b148 Corrections on test kiwi description files
Some attributes needed to be changed in the test xmls. With this
commit all the description files are consistent with the new co-
occurrence constraints.
2016-10-24 13:07:06 +02:00
Marcus Schäfer
d56122441d
Auto validate XML descriptions for schema 6.4 2016-08-01 11:03:56 +02:00
David Cassany
c0bcce3404 Updated the user schema layout
Now each user item may or may not have a groups attribute. The
groups attribute is a comma separated list of group names. If
present the first group name will be the login or primary group,
if not present, the underlying toolchain will assign the default
login group for that user.
2016-07-27 12:26:50 +02:00
David Cassany
2871ca8150 fixing user schema layout 2016-07-26 16:22:33 +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