Skip to content

Commit

Permalink
Set /var/tmp/pkgsrc as safe.directory in the mock
Browse files Browse the repository at this point in the history
git has been updated in CS9 to 2.39 recently. This includes a check of
directory permissions to make sure that the owner of the repo is the
same running the git command [1].

This is breaking dlrn when running git commands inside the mock as the
effective user in the mock is different to the owner of the directory
(the dlrn builder user). This patch is setting /var/tmp/pkgsrc as
safe.directory to skip this check for this directory, which is where the
code is copied in the mock by dlrn.

[1] https://github.com/git/git/blob/v2.39.0/Documentation/RelNotes/2.31.4.txt

Change-Id: Id4b1a2f1f6261248882ca817729c72fe547e551a
  • Loading branch information
amoralej committed Dec 20, 2022
1 parent 043c3fa commit ef0a8ca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/common-functions
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ function setup_mock() {
# inside the buildroot
/usr/bin/mock $MOCKOPTS --clean
/usr/bin/mock $MOCKOPTS --init
/usr/bin/mock -q -r ${DATA_DIR}/${MOCK_CONFIG} --chroot "git config --global --add safe.directory /var/tmp/pkgsrc"
MOCKDIR=$(/usr/bin/mock -r ${DATA_DIR}/${MOCK_CONFIG} -p)
}

Expand Down

0 comments on commit ef0a8ca

Please sign in to comment.