Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-kiwi for openSUSE:Factory checked in at 2025-04-02 17:09:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-kiwi (Old) and /work/SRC/openSUSE:Factory/.python-kiwi.new.1907 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-kiwi" Wed Apr 2 17:09:00 2025 rev:133 rq:1266167 version:10.2.16 Changes: -------- --- /work/SRC/openSUSE:Factory/python-kiwi/python-kiwi.changes 2025-03-11 20:43:56.278736855 +0100 +++ /work/SRC/openSUSE:Factory/.python-kiwi.new.1907/python-kiwi.changes 2025-04-02 17:10:43.102692106 +0200 @@ -1,0 +2,133 @@ +Tue Mar 25 13:13:00 CET 2025 - Marcus Schäfer <marcus.schae...@gmail.com> + +- Bump version: 10.2.15 â 10.2.16 + +------------------------------------------------------------------- +Tue Mar 25 11:35:09 CET 2025 - Marcus Schäfer <marcus.schae...@gmail.com> + +- Support sourcetype setting on the commandline + + Allow to specifiy the sourcetype(metalink|baseurl|mirrorlist) + also on the commandline via --set-repo/--add-repo options. So + far this was only possible as part of the kiwi description file + +------------------------------------------------------------------- +Tue Mar 25 08:40:22 CET 2025 - Marcus Schäfer <marcus.schae...@gmail.com> + +- Bump version: 10.2.14 â 10.2.15 + +------------------------------------------------------------------- +Tue Mar 25 08:39:18 CET 2025 - Marcus Schäfer <marcus.schae...@gmail.com> + +- Fix gh-pages deployment + + poetry install was not called, thus sphinx was not present + +------------------------------------------------------------------- +Tue Mar 25 08:30:11 CET 2025 - Marcus Schäfer <marcus.schae...@gmail.com> + +- Bump version: 10.2.13 â 10.2.14 + +------------------------------------------------------------------- +Mon Mar 24 19:10:07 CET 2025 - Marcus Schäfer <marcus.schae...@gmail.com> + +- Drop use of travis-sphinx + + According to the documentation of peaceiris/actions-gh-pages + the sphinx-build output can be directly consumed to publish + to github pages + +------------------------------------------------------------------- +Mon Mar 24 18:22:59 CET 2025 - Marcus Schäfer <marcus.schae...@gmail.com> + +- Allow stderr data in CommandProcess + + Enhance poll_show_progress() method to allow polling on + stderr data too. The new parameter with_stderr is used + together with the dnf5 package manager. dnf5 has changed + in a way that a lot of useful information during the + install of packages is printed to stderr. From my perspective + a clear regression to former behavior but we can fix this + in kiwi to poll on both channels. This Fixes #2748 + +------------------------------------------------------------------- +Mon Mar 24 15:06:02 CET 2025 - Marcus Schäfer <marcus.schae...@gmail.com> + +- Support arch attribute for <users> section + + Allow to setup users per arch. This Fixes #2737 + +------------------------------------------------------------------- +Mon Mar 24 09:35:57 CET 2025 - Marcus Schäfer <marcus.schae...@gmail.com> + +- Add Debian_12_update repo for testing with typer + + Even though we will add support for the typer Cli with kiwi-11 + I want our integration test images to be able to build with the + open PR #2751. Debian 12 is the only target in the support matrix + which uses a too old veryion of typer. Therefore to be able to + test this target I built a newer version of typer in an update + repo for Debian 12 and added it to the integration test + description + +------------------------------------------------------------------- +Fri Mar 21 21:18:08 CET 2025 - Marcus Schäfer <marcus.schae...@gmail.com> + +- Fixed python3_sitelib for debbuild in OBS + +------------------------------------------------------------------- +Fri Mar 21 08:46:32 CET 2025 - Marcus Schäfer <marcus.schae...@gmail.com> + +- Fixed test-image-agama + + Service setup-systemd-proxy-env.path no longer exists + +------------------------------------------------------------------- +Wed Mar 12 10:22:46 CET 2025 - Marcus Schäfer <marcus.schae...@gmail.com> + +- Explicitly request shadow-utils + + Make sure shadow-utils gets installed for rawhide + integration tests + +------------------------------------------------------------------- +Wed Mar 12 09:12:36 CET 2025 - Marcus Schäfer <marcus.schae...@gmail.com> + +- Drop test-image-suse-on-dnf test + + This was just a "can this work" test but has no real + relevance for users since nobody would use dnf to build + a suse image, there is also no help when it does not + work. So let's drop this test build + +------------------------------------------------------------------- +Thu Mar 06 11:32:25 CET 2025 - Marcus Schäfer <marcus.schae...@gmail.com> + +- distutils sysconfig is deprecated + + Move to sysconfig module + +------------------------------------------------------------------- +Tue Mar 04 11:01:21 CET 2025 - Marcus Schäfer <marcus.schae...@gmail.com> + +- Make integration tests to build outside of OBS + + Update and extend all integration tests such that they also + build outside of the Open Build Service. Along with the changes + on the descriptions a simple build-tests.sh script was added + to drive the build process. The build is based on the kiwi + boxbuild plugin in container mode to build the tests + from a given build-tests directory. A new chapter to document + how to Build the Build Tests is also provided and referenced + on the github main page. + +------------------------------------------------------------------- +Mon Mar 03 12:28:03 CET 2025 - Marcus Schäfer <marcus.schae...@gmail.com> + +- Add rd.kiwi.oem.luks.reencrypt_randompass + + For OEM LUKS2 encrypted disk images in combination + with rd.kiwi.oem.luks.reencrypt. Reset insecure built time + passphrase with a random onetime passphrase + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-kiwi.spec ++++++ --- /var/tmp/diff_new_pack.loeBRq/_old 2025-04-02 17:10:44.594754694 +0200 +++ /var/tmp/diff_new_pack.loeBRq/_new 2025-04-02 17:10:44.594754694 +0200 @@ -29,7 +29,11 @@ %endif %if %{undefined python3_sitelib} +%if "%{_vendor}" == "debbuild" %global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") +%else +%global python3_sitelib %(%{__python3} -c "import sysconfig; print(sysconfig.get_path('platlib'))") +%endif %endif %if %{undefined python3_version} @@ -52,7 +56,7 @@ %endif Name: python-kiwi -Version: 10.2.13 +Version: 10.2.16 Provides: kiwi-schema = 8.1 Release: 0 Url: https://github.com/OSInside/kiwi ++++++ PKGBUILD ++++++ --- /var/tmp/diff_new_pack.loeBRq/_old 2025-04-02 17:10:44.634756372 +0200 +++ /var/tmp/diff_new_pack.loeBRq/_new 2025-04-02 17:10:44.638756540 +0200 @@ -3,7 +3,7 @@ pkgname=('python-kiwi' 'kiwi-man-pages' 'dracut-kiwi-lib' 'dracut-kiwi-oem-repart' 'dracut-kiwi-oem-dump' 'dracut-kiwi-live' 'dracut-kiwi-overlay') arch=(x86_64) -pkgver=10.2.13 +pkgver=10.2.16 pkgrel=0 pkgdesc="KIWI - Appliance Builder Next Generation" url="https://github.com/SUSE/kiwi/tarball/master" @@ -12,7 +12,7 @@ provides=(kiwi-ng kiwi) source=("${pkgname}.tar.gz") changelog="${pkgname}.changes" -md5sums=('f697fe20107303d29fb15e11f6731504') +md5sums=('feaeb68e98125362016194d67395c002') build() { ++++++ python-kiwi.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/.bumpversion.cfg new/kiwi-10.2.16/.bumpversion.cfg --- old/kiwi-10.2.13/.bumpversion.cfg 2025-03-03 09:40:13.342291000 +0100 +++ new/kiwi-10.2.16/.bumpversion.cfg 2025-03-25 13:13:00.479159400 +0100 @@ -1,5 +1,5 @@ [bumpversion] -current_version = 10.2.13 +current_version = 10.2.16 commit = True tag = True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/Makefile new/kiwi-10.2.16/Makefile --- old/kiwi-10.2.13/Makefile 2024-11-06 16:22:38.044032000 +0100 +++ new/kiwi-10.2.16/Makefile 2025-03-25 12:25:18.165946700 +0100 @@ -117,6 +117,7 @@ # shell code checks bash -c 'shellcheck -e ${sc_disable} dracut/modules.d/*/*.sh -s bash' bash -c 'shellcheck -e ${sc_disable} kiwi/config/functions.sh -s bash' + bash -c 'shellcheck build-tests.sh' # python flake tests poetry run flake8 --statistics -j auto --count kiwi poetry run flake8 --statistics -j auto --count test/unit @@ -161,15 +162,6 @@ # ci-publish-to-pypi.yml github action poetry build --format=sdist -prepare_for_docs: clean setup - # documentation man pages - poetry run make -C doc man - # documentation github pages, the actual publishing via - # the ci-publish-pages.yml github action - poetry run bash -c 'pushd doc && \ - travis-sphinx --outdir build_gh_pages build --nowarn --source ./source' - bash -c 'touch ./doc/build_gh_pages/.nojekyll' - clean: clean_git_attributes rm -rf dist rm -rf doc/build diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/PKG-INFO new/kiwi-10.2.16/PKG-INFO --- old/kiwi-10.2.13/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/kiwi-10.2.16/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: kiwi -Version: 10.2.13 +Version: 10.2.16 Summary: KIWI - Appliance Builder Home-page: https://osinside.github.io/kiwi/ License: GPL-3.0-or-later @@ -55,6 +55,7 @@ .. |Doc| replace:: `Documentation <https://osinside.github.io/kiwi/>`__ .. |Installation| replace:: `Installation <https://osinside.github.io/kiwi/installation.html>`__ .. |Contributing| replace:: `Contributing <https://osinside.github.io/kiwi/contributing.html>`__ +.. |IntegrationTesting| replace:: `Integration Testing <https://osinside.github.io/kiwi/integration_testing.html>`__ .. |Donate| image:: https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif :target: https://www.paypal.com/donate/?hosted_button_id=CYZY57A7Q4TCC @@ -64,11 +65,14 @@ * |Installation| +* |IntegrationTesting| + * |Contributing| * |Doc| -We'll donate it for good luck so's you're sure to come back :) +KIWI has helped you in your work ? Even the smallest gift is +a way to help that we don't run out of coffee :) |Donate| diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/README.rst new/kiwi-10.2.16/README.rst --- old/kiwi-10.2.13/README.rst 2025-01-10 16:48:19.936212800 +0100 +++ new/kiwi-10.2.16/README.rst 2025-03-24 09:54:33.934329500 +0100 @@ -18,6 +18,7 @@ .. |Doc| replace:: `Documentation <https://osinside.github.io/kiwi/>`__ .. |Installation| replace:: `Installation <https://osinside.github.io/kiwi/installation.html>`__ .. |Contributing| replace:: `Contributing <https://osinside.github.io/kiwi/contributing.html>`__ +.. |IntegrationTesting| replace:: `Integration Testing <https://osinside.github.io/kiwi/integration_testing.html>`__ .. |Donate| image:: https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif :target: https://www.paypal.com/donate/?hosted_button_id=CYZY57A7Q4TCC @@ -27,10 +28,13 @@ * |Installation| +* |IntegrationTesting| + * |Contributing| * |Doc| -We'll donate it for good luck so's you're sure to come back :) +KIWI has helped you in your work ? Even the smallest gift is +a way to help that we don't run out of coffee :) |Donate| diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/build-tests.sh new/kiwi-10.2.16/build-tests.sh --- old/kiwi-10.2.13/build-tests.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/kiwi-10.2.16/build-tests.sh 2025-03-24 09:54:33.934329500 +0100 @@ -0,0 +1,155 @@ +#!/bin/bash +# git clone https://github.com/OSInside/kiwi.git +# Simple build test script to build the integration test +# images from a given test directory. The host to run this +# command requires the following tools: +# +# - tree +# - git +# - xmllint +# - podman +# - pip +# +# And requires the installation of the kiwi box plugin +# +# $ pip install --upgrade kiwi-boxed-plugin +# +set -e + +ARGUMENT_LIST=( + "test-dir:" + "test-name:" + "box-name:" +) + +function usage() { + echo "usage: build-tests --test-dir <dir>" + echo " --test-dir <dir>" + echo " Some test dir name, e.g. build-tests/x86/tumbleweed/" + echo " --test-name <name>" + echo " some test name, e.g. test-image-disk" + echo " --box-name <name>" + echo " name of the box to use for the build, default: universal" +} + +if ! opts=$(getopt \ + --longoptions "$(printf "%s," "${ARGUMENT_LIST[@]}")" \ + --name "$(basename "$0")" \ + --options "" \ + -- "$@" +); then + usage + exit 0 +fi + +eval set --"${opts}" + +while [[ $# -gt 0 ]]; do + case "$1" in + --test-dir) + argTestDir=$2 + shift 2 + ;; + + --test-name) + argTestName=$2 + shift 2 + ;; + + --box-name) + argBoxName=$2 + shift 2 + ;; + + *) + break + ;; + esac +done + +if [ ! "${argTestDir}" ];then + usage + exit 1 +fi + +if [ ! -e "${argTestDir}"/.repos ];then + echo "No .repos information for specified test dir" + exit 1 +fi + +boxname=universal +if [ "${argBoxName}" ];then + boxname="${argBoxName}" +fi + +function create_repo_list() { + local build_dir=$1 + if [ -s "${build_dir}"/.repos ];then + local repo_options="--ignore-repos" + while read -r repo;do + repo_options="${repo_options} --add-repo ${repo}" + done < "${build_dir}"/.repos + echo "${repo_options}" + fi +} + +function create_build_commands() { + local build_dir=$1 + local test_name=$2 + build_commands=() + for image in "${build_dir}"/*;do + test -e "${image}/appliance.kiwi" || continue + test -e "${image}/.skip_boxbuild_container" && continue + base_image=$(basename "${image}") + if [ -n "${test_name}" ] && [ ! "${test_name}" = "${base_image}" ];then + continue + fi + build_command="kiwi-ng --debug" + has_profiles=false + repo_options=$(create_repo_list "${build_dir}") + for profile in $( + xmllint --xpath "//image/profiles/profile/@name" \ + "${image}/appliance.kiwi" 2>/dev/null | cut -f2 -d\" + );do + has_profiles=true + target_dir="build_results/${base_image}/${profile}" + build_command="${build_command} --profile ${profile}" + build_command="${build_command} system boxbuild" + build_command="${build_command} --box ${boxname} --container --" + build_command="${build_command} --description $image" + build_command="${build_command} ${repo_options}" + build_command="${build_command} --target-dir ${target_dir}" + echo "${build_command}" \ + > "build_results/${base_image}-${profile}.build" + build_commands+=( "${build_command}" ) + build_command="kiwi-ng --debug" + done + if [ "${has_profiles}" = "false" ];then + target_dir="build_results/${base_image}" + build_command="${build_command} system boxbuild" + build_command="${build_command} --box ${boxname} --container --" + build_command="${build_command} --description $image" + build_command="${build_command} ${repo_options}" + build_command="${build_command} --target-dir ${target_dir}" + echo "${build_command}" \ + > "build_results/${base_image}.build" + build_commands+=( "${build_command}" ) + fi + done +} + +# create results directory +mkdir -p build_results + +# build command list +create_build_commands "${argTestDir}" "${argTestName}" + +# build them in a row +for build in "${build_commands[@]}";do + ${build} + sudo rm -rf build_results/*/*/build/ + sudo rm -rf build_results/*/build/ +done + +# show result tree +test -d build_results && tree -L 3 build_results diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/doc/source/commands/system_build.rst new/kiwi-10.2.16/doc/source/commands/system_build.rst --- old/kiwi-10.2.13/doc/source/commands/system_build.rst 2025-01-22 11:31:25.115644700 +0100 +++ new/kiwi-10.2.16/doc/source/commands/system_build.rst 2025-03-25 12:25:18.165946700 +0100 @@ -18,9 +18,9 @@ [--clear-cache] [--ignore-repos] [--ignore-repos-used-for-build] - [--set-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck>] + [--set-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype>] [--set-repo-credentials=<user:pass_or_filename>] - [--add-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck>...] + [--add-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype>...] [--add-repo-credentials=<user:pass_or_filename>...] [--add-package=<name>...] [--add-bootstrap-package=<name>...] @@ -66,7 +66,7 @@ Specify package to add (install). The option can be specified multiple times. ---add-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck> +--add-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype> Add a new repository to the existing repository setup in the XML description. This option can be specified multiple times. @@ -120,7 +120,7 @@ Works the same way as `--ignore-repos`, except that repository configuration with the imageonly attribute set to **true** is not ignored. ---set-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck> +--set-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype> Overwrite the first repository entry in the XML description with the provided information: @@ -178,6 +178,15 @@ Set to either **true** or **false** to indicate if the repository should validate the repository signature. + - **repo_sourcetype** + + Specify the source type of the repository path. Supported values + are baseurl, metalink or mirrorlist. With baseurl the source + path is interpreted as simple URI. If metalink is set the source + path is resolved as metalink URI and if mirrorlist is set the + source path is resolved as a mirrorlist file. If not specified, + baseurl is the default + --set-repo-credentials=<user:pass_or_filename> For **uri://user:pass@location** type repositories, set the user and diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/doc/source/commands/system_prepare.rst new/kiwi-10.2.16/doc/source/commands/system_prepare.rst --- old/kiwi-10.2.13/doc/source/commands/system_prepare.rst 2024-10-23 15:41:03.552188000 +0200 +++ new/kiwi-10.2.16/doc/source/commands/system_prepare.rst 2025-03-25 12:25:18.165946700 +0100 @@ -16,9 +16,9 @@ [--clear-cache] [--ignore-repos] [--ignore-repos-used-for-build] - [--set-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck>] + [--set-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype>] [--set-repo-credentials=<user:pass_or_filename>] - [--add-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck>...] + [--add-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype>...] [--add-repo-credentials=<user:pass_or_filename>...] [--add-package=<name>...] [--add-bootstrap-package=<name>...] @@ -66,7 +66,7 @@ Specify a package to add (install). The option can be specified multiple times. ---add-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck> +--add-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype> Add a new repository to the existing repository setup in the XML description. This option can be specified multiple times. @@ -121,7 +121,7 @@ Path to the new root system. ---set-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck> +--set-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype> Overwrite the first repository entry in the XML description with the provided information: @@ -179,6 +179,15 @@ Set to either **true** or **false** to specify if the repository must validate the repository signature. + - **repo_sourcetype** + + Specify the source type of the repository path. Supported values + are baseurl, metalink or mirrorlist. With baseurl the source + path is interpreted as simple URI. If metalink is set the source + path is resolved as metalink URI and if mirrorlist is set the + source path is resolved as a mirrorlist file. If not specified, + baseurl is the default + --set-repo-credentials=<user:pass_or_filename> For **uri://user:pass@location** type repositories, set the user and diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/doc/source/concept_and_workflow/customize_the_boot_process.rst new/kiwi-10.2.16/doc/source/concept_and_workflow/customize_the_boot_process.rst --- old/kiwi-10.2.13/doc/source/concept_and_workflow/customize_the_boot_process.rst 2025-01-31 17:26:06.844227600 +0100 +++ new/kiwi-10.2.16/doc/source/concept_and_workflow/customize_the_boot_process.rst 2025-03-25 08:46:37.636529000 +0100 @@ -227,6 +227,21 @@ for the passphrase if the image has been built with an initial luks passphrase. +``rd.kiwi.oem.luks.reencrypt_randompass`` + For OEM LUKS2 encrypted disk images in combination + with `rd.kiwi.oem.luks.reencrypt`. Reset insecure built time + passphrase, set via the `luks=` attribute, with a random + onetime passphrase that will be stored in memory at + `/run/.kiwi_reencrypt.keyfile`. + + .. warning:: + + The passphrase will only persist as long as the system + does not reboot. Using this option usually requires that + the boot process implements code to set a retrievable keyfile + information for subsequent boot processes of this system, e.g + TPM setup or similar. + ``rd.kiwi.oem.disk.consistency`` For OEM disk images providing an installation image. If set, the installation image will check against all disks that are diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/doc/source/conf.py new/kiwi-10.2.16/doc/source/conf.py --- old/kiwi-10.2.13/doc/source/conf.py 2025-03-03 09:40:13.342291000 +0100 +++ new/kiwi-10.2.16/doc/source/conf.py 2025-03-25 13:13:00.479159400 +0100 @@ -142,7 +142,7 @@ # built documents. # # The short X.Y version. -version = '10.2.13' +version = '10.2.16' # The full version, including alpha/beta/rc tags. release = version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/doc/source/image_description/elements.rst new/kiwi-10.2.16/doc/source/image_description/elements.rst --- old/kiwi-10.2.13/doc/source/image_description/elements.rst 2025-01-31 10:13:33.394405400 +0100 +++ new/kiwi-10.2.16/doc/source/image_description/elements.rst 2025-03-25 08:46:37.640529000 +0100 @@ -1768,7 +1768,7 @@ .. code:: xml - <users> + <users arch="arch"> <user name="user" groups="group_list" @@ -1782,8 +1782,10 @@ </users> The optional users element contains the user setup {kiwi} should create -in the system. At least one user child element must be specified as -part of the users element. Multiple user elements may be specified. +in the system. The optional `arch` attribute can be used to limit the +users setup to the host architecture from which {kiwi} is called. +At least one user child element must be specified as part of the users +element. Multiple user elements may be specified. Each `user` element represents a specific user that is added or modified. The following attributes are mandatory: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/doc/source/index.rst new/kiwi-10.2.16/doc/source/index.rst --- old/kiwi-10.2.13/doc/source/index.rst 2024-12-03 10:15:53.861881300 +0100 +++ new/kiwi-10.2.16/doc/source/index.rst 2025-03-24 09:54:33.954329500 +0100 @@ -27,6 +27,7 @@ building_images working_with_images contributing + integration_testing api .. sidebar:: Links diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/doc/source/integration_testing.rst new/kiwi-10.2.16/doc/source/integration_testing.rst --- old/kiwi-10.2.13/doc/source/integration_testing.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/kiwi-10.2.16/doc/source/integration_testing.rst 2025-03-24 09:54:33.954329500 +0100 @@ -0,0 +1,87 @@ +Building Build Tests +==================== + +{kiwi} provides a collection of integration test images for +different architectures and distributions. The test descriptions +covers a number of appliance features that can be build with {kiwi}. +The test descriptions are stored in a directory structure of the +following layout: `build-tests/ARCH/DISTRIBUTION/test-image-NAME`. +To build integration test image(s), the script `build-tests.sh` +exists. + +The implementation of `build-tests.sh` calls kiwi's `boxbuild` +command in container mode, which allows calling the script on +actually any host system that allows to run container instances +via `podman`. + +.. warning:: **Architectures** + + Cross architecture image building is possible and also supported + via boxbuild, but the performance impact is big even in containers + using qemu-binfmt and even bigger in full qemu arch emulation. + This would slow down building the integration tests a lot and + therefore `build-tests.sh` requires the host architecture to + match with the image target architecture. + +Prior calling `build-tests.sh` the following requirements must be met: + +``Tools`` + + Install the packages providing the following tools: + + * tree + * git + * xmllint + * podman + * pip + +``Source Checkout`` + + Checkout the kiwi git repo which provides the test descriptions + as well as the `build-tests.sh` script + + .. code:: bash + + $ git clone https://github.com/OSInside/kiwi.git + +``kiwi-boxed-plugin`` + + Fetch the kiwi-boxed-plugin from pip. It provides the boxbuild + command used by build-tests.sh + + .. code:: bash + + $ pip install --upgrade kiwi-boxed-plugin + + .. warning:: + + Make sure to be able to execute `kiwi-ng`. In case there was no {kiwi} + installed on your host you will get notified by the kiwi-boxed-plugin + installation to update your path to `export PATH:~/.local/bin/kiwi-ng:$PATH`. + If in doubt about all this just install kiwi from pip too. + `pip install --upgrade kiwi` + +Building a specific integration test can be done as follows: + +.. code:: bash + + $ cd kiwi + $ ./build-tests.sh \ + --test-dir build-tests/x86/tumbleweed/ \ + --test-name test-image-disk + +Building all integration tests for a specific arch and distribution +can be done as follows: + +.. code:: bash + + $ cd kiwi + $ ./build-tests.sh \ + --test-dir build-tests/x86/tumbleweed/ + +.. note:: + + Building all integration tests can take some time and depends + on the number of tests provided as well as on the build power + of the host system. In general the tests can also run in + parallel or distributed to multiple hosts diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/dracut/modules.d/99kiwi-lib/kiwi-luks-lib.sh new/kiwi-10.2.16/dracut/modules.d/99kiwi-lib/kiwi-luks-lib.sh --- old/kiwi-10.2.13/dracut/modules.d/99kiwi-lib/kiwi-luks-lib.sh 2025-01-13 09:25:21.253284000 +0100 +++ new/kiwi-10.2.16/dracut/modules.d/99kiwi-lib/kiwi-luks-lib.sh 2025-03-25 08:46:37.640529000 +0100 @@ -28,6 +28,7 @@ local header_checksum_origin=/root/.luks.header local header_checksum_cur=/root/.luks.header.cur local keyfile=/root/.root.keyfile + local new_keyfile=/run/.kiwi_reencrypt.keyfile local passphrase_file=/root/.slot0 local progress=/dev/install_progress local load_text="Reencrypting..." @@ -35,29 +36,39 @@ local device device=$(get_partition_node_name "${disk}" "${kiwi_RootPart}") read -r header_checksum_origin < "${header_checksum_origin}" - if [ "${kiwi_luks_empty_passphrase}" = "true" ];then - cryptsetup \ - --key-file /dev/zero \ - --keyfile-size 32 \ - luksHeaderBackup "${device}" \ - --header-backup-file "${header_checksum_cur}" - else - cryptsetup \ - --key-file "${keyfile}" \ - luksHeaderBackup "${device}" \ - --header-backup-file "${header_checksum_cur}" - fi + + # Checksum test if luks header is still the image origin header + cryptsetup luksHeaderBackup \ + "${device}" --header-backup-file "${header_checksum_cur}" header_checksum_cur=$( sha256sum "${header_checksum_cur}" |\ cut -f1 -d" "; rm -f "${header_checksum_cur}" ) if [ "${header_checksum_origin}" == "${header_checksum_cur}" ];then + # setup credentials if [ "${kiwi_luks_empty_passphrase}" = "true" ];then echo -n > "${passphrase_file}" + elif [ -e "${keyfile}" ];then + cp "${keyfile}" "${passphrase_file}" else ask_for_credentials "Enter Credentials for Key Slot(0)" get_dialog_result > "${passphrase_file}" fi + if getargbool 0 rd.kiwi.oem.luks.reencrypt_randompass; then + # reset insecure built time passphrase with a random + # onetime passphrase that will be stored in memory at $new_keyfile + # This action require that the boot process uses $new_keyfile + # and sets a retrievable keyfile information for subsequent + # boot processes of this system + tr -dc '[:graph:]' 2>/dev/null < /dev/urandom |\ + head -c 32 > "${new_keyfile}" + cryptsetup \ + --key-file "${passphrase_file}" \ + --key-slot 0 \ + luksChangeKey "${device}" "${new_keyfile}" + cp "${new_keyfile}" "${passphrase_file}" + fi + # reencrypt setup_progress_fifo ${progress} ( # reencrypt slot0, this will wipe all key slots diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/kiwi/command_process.py new/kiwi-10.2.16/kiwi/command_process.py --- old/kiwi-10.2.13/kiwi/command_process.py 2024-05-02 09:12:27.060463700 +0200 +++ new/kiwi-10.2.16/kiwi/command_process.py 2025-03-25 08:46:37.640529000 +0100 @@ -18,6 +18,9 @@ import logging from collections import namedtuple from kiwi.command import CommandCallT +from typing import ( + NamedTuple, List, Callable +) # project from kiwi.utils.codec import Codec @@ -28,6 +31,11 @@ log = logging.getLogger('kiwi') +class PollT(NamedTuple): + stdout_line: str + stderr_line: str + + class CommandProcess: """ **Implements processing of non blocking Command calls** @@ -47,7 +55,8 @@ """ Iterate over process, raise on error and log output """ - for line in self.command: + for lineT in self.command: + line = lineT.stdout_line if line: log.debug('%s: %s', self.log_topic, line) if self.command.get_error_code() != 0: @@ -55,7 +64,10 @@ self.command.get_error_output() ) - def poll_show_progress(self, items_to_complete, match_method): + def poll_show_progress( + self, items_to_complete: List[str], match_method: Callable, + with_stderr: bool = False + ): """ Iterate over process and show progress in percent raise on error and log output @@ -64,12 +76,16 @@ :param function match_method: method matching item """ self._init_progress() - for line in self.command: - if line: - log.debug('%s: %s', self.log_topic, line) - self._update_progress( - match_method, items_to_complete, line - ) + for lineT in self.command: + lines = [lineT.stdout_line] + if with_stderr: + lines.append(lineT.stderr_line) + for line in lines: + if line: + log.debug('%s: %s', self.log_topic, line) + self._update_progress( + match_method, items_to_complete, line + ) self._stop_progress() if self.command.get_error_code() != 0: raise KiwiCommandError( @@ -83,7 +99,8 @@ """ log.info(self.log_topic) log.debug('--------------out start-------------') - for line in self.command: + for lineT in self.command: + line = lineT.stdout_line if line: log.debug(line) log.debug('--------------out stop--------------') @@ -152,11 +169,13 @@ self.command = command self.command_error_output = bytes(b'') self.command_output_line = bytes(b'') + self.command_error_line = bytes(b'') self.output_eof_reached = False self.errors_eof_reached = False - def __next__(self): - line_read = None + def __next__(self) -> PollT: + line_stdout = '' + line_stderr = '' if self.command.process.poll() is not None: if self.output_eof_reached and self.errors_eof_reached: raise StopIteration() @@ -166,7 +185,7 @@ if not byte_read: self.output_eof_reached = True elif byte_read == bytes(b'\n'): - line_read = Codec.decode(self.command_output_line) + line_stdout = Codec.decode(self.command_output_line) self.command_output_line = bytes(b'') else: self.command_output_line += byte_read @@ -175,10 +194,17 @@ byte_read = self.command.error.read(1) if not byte_read: self.errors_eof_reached = True + elif byte_read == bytes(b'\n'): + line_stderr = Codec.decode(self.command_error_line) + self.command_error_line = bytes(b'') else: + self.command_error_line += byte_read self.command_error_output += byte_read - return line_read + return PollT( + stdout_line=line_stdout, + stderr_line=line_stderr + ) def get_error_output(self): """ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/kiwi/package_manager/dnf5.py new/kiwi-10.2.16/kiwi/package_manager/dnf5.py --- old/kiwi-10.2.13/kiwi/package_manager/dnf5.py 2024-07-23 10:47:16.790534700 +0200 +++ new/kiwi-10.2.16/kiwi/package_manager/dnf5.py 2025-03-25 08:46:37.640529000 +0100 @@ -308,7 +308,7 @@ """ return bool( re.match( - '.*Installing.*: {0}.*'.format(re.escape(package_name)), + '.*Installing.* {0}.*'.format(re.escape(package_name)), package_manager_output ) ) @@ -328,7 +328,7 @@ """ return bool( re.match( - '.*Removing.*: {0}.*'.format(re.escape(package_name)), + '.*Removing.* {0}.*'.format(re.escape(package_name)), package_manager_output ) ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/kiwi/schema/kiwi.rnc new/kiwi-10.2.16/kiwi/schema/kiwi.rnc --- old/kiwi-10.2.13/kiwi/schema/kiwi.rnc 2025-01-13 11:55:36.450284000 +0100 +++ new/kiwi-10.2.16/kiwi/schema/kiwi.rnc 2025-03-25 08:46:37.640529000 +0100 @@ -3806,7 +3806,9 @@ # div { k.users.profiles.attribute = k.profiles.attribute + k.users.arch.attribute = k.arch.attribute k.users.attlist = + k.users.arch.attribute? & k.users.profiles.attribute? k.users = ## A List of Users diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/kiwi/schema/kiwi.rng new/kiwi-10.2.16/kiwi/schema/kiwi.rng --- old/kiwi-10.2.13/kiwi/schema/kiwi.rng 2025-01-13 11:55:36.454284000 +0100 +++ new/kiwi-10.2.16/kiwi/schema/kiwi.rng 2025-03-25 08:46:37.640529000 +0100 @@ -5773,10 +5773,18 @@ <define name="k.users.profiles.attribute"> <ref name="k.profiles.attribute"/> </define> + <define name="k.users.arch.attribute"> + <ref name="k.arch.attribute"/> + </define> <define name="k.users.attlist"> - <optional> - <ref name="k.users.profiles.attribute"/> - </optional> + <interleave> + <optional> + <ref name="k.users.arch.attribute"/> + </optional> + <optional> + <ref name="k.users.profiles.attribute"/> + </optional> + </interleave> </define> <define name="k.users"> <element name="users"> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/kiwi/system/prepare.py new/kiwi-10.2.16/kiwi/system/prepare.py --- old/kiwi-10.2.13/kiwi/system/prepare.py 2024-11-26 09:56:42.804391900 +0100 +++ new/kiwi-10.2.16/kiwi/system/prepare.py 2025-03-25 08:46:37.640529000 +0100 @@ -254,6 +254,7 @@ bootstrap_archives = self.xml_state.get_bootstrap_archives() bootstrap_archives_target_dirs = self.xml_state.get_bootstrap_archives_target_dirs() bootstrap_packages_ignored = self.xml_state.get_bootstrap_ignore_packages() + package_manager = self.xml_state.get_package_manager() # process package installations if collection_type == 'onlyRequired': manager.process_only_required() @@ -279,7 +280,8 @@ items_to_complete=all_install_items, match_method=process.create_match_method( manager.match_package_installed - ) + ), + with_stderr=True if package_manager == 'dnf5' else False ) except Exception as issue: if manager.has_failed(process.returncode()): @@ -331,6 +333,7 @@ system_archives = self.xml_state.get_system_archives() system_archives_target_dirs = self.xml_state.get_system_archives_target_dirs() system_packages_ignored = self.xml_state.get_system_ignore_packages() + package_manager = self.xml_state.get_package_manager() # process package installations if collection_type == 'onlyRequired': manager.process_only_required() @@ -352,7 +355,8 @@ items_to_complete=all_install_items, match_method=process.create_match_method( manager.match_package_installed - ) + ), + with_stderr=True if package_manager == 'dnf5' else False ) except Exception as issue: if manager.has_failed(process.returncode()): @@ -447,6 +451,7 @@ :raises KiwiSystemInstallPackagesFailed: if installation process fails """ log.info('Installing system packages (chroot)') + package_manager = self.xml_state.get_package_manager() all_install_items = self._setup_requests( manager, packages ) @@ -459,7 +464,8 @@ items_to_complete=all_install_items, match_method=process.create_match_method( manager.match_package_installed - ) + ), + with_stderr=True if package_manager == 'dnf5' else False ) except Exception as issue: raise KiwiSystemInstallPackagesFailed( @@ -484,6 +490,7 @@ :raises KiwiSystemDeletePackagesFailed: if installation process fails """ + package_manager = self.xml_state.get_package_manager() all_delete_items = self._setup_requests( manager, packages ) @@ -502,7 +509,8 @@ items_to_complete=all_delete_items, match_method=process.create_match_method( manager.match_package_deleted - ) + ), + with_stderr=True if package_manager == 'dnf5' else False ) manager.post_process_delete_requests(self.root_bind) except Exception as issue: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/kiwi/tasks/base.py new/kiwi-10.2.16/kiwi/tasks/base.py --- old/kiwi-10.2.13/kiwi/tasks/base.py 2024-11-06 16:22:38.076032000 +0100 +++ new/kiwi-10.2.16/kiwi/tasks/base.py 2025-03-25 12:25:18.169947000 +0100 @@ -222,12 +222,12 @@ """ return self._ntuple_token(option, 4) - def tentuple_token( + def eleventuple_token( self, option: str ) -> List[Union[bool, str, List[str], None]]: """ Helper method for commandline options of the - form --option a,b,c,d,e,f,g,h,i,j + form --option a,b,c,d,e,f,g,h,i,j,k Make sure to provide a common result for option values which separates the information in a comma separated list of values @@ -238,7 +238,7 @@ :rtype: list """ - return self._ntuple_token(option, 10) + return self._ntuple_token(option, 11) def attr_token( self, option: str diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/kiwi/tasks/system_build.py new/kiwi-10.2.16/kiwi/tasks/system_build.py --- old/kiwi-10.2.13/kiwi/tasks/system_build.py 2024-12-02 09:27:14.228290800 +0100 +++ new/kiwi-10.2.16/kiwi/tasks/system_build.py 2025-03-25 12:25:18.169947000 +0100 @@ -22,9 +22,9 @@ [--clear-cache] [--ignore-repos] [--ignore-repos-used-for-build] - [--set-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck>] + [--set-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype>] [--set-repo-credentials=<user:pass_or_filename>] - [--add-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck>...] + [--add-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype>...] [--add-repo-credentials=<user:pass_or_filename>...] [--add-package=<name>...] [--add-bootstrap-package=<name>...] @@ -54,8 +54,8 @@ priority, imageinclude(true|false), package_gpgcheck(true|false), list of signing_keys enclosed in curly brackets delimited by a colon, component list for debian based repos as string delimited by a space, - main distribution name for debian based repos and - repo_gpgcheck(true|false) + main distribution name for debian based repos, + repo_gpgcheck(true|false) and repo_sourcetype(metalink|baseurl|mirrorlist) --add-repo-credentials=<user:pass_or_filename> for uri://user:pass@location type repositories, set the user and password connected with an add-repo specification. The first @@ -94,13 +94,13 @@ add a container label in the container configuration metadata. It overwrites the label with the provided key-value pair in case it was already defined in the XML description - --set-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck> + --set-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype> overwrite the first XML listed repository source, type, alias, priority, imageinclude(true|false), package_gpgcheck(true|false), list of signing_keys enclosed in curly brackets delimited by a colon, component list for debian based repos as string delimited by a space, - main distribution name for debian based repos and - repo_gpgcheck(true|false) + main distribution name for debian based repos, + repo_gpgcheck(true|false) and repo_sourcetype(metalink|baseurl|mirrorlist) --set-repo-credentials=<user:pass_or_filename> for uri://user:pass@location type repositories, set the user and password connected to the set-repo specification. If the provided @@ -366,7 +366,7 @@ return self.manual def _get_repo_parameters(self, tokens, credentials): - parameters = self.tentuple_token(tokens) + parameters = self.eleventuple_token(tokens) signing_keys_index = 6 repo_source_index = 0 if not parameters[signing_keys_index]: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/kiwi/tasks/system_prepare.py new/kiwi-10.2.16/kiwi/tasks/system_prepare.py --- old/kiwi-10.2.13/kiwi/tasks/system_prepare.py 2024-12-02 09:27:14.228290800 +0100 +++ new/kiwi-10.2.16/kiwi/tasks/system_prepare.py 2025-03-25 12:25:18.169947000 +0100 @@ -22,9 +22,9 @@ [--clear-cache] [--ignore-repos] [--ignore-repos-used-for-build] - [--set-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck>] + [--set-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype>] [--set-repo-credentials=<user:pass_or_filename>] - [--add-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck>...] + [--add-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype>...] [--add-repo-credentials=<user:pass_or_filename>...] [--add-package=<name>...] [--add-bootstrap-package=<name>...] @@ -48,13 +48,13 @@ install the given package name as part of the early bootstrap process --add-package=<name> install the given package name - --add-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck> + --add-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype> add repository with given source, type, alias, priority, imageinclude(true|false), package_gpgcheck(true|false), list of signing_keys enclosed in curly brackets delimited by a colon, component list for debian based repos as string delimited by a space, - main distribution name for debian based repos and - repo_gpgcheck(true|false) + main distribution name for debian based repos, + repo_gpgcheck(true|false) and repo_sourcetype(metalink|baseurl|mirrorlist) --add-repo-credentials=<user:pass_or_filename> for uri://user:pass@location type repositories, set the user and password connected with an add-repo specification. The first @@ -94,13 +94,13 @@ add a container label in the container configuration metadata. It overwrites the label with the provided key-value pair in case it was already defined in the XML description - --set-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck> + --set-repo=<source,type,alias,priority,imageinclude,package_gpgcheck,{signing_keys},components,distribution,repo_gpgcheck,repo_sourcetype> overwrite the first XML listed repository source, type, alias, priority, imageinclude(true|false), package_gpgcheck(true|false), list of signing_keys enclosed in curly brackets delimited by a colon, component list for debian based repos as string delimited by a space, - main distribution name for debian based repos and - repo_gpgcheck(true|false) + main distribution name for debian based repos, + repo_gpgcheck(true|false) and repo_sourcetype(metalink|baseurl|mirrorlist) --set-repo-credentials=<user:pass_or_filename> for uri://user:pass@location type repositories, set the user and password connected to the set-repo specification. If the provided @@ -326,7 +326,7 @@ return self.manual def _get_repo_parameters(self, tokens, credentials): - parameters = self.tentuple_token(tokens) + parameters = self.eleventuple_token(tokens) signing_keys_index = 6 repo_source_index = 0 if not parameters[signing_keys_index]: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/kiwi/version.py new/kiwi-10.2.16/kiwi/version.py --- old/kiwi-10.2.13/kiwi/version.py 2025-03-03 09:40:13.342291000 +0100 +++ new/kiwi-10.2.16/kiwi/version.py 2025-03-25 13:13:00.479159400 +0100 @@ -18,5 +18,5 @@ """ Global version information used in kiwi and the package """ -__version__ = '10.2.13' +__version__ = '10.2.16' __githash__ = '$Format:%H$' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/kiwi/xml_parse.py new/kiwi-10.2.16/kiwi/xml_parse.py --- old/kiwi-10.2.13/kiwi/xml_parse.py 2025-01-13 11:55:36.454284000 +0100 +++ new/kiwi-10.2.16/kiwi/xml_parse.py 2025-03-25 08:46:37.644528900 +0100 @@ -3,7 +3,7 @@ # # Generated by generateDS.py version 2.29.24. -# Python 3.11.10 (main, Sep 18 2024, 22:13:39) [GCC] +# Python 3.11.10 (main, Sep 18 2024, 22:14:32) [GCC] # # Command line options: # ('-f', '') @@ -9959,8 +9959,9 @@ """A List of Users""" subclass = None superclass = None - def __init__(self, profiles=None, user=None): + def __init__(self, arch=None, profiles=None, user=None): self.original_tagname_ = None + self.arch = _cast(None, arch) self.profiles = _cast(None, profiles) if user is None: self.user = [] @@ -9982,8 +9983,17 @@ def add_user(self, value): self.user.append(value) def insert_user_at(self, index, value): self.user.insert(index, value) def replace_user_at(self, index, value): self.user[index] = value + def get_arch(self): return self.arch + def set_arch(self, arch): self.arch = arch def get_profiles(self): return self.profiles def set_profiles(self, profiles): self.profiles = profiles + def validate_arch_name(self, value): + # Validate type arch-name, a restriction on xs:token. + if value is not None and Validate_simpletypes_: + if not self.gds_validate_simple_patterns( + self.validate_arch_name_patterns_, value): + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_arch_name_patterns_, )) + validate_arch_name_patterns_ = [['^.*$']] def hasContent_(self): if ( self.user @@ -10013,6 +10023,9 @@ else: outfile.write('/>%s' % (eol_, )) def exportAttributes(self, outfile, level, already_processed, namespaceprefix_='', name_='users'): + if self.arch is not None and 'arch' not in already_processed: + already_processed.add('arch') + outfile.write(' arch=%s' % (quote_attrib(self.arch), )) if self.profiles is not None and 'profiles' not in already_processed: already_processed.add('profiles') outfile.write(' profiles=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.profiles), input_name='profiles')), )) @@ -10031,6 +10044,12 @@ self.buildChildren(child, node, nodeName_) return self def buildAttributes(self, node, attrs, already_processed): + value = find_attr_value_('arch', node) + if value is not None and 'arch' not in already_processed: + already_processed.add('arch') + self.arch = value + self.arch = ' '.join(self.arch.split()) + self.validate_arch_name(self.arch) # validate type arch-name value = find_attr_value_('profiles', node) if value is not None and 'profiles' not in already_processed: already_processed.add('profiles') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/kiwi/xml_state.py new/kiwi-10.2.16/kiwi/xml_state.py --- old/kiwi-10.2.13/kiwi/xml_state.py 2024-12-13 10:49:07.827565000 +0100 +++ new/kiwi-10.2.16/kiwi/xml_state.py 2025-03-25 12:14:00.286598200 +0100 @@ -157,9 +157,11 @@ :rtype: list """ - return self._profiled( - self.xml_data.get_users() - ) + users = [] + for users_section in self._profiled(self.xml_data.get_users()): + if self.users_matches_host_architecture(users_section): + users.append(users_section) + return users def get_build_type_bundle_format(self) -> str: """ @@ -407,6 +409,22 @@ """ return self._section_matches_host_architecture(package) + def users_matches_host_architecture(self, users: Any) -> bool: + """ + Tests if the given users section is applicable for the current host + architecture. If no architecture is specified within the section + it is considered as a match returning True. + + Note: The XML section pointer must provide an arch attribute + + :param section: XML section object + + :return: True or False + + :rtype: bool + """ + return self._section_matches_host_architecture(users) + def collection_matches_host_architecture(self, collection: Any) -> bool: """ Tests if the given namedcollection section is applicable for @@ -2290,7 +2308,8 @@ repo_prio: str, repo_imageinclude: bool = False, repo_package_gpgcheck: Optional[bool] = None, repo_signing_keys: List[str] = [], components: str = None, - distribution: str = None, repo_gpgcheck: Optional[bool] = None + distribution: str = None, repo_gpgcheck: Optional[bool] = None, + repo_sourcetype: str = None ) -> None: """ Overwrite repository data of the first repository @@ -2331,13 +2350,16 @@ repository.set_distribution(distribution) if repo_gpgcheck is not None: repository.set_repository_gpgcheck(repo_gpgcheck) + if repo_sourcetype: + repository.set_sourcetype(repo_sourcetype) def add_repository( self, repo_source: str, repo_type: str, repo_alias: str = None, repo_prio: str = '', repo_imageinclude: bool = False, repo_package_gpgcheck: Optional[bool] = None, repo_signing_keys: List[str] = [], components: str = None, - distribution: str = None, repo_gpgcheck: Optional[bool] = None + distribution: str = None, repo_gpgcheck: Optional[bool] = None, + repo_sourcetype: str = None ) -> None: """ Add a new repository section at the end of the list @@ -2374,7 +2396,8 @@ package_gpgcheck=repo_package_gpgcheck, repository_gpgcheck=repo_gpgcheck, components=components, - distribution=distribution + distribution=distribution, + sourcetype=repo_sourcetype ) ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/package/python-kiwi-spec-template new/kiwi-10.2.16/package/python-kiwi-spec-template --- old/kiwi-10.2.13/package/python-kiwi-spec-template 2024-11-06 16:22:38.080032000 +0100 +++ new/kiwi-10.2.16/package/python-kiwi-spec-template 2025-03-25 12:25:18.169947000 +0100 @@ -29,7 +29,11 @@ %endif %if %{undefined python3_sitelib} +%if "%{_vendor}" == "debbuild" %global python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") +%else +%global python3_sitelib %(%{__python3} -c "import sysconfig; print(sysconfig.get_path('platlib'))") +%endif %endif %if %{undefined python3_version} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/pyproject.toml new/kiwi-10.2.16/pyproject.toml --- old/kiwi-10.2.13/pyproject.toml 2025-03-03 09:40:13.342291000 +0100 +++ new/kiwi-10.2.16/pyproject.toml 2025-03-25 13:13:00.479159400 +0100 @@ -1,6 +1,6 @@ [tool.poetry] name = "kiwi" -version = "10.2.13" +version = "10.2.16" description = "KIWI - Appliance Builder" license = "GPL-3.0-or-later" readme = "README.rst" @@ -31,6 +31,7 @@ { path = "dracut", format = "sdist" }, { path = "helper", format = "sdist" }, { path = "kiwi.yml", format = "sdist" }, + { path = "build-tests.sh", format = "sdist" }, { path = "Makefile", format = "sdist" }, { path = "package", format = "sdist" }, { path = "test", format = "sdist" }, @@ -105,7 +106,6 @@ sphinx_rtd_theme = "*" sphinxcontrib-spelling = "*" pyenchant = "*" -travis-sphinx = "*" ghp-import = "*" [tool.poetry.group.development] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/test/unit/command_process_test.py new/kiwi-10.2.16/test/unit/command_process_test.py --- old/kiwi-10.2.13/test/unit/command_process_test.py 2024-05-02 09:12:27.108463500 +0200 +++ new/kiwi-10.2.16/test/unit/command_process_test.py 2025-03-25 08:46:37.648529000 +0100 @@ -7,8 +7,10 @@ ) from builtins import bytes -from kiwi.command_process import CommandProcess -from kiwi.command_process import CommandIterator +from kiwi.command_process import ( + CommandProcess, + CommandIterator +) from kiwi.exceptions import KiwiCommandError @@ -42,13 +44,13 @@ return create_method def setup(self): - self.data_flow = [True, None, None, None, None, None, None] + self.data_flow = [True, None, None, None, None, None, None, None] self.data_out = [ - bytes(b''), bytes(b'\n'), bytes(b'a'), + bytes(b''), bytes(b''), bytes(b'\n'), bytes(b'a'), bytes(b't'), bytes(b'a'), bytes(b'd') ] self.data_err = [ - bytes(b''), bytes(b'r'), bytes(b'o'), + bytes(b''), bytes(b'\n'), bytes(b'r'), bytes(b'o'), bytes(b'r'), bytes(b'r'), bytes(b'e') ] self.flow = self.create_flow_method(self.poll) @@ -80,7 +82,7 @@ process.command.command.error.read = self.flow_err process.command.command.process.returncode = 0 with self._caplog.at_level(logging.DEBUG): - process.poll_show_progress(['a', 'b'], match_method) + process.poll_show_progress(['a', 'b'], match_method, True) assert 'system: data' in self._caplog.text @patch('kiwi.command.Command') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/test/unit/tasks/base_test.py new/kiwi-10.2.16/test/unit/tasks/base_test.py --- old/kiwi-10.2.13/test/unit/tasks/base_test.py 2024-11-06 16:22:38.092032000 +0100 +++ new/kiwi-10.2.16/test/unit/tasks/base_test.py 2025-03-25 12:25:18.169947000 +0100 @@ -148,16 +148,16 @@ def test_quadruple_token(self): assert self.task.quadruple_token('a,b') == ['a', 'b', None, None] - def test_tentuple_token(self): - assert self.task.tentuple_token( - 'a,b,,d,e,f,{1;2;3},x y z,jammy,false' + def test_eleventuple_token(self): + assert self.task.eleventuple_token( + 'a,b,,d,e,f,{1;2;3},x y z,jammy,false,metalink' ) == [ 'a', 'b', '', 'd', 'e', 'f', ['1', '2', '3'], 'x y z', - 'jammy', False + 'jammy', False, 'metalink' ] - assert self.task.tentuple_token('a,b,,d,e,f,{1;2;3}') == [ + assert self.task.eleventuple_token('a,b,,d,e,f,{1;2;3}') == [ 'a', 'b', '', 'd', 'e', 'f', ['1', '2', '3'], - None, None, None + None, None, None, None ] def test_attr_token(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/test/unit/tasks/system_build_test.py new/kiwi-10.2.16/test/unit/tasks/system_build_test.py --- old/kiwi-10.2.13/test/unit/tasks/system_build_test.py 2024-12-02 09:27:14.232290700 +0100 +++ new/kiwi-10.2.16/test/unit/tasks/system_build_test.py 2025-03-25 12:14:00.286598200 +0100 @@ -342,14 +342,14 @@ self.task.process() mock_set_repo.assert_called_once_with( 'http://example.com', 'yast2', 'alias', - None, None, None, [], None, None, None + None, None, None, [], None, None, None, None ) self.task.command_args['--set-repo-credentials'] = 'user:pass' mock_set_repo.reset_mock() self.task.process() mock_set_repo.assert_called_once_with( 'http://user:p...@example.com', 'yast2', 'alias', - None, None, None, [], None, None, None + None, None, None, [], None, None, None, None ) self.task.command_args['--set-repo-credentials'] = '../data/credentials' mock_os_path_is_file.return_value = True @@ -357,7 +357,7 @@ self.task.process() mock_set_repo.assert_called_once_with( 'http://user:p...@example.com', 'yast2', 'alias', - None, None, None, [], None, None, None + None, None, None, [], None, None, None, None ) mock_os_unlink.assert_called_once_with('../data/credentials') @@ -377,15 +377,15 @@ assert mock_add_repo.call_args_list == [ call( 'http://example1.com', 'yast2', 'alias', '99', - False, True, [], None, None, None + False, True, [], None, None, None, None ), call( 'http://example2.com', 'yast2', 'alias', '99', - False, True, [], None, None, None + False, True, [], None, None, None, None ), call( 'http://example3.com', 'yast2', 'alias', '99', - False, True, [], None, None, None + False, True, [], None, None, None, None ) ] self.task.command_args['--add-repo-credentials'] = [ @@ -397,15 +397,15 @@ assert mock_add_repo.call_args_list == [ call( 'http://user1:pa...@example1.com', 'yast2', 'alias', '99', - False, True, [], None, None, None + False, True, [], None, None, None, None ), call( 'http://user2:pa...@example2.com', 'yast2', 'alias', '99', - False, True, [], None, None, None + False, True, [], None, None, None, None ), call( 'http://example3.com', 'yast2', 'alias', '99', - False, True, [], None, None, None + False, True, [], None, None, None, None ) ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/test/unit/tasks/system_prepare_test.py new/kiwi-10.2.16/test/unit/tasks/system_prepare_test.py --- old/kiwi-10.2.13/test/unit/tasks/system_prepare_test.py 2024-12-02 09:27:14.232290700 +0100 +++ new/kiwi-10.2.16/test/unit/tasks/system_prepare_test.py 2025-03-25 12:14:00.286598200 +0100 @@ -309,18 +309,23 @@ ): mock_os_path_is_file.return_value = False self._init_command_args() - self.task.command_args['--set-repo'] = 'http://example.com,yast2,alias' + self.task.command_args['--set-repo'] = \ + 'http://example.com,yast2,alias,prio,imageinclude,' + \ + 'package_gpgcheck,{file:///key.asc},components,dist,' + \ + 'repo_gpgcheck,repo_sourcetype' self.task.process() mock_set_repo.assert_called_once_with( 'http://example.com', 'yast2', 'alias', - None, None, None, [], None, None, None + 'prio', 'imageinclude', 'package_gpgcheck', ['file:///key.asc'], + 'components', 'dist', 'repo_gpgcheck', 'repo_sourcetype' ) self.task.command_args['--set-repo-credentials'] = 'user:pass' mock_set_repo.reset_mock() self.task.process() mock_set_repo.assert_called_once_with( 'http://user:p...@example.com', 'yast2', 'alias', - None, None, None, [], None, None, None + 'prio', 'imageinclude', 'package_gpgcheck', ['file:///key.asc'], + 'components', 'dist', 'repo_gpgcheck', 'repo_sourcetype' ) self.task.command_args['--set-repo-credentials'] = '../data/credentials' mock_os_path_is_file.return_value = True @@ -328,7 +333,8 @@ self.task.process() mock_set_repo.assert_called_once_with( 'http://user:p...@example.com', 'yast2', 'alias', - None, None, None, [], None, None, None + 'prio', 'imageinclude', 'package_gpgcheck', ['file:///key.asc'], + 'components', 'dist', 'repo_gpgcheck', 'repo_sourcetype' ) mock_os_unlink.assert_called_once_with('../data/credentials') @@ -347,15 +353,15 @@ assert mock_add_repo.call_args_list == [ call( 'http://example1.com', 'yast2', 'alias', '99', - True, None, [], None, None, None + True, None, [], None, None, None, None ), call( 'http://example2.com', 'yast2', 'alias', '99', - False, True, [], None, None, None + False, True, [], None, None, None, None ), call( 'http://example3.com', 'yast2', 'alias', '99', - False, True, [], None, None, None + False, True, [], None, None, None, None ) ] self.task.command_args['--add-repo-credentials'] = [ @@ -367,15 +373,15 @@ assert mock_add_repo.call_args_list == [ call( 'http://user1:pa...@example1.com', 'yast2', 'alias', '99', - True, None, [], None, None, None + True, None, [], None, None, None, None ), call( 'http://user2:pa...@example2.com', 'yast2', 'alias', '99', - False, True, [], None, None, None + False, True, [], None, None, None, None ), call( 'http://example3.com', 'yast2', 'alias', '99', - False, True, [], None, None, None + False, True, [], None, None, None, None ) ] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-10.2.13/test/unit/xml_state_test.py new/kiwi-10.2.16/test/unit/xml_state_test.py --- old/kiwi-10.2.13/test/unit/xml_state_test.py 2024-12-13 10:49:07.827565000 +0100 +++ new/kiwi-10.2.16/test/unit/xml_state_test.py 2025-03-25 12:14:00.286598200 +0100 @@ -250,7 +250,7 @@ def test_set_repository(self): self.state.set_repository( 'repo', 'type', 'alias', 1, True, False, ['key_a', 'key_b'], - 'main universe', 'jammy', False + 'main universe', 'jammy', False, 'metalink' ) assert self.state.xml_data.get_repository()[0].get_source().get_path() \ == 'repo' @@ -271,11 +271,13 @@ == 'jammy' assert self.state.xml_data.get_repository()[0] \ .get_repository_gpgcheck() is False + assert self.state.xml_data.get_repository()[0] \ + .get_sourcetype() == 'metalink' def test_add_repository(self): self.state.add_repository( 'repo', 'type', 'alias', 1, True, None, ['key_a', 'key_b'], - 'main universe', 'jammy', False + 'main universe', 'jammy', False, 'metalink' ) assert self.state.xml_data.get_repository()[3].get_source().get_path() \ == 'repo' @@ -294,6 +296,8 @@ == 'jammy' assert self.state.xml_data.get_repository()[3] \ .get_repository_gpgcheck() is False + assert self.state.xml_data.get_repository()[3] \ + .get_sourcetype() == 'metalink' def test_add_repository_with_empty_values(self): self.state.add_repository('repo', 'type', '', '', True) @@ -304,6 +308,8 @@ assert self.state.xml_data.get_repository()[3].get_priority() is None assert self.state.xml_data.get_repository()[3] \ .get_imageinclude() is True + assert self.state.xml_data.get_repository()[3] \ + .get_sourcetype() is None def test_get_to_become_deleted_packages(self): assert self.state.get_to_become_deleted_packages() == [