Commit Graph

3838 Commits

Author SHA1 Message Date
David Cassany
c5d51ec86e
Include boostrap packages list into deboostrap call
This commit includes the packages listed in boostrap section to the
debootstrap call instead chrooting into the new root tree and call
apt.

Fixes #1587
2020-10-19 22:08:04 +02:00
Marcus Schäfer
23f7e5025b
Bump version: 9.21.17 → 9.21.18 2020-10-12 20:14:34 +02:00
Marcus Schäfer
6b7664d16d
Merge pull request #1580 from OSInside/increase_scope_for_grub_rootdev_fix_in_obs
Enhance scope of _fix_grub_root_device_reference
2020-10-12 12:46:06 +02:00
Marcus Schäfer
dbc6dffc0f
Merge pull request #1581 from OSInside/fix_profile_docs
Fix profile docs
2020-10-12 09:12:49 +02:00
Marcus Schäfer
31e0ce96cd
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
is also unwanted and needs fixing. To solve this properly
and also with respect to more unexpected grub2-mkconfig
data, the code changes to use a regular expression for the
root= replacement. The expression matches all root= cases which
we want to fixup:

1. If the local used root device appears in the grub config file.
2. If a linux by-id setting is used in the grub config file.

The replacement happens for overlayroot disk images where we
know grub2-mkconfig cannot handle the layout as well as if kiwi
runs in obs where we know grub2-mkconfig fails due to the absence
of udev.
2020-10-12 09:08:08 +02:00
David Cassany
95fba90793
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.
2020-10-11 23:12:41 +02:00
Marcus Schäfer
6cdc6bbdd3
Merge pull request #1578 from OSInside/overlay_data_below_tmp
Use custom tmpfs for managing overlays
2020-10-08 15:41:28 +02:00
Marcus Schäfer
aaa70813a3
Add support for rd.root.overlay.readonly
Allow to use an overlayroot system with read-only feature.
If kernelcmdline="rd.root.overlay.readonly" is set in combination
with overlayroot="true" the overlayfs uses a tmpfs to store
new data temporary as long as the system runs. On reboot the
newly written data is lost and the system is back to its
factory state.
2020-10-08 15:04:13 +02:00
Marcus Schäfer
89f85e4504
Use custom tmpfs for managing overlays
Provide a method to manage the base mount point for overlay and
iso mount points and set the base directory to it because /run
has a RAM space limitation which is unfortunate to handle live
systems. This Fixes #1558
2020-10-08 15:04:13 +02:00
Marcus Schäfer
d57dd555b1
Bump version: 9.21.16 → 9.21.17 2020-10-05 15:06:20 +02:00
Marcus Schäfer
98d3cfa514
Merge pull request #1577 from OSInside/fix_dracut_lib_dependency
Make dependencies to dracut-kiwi-lib release specific
2020-10-05 15:05:56 +02:00
David Cassany
26b0269593
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.
2020-10-05 14:56:48 +02:00
Marcus Schäfer
9e7e6cc8f6
Bump version: 9.21.15 → 9.21.16 2020-10-05 12:24:29 +02:00
David Cassany Viladomat
4acca4eab5
Merge pull request #1576 from OSInside/no_id_limit
Delete length limitation of image id attribute
2020-10-05 10:51:13 +02:00
Marcus Schäfer
d2cf546b03
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
2020-10-05 09:34:59 +02:00
Marcus Schäfer
156ab7a3af
Bump version: 9.21.14 → 9.21.15 2020-10-02 14:04:51 +02:00
Marcus Schäfer
c30f5ae715
Merge pull request #1574 from OSInside/add_specific_version_to_dracut_kiwi_lib_dependency
Align dracut-kiwi-lib version with packages requiring it
2020-10-02 14:04:31 +02:00
Marcus Schäfer
259b11bdc3
Merge pull request #1568 from OSInside/support_creation_of_package_change_info
Add support for package changelog info
2020-10-02 14:03:42 +02:00
David Cassany
866cb6e0de
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
2020-10-02 12:06:31 +02:00
Marcus Schäfer
d102c6af8d
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
2020-10-02 11:18:55 +02:00
Marcus Schäfer
f0054ba6d6
Merge pull request #1567 from OSInside/fix_s390_support
Fix/Refactor s390 support
2020-10-01 10:55:23 +02:00
Marcus Schäfer
836633c7b2
Fix/Refactor s390 support
This changes the s390 support on several stages:

1) On s390 the boot process is based on zipl which boots into an
   initrd from which a userspace grub process is started to support
   the grub capabilities. The implementation of this concept is
   provided via the grub2-s390x-emu package. Once installed the
   setup of the bootloader is done via the grub2-mkconfig and
   grub2-install commands and therefore from a caller perspective
   the same as with any other grub2 setup process. For kiwi this
   means no extra zipl bootloader target code is needed. Therefore
   this commit deletes the zipl setup from kiwi and puts on
   the standard grub2 process. This Fixes bsc#1170863

2) To support different targettypes the grub2-s390x-emu provided
   zipl template must be adapted. Parts of the former zipl bootloader
   setup therefore now applies to an update of the zipl2grub
   template file

