Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-kiwi for openSUSE:Factory 
checked in at 2021-09-21 21:12:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-kiwi (Old)
 and      /work/SRC/openSUSE:Factory/.python-kiwi.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-kiwi"

Tue Sep 21 21:12:18 2021 rev:83 rq:919900 version:9.23.56

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-kiwi/python-kiwi.changes  2021-09-13 
16:24:30.366742975 +0200
+++ /work/SRC/openSUSE:Factory/.python-kiwi.new.1899/python-kiwi.changes        
2021-09-21 21:12:24.406588703 +0200
@@ -1,0 +2,59 @@
+Fri Sep 10 23:52:50 CEST 2021 - Marcus Sch??fer <[email protected]>
+
+- Bump version: 9.23.55 ??? 9.23.56
+
+-------------------------------------------------------------------
+Fri Sep 10 22:42:23 CEST 2021 - Marcus Sch??fer <[email protected]>
+
+- Only wipe bundle dir when required
+
+  The given result bundle dir must only be wiped if the
+  request to turn the result files into an rpm was given.
+  Only in this case the given bundle dir must start empty
+
+-------------------------------------------------------------------
+Fri Sep 10 22:30:55 CEST 2021 - Marcus Sch??fer <[email protected]>
+
+- Fixed uninstall handling via dnf, microdnf, zypper
+
+  The above package managers supports uninstall instructions
+  like 'iwl*'. In kiwi there was code checking via rpm if
+  the packages given to uninstall actually exists. That code
+  does not work if the given package to uninstall is an
+  instruction that matches a pattern. Therefore if we use
+  the uninstall section in the kiwi image description, just
+  pass the provided information to the package manager and
+  don't try to be clever in kiwi itself.
+
+-------------------------------------------------------------------
+Thu Sep 09 13:17:47 CEST 2021 - Marcus Sch??fer <[email protected]>
+
+- Allow to set --logfile for result namespace
+
+  Setting a logfile for e.g 'kiwi-ng result bundle ...'
+  is useful and should be possible
+
+-------------------------------------------------------------------
+Thu Sep 09 10:00:04 CEST 2021 - Marcus Sch??fer <[email protected]>
+
+- Bump version: 9.23.54 ??? 9.23.55
+
+-------------------------------------------------------------------
+Wed Sep 08 13:07:47 CEST 2021 - Marcus Sch??fer <[email protected]>
+
+- Added support for building rpm package from bundle
+
+  With the new option --package-as-rpm it is possible to
+  call the kiwi result bundler such that the image build
+  results gets packaged into an rpm. I think this is a
+  handy feature to transport image builds via repositories
+
+-------------------------------------------------------------------
+Wed Sep 08 10:11:23 CEST 2021 - Marcus Sch??fer <[email protected]>
+
+- Fixed MicroOS integration test
+
+  With ignition/combustion in place it's not allowed
+  to use tmp as a subvolume
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-kiwi.spec ++++++
--- /var/tmp/diff_new_pack.bHOA38/_old  2021-09-21 21:12:25.310589725 +0200
+++ /var/tmp/diff_new_pack.bHOA38/_new  2021-09-21 21:12:25.314589730 +0200
@@ -43,7 +43,7 @@
 %endif
 
 Name:           python-kiwi
-Version:        9.23.54
+Version:        9.23.56
 Provides:       kiwi-schema = 7.4
 Release:        0
 Url:            https://github.com/OSInside/kiwi

++++++ PKGBUILD ++++++
--- /var/tmp/diff_new_pack.bHOA38/_old  2021-09-21 21:12:25.346589766 +0200
+++ /var/tmp/diff_new_pack.bHOA38/_new  2021-09-21 21:12:25.350589770 +0200
@@ -3,7 +3,7 @@
 
 pkgname=('python-kiwi' 'kiwi-man-pages' 'dracut-kiwi-lib' 
'dracut-kiwi-oem-repart' 'dracut-kiwi-oem-dump' 'dracut-kiwi-live' 
'dracut-kiwi-overlay')
 arch=(x86_64)
-pkgver=9.23.54
+pkgver=9.23.56
 pkgrel=0
 pkgdesc="KIWI - Appliance Builder Next Generation"
 url="https://github.com/SUSE/kiwi/tarball/master";
@@ -12,7 +12,7 @@
 provides=(kiwi-ng kiwi)
 source=("${pkgname}.tar.gz")
 changelog="${pkgname}.changes"
