Hello community, here is the log from the commit of package python-kiwi for openSUSE:Factory checked in at 2020-02-19 12:39:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-kiwi (Old) and /work/SRC/openSUSE:Factory/.python-kiwi.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-kiwi" Wed Feb 19 12:39:32 2020 rev:56 rq:774133 version:9.19.16 Changes: -------- --- /work/SRC/openSUSE:Factory/python-kiwi/python-kiwi.changes 2020-01-19 20:51:06.131850578 +0100 +++ /work/SRC/openSUSE:Factory/.python-kiwi.new.26092/python-kiwi.changes 2020-02-19 12:39:40.427524503 +0100 @@ -1,0 +2,213 @@ +Thu Feb 06 10:07:45 CET 2020 - Marcus Schäfer <[email protected]> + +- Bump version: 9.19.15 → 9.19.16 + +------------------------------------------------------------------- +Wed Feb 05 17:11:07 CET 2020 - Marcus Schäfer <[email protected]> + +- Deleted distro provided login.defs from overlay + +------------------------------------------------------------------- +Wed Feb 05 12:11:43 CET 2020 - Marcus Schäfer <[email protected]> + +- Delete use of methods that are done by the builder + +------------------------------------------------------------------- +Tue Feb 04 09:18:11 CET 2020 - Marcus Schäfer <[email protected]> + +- Deleted obsolete ifplugd from arm build test + +------------------------------------------------------------------- +Mon Feb 03 10:20:40 CET 2020 - Marcus Schäfer <[email protected]> + +- Deleted obsolete ifplugd from s390 build test + +------------------------------------------------------------------- +Mon Feb 03 10:17:32 CET 2020 - Marcus Schäfer <[email protected]> + +- Update status helper script + + Also show new ppc integration test builds + +------------------------------------------------------------------- +Mon Feb 03 10:06:32 CET 2020 - Marcus Schäfer <[email protected]> + +- 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 + +------------------------------------------------------------------- +Sun Feb 02 20:23:00 CET 2020 - Marcus Schäfer <[email protected]> + +- 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 + +------------------------------------------------------------------- +Sun Feb 02 20:13:35 CET 2020 - Marcus Schäfer <[email protected]> + +- Bump version: 9.19.14 → 9.19.15 + +------------------------------------------------------------------- +Wed Jan 29 14:49:03 CET 2020 - Neal Gompa <[email protected]> + +- 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 + AppStreams/modules (such as Red Hat Enterprise Linux/CentOS 8) + in an Open Build Service system, the repository metadata associated + with modules is not present as OBS does not generate it. + + This causes the image build to fail because the normal module + content filtering rules make it so that modular RPMs are disabled + unless there is module metadata in the repository that identifies + them and that the module has been configured to be enabled. + + As it is not possible for us to satisfy those conditions, instead + we disable modular filtering entirely when we detect that the image + build is occurring inside the build service, as we are reasonably + certain that OBS will not give us bad or broken package sets. + +------------------------------------------------------------------- +Tue Jan 28 09:41:25 CET 2020 - Marcus Schäfer <[email protected]> + +- Fixed ppc kernel lookup + + On power the kernel is named e.g vmlinux-4.12.14-197.29-default + kiwi was missing that name match. Related to Issue #1325 + +------------------------------------------------------------------- +Mon Jan 27 17:11:36 CET 2020 - Marcus Schäfer <[email protected]> + +- Fixed sat solver flags validation + + The sat library from the python3-solv plugin does not expose + the flags information as method. Instead the flags value is + a variable pointing to an integer that has a name mapping + in self.solv.Selection from the library. + +------------------------------------------------------------------- +Fri Jan 24 10:18:51 CET 2020 - Marcus Schäfer <[email protected]> + +- Bump version: 9.19.13 → 9.19.14 + +------------------------------------------------------------------- +Wed Jan 22 13:32:10 CET 2020 - David Cassany <[email protected]> + +- Make use of Path.which including root_dir parameter + + This commit refactors the use of Path.which in several parts of the + code. Since dd4d2ed78 the Path utility is capable to run Path.which + on certain chroot env, thus no need to adapt the PATH environment + variable. + + Fixes #1281 + +------------------------------------------------------------------- +Tue Jan 21 11:09:56 CET 2020 - Marcus Schäfer <[email protected]> + +- Make PXE oem deployment genericly useable + + When deploying a disk image via PXE the initrd contained a config + file which connects it to a certain image. This has the disadvantage + that no other image could be deployed with it. This commit changes the + deployment code in a way that the config file is read from the + network if the disk is deployed via PXE. The tarball created by + kiwi provides the image connected config file but users now have + the opportunity to create their own boot configurations which allows + deployment of different images with the same kiwi built deployment + initrd. This Fixes #1298 and is one first step into a more generic + PXE support offered by kiwi. + +------------------------------------------------------------------- +Mon Jan 20 16:50:38 CET 2020 - Marcus Schäfer <[email protected]> + +- Bump version: 9.19.12 → 9.19.13 + +------------------------------------------------------------------- +Mon Jan 20 16:17:24 CET 2020 - David Cassany <[email protected]> + +- Remove RootBind.move_to_root method + + This commit removes the RootBind.move_to_root method as this can all be + done by using the Path.move_to_root utility method. This allows + to drop the RootBind attribute in PackageManager classes and focus + path manipulation methods into a common utility. + + Related to #1281 + +------------------------------------------------------------------- +Mon Jan 20 15:49:39 CET 2020 - Marcus Schäfer <[email protected]> + +- Bump version: 9.19.11 → 9.19.12 + +------------------------------------------------------------------- +Mon Jan 20 11:30:14 CET 2020 - Marcus Schäfer <[email protected]> + +- Fixed custom args check + + If a custom argument exists in the dictionary but has no value + it should be treated as not set and initialized empty as intended + +------------------------------------------------------------------- +Fri Jan 17 15:10:54 CET 2020 - Marcus Schäfer <[email protected]> + +- Fixed order of fstab entries + + If a volume manager is used the volumes are added before the + root filesystem(/) entry in fstab. This does not hurt because + at boot time systemd manages the mounting of the rootfs prior + to any other information in the fstab file but it's conceptually + broken. Users justifiably can expect the fstab entries in the + correct order such that mounting from top to bottom leads + to a consistent root filesystem state. + +------------------------------------------------------------------- +Fri Jan 17 10:40:30 CET 2020 - Marcus Schäfer <[email protected]> + +- Bump version: 9.19.10 → 9.19.11 + +------------------------------------------------------------------- +Wed Jan 15 16:02:51 CET 2020 - Marcus Schäfer <[email protected]> + +- Added support for spare partition fs attributes + + Added new type attribute: + + ```xml + <type ... spare_part_fs_attributes="..."/> + ``` + + which can be a comma separated list of the following currently + supported filesystem attributes: + + * no-copy-on-write + * synchronous-updates + + See chattr and filesystem manual pages for details on those + attributes. More attributes for the spare part context can be + added on request. This Fixes #1233 ++++ 30 more lines (skipped) ++++ between /work/SRC/openSUSE:Factory/python-kiwi/python-kiwi.changes ++++ and /work/SRC/openSUSE:Factory/.python-kiwi.new.26092/python-kiwi.changes ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-kiwi.spec ++++++ --- /var/tmp/diff_new_pack.DS4ZRd/_old 2020-02-19 12:39:41.179525951 +0100 +++ /var/tmp/diff_new_pack.DS4ZRd/_new 2020-02-19 12:39:41.183525959 +0100 @@ -43,7 +43,7 @@ %endif Name: python-kiwi -Version: 9.19.10 +Version: 9.19.16 Provides: kiwi-schema = 7.1 Release: 0 Url: https://github.com/SUSE/kiwi @@ -189,6 +189,9 @@ %else Requires(pre): shadow %endif +%if 0%{?suse_version} >= 1550 +Requires(pre): user(tftp) +%endif License: GPL-3.0-or-later Group: %{sysgroup} @@ -391,7 +394,7 @@ %fdupes %{buildroot}/srv/tftpboot %endif -%if %{_vendor} != "debbuild" +%if %{_vendor} != "debbuild" && 0%{?suse_version} < 1550 %ifarch %{ix86} x86_64 %pre -n kiwi-pxeboot #============================================================ @@ -446,7 +449,9 @@ %if %{_vendor} != "debbuild" %ifarch %{ix86} x86_64 %files -n kiwi-pxeboot +%if 0%{?suse_version} < 1550 %dir %attr(0755,tftp,tftp) /srv/tftpboot +%endif %dir /srv/tftpboot/KIWI %dir /srv/tftpboot/pxelinux.cfg %dir /srv/tftpboot/image ++++++ python-kiwi.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/.bumpversion.cfg new/kiwi-9.19.16/.bumpversion.cfg --- old/kiwi-9.19.10/.bumpversion.cfg 2020-01-13 10:12:58.000000000 +0100 +++ new/kiwi-9.19.16/.bumpversion.cfg 2020-02-06 10:07:45.000000000 +0100 @@ -1,5 +1,5 @@ [bumpversion] -current_version = 9.19.10 +current_version = 9.19.16 commit = True tag = True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/PKG-INFO new/kiwi-9.19.16/PKG-INFO --- old/kiwi-9.19.10/PKG-INFO 2020-01-13 10:14:37.000000000 +0100 +++ new/kiwi-9.19.16/PKG-INFO 2020-02-06 10:09:29.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: kiwi -Version: 9.19.10 +Version: 9.19.16 Summary: KIWI - Appliance Builder (next generation) Home-page: https://osinside.github.io/kiwi Author: Marcus Schaefer Binary files old/kiwi-9.19.10/doc/build/latex/kiwi.pdf and new/kiwi-9.19.16/doc/build/latex/kiwi.pdf differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/doc/build/man/kiwi.8 new/kiwi-9.19.16/doc/build/man/kiwi.8 --- old/kiwi-9.19.10/doc/build/man/kiwi.8 2020-01-13 10:14:36.000000000 +0100 +++ new/kiwi-9.19.16/doc/build/man/kiwi.8 2020-02-06 10:09:28.000000000 +0100 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "KIWI" "8" "Jan 13, 2020" "9.19.10" "kiwi" +.TH "KIWI" "8" "Feb 06, 2020" "9.19.16" "kiwi" .SH NAME kiwi \- Creating Operating System Images . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/doc/build/man/kiwi::image::info.8 new/kiwi-9.19.16/doc/build/man/kiwi::image::info.8 --- old/kiwi-9.19.10/doc/build/man/kiwi::image::info.8 2020-01-13 10:14:36.000000000 +0100 +++ new/kiwi-9.19.16/doc/build/man/kiwi::image::info.8 2020-02-06 10:09:28.000000000 +0100 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "KIWI::IMAGE::INFO" "8" "Jan 13, 2020" "9.19.10" "kiwi" +.TH "KIWI::IMAGE::INFO" "8" "Feb 06, 2020" "9.19.16" "kiwi" .SH NAME kiwi::image::info \- Provide detailed information about an image description . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/doc/build/man/kiwi::image::resize.8 new/kiwi-9.19.16/doc/build/man/kiwi::image::resize.8 --- old/kiwi-9.19.10/doc/build/man/kiwi::image::resize.8 2020-01-13 10:14:36.000000000 +0100 +++ new/kiwi-9.19.16/doc/build/man/kiwi::image::resize.8 2020-02-06 10:09:28.000000000 +0100 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "KIWI::IMAGE::RESIZE" "8" "Jan 13, 2020" "9.19.10" "kiwi" +.TH "KIWI::IMAGE::RESIZE" "8" "Feb 06, 2020" "9.19.16" "kiwi" .SH NAME kiwi::image::resize \- Resize disk images to new geometry . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/doc/build/man/kiwi::result::bundle.8 new/kiwi-9.19.16/doc/build/man/kiwi::result::bundle.8 --- old/kiwi-9.19.10/doc/build/man/kiwi::result::bundle.8 2020-01-13 10:14:36.000000000 +0100 +++ new/kiwi-9.19.16/doc/build/man/kiwi::result::bundle.8 2020-02-06 10:09:28.000000000 +0100 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "KIWI::RESULT::BUNDLE" "8" "Jan 13, 2020" "9.19.10" "kiwi" +.TH "KIWI::RESULT::BUNDLE" "8" "Feb 06, 2020" "9.19.16" "kiwi" .SH NAME kiwi::result::bundle \- Bundle build results . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/doc/build/man/kiwi::result::list.8 new/kiwi-9.19.16/doc/build/man/kiwi::result::list.8 --- old/kiwi-9.19.10/doc/build/man/kiwi::result::list.8 2020-01-13 10:14:36.000000000 +0100 +++ new/kiwi-9.19.16/doc/build/man/kiwi::result::list.8 2020-02-06 10:09:28.000000000 +0100 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "KIWI::RESULT::LIST" "8" "Jan 13, 2020" "9.19.10" "kiwi" +.TH "KIWI::RESULT::LIST" "8" "Feb 06, 2020" "9.19.16" "kiwi" .SH NAME kiwi::result::list \- List build results . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/doc/build/man/kiwi::system::build.8 new/kiwi-9.19.16/doc/build/man/kiwi::system::build.8 --- old/kiwi-9.19.10/doc/build/man/kiwi::system::build.8 2020-01-13 10:14:36.000000000 +0100 +++ new/kiwi-9.19.16/doc/build/man/kiwi::system::build.8 2020-02-06 10:09:28.000000000 +0100 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "KIWI::SYSTEM::BUILD" "8" "Jan 13, 2020" "9.19.10" "kiwi" +.TH "KIWI::SYSTEM::BUILD" "8" "Feb 06, 2020" "9.19.16" "kiwi" .SH NAME kiwi::system::build \- Build image in combined prepare and create step . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/doc/build/man/kiwi::system::create.8 new/kiwi-9.19.16/doc/build/man/kiwi::system::create.8 --- old/kiwi-9.19.10/doc/build/man/kiwi::system::create.8 2020-01-13 10:14:36.000000000 +0100 +++ new/kiwi-9.19.16/doc/build/man/kiwi::system::create.8 2020-02-06 10:09:28.000000000 +0100 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "KIWI::SYSTEM::CREATE" "8" "Jan 13, 2020" "9.19.10" "kiwi" +.TH "KIWI::SYSTEM::CREATE" "8" "Feb 06, 2020" "9.19.16" "kiwi" .SH NAME kiwi::system::create \- Create image from prepared root system . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/doc/build/man/kiwi::system::prepare.8 new/kiwi-9.19.16/doc/build/man/kiwi::system::prepare.8 --- old/kiwi-9.19.10/doc/build/man/kiwi::system::prepare.8 2020-01-13 10:14:36.000000000 +0100 +++ new/kiwi-9.19.16/doc/build/man/kiwi::system::prepare.8 2020-02-06 10:09:28.000000000 +0100 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "KIWI::SYSTEM::PREPARE" "8" "Jan 13, 2020" "9.19.10" "kiwi" +.TH "KIWI::SYSTEM::PREPARE" "8" "Feb 06, 2020" "9.19.16" "kiwi" .SH NAME kiwi::system::prepare \- Prepare image root system . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/doc/build/man/kiwi::system::update.8 new/kiwi-9.19.16/doc/build/man/kiwi::system::update.8 --- old/kiwi-9.19.10/doc/build/man/kiwi::system::update.8 2020-01-13 10:14:36.000000000 +0100 +++ new/kiwi-9.19.16/doc/build/man/kiwi::system::update.8 2020-02-06 10:09:28.000000000 +0100 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "KIWI::SYSTEM::UPDATE" "8" "Jan 13, 2020" "9.19.10" "kiwi" +.TH "KIWI::SYSTEM::UPDATE" "8" "Feb 06, 2020" "9.19.16" "kiwi" .SH NAME kiwi::system::update \- Update/Upgrade image root system . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/dracut/modules.d/90kiwi-dump/kiwi-dump-image.sh new/kiwi-9.19.16/dracut/modules.d/90kiwi-dump/kiwi-dump-image.sh --- old/kiwi-9.19.10/dracut/modules.d/90kiwi-dump/kiwi-dump-image.sh 2019-08-29 10:17:54.000000000 +0200 +++ new/kiwi-9.19.16/dracut/modules.d/90kiwi-dump/kiwi-dump-image.sh 2020-01-24 10:18:45.000000000 +0100 @@ -361,6 +361,10 @@ image_kernel_uri=$( echo "${image_uri}" | awk '{ gsub("\\.xz",".kernel", $1); print $1 }' ) + image_config_uri=$( + echo "${image_uri}" | \ + awk '{ gsub("\\.xz",".config.bootoptions", $1); print $1 }' + ) # if we can not access image_md5_uri, maybe network setup # by dracut did fail, so collect some additional info @@ -384,6 +388,12 @@ "Failed to fetch ${image_initrd_uri}, see /tmp/fetch.info" fi + if ! fetch_file "${image_config_uri}" > "/config.bootoptions" + then + report_and_quit \ + "Failed to fetch ${image_config_uri}, see /tmp/fetch.info" + fi + echo "${image_uri}|${image_md5}" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/dracut/modules.d/90kiwi-dump/kiwi-ramdisk-deployment-generator.sh new/kiwi-9.19.16/dracut/modules.d/90kiwi-dump/kiwi-ramdisk-deployment-generator.sh --- old/kiwi-9.19.10/dracut/modules.d/90kiwi-dump/kiwi-ramdisk-deployment-generator.sh 2019-09-10 15:49:57.000000000 +0200 +++ new/kiwi-9.19.16/dracut/modules.d/90kiwi-dump/kiwi-ramdisk-deployment-generator.sh 2020-01-24 10:18:45.000000000 +0100 @@ -6,6 +6,8 @@ [ -z "${GENERATOR_DIR}" ] && exit 1 [ -d "${GENERATOR_DIR}" ] || mkdir -p "${GENERATOR_DIR}" +[ -e /config.bootoptions ] || exit 1 + root_uuid=$( while read -r -d ' ' opt; do echo "${opt}";done < /config.bootoptions |\ grep root= | cut -f2- -d= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/helper/build_status.sh new/kiwi-9.19.16/helper/build_status.sh --- old/kiwi-9.19.10/helper/build_status.sh 2019-10-24 10:36:19.000000000 +0200 +++ new/kiwi-9.19.16/helper/build_status.sh 2020-02-06 10:05:20.000000000 +0100 @@ -23,9 +23,11 @@ Virtualization:Appliances:Images:Testing_x86:ubuntu/test-image-iso-oem-vmx \ Virtualization:Appliances:Images:Testing_s390:suse/test-image-oem \ Virtualization:Appliances:Images:Testing_s390:suse/test-image-vmx \ - Virtualization:Appliances:Images:Testing_arm:fedora/test-image-iso \ Virtualization:Appliances:Images:Testing_arm:suse/test-image-iso \ - Virtualization:Appliances:Images:Testing_arm:suse/test-image-rpi-oem + Virtualization:Appliances:Images:Testing_arm:suse/test-image-rpi-oem \ + Virtualization:Appliances:Images:Testing_arm:fedora/test-image-iso \ + Virtualization:Appliances:Images:Testing_ppc:suse/test-image-vmx \ + Virtualization:Appliances:Images:Testing_ppc:fedora/test-image-vmx do project=$(echo "${image}" | cut -f1 -d/) package=$(echo "${image}" | cut -f2 -d/) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/boot/image/base.py new/kiwi-9.19.16/kiwi/boot/image/base.py --- old/kiwi-9.19.10/kiwi/boot/image/base.py 2019-10-24 11:10:45.000000000 +0200 +++ new/kiwi-9.19.16/kiwi/boot/image/base.py 2020-01-24 10:18:45.000000000 +0100 @@ -401,11 +401,8 @@ default_outfile_format = 'initrd-{kernel_version}' else: default_outfile_format = 'initramfs-{kernel_version}.img' - dracut_search_env = { - 'PATH': os.sep.join([self.boot_root_directory, 'usr', 'bin']) - } dracut_tool = Path.which( - 'dracut', custom_env=dracut_search_env, access_mode=os.X_OK + 'dracut', root_dir=self.boot_root_directory, access_mode=os.X_OK ) if dracut_tool: outfile_expression = r'outfile="/boot/(init.*\$kernel.*)"' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/boot/image/dracut.py new/kiwi-9.19.16/kiwi/boot/image/dracut.py --- old/kiwi-9.19.10/kiwi/boot/image/dracut.py 2019-10-24 11:10:45.000000000 +0200 +++ new/kiwi-9.19.16/kiwi/boot/image/dracut.py 2020-01-17 10:40:21.000000000 +0100 @@ -46,6 +46,7 @@ self.install_modules = [] self.omit_modules = [] self.omit_install_modules = [] + self.available_modules = self._get_modules() def include_file(self, filename, install_media=False): """ @@ -66,10 +67,14 @@ :param string module: module to include :param bool install_media: include the module for install initrds """ - if install_media and module not in self.install_modules: - self.install_modules.append(module) - elif module not in self.modules: - self.modules.append(module) + warn_msg = 'module "{0}" not included in initrd'.format(module) + if self._module_available(module): + if install_media and module not in self.install_modules: + self.install_modules.append(module) + elif module not in self.modules: + self.modules.append(module) + else: + log.warning(warn_msg) def omit_module(self, module, install_media=False): """ @@ -96,10 +101,12 @@ self.boot_root_directory + Defaults.get_dracut_conf_name() ) if config.get('modules'): + modules = [ + module for module in config['modules'] + if self._module_available(module) + ] dracut_config.append( - 'add_dracutmodules+=" {0} "\n'.format( - ' '.join(config['modules']) - ) + 'add_dracutmodules+=" {0} "\n'.format(' '.join(modules)) ) if config.get('omit_modules'): dracut_config.append( @@ -199,3 +206,19 @@ self.initrd_filename = os.sep.join( [self.target_dir, dracut_initrd_basename] ) + + def _get_modules(self): + cmd = Command.run( + [ + 'chroot', self.boot_root_directory, + 'dracut', '--list-modules', '--no-kernel' + ] + ) + return cmd.output.splitlines() + + def _module_available(self, module): + warn_msg = 'dracut module "{0}" not found in the root tree' + if module in self.available_modules: + return True + log.warning(warn_msg.format(module)) + return False diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/bootloader/config/grub2.py new/kiwi-9.19.16/kiwi/bootloader/config/grub2.py --- old/kiwi-9.19.10/kiwi/bootloader/config/grub2.py 2020-01-07 09:21:12.000000000 +0100 +++ new/kiwi-9.19.16/kiwi/bootloader/config/grub2.py 2020-01-24 10:18:45.000000000 +0100 @@ -1028,9 +1028,6 @@ ) def _get_shim_install(self): - chroot_env = { - 'PATH': os.sep.join([self.boot_dir, 'usr', 'sbin']) - } return Path.which( - filename='shim-install', custom_env=chroot_env + filename='shim-install', root_dir=self.boot_dir ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/bootloader/install/grub2.py new/kiwi-9.19.16/kiwi/bootloader/install/grub2.py --- old/kiwi-9.19.10/kiwi/bootloader/install/grub2.py 2019-10-24 11:10:45.000000000 +0200 +++ new/kiwi-9.19.16/kiwi/bootloader/install/grub2.py 2020-01-24 10:18:45.000000000 +0100 @@ -312,9 +312,8 @@ def _get_tool_name( self, root_path, lookup_list, fallback_on_not_found=True ): - chroot_env = {'PATH': os.sep.join([root_path, 'usr', 'sbin'])} for tool in lookup_list: - if Path.which(filename=tool, custom_env=chroot_env): + if Path.which(filename=tool, root_dir=root_path): return tool if fallback_on_not_found: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/builder/disk.py new/kiwi-9.19.16/kiwi/builder/disk.py --- old/kiwi-9.19.10/kiwi/builder/disk.py 2019-12-10 09:25:59.000000000 +0100 +++ new/kiwi-9.19.16/kiwi/builder/disk.py 2020-01-24 14:54:46.000000000 +0100 @@ -335,9 +335,6 @@ self.requested_filesystem ) volume_manager.mount_volumes() - self.generic_fstab_entries += volume_manager.get_fstab( - self.persistency_type, self.requested_filesystem - ) self.system = volume_manager device_map['root'] = volume_manager.get_device().get('root') device_map['swap'] = volume_manager.get_device().get('swap') @@ -645,12 +642,19 @@ def _build_spare_filesystem(self, device_map): if 'spare' in device_map and self.spare_part_fs: spare_part_data_path = None + spare_part_custom_parameters = { + 'fs_attributes': + self.xml_state.get_build_type_spare_part_fs_attributes() + } if self.spare_part_mountpoint: spare_part_data_path = self.root_dir + '{0}/'.format( self.spare_part_mountpoint ) filesystem = FileSystem( - self.spare_part_fs, device_map['spare'], spare_part_data_path + self.spare_part_fs, + device_map['spare'], + spare_part_data_path, + spare_part_custom_parameters ) filesystem.create_on_device( label='SPARE' @@ -864,6 +868,13 @@ device_map['root'].get_device(), '/', custom_root_mount_args, fs_check_interval ) + if self.volume_manager_name: + volume_fstab_entries = self.system.get_fstab( + self.persistency_type, self.requested_filesystem + ) + for volume_fstab_entry in volume_fstab_entries: + if volume_fstab_entry not in self.generic_fstab_entries: + self.generic_fstab_entries.append(volume_fstab_entry) if device_map.get('spare') and \ self.spare_part_fs and self.spare_part_mountpoint: self._add_generic_fstab_entry( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/builder/install.py new/kiwi-9.19.16/kiwi/builder/install.py --- old/kiwi-9.19.10/kiwi/builder/install.py 2019-11-25 15:12:56.000000000 +0100 +++ new/kiwi-9.19.16/kiwi/builder/install.py 2020-01-24 10:18:45.000000000 +0100 @@ -332,6 +332,15 @@ log.info('Creating pxe install boot image') self._create_pxe_install_kernel_and_initrd() + # create pxe image bound boot config file, contents can be + # changed but presence is required. + log.info('Creating pxe install boot options file') + configname = 'pxeboot.{0}.config.bootoptions'.format(self.pxename) + shutil.copy( + os.sep.join([self.root_dir, 'config.bootoptions']), + os.sep.join([self.pxe_dir, configname]) + ) + # create pxe install tarball log.info('Creating pxe install archive') archive = ArchiveTar(self.pxetarball) @@ -375,7 +384,6 @@ self.boot_image_task.omit_module( 'multipath', install_media=True ) - self._add_system_image_boot_options_to_boot_image() self.boot_image_task.create_initrd( self.mbrid, 'initrd_kiwi_install', install_initrd=True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/defaults.py new/kiwi-9.19.16/kiwi/defaults.py --- old/kiwi-9.19.10/kiwi/defaults.py 2019-12-02 12:25:59.000000000 +0100 +++ new/kiwi-9.19.16/kiwi/defaults.py 2020-01-24 10:18:45.000000000 +0100 @@ -343,10 +343,7 @@ :rtype: str """ - chroot_env = { - 'PATH': os.sep.join([lookup_path, 'usr', 'sbin']) - } - if Path.which(filename='grub2-install', custom_env=chroot_env): + if Path.which(filename='grub2-install', root_dir=lookup_path): # the presence of grub2-install is an indicator to put all # grub2 data below boot/grub2 return 'grub2' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/filesystem/base.py new/kiwi-9.19.16/kiwi/filesystem/base.py --- old/kiwi-9.19.10/kiwi/filesystem/base.py 2019-10-24 11:10:45.000000000 +0200 +++ new/kiwi-9.19.16/kiwi/filesystem/base.py 2020-01-23 09:48:12.000000000 +0100 @@ -22,6 +22,7 @@ # project from kiwi.utils.sync import DataSync from kiwi.mount_manager import MountManager +from kiwi.command import Command from kiwi.exceptions import ( KiwiFileSystemSyncError @@ -85,15 +86,18 @@ if custom_args: self.custom_args = copy.deepcopy(custom_args) - if 'create_options' not in self.custom_args: + if not self.custom_args.get('create_options'): self.custom_args['create_options'] = [] - if 'meta_data' not in self.custom_args: + if not self.custom_args.get('meta_data'): self.custom_args['meta_data'] = {} - if 'mount_options' not in self.custom_args: + if not self.custom_args.get('mount_options'): self.custom_args['mount_options'] = [] + if not self.custom_args.get('fs_attributes'): + self.custom_args['fs_attributes'] = [] + def create_on_device(self, label=None): """ Create filesystem on block device @@ -138,6 +142,7 @@ self.filesystem_mount.mount( self.custom_args['mount_options'] ) + self._apply_attributes() data = DataSync( self.root_dir, self.filesystem_mount.mountpoint ) @@ -147,6 +152,28 @@ ) self.filesystem_mount.umount() + def _apply_attributes(self): + """ + Apply filesystem attributes + """ + attribute_map = { + 'synchronous-updates': '+S', + 'no-copy-on-write': '+C' + } + for attribute in self.custom_args['fs_attributes']: + if attribute_map.get(attribute): + log.info( + '--> setting {0} for {1}'.format( + attribute, self.filesystem_mount.mountpoint + ) + ) + Command.run( + [ + 'chattr', attribute_map.get(attribute), + self.filesystem_mount.mountpoint + ] + ) + def __del__(self): if self.filesystem_mount: log.info('Cleaning up %s instance', type(self).__name__) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/package_manager/apt.py new/kiwi-9.19.16/kiwi/package_manager/apt.py --- old/kiwi-9.19.10/kiwi/package_manager/apt.py 2019-11-27 15:08:45.000000000 +0100 +++ new/kiwi-9.19.16/kiwi/package_manager/apt.py 2020-01-23 09:48:12.000000000 +0100 @@ -183,13 +183,17 @@ :rtype: namedtuple """ update_command = ['chroot', self.root_dir, 'apt-get'] - update_command.extend(self.root_bind.move_to_root(self.apt_get_args)) + update_command.extend( + Path.move_to_root(self.root_dir, self.apt_get_args) + ) update_command.extend(self.custom_args) update_command.append('update') Command.run(update_command, self.command_env) apt_get_command = ['chroot', self.root_dir, 'apt-get'] - apt_get_command.extend(self.root_bind.move_to_root(self.apt_get_args)) + apt_get_command.extend( + Path.move_to_root(self.root_dir, self.apt_get_args) + ) apt_get_command.extend(self.custom_args) apt_get_command.append('install') apt_get_command.extend(self._package_requests()) @@ -232,7 +236,7 @@ else: apt_get_command = ['chroot', self.root_dir, 'apt-get'] apt_get_command.extend( - self.root_bind.move_to_root(self.apt_get_args) + Path.move_to_root(self.root_dir, self.apt_get_args) ) apt_get_command.extend(self.custom_args) apt_get_command.extend(['--auto-remove', 'remove']) @@ -251,7 +255,9 @@ :rtype: namedtuple """ apt_get_command = ['chroot', self.root_dir, 'apt-get'] - apt_get_command.extend(self.root_bind.move_to_root(self.apt_get_args)) + apt_get_command.extend( + Path.move_to_root(self.root_dir, self.apt_get_args) + ) apt_get_command.extend(self.custom_args) apt_get_command.append('upgrade') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/package_manager/base.py new/kiwi-9.19.16/kiwi/package_manager/base.py --- old/kiwi-9.19.10/kiwi/package_manager/base.py 2019-08-26 15:39:13.000000000 +0200 +++ new/kiwi-9.19.16/kiwi/package_manager/base.py 2020-01-23 09:48:12.000000000 +0100 @@ -24,7 +24,6 @@ :param object repository: instance of :class:`Repository` :param str root_dir: root directory path name - :param object root_bind: instance of :class:`RootBind` :param list package_requests: list of packages to install or delete :param list collection_requests: list of collections to install :param list product_requests: list of products to install @@ -32,7 +31,6 @@ def __init__(self, repository, custom_args=None): self.repository = repository self.root_dir = repository.root_dir - self.root_bind = repository.root_bind self.package_requests = [] self.collection_requests = [] self.product_requests = [] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/package_manager/dnf.py new/kiwi-9.19.16/kiwi/package_manager/dnf.py --- old/kiwi-9.19.10/kiwi/package_manager/dnf.py 2019-05-20 08:34:50.000000000 +0200 +++ new/kiwi-9.19.16/kiwi/package_manager/dnf.py 2020-01-23 09:48:12.000000000 +0100 @@ -21,6 +21,7 @@ from kiwi.command import Command from kiwi.utils.rpm_database import RpmDataBase from kiwi.package_manager.base import PackageManagerBase +from kiwi.path import Path from kiwi.exceptions import KiwiRequestError @@ -125,8 +126,8 @@ # hard required by another package, it will break the transaction. for package in self.exclude_requests: self.custom_args.append('--exclude=' + package) - chroot_dnf_args = self.root_bind.move_to_root( - self.dnf_args + chroot_dnf_args = Path.move_to_root( + self.root_dir, self.dnf_args ) bash_command = [ 'chroot', self.root_dir, 'dnf' @@ -178,7 +179,7 @@ self.command_env ) else: - chroot_dnf_args = self.root_bind.move_to_root(self.dnf_args) + chroot_dnf_args = Path.move_to_root(self.root_dir, self.dnf_args) return Command.call( [ 'chroot', self.root_dir, 'dnf' @@ -196,9 +197,7 @@ :rtype: namedtuple """ - chroot_dnf_args = self.root_bind.move_to_root( - self.dnf_args - ) + chroot_dnf_args = Path.move_to_root(self.root_dir, self.dnf_args) return Command.call( [ 'chroot', self.root_dir, 'dnf' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/package_manager/zypper.py new/kiwi-9.19.16/kiwi/package_manager/zypper.py --- old/kiwi-9.19.10/kiwi/package_manager/zypper.py 2019-05-20 08:34:50.000000000 +0200 +++ new/kiwi-9.19.16/kiwi/package_manager/zypper.py 2020-01-23 09:48:12.000000000 +0100 @@ -51,15 +51,15 @@ runtime_config = self.repository.runtime_config() self.zypper_args = runtime_config['zypper_args'] - self.chroot_zypper_args = self.root_bind.move_to_root( - self.zypper_args + self.chroot_zypper_args = Path.move_to_root( + self.root_dir, self.zypper_args ) self.command_env = runtime_config['command_env'] self.chroot_command_env = dict(self.command_env) if 'ZYPP_CONF' in self.command_env: - self.chroot_command_env['ZYPP_CONF'] = self.root_bind.move_to_root( - [self.command_env['ZYPP_CONF']] + self.chroot_command_env['ZYPP_CONF'] = Path.move_to_root( + self.root_dir, [self.command_env['ZYPP_CONF']] )[0] def request_package(self, name): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/repository/dnf.py new/kiwi-9.19.16/kiwi/repository/dnf.py --- old/kiwi-9.19.10/kiwi/repository/dnf.py 2019-10-04 10:44:40.000000000 +0200 +++ new/kiwi-9.19.16/kiwi/repository/dnf.py 2020-02-03 09:49:29.000000000 +0100 @@ -198,6 +198,13 @@ repo_config.set( name, 'gpgcheck', '1' if pkg_gpgcheck else '0' ) + if Defaults.is_buildservice_worker(): + # when building in the build service, modular metadata is inaccessible... + # in order to use modular content in the build service, we need to disable + # modular filtering, which is done with module_hotfixes option + repo_config.set( + name, 'module_hotfixes', '1' + ) with open(repo_file, 'w') as repo: repo_config.write(repo) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/schema/kiwi.rnc new/kiwi-9.19.16/kiwi/schema/kiwi.rnc --- old/kiwi-9.19.10/kiwi/schema/kiwi.rnc 2019-11-19 12:53:33.000000000 +0100 +++ new/kiwi-9.19.16/kiwi/schema/kiwi.rnc 2020-01-17 10:40:21.000000000 +0100 @@ -36,6 +36,7 @@ arch-name = xsd:token {pattern = "(x86_64|i586|i686|ix86|aarch64|arm64|armv5el|armv5tel|armv6hl|armv6l|armv7hl|armv7l|ppc|ppc64|ppc64le|s390|s390x)(,(x86_64|i586|i686|ix86|aarch64|arm64|armv5el|armv5tel|armv6hl|armv6l|armv7hl|armv7l|ppc|ppc64|ppc64le|s390|s390x))*"} portnum-type = xsd:token {pattern = "(\d+|\d+/(udp|tcp))"} grub_console = xsd:token {pattern = "(console|gfxterm|serial)( (console|gfxterm|serial))*"} +fs_attributes = xsd:token {pattern = "(no-copy-on-write|synchronous-updates)(,(no-copy-on-write|synchronous-updates))*"} #========================================== # start with image description @@ -1264,6 +1265,15 @@ sch:param [ name = "attr" value = "spare_part_fs" ] sch:param [ name = "types" value = "oem vmx" ] ] + k.type.spare_part_fs_attributes.attribute = + ## Specify filesystem attributes for the spare partition. + ## Attributes can be specified as comma separated list. + ## Can only be configured for the disk image types oem and vmx + attribute spare_part_fs_attributes { fs_attributes } + >> sch:pattern [ id = "spare_part_fs_attributes" is-a = "image_type" + sch:param [ name = "attr" value = "spare_part_fs_attributes" ] + sch:param [ name = "types" value = "oem vmx" ] + ] k.type.spare_part_is_last.attribute = ## Specify if the spare partition should be the last one in ## the partition table. Can only be configured for the vmx @@ -1762,6 +1772,7 @@ k.type.spare_part.attribute? & k.type.spare_part_mountpoint.attribute? & k.type.spare_part_fs.attribute? & + k.type.spare_part_fs_attributes.attribute? & k.type.spare_part_is_last.attribute? & k.type.target_blocksize.attribute? & k.type.target_removable.attribute? & diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/schema/kiwi.rng new/kiwi-9.19.16/kiwi/schema/kiwi.rng --- old/kiwi-9.19.10/kiwi/schema/kiwi.rng 2019-11-19 12:53:35.000000000 +0100 +++ new/kiwi-9.19.16/kiwi/schema/kiwi.rng 2020-01-17 10:40:21.000000000 +0100 @@ -81,6 +81,11 @@ <param name="pattern">(console|gfxterm|serial)( (console|gfxterm|serial))*</param> </data> </define> + <define name="fs_attributes"> + <data type="token"> + <param name="pattern">(no-copy-on-write|synchronous-updates)(,(no-copy-on-write|synchronous-updates))*</param> + </data> + </define> <!-- ========================================== start with image description @@ -1900,6 +1905,18 @@ <sch:param name="types" value="oem vmx"/> </sch:pattern> </define> + <define name="k.type.spare_part_fs_attributes.attribute"> + <attribute name="spare_part_fs_attributes"> + <a:documentation>Specify filesystem attributes for the spare partition. +Attributes can be specified as comma separated list. +Can only be configured for the disk image types oem and vmx</a:documentation> + <ref name="fs_attributes"/> + </attribute> + <sch:pattern id="spare_part_fs_attributes" is-a="image_type"> + <sch:param name="attr" value="spare_part_fs_attributes"/> + <sch:param name="types" value="oem vmx"/> + </sch:pattern> + </define> <define name="k.type.spare_part_is_last.attribute"> <attribute name="spare_part_is_last"> <a:documentation>Specify if the spare partition should be the last one in @@ -2683,6 +2700,9 @@ <ref name="k.type.spare_part_fs.attribute"/> </optional> <optional> + <ref name="k.type.spare_part_fs_attributes.attribute"/> + </optional> + <optional> <ref name="k.type.spare_part_is_last.attribute"/> </optional> <optional> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/solver/sat.py new/kiwi-9.19.16/kiwi/solver/sat.py --- old/kiwi-9.19.10/kiwi/solver/sat.py 2019-10-24 11:10:45.000000000 +0200 +++ new/kiwi-9.19.16/kiwi/solver/sat.py 2020-01-29 09:43:26.000000000 +0100 @@ -204,7 +204,7 @@ selection = self.pool.select( job_name, selection_name | selection_provides ) - if selection.flags() & self.solv.Selection.SELECTION_PROVIDES: + if selection.flags & self.solv.Selection.SELECTION_PROVIDES: log.info('--> Using capability match for {0}'.format(job_name)) if selection.isempty(): if skip_missing: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/system/kernel.py new/kiwi-9.19.16/kiwi/system/kernel.py --- old/kiwi-9.19.10/kiwi/system/kernel.py 2020-01-11 22:34:48.000000000 +0100 +++ new/kiwi-9.19.16/kiwi/system/kernel.py 2020-01-29 09:43:26.000000000 +0100 @@ -154,7 +154,7 @@ # depending on the arch and os they are different # in their prefix kernel_prefixes = [ - 'uImage', 'Image', 'zImage', 'vmlinuz', 'image' + 'uImage', 'Image', 'zImage', 'vmlinuz', 'image', 'vmlinux' ] kernel_name_pattern = '{prefix}-{name}' for kernel_prefix in kernel_prefixes: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/system/root_bind.py new/kiwi-9.19.16/kiwi/system/root_bind.py --- old/kiwi-9.19.10/kiwi/system/root_bind.py 2019-10-24 11:10:45.000000000 +0200 +++ new/kiwi-9.19.16/kiwi/system/root_bind.py 2020-01-23 09:48:12.000000000 +0100 @@ -163,26 +163,6 @@ '%s: %s' % (type(e).__name__, format(e)) ) - def move_to_root(self, elements): - """ - Change the given path elements to a new root directory - - :param list elements: list of path names - - :return: changed elements - - :rtype: list - """ - result = [] - for element in elements: - normalized_element = os.path.normpath(element) - result.append( - normalized_element.replace( - os.path.normpath(self.root_dir), os.sep - ).replace('{0}{0}'.format(os.sep), os.sep) - ) - return result - def cleanup(self): """ Cleanup mounted locations, directories and intermediate config files diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/system/setup.py new/kiwi-9.19.16/kiwi/system/setup.py --- old/kiwi-9.19.10/kiwi/system/setup.py 2019-12-06 10:58:34.000000000 +0100 +++ new/kiwi-9.19.16/kiwi/system/setup.py 2020-01-24 10:18:45.000000000 +0100 @@ -263,11 +263,8 @@ If not present KIWI skips this step and continuous with a warning. """ - chkstat_search_env = { - 'PATH': os.sep.join([self.root_dir, 'usr', 'bin']) - } chkstat = Path.which( - 'chkstat', custom_env=chkstat_search_env, access_mode=os.X_OK + 'chkstat', root_dir=self.root_dir, access_mode=os.X_OK ) if chkstat: log.info('Check/Fix File Permissions') @@ -432,11 +429,8 @@ be found in the image root, it is assumed plymouth splash is in use and the tool is called in a chroot operation """ - chroot_env = { - 'PATH': os.sep.join([self.root_dir, 'usr', 'sbin']) - } theme_setup = 'plymouth-set-default-theme' - if Path.which(filename=theme_setup, custom_env=chroot_env): + if Path.which(filename=theme_setup, root_dir=self.root_dir): for preferences in self.xml_state.get_preferences_sections(): splash_section_content = preferences.get_bootsplash_theme() if splash_section_content: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/utils/rpm_database.py new/kiwi-9.19.16/kiwi/utils/rpm_database.py --- old/kiwi-9.19.10/kiwi/utils/rpm_database.py 2019-08-26 15:39:13.000000000 +0200 +++ new/kiwi-9.19.16/kiwi/utils/rpm_database.py 2020-01-24 10:18:45.000000000 +0100 @@ -38,11 +38,8 @@ Check if rpmdb binary was found in root_dir to indicate that the rpm system is present. """ - rpm_search_env = { - 'PATH': os.sep.join([self.root_dir, 'usr', 'bin']) - } rpm_bin = Path.which( - 'rpmdb', custom_env=rpm_search_env, access_mode=os.X_OK + 'rpmdb', root_dir=self.root_dir, access_mode=os.X_OK ) if not rpm_bin: return False diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/version.py new/kiwi-9.19.16/kiwi/version.py --- old/kiwi-9.19.10/kiwi/version.py 2020-01-13 10:12:58.000000000 +0100 +++ new/kiwi-9.19.16/kiwi/version.py 2020-02-06 10:07:45.000000000 +0100 @@ -18,5 +18,5 @@ """ Global version information used in kiwi and the package """ -__version__ = '9.19.10' -__githash__ = '94b42c6c121f8f1fccef9a78a88d0f5ec4e20c85' +__version__ = '9.19.16' +__githash__ = '84f8ca6f9798da8678f62e826f6f513b1323067d' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/xml_parse.py new/kiwi-9.19.16/kiwi/xml_parse.py --- old/kiwi-9.19.10/kiwi/xml_parse.py 2019-11-19 15:13:17.000000000 +0100 +++ new/kiwi-9.19.16/kiwi/xml_parse.py 2020-01-17 10:40:21.000000000 +0100 @@ -3,7 +3,7 @@ # # Generated by generateDS.py version 2.29.24. -# Python 3.6.5 (default, Mar 31 2018, 19:45:04) [GCC] +# Python 3.6.9 (default, Oct 29 2019, 10:39:36) [GCC] # # Command line options: # ('-f', '') @@ -2566,7 +2566,7 @@ """The Image Type of the Logical Extend""" subclass = None superclass = None - def __init__(self, boot=None, bootfilesystem=None, firmware=None, bootkernel=None, bootloader=None, bootloader_console=None, zipl_targettype=None, bootpartition=None, bootpartsize=None, efipartsize=None, efiparttable=None, bootprofile=None, boottimeout=None, btrfs_quota_groups=None, btrfs_root_is_snapshot=None, btrfs_root_is_readonly_snapshot=None, compressed=None, devicepersistency=None, editbootconfig=None, editbootinstall=None, filesystem=None, flags=None, format=None, formatoptions=None, fsmountoptions=None, fscreateoptions=None, gcelicense=None, hybridpersistent=None, hybridpersistent_filesystem=None, gpt_hybrid_mbr=None, force_mbr=None, initrd_system=None, image=None, installboot=None, install_continue_on_timeout=None, installprovidefailsafe=None, installiso=None, installstick=None, installpxe=None, mediacheck=None, kernelcmdline=None, luks=None, luksOS=None, mdraid=None, overlayroot=None, primary=None, ramonly=None, rootfs_label=None, spare_part=None, spare_part_mountpoint=None, spare_part_fs=None, spare_part_is_last=None, target_blocksize=None, target_removable=None, vga=None, vhdfixedtag=None, volid=None, wwid_wait_timeout=None, derived_from=None, xen_server=None, publisher=None, disk_start_sector=None, containerconfig=None, machine=None, oemconfig=None, size=None, systemdisk=None, vagrantconfig=None): + def __init__(self, boot=None, bootfilesystem=None, firmware=None, bootkernel=None, bootloader=None, bootloader_console=None, zipl_targettype=None, bootpartition=None, bootpartsize=None, efipartsize=None, efiparttable=None, bootprofile=None, boottimeout=None, btrfs_quota_groups=None, btrfs_root_is_snapshot=None, btrfs_root_is_readonly_snapshot=None, compressed=None, devicepersistency=None, editbootconfig=None, editbootinstall=None, filesystem=None, flags=None, format=None, formatoptions=None, fsmountoptions=None, fscreateoptions=None, gcelicense=None, hybridpersistent=None, hybridpersistent_filesystem=None, gpt_hybrid_mbr=None, force_mbr=None, initrd_system=None, image=None, installboot=None, install_continue_on_timeout=None, installprovidefailsafe=None, installiso=None, installstick=None, installpxe=None, mediacheck=None, kernelcmdline=None, luks=None, luksOS=None, mdraid=None, overlayroot=None, primary=None, ramonly=None, rootfs_label=None, spare_part=None, spare_part_mountpoint=None, spare_part_fs=None, spare_part_fs_attributes=None, spare_part_is_last=None, target_blocksize=None, target_removable=None, vga=None, vhdfixedtag=None, volid=None, wwid_wait_timeout=None, derived_from=None, xen_server=None, publisher=None, disk_start_sector=None, containerconfig=None, machine=None, oemconfig=None, size=None, systemdisk=None, vagrantconfig=None): self.original_tagname_ = None self.boot = _cast(None, boot) self.bootfilesystem = _cast(None, bootfilesystem) @@ -2619,6 +2619,7 @@ self.spare_part = _cast(None, spare_part) self.spare_part_mountpoint = _cast(None, spare_part_mountpoint) self.spare_part_fs = _cast(None, spare_part_fs) + self.spare_part_fs_attributes = _cast(None, spare_part_fs_attributes) self.spare_part_is_last = _cast(bool, spare_part_is_last) self.target_blocksize = _cast(int, target_blocksize) self.target_removable = _cast(bool, target_removable) @@ -2797,6 +2798,8 @@ def set_spare_part_mountpoint(self, spare_part_mountpoint): self.spare_part_mountpoint = spare_part_mountpoint def get_spare_part_fs(self): return self.spare_part_fs def set_spare_part_fs(self, spare_part_fs): self.spare_part_fs = spare_part_fs + def get_spare_part_fs_attributes(self): return self.spare_part_fs_attributes + def set_spare_part_fs_attributes(self, spare_part_fs_attributes): self.spare_part_fs_attributes = spare_part_fs_attributes def get_spare_part_is_last(self): return self.spare_part_is_last def set_spare_part_is_last(self, spare_part_is_last): self.spare_part_is_last = spare_part_is_last def get_target_blocksize(self): return self.target_blocksize @@ -2833,6 +2836,13 @@ self.validate_partition_size_type_patterns_, value): warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_partition_size_type_patterns_, )) validate_partition_size_type_patterns_ = [['^\\d+|\\d+M|\\d+G$']] + def validate_fs_attributes(self, value): + # Validate type fs_attributes, a restriction on xs:token. + if value is not None and Validate_simpletypes_: + if not self.gds_validate_simple_patterns( + self.validate_fs_attributes_patterns_, value): + warnings_.warn('Value "%s" does not match xsd pattern restrictions: %s' % (value.encode('utf-8'), self.validate_fs_attributes_patterns_, )) + validate_fs_attributes_patterns_ = [['^(no-copy-on-write|synchronous-updates)(,(no-copy-on-write|synchronous-updates))*$']] def validate_vhd_tag_type(self, value): # Validate type vhd-tag-type, a restriction on xs:token. if value is not None and Validate_simpletypes_: @@ -3034,6 +3044,9 @@ if self.spare_part_fs is not None and 'spare_part_fs' not in already_processed: already_processed.add('spare_part_fs') outfile.write(' spare_part_fs=%s' % (self.gds_encode(self.gds_format_string(quote_attrib(self.spare_part_fs), input_name='spare_part_fs')), )) + if self.spare_part_fs_attributes is not None and 'spare_part_fs_attributes' not in already_processed: + already_processed.add('spare_part_fs_attributes') + outfile.write(' spare_part_fs_attributes=%s' % (quote_attrib(self.spare_part_fs_attributes), )) if self.spare_part_is_last is not None and 'spare_part_is_last' not in already_processed: already_processed.add('spare_part_is_last') outfile.write(' spare_part_is_last="%s"' % self.gds_format_boolean(self.spare_part_is_last, input_name='spare_part_is_last')) @@ -3416,6 +3429,12 @@ already_processed.add('spare_part_fs') self.spare_part_fs = value self.spare_part_fs = ' '.join(self.spare_part_fs.split()) + value = find_attr_value_('spare_part_fs_attributes', node) + if value is not None and 'spare_part_fs_attributes' not in already_processed: + already_processed.add('spare_part_fs_attributes') + self.spare_part_fs_attributes = value + self.spare_part_fs_attributes = ' '.join(self.spare_part_fs_attributes.split()) + self.validate_fs_attributes(self.spare_part_fs_attributes) # validate type fs_attributes value = find_attr_value_('spare_part_is_last', node) if value is not None and 'spare_part_is_last' not in already_processed: already_processed.add('spare_part_is_last') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi/xml_state.py new/kiwi-9.19.16/kiwi/xml_state.py --- old/kiwi-9.19.10/kiwi/xml_state.py 2020-01-07 09:21:12.000000000 +0100 +++ new/kiwi-9.19.16/kiwi/xml_state.py 2020-01-17 10:40:21.000000000 +0100 @@ -885,6 +885,19 @@ if spare_part_size: return self._to_mega_byte(spare_part_size) + def get_build_type_spare_part_fs_attributes(self): + """ + Build type specific list of filesystem attributes applied to + the spare partition. + + :return: list of strings or empty list + + :rtype: list + """ + spare_part_attributes = self.build_type.get_spare_part_fs_attributes() + if spare_part_attributes: + return spare_part_attributes.strip().split(',') + def get_build_type_format_options(self): """ Disk format options returned as a dictionary diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/kiwi.egg-info/PKG-INFO new/kiwi-9.19.16/kiwi.egg-info/PKG-INFO --- old/kiwi-9.19.10/kiwi.egg-info/PKG-INFO 2020-01-13 10:14:37.000000000 +0100 +++ new/kiwi-9.19.16/kiwi.egg-info/PKG-INFO 2020-02-06 10:09:29.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: kiwi -Version: 9.19.10 +Version: 9.19.16 Summary: KIWI - Appliance Builder (next generation) Home-page: https://osinside.github.io/kiwi Author: Marcus Schaefer diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/package/python-kiwi-spec-template new/kiwi-9.19.16/package/python-kiwi-spec-template --- old/kiwi-9.19.10/package/python-kiwi-spec-template 2020-01-11 22:34:48.000000000 +0100 +++ new/kiwi-9.19.16/package/python-kiwi-spec-template 2020-01-23 09:48:12.000000000 +0100 @@ -189,6 +189,9 @@ %else Requires(pre): shadow %endif +%if 0%{?suse_version} >= 1550 +Requires(pre): user(tftp) +%endif License: GPL-3.0-or-later Group: %{sysgroup} @@ -391,7 +394,7 @@ %fdupes %{buildroot}/srv/tftpboot %endif -%if %{_vendor} != "debbuild" +%if %{_vendor} != "debbuild" && 0%{?suse_version} < 1550 %ifarch %{ix86} x86_64 %pre -n kiwi-pxeboot #============================================================ @@ -446,7 +449,9 @@ %if %{_vendor} != "debbuild" %ifarch %{ix86} x86_64 %files -n kiwi-pxeboot +%if 0%{?suse_version} < 1550 %dir %attr(0755,tftp,tftp) /srv/tftpboot +%endif %dir /srv/tftpboot/KIWI %dir /srv/tftpboot/pxelinux.cfg %dir /srv/tftpboot/image diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/test/data/description/config.xml new/kiwi-9.19.16/test/data/description/config.xml --- old/kiwi-9.19.10/test/data/description/config.xml 2019-11-25 15:12:56.000000000 +0100 +++ new/kiwi-9.19.16/test/data/description/config.xml 2020-01-17 10:40:21.000000000 +0100 @@ -40,7 +40,7 @@ <rpm-locale-filtering>true</rpm-locale-filtering> </preferences> <preferences> - <type bootloader="grub2" image="oem" primary="true" boot="oemboot/example-distribution" firmware="efi" kernelcmdline="splash" vga="0x303" editbootconfig="my_edit_boot_script" editbootinstall="/absolute/path/to/my_edit_boot_install" fsmountoptions="async" fscreateoptions="-O ^has_journal" btrfs_root_is_snapshot="true" spare_part="200M" xen_server="true" formatoptions="force_size,super=man" filesystem="ext4"> + <type bootloader="grub2" image="oem" primary="true" boot="oemboot/example-distribution" firmware="efi" kernelcmdline="splash" vga="0x303" editbootconfig="my_edit_boot_script" editbootinstall="/absolute/path/to/my_edit_boot_install" fsmountoptions="async" fscreateoptions="-O ^has_journal" btrfs_root_is_snapshot="true" spare_part="200M" spare_part_fs_attributes="no-copy-on-write" xen_server="true" formatoptions="force_size,super=man" filesystem="ext4"> <size unit="G" additive="true">1</size> <systemdisk name="mydisk"/> <machine memory="512" xen_loader="hvmloader"> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/test/data/description.buildservice/appliance.kiwi new/kiwi-9.19.16/test/data/description.buildservice/appliance.kiwi --- old/kiwi-9.19.10/test/data/description.buildservice/appliance.kiwi 2019-11-25 15:12:56.000000000 +0100 +++ new/kiwi-9.19.16/test/data/description.buildservice/appliance.kiwi 2020-01-17 10:40:21.000000000 +0100 @@ -40,7 +40,7 @@ <rpm-locale-filtering>true</rpm-locale-filtering> </preferences> <preferences> - <type bootloader="grub2" image="oem" primary="true" boot="oemboot/example-distribution" firmware="efi" kernelcmdline="splash" vga="0x303" editbootconfig="my_edit_boot_script" editbootinstall="/absolute/path/to/my_edit_boot_install" fsmountoptions="async" fscreateoptions="-O ^has_journal" btrfs_root_is_snapshot="true" spare_part="200M" xen_server="true" formatoptions="force_size,super=man" filesystem="ext4"> + <type bootloader="grub2" image="oem" primary="true" boot="oemboot/example-distribution" firmware="efi" kernelcmdline="splash" vga="0x303" editbootconfig="my_edit_boot_script" editbootinstall="/absolute/path/to/my_edit_boot_install" fsmountoptions="async" fscreateoptions="-O ^has_journal" btrfs_root_is_snapshot="true" spare_part="200M" spare_part_fs_attributes="no-copy-on-write" xen_server="true" formatoptions="force_size,super=man" filesystem="ext4"> <size unit="G" additive="true">1</size> <systemdisk name="mydisk"/> <machine memory="512" xen_loader="hvmloader"> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/test/data/example_config.xml new/kiwi-9.19.16/test/data/example_config.xml --- old/kiwi-9.19.10/test/data/example_config.xml 2019-11-25 15:12:56.000000000 +0100 +++ new/kiwi-9.19.16/test/data/example_config.xml 2020-01-17 10:40:21.000000000 +0100 @@ -40,7 +40,7 @@ <rpm-locale-filtering>true</rpm-locale-filtering> </preferences> <preferences> - <type bootloader="grub2" image="oem" primary="true" boot="oemboot/example-distribution" firmware="efi" kernelcmdline="splash" vga="0x303" editbootconfig="my_edit_boot_script" editbootinstall="/absolute/path/to/my_edit_boot_install" fsmountoptions="async" fscreateoptions="-O ^has_journal" btrfs_root_is_snapshot="true" spare_part="200M" xen_server="true" formatoptions="force_size,super=man" filesystem="ext4"> + <type bootloader="grub2" image="oem" primary="true" boot="oemboot/example-distribution" firmware="efi" kernelcmdline="splash" vga="0x303" editbootconfig="my_edit_boot_script" editbootinstall="/absolute/path/to/my_edit_boot_install" fsmountoptions="async" fscreateoptions="-O ^has_journal" btrfs_root_is_snapshot="true" spare_part="200M" spare_part_fs_attributes="no-copy-on-write" xen_server="true" formatoptions="force_size,super=man" filesystem="ext4"> <size unit="G" additive="true">1</size> <systemdisk name="mydisk"/> <machine memory="512" xen_loader="hvmloader"> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/test/data/root-dir/image/config.xml new/kiwi-9.19.16/test/data/root-dir/image/config.xml --- old/kiwi-9.19.10/test/data/root-dir/image/config.xml 2019-11-25 15:12:56.000000000 +0100 +++ new/kiwi-9.19.16/test/data/root-dir/image/config.xml 2020-01-17 10:40:21.000000000 +0100 @@ -40,7 +40,7 @@ <rpm-locale-filtering>true</rpm-locale-filtering> </preferences> <preferences> - <type bootloader="grub2" image="oem" primary="true" boot="oemboot/example-distribution" firmware="efi" kernelcmdline="splash" vga="0x303" editbootconfig="my_edit_boot_script" editbootinstall="/absolute/path/to/my_edit_boot_install" fsmountoptions="async" fscreateoptions="-O ^has_journal" btrfs_root_is_snapshot="true" spare_part="200M" xen_server="true" formatoptions="force_size,super=man" filesystem="ext4"> + <type bootloader="grub2" image="oem" primary="true" boot="oemboot/example-distribution" firmware="efi" kernelcmdline="splash" vga="0x303" editbootconfig="my_edit_boot_script" editbootinstall="/absolute/path/to/my_edit_boot_install" fsmountoptions="async" fscreateoptions="-O ^has_journal" btrfs_root_is_snapshot="true" spare_part="200M" spare_part_fs_attributes="no-copy-on-write" xen_server="true" formatoptions="force_size,super=man" filesystem="ext4"> <size unit="G" additive="true">1</size> <systemdisk name="mydisk"/> <machine memory="512" xen_loader="hvmloader"> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/test/unit/boot/image/dracut_test.py new/kiwi-9.19.16/test/unit/boot/image/dracut_test.py --- old/kiwi-9.19.10/test/unit/boot/image/dracut_test.py 2019-10-21 15:31:46.000000000 +0200 +++ new/kiwi-9.19.16/test/unit/boot/image/dracut_test.py 2020-01-17 10:40:21.000000000 +0100 @@ -1,6 +1,7 @@ from mock import ( patch, call, Mock ) +from collections import namedtuple from kiwi.boot.image.dracut import BootImageDracut from kiwi.xml_description import XMLDescription @@ -8,11 +9,16 @@ class TestBootImageKiwi: + @patch('kiwi.boot.image.dracut.Command.run') @patch('kiwi.boot.image.base.os.path.exists') @patch('platform.machine') - def setup(self, mock_machine, mock_exists): + def setup(self, mock_machine, mock_exists, mock_cmd): mock_machine.return_value = 'x86_64' mock_exists.return_value = True + command_type = namedtuple('command', ['output']) + mock_cmd.return_value = command_type( + output='foo\nfoobar\nmodule' + ) description = XMLDescription('../data/example_config.xml') self.xml_state = XMLState( description.load() @@ -20,6 +26,10 @@ self.boot_image = BootImageDracut( self.xml_state, 'some-target-dir', 'system-directory' ) + mock_cmd.assert_called_once_with([ + 'chroot', 'system-directory', 'dracut', + '--list-modules', '--no-kernel' + ]) @patch('kiwi.boot.image.dracut.SystemSetup') @patch('kiwi.boot.image.dracut.Profile') @@ -50,6 +60,7 @@ self.boot_image.include_module('module', install_media=True) self.boot_image.include_module('foobar') + self.boot_image.include_module('not_available') assert self.boot_image.modules == ['foobar'] assert self.boot_image.install_modules == ['module'] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/test/unit/bootloader/install/grub2_test.py new/kiwi-9.19.16/test/unit/bootloader/install/grub2_test.py --- old/kiwi-9.19.10/test/unit/bootloader/install/grub2_test.py 2019-10-21 15:31:46.000000000 +0200 +++ new/kiwi-9.19.16/test/unit/bootloader/install/grub2_test.py 2020-01-24 10:18:45.000000000 +0100 @@ -167,7 +167,7 @@ 'tmp_root/boot/grub2/grubenv' ) mock_which.assert_called_once_with( - custom_env={'PATH': 'tmp_root/usr/sbin'}, filename='grub2-install' + root_dir='tmp_root', filename='grub2-install' ) mock_command.assert_called_once_with( [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/test/unit/builder/disk_test.py new/kiwi-9.19.16/test/unit/builder/disk_test.py --- old/kiwi-9.19.10/test/unit/builder/disk_test.py 2019-11-25 15:12:56.000000000 +0100 +++ new/kiwi-9.19.16/test/unit/builder/disk_test.py 2020-01-23 09:48:12.000000000 +0100 @@ -736,7 +736,10 @@ volume_manager.setup.assert_called_once_with('systemVG') volume_manager.create_volumes.assert_called_once_with('btrfs') volume_manager.mount_volumes.call_args_list[0].assert_called_once_with() - volume_manager.get_fstab.assert_called_once_with(None, 'btrfs') + assert volume_manager.get_fstab.call_args_list == [ + call(None, 'btrfs'), + call(None, 'btrfs') + ] volume_manager.sync_data.assert_called_once_with( [ 'image', '.profile', '.kconfig', '.buildenv', 'var/cache/kiwi', @@ -747,8 +750,8 @@ ) self.setup.create_fstab.assert_called_once_with( [ - 'fstab_volume_entries', 'UUID=blkid_result / blkid_result_fs ro 0 0', + 'fstab_volume_entries', '/dev/systemVG/LVSwap swap swap defaults 0 0', 'UUID=blkid_result /boot blkid_result_fs defaults 0 0', 'UUID=blkid_result /boot/efi blkid_result_fs defaults 0 0' @@ -756,8 +759,8 @@ ) self.boot_image_task.setup.create_fstab.assert_called_once_with( [ - 'fstab_volume_entries', 'UUID=blkid_result / blkid_result_fs ro 0 0', + 'fstab_volume_entries', '/dev/systemVG/LVSwap swap swap defaults 0 0', 'UUID=blkid_result /boot blkid_result_fs defaults 0 0', 'UUID=blkid_result /boot/efi blkid_result_fs defaults 0 0' @@ -837,7 +840,8 @@ assert mock_fs.call_args_list[0] == call( self.disk_builder.spare_part_fs, self.device_map['spare'], - 'root_dir/var/' + 'root_dir/var/', + {'fs_attributes': None} ) assert filesystem.sync_data.call_args_list.pop() == call( [ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/test/unit/builder/install_test.py new/kiwi-9.19.16/test/unit/builder/install_test.py --- old/kiwi-9.19.10/test/unit/builder/install_test.py 2019-11-25 15:12:56.000000000 +0100 +++ new/kiwi-9.19.16/test/unit/builder/install_test.py 2020-01-24 10:18:45.000000000 +0100 @@ -362,18 +362,22 @@ archive.create.assert_called_once_with('tmpdir') mock_chmod.reset_mock() + mock_copy.reset_mock() self.install_image.initrd_system = 'dracut' m_open.reset_mock() with patch('builtins.open', m_open, create=True): self.install_image.create_install_pxe_archive() - self.boot_image_task.include_file.assert_called_once_with( - '/config.bootoptions', install_media=True - ) - mock_copy.assert_called_once_with( - 'root_dir/boot/initrd-kernel_version', - 'tmpdir/result-image.x86_64-1.2.3.initrd' - ) + assert mock_copy.call_args_list == [ + call( + 'root_dir/boot/initrd-kernel_version', + 'tmpdir/result-image.x86_64-1.2.3.initrd' + ), + call( + 'root_dir/config.bootoptions', + 'tmpdir/pxeboot.result-image.x86_64-1.2.3.config.bootoptions' + ) + ] assert mock_chmod.call_args_list == [ call('tmpdir/result-image.x86_64-1.2.3.initrd', 420), call('tmpdir/pxeboot.result-image.x86_64-1.2.3.initrd.xz', 420) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/test/unit/filesystem/base_test.py new/kiwi-9.19.16/test/unit/filesystem/base_test.py --- old/kiwi-9.19.10/test/unit/filesystem/base_test.py 2019-10-21 15:31:46.000000000 +0200 +++ new/kiwi-9.19.16/test/unit/filesystem/base_test.py 2020-01-17 10:40:21.000000000 +0100 @@ -13,7 +13,10 @@ provider.get_device = mock.Mock( return_value='/dev/loop0' ) - self.fsbase = FileSystemBase(provider, 'root_dir') + custom_args = { + 'fs_attributes': ['no-copy-on-write'] + } + self.fsbase = FileSystemBase(provider, 'root_dir', custom_args) def test_root_dir_does_not_exist(self): fsbase = FileSystemBase(mock.Mock(), 'root_dir_not_existing') @@ -35,8 +38,11 @@ @patch('kiwi.filesystem.base.MountManager') @patch('kiwi.filesystem.base.DataSync') + @patch('kiwi.filesystem.base.Command.run') @patch('os.path.exists') - def test_sync_data(self, mock_exists, mock_sync, mock_mount): + def test_sync_data( + self, mock_exists, mock_Command_run, mock_sync, mock_mount + ): mock_exists.return_value = True filesystem_mount = mock.Mock() @@ -56,6 +62,9 @@ mock_mount.assert_called_once_with( device='/dev/loop0' ) + mock_Command_run.assert_called_once_with( + ['chattr', '+C', 'tmpdir'] + ) filesystem_mount.mount.assert_called_once_with([]) filesystem_mount.umount.assert_called_once_with() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/test/unit/package_manager/apt_test.py new/kiwi-9.19.16/test/unit/package_manager/apt_test.py --- old/kiwi-9.19.10/test/unit/package_manager/apt_test.py 2019-11-27 15:08:45.000000000 +0100 +++ new/kiwi-9.19.16/test/unit/package_manager/apt_test.py 2020-01-23 09:48:12.000000000 +0100 @@ -27,12 +27,6 @@ repository.unauthenticated = 'false' repository.components = ['main', 'restricted'] - root_bind = mock.Mock() - root_bind.move_to_root = mock.Mock( - return_value=['root-moved-arguments'] - ) - repository.root_bind = root_bind - repository.runtime_config = mock.Mock( return_value={ 'apt_get_args': ['-c', 'apt.conf', '-y'], @@ -127,13 +121,13 @@ call( [ 'chroot', 'root-dir', 'apt-get', - 'root-moved-arguments', 'update' + '-c', 'apt.conf', '-y', 'update' ], ['env'] ) ] mock_call.assert_called_once_with([ 'chroot', 'root-dir', 'apt-get', - 'root-moved-arguments', 'install', 'vim'], + '-c', 'apt.conf', '-y', 'install', 'vim'], ['env'] ) @@ -142,12 +136,9 @@ def test_process_install_requests(self, mock_run, mock_call): self.manager.request_package('vim') self.manager.process_install_requests() - self.manager.root_bind.move_to_root( - self.manager.apt_get_args - ) mock_call.assert_called_once_with([ 'chroot', 'root-dir', 'apt-get', - 'root-moved-arguments', 'install', 'vim'], + '-c', 'apt.conf', '-y', 'install', 'vim'], ['env'] ) @@ -158,7 +149,7 @@ self.manager.process_delete_requests() mock_call.assert_called_once_with( [ - 'chroot', 'root-dir', 'apt-get', 'root-moved-arguments', + 'chroot', 'root-dir', 'apt-get', '-c', 'apt.conf', '-y', '--auto-remove', 'remove', 'vim' ], ['env'] ) @@ -183,12 +174,9 @@ @patch('kiwi.command.Command.call') def test_update(self, mock_call): self.manager.update() - self.manager.root_bind.move_to_root( - self.manager.apt_get_args - ) mock_call.assert_called_once_with([ 'chroot', 'root-dir', 'apt-get', - 'root-moved-arguments', 'upgrade'], + '-c', 'apt.conf', '-y', 'upgrade'], ['env'] ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/test/unit/package_manager/dnf_test.py new/kiwi-9.19.16/test/unit/package_manager/dnf_test.py --- old/kiwi-9.19.10/test/unit/package_manager/dnf_test.py 2019-10-21 15:31:46.000000000 +0200 +++ new/kiwi-9.19.16/test/unit/package_manager/dnf_test.py 2020-01-23 09:48:12.000000000 +0100 @@ -10,17 +10,11 @@ class TestPackageManagerDnf: def setup(self): repository = mock.Mock() - repository.root_dir = 'root-dir' - - root_bind = mock.Mock() - root_bind.move_to_root = mock.Mock( - return_value=['root-moved-arguments'] - ) - repository.root_bind = root_bind + repository.root_dir = '/root-dir' repository.runtime_config = mock.Mock( return_value={ - 'dnf_args': ['-c', 'dnf.conf', '-y'], + 'dnf_args': ['-c', '/root-dir/dnf.conf', '-y'], 'command_env': ['env'] } ) @@ -49,13 +43,15 @@ self.manager.request_collection('collection') self.manager.process_install_requests_bootstrap() mock_run.assert_called_once_with( - ['dnf', '-c', 'dnf.conf', '-y', 'makecache'] + ['dnf', '-c', '/root-dir/dnf.conf', '-y', 'makecache'] ) mock_call.assert_called_once_with( [ 'bash', '-c', - 'dnf -c dnf.conf -y --installroot root-dir install vim && ' - 'dnf -c dnf.conf -y --installroot root-dir group install ' + 'dnf -c /root-dir/dnf.conf -y ' + '--installroot /root-dir install vim && ' + 'dnf -c /root-dir/dnf.conf -y ' + '--installroot /root-dir group install ' '"collection"' ], ['env'] ) @@ -66,15 +62,12 @@ self.manager.request_collection('collection') self.manager.request_package_exclusion('skipme') self.manager.process_install_requests() - self.manager.root_bind.move_to_root( - self.manager.dnf_args - ) mock_call.assert_called_once_with( [ 'bash', '-c', - 'chroot root-dir dnf root-moved-arguments ' + 'chroot /root-dir dnf -c /dnf.conf -y ' '--exclude=skipme install vim && ' - 'chroot root-dir dnf root-moved-arguments ' + 'chroot /root-dir dnf -c /dnf.conf -y ' '--exclude=skipme group install ' '"collection"' ], ['env'] @@ -87,7 +80,7 @@ self.manager.process_delete_requests(True) mock_call.assert_called_once_with( [ - 'chroot', 'root-dir', 'rpm', '-e', + 'chroot', '/root-dir', 'rpm', '-e', '--nodeps', '--allmatches', '--noscripts', 'vim' ], [ @@ -102,8 +95,8 @@ self.manager.process_delete_requests() mock_call.assert_called_once_with( [ - 'chroot', 'root-dir', 'dnf', - 'root-moved-arguments', 'autoremove', 'vim' + 'chroot', '/root-dir', 'dnf', + '-c', '/dnf.conf', '-y', 'autoremove', 'vim' ], ['env'] ) @@ -118,19 +111,16 @@ with raises(KiwiRequestError): self.manager.process_delete_requests() mock_run.assert_called_once_with( - ['chroot', 'root-dir', 'rpm', '-q', 'vim'] + ['chroot', '/root-dir', 'rpm', '-q', 'vim'] ) @patch('kiwi.command.Command.call') def test_update(self, mock_call): self.manager.update() - self.manager.root_bind.move_to_root( - self.manager.dnf_args - ) mock_call.assert_called_once_with( [ - 'chroot', 'root-dir', 'dnf', - 'root-moved-arguments', 'upgrade' + 'chroot', '/root-dir', 'dnf', + '-c', '/dnf.conf', '-y', 'upgrade' ], ['env'] ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/test/unit/package_manager/zypper_test.py new/kiwi-9.19.16/test/unit/package_manager/zypper_test.py --- old/kiwi-9.19.10/test/unit/package_manager/zypper_test.py 2019-10-21 15:31:46.000000000 +0200 +++ new/kiwi-9.19.16/test/unit/package_manager/zypper_test.py 2020-01-23 09:48:12.000000000 +0100 @@ -2,6 +2,7 @@ from pytest import raises import mock +from kiwi.path import Path from kiwi.package_manager.zypper import PackageManagerZypper from kiwi.exceptions import KiwiRequestError @@ -12,12 +13,6 @@ repository = mock.Mock() repository.root_dir = 'root-dir' - root_bind = mock.Mock() - root_bind.move_to_root = mock.Mock( - return_value=['root-moved-arguments'] - ) - repository.root_bind = root_bind - self.command_env = { 'HOME': '/home/ms', 'ZYPP_CONF': 'root-dir/my/zypp.conf' } @@ -29,13 +24,13 @@ ) self.manager = PackageManagerZypper(repository) - self.chroot_zypper_args = self.manager.root_bind.move_to_root( - self.manager.zypper_args + self.chroot_zypper_args = Path.move_to_root( + 'root-dir', self.manager.zypper_args ) self.chroot_command_env = self.manager.command_env zypp_conf = self.manager.command_env['ZYPP_CONF'] self.chroot_command_env['ZYPP_CONF'] = \ - self.manager.root_bind.move_to_root(zypp_conf)[0] + Path.move_to_root('root-dir', [zypp_conf])[0] def test_request_package(self): self.manager.request_package('name') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/test/unit/repository/apt_test.py new/kiwi-9.19.16/test/unit/repository/apt_test.py --- old/kiwi-9.19.10/test/unit/repository/apt_test.py 2019-10-21 15:31:46.000000000 +0200 +++ new/kiwi-9.19.16/test/unit/repository/apt_test.py 2020-01-23 09:48:12.000000000 +0100 @@ -22,9 +22,6 @@ tmpfile.name = 'tmpfile' mock_temp.return_value = tmpfile root_bind = mock.Mock() - root_bind.move_to_root = mock.Mock( - return_value=['root-moved-arguments'] - ) root_bind.root_dir = '../data' root_bind.shared_location = '/shared-dir' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/test/unit/repository/dnf_test.py new/kiwi-9.19.16/test/unit/repository/dnf_test.py --- old/kiwi-9.19.10/test/unit/repository/dnf_test.py 2019-10-24 11:10:45.000000000 +0200 +++ new/kiwi-9.19.16/test/unit/repository/dnf_test.py 2020-02-03 09:49:29.000000000 +0100 @@ -22,9 +22,6 @@ tmpfile.name = 'tmpfile' mock_temp.return_value = tmpfile root_bind = mock.Mock() - root_bind.move_to_root = mock.Mock( - return_value=['root-moved-arguments'] - ) root_bind.root_dir = '../data' root_bind.shared_location = '/shared-dir' @@ -91,9 +88,11 @@ self.repo.command_env @patch('kiwi.repository.dnf.ConfigParser') + @patch('kiwi.repository.dnf.Defaults.is_buildservice_worker') @patch('os.path.exists') - def test_add_repo(self, mock_exists, mock_config): + def test_add_repo(self, mock_exists, mock_buildservice, mock_config): repo_config = mock.Mock() + mock_buildservice.return_value = False mock_config.return_value = repo_config mock_exists.return_value = True @@ -127,6 +126,29 @@ '/shared-dir/dnf/repos/bar.repo', 'w' ) + @patch('kiwi.repository.dnf.ConfigParser') + @patch('kiwi.repository.dnf.Defaults.is_buildservice_worker') + @patch('os.path.exists') + def test_add_repo_inside_buildservice(self, mock_exists, mock_buildservice, mock_config): + repo_config = mock.Mock() + mock_buildservice.return_value = True + mock_config.return_value = repo_config + mock_exists.return_value = True + + with patch('builtins.open', create=True) as mock_open: + self.repo.add_repo('foo', 'kiwi_iso_mount/uri', 'rpm-md', 42) + + repo_config.add_section.assert_called_once_with('foo') + assert repo_config.set.call_args_list == [ + call('foo', 'name', 'foo'), + call('foo', 'baseurl', 'file://kiwi_iso_mount/uri'), + call('foo', 'priority', '42'), + call('foo', 'module_hotfixes', '1') + ] + mock_open.assert_called_once_with( + '/shared-dir/dnf/repos/foo.repo', 'w' + ) + @patch('kiwi.repository.dnf.RpmDataBase') def test_setup_package_database_configuration(self, mock_RpmDataBase): rpmdb = mock.Mock() @@ -162,9 +184,11 @@ rpmdb.link_database_to_host_path.assert_called_once_with() @patch('kiwi.repository.dnf.ConfigParser') + @patch('kiwi.repository.dnf.Defaults.is_buildservice_worker') @patch('os.path.exists') - def test_add_repo_with_gpgchecks(self, mock_exists, mock_config): + def test_add_repo_with_gpgchecks(self, mock_exists, mock_buildservice, mock_config): repo_config = mock.Mock() + mock_buildservice.return_value = False mock_config.return_value = repo_config mock_exists.return_value = True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/test/unit/repository/zypper_test.py new/kiwi-9.19.16/test/unit/repository/zypper_test.py --- old/kiwi-9.19.10/test/unit/repository/zypper_test.py 2019-10-21 15:31:46.000000000 +0200 +++ new/kiwi-9.19.16/test/unit/repository/zypper_test.py 2020-01-23 09:48:12.000000000 +0100 @@ -27,9 +27,6 @@ tmpfile.name = 'tmpfile' mock_temp.return_value = tmpfile self.root_bind = mock.Mock() - self.root_bind.move_to_root = mock.Mock( - return_value=['root-moved-arguments'] - ) self.root_bind.root_dir = '../data' self.root_bind.shared_location = '/shared-dir' with patch('builtins.open', create=True): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/test/unit/solver/sat_test.py new/kiwi-9.19.16/test/unit/solver/sat_test.py --- old/kiwi-9.19.10/test/unit/solver/sat_test.py 2019-10-24 11:10:45.000000000 +0200 +++ new/kiwi-9.19.16/test/unit/solver/sat_test.py 2020-01-29 09:43:26.000000000 +0100 @@ -99,9 +99,7 @@ return_value=None ) self.sat.solv.Selection.SELECTION_PROVIDES = 0 - self.selection.flags = Mock( - return_value=0 - ) + self.selection.flags = 0 self.selection.isempty = Mock( return_value=True ) @@ -141,9 +139,7 @@ return_value=None ) self.sat.solv.Selection.SELECTION_PROVIDES = 1 - self.selection.flags = Mock( - return_value=1 - ) + self.selection.flags = 1 self.selection.isempty = Mock( return_value=False ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/test/unit/system/kernel_test.py new/kiwi-9.19.16/test/unit/system/kernel_test.py --- old/kiwi-9.19.10/test/unit/system/kernel_test.py 2020-01-11 22:34:48.000000000 +0100 +++ new/kiwi-9.19.16/test/unit/system/kernel_test.py 2020-01-29 09:43:26.000000000 +0100 @@ -18,7 +18,8 @@ 'Image-1.2.3-default', 'zImage-1.2.3-default', 'vmlinuz-1.2.3-default', - 'image-1.2.3-default' + 'image-1.2.3-default', + 'vmlinux-1.2.3-default' ] def test_get_kernel_raises_if_no_kernel_found(self): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/test/unit/system/root_bind_test.py new/kiwi-9.19.16/test/unit/system/root_bind_test.py --- old/kiwi-9.19.10/test/unit/system/root_bind_test.py 2019-10-24 11:10:45.000000000 +0200 +++ new/kiwi-9.19.16/test/unit/system/root_bind_test.py 2020-01-23 09:48:12.000000000 +0100 @@ -204,8 +204,3 @@ with self._caplog.at_level(logging.WARNING): self.bind_root.cleanup() assert 'Path /mountpoint not a mountpoint' in self._caplog.text - - def test_move_to_root(self): - assert self.bind_root.move_to_root( - [self.bind_root.root_dir + '/argument'] - ) == ['/argument'] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/test/unit/system/setup_test.py new/kiwi-9.19.16/test/unit/system/setup_test.py --- old/kiwi-9.19.10/test/unit/system/setup_test.py 2019-12-06 10:58:34.000000000 +0100 +++ new/kiwi-9.19.16/test/unit/system/setup_test.py 2020-01-24 10:18:45.000000000 +0100 @@ -504,7 +504,7 @@ ) self.setup.setup_plymouth_splash() mock_which.assert_called_once_with( - custom_env={'PATH': 'root_dir/usr/sbin'}, + root_dir='root_dir', filename='plymouth-set-default-theme' ) mock_command.assert_called_once_with( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/test/unit/utils/rpm_database_test.py new/kiwi-9.19.16/test/unit/utils/rpm_database_test.py --- old/kiwi-9.19.10/test/unit/utils/rpm_database_test.py 2019-10-21 15:31:46.000000000 +0200 +++ new/kiwi-9.19.16/test/unit/utils/rpm_database_test.py 2020-01-24 10:18:45.000000000 +0100 @@ -16,7 +16,7 @@ mock_Path_which.return_value = None assert self.rpmdb.has_rpm() is False mock_Path_which.assert_called_once_with( - 'rpmdb', access_mode=1, custom_env={'PATH': 'root_dir/usr/bin'} + 'rpmdb', access_mode=1, root_dir='root_dir' ) mock_Path_which.return_value = 'rpm' assert self.rpmdb.has_rpm() is True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.19.10/test/unit/xml_state_test.py new/kiwi-9.19.16/test/unit/xml_state_test.py --- old/kiwi-9.19.10/test/unit/xml_state_test.py 2019-11-25 15:12:56.000000000 +0100 +++ new/kiwi-9.19.16/test/unit/xml_state_test.py 2020-01-17 10:40:21.000000000 +0100 @@ -743,6 +743,9 @@ def test_get_spare_part(self): assert self.state.get_build_type_spare_part_size() == 200 + assert self.state.get_build_type_spare_part_fs_attributes() == [ + 'no-copy-on-write' + ] def test_get_build_type_format_options(self): assert self.state.get_build_type_format_options() == {
