ostree-installer: Copy files without owner

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ář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2018-05-04 08:58:34 +02:00
parent 99b6e44a30
commit dc557b809a
2 changed files with 2 additions and 2 deletions

View File

@ -105,7 +105,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)

View File

@ -127,7 +127,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')