-md5sums=('c16bb2aeea3086ece63052b4f1641064')
+md5sums=('a895746efe896fcd873035a01bc1d3cb')
 
 
 build() {

++++++ python-kiwi.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi-9.23.54/.bumpversion.cfg 
new/kiwi-9.23.56/.bumpversion.cfg
--- old/kiwi-9.23.54/.bumpversion.cfg   2021-09-07 18:02:22.000000000 +0200
+++ new/kiwi-9.23.56/.bumpversion.cfg   2021-09-10 23:52:50.000000000 +0200
@@ -1,9 +1,8 @@
 [bumpversion]
-current_version = 9.23.54
+current_version = 9.23.56
 commit = True
 tag = True
 
 [bumpversion:file:kiwi/version.py]
 
 [bumpversion:file:doc/source/conf.py]
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi-9.23.54/PKG-INFO new/kiwi-9.23.56/PKG-INFO
--- old/kiwi-9.23.54/PKG-INFO   2021-09-07 18:04:33.000000000 +0200
+++ new/kiwi-9.23.56/PKG-INFO   2021-09-10 23:56:28.541590200 +0200
@@ -1,39 +1,12 @@
 Metadata-Version: 2.1
 Name: kiwi
-Version: 9.23.54
+Version: 9.23.56
 Summary: KIWI - Appliance Builder (next generation)
 Home-page: https://osinside.github.io/kiwi
 Author: Marcus Schaefer
 Author-email: [email protected]
 License: GPLv3+
 Download-URL: 
https://download.opensuse.org/repositories/Virtualization:/Appliances:/Builder
-Description: KIWI - Next Generation
-        ======================
-        
-        .. |GitLab CI Pipeline| image:: 
https://gitlab.com/kiwi3/kiwi-ci/badges/master/pipeline.svg
-           :target: https://gitlab.com/kiwi3/kiwi-ci/-/pipelines
-        .. |Health| image:: 
https://api.codacy.com/project/badge/Grade/8ebd8ce362294fabb0870f50358e564f
-           :target: 
https://www.codacy.com/app/Appliances/kiwi?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=OSInside/kiwi&amp;utm_campaign=Badge_Grade
-        .. |Doc| replace:: `Documentation <https://osinside.github.io/kiwi/>`__
-        .. |Installation| replace:: `Installation 
<https://osinside.github.io/kiwi/installation.html>`__
-        .. |Contributing| replace:: `Contributing 
<https://osinside.github.io/kiwi/contributing.html>`__
-        .. |Donate| image:: 
https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif
-           :target: https://www.paypal.me/SchaeferMarcus
-        
-        |GitLab CI Pipeline| |Health|
-        
-        **KIWI, the OS image and appliance builder.**
-        
-        * |Installation|
-        
-        * |Contributing|
-        
-        * |Doc|
-        
-        We'll donate it for good luck so's you're sure to come back :)
-        
-        |Donate|
-        
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
@@ -43,3 +16,33 @@
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Topic :: System :: Operating System
 Description-Content-Type: text/x-rst
+License-File: LICENSE
+
+KIWI - Next Generation
+======================
+
+.. |GitLab CI Pipeline| image:: 
https://gitlab.com/kiwi3/kiwi-ci/badges/master/pipeline.svg
+   :target: https://gitlab.com/kiwi3/kiwi-ci/-/pipelines
+.. |Health| image:: 
https://api.codacy.com/project/badge/Grade/8ebd8ce362294fabb0870f50358e564f
+   :target: 
https://www.codacy.com/app/Appliances/kiwi?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=OSInside/kiwi&amp;utm_campaign=Badge_Grade
+.. |Doc| replace:: `Documentation <https://osinside.github.io/kiwi/>`__
+.. |Installation| replace:: `Installation 
<https://osinside.github.io/kiwi/installation.html>`__
+.. |Contributing| replace:: `Contributing 
<https://osinside.github.io/kiwi/contributing.html>`__
+.. |Donate| image:: 
https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif
+   :target: https://www.paypal.me/SchaeferMarcus
+
+|GitLab CI Pipeline| |Health|
+
+**KIWI, the OS image and appliance builder.**
+
+* |Installation|
+
+* |Contributing|
+
+* |Doc|
+
+We'll donate it for good luck so's you're sure to come back :)
+
+|Donate|
+
+
Binary files old/kiwi-9.23.54/doc/build/latex/kiwi.pdf and 
new/kiwi-9.23.56/doc/build/latex/kiwi.pdf differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi-9.23.54/doc/build/man/kiwi.8 
new/kiwi-9.23.56/doc/build/man/kiwi.8
--- old/kiwi-9.23.54/doc/build/man/kiwi.8       2021-09-07 18:04:32.000000000 
+0200
+++ new/kiwi-9.23.56/doc/build/man/kiwi.8       2021-09-10 23:56:27.000000000 
+0200
@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH "KIWI" "8" "Sep 07, 2021" "9.23.54" "KIWI NG"
+.TH "KIWI" "8" "Sep 10, 2021" "9.23.56" "KIWI NG"
 .SH NAME
 kiwi \- Creating Operating System Images
 .
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi-9.23.54/doc/build/man/kiwi::image::info.8 
new/kiwi-9.23.56/doc/build/man/kiwi::image::info.8
--- old/kiwi-9.23.54/doc/build/man/kiwi::image::info.8  2021-09-07 
18:04:32.000000000 +0200
+++ new/kiwi-9.23.56/doc/build/man/kiwi::image::info.8  2021-09-10 
23:56:27.000000000 +0200
@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH "KIWI::IMAGE::INFO" "8" "Sep 07, 2021" "9.23.54" "KIWI NG"
+.TH "KIWI::IMAGE::INFO" "8" "Sep 10, 2021" "9.23.56" "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.23.54/doc/build/man/kiwi::image::resize.8 
new/kiwi-9.23.56/doc/build/man/kiwi::image::resize.8
--- old/kiwi-9.23.54/doc/build/man/kiwi::image::resize.8        2021-09-07 
18:04:32.000000000 +0200
+++ new/kiwi-9.23.56/doc/build/man/kiwi::image::resize.8        2021-09-10 
23:56:27.000000000 +0200
@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH "KIWI::IMAGE::RESIZE" "8" "Sep 07, 2021" "9.23.54" "KIWI NG"
+.TH "KIWI::IMAGE::RESIZE" "8" "Sep 10, 2021" "9.23.56" "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.23.54/doc/build/man/kiwi::result::bundle.8 
new/kiwi-9.23.56/doc/build/man/kiwi::result::bundle.8
--- old/kiwi-9.23.54/doc/build/man/kiwi::result::bundle.8       2021-09-07 
18:04:32.000000000 +0200
+++ new/kiwi-9.23.56/doc/build/man/kiwi::result::bundle.8       2021-09-10 
23:56:27.000000000 +0200
@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH "KIWI::RESULT::BUNDLE" "8" "Sep 07, 2021" "9.23.54" "KIWI NG"
+.TH "KIWI::RESULT::BUNDLE" "8" "Sep 10, 2021" "9.23.56" "KIWI NG"
 .SH NAME
 kiwi::result::bundle \- Bundle build results
 .
@@ -41,6 +41,7 @@
 kiwi\-ng result bundle \-h | \-\-help
 kiwi\-ng result bundle \-\-target\-dir=<directory> \-\-id=<bundle_id> 
\-\-bundle\-dir=<directory>
     [\-\-zsync_source=<download_location>]
+    [\-\-package\-as\-rpm]
 kiwi\-ng result bundle help
 .ft P
 .fi
@@ -79,6 +80,9 @@
 It is expected that all files from a bundle are placed to the same
 download location
 .UNINDENT
+.TP
+.B \-\-package\-as\-rpm
+Take all result files and create an rpm package out of it
 .UNINDENT
 .SH AUTHOR
 Marcus Sch??fer
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi-9.23.54/doc/build/man/kiwi::result::list.8 
new/kiwi-9.23.56/doc/build/man/kiwi::result::list.8
--- old/kiwi-9.23.54/doc/build/man/kiwi::result::list.8 2021-09-07 
18:04:32.000000000 +0200
+++ new/kiwi-9.23.56/doc/build/man/kiwi::result::list.8 2021-09-10 
23:56:27.000000000 +0200
@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH "KIWI::RESULT::LIST" "8" "Sep 07, 2021" "9.23.54" "KIWI NG"
+.TH "KIWI::RESULT::LIST" "8" "Sep 10, 2021" "9.23.56" "KIWI NG"
 .SH NAME
 kiwi::result::list \- List build results
 .
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi-9.23.54/doc/build/man/kiwi::system::build.8 
new/kiwi-9.23.56/doc/build/man/kiwi::system::build.8
--- old/kiwi-9.23.54/doc/build/man/kiwi::system::build.8        2021-09-07 
18:04:32.000000000 +0200
+++ new/kiwi-9.23.56/doc/build/man/kiwi::system::build.8        2021-09-10 
23:56:27.000000000 +0200
@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH "KIWI::SYSTEM::BUILD" "8" "Sep 07, 2021" "9.23.54" "KIWI NG"
+.TH "KIWI::SYSTEM::BUILD" "8" "Sep 10, 2021" "9.23.56" "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.23.54/doc/build/man/kiwi::system::create.8 
new/kiwi-9.23.56/doc/build/man/kiwi::system::create.8
--- old/kiwi-9.23.54/doc/build/man/kiwi::system::create.8       2021-09-07 
18:04:32.000000000 +0200
+++ new/kiwi-9.23.56/doc/build/man/kiwi::system::create.8       2021-09-10 
23:56:27.000000000 +0200
@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH "KIWI::SYSTEM::CREATE" "8" "Sep 07, 2021" "9.23.54" "KIWI NG"
+.TH "KIWI::SYSTEM::CREATE" "8" "Sep 10, 2021" "9.23.56" "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.23.54/doc/build/man/kiwi::system::prepare.8 
new/kiwi-9.23.56/doc/build/man/kiwi::system::prepare.8
--- old/kiwi-9.23.54/doc/build/man/kiwi::system::prepare.8      2021-09-07 
18:04:32.000000000 +0200
+++ new/kiwi-9.23.56/doc/build/man/kiwi::system::prepare.8      2021-09-10 
23:56:27.000000000 +0200
@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH "KIWI::SYSTEM::PREPARE" "8" "Sep 07, 2021" "9.23.54" "KIWI NG"
+.TH "KIWI::SYSTEM::PREPARE" "8" "Sep 10, 2021" "9.23.56" "KIWI NG"
 .SH NAME
 kiwi::system::prepare \- Prepare image root system
 .
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi-9.23.54/doc/build/man/kiwi::system::update.8 
new/kiwi-9.23.56/doc/build/man/kiwi::system::update.8
--- old/kiwi-9.23.54/doc/build/man/kiwi::system::update.8       2021-09-07 
18:04:32.000000000 +0200
+++ new/kiwi-9.23.56/doc/build/man/kiwi::system::update.8       2021-09-10 
23:56:27.000000000 +0200
@@ -1,6 +1,6 @@
 .\" Man page generated from reStructuredText.
 .
-.TH "KIWI::SYSTEM::UPDATE" "8" "Sep 07, 2021" "9.23.54" "KIWI NG"
+.TH "KIWI::SYSTEM::UPDATE" "8" "Sep 10, 2021" "9.23.56" "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.23.54/kiwi/cli.py new/kiwi-9.23.56/kiwi/cli.py
--- old/kiwi-9.23.54/kiwi/cli.py        2021-09-02 16:55:04.000000000 +0200
+++ new/kiwi-9.23.56/kiwi/cli.py        2021-09-10 23:52:18.000000000 +0200
@@ -25,7 +25,8 @@
                [--color-output]
                [--config=<configfile>]
            image <command> [<args>...]
-       kiwi-ng [--debug]
+       kiwi-ng [--logfile=<filename>]
+               [--debug]
                [--color-output]
                [--config=<configfile>]
            result <command> [<args>...]
@@ -51,6 +52,10 @@
         use specified runtime configuration file. If
         not specified the runtime configuration is looked
         up at ~/.config/kiwi/config.yml or /etc/kiwi.yml
+    --logfile=<filename>
+        create a log file containing all log information including
+        debug information even if this is was not requested by the
+        debug switch
     --debug
         print debug information
     -v --version
@@ -59,10 +64,6 @@
         show manual page
 
 global options for services: image, system
-    --logfile=<filename>
-        create a log file containing all log information including
-        debug information even if this is was not requested by the
-        debug switch
     --profile=<name>
         profile name, multiple profiles can be selected by passing
         this option multiple times
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi-9.23.54/kiwi/package_manager/dnf.py 
new/kiwi-9.23.56/kiwi/package_manager/dnf.py
--- old/kiwi-9.23.54/kiwi/package_manager/dnf.py        2021-07-14 
18:09:36.000000000 +0200
+++ new/kiwi-9.23.56/kiwi/package_manager/dnf.py        2021-09-10 
23:52:18.000000000 +0200
@@ -154,20 +154,22 @@
 
         :rtype: namedtuple
         """
-        delete_items = []
-        for delete_item in self.package_requests:
-            try:
-                Command.run(['chroot', self.root_dir, 'rpm', '-q', 
delete_item])
-                delete_items.append(delete_item)
-            except Exception:
-                # ignore packages which are not installed
-                pass
-        if not delete_items:
-            raise KiwiRequestError(
-                'None of the requested packages to delete are installed'
-            )
-        self.cleanup_requests()
         if force:
+            delete_items = []
+            for delete_item in self.package_requests:
+                try:
+                    Command.run(
+                        ['chroot', self.root_dir, 'rpm', '-q', delete_item]
+                    )
+                    delete_items.append(delete_item)
+                except Exception:
+                    # ignore packages which are not installed
+                    pass
+            if not delete_items:
+                raise KiwiRequestError(
+                    'None of the requested packages to delete are installed'
+                )
+            self.cleanup_requests()
             delete_options = ['--nodeps', '--allmatches', '--noscripts']
             return Command.call(
                 [
@@ -177,13 +179,14 @@
             )
         else:
             chroot_dnf_args = Path.move_to_root(self.root_dir, self.dnf_args)
+            dnf_command = [
+                'chroot', self.root_dir, 'dnf'
+            ] + chroot_dnf_args + self.custom_args + [
+                'autoremove'
+            ] + self.package_requests
+            self.cleanup_requests()
             return Command.call(
-                [
-                    'chroot', self.root_dir, 'dnf'
-                ] + chroot_dnf_args + self.custom_args + [
-                    'autoremove'
-                ] + delete_items,
-                self.command_env
+                dnf_command, self.command_env
             )
 
     def update(self) -> command_call_type:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi-9.23.54/kiwi/package_manager/microdnf.py 
new/kiwi-9.23.56/kiwi/package_manager/microdnf.py
--- old/kiwi-9.23.54/kiwi/package_manager/microdnf.py   2021-07-14 
18:09:36.000000000 +0200
+++ new/kiwi-9.23.56/kiwi/package_manager/microdnf.py   2021-09-10 
23:52:18.000000000 +0200
@@ -168,20 +168,22 @@
 
         :rtype: namedtuple
         """
-        delete_items = []
-        for delete_item in self.package_requests:
-            try:
-                Command.run(['chroot', self.root_dir, 'rpm', '-q', 
delete_item])
-                delete_items.append(delete_item)
-            except Exception:
-                # ignore packages which are not installed
-                pass
-        if not delete_items:
-            raise KiwiRequestError(
-                'None of the requested packages to delete are installed'
-            )
-        self.cleanup_requests()
         if force:
+            delete_items = []
+            for delete_item in self.package_requests:
+                try:
+                    Command.run(
+                        ['chroot', self.root_dir, 'rpm', '-q', delete_item]
+                    )
+                    delete_items.append(delete_item)
+                except Exception:
+                    # ignore packages which are not installed
+                    pass
+            if not delete_items:
+                raise KiwiRequestError(
+                    'None of the requested packages to delete are installed'
+                )
+            self.cleanup_requests()
             delete_options = ['--nodeps', '--allmatches', '--noscripts']
             return Command.call(
                 [
@@ -191,13 +193,14 @@
             )
         else:
             chroot_dnf_args = Path.move_to_root(self.root_dir, self.dnf_args)
+            dnf_command = [
+                'chroot', self.root_dir, 'microdnf'
+            ] + chroot_dnf_args + self.custom_args + [
+                'remove'
+            ] + self.package_requests
+            self.cleanup_requests()
             return Command.call(
-                [
-                    'chroot', self.root_dir, 'microdnf'
-                ] + chroot_dnf_args + self.custom_args + [
-                    'remove'
-                ] + delete_items,
-                self.command_env
+                dnf_command, self.command_env
             )
 
     def update(self) -> command_call_type:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi-9.23.54/kiwi/package_manager/zypper.py 
new/kiwi-9.23.56/kiwi/package_manager/zypper.py
--- old/kiwi-9.23.54/kiwi/package_manager/zypper.py     2021-07-14 
18:09:36.000000000 +0200
+++ new/kiwi-9.23.56/kiwi/package_manager/zypper.py     2021-09-10 
23:52:18.000000000 +0200
@@ -163,19 +163,22 @@
 
         :rtype: namedtuple
         """
-        delete_items = []
-        for delete_item in self._delete_items():
-            try:
-                Command.run(['chroot', self.root_dir, 'rpm', '-q', 
delete_item])
-                delete_items.append(delete_item)
-            except Exception:
-                # ignore packages which are not installed
-                pass
-        if not delete_items:
-            raise KiwiRequestError(
-                'None of the requested packages to delete are installed'
-            )
         if force:
+            delete_items = []
+            for delete_item in self._delete_items():
+                try:
+                    Command.run(
+                        ['chroot', self.root_dir, 'rpm', '-q', delete_item]
+                    )
+                    delete_items.append(delete_item)
+                except Exception:
+                    # ignore packages which are not installed
+                    pass
+            if not delete_items:
+                raise KiwiRequestError(
+                    'None of the requested packages to delete are installed'
+                )
+            self.cleanup_requests()
             force_options = ['--nodeps', '--allmatches', '--noscripts']
             return Command.call(
                 [
@@ -184,13 +187,14 @@
                 self.chroot_command_env
             )
         else:
+            zypper_command = [
+                'chroot', self.root_dir, 'zypper'
+            ] + self.chroot_zypper_args + [
+                'remove', '-u', '--force-resolution'
+            ] + self._delete_items()
+            self.cleanup_requests()
             return Command.call(
-                [
-                    'chroot', self.root_dir, 'zypper'
-                ] + self.chroot_zypper_args + [
-                    'remove', '-u', '--force-resolution'
-                ] + delete_items,
-                self.chroot_command_env
+                zypper_command, self.chroot_command_env
             )
 
     def update(self) -> command_call_type:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi-9.23.54/kiwi/schema/xsi.xsd 
new/kiwi-9.23.56/kiwi/schema/xsi.xsd
--- old/kiwi-9.23.54/kiwi/schema/xsi.xsd        2021-08-26 12:52:05.000000000 
+0200
+++ new/kiwi-9.23.56/kiwi/schema/xsi.xsd        1970-01-01 01:00:00.000000000 
+0100
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
elementFormDefault="qualified" 
targetNamespace="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
-  <xs:import schemaLocation="kiwi_for_generateDS.xsd"/>
-  <xs:attribute name="noNamespaceSchemaLocation" type="xs:anyURI">
-    <xs:annotation>
-      <xs:documentation>The location of the XSD Schema (not relevant for RELAX 
NG or DTD)</xs:documentation>
-    </xs:annotation>
-  </xs:attribute>
-  <xs:attribute name="schemaLocation" type="xs:anyURI">
-    <xs:annotation>
-      <xs:documentation>A pair of URI references: First is a namespace name,
-second the location of the XSD Schema
-(not relevant for RELAX NG or DTD)</xs:documentation>
-    </xs:annotation>
-  </xs:attribute>
-</xs:schema>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi-9.23.54/kiwi/tasks/result_bundle.py 
new/kiwi-9.23.56/kiwi/tasks/result_bundle.py
--- old/kiwi-9.23.54/kiwi/tasks/result_bundle.py        2021-07-14 
18:09:36.000000000 +0200
+++ new/kiwi-9.23.56/kiwi/tasks/result_bundle.py        2021-09-10 
23:52:18.000000000 +0200
@@ -19,6 +19,7 @@
 usage: kiwi-ng result bundle -h | --help
        kiwi-ng result bundle --target-dir=<directory> --id=<bundle_id> 
--bundle-dir=<directory>
            [--zsync-source=<download_location>]
+           [--package-as-rpm]
        kiwi-ng result bundle help
 
 commands:
@@ -45,9 +46,14 @@
         in a kiwi build only those are meaningful for a partial binary
         file download. It is expected that all files from a bundle
         are placed to the same download location
+    --package-as-rpm
+        Take all result files and create an rpm package out of it
 """
 from collections import OrderedDict
+from textwrap import dedent
+from typing import List
 import logging
+import glob
 import os
 
 # project
@@ -57,6 +63,7 @@
 from kiwi.path import Path
 from kiwi.utils.compress import Compress
 from kiwi.utils.checksum import Checksum
+from kiwi.privileges import Privileges
 from kiwi.command import Command
 
 from kiwi.exceptions import (
@@ -87,6 +94,9 @@
         if self._help():
             return
 
+        if self.command_args['--package-as-rpm']:
+            Privileges.check_for_root_permissions()
+
         # load serialized result object from target directory
         result_directory = os.path.abspath(self.command_args['--target-dir'])
         bundle_directory = os.path.abspath(self.command_args['--bundle-dir'])
@@ -103,9 +113,12 @@
         )
         image_version = result.xml_state.get_image_version()
         image_name = result.xml_state.xml_data.get_name()
+        image_description = result.xml_state.get_description_section()
         ordered_results = OrderedDict(sorted(result.get_results().items()))
 
         # hard link bundle files, compress and build checksum
+        if self.command_args['--package-as-rpm']:
+            Path.wipe(bundle_directory)
         if not os.path.exists(bundle_directory):
             Path.create(bundle_directory)
         for result_file in list(ordered_results.values()):
@@ -170,6 +183,86 @@
                                 os.linesep
                             )
                         )