3) Support for CDL/LDL DASD targets has been disabled in the schema
   When testing 4k devices and a respective zipl2grub template
   setup for CDL/LDL targettype it has turned out that grub2-install
   is not able to run on such a device. My assumption is that
   the device code in grub2-install does not work for 4k devices
   with an fdasd created partition table. As this needs further
   investigations and most probably adaptions on the grub toolchain
   for s390, we disabled the setup of these modes for now.
   emulated DASD (FBA) and SCSI targets stays supported.
2020-09-30 17:14:30 +02:00
Marcus Schäfer
d260dc6738
Merge pull request #1573 from OSInside/fix_rpm_compat_link
Fix compat link for rpmdb location
2020-09-30 14:56:20 +02:00
David Cassany
a6f56179b7
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
2020-09-29 13:37:13 +02:00
Jim Klimov
e476f5e254
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
2020-09-29 10:17:55 +02:00
Marcus Schäfer
490a9db564
Use pragma: no cover to skip non reachable code
Instead of placing the file into .coveragerc use the
no cover pragma to skip code paths that can never be
reached from being counted in the coverage report.
This affects the abstract constructors in the Factory
classes
2020-09-29 09:58:22 +02:00
Marcus Schäfer
3c940e5439
Merge pull request #1569 from OSInside/refactor_bootloaderconfig
Refactor BootLoaderConfig
2020-09-29 09:51:51 +02:00
Marcus Schäfer
9892f85050
Merge pull request #1570 from OSInside/refactor_bootloaderinstall
Refactor BootLoaderInstall
2020-09-29 09:51:27 +02:00
David Cassany
2abcce803b
Refactor BootLoaderInstall
This commit refactors BootLoaderInstall class to make it a proper
factory class. In addition type hints are added for the constructor
method.

Related to #1498
2020-09-28 09:37:05 +02:00
David Cassany
c06a424258
Refactor BootLoaderConfig
This commit refactors BootLoaderConfig to turn it into a proper factory
class and to also include type hints to facilitate it's use from an API
POV.

Related to #1498
2020-09-28 09:35:17 +02:00
Marcus Schäfer
76ad67e82c
Add support for package changelog info
In addition to the .packages file which shows details about
the installed packages in terms of version, license, etc...
we now also create a .changes file which contains the changelog
information of the installed packages. The file can be used
to compare the package changelogs between image builds.
2020-09-26 14:46:13 +02:00
Marcus Schäfer
b7bdcb2bb1
Merge pull request #1566 from OSInside/refactor_boot_image_factory
Refactor BootImage Factory
2020-09-24 10:30:23 +02:00
Marcus Schäfer
362cb807fd
Merge pull request #1563 from OSInside/refactor_builder_factory
Refactor ImageBuilder Factory
2020-09-24 10:30:05 +02:00
Marcus Schäfer
0b8abf1c7c
Refactor BootImage Factory
This commit refactors the BootImage factory to be a real
factory and to add type hints such that its use from an api
perspective is clear and enforced. Related to Issue #1498
2020-09-23 15:48:21 +02:00
Marcus Schäfer
6b5dae6a23
Bump version: 9.21.13 → 9.21.14 2020-09-23 13:06:47 +02:00
Marcus Schäfer
393137671c
Merge pull request #1564 from OSInside/compat_fix_for_type_option
Followup fix to handle one disk type better
2020-09-23 12:56:06 +02:00
Marcus Schäfer
33c5780d5a
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
2020-09-23 10:49:20 +02:00
Marcus Schäfer
3e8e6c8608
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.
2020-09-23 10:21:40 +02:00
Marcus Schäfer
d1d0444abd
Refactor ImageBuilder Factory
This commit refactors the ImageBuilder factory to be a real
factory and to add type hints such that its use from an api
perspective is clear and enforced. Related to Issue #1498
2020-09-22 16:34:44 +02:00
Marcus Schäfer
c9945ad82e
Bump version: 9.21.12 → 9.21.13 2020-09-22 12:19:15 +02:00
Marcus Schäfer
5cf67e8efc
Merge pull request #1562 from OSInside/refactor_grub_adaptions
Cleanup grub adaptions code
2020-09-22 12:18:42 +02:00
Marcus Schäfer
fc09237d05
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
2020-09-22 11:36:52 +02:00
Marcus Schäfer
0d006cf122
Cosmetic update for build status helper
Show disabled integration test builds with a clear indicator
2020-09-21 17:04:08 +02:00
Marcus Schäfer
d8f00a5a7e
Bump version: 9.21.11 → 9.21.12 2020-09-21 15:54:33 +02:00
Marcus Schäfer
38482cc70c
Merge pull request #1560 from OSInside/set_default_values_for_containers
Get default maintainer and author from image description
2020-09-21 15:50:22 +02:00
Marcus Schäfer
2ef73134ab
Merge pull request #1561 from OSInside/runtime_check_conflicting_types
Added consistency runtime check for the type setup
2020-09-21 15:50:06 +02:00
Marcus Schäfer
8967c29a12
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.
2020-09-21 15:25:58 +02:00
David Cassany
ac7bed3221
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
2020-09-21 10:24:31 +02:00
Marcus Schäfer
bcd8aeabf2
Bump version: 9.21.10 → 9.21.11 2020-09-18 16:06:02 +02:00
Marcus Schäfer
1dc3e6ceaa
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
2020-09-18 15:13:08 +02:00