2 Commits

Author SHA1 Message Date
e19760d37e fix: typo in spec
Some checks failed
Continuous Delivery / build_n_upload (push) Has been cancelled
2026-03-01 17:03:10 +01:00
89837bef2b fix: remove wget output
Some checks failed
Continuous Delivery / build_n_upload (push) Has been cancelled
2026-03-01 16:56:47 +01:00

View File

@@ -23,8 +23,8 @@ Install the Git UI server called Gitea.
%post
# Download gitea bin and verify gpg signature
wget --output-document %{_tmppath}/gitea "$GITEA_BIN_URL"
wget --output-document %{_tmppath}/gitea.asc "$GITEA_ASC_URL"
wget --quiet --output-document %{_tmppath}/gitea "$GITEA_BIN_URL"
wget --quiet --output-document %{_tmppath}/gitea.asc "$GITEA_ASC_URL"
gpg --keyserver "$GITEA_GPG_KEYSERVER" --recv "$GITEA_GPG_RECV"
gpg --verify %{_tmppath}/gitea.asc %{_tmppath}/gitea
mv %{_tmppath}/gitea %{_sbindir}
@@ -38,14 +38,15 @@ envsubst < %{_sysconfdir}/gitea/app.ini > %{_sysconfdir}/gitea/app.ini.new
mv %{_sysconfdir}/gitea/app.ini.new %{_sysconfdir}/gitea/app.ini
# Create gitea user
useradd --system --create-home --bade-dir %{_sharedstatedir} gitea
useradd --system --create-home --base-dir %{_sharedstatedir} gitea
runuser --user gitea -- mkdir --parents %{_sharedstatedir}/gitea/{data,custom}
chgrp gitea %{_sysconfdir}/gitea/app.ini
# Start gitea service
# Start gitea and nginx services
systemctl daemon-reload
systemctl reenable gitea.service
systemctl restart gitea.service
systemctl restart nginx.service
# Create actrunners
for i in $(seq 1 $GITEA_ACT_RUNNERS); do
@@ -63,10 +64,10 @@ runuser --user gitea -- gitea dump --config %{_sysconfdir}/gitea/app.ini --tempd
%postun
# Remove gitea user after uninstall
if [ %1 == 0 ]; then
systemctl stop gitea.service
userdel --force --remove gitea
fi
#if [ %1 == 0 ]; then
# systemctl stop gitea.service
# userdel --force --remove gitea
#fi
%files
%attr(644, root, root) %{_sysconfdir}/nginx/conf.d/git.netoik.io.conf