- Followup fix for debootstrap called only once
A recent change skipped calling debootstrap if the allow-existing-root
flag was passed in combination with apt as the package manager.
However this is not enough. If you say allow-existing-root but
the existing root is empty or not valid to continue with chroot
and apt the debootstrap phase should not be skipped. This commit
checks if apt works in the chroot such that we can assume
debootstrap has done its job and can be skipped
- Bump version: 9.24.4 → 9.24.5
- Fixed include processing
This commit fixes several issue connected with the use of
the <include> directive:
First and foremost the XSLT chain was broken in a way that
the include XSLT in combination with the PrettyPrinter XSLT
were called not in the chain of stylesheets but together.
This results in XML descriptions which duplicated the content
and went invalid
Another change is, when the include XSLT is called in the chain.
This commit moves it to become the very first processing
instruction such that the included data is part of all subsequent
XSLT stylesheets. This also allows to use older schema versions
in included XML data and they get automatically converted through
the chain of XSLT stylesheets.
Last change is the evaluation of the from= attribute value. This
value is now interpreted as an URI. Currently only local URIs are
supported. The reason to do this is because XSLT when processing
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=208
- Make sure embedded test exposes the kernel
- 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
- Fixed type annotations for LuksDevice class
- Fixed repo setup for test-image-embedded
Use obsrepositories
- 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
- 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
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=207
- 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
- Bump version: 9.23.62 → 9.23.63
- 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.
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=206
- Only wipe bundle dir when required
The given result bundle dir must only be wiped if the
request to turn the result files into an rpm was given.
Only in this case the given bundle dir must start empty
- Fixed uninstall handling via dnf, microdnf, zypper
The above package managers supports uninstall instructions
like 'iwl*'. In kiwi there was code checking via rpm if
the packages given to uninstall actually exists. That code
does not work if the given package to uninstall is an
instruction that matches a pattern. Therefore if we use
the uninstall section in the kiwi image description, just
pass the provided information to the package manager and
don't try to be clever in kiwi itself.
- Allow to set --logfile for result namespace
Setting a logfile for e.g 'kiwi-ng result bundle ...'
is useful and should be possible
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=205
- Added support for building rpm package from bundle
With the new option --package-as-rpm it is possible to
call the kiwi result bundler such that the image build
results gets packaged into an rpm. I think this is a
handy feature to transport image builds via repositories
- Fixed MicroOS integration test
With ignition/combustion in place it's not allowed
to use tmp as a subvolume
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=204
- Fixed condition for GRUB_DISABLE_LINUX_UUID="true"
The grub config parameter GRUB_DISABLE_LINUX_UUID must only
be set if the device persistence setting is not UUID. However,
in kiwi UUID device names are the default and doesn't have to
be expressed explicitly. Therefore the condition to check
for different than 'by-uuid' is wrong for the default case were
no device persistence setting exists. This results in a wrong
grub option to be set. This commit fixes it in a way to disable
UUID device names in grub if the only other device persistency
setting in kiwi named: 'by-label' is explicitly configured.
This Fixes#1842
- Added force_trailing_slash argument to sync_data
A speciality of the rsync tool is that it behaves differently
if the given source_dir ends with a '/' or not. If it ends
with a slash the data structure below will be synced to the
target_dir. If it does not end with a slash the source_dir
and its contents are synced to the target_dir. For example:
source
└── some_data
1. $ rsync -a source target
target
└── source
└── some_data
2. $ rsync -a source/ target
target
└── some_data
The parameter force_trailing_slash in the DataSync::sync_data
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=203
- Fixed fstab entry for swap on LVM
If an LVM setup is used together with a swapspace the
swap is created as a volume in the volume group. The
required fstab entry to activate swap was not using
the LVM exposed device but the UUID of the low level
block layer. This low level device is not created
by udev because LVM takes over precedence in this
case.
- Bump version: 9.23.47 → 9.23.48
- Fixed LVM get_volumes
Due to the change on the temporary directory yet another
error in the volume manager classes for LVM got exposed.
- Bump version: 9.23.46 → 9.23.47
- Fixed LVM/btrfs volume based image builds
Due to the change on the temporary directory an error
in the volume manager classes for LVM and btrfs was
exposed. There was code which uses a sub-part of the
volume mount point directory which is a tempdir based
directory name. The sub-part was choosen by an index
based path split which worked for /tmp but no longer for
/var/tmp. With tempdir now being also a commandline
option this code has to become more robust.
- Bump version: 9.23.45 → 9.23.46
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=202
- Fixed fedora integration test builds
Maintain the repos in the obs prj config which prevents
the weird "nothing provides kernel-obs-build" error
- Bump version: 9.23.40 → 9.23.41
- Remove util-linux-systemd & util-linux Requires from dracut-kiwi-overlay
These dependencies are pulled in via dracut-kiwi-lib.
- Add missing util-linux-systemd Requires to dracut-kiwi-[live,libs]
- Fixed test-image-orthos integration test
The test was missing btrfs_root_is_snapshot which is required
when using btrfs on tumbleweed.
- Fixed test-image-disk-legacy integration test
The test did not set a device filter for ramdisk devices but
activates unattended mode. In this mode the first device in
the list is taken and this is a ramdisk device which is
by default too small to be used for the installation. Thus
the install usually fails. This commit sets the device filter
for ramdisk devices such that only associated disk devices
can be used for the install process, which is the purpose
of this test. This is related to Issue OSInside/kiwi-functional-tests#8
- Bump version: 9.23.39 → 9.23.40
- Mount dev and proc filesystems prior dracut
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=200
- Stop plymouth also for progress dialogs
- Prevent explicit man page compression
The manual pages are compressed by the packager tooling.
There is no need to do this ourselves
- Bump version: 9.23.29 → 9.23.30
- Increase integration tests boot timeout
Increase integration tests timeout from 2sec to 10sec
- Update integration tests to be non interactive
Some integration tests allows for interactive dialogs on the
bootloader menu or in the installation process. As we plan to
use these tests for automated functional testing there should
be no interaction whenever possible. This Fixes#1811
- Update kiwi installation documentation
The installation chapter contained information about the manual
install of package keys. That information is suspect to be always
outdated because these keys changes. Instead of describing the
manual install of the package key the docs moved to use the
auto-import feature of the package manager. As the instructions
were also rpm specific but we also support install via other
package mangers the complete chapter was a bit reworked and
should be more straight forward now. This Fixes#1799
- Update documentation qemu calls
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=199
- Upgrade tests accoring to #1805
This commit is a follow up of #1805 which missed to update the related
unit test.
- Make installation media unattended
This commit configures install media of several tests to run unattended
installation. This is done to facilitate the logic of functional tests.
- Fixed unit tests for parallel invocation
With the change to allow the platform architecture to be
set application global, the unit tests might fail if tests
run in parallel and using different mock architectures
for the test. Thus test that runs depending on a platform
name needs to set the name in the test
- Update Debian integration test for UEFI testing
Updated the Virtual disk profile to make use of the EFI
secure boot feature.
- Fix WSL appx filemap relative paths not preserved
During WSL appx image type creation step the file hierarchy under metadata_path
is written to a temporary file for eventual use as argument to utility appx.
The file hierarchy information is dropped resulting in all filemap entries
appearing to be at the metadata_path root. The resulting image will side load
and run but without icon and other resources. Stricter checks at Windows Store
submission will fail due to mismatch between image manifest and contents.
Fix by preserving relative path of filemap entries relative to metadata_path.
Add log output showing both input absolute path and output relative path.
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=198
- Update zypp.conf architecture setting
Make sure the architecture is set as parameter in the
zypp.conf file used for building the image. This is needed
to allow differentiation between host arch and image arch
for cross image build environments
- Added option to set the image target architecture
The option --target-arch allows to set the architecture
used to build the image. By default this is the host
architecture. Please note, if the specified architecture
name does not match the host architecture and is therefore
requesting a cross architecture image build, it's important
to understand that for this process to work a preparatory
step to support the image architecture and binary format
on the building host is required and is not considered a
responsibility of kiwi. There will be a followup effort
on providing a plugin for kiwi which should be used to
manage the needed binfmt settings for cross arch image
builds
- Added openssl to the core requires
openssl is used in kiwi to construct a password hash
if the plaintext password feature for user settings
is used. This Fixes bsc#1184128
- Bump version: 9.23.23 → 9.23.24
- Decommission obsolete code reaching EOL
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=197
- Refactor building of root cmdline setting
Creating the root= cmdline parameter was based on methods
that deals with the uuid. However, it's also possible to
use a label information for the root= cmdline. To support
this kiwi issued a 'blkid --uuid' command but that requires
udev device names to be present on the host. The open
buildservice workers do not run udev and fails apart the
standard. This commit refactors the root cmdline setup
to work with the device node as it exists during build
time such that the blkid call runs against that device
node.
- Bump version: 9.23.20 → 9.23.21
- Delete yum from packagemanager in schema
Auto convert yum to dnf if set as packagemanager. This allows
to delete the yum handling from code parts in kiwi where this
was still present. In addition this fixes the inclusion of yum
into the packagelist. This Fixes#1768
- Add Strong Typing to builder APIs
- This PR add APIs Strong Typing to the repository APIs
Strong Typing has been added to the following files:
repository/base.py
repository/pacman.py
repository/apt.py
repository/dnf.py
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=196
- Fixed API vs. CLI inconsistency
when using kiwi as API the program fails with a usage message
from the Cli class. The kiwi.cli module should not be imported
except for kiwi comandline tasks. It has turned out that the
RuntimeConfig class which is used in several places in different
API classes imports Cli and creates an instance of it to check
for a global option. This causes major issues for all programs
which uses the kiwi API but not the command line interface because
the docopt call in Cli() expects a valid docstring which only
exists in kiwi's cli.py. This commit fixes the inconsistency
and allows people to use the kiwi API independent of any
command line interface. Fixes#1755
- Make sure man pages are part of sdist tarball
The current tarball when uploaded to pypi via gitlab does
not contain the manual pages because the doc target to build
them is not called. This commit adds a doc_man tox target
which is called prior pypi release. This Fixes#1746
- Refactor grub2 installation
This commit refactors grub2 installation method to split it in two
parts. Former grub2.install method was meant to run the grub2-install
tool, however, in addition it was also running the secure boot
installation shim-install. The install method in KIWI is skipped for
those architectures and firmware combinations for which bios support
doesn't exist. This was leading to skip the secure boot installation.
The current approach strips the secure boot installation logic from the
grub2.install method, so skipping the install method does not
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=195
- Fix lsblk flags to get sorted output
This commit modifies the lsblk command flags to get a sorted output
according to the disk layout.
This is related to 176c7eab commita and it fixes bsc#1182264
- Fixed kiwi-systemdeps-filesystems requires
The filesystems requires list also contains low level
tools to manage partitions, loops and subsystems. The tools
to manage LUKS(cryptsetup) are missing and imho belongs there
along with the LVM tools which are listed
- Add strong typing for filesystem classes
This commit strong typing for FileSystem* classes.
Part of #1644
- Added ca-certificates-mozilla to build tests
ca-certificates-mozilla provides the issuer CERT to allow
for https repo connections. The standard ca-certificates is
not enough on suse/leap/sles based integration tests
- Fixed packaging metadata for pypi
Include the README as long description in the metadata
for pypi. The change causes the description on pypi.org
to show the ReST rendered README instead of a message
that the author of the module hasn't provided a description
- Delete legacy oem build test from leap
The legacy custom kiwi boot test will only continue
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=194
- Update documentation
Mention the cross arch build capability of the boxbuild
command. Also update the example box used in the self
container build chapter
- Allow to specify OBS credentials in runtime config
In preparation to the new obs kiwi plugin this commit adds
an opportunity to store obs credentials such that the plugin
could also be used in a non-interactive way
- Update build_status helper for box plugin
The suse box has been renamed to tumbleweed
- Update documentation
Fixed link list to integration tests
- Added rawhide test status to build_status helper
- Added Fedora Rawhide integration tests
- Followup fix for RuntimeConfig refactor
The refactor of the RuntimeConfig made sure the runtime config
file is read in only once. But if the file exists and is empty
after yaml.safe_load like in the kiwi package provided
/etc/kiwi.yml which contains all config options as comments,
the code still reads in the file with every new instance of
RuntimeConfig. This commit fixes this condition
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=193
- Added aaa_base to s390 TW build tests
On s390 TW aaa_base is not pulled in by a dependency in obs.
It looks like the package is pulled in by a file provides which
is not resolved by obs. Thus the package needs to be added
explicitly
- Bump version: 9.23.10 → 9.23.11
- Follow up fix, creating custom grub EFI images
Make sure custom EFI grub image is copied to the media
directory if this is different from the root directory
e.g on creation of live images
- Bump version: 9.23.9 → 9.23.10
- Follow up fix, creating custom grub images
Moving the grub mkimage call as chroot operation also broke
the creation of image builds that uses the legacy custom kiwi
boot image feature instead of dracut. This commit fixes it
- Added leap box to be shown by build_status helper
- Added decorators to help with API management
The lifetime of API methods could be limited due to
the development of kiwi. To allow for a deprecation
process the following helper methods has been added
- Bump version: 9.23.8 → 9.23.9
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=192
- Update contributing link in README
- Bump version: 9.23.3 → 9.23.4
- Fixes the rpmdb bootstrap management for DNF on SUSE
This commit makes sure that the compatibility symlink for
/var/lib/rpm is created when the host rpmdb path is set to something
different. This fixes a mismatch on bootstrapping SUSE using DNF.
Fixes#1669
- Bump version: 9.23.2 → 9.23.3
- Modify lsblk flags for a consistent output across distros
This commit modifies the lsblk flags to make use of the list format
instead of raw output. `--list` flag seams to keep the geometry order
and produces a consistent output in several distros.
- Bump version: 9.23.1 → 9.23.2
- Update kiwi-systemdeps-image-validation
Make python anymarkup to be only recommended. The package
does not exist on all distributions, e.g suse does not
provide it and for kiwi it's an optional plugin
- Fixed missing provides tag
When building WSL images the image type is set to appx.
Therefore obs is looking for what provides kiwi-image:appx
This provides tag was missing
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=191
- Fixed validation of bool value in dracut module
The oem-multipath-scan setup results in a bool variable inside
of the initrd code. The variable kiwi_oemmultipath_scan is
therefore either set to "true" or "false". A check in code
of the form [ -n ... ] is stupid since the variable always
contains text. This commit fixes the validation to make use
of the bool() method provided for these type of variables
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=190
- Omit multipath module by default
The plain installation of the multipath toolkit activates the
dracut multipath code. The setup if the target image runs in a
multipath environment or not should however be decided explicitly
in the image description via <oem-multipath-scan> and not
implicitly by the presence of tools
- Fixed multipath disk device assignment in kiwi lib
The former lookup of the multipath mapped disk device contained
a race condition. If the lookup of the device mapper files happened
before multipathd has finished the initialization, kiwi continues
with the unix node name and fails when the device mapper keeps
a busy state on it. This commit changes the code such that in case
of an explicit request to use multipath the lookup of the mapped
device becomes a mandatory process that runs until the
DEVICE_TIMEOUT is reached. Default timeout is set to 60 sec.
This references Issue SUSE-Enceladus/azure-li-services#255
- Fixed PackageManager decorator in unit test
Implement patch decorators for factories consistently
- Refactor Repository
This commit refactors the Repository class and turns it into a
proper factory class and also includes type hints to facilitate
it's use from an API POV. Related to #1498
- Add DNF as a proper dependency for openSUSE
This is required so that OBS can build openSUSE containers and appliances
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=189
- Fixed dnf plugin config setup
Only create a dnf plugin config if the plugin config directory
to store that file exists in the system
- Set --releasever=0 for microdnf
To allow microdnf to work from an empty root directory
we need to set the release version to zero
- Use custom varsdir for dnf builds
- Partially revert dcounter.c flaw report
I could not find a problem with this read call
it does check on the buffer boundaries and it
only writes the bytes that read returns until
read returns <= 0
- Fixed dcounter.c flaw report
Check buffer boundaries if used in a loop
- Fixed dcounter.c flaw report
Variable scope can be reduced and useless value assignment.
- Fixed microdnf support
The installroot argument must be used together with --config
and additionally with --noplugins, as well as --setopt for
cachedir, reposdir and varsdir. Related to #1625
- Move tools README to ReST
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=188
- Move usrmerge package out of the bootstrap section
Currently bootstrap phase on APT package manager makes use of the
debootstrap tool. However debootstrap is limited to execute the
bootstrap using a single repository. This is causes several limitations
in OBS builds, such as the impossibility of using update repositories or
the inclusion of any package that is not part of the standard OBS
repository.
Usrmerge package is part of the universe repository in OBS which is not
te one used by debootstrap, so it can't be installed on bootstrap phase.
- Bump version: 9.21.21 → 9.21.22
- Fixed package manager api inconsistency
The method post_process_install_requests_bootstrap in the
zypper package manager was missing an argument
- Bump version: 9.21.20 → 9.21.21
- Fixed regexp for grub rootdev substitution
The regular expression to match the grub root device
used a lazy glob match ".*?". This however matches a
too long part depending on the rest of the content.
This commit fixes the expression to be strict on
the allowed characters and makes sure the anchor
characters are not part of the matching character
class. This Fixes#1607
- Fix quick start guide build command
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=187
- Deleted yast from test-image-qcow-openstack
yast is not part of the testing queue in kiwi integration tests
- Obsolete config functions baseMount/baseCleanMount
The above methods are obsolete since kiwi handles these
mount/umount processes as part of the core builder code.
This Fixes#1536
- Allow custom root volume name setup
In addition to the custom size of the root volume it's now
also possible to setup the name of the root volume as follows:
<volume name="@root=rootlv"/>
If no name for the root volume is specified the default
name: LVRoot applies as before. This Fixes#1530
- Rename image build tests
To use the image builds in openQA they have to have a unique
name such that it cannot happen that a cached version of an
image in openQA is used. The current names matched openQA
cached images e.g openSUSE-Tumbleweed and in addition different
image build tests used the same name. This commit uses the
name of the image as it is organized in its directory structure
prepending "kiwi-" to be unique in openQA when it fetches
the image. This is realted to Issue #1555
- Add support for s390 CDL DASD disks
On s390 and in CDL mode (4k DASD) the call of grub2-install
does not work because grub2-install is not able to identify
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=186
- Update outdated OBS User Guide Links
- Fixed device_array structure in get_selected_disk
In reference to Issue #880 a bug was introduced that broke
the contents of the device_array which causes issues on
installations with two or more attached disks. The change
in the mentioned PR reduced the tuple for each disk
from 3 elements to 2 elements. Therefore the loop that
iterates over the disk tuples via modulo 3 was broken.
This commit fixes the modulo operation to correctly
parse the disk_list. Fixes#1588
- Fixed strncopy in dcounter helper
The max size of the copy operation was always set to zero
because the strlen of an empty buffer is zero. Bad mistake
from my side :( This Fixes#1579
- Bump version: 9.21.17 → 9.21.18
- Fix profile docs
This commit fixes the profiles documentation. The example KIWI-NG
command was using wrong flags order. This commit fixes the `--profile`
flag order in documentation.
- Enhance scope of _fix_grub_root_device_reference
In addition to the wrong root=/dev/mapper/loop... reference
fixing, written by grub2-mkconfig when used in obs there is
also the case that grub2-mkconfig writes root=PARTUUID which
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=185
- Make dependencies to dracut-kiwi-lib release specific
This commit adds a dracut-kiwi-lib dependency to dracut-kiwi-oem-dump and
darcut-kiwi-oem-repart to match up to the release level. This way the
dependency ensures the pulled binaries they are all part of the same build.
- Bump version: 9.21.15 → 9.21.16
- Delete length limitation of image id attribute
For legacy reasons the <image id="..."/> attributes was
limited to 10digits. The contents of /etc/ImageID are now
free format and no longer strictly evaluated. Thus the
limitations on the id attribute can be deleted
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=184
- Align dracut-kiwi-lib version with packages requiring it
This commit enforces dracut-kiwi-oem-repart and
dracut-kiwi-oem-dump to require dracut-kiwi-lib of the same exact
version. This prevents dracut-kiwi-lib and the packages
dependent on it being installed on a image with inconsistent versions.
Fixes#1529
- Allow to configure .changes creation and bundling
Provide config option has_package_changes in the runtime config
file and set a useful default. For building outside obs the
default for the .changes creation is switched on, for building
in obs it's switched off because obs creates its own info file
- Fix compat link for rpmdb location
This commit fixes the symlink creation for `/var/lib/rpm`. More specific
for derived container images in which the base root tree already
included the `/var/lib/rpm` the link, the `ln` command was creating a
symlink inside the `/var/lib/rpm` folder givent that it was following
the already existing symlink. Adding the `--no-target-directory` force
`ln` command to treat `/var/lib/rpm` path as the fully qualified symlink name.
Fixes bsc#1176977
- Report download URL on failed request
In case a network request to a given URL failed the report message should include the URL
This Fixes#1572
- Use pragma: no cover to skip non reachable code
Instead of placing the file into .coveragerc use the
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=183
- Fixed s390/sle15 Virtual disk integration test
The integration test used FBA mode as target. As the target
is expected to be KVM this is the wrong setting. SCSI should
be used instead. This Fixes bsc#1170863
- Followup fix to handle one disk type better
The vmx type is auto converted into an oem type with rootfs
resize disabled such that all disk images can be handled
under one disk type. However people who run kiwi on the
commandline and have selected --type vmx before now end
with an error message saying that there is no vmx type
because it was converted into an oem type. To handle this
more gracefully this commit changes the commandline
option --type vmx into --type oem if provided and prints
a warning message.
- Bump version: 9.21.12 → 9.21.13
- Cleanup grub adaptions code
The grub setup code has some after grub-mkconfig code that
fixes the written grub.cfg file on certain conditions. For
a better understanding and readability those conditions
and reasons are now put into private _fix* methods that
explains why we need to patch the written grub config file.
We all hope that those methods can go away when grub gets
fixed properly. This Fixes#1527
- Cosmetic update for build status helper
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=182
- Added consistency runtime check for the type setup
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.
- Get default maintainer and author from image description
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
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=181
- Update build test directory names
Name the build test directory to follow the changes done
in Issue #1425. There is only one disk image type now, thus
the tests for testing disk images should indicate that
better. Also the tests that build live iso images should
indicate a live iso not only an iso as it could be mixed
up with an install iso
- Consolidate build test names and description
Update build test image names to be more generic and not
bound to a specific version of a distribution. As the tests
are usually based on rolling releases of distros the name
of the test image should be generic. Also adapted the
specification of the test images to describe the focus
of the test if not generic.
- Bump version: 9.21.9 → 9.21.10
- Fix the early boot grub.cfg file
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
- Change Appliance names to drop the name LimeJeOS
The name LimeJeOS was an invention of the SUSE Studio project.
Since the project does no longer exist, users have no idea
what the name means. Therefore the integration tests as well
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=180
- Fixed archlinux integration test build
The setup of the locale via systemd-firstboot --locale=en_US.UTF-8
failed on archlinux with the error message Locale en_US.UTF-8 is not
installed. This commit sets the locale explicitly
- Fixed GCE integration test build
nothing provides google-compute-engine-init
- Fixed bootloader grub copy SameFileError exception
Only copy the file if the given source and destination are
not the same file
- Simplify build_status helper
Instead of a static list with all integration test build names
only maintain a list of integration test build project names
- Bump version: 9.21.5 → 9.21.6
- Skip filesystem check for XFS prior xfs_grow
running xfs_repair check isn't strictly necessary before resizing,
and in some cases it may even prevent resizing by giving an error
that would be cleared through mounting the fs (e.g. when the fs
wasn't cleanly umounted, and thus letting xfs recover and replay
its journal). Given that xfs can only grow online (while being mounted),
this is sufficient to ensure that the fs is in a state where it
can be resized. This is related to bsc#1174009
- Fixed code logic in resize_filesystem method
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=179
- Fixes live ISOs
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
- Global variables (#1485)
* Fix according to PEP8
* Refactor global variables pythonic way
* Remove unused import
- Add locale configuration hints in docs
- Add missing decorator for static methods
- Bump version: 9.21.1 → 9.21.2
- Fixed check for root device in grub config
There is a code path that fixes the grub2-mkconfig used root device
when building in an environment that does not allow to resolve the
by-X path names, e.g an obs build worker without udev. For images
that explicitly defines a root=... value in the kernelcmdline
attribute the root device check was not called because the
_get_root_cmdline_parameter method returns None. This commit fixes
the method to return the expected root device in any case such that
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=178
- Fixed test-image-qcow-openstack
Nothing provides libyui-ncurses-pkg11, yast2-trans-en_US in
TW anymore
- Moved sle12 ppc integration test to internal bs
In agreement with IBM the sle12 integration test has been moved
into the internal buildservice. The reason for this change is
a python 3.4 compatibility problem. This version of python is
used in sle12 but would require patching of upstream kiwi in
terms of type hints and annotations to continue to work.
We don't want to cary this patch upstream but in the sle12_kiwi
repository which contains the kiwi used in sle12. Therefore
also the integration test needs to move into the internal
sle12 space.
- Ignore MyPy cache
- Ignore VSCode cache
- Remove sed calls to fix /etc/vimrc
An update of vim in Tumbleweed will move /etc/vimrc to /usr/share/vim as part of
the /usr - /etc split. This makes the sed call fail because /etc/vimrc no longer
exists.
However, the fix is not required anymore then, as the vim package dropped the
"syntax on" line from the default vimrc.
- Fixed permissions of custom boot image root dir
When building a custom kiwi initrd the root directory
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=177
- Fixed parse result description reference
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.
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=174
- Remmove any Recommends for CentOS7
This commit fixes the package spec for CentOS 7. In CentOS 7 there is no
support for weak dependencies. In 9792cea1 a recommended dependency on
gpg tools was included for all builds and this caused a failure for
CentOS 7. With this commit, the recommended dependency, is omitted for
any pre CentOS 8 distro.
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=172
- Fix default repositories for APT
This commit fixes the default repositories configuration for APT.
Fixes#1439
- Include recommend for gpg tool
- Fix signing keys management for APT
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
- Fixed spec file
This patch is two fold. First the py2 version of kiwi was
dropped since py2 is EOL. To indicate that correctly on the
package level python3-kiwi has to obsolete python2-kiwi.
The other part of the change is a file conflict of the
files:
etc/bash_completion.d/kiwi-ng.sh
/usr/share/doc/packages/python-kiwi/README
which were provided by the kiwi-man-pages sub-package but
were moved to be provided by the main python3-kiwi package
now. On update of the package with an older version of
kiwi that maintains this files to belong to kiwi-man-pages
a file conflict at install time appears. To solve this
python3-kiwi now conflicts with kiwi-man-pages < %{version}
This Fixes#1413 and Fixes bsc#1168973 and bsc#1156677
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=170
- Fixed _get_grub2_mkconfig_tool
Last patch on this method breaks the search for alternative
mkconfig names. It returns always on the first lookup which
could be none. This breaks on systems that uses a different
name than grub2-mkconfig, like on Ubuntu.
- Increase spare space on disk repart
The sizing of the virtual cylinders in parted seems to be unfavorable,
as with some disks and SD cards here the device size is not a multiple
of the cylinder size, so the last incomplete cylinder is wasted.
If this wasted space is more than 5MiB, kiwi tries to resize indefinitely.
Therefore min_additional_mbytes gets increased to prevent running
into this situation. This Fixes bsc#1165823
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=169
- Fixed return value from _get_grub2_mkconfig_tool
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.
- Bump version: 9.20.6 → 9.20.7
- Make CommandCapabilities.check_version take the longest match
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.
- Fixed check for grub mkconfig capabilities
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
- Validate use of GRUB_USE_LINUXEFI
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
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=168
- Fixed plugin documentation
While setting up the kiwi boxed plugin I realized some small
mistakes in the plugin documentation
- Allow overlay directories for profiles
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.
- Make build of filesystem image optional for pxe
Allow to build a kernel/initrd pair without a root
filesystem image. Related to Issue #1388
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=167
- Add SECURE_BOOT parameter for grub2 in efi mode
This commit adds the SECURE_BOOT parameter on bootloader sysconfig
for grub2.
Fixes bsc#1167746
- Added new oem-resize-once element
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.
- No default boot partition for btrfs_root_is_snapshot
This commit ensures no boot partition is used when root is set to be
a btrfs snapshot unless this is explicitly required by the user.
Fixes#1351
- Make disk allocation check more robust
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
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=166
- Fix a regression for container builds in OBS
This commit fixes a regression introduced in 12d84be2. We need to ensure
that `labels` item exist in oci image configuration dict before updating
it and creating it in case it doesn't exist.
- Fixed suse doc push pipeline
build and push are not allowed to run in parallel
- push suse doc only on merge to master
- Build and push SUSE documentation
On any pull request also build the suse documentation and
push changes to the OSInside/kiwi-suse-doc git repository.
The SUSE documentation team needs a repo with docbook sources
for the publishing procedure. In addition change the gitlab
pipeline to run in three stages: Test, Documentation and
Package. Let the style and unit tests run in parallel and
cleanup the dependency setup
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=165
- Fix container labels setup in OBS
This commits fixes the containers label setup in OBS, ensuring that
adding the 'org.openbuildservice.disturl' label does not clear any
other label.
Fixes#1338
- Bump version: 9.20.1 → 9.20.2
- Fixed schema regexp validation
Regexp patterns used in the schema are translated into python
expressions by generateDS. It's required to use the XSD schema
to run generateDS, xsd however has some restrictions on pattern
use which leads to a warning message for the ones fixed here
- Fixed completion_generator
Due to the change of the binary name for consistency in the
docopt docstrings the completion generator failed to produce
correct results. This commit fixes it
- Store Mock build logs and built RPMs as short-term artifacts
This makes it much easier to debug what is happening with mock when
failures occur.
- Added sle15 ppc oem integration test
Related to Issue #1325
- Added task plugin documentation
Documentation for developers how to write a custom kiwi
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=164
- Added serial console in centos integration test
For use with Kanku we enable the serial console for the
centos integration test image
- Make PrEP partition known to GPT partitioner
- Use GPT table for Power ofw firmware
GPT partition table should be preferred for power systems
these days. Related to Issue #1325
- target blocksize for IBM Power8 systems is 4k
Adapt the oem image integration test for bare metal to use
4k blocksize
- Fixup documentation for consistency
There is the legacy kiwi version and there is this kiwi(next generation).
From a documentation perspective there are several inconsistencies that
could confuse users. This commit makes the name for KIWI-NG consistent
across the entire documentation. At places where we point to older
documentation we use the term Legacy KIWI and a link to the documentation
that covers this part. All this is needed in preparation to cleanup the
documentation situation for the SUSE documentation but with respect to
the upstream doc sources, their layout and markup.
- Do not create empty macros file
This commit makes sure to empty RPM macros files are created during
the build. Additionally it also ensures that no needless `rm` and `mkdir`
calls are done.
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=163
- Deleted distro provided login.defs from overlay
- Delete use of methods that are done by the builder
- Deleted obsolete ifplugd from arm build test
- Deleted obsolete ifplugd from s390 build test
- Update status helper script
Also show new ppc integration test builds
- Added fedora ppc integration test
Added obs integration test for building a simple disk image
to be started in a VM on power. Related to Issue #1325
- Added suse ppc integration test
Added obs integration test for building a simple disk image
to be started in a VM on power. Related to Issue #1325
- Bump version: 9.19.14 → 9.19.15
- Disable RPM module content validation and filtering when building in OBS
The Open Build Service builds images by identifying the requested dependencies,
downloading them into an isolated environment, regenerating the repository
metadata from scratch with *only* that content, and then passing those
new repositories to be used for building images. This enforces the
reproducibility of the image build process.
However, when building images for Linux distributions that have
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=162
- Follow up fix for kernel version lookup
When using custom kiwi boot images a shell method named
baseCreateCommonKernelFile was used to create a common
kernel file name in the boot image to allow a simpler
search code in the builder. The search code in the builder
however uses the standard kernel naming schema and with
the latest changes to the kernel version lookup the
common name did not match the matching pattern anymore.
The use of such a common kernel file is obsolete and
the shell method can finally be deleted.
- Bump version: 9.19.8 → 9.19.9
- Refactor kernel version lookup
For the lookup of the kernel version kiwi provided a small
C program that reads the first bytes of the kernel binary
and extracts the version information. Given the various
compression formats and also the problem of kernel files
that contains the decompressor code which could be anything
it has turned out to be difficult to provide a stable tool
to read the version from the binary. Therefore the code in
kiwi was refactored to read the version via regexp match
from the filename which also makes kversion an obsolete
tool. This Fixes#1308
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=161
- Update libyui-ncurses-pkg10 to libyui-ncurses-pkg11
In Tumbleweed there is no longer the libyui-ncurses-pkg10 its been
superseded by libyui-ncurses-pkg11.
This fixes the test-image-qcow-openstack integration test
- Reference commit for SUSE maintenance
This commit adds a reference to Issue #1301 and the report in bugzilla
bsc#1159538. The issue was fixed in commit 7d96d19c
- Fix grub2 configuration for shim fallback setup
If shim fallback setup is enabled the grub.cfg is copied to the EFI
partition. This commit makes sure that the grub.cfg is copied to the EFI
partition according to the efi mount point.
Fixes bsc#1159235
- Ensure no swap volume is added on btrfs
When the selected filesystem is btrfs the volume manager is not LVM.
In that case the swap partition is not volume, it is a completely
independent partition. So that we cannot add and additional volume
for swap when swap is specified in the description file.
This patch fixes#1301 and fulfills #1297
- Fixed installation chapter in the documentation
The chapter still outlines multipython support but we
dropped support for python2 some time ago
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=160
- Fixed swap setup if btrfs is used
In case of a volume manager the simplified variant of the
device name is used in the fstab file to reference the
swap device. However this is only correct for the lvm
volume management but not for btrfs. In case of btrfs
the swap space is not a subvolume but a real partition
and thus the simplified device spec in fstab puts in the
loop mapped device which is wrong. This patch fixes it
- Exclude 'Recommends: kiwi-man-pages' for EL7 and older in the spec
- Fixed xz options syntax in default kiwi.yml
xz options are passed as a string and splitted in code
but not handled as yml list
- Fixed scope of kiwi-man-pages sub package
The kiwi-man-pages package provided data that belongs to
the main package, e.g the completion as well as the
license information. In addition kiwi-man-pages should
not be a requirement.
- Fixed result map for OEM pxe install
The result map for OEM images with installpxe enabled
contained a wrong file name. Thus the result bundler
was not able to fetch the tarball
- Open image files in UTF-8
Post image build metadata like the packages file which are
OBS-URL: https://build.opensuse.org/package/show/Virtualization:Appliances:Builder/python-kiwi?expand=0&rev=159