Commit Graph

4505 Commits

Author SHA1 Message Date
Marcus Schäfer
94de1336d8
Support custom partitions
In addition to the volume volume management settings also
allow to setup low level table entries like in the following
example:

<partitions>
    <partition name="var" size="100" mountpoint="/var" filesystem="ext3"/>
</partitions>
2021-11-03 13:31:17 +01:00
Marcus Schäfer
bf5c9d0d55 Revert "Cleanup xattr requirement"
This reverts commit 6754b3f9e2.
It has turned out that SLE15 still uses the other xattr
module :/
2021-11-02 07:32:41 -04:00
Marcus Schäfer
8cf6035d1e Make sure fedora-release is installed
Fedora based integration tests should install the fedora-release
package. If no release package is specified the generic-release
package is choosen which is unexpected. This Fixes #1957
2021-10-29 05:20:17 -04:00
Marcus Schäfer
e892edf2f1 Make sure debootstrap is called only once
When building debian based images the bootstrap phase
is done by calling debootstrap. If kiwi is called on
an already existing root tree via --allow-existing-root
this will make debootstrap to fail in any case. This
is because for debootstrap it's an error condition if
there is already data in the root. However, for kiwi
and the explicitly requested re-use of the root tree
this is not an error. Thus this commit skips the
bootstrap by debootstrap and directly continues with
the image phase.
2021-10-27 12:58:22 -04:00
Marcus Schäfer
6754b3f9e2 Cleanup xattr requirement
There is no version of suse we support that provides
the old xattr module. Thus the requirement can be set
in a clean way to pyxattr and the setup.py trickery
can be deleted
2021-10-27 09:42:02 -04:00
Marcus Schäfer
090284db1c
Bump version: 9.24.1 → 9.24.2 2021-10-22 17:41:18 +02:00
Marcus Schäfer
df4e62a4e2
Fixed nasty bug in ramdisk generator
The ramdisk unit generator reads the config.bootoptions
file and extracts the root_uuid from it. This is done
with a very simple shell read using a space as separator.
However the last element is never read by that code.
As long as there was yet another kernel cmdline option
after the root= option this bug was not an issue. But
as soon as the root= option is last in the list it will
not be read and the generator exits prior creating the
sysroot.mount target. This commit fixes it in a way
that it makes sure there is always a space at the end
of the config.bootoptions file
2021-10-22 17:38:27 +02:00
Marcus Schäfer
2547257cce
Merge pull request #1954 from OSInside/custom_bundle_name
Add support for custom result bundle naming
2021-10-22 17:38:00 +02:00
Marcus Schäfer
c282d74a21
Added integration build test for bundle_format 2021-10-21 11:13:49 +02:00
Marcus Schäfer
d32661888b
Add support for custom result bundle naming
Allow to specify a bundle_format per <type> which is used
at the time of the result bundle creation to create image
output names matching the provided pattern.
This Fixes #1943
2021-10-21 11:13:49 +02:00
Marcus Schäfer
fe6c5f51fb
Merge pull request #1951 from OSInside/stop_on_umount_issue
Raise exception on umount issue
2021-10-21 08:50:40 +02:00
Marcus Schäfer
d26d66b86e
Added lsof to kiwi-systemdeps-core 2021-10-20 22:57:44 +02:00
Marcus Schäfer
c27308377c
Raise exception on umount issue
Up to now kiwi tried to umount a resource it has mounted for some
time and if it was not possible due to a busy state the process
continued. In any of these situations it was not possible to free
up the nested resources and it could also happen that the image
build result got corrupted because there is still data that can
be consumed but shouldn't be there anymore. The change here makes
kiwi to stop the process and raise with an error also including
the information that there are now resources still active but
busy on the host and a manual cleanup is unfortunately needed.
This Fixes #1914
2021-10-20 22:57:44 +02:00
Marcus Schäfer
4981d3587d
Added missing python-simplejson to pkgbuild
Added missing python-simplejson requirement to the
archlinux pkgbuild package template
2021-10-19 15:24:44 +02:00
Marcus Schäfer
46cef868cf
Added SystemOverlayRoot profile
Test kiwi's overlayroot mode without initrd
2021-10-18 15:15:28 +02:00
Marcus Schäfer
b3a74d4c28
Update test for image without initrd and loader
The systemd-remount-fs.service expects devices to be present
in their UUID representation. When booting without an initrd
there is no udev and the root= device must be provided with
the kernel exposed unix device name. In addition there is no
UUID device representation for virtio devices which are used
together with the small kvmsmall kernel of this example.
Since booting of this appliance is done via:

    $ kvm --kernel (kernel-kvmsmall) \
        -drive file=kiwi-test-image-embedded.raw,if=virtio \
        -append "root=/dev/vda1 console=ttyS0 rw"

