From 9eed3a50d149bcb7923b9f89125f0f11c8b57604 Mon Sep 17 00:00:00 2001 From: CyberMind-FR Date: Sat, 24 Jan 2026 11:26:04 +0100 Subject: [PATCH] fix(gitea): Create git group explicitly before user Alpine's adduser wasn't creating the group properly, causing chown git:git to fail with "unknown group". - Add explicit addgroup -g 1000 git before adduser - Use -G git flag to assign user to the group - Bump to r4 Co-Authored-By: Claude Opus 4.5 --- package/secubox/secubox-app-gitea/Makefile | 2 +- package/secubox/secubox-app-gitea/files/usr/sbin/giteactl | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/package/secubox/secubox-app-gitea/Makefile b/package/secubox/secubox-app-gitea/Makefile index 1c612565..21abe1cb 100644 --- a/package/secubox/secubox-app-gitea/Makefile +++ b/package/secubox/secubox-app-gitea/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=secubox-app-gitea PKG_VERSION:=1.0.0 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_ARCH:=all PKG_MAINTAINER:=CyberMind Studio diff --git a/package/secubox/secubox-app-gitea/files/usr/sbin/giteactl b/package/secubox/secubox-app-gitea/files/usr/sbin/giteactl index 9a8532ab..66fa50e9 100644 --- a/package/secubox/secubox-app-gitea/files/usr/sbin/giteactl +++ b/package/secubox/secubox-app-gitea/files/usr/sbin/giteactl @@ -244,10 +244,14 @@ if ! command -v su-exec >/dev/null 2>&1; then apk add --no-cache git git-lfs openssh su-exec sqlite fi -# Always ensure git user exists (doesn't persist between container restarts) +# Always ensure git user/group exists (doesn't persist between container restarts) +if ! getent group git >/dev/null 2>&1; then + echo "Creating git group..." + addgroup -g 1000 git +fi if ! id -u git >/dev/null 2>&1; then echo "Creating git user..." - adduser -D -s /bin/sh -h /data -u 1000 git + adduser -D -s /bin/sh -h /data -u 1000 -G git git fi # Ensure directories exist with correct ownership