Skip to content

Commit 8524bb3

Browse files
phlogistonjohnmergify[bot]
authored andcommitted
container: inform git that our repo path is acceptable
In some cases, specifically the github CI runner, calls made to git by setuptools_scm were failing leading to source taballs that were missing files, which lead to rpmbuild failures. This was all because of "stricter repository ownership checks" in git. Use the `safe.directory` configuration key to always permit the use of our checkout when run in the container. Signed-off-by: John Mulligan <[email protected]>
1 parent d9e0d87 commit 8524bb3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/container/build.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ task_py_build() {
151151
# only
152152
distdir="$(get_distdir "$distname")"
153153
info "using dist dir: $distdir"
154+
155+
# setuptools_scm calls into git, newer git versions have stricter ownership
156+
# rules that can break our builds when mounted into a container. Tell our
157+
# in-container git, that it's all ok and the monsters aren't real.
158+
# This config will vanish once the container exits anyway.
159+
git config --global --add safe.directory "${bdir}"
154160
$python -m build --outdir "$distdir"
155161
}
156162

0 commit comments

Comments
 (0)