git: b919ca52ab00 - main - devel/gitlab-runner: fix build as none-root user

From: Matthias Fechner <mfechner_at_FreeBSD.org>
Date: Fri, 18 Sep 2026 04:13:51 UTC
The branch main has been updated by mfechner:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b919ca52ab00cb3ce1b8647336abadeb842563f8

commit b919ca52ab00cb3ce1b8647336abadeb842563f8
Author:     Matthias Fechner <mfechner@FreeBSD.org>
AuthorDate: 2026-09-17 16:09:07 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2026-09-18 04:12:54 +0000

    devel/gitlab-runner: fix build as none-root user
---
 devel/gitlab-runner/Makefile | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/devel/gitlab-runner/Makefile b/devel/gitlab-runner/Makefile
index d7b05731a665..91a5a4a0cf27 100644
--- a/devel/gitlab-runner/Makefile
+++ b/devel/gitlab-runner/Makefile
@@ -66,11 +66,13 @@ PLIST_FILES=	bin/gitlab-runner
 # been fetched, and resolves that local path relative to it. Extract the
 # subtree from the main tarball first (this runs before go-post-fetch).
 post-fetch:
-	@${MKDIR} ${DISTDIR}/${DIST_SUBDIR}
-	cd ${DISTDIR}/${DIST_SUBDIR} && \
-		${TAR} -xf ${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}.tar.bz2 \
-		--strip-components 1 --no-same-owner --no-same-permissions \
-		${DISTNAME}/helpers/runner_wrapper/api
+	if [ ! -d "${DISTDIR}/${DIST_SUBDIR}/helpers" ]; then \
+		${MKDIR} ${DISTDIR}/${DIST_SUBDIR} && \
+		cd ${DISTDIR}/${DIST_SUBDIR} && \
+			${TAR} -xf "${DISTDIR}/${DIST_SUBDIR}/${DISTNAME}.tar.bz2" \
+			--strip-components 1 --no-same-owner --no-same-permissions \
+			"${DISTNAME}/helpers/runner_wrapper/api/go.mod" "${DISTNAME}/helpers/runner_wrapper/api/go.sum"; \
+	fi
 
 post-patch:
 	@${MKDIR} ${WRKSRC}/out/docker/