From 218e6ea594d940a885c8b265faaec2739fe0b3e6 Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Fri, 20 Nov 2020 01:30:15 +0800 Subject: [PATCH 1/2] [patch tracking] 20201120013007660536 - https://github.com/OSInside/kiwi/commit/cebb5dc4967d12e83df67ac4d37fdc8f51ad5733 --- ...5dc4967d12e83df67ac4d37fdc8f51ad5733.patch | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 cebb5dc4967d12e83df67ac4d37fdc8f51ad5733.patch diff --git a/cebb5dc4967d12e83df67ac4d37fdc8f51ad5733.patch b/cebb5dc4967d12e83df67ac4d37fdc8f51ad5733.patch new file mode 100644 index 0000000..5ec2e4b --- /dev/null +++ b/cebb5dc4967d12e83df67ac4d37fdc8f51ad5733.patch @@ -0,0 +1,72 @@ +diff --git a/kiwi/repository/dnf.py b/kiwi/repository/dnf.py +index fa27130fec..39b5bfc15e 100644 +--- a/kiwi/repository/dnf.py ++++ b/kiwi/repository/dnf.py +@@ -327,7 +327,8 @@ def _create_runtime_plugin_config_parser(self): + def _write_runtime_config(self): + with open(self.runtime_dnf_config_file.name, 'w') as config: + self.runtime_dnf_config.write(config) +- dnf_plugin_config_file = \ +- self.shared_dnf_dir['pluginconf-dir'] + '/priorities.conf' +- with open(dnf_plugin_config_file, 'w') as pluginconfig: +- self.runtime_dnf_plugin_config.write(pluginconfig) ++ if os.path.exists(self.shared_dnf_dir['pluginconf-dir']): ++ dnf_plugin_config_file = \ ++ self.shared_dnf_dir['pluginconf-dir'] + '/priorities.conf' ++ with open(dnf_plugin_config_file, 'w') as pluginconfig: ++ self.runtime_dnf_plugin_config.write(pluginconfig) +diff --git a/test/unit/repository/dnf_test.py b/test/unit/repository/dnf_test.py +index 5c1e010090..a564a57881 100644 +--- a/test/unit/repository/dnf_test.py ++++ b/test/unit/repository/dnf_test.py +@@ -1,6 +1,6 @@ + from pytest import fixture + from mock import ( +- patch, call ++ patch, call, mock_open + ) + import mock + +@@ -54,9 +54,18 @@ def test_post_init_no_custom_args(self, mock_path, mock_temp): + + @patch('kiwi.repository.dnf.NamedTemporaryFile') + @patch('kiwi.repository.dnf.Path.create') +- def test_post_init_with_custom_args(self, mock_path, mock_temp): +- with patch('builtins.open', create=True): ++ @patch('os.path.exists') ++ def test_post_init_with_custom_args( ++ self, mock_exists, mock_path, mock_temp ++ ): ++ mock_exists.return_value = True ++ m_open = mock_open() ++ with patch('builtins.open', m_open, create=True): + self.repo.post_init(['check_signatures']) ++ assert m_open.call_args_list == [ ++ call(mock_temp.return_value.name, 'w'), ++ call('/shared-dir/dnf/pluginconf/priorities.conf', 'w') ++ ] + assert self.repo.custom_args == [] + assert self.repo.gpg_check == '1' + +@@ -131,7 +140,9 @@ def test_add_repo(self, mock_exists, mock_buildservice, mock_config): + @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): ++ 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 +@@ -188,7 +199,9 @@ def test_setup_package_database_configuration_bootstrapped_system( + @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_buildservice, 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 -- Gitee From 9a8a01156a326b4d3f713077011136a2869eb14a Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Fri, 20 Nov 2020 01:30:16 +0800 Subject: [PATCH 2/2] [patch tracking] 20201120013007660536 - update spec file --- kiwi.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kiwi.spec b/kiwi.spec index e59772e..f597f37 100644 --- a/kiwi.spec +++ b/kiwi.spec @@ -2,12 +2,13 @@ Name: kiwi Version: 9.21.5 -Release: 1 +Release: 2 License: GPLv3+ Summary: Flexible operating system image builder URL: http://osinside.github.io/kiwi/ Source0: https://files.pythonhosted.org/packages/source/k/%{name}/%{name}-%{version}.tar.gz +Patch6000: cebb5dc4967d12e83df67ac4d37fdc8f51ad5733.patch BuildRequires: bash-completion dracut fdupes gcc make BuildRequires: python3-devel python3-setuptools shadow-utils @@ -189,6 +190,9 @@ done %{_mandir}/man8/%{name}* %changelog +* 20201120013007660536 patch-tracking 9.21.5-2 +- append patch file of upstream repository from to + * Tue Jul 28 2020 xinghe - 9.21.5-1 - update version to 9.21.5 @@ -208,4 +212,4 @@ done - Remove python2 dependency * Sat Sep 21 2019 openEuler Buildteam - 9.16.12-2 -- Package init +- Package init \ No newline at end of file -- Gitee