From 15b48d39058215a44f1283a30edb0418e0d604db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Fri, 4 May 2018 14:25:53 +0200 Subject: [PATCH] Copy ostree-installer without preserving owner --- ...ee-phase-and-pipelines-for-running-p.patch | 2 +- ...evert-Other-repo-for-OstreeInstaller.patch | 2 +- 0003-Revert-Ostree-can-use-pkgset-repos.patch | 2 +- 0004-Update-tests-for-libmodulemd-1.4.0.patch | 2 +- ...e-installer-Copy-files-without-owner.patch | 48 +++++++++++++++++++ pungi.spec | 6 ++- 6 files changed, 57 insertions(+), 5 deletions(-) create mode 100644 0005-ostree-installer-Copy-files-without-owner.patch diff --git a/0001-Revert-Move-ostree-phase-and-pipelines-for-running-p.patch b/0001-Revert-Move-ostree-phase-and-pipelines-for-running-p.patch index 40921ca1..ba88077c 100644 --- a/0001-Revert-Move-ostree-phase-and-pipelines-for-running-p.patch +++ b/0001-Revert-Move-ostree-phase-and-pipelines-for-running-p.patch @@ -1,7 +1,7 @@ From fa0ed11ee0c733e9c3e4785f6526ef889109111c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Wed, 11 Apr 2018 09:18:59 +0200 -Subject: [PATCH 1/4] Revert "Move ostree phase and pipelines for running +Subject: [PATCH 1/5] Revert "Move ostree phase and pipelines for running phases" This reverts commit 660c04368ba1abed310f121d01f0fa029eea5f11. diff --git a/0002-Revert-Other-repo-for-OstreeInstaller.patch b/0002-Revert-Other-repo-for-OstreeInstaller.patch index 5176f9da..63215f0c 100644 --- a/0002-Revert-Other-repo-for-OstreeInstaller.patch +++ b/0002-Revert-Other-repo-for-OstreeInstaller.patch @@ -1,7 +1,7 @@ From c62eb8dd27bc17406649e3560223f20b690de63f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Wed, 11 Apr 2018 09:19:53 +0200 -Subject: [PATCH 2/4] Revert "Other repo for OstreeInstaller" +Subject: [PATCH 2/5] Revert "Other repo for OstreeInstaller" This reverts commit 5c081cb545715c2a912ff50fa57554e89d905868. --- diff --git a/0003-Revert-Ostree-can-use-pkgset-repos.patch b/0003-Revert-Ostree-can-use-pkgset-repos.patch index dfacbf07..8adc64a2 100644 --- a/0003-Revert-Ostree-can-use-pkgset-repos.patch +++ b/0003-Revert-Ostree-can-use-pkgset-repos.patch @@ -1,7 +1,7 @@ From f51543a24a35145ecbc60e86951accf5369df364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Wed, 11 Apr 2018 09:20:51 +0200 -Subject: [PATCH 3/4] Revert "Ostree can use pkgset repos" +Subject: [PATCH 3/5] Revert "Ostree can use pkgset repos" This reverts commit c7cc200246300c6a3946b2e3a9f5f7693896a7d6. --- diff --git a/0004-Update-tests-for-libmodulemd-1.4.0.patch b/0004-Update-tests-for-libmodulemd-1.4.0.patch index 784405e7..dbc54901 100644 --- a/0004-Update-tests-for-libmodulemd-1.4.0.patch +++ b/0004-Update-tests-for-libmodulemd-1.4.0.patch @@ -1,7 +1,7 @@ From c2fb790652ab9b6f1b03ebd61e70838c0695d1fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Wed, 2 May 2018 15:36:52 +0200 -Subject: [PATCH 4/4] Update tests for libmodulemd 1.4.0 +Subject: [PATCH 4/5] Update tests for libmodulemd 1.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/0005-ostree-installer-Copy-files-without-owner.patch b/0005-ostree-installer-Copy-files-without-owner.patch new file mode 100644 index 00000000..08de9248 --- /dev/null +++ b/0005-ostree-installer-Copy-files-without-owner.patch @@ -0,0 +1,48 @@ +From 52a3c87c71522db59191f1f7e4e66cee72e67bf5 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= +Date: Fri, 4 May 2018 08:58:34 +0200 +Subject: [PATCH 5/5] ostree-installer: Copy files without owner +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The files created in koji runroot will be owned by root. If the compose +is done under different user, there could be a problem with copying the +files preserving the owner. Let's just copy them without that. + +Fixes: https://pagure.io/pungi/issue/932 +Signed-off-by: Lubomír Sedlář +--- + pungi/phases/ostree_installer.py | 2 +- + tests/test_ostree_installer_phase.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/pungi/phases/ostree_installer.py b/pungi/phases/ostree_installer.py +index 9bf5e255..58eede96 100644 +--- a/pungi/phases/ostree_installer.py ++++ b/pungi/phases/ostree_installer.py +@@ -98,7 +98,7 @@ class OstreeInstallerThread(WorkerThread): + os_path = compose.paths.compose.os_tree(arch, variant) + boot_iso = os.path.join(output_dir, 'images', 'boot.iso') + +- shortcuts.run('cp -av %s/* %s/' % ++ shortcuts.run('cp -rv %s/* %s/' % + (shlex_quote(output_dir), shlex_quote(os_path))) + try: + os.link(boot_iso, iso_path) +diff --git a/tests/test_ostree_installer_phase.py b/tests/test_ostree_installer_phase.py +index ba56d8c7..62598315 100644 +--- a/tests/test_ostree_installer_phase.py ++++ b/tests/test_ostree_installer_phase.py +@@ -123,7 +123,7 @@ class OstreeThreadTest(helpers.PungiTestCase): + self.assertTrue(os.path.isdir(self.topdir + '/work/x86_64/Everything/')) + self.assertFalse(os.path.isdir(self.topdir + '/work/x86_64/Everything/ostree_installer')) + self.assertEqual(run.call_args_list, +- [mock.call('cp -av {0}/work/x86_64/Everything/ostree_installer/* {0}/compose/Everything/x86_64/os/'.format(self.topdir))]) ++ [mock.call('cp -rv {0}/work/x86_64/Everything/ostree_installer/* {0}/compose/Everything/x86_64/os/'.format(self.topdir))]) + + @mock.patch('kobo.shortcuts.run') + @mock.patch('productmd.images.Image') +-- +2.14.3 + diff --git a/pungi.spec b/pungi.spec index bb200cdd..792a5966 100644 --- a/pungi.spec +++ b/pungi.spec @@ -1,6 +1,6 @@ Name: pungi Version: 4.1.24 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Distribution compose tool Group: Development/Tools @@ -11,6 +11,7 @@ Patch0: 0001-Revert-Move-ostree-phase-and-pipelines-for-running-p.patch Patch1: 0002-Revert-Other-repo-for-OstreeInstaller.patch Patch2: 0003-Revert-Ostree-can-use-pkgset-repos.patch Patch3: 0004-Update-tests-for-libmodulemd-1.4.0.patch +Patch4: 0005-ostree-installer-Copy-files-without-owner.patch BuildRequires: python3-nose BuildRequires: python3-mock @@ -177,6 +178,9 @@ nosetests-3 --exe %{_bindir}/%{name}-wait-for-signed-ostree-handler %changelog +* Fri May 04 2018 Lubomír Sedlář - 4.1.24-2 +- Copy ostree-installer without preserving owner + * Wed May 02 2018 Lubomír Sedlář - 4.1.24-1 - koji-wrapper: Log failed subtasks (lsedlar) - Update compose status when config validation fails (lsedlar)