From 9de92dc2153c977e58fe235782733b67564028e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20P=C3=B6hn?= Date: Tue, 10 Dec 2024 02:41:57 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=82=20push:=20owner=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fdroidserver/push.py | 9 +++++++++ tests/test_push.py | 2 ++ 2 files changed, 11 insertions(+) diff --git a/fdroidserver/push.py b/fdroidserver/push.py index 1a877160..f849f440 100644 --- a/fdroidserver/push.py +++ b/fdroidserver/push.py @@ -191,6 +191,15 @@ def full_push_sequence(appid, vercode, virt_container_type): vercode, virt_container_type, ) + + # fix owner after pushing files + common.inside_exec( + appid, + vercode, + ['chown', '-R', 'vagrant:vagrant', '/home/vagrant'], + virt_container_type, + as_root=True, + ) finally: os.chdir(cwd) diff --git a/tests/test_push.py b/tests/test_push.py index 6c0bcb7f..b89c9b77 100755 --- a/tests/test_push.py +++ b/tests/test_push.py @@ -35,6 +35,7 @@ class Push_main(PushTest): @mock.patch('sys.argv', ['fdroid push', APPID_VERCODE]) @mock.patch('fdroidserver.push.create_build_dirs') @mock.patch('fdroidserver.push.podman_push') + @mock.patch('fdroidserver.common.inside_exec', mock.Mock()) def test_podman(self, podman_push, create_build_dirs): common.config['virt_container_type'] = 'podman' push.main() @@ -44,6 +45,7 @@ class Push_main(PushTest): @mock.patch('sys.argv', ['fdroid push', APPID_VERCODE]) @mock.patch('fdroidserver.push.create_build_dirs') @mock.patch('fdroidserver.push.vagrant_push') + @mock.patch('fdroidserver.common.inside_exec', mock.Mock()) def test_vagrant(self, vagrant_push, create_build_dirs): common.config['virt_container_type'] = 'vagrant' push.main()