The kernel rootfs is mounted in rw mode anyway. Thus the systemd
remount service is not useful in this case and switched off
2021-10-18 09:39:14 +02:00
Marcus Schäfer
4467c1e4d9
Bump version: 9.24.0 → 9.24.1 2021-10-15 10:02:06 +02:00
Marcus Schäfer
908dfac13e
Merge pull request #1950 from OSInside/fix_luks_open_for_empty_key_file
Fixed use of LUKS encrypted images with empty pass
2021-10-15 10:01:44 +02:00
Marcus Schäfer
0a4aab05aa
Merge pull request #1945 from OSInside/doc_plugins
Added documentation for kiwi stackbuild plugin
2021-10-15 10:00:35 +02:00
Marcus Schäfer
2f2a69414b
Make sure embedded test exposes the kernel 2021-10-14 16:56:11 +02:00
Marcus Schäfer
0aa490c654
Fixed use of LUKS encrypted images with empty pass
For initial provisioning of LUKS encrypted disk images an
empty passphrase key is handy to avoid interaction in the
deployment process. However, the dracut kiwi modules were
lacking the information that the luks keyfile could be an
empty passphrase key which must not be opened with the
potential risk to get prompted for input. This commit
introduces a new profile environment variable evaluated
by the dracut kiwi lib code to open the LUKS pool and
allows to distinguish the situation on key files with
or without a passphrase
2021-10-14 11:27:16 +02:00
Marcus Schäfer
c816287874
Fixed type annotations for LuksDevice class 2021-10-14 10:11:01 +02:00
Marcus Schäfer
69434c9494
Fixed repo setup for test-image-embedded
Use obsrepositories
2021-10-13 17:10:30 +02:00
Marcus Schäfer
f3ababcdf6
Added a build test for no-initrd / no-bootloader
It's allowed to configure an image building without an
initrd and/or bootloader setup. These are settings mostly
used in the embedded world and this build test makes sure
images of that kind can be build
2021-10-13 17:03:48 +02:00
Marcus Schäfer
cded86afec
Add support for portable result data (#1949)
In addition to the serialized Result instance kiwi.result
file this commit also creates a portable version of this
information in kiwi.result.json. Only the information that
can be expressed as json document is part of the portable
version. This is related to Issue #1918
2021-10-12 18:31:49 -04:00
Marcus Schäfer
9940caffde
Added documentation for kiwi stackbuild plugin
Restructure the documentation to put all plugin documentation
under its own category. Add a chapter about the stackbuild
plugin, it's concepts and use cases. This Fixes #1907
2021-10-08 18:07:20 +02:00
Marcus Schäfer
1f545b82c1
Bump version: 9.23.63 → 9.24.0 2021-10-07 09:54:22 +02:00
Marcus Schäfer
3d1a5b9b53
Merge pull request #1939 from OSInside/fix_grub_linux_default_setup
Fixed GRUB_CMDLINE_LINUX_DEFAULT setup regression
2021-10-07 09:51:49 +02:00
Marcus Schäfer
ef05ecc36e
Add support for toplevel include directive(s)
On the toplevel of an image description you can now
specify include directive(s) like in the following
example

<image ...>
    ...
    <include from="filename_a.xml"/>
    ...
    <include from="filename_b.xml"/>
</image>

At the place of their occurrence the include statement
will be replaced with the contents of the given filename.
The implementation is based on a XSLT stylesheet and
applies very early in the process. The stylesheet reads
the contents of the given file as XML document().
Thus only valid XML documents gets accepted by this
include concept. This Fixes #1929 and is related to
Issue #1918
2021-10-07 09:50:38 +02:00
Marcus Schäfer
8a5fdc0078
Merge pull request #1942 from OSInside/fix_pxe_docs_and_error_reporting
Fix pxe docs and error reporting
2021-10-07 09:45:04 +02:00
2724bba9f0
Merge pull request #1941 from OSInside/fix_systemdeps_for_raid
Added mdadm to requires for systemdeps
2021-10-06 10:33:02 -04:00
Marcus Schäfer
8bc1a819b3
Added mdadm to requires for systemdeps
When building raid based images the buildhost needs mdadm.
In addition rework the place to require disk based tools.
Most of them were added to the filesystem systemdeps but
belong to the disk systemdeps
2021-10-06 16:13:58 +02:00
Marcus Schäfer
736887628e
Bump version: 9.23.62 → 9.23.63 2021-10-06 16:06:55 +02:00
Marcus Schäfer
dfc22d6241
Fixed error reporting for stateful description
Errors due to missing or no type definitions were reported
provding the internal object reference of the XML parse
result. This is useless information for users and needs
to be done better. This commit fixes the error message to
avoid showing object references and includes information
about the applied profiles used for this XML state.
2021-10-06 14:39:26 +02:00
Marcus Schäfer
d551e47647
Fixed legacy PXE documentation
The documentation for building a legacy pxe image was not
using the profiles (Flat or Compressed) as the actual image
description for this example requires it. This Fixes #1923
2021-10-06 14:38:25 +02:00
804be745f2
Merge pull request #1938 from OSInside/allow_stdout_logging
Allow logfile option to log on stdout
2021-10-06 08:18:09 -04:00
efde5217ee
Merge pull request #1940 from OSInside/fix_loopback_config
Fixed creation of loopback config
2021-10-06 08:17:29 -04:00
Marcus Schäfer
7ca20f398a
Fixed creation of loopback config
If an extra boot partition is in use the creation of the config
file for the loopback boot feature was using the wrong path.
This commit fixes it and also introduces integration checks
which builds in this condition
2021-10-06 12:44:10 +02:00
Marcus Schäfer
e297a0f2a2
Fixed GRUB_CMDLINE_LINUX_DEFAULT setup regression
The value for GRUB_CMDLINE_LINUX_DEFAULT should only be
changed if custom kernelcmdline values are provided. In
case there are none kiwi should not change this value.
The test to check for this condition is based on the
result cmdline reduced by the root setting. However the
default cmdline setting in kiwi appends 'rw' in addition
to the root device information. This means the default
kernelcmdline is never empty and therefore the grub
setting GRUB_CMDLINE_LINUX_DEFAULT="rw" is always set.
This commit fixes the conditional change by making sure
the default cmdline only consists out of the root
device information. This Fixes #1650
2021-10-05 19:44:41 +02:00
Marcus Schäfer
7e0927e8d5
Allow logfile option to log on stdout
The option setting '--logfile stdout' is now a special form
and logs the messages usually written to a file to stdout
instead. This is handy if all messages of the build are
requested but the --debug switch is not because it does more
than that, e.g calling scripts through debug'able screen
sessions
2021-10-05 17:25:25 +02:00
Marcus Schäfer
f2f7d22fcd
Allow test-image-luks to be build locally too
In suse there are many programs replaced by the busybox
alternative and also preferred by the package manager.
However there are also packages like the kernel in suse
which wants gawk and not busybox-gawk. In kiwi to build
images there are two installation phases, the bootstrap
phase which installs mandatory packages to allow chroot
operations and the image phase which installs the rest
of the requested packages as chroot operation. In this
two pass step the package manager is called twice to
resolve dependencies and that causes the issue with the
preferred busybox packages which gets pulled in in the
first phase. To prevent this there are only two options:

1. Explicitly list the non busybox packages in the
   bootstrap phase

2. Prevent the image phase and put all packages to
   the bootstrap phase such there is only one package
   manager call for dependency resolution

This commit implementes option 1. because having all
packages in the bootstrap phase means that the host
packagemanager resolves and if the host packagemanager
is somehow not compatible with the image target this
leads to other weird issues which are not obvious and
hard to debug.
2021-10-05 10:52:20 +02:00
Marcus Schäfer
dc8af34d84
Bump version: 9.23.61 → 9.23.62 2021-09-23 16:56:32 +02:00
Marcus Schäfer
b900264779
Fixed script calls when running in obs
kiwi is called with --debug in obs which triggers the scripts
to be called through screen. However the obs caller is not
associated with a terminal thus it fails. This commit creates
an exception for debug mode when running in obs
2021-09-23 16:54:31 +02:00
Marcus Schäfer
4b531c0c47
Bump version: 9.23.60 → 9.23.61 2021-09-23 15:35:35 +02:00
Luis González Fernández
547c3e2dcc
Fix secure boot for ubuntu based images
This patch fixes #1911 and makes secure boot images to work again in Ubuntu 20.04

Co-authored-by: Luis Ladislao Gonzalez Fernandez <luislgf@inditex.com>
2021-09-23 15:34:08 +02:00
Marcus Schäfer
46c51f1a8b
Merge pull request #1934 from OSInside/terminal_control_on_scripts_in_debug_mode
Run scripts via a screen session in debug mode
2021-09-23 12:25:49 +02:00
Marcus Schäfer
7fa6cda579
Run scripts via a screen session in debug mode
When creating a custom script it usually takes some iterations of
try and testing until a final stable state is reached. To support
developers with this task kiwi calls scripts associated with a
screen session. The connection to screen is only done if kiwi
is called with the --debug option.
2021-09-22 11:48:47 +02:00
Marcus Schäfer
a61a80e7c1
Delete obsolete release stage from gitlab
Now done as github action
2021-09-21 18:49:53 +02:00
Marcus Schäfer
765f509b4a
Bump version: 9.23.59 → 9.23.60 2021-09-21 18:47:59 +02:00
Marcus Schäfer
f0e2eaeba5
Fixed pypi tox release target
Only needs the creation of the sdist tarball
2021-09-21 18:46:58 +02:00