+        if self.command_args['--package-as-rpm']:
+            ResultBundleTask._build_rpm_package(
+                bundle_directory, image_name, image_version,
+                image_description.specification,
+                list(glob.iglob(f'{bundle_directory}/*'))
+            )
+
+    @staticmethod
+    def _build_rpm_package(
+        bundle_directory: str, image_name: str, image_version: str,
+        description_text, filenames: List[str]
+    ) -> None:
+        source_links = []
+        for source_file in filenames:
+            source_links.append(
+                ' '.join(
+                    [
+                        'ln', '%{_sourcedir}/' + os.path.basename(source_file),
+                        '%{buildroot}' + f'/var/tmp/{image_name}'
+                    ]
+                )
+            )
+        spec_file_name = os.path.join(bundle_directory, f'{image_name}.spec')
+        spec_data = dedent('''
+            %global _sourcedir %(pwd)
+            %global _rpmdir .
+
+            Url:            https://osinside.github.io/kiwi
+            Name:           {name}
+            Summary:        {name}
+            Version:        {version}
+            Release:        0
+            Group:          %{{sysgroup}}
+            License:        GPL-3.0-or-later
+            BuildRoot:      %{{_tmppath}}/%{{name}}-%{{version}}-build
+            BuildArch:      noarch
+
+            %description
+            {description}
+
+            %prep
+
+            %build
+
+            %install
+            install -d -m 755 %{{buildroot}}/var/tmp/{name}
+
+            {source_links}
+
+            %clean
+            rm -rf %{{buildroot}}
+
+            %files
+            %defattr(-, root, root)
+            /var/tmp/{name}
+
+            %changelog
+        ''').format(
+            name=image_name,
+            version=image_version,
+            description=description_text,
+            source_links=os.linesep.join(source_links)
+        )
+        with open(spec_file_name, 'w') as spec:
+            spec.write(spec_data)
+        os.chdir(bundle_directory)
+        log.info('Creating rpm package...')
+        Command.run(
+            [
+                'rpmbuild', '--nodeps', '--nocheck', '--rmspec',
+                '-bb', spec_file_name
+            ]
+        )
+        for source_file in filenames:
+            os.unlink(source_file)
+        Command.run(
+            [
+                'bash', '-c', 'mv noarch/*.rpm . && rmdir noarch'
+            ]
+        )
 
     def _help(self):
         if self.command_args['help']:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi-9.23.54/kiwi/version.py 
