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 <noreply@anthropic.com>
This commit is contained in:
CyberMind-FR 2026-01-24 11:26:04 +01:00
parent 9a8395d79c
commit 9eed3a50d1
2 changed files with 7 additions and 3 deletions

View File

@ -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 <contact@cybermind.fr>

View File

@ -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