Skip to content

Commit

Permalink
Merge pull request #8 from ouuan/permission
Browse files Browse the repository at this point in the history
Restore permissions after operations
  • Loading branch information
2m authored Aug 4, 2020
2 parents 8f018ac + 87e14f1 commit c959994
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ fi

pkgbuild_dir=$(readlink $pkgname -f) # nicely cleans up path, ie. ///dsq/dqsdsq/my-package//// -> /dsq/dqsdsq/my-package

getfacl -p -R "$pkgbuild_dir" /github/home > /tmp/arch-pkgbuild-builder-permissions.bak

# '/github/workspace' is mounted as a volume and has owner set to root
# set the owner of $pkgbuild_dir to the 'build' user, so it can access package files.
sudo chown -R build $pkgbuild_dir
Expand Down Expand Up @@ -67,3 +69,5 @@ case $target in
*)
echo "Target should be one of 'pkgbuild', 'srcinfo', 'run'" ;;
esac

sudo setfacl --restore=/tmp/arch-pkgbuild-builder-permissions.bak

0 comments on commit c959994

Please sign in to comment.