## START: Set by rpmautospec ## (rpmautospec version 0.8.4) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 9; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global dockerd dockerd %global rootless rootless %global shim docker-group-shim %global dockerd_rootless %{dockerd}-%{rootless} %global dockerd_rootless_service %{dockerd}-%{rootless}-user.service %global runner_bin act_runner %global runner_user act-runner %global runner_user_rootless %{runner_user}-%{rootless} %global debug_package %{nil} %global golicenses LICENSE %global godocs examples README.md %global goipath gitea.com/gitea/act_runner %global common_description %{expand: A runner for Gitea based on nectos/act. } %global major 0 %global minor 6 %global revision 1 Name: gitea-act-runner Version: %{major}.%{minor}.%{revision} Release: %autorelease -b 13 -e test13 Summary: A runner for Gitea based on act. %global act_runner_service %{name}.service %global act_runner_rootless_service %{name}-%{rootless}.service License: MIT URL: https://gitea.com/gitea/runner Source0: https://gitea.com/gitea/runner/archive/v%{version}.tar.gz Source1: %{act_runner_service} Source2: %{act_runner_rootless_service} Source3: %{dockerd_rootless_service} Source4: README-%{dockerd}.md Source5: README-%{rootless}-%{dockerd}.md Source6: rootless-act_runner-register.sh Source7: %{name}-sysusers.conf Source9: act_runner-register.sh Source10: %{name}-sysusers-%{dockerd}.conf Source11: %{name}-sysusers-%{rootless}.conf Source12: %{name}-tmpfiles-%{rootless}.conf BuildRequires: go >= 1.26 go-rpm-macros git-core sed systemd-rpm-macros %gometa -L -f %description %{common_description} # ############################################################# # act_runner with dockerd package %package %{dockerd} Summary: Enable running gitea actions in docker containers Requires: %{name} Requires: ( moby-engine or docker-ce ) Conflicts: %{name}-%{dockerd_rootless} %{?%systemd_requires} %description %{dockerd} %{common_description} Run gitea actions in docker containers %pre %{dockerd} %sysusers_create_package %{name} %{SOURCE7} %sysusers_create_package %{name} %{SOURCE10} %post %{dockerd} %systemd_post %{act_runner_service} if [ $1 -eq 1 ] || [ ! -d %{_sharedstatedir}/%{runner_user}/act_runner ]; then echo ' INFO Please read README-%{dockerd}.md to finish the installation' fi %preun %{dockerd} %systemd_preun %{act_runner_service} %postun %{dockerd} %systemd_postun %{act_runner_service} # ############################################################# # ############################################################# # docker-ce docker group dependency provider shim package %package %{shim} Summary: Provide the group(docker) requirement when using non-rootless docker-ce Provides: group(docker) Requires: docker-ce %description %{shim} The %{name}-%{dockerd} package uses sysusers.d to manage users and group memberships. The user needs to be a member of the docker groupm that is created by docker-ce or moby-engine. Moby engine provides a group(docker), but docker-ce doesn't, so this shim provides that requirement to enable using the act-runner with the non-rootless docker-ce. # ############################################################# # act_runner with rootless dockerd package %package %{dockerd_rootless} Summary: Enable running gitea actions in non-root docker containers Requires: %{name} iptables sed shadow-utils Requires: ( moby-engine-rootless-extras or docker-ce-rootless-extras ) Conflicts: %{name}-%{dockerd} %{?%systemd_requires} %description %{dockerd_rootless} %{common_description} Run gitea actions in non-root docker containers %pre %{dockerd_rootless} %sysusers_create_package %{name}-%{rootless} %{SOURCE11} %tmpfiles_create_package %{name}-%{rootless} %{SOURCE12} %post %{dockerd_rootless} %systemd_user_post %{act_runner_rootless_service} %{dockerd_rootless_service} loginctl enable-linger %{runner_user_rootless} %preun %{dockerd_rootless} if [ $1 -eq 0 ]; then loginctl disable-linger %{runner_user_rootless} fi %systemd_user_preun %{dockerd_rootless_service} %{act_runner_rootless_service} %postun %{dockerd_rootless} %systemd_user_postun %{dockerd_rootless_service} %{act_runner_rootless_service} # ############################################################# %prep %autosetup -p1 -C -v %{__cp} %{SOURCE4} %{SOURCE5} . %build go build %{gobuild_baseflags} -o bin/%{runner_bin} %{goipath} %install # The binary install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp bin/* %{buildroot}%{_bindir} # dockerd install -m 0755 -vd %{buildroot}%{_unitdir} install -m 0755 -vd %{buildroot}%{_sysconfdir}/%{name} install -m 0700 -vd %{buildroot}%{_sharedstatedir}/%{name} install -D -m 0644 -vp %{SOURCE1} %{buildroot}%{_unitdir}/%{act_runner_service} install -D -m 0644 %{SOURCE7} %{buildroot}%{_sysusersdir}/%{name}.conf install -D -m 0644 %{SOURCE10} %{buildroot}%{_sysusersdir}/%{name}-%{dockerd}.conf bin/%{runner_bin} generate-config | \ sed -e '/^ A_TEST_ENV/d' -e '/^ - "ubuntu-/d' -e 's:file\: .runner:file\: %{_sysconfdir}/%{name}/.runner:' -e 's/level: info/level: debug/' \ > %{buildroot}%{_sysconfdir}/%{name}/config.yaml install -D -m 0755 -vp %{SOURCE9} %{buildroot}%{_datadir}/%{name}/act_runner-register.sh # dockerd-rootless install -m 0755 -vd %{buildroot}%{_userunitdir} install -m 0755 -vd %{buildroot}%{_datadir}/%{name} install -D -m 0644 -vp %{SOURCE2} %{buildroot}%{_userunitdir}/%{act_runner_rootless_service} install -D -m 0644 -vp %{SOURCE3} %{buildroot}%{_userunitdir}/%{dockerd_rootless_service} install -D -m 0755 -vp %{SOURCE6} %{buildroot}%{_datadir}/%{name}/rootless-act_runner-register.sh install -D -m 0644 %{SOURCE11} %{buildroot}%{_sysusersdir}/%{name}-%{rootless}.conf install -D -m 0644 %{SOURCE12} %{buildroot}%{_tmpfilesdir}/%{name}-%{rootless}.conf %files %license LICENSE %doc README.md %{_bindir}/%{runner_bin} %dir %{_datadir}/%{name} %files %{dockerd} %license LICENSE %doc README-%{dockerd}.md %dir %{_sysconfdir}/%{name} %config(noreplace) %{_sysconfdir}/%{name}/config.yaml %attr(0700, %{runner_user}, %{runner_user}) %dir %{_sharedstatedir}/%{name} %ghost %config(noreplace) %{_sharedstatedir}/%{name}/.runner %{_unitdir}/%{act_runner_service} %{_sysusersdir}/%{name}.conf %{_sysusersdir}/%{name}-%{dockerd}.conf %{_datadir}/%{name}/act_runner-register.sh %files %{dockerd_rootless} %license LICENSE %doc README-%{rootless}-%{dockerd}.md %{_userunitdir}/* %{_datadir}/%{name}/rootless-act_runner-register.sh %{_sysusersdir}/%{name}-%{rootless}.conf %{_tmpfilesdir}/%{name}-%{rootless}.conf %files %{shim} %changelog ## START: Generated by rpmautospec * Wed May 27 2026 Daniel Demus - 0.6.1-21.test13 - Force release number * Wed May 27 2026 Daniel Demus - 0.6.1-8.test13 - Let the package own the shared data dir instead of a tmpfiles.d setup * Wed May 27 2026 Daniel Demus - 0.6.1-7.test5 - Expand documentation * Wed May 27 2026 Daniel Demus - 0.6.1-6.test5 - Correct job name * Wed May 27 2026 Daniel Demus - 0.6.1-5.test5 - Add a shim providing group(docker) * Wed May 27 2026 Daniel Demus - 0.6.1-4.test5 - Remove defaults from generated config to avoid overwriting registration * Wed May 27 2026 Daniel Demus - 0.6.1-3.test2 - Split sysusers.conf to only require group(docker) when using dockerd * Fri May 15 2026 Daniel Demus - 0.6.1-1 - act runner release 0.6.1 * Tue Apr 28 2026 Daniel Demus - 0.6.0-1 - act runner release 0.6.0 (#3) * Tue Apr 28 2026 Daniel Demus - 0.5.0-1 - act runner release 0.5.0 (#2) * Fri Apr 17 2026 Daniel Demus - 0.4.0-1 - act runner release 0.4.0 (#1) * Sun Mar 29 2026 Daniel Demus - 0.3.1-1 - act runner release 0.3.1 * Sun Mar 29 2026 Daniel Demus - 0.3.0-3 - Consolidate builds into 1 workflow * Sat Feb 21 2026 Daniel Demus - 0.3.0-2 - Use go version available in target release version * Fri Feb 20 2026 Daniel Demus - 0.3.0-1 - Release 0.3.0 * Sat Nov 22 2025 Daniel Demus - 0.2.13-5 - Upgrade to 0.2.13 * Thu Feb 27 2025 Daniel Demus - 0.2.11-9 - Add more ordering and some start back-off to allow gitea to be ready * Wed Feb 12 2025 Daniel Demus - 0.2.11-4 - Depend on the correct docker unit * Sun Jan 26 2025 Daniel Demus - 0.2.11-5 - Simplify and fix dockerd parts * Sun Jan 26 2025 Daniel Demus - 0.2.11-2 - Use sysusers and tmpfiles in plain dockerd setup * Thu Jan 23 2025 Daniel Demus - 0.2.11-1 - Upgrade to 0.2.11 which requires go 1.23 (not available on f40)) * Thu Jan 23 2025 Daniel Demus - 0.2.10-25 - Fix systemd unit startup hanging * Thu Jan 23 2025 Daniel Demus - 0.2.10-22 - Don't create mail spool * Thu Jan 23 2025 Daniel Demus - 0.2.10-20 - Only run things on install/uninstall, not upgrade * Thu Jan 23 2025 Daniel Demus - 0.2.10-18 - Add a /etc directory for the root dockerd setup * Thu Jan 23 2025 Daniel Demus - 0.2.10-16 - Re-arrange services and fix paths * Thu Jan 23 2025 Daniel Demus - 0.2.10-13 - Hand-code user creation and deletion * Wed Jan 22 2025 Daniel Demus - 0.2.10-10 - Bump release * Wed Jan 22 2025 Daniel Demus - 0.2.10-8 - Add dockerd subpackage * Wed Jan 22 2025 Daniel Demus - 0.2.10-7 - Use constant for binary name to avoid oopsies * Wed Jan 22 2025 Daniel Demus - 0.2.10-6 - Use systemd-rpm-macros * Wed Jan 22 2025 Daniel Demus - 0.2.10-5 - %%autosetup on f40 doesn't support -C so use plain %%setup with -n * Wed Jan 22 2025 Daniel Demus - 0.2.10-4 - Add rootless docker subpackage * Wed Jan 22 2025 Daniel Demus - 0.2.10-3 - BuildRequire git * Thu Jan 02 2025 Daniel Demus - ## END: Generated by rpmautospec