From ce780c7bf2f95b2e0e3d8abd6ed76d86220b0d0e Mon Sep 17 00:00:00 2001 From: Mohan Boddu Date: Oct 31 2017 14:48:47 +0000 Subject: Run ostree commands as root instead as apache user Pungi no longer writes stuff as "apache" user. It writes as "root" Signed-off-by: Mohan Boddu --- diff --git a/scripts/push-two-week-atomic.py b/scripts/push-two-week-atomic.py index f06ca6b..e7c9f13 100755 --- a/scripts/push-two-week-atomic.py +++ b/scripts/push-two-week-atomic.py @@ -566,9 +566,7 @@ def generate_static_delta(release, old_commit, new_commit): :param old_commit - starting point for delta :param new_commit - ending point for delta """ - # Run as apache user because the files we are editing/creating - # need to be owned by the apache user - diff_cmd = ["/usr/bin/sudo", "-u", "apache", + diff_cmd = ["/usr/bin/sudo", "ostree", "static-delta", "generate", "--repo", ATOMIC_HOST_DIR, "--if-not-exists", "--from", old_commit, "--to", new_commit] @@ -585,9 +583,7 @@ def update_ostree_summary_file(release): :param release - the Fedora release to target (25,26,etc) """ - # Run as apache user because the files we are editing/creating - # need to be owned by the apache user - summary_cmd = ["/usr/bin/sudo", "-u", "apache", + summary_cmd = ["/usr/bin/sudo", "ostree", "summary", "-u", "--repo", ATOMIC_HOST_DIR] log.info("Updating Summary file") @@ -601,7 +597,7 @@ def move_tree_commit(release, old_commit, new_commit): new_commit=new_commit) log.info("Moving ref %s to commit %s" %(TARGET_REF, new_commit)) - reset_cmd = ['/usr/bin/sudo', '-u', 'apache', + reset_cmd = ['/usr/bin/sudo', 'ostree', 'reset', TARGET_REF % release, new_commit, '--repo', ATOMIC_HOST_DIR] if subprocess.call(reset_cmd):