new/kiwi-9.23.56/kiwi/version.py
--- old/kiwi-9.23.54/kiwi/version.py    2021-09-07 18:02:22.000000000 +0200
+++ new/kiwi-9.23.56/kiwi/version.py    2021-09-10 23:52:50.000000000 +0200
@@ -18,5 +18,5 @@
 """
 Global version information used in kiwi and the package
 """
-__version__ = '9.23.54'
-__githash__ = 'bea4f651d4e4b7ecebe3fbcaf1ebb1d607684603'
+__version__ = '9.23.56'
+__githash__ = '58f5550768b94bc0c2e29338004e6e74d2ebb7e7'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi-9.23.54/kiwi.egg-info/PKG-INFO 
new/kiwi-9.23.56/kiwi.egg-info/PKG-INFO
--- old/kiwi-9.23.54/kiwi.egg-info/PKG-INFO     2021-09-07 18:04:33.000000000 
+0200
+++ new/kiwi-9.23.56/kiwi.egg-info/PKG-INFO     2021-09-10 23:56:28.000000000 
+0200
@@ -1,39 +1,12 @@
 Metadata-Version: 2.1
 Name: kiwi
-Version: 9.23.54
+Version: 9.23.56
 Summary: KIWI - Appliance Builder (next generation)
 Home-page: https://osinside.github.io/kiwi
 Author: Marcus Schaefer
 Author-email: [email protected]
 License: GPLv3+
 Download-URL: 
