Adds TURBO_API / TURBO_TOKEN / TURBO_TEAM example env vars (all commented) under runner.envs, pointing at http://host.containers.internal:3128 for use with the new turborepo-remote-cache package.
138 lines
4.8 KiB
RPMSpec
138 lines
4.8 KiB
RPMSpec
Name: gitea-act_runner
|
|
Version: 0.3.0
|
|
Release: 6%{?dist}
|
|
Summary: Gitea act runner service.
|
|
License: MIT
|
|
Group: System Environment/Base
|
|
URL: http://gitea.infomaas.com/rpms-fedora-free/gitea-act_runner
|
|
|
|
Source0: https://dl.gitea.com/act_runner/%{version}/act_runner-%{version}-linux-amd64
|
|
Source1: https://dl.gitea.com/act_runner/%{version}/act_runner-%{version}-linux-arm64
|
|
Source10: gitea-act_runner@.service
|
|
Source11: config.yaml
|
|
Source12: gitea-act-runner-setup
|
|
Source13: gitea-act-runner.sysusers
|
|
Source14: gitea-runner-podman.service
|
|
Source15: storage.conf
|
|
Source16: limits.conf
|
|
|
|
BuildRequires: systemd-rpm-macros
|
|
Requires: podman
|
|
Requires: systemd-container
|
|
%{?systemd_requires}
|
|
|
|
ExclusiveArch: x86_64 aarch64
|
|
|
|
%description
|
|
Act runner is a runner for Gitea based on Gitea fork of act.
|
|
|
|
This package includes official binaries and runs act_runner natively on the host.
|
|
|
|
%install
|
|
%{__rm} -rf %{buildroot}
|
|
|
|
install -d -m 755 %{buildroot}%{_bindir}
|
|
%ifarch x86_64
|
|
install -m 755 %{SOURCE0} %{buildroot}%{_bindir}/gitea-act-runner
|
|
%endif
|
|
|
|
%ifarch aarch64
|
|
install -m 755 %{SOURCE1} %{buildroot}%{_bindir}/gitea-act-runner
|
|
%endif
|
|
|
|
install -p -D -m 644 %{SOURCE10} %{buildroot}%{_unitdir}/gitea-act_runner@.service
|
|
install -p -D -m 644 %{SOURCE14} %{buildroot}%{_unitdir}/gitea-runner-podman.service
|
|
install -p -D -m 644 %{SOURCE13} %{buildroot}%{_sysusersdir}/gitea-act-runner.conf
|
|
|
|
install -d -m 750 %{buildroot}%{_sysconfdir}/gitea/runners
|
|
install -m 640 %{SOURCE11} %{buildroot}%{_sysconfdir}/gitea/runners/runner1.yaml
|
|
install -m 755 %{SOURCE12} %{buildroot}%{_bindir}/gitea-act-runner-setup
|
|
|
|
install -d -m 750 %{buildroot}%{_sharedstatedir}/gitea/runners
|
|
|
|
# Podman storage config for gitea-runner user — uses native btrfs driver
|
|
# instead of overlayfs for better performance on btrfs filesystems
|
|
install -d -m 750 %{buildroot}%{_sharedstatedir}/gitea/runners/.config/containers
|
|
install -m 644 %{SOURCE15} %{buildroot}%{_sharedstatedir}/gitea/runners/.config/containers/storage.conf
|
|
|
|
# Resource limits drop-in (shipped commented out as a template)
|
|
install -d -m 755 %{buildroot}%{_sysconfdir}/systemd/system/gitea-act_runner@.service.d
|
|
install -m 644 %{SOURCE16} %{buildroot}%{_sysconfdir}/systemd/system/gitea-act_runner@.service.d/limits.conf
|
|
|
|
install -d -m 755 %{buildroot}/var/cache/act-runner/pnpm-store
|
|
|
|
%pre
|
|
%sysusers_create_package gitea-act-runner %{SOURCE13}
|
|
|
|
%post
|
|
if [ $1 -eq 1 ]; then
|
|
loginctl enable-linger gitea-runner || :
|
|
fi
|
|
|
|
if ! grep -q "^gitea-runner:" /etc/subuid 2>/dev/null; then
|
|
NEXT=$(awk -F: '{n=$2+$3} END{print n+0}' /etc/subuid 2>/dev/null)
|
|
[ "$NEXT" -lt 524288 ] && NEXT=524288
|
|
END=$((NEXT + 65535))
|
|
usermod --add-subuids "$NEXT-$END" --add-subgids "$NEXT-$END" gitea-runner 2>/dev/null || :
|
|
fi
|
|
|
|
%systemd_post gitea-act_runner@.service
|
|
%systemd_post gitea-runner-podman.service
|
|
|
|
%preun
|
|
%systemd_preun gitea-act_runner@.service
|
|
%systemd_preun gitea-runner-podman.service
|
|
|
|
%postun
|
|
%systemd_postun gitea-act_runner@.service
|
|
%systemd_postun gitea-runner-podman.service
|
|
|
|
%clean
|
|
%{__rm} -rf %{buildroot}
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_bindir}/gitea-act-runner
|
|
%{_bindir}/gitea-act-runner-setup
|
|
%{_unitdir}/gitea-act_runner@.service
|
|
%{_unitdir}/gitea-runner-podman.service
|
|
%{_sysusersdir}/gitea-act-runner.conf
|
|
|
|
%dir %{_sysconfdir}/systemd/system/gitea-act_runner@.service.d
|
|
%config(noreplace) %{_sysconfdir}/systemd/system/gitea-act_runner@.service.d/limits.conf
|
|
|
|
%defattr(-,gitea-runner,gitea-runner,750)
|
|
%dir %{_sharedstatedir}/gitea/runners
|
|
%dir %{_sysconfdir}/gitea
|
|
%dir %{_sysconfdir}/gitea/runners
|
|
%config(noreplace) %{_sysconfdir}/gitea/runners/runner1.yaml
|
|
|
|
%dir %{_sharedstatedir}/gitea/runners/.config
|
|
%dir %{_sharedstatedir}/gitea/runners/.config/containers
|
|
%config(noreplace) %{_sharedstatedir}/gitea/runners/.config/containers/storage.conf
|
|
|
|
%dir /var/cache/act-runner
|
|
%dir /var/cache/act-runner/pnpm-store
|
|
|
|
%changelog
|
|
* Wed Apr 08 2026 Zoran Pericic <zpericic@netst.org> - 0.3.0-6
|
|
- Add commented Turborepo Remote Cache env block to config.yaml
|
|
(TURBO_API/TURBO_TOKEN/TURBO_TEAM) for use with the new
|
|
turborepo-remote-cache package
|
|
|
|
* Wed Apr 08 2026 Zoran Pericic <zpericic@netst.org> - 0.3.0-5
|
|
- Fix gitea-runner UID/GID to 125 for stable user@125.service unit name
|
|
- Use BindsTo= for gitea-runner-podman.service dependency
|
|
- Wait for user@125.service and Podman socket before runner starts
|
|
- Ship commented-out limits.conf drop-in for resource caps
|
|
|
|
* Mon Apr 06 2026 Zoran Pericic <zpericic@netst.org> - 0.3.0-4
|
|
- Add Podman btrfs storage.conf for gitea-runner user
|
|
- Add dependency on gitea-runner-podman.service
|
|
- Use usermod --add-subuids for subuid/subgid allocation
|
|
- Add systemd-container dependency for loginctl enable-linger
|
|
|
|
* Mon Mar 17 2025 Zoran Pericic <zpericic@netst.org> - 0.3.0-2
|
|
- Add gitea-runner-podman.service for rootless Podman API socket
|