Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 545898493c | |||
| 1f91ec0de9 |
@@ -34,7 +34,7 @@ usermod --groups postgres,valkey --append gitea
|
|||||||
export ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
|
export ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
|
||||||
export GITEA_BINARY=gitea-1.25.5-linux-$ARCH
|
export GITEA_BINARY=gitea-1.25.5-linux-$ARCH
|
||||||
wget --output-document $GITEA_BINARY https://dl.gitea.com/gitea/1.25.5/$GITEA_BINARY
|
wget --output-document $GITEA_BINARY https://dl.gitea.com/gitea/1.25.5/$GITEA_BINARY
|
||||||
wget --output-document $GITEA_BINARY.asc %{_tmppath} https://dl.gitea.com/gitea/1.25.5/$GITEA_BINARY.asc
|
wget --output-document $GITEA_BINARY.asc https://dl.gitea.com/gitea/1.25.5/$GITEA_BINARY.asc
|
||||||
gpg --keyserver hkps://keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2
|
gpg --keyserver hkps://keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2
|
||||||
gpg --verify $GITEA_BINARY.asc $GITEA_BINARY
|
gpg --verify $GITEA_BINARY.asc $GITEA_BINARY
|
||||||
rm $GITEA_BINARY.asc
|
rm $GITEA_BINARY.asc
|
||||||
@@ -52,10 +52,10 @@ chown root:gitea %{_sysconfdir}/gitea/app.ini
|
|||||||
|
|
||||||
# Add lugit theme
|
# Add lugit theme
|
||||||
export GITEA_LUGIT_THEME=gitea-lugit-theme
|
export GITEA_LUGIT_THEME=gitea-lugit-theme
|
||||||
wget --output-document $GITEA_LUGIT_THEME.tar.gz https://github.com/lucas-labs/gitea-lugit-theme/releases/download/v1.0.1/$GITEA_LUGIT_THEME.tar.gz
|
wget --output-document %{_tmppath}/$GITEA_LUGIT_THEME.tar.gz https://github.com/lucas-labs/gitea-lugit-theme/releases/download/v1.0.1/$GITEA_LUGIT_THEME.tar.gz
|
||||||
runuser --user=gitea -- tar --extract --gzip --overwrite --directory=%{_sharedstatedir}/gitea/custom --file %{_tmppath}/$GITEA_LUGIT_THEME.tar.gz
|
runuser --user=gitea -- tar --extract --gzip --overwrite --directory=%{_sharedstatedir}/gitea/custom --file %{_tmppath}/$GITEA_LUGIT_THEME.tar.gz
|
||||||
runuser --user=gitea -- mv %{_tmppath}/gitea_images/* %{_sharedstatedir}/gitea/custom/public/assets/img
|
rm %{_tmppath}/$GITEA_LUGIT_THEME.tar.gz
|
||||||
rm --recursive %{_tmppath}/gitea_images
|
runuser --user=gitea -- cp %{_tmppath}/gitea_images/* %{_sharedstatedir}/gitea/custom/public/assets/img
|
||||||
|
|
||||||
# Create postgres user and db
|
# Create postgres user and db
|
||||||
if ! runuser --user=postgres -- psql --quiet --tuples-only --command='\du' | grep --quiet gitea; then
|
if ! runuser --user=postgres -- psql --quiet --tuples-only --command='\du' | grep --quiet gitea; then
|
||||||
@@ -76,11 +76,11 @@ export ACTRUNNER_BINARY=act_runner-0.3.0-linux-$ARCH
|
|||||||
wget --output-document $ACTRUNNER_BINARY.xz https://gitea.com/gitea/act_runner/releases/download/v0.3.0/$ACTRUNNER_BINARY.xz
|
wget --output-document $ACTRUNNER_BINARY.xz https://gitea.com/gitea/act_runner/releases/download/v0.3.0/$ACTRUNNER_BINARY.xz
|
||||||
wget --output-document $ACTRUNNER_BINARY.xz.sha256 https://gitea.com/gitea/act_runner/releases/download/v0.3.0/$ACTRUNNER_BINARY.xz.sha256
|
wget --output-document $ACTRUNNER_BINARY.xz.sha256 https://gitea.com/gitea/act_runner/releases/download/v0.3.0/$ACTRUNNER_BINARY.xz.sha256
|
||||||
cat $ACTRUNNER_BINARY.xz.sha256 | sha256sum --check --status
|
cat $ACTRUNNER_BINARY.xz.sha256 | sha256sum --check --status
|
||||||
|
rm $ACTRUNNER_BINARY.xz.sha256
|
||||||
unxz $ACTRUNNER_BINARY.xz
|
unxz $ACTRUNNER_BINARY.xz
|
||||||
|
rm $ACTRUNNER_BINARY.xz
|
||||||
chmod 755 $ACTRUNNER_BINARY
|
chmod 755 $ACTRUNNER_BINARY
|
||||||
mv $ACTRUNNER_BINARY %{_sbindir}/act_runner
|
mv $ACTRUNNER_BINARY %{_sbindir}/act_runner
|
||||||
rm $ACTRUNNER_BINARY.xz
|
|
||||||
rm $ACTRUNNER_BINARY.xz.sha256
|
|
||||||
|
|
||||||
# Create 4 actrunner users
|
# Create 4 actrunner users
|
||||||
export ACTRUNNER_TOKEN=$(runuser --user=gitea -- gitea actions generate-token-runner --scope samuel)
|
export ACTRUNNER_TOKEN=$(runuser --user=gitea -- gitea actions generate-token-runner --scope samuel)
|
||||||
@@ -134,7 +134,9 @@ fi
|
|||||||
|
|
||||||
%ghost %attr(755, root, root) %{_sbindir}/gitea
|
%ghost %attr(755, root, root) %{_sbindir}/gitea
|
||||||
%ghost %attr(755, root, root) %{_sbindir}/act_runner
|
%ghost %attr(755, root, root) %{_sbindir}/act_runner
|
||||||
%exclude %{_tmppath}/gitea_images/*
|
|
||||||
|
%dir %attr(755, root, root) %{_tmppath}/gitea_images
|
||||||
|
%attr(644, root, root) %{_tmppath}/gitea_images/{favicon,logo}.{png,svg}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
%autochangelog
|
%autochangelog
|
||||||
|
|||||||
Reference in New Issue
Block a user