https://download.opensuse.org/repositories/Virtualization:/Appliances:/Builder
-Description: KIWI - Next Generation
-        ======================
-        
-        .. |GitLab CI Pipeline| image:: 
https://gitlab.com/kiwi3/kiwi-ci/badges/master/pipeline.svg
-           :target: https://gitlab.com/kiwi3/kiwi-ci/-/pipelines
-        .. |Health| image:: 
https://api.codacy.com/project/badge/Grade/8ebd8ce362294fabb0870f50358e564f
-           :target: 
https://www.codacy.com/app/Appliances/kiwi?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=OSInside/kiwi&amp;utm_campaign=Badge_Grade
-        .. |Doc| replace:: `Documentation <https://osinside.github.io/kiwi/>`__
-        .. |Installation| replace:: `Installation 
<https://osinside.github.io/kiwi/installation.html>`__
-        .. |Contributing| replace:: `Contributing 
<https://osinside.github.io/kiwi/contributing.html>`__
-        .. |Donate| image:: 
https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif
-           :target: https://www.paypal.me/SchaeferMarcus
-        
-        |GitLab CI Pipeline| |Health|
-        
-        **KIWI, the OS image and appliance builder.**
-        
-        * |Installation|
-        
-        * |Contributing|
-        
-        * |Doc|
-        
-        We'll donate it for good luck so's you're sure to come back :)
-        
-        |Donate|
-        
 Platform: UNKNOWN
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Intended Audience :: Developers
@@ -43,3 +16,33 @@
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Topic :: System :: Operating System
 Description-Content-Type: text/x-rst
