From 6beb94d431c91eda64fc2c8f453d25ca5b2638a4 Mon Sep 17 00:00:00 2001 From: Clayton Craft <clayton@craftyguy.net> Date: Thu, 10 Oct 2024 22:24:18 -0700 Subject: [PATCH] install_pmbootstrap: make pmaports/.git world writeable by all (MR 10) Works around an issue in the CI after the migration where some dirs are created that are owned by root and not writeable by any other groups/ users. One way the CI failed from this is .git/refs/remotes was only writeable by root, since root ran `git remote add` on the freshly cloned repo causing the remotes dir to be created. Later in CI, when other users tried to add remotes, these failed silently (thanks git) and the CI job crashed when it tried to run `git fetch` on the remote that was never added. At this point in the script, refs/remotes exists so this chmod "fixes" the issue. I don't have any idea why this is a problem *now* and not when we were on gitlab.com. --- install_pmbootstrap.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install_pmbootstrap.sh b/install_pmbootstrap.sh index 3fa13c9..44ee1b9 100755 --- a/install_pmbootstrap.sh +++ b/install_pmbootstrap.sh @@ -35,6 +35,10 @@ add_remote_origin_original() { cat /tmp/git_remote_add exit 1 fi + + # Make sure everyone can write to the repo later, since CI runs as several + # different users (root, TESTUSER/pmos, build) + chmod -R go+w "$pmaports/.git" } # Set up depends -- GitLab