Hello community, here is the log from the commit of package python-kiwi for openSUSE:Factory checked in at 2020-04-14 15:08:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-kiwi (Old) and /work/SRC/openSUSE:Factory/.python-kiwi.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-kiwi" Tue Apr 14 15:08:43 2020 rev:60 rq:792963 version:9.20.6 Changes: -------- --- /work/SRC/openSUSE:Factory/python-kiwi/python-kiwi.changes 2020-04-05 20:49:50.220969758 +0200 +++ /work/SRC/openSUSE:Factory/.python-kiwi.new.2738/python-kiwi.changes 2020-04-14 16:31:05.176094956 +0200 @@ -1,0 +2,32 @@ +Fri Apr 03 16:11:57 CEST 2020 - Marcus Schäfer <[email protected]> + +- Bump version: 9.20.5 → 9.20.6 + +------------------------------------------------------------------- +Thu Apr 02 17:13:26 CEST 2020 - Marcus Schäfer <[email protected]> + +- Fixed plugin documentation + + While setting up the kiwi boxed plugin I realized some small + mistakes in the plugin documentation + +------------------------------------------------------------------- +Thu Apr 02 12:58:38 CEST 2020 - Marcus Schäfer <[email protected]> + +- Allow overlay directories for profiles + + In addition to the existing root/ overlay directory which + applies always there can now also be profile specific overlay + directories. If an overlay directory should be applied for + a specific profile this can now be done by placing this data + in a directory that is named the same as the profile name. + +------------------------------------------------------------------- +Wed Apr 01 14:31:58 CEST 2020 - Marcus Schäfer <[email protected]> + +- Make build of filesystem image optional for pxe + + Allow to build a kernel/initrd pair without a root + filesystem image. Related to Issue #1388 + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-kiwi.spec ++++++ --- /var/tmp/diff_new_pack.bFPVO1/_old 2020-04-14 16:31:05.760095401 +0200 +++ /var/tmp/diff_new_pack.bFPVO1/_new 2020-04-14 16:31:05.764095405 +0200 @@ -43,7 +43,7 @@ %endif Name: python-kiwi -Version: 9.20.5 +Version: 9.20.6 Provides: kiwi-schema = 7.1 Release: 0 Url: https://github.com/SUSE/kiwi ++++++ python-kiwi.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.20.5/.bumpversion.cfg new/kiwi-9.20.6/.bumpversion.cfg --- old/kiwi-9.20.5/.bumpversion.cfg 2020-03-27 10:41:52.000000000 +0100 +++ new/kiwi-9.20.6/.bumpversion.cfg 2020-04-03 16:11:57.000000000 +0200 @@ -1,5 +1,5 @@ [bumpversion] -current_version = 9.20.5 +current_version = 9.20.6 commit = True tag = True diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.20.5/PKG-INFO new/kiwi-9.20.6/PKG-INFO --- old/kiwi-9.20.5/PKG-INFO 2020-03-27 10:43:40.000000000 +0100 +++ new/kiwi-9.20.6/PKG-INFO 2020-04-03 16:13:32.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: kiwi -Version: 9.20.5 +Version: 9.20.6 Summary: KIWI - Appliance Builder (next generation) Home-page: https://osinside.github.io/kiwi Author: Marcus Schaefer Binary files old/kiwi-9.20.5/doc/build/latex/kiwi.pdf and new/kiwi-9.20.6/doc/build/latex/kiwi.pdf differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.20.5/doc/build/man/kiwi.8 new/kiwi-9.20.6/doc/build/man/kiwi.8 --- old/kiwi-9.20.5/doc/build/man/kiwi.8 2020-03-27 10:43:39.000000000 +0100 +++ new/kiwi-9.20.6/doc/build/man/kiwi.8 2020-04-03 16:13:31.000000000 +0200 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "KIWI" "8" "Mar 27, 2020" "9.20.5" "KIWI NG" +.TH "KIWI" "8" "Apr 03, 2020" "9.20.6" "KIWI NG" .SH NAME kiwi \- Creating Operating System Images . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.20.5/doc/build/man/kiwi::image::info.8 new/kiwi-9.20.6/doc/build/man/kiwi::image::info.8 --- old/kiwi-9.20.5/doc/build/man/kiwi::image::info.8 2020-03-27 10:43:39.000000000 +0100 +++ new/kiwi-9.20.6/doc/build/man/kiwi::image::info.8 2020-04-03 16:13:31.000000000 +0200 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "KIWI::IMAGE::INFO" "8" "Mar 27, 2020" "9.20.5" "KIWI NG" +.TH "KIWI::IMAGE::INFO" "8" "Apr 03, 2020" "9.20.6" "KIWI NG" .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.20.5/doc/build/man/kiwi::image::resize.8 new/kiwi-9.20.6/doc/build/man/kiwi::image::resize.8 --- old/kiwi-9.20.5/doc/build/man/kiwi::image::resize.8 2020-03-27 10:43:39.000000000 +0100 +++ new/kiwi-9.20.6/doc/build/man/kiwi::image::resize.8 2020-04-03 16:13:31.000000000 +0200 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "KIWI::IMAGE::RESIZE" "8" "Mar 27, 2020" "9.20.5" "KIWI NG" +.TH "KIWI::IMAGE::RESIZE" "8" "Apr 03, 2020" "9.20.6" "KIWI NG" .SH NAME kiwi::image::resize \- Resize disk images to new geometry . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.20.5/doc/build/man/kiwi::result::bundle.8 new/kiwi-9.20.6/doc/build/man/kiwi::result::bundle.8 --- old/kiwi-9.20.5/doc/build/man/kiwi::result::bundle.8 2020-03-27 10:43:39.000000000 +0100 +++ new/kiwi-9.20.6/doc/build/man/kiwi::result::bundle.8 2020-04-03 16:13:31.000000000 +0200 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "KIWI::RESULT::BUNDLE" "8" "Mar 27, 2020" "9.20.5" "KIWI NG" +.TH "KIWI::RESULT::BUNDLE" "8" "Apr 03, 2020" "9.20.6" "KIWI NG" .SH NAME kiwi::result::bundle \- Bundle build results . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.20.5/doc/build/man/kiwi::result::list.8 new/kiwi-9.20.6/doc/build/man/kiwi::result::list.8 --- old/kiwi-9.20.5/doc/build/man/kiwi::result::list.8 2020-03-27 10:43:39.000000000 +0100 +++ new/kiwi-9.20.6/doc/build/man/kiwi::result::list.8 2020-04-03 16:13:31.000000000 +0200 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "KIWI::RESULT::LIST" "8" "Mar 27, 2020" "9.20.5" "KIWI NG" +.TH "KIWI::RESULT::LIST" "8" "Apr 03, 2020" "9.20.6" "KIWI NG" .SH NAME kiwi::result::list \- List build results . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.20.5/doc/build/man/kiwi::system::build.8 new/kiwi-9.20.6/doc/build/man/kiwi::system::build.8 --- old/kiwi-9.20.5/doc/build/man/kiwi::system::build.8 2020-03-27 10:43:39.000000000 +0100 +++ new/kiwi-9.20.6/doc/build/man/kiwi::system::build.8 2020-04-03 16:13:31.000000000 +0200 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "KIWI::SYSTEM::BUILD" "8" "Mar 27, 2020" "9.20.5" "KIWI NG" +.TH "KIWI::SYSTEM::BUILD" "8" "Apr 03, 2020" "9.20.6" "KIWI NG" .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.20.5/doc/build/man/kiwi::system::create.8 new/kiwi-9.20.6/doc/build/man/kiwi::system::create.8 --- old/kiwi-9.20.5/doc/build/man/kiwi::system::create.8 2020-03-27 10:43:39.000000000 +0100 +++ new/kiwi-9.20.6/doc/build/man/kiwi::system::create.8 2020-04-03 16:13:31.000000000 +0200 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "KIWI::SYSTEM::CREATE" "8" "Mar 27, 2020" "9.20.5" "KIWI NG" +.TH "KIWI::SYSTEM::CREATE" "8" "Apr 03, 2020" "9.20.6" "KIWI NG" .SH NAME kiwi::system::create \- Create image from prepared root system . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.20.5/doc/build/man/kiwi::system::prepare.8 new/kiwi-9.20.6/doc/build/man/kiwi::system::prepare.8 --- old/kiwi-9.20.5/doc/build/man/kiwi::system::prepare.8 2020-03-27 10:43:39.000000000 +0100 +++ new/kiwi-9.20.6/doc/build/man/kiwi::system::prepare.8 2020-04-03 16:13:31.000000000 +0200 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "KIWI::SYSTEM::PREPARE" "8" "Mar 27, 2020" "9.20.5" "KIWI NG" +.TH "KIWI::SYSTEM::PREPARE" "8" "Apr 03, 2020" "9.20.6" "KIWI NG" .SH NAME kiwi::system::prepare \- Prepare image root system . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.20.5/doc/build/man/kiwi::system::update.8 new/kiwi-9.20.6/doc/build/man/kiwi::system::update.8 --- old/kiwi-9.20.5/doc/build/man/kiwi::system::update.8 2020-03-27 10:43:39.000000000 +0100 +++ new/kiwi-9.20.6/doc/build/man/kiwi::system::update.8 2020-04-03 16:13:31.000000000 +0200 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "KIWI::SYSTEM::UPDATE" "8" "Mar 27, 2020" "9.20.5" "KIWI NG" +.TH "KIWI::SYSTEM::UPDATE" "8" "Apr 03, 2020" "9.20.6" "KIWI NG" .SH NAME kiwi::system::update \- Update/Upgrade image root system . diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.20.5/kiwi/builder/pxe.py new/kiwi-9.20.6/kiwi/builder/pxe.py --- old/kiwi-9.20.5/kiwi/builder/pxe.py 2020-02-28 15:13:35.000000000 +0100 +++ new/kiwi-9.20.6/kiwi/builder/pxe.py 2020-04-03 16:11:54.000000000 +0200 @@ -54,9 +54,11 @@ self.compressed = xml_state.build_type.get_compressed() self.xen_server = xml_state.is_xen_server() self.custom_cmdline = xml_state.build_type.get_kernelcmdline() - self.filesystem = FileSystemBuilder( - xml_state, target_dir, root_dir + '/' - ) + self.filesystem = xml_state.build_type.get_filesystem() + if self.filesystem: + self.filesystem = FileSystemBuilder( + xml_state, target_dir, root_dir + '/' + ) self.system_setup = SystemSetup( xml_state=xml_state, root_dir=root_dir ) @@ -80,6 +82,7 @@ '-' + xml_state.get_image_version() ] ) + self.image = None self.append_file = ''.join([self.image_name, '.append']) self.archive_name = ''.join([self.image_name, '.tar']) self.checksum_name = ''.join([self.image_name, '.md5']) @@ -105,21 +108,22 @@ :rtype: instance of :class:`Result` """ - log.info('Creating PXE root filesystem image') - self.filesystem.create() - os.rename( - self.filesystem.filename, self.image_name - ) - self.image = self.image_name - if self.compressed: - log.info('xz compressing root filesystem image') - compress = Compress(self.image) - compress.xz(self.xz_options) - self.image = compress.compressed_filename - - log.info('Creating PXE root filesystem MD5 checksum') - checksum = Checksum(self.image) - checksum.md5(self.checksum_name) + if self.filesystem: + log.info('Creating PXE root filesystem image') + self.filesystem.create() + os.rename( + self.filesystem.filename, self.image_name + ) + self.image = self.image_name + if self.compressed: + log.info('xz compressing root filesystem image') + compress = Compress(self.image) + compress.xz(self.xz_options) + self.image = compress.compressed_filename + + log.info('Creating PXE root filesystem MD5 checksum') + checksum = Checksum(self.image) + checksum.md5(self.checksum_name) # prepare boot(initrd) root system log.info('Creating PXE boot image') @@ -177,7 +181,8 @@ # create pxe config append information # this information helps to configure the boot server correctly - if self.filesystem.root_uuid and self.initrd_system == 'dracut': + if self.filesystem and self.filesystem.root_uuid \ + and self.initrd_system == 'dracut': cmdline = 'root=UUID={}'.format(self.filesystem.root_uuid) if self.custom_cmdline: cmdline += ' {}'.format(self.custom_cmdline) @@ -191,11 +196,14 @@ pxe_tarball_files = [ self.kernel_filename, os.path.basename(self.boot_image_task.initrd_filename), - os.path.basename(self.image), os.path.basename(self.checksum_name), ] - if self.filesystem.root_uuid and self.initrd_system == 'dracut': + if self.image: + pxe_tarball_files.append(os.path.basename(self.image)) + + if self.filesystem and self.filesystem.root_uuid \ + and self.initrd_system == 'dracut': pxe_tarball_files.append(os.path.basename(self.append_file)) pxe_tarball = ArchiveTar( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.20.5/kiwi/schema/kiwi.rnc new/kiwi-9.20.6/kiwi/schema/kiwi.rnc --- old/kiwi-9.20.5/kiwi/schema/kiwi.rnc 2020-03-27 10:41:44.000000000 +0100 +++ new/kiwi-9.20.6/kiwi/schema/kiwi.rnc 2020-04-03 16:11:54.000000000 +0200 @@ -1405,7 +1405,7 @@ >> sch:pattern [ id = "filesystem_mandatory" is-a = "image_type_requirement" sch:param [ name = "attr" value = "filesystem" ] - sch:param [ name = "types" value = "vmx oem pxe" ] + sch:param [ name = "types" value = "vmx oem" ] ] k.type.squashfscompression.attribute = ## Specifies the compression type for mksquashfs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.20.5/kiwi/schema/kiwi.rng new/kiwi-9.20.6/kiwi/schema/kiwi.rng --- old/kiwi-9.20.5/kiwi/schema/kiwi.rng 2020-03-27 10:41:44.000000000 +0100 +++ new/kiwi-9.20.6/kiwi/schema/kiwi.rng 2020-04-03 16:11:54.000000000 +0200 @@ -2104,7 +2104,7 @@ </sch:pattern> <sch:pattern id="filesystem_mandatory" is-a="image_type_requirement"> <sch:param name="attr" value="filesystem"/> - <sch:param name="types" value="vmx oem pxe"/> + <sch:param name="types" value="vmx oem"/> </sch:pattern> </define> <define name="k.type.squashfscompression.attribute"> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.20.5/kiwi/system/setup.py new/kiwi-9.20.6/kiwi/system/setup.py --- old/kiwi-9.20.5/kiwi/system/setup.py 2020-03-27 10:41:44.000000000 +0100 +++ new/kiwi-9.20.6/kiwi/system/setup.py 2020-04-03 16:11:54.000000000 +0200 @@ -177,7 +177,18 @@ Copy overlay files from the image description to the image root tree. Supported are a root/ directory or a root.tar.gz tarball. The root/ directory takes - precedence over the tarball + precedence over the tarball. + + In addition the method also supports profile specific + overlay files which are searched in a directory of the + same name as the profile name. + + The overall order for including overlay files is as + follows: + + 1. root/ dir or root.tar.gz + 2. PROFILE_NAME/ dir(s) in the order of the selected + profiles :param bool follow_links: follow symlinks true|false :param bool preserve_owner_group: preserve permissions true|false @@ -185,28 +196,24 @@ overlay_directory = self.description_dir + '/root/' overlay_archive = self.description_dir + '/root.tar.gz' if os.path.exists(overlay_directory): - log.info('Copying user defined files to image tree') - sync_options = [ - '-r', '-p', '-t', '-D', '-H', '-X', '-A', '--one-file-system' - ] - if follow_links: - sync_options.append('--copy-links') - else: - sync_options.append('--links') - if preserve_owner_group: - sync_options.append('-o') - sync_options.append('-g') - data = DataSync( - overlay_directory, self.root_dir - ) - data.sync_data( - options=sync_options + self._sync_overlay_files( + overlay_directory, follow_links, preserve_owner_group ) elif os.path.exists(overlay_archive): log.info('Extracting user defined files from archive to image tree') archive = ArchiveTar(overlay_archive) archive.extract(self.root_dir) + for profile in self.xml_state.profiles: + overlay_directory = os.sep.join( + [self.description_dir, profile] + ) + os.sep + if os.path.exists(overlay_directory): + self._sync_overlay_files( + overlay_directory, follow_links, preserve_owner_group, + profile + ) + def setup_machine_id(self): """ Setup systemd machine id @@ -1047,3 +1054,29 @@ if shared_mount.is_mounted(): shared_mount.umount_lazy() return dbpath + + def _sync_overlay_files( + self, overlay_directory, follow_links=False, + preserve_owner_group=False, profile=None + ): + log.info( + 'Copying user defined {0} to image tree'.format( + 'files for profile: {0}'.format(profile) if profile else 'files' + ) + ) + sync_options = [ + '-r', '-p', '-t', '-D', '-H', '-X', '-A', '--one-file-system' + ] + if follow_links: + sync_options.append('--copy-links') + else: + sync_options.append('--links') + if preserve_owner_group: + sync_options.append('-o') + sync_options.append('-g') + data = DataSync( + overlay_directory, self.root_dir + ) + data.sync_data( + options=sync_options + ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.20.5/kiwi/version.py new/kiwi-9.20.6/kiwi/version.py --- old/kiwi-9.20.5/kiwi/version.py 2020-03-27 10:41:52.000000000 +0100 +++ new/kiwi-9.20.6/kiwi/version.py 2020-04-03 16:11:57.000000000 +0200 @@ -18,5 +18,5 @@ """ Global version information used in kiwi and the package """ -__version__ = '9.20.5' -__githash__ = '6d05b8dbff89d5bfd15d47e65f1d21f88de5c92f' +__version__ = '9.20.6' +__githash__ = '974662934da9d4ff7d2f1d952bcf0d252ad12d80' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi-9.20.5/kiwi.egg-info/PKG-INFO new/kiwi-9.20.6/kiwi.egg-info/PKG-INFO --- old/kiwi-9.20.5/kiwi.egg-info/PKG-INFO 2020-03-27 10:43:40.000000000 +0100 +++ new/kiwi-9.20.6/kiwi.egg-info/PKG-INFO 2020-04-03 16:13:32.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: kiwi -Version: 9.20.5 +Version: 9.20.6 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.20.5/test/unit/system/setup_test.py new/kiwi-9.20.6/test/unit/system/setup_test.py --- old/kiwi-9.20.5/test/unit/system/setup_test.py 2020-03-27 10:41:44.000000000 +0100 +++ new/kiwi-9.20.6/test/unit/system/setup_test.py 2020-04-03 16:11:54.000000000 +0200 @@ -264,6 +264,31 @@ 'root_dir' ) + @patch('kiwi.system.setup.DataSync') + @patch('os.path.exists') + def test_import_overlay_files_from_profile( + self, mock_os_path, mock_DataSync + ): + exists_results = [True, False, False] + + def side_effect(arg): + return exists_results.pop() + + data = Mock() + mock_DataSync.return_value = data + mock_os_path.side_effect = side_effect + self.xml_state.profiles = ['profile_root'] + self.setup.import_overlay_files() + mock_DataSync.assert_called_once_with( + 'description_dir/profile_root/', 'root_dir' + ) + data.sync_data.assert_called_once_with( + options=[ + '-r', '-p', '-t', '-D', '-H', '-X', '-A', + '--one-file-system', '--links' + ] + ) + @patch('kiwi.system.setup.Shell.run_common_function') @patch('kiwi.system.setup.Command.run') @patch('os.path.exists')