+License-File: LICENSE
+
+KIWI - Next Generation
+======================
+
+.. |GitLab CI Pipeline| image:: 
https://gitlab.com/kiwi3/kiwi-ci/badges/master/pipeline.svg
+   :target: https://gitlab.com/kiwi3/kiwi-ci/-/pipelines
+.. |Health| image:: 
https://api.codacy.com/project/badge/Grade/8ebd8ce362294fabb0870f50358e564f
+   :target: 
https://www.codacy.com/app/Appliances/kiwi?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=OSInside/kiwi&amp;utm_campaign=Badge_Grade
+.. |Doc| replace:: `Documentation <https://osinside.github.io/kiwi/>`__
+.. |Installation| replace:: `Installation 
<https://osinside.github.io/kiwi/installation.html>`__
+.. |Contributing| replace:: `Contributing 
<https://osinside.github.io/kiwi/contributing.html>`__
+.. |Donate| image:: 
https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif
+   :target: https://www.paypal.me/SchaeferMarcus
+
+|GitLab CI Pipeline| |Health|
+
+**KIWI, the OS image and appliance builder.**
+
+* |Installation|
+
+* |Contributing|
+
+* |Doc|
+
+We'll donate it for good luck so's you're sure to come back :)
+
+|Donate|
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi-9.23.54/kiwi.egg-info/SOURCES.txt 
new/kiwi-9.23.56/kiwi.egg-info/SOURCES.txt
--- old/kiwi-9.23.54/kiwi.egg-info/SOURCES.txt  2021-09-07 18:04:33.000000000 
+0200
+++ new/kiwi-9.23.56/kiwi.egg-info/SOURCES.txt  2021-09-10 23:56:28.000000000 
+0200
@@ -174,7 +174,6 @@
 kiwi/repository/template/apt.py
 kiwi/schema/kiwi.rnc
 kiwi/schema/kiwi.rng
-kiwi/schema/xsi.xsd
 kiwi/solver/__init__.py
 kiwi/solver/sat.py
 kiwi/solver/repository/__init__.py
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi-9.23.54/kiwi.egg-info/requires.txt 
new/kiwi-9.23.56/kiwi.egg-info/requires.txt
--- old/kiwi-9.23.54/kiwi.egg-info/requires.txt 2021-09-07 18:04:33.000000000 
+0200
+++ new/kiwi-9.23.56/kiwi.egg-info/requires.txt 2021-09-10 23:56:28.000000000 
+0200
@@ -1,5 +1,5 @@
+PyYAML
 docopt
 lxml
 pyxattr
 requests
-PyYAML
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi-9.23.54/test/unit/package_manager/dnf_test.py 
new/kiwi-9.23.56/test/unit/package_manager/dnf_test.py
--- old/kiwi-9.23.54/test/unit/package_manager/dnf_test.py      2021-07-14 
18:09:37.000000000 +0200
+++ new/kiwi-9.23.56/test/unit/package_manager/dnf_test.py      2021-09-10 
23:52:18.000000000 +0200
@@ -101,7 +101,7 @@
         mock_run.side_effect = Exception
         self.manager.request_package('vim')
         with raises(KiwiRequestError):
-            self.manager.process_delete_requests()
+            self.manager.process_delete_requests(force=True)
         mock_run.assert_called_once_with(
             ['chroot', '/root-dir', 'rpm', '-q', 'vim']
         )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kiwi-9.23.54/test/unit/package_manager/microdnf_test.py 
new/kiwi-9.23.56/test/unit/package_manager/microdnf_test.py
--- old/kiwi-9.23.54/test/unit/package_manager/microdnf_test.py 2021-07-14 
18:09:37.000000000 +0200
+++ new/kiwi-9.23.56/test/unit/package_manager/microdnf_test.py 2021-09-10 
23:52:18.000000000 +0200
@@ -108,7 +108,7 @@
         mock_run.side_effect = Exception
         self.manager.request_package('vim')
         with raises(KiwiRequestError):
-            self.manager.process_delete_requests()
+            self.manager.process_delete_requests(force=True)
         mock_run.assert_called_once_with(
             ['chroot', '/root-dir', 'rpm', '-q', 'vim']
         )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/kiwi-9.23.54/test/unit/package_manager/zypper_test.py 
new/kiwi-9.23.56/test/unit/package_manager/zypper_test.py
--- old/kiwi-9.23.54/test/unit/package_manager/zypper_test.py   2021-07-14 
18:09:37.000000000 +0200
+++ new/kiwi-9.23.56/test/unit/package_manager/zypper_test.py   2021-09-10 
23:52:18.000000000 +0200
@@ -82,7 +82,8 @@
             ['chroot', 'root-dir', 'zypper'] + self.chroot_zypper_args + [
                 'install', '--download', 'in-advance',
                 '--auto-agree-with-licenses'
-            ] + self.manager.custom_args + ['--', 'vim'], 
self.chroot_command_env
+            ] + self.manager.custom_args + ['--', 'vim'],
+            self.chroot_command_env
         )
 
     @patch('kiwi.command.Command.call')
@@ -114,7 +115,7 @@
         mock_run.side_effect = Exception
         self.manager.request_package('vim')
         with raises(KiwiRequestError):
-            self.manager.process_delete_requests()
+            self.manager.process_delete_requests(force=True)
         mock_run.assert_called_once_with(
             ['chroot', 'root-dir', 'rpm', '-q', 'vim']
         )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/kiwi-9.23.54/test/unit/tasks/result_bundle_test.py 
new/kiwi-9.23.56/test/unit/tasks/result_bundle_test.py
--- old/kiwi-9.23.54/test/unit/tasks/result_bundle_test.py      2021-07-14 
18:09:37.000000000 +0200
+++ new/kiwi-9.23.56/test/unit/tasks/result_bundle_test.py      2021-09-10 
23:52:18.000000000 +0200
@@ -66,6 +66,7 @@
         self.task.command_args['--bundle-dir'] = 'bundle_dir'
         self.task.command_args['--id'] = 'Build_42'
         self.task.command_args['--zsync-source'] = None
+        self.task.command_args['--package-as-rpm'] = None
 
     def test_process_invalid_bundle_directory(self):
         self._init_command_args()
@@ -141,6 +142,70 @@
             )
         )
 
+    @patch('kiwi.tasks.result_bundle.Privileges.check_for_root_permissions')
+    @patch('kiwi.tasks.result_bundle.Result.load')
+    @patch('kiwi.tasks.result_bundle.Command.run')
+    @patch('kiwi.tasks.result_bundle.Path.create')
+    @patch('kiwi.tasks.result_bundle.Path.which')
+    @patch('kiwi.tasks.result_bundle.Path.wipe')
+    @patch('kiwi.tasks.result_bundle.Compress')
+    @patch('kiwi.tasks.result_bundle.Checksum')
+    @patch('os.path.exists')
+    @patch('os.chdir')
+    @patch('os.unlink')
+    @patch('glob.iglob')
+    def test_process_result_bundle_as_rpm(
+        self, mock_iglob, mock_unlink, mock_chdir, mock_exists, mock_checksum,
+        mock_compress, mock_path_wipe, mock_path_which, mock_path_create,
+        mock_command, mock_load, mock_Privileges_check_for_root_permissions
+    ):
+        checksum = Mock()
+        compress = Mock()
+        mock_path_which.return_value = 'zsyncmake'
+        compress.compressed_filename = 'compressed_filename'
+        mock_compress.return_value = compress
+        mock_checksum.return_value = checksum
+        mock_exists.return_value = False
+        mock_load.return_value = self.result
+        self._init_command_args()
+        self.task.command_args['bundle'] = True
+        self.task.command_args['--package-as-rpm'] = True
+        mock_iglob.return_value = [
+            os.sep.join([self.abs_bundle_dir, 'test-image-1.2.3-Build_42'])
+        ]
+
+        m_open = mock_open()
+        with patch('builtins.open', m_open, create=True):
+            self.task.process()
+
+        mock_path_wipe.assert_called_once_with(self.abs_bundle_dir)
+        mock_Privileges_check_for_root_permissions.assert_called_once_with()
+        assert mock_command.call_args_list == [
+            call(
+                [
+                    'cp', 'test-image-1.2.3',
+                    os.sep.join(
+                        [self.abs_bundle_dir, 'test-image-1.2.3-Build_42']
+                    )
+                ]
+            ),
+            call(
+                [
+                    'rpmbuild', '--nodeps', '--nocheck', '--rmspec', '-bb',
+                    os.sep.join([self.abs_bundle_dir, 'test-image.spec'])
+                ]
+            ),
+            call(
+                ['bash', '-c', 'mv noarch/*.rpm . && rmdir noarch']
+            )
+        ]
+        mock_chdir.assert_called_once_with(
+            self.abs_bundle_dir
+        )
+        mock_unlink.assert_called_once_with(
+            os.sep.join([self.abs_bundle_dir, 'test-image-1.2.3-Build_42'])
+        )
+
     @patch('kiwi.tasks.result_bundle.Result.load')
     @patch('kiwi.tasks.result_bundle.Command.run')
     @patch('kiwi.tasks.result_bundle.Path.create')

Reply via email to