fix: unxz does already remove file automatically

This commit is contained in:
2026-04-06 16:45:33 +02:00
parent c2b680c6df
commit 809893f932

View File

@@ -22,6 +22,9 @@ Install the Git server called Gitea.
%make_install
%post
# Display commands and exit on error
set -xe
# Create gitea user
if ! id gitea >/dev/null 2>&1; then
useradd --base-dir %{_sharedstatedir} --create-home --shell $SHELL --system gitea
@@ -78,7 +81,6 @@ wget --output-document $ACTRUNNER_BINARY.xz.sha256 https://gitea.com/gitea/act_r
cat $ACTRUNNER_BINARY.xz.sha256 | sha256sum --check --status
rm $ACTRUNNER_BINARY.xz.sha256
unxz $ACTRUNNER_BINARY.xz
rm $ACTRUNNER_BINARY.xz
chmod 755 $ACTRUNNER_BINARY
mv $ACTRUNNER_BINARY %{_sbindir}/act_runner
@@ -100,6 +102,9 @@ systemctl reenable gitea.service
systemctl restart gitea.service nginx.service
%postun
# Display commands and exit on error
set -xe
# If uninstalling, then delete users and db
if [ $1 == 0 ]; then
# Remove gitea user if existing