Simplify and fix dockerd parts
This commit is contained in:
+12
-6
@@ -16,7 +16,7 @@ A runner for Gitea based on act.}
|
||||
|
||||
Name: gitea-act-runner
|
||||
Version: 0.2.11
|
||||
Release: %autorelease
|
||||
Release: %autorelease -b 3
|
||||
Summary: A runner for Gitea based on act.
|
||||
|
||||
%global act_runner_service %{name}.service
|
||||
@@ -33,6 +33,8 @@ Source5: README-%{rootless}-%{dockerd}.md
|
||||
Source6: rootless-act_runner-register.sh
|
||||
Source7: %{name}-sysusers.conf
|
||||
Source8: %{name}-tmpfiles.conf
|
||||
Source9: act_runner-register.sh
|
||||
|
||||
BuildRequires: go >= 1.23
|
||||
BuildRequires: go-rpm-macros
|
||||
BuildRequires: git-core
|
||||
@@ -60,15 +62,16 @@ Run gitea actions in docker containers
|
||||
|
||||
%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}
|
||||
if [ $1 -eq 0 ]; then
|
||||
userdel -rf %{runner_user}
|
||||
fi
|
||||
|
||||
# #############################################################
|
||||
|
||||
|
||||
@@ -96,7 +99,7 @@ fi
|
||||
%post %{dockerd_rootless}
|
||||
%systemd_user_post %{act_runner_rootless_service} %{dockerd_rootless_service}
|
||||
if [ $1 -eq 1 ] || [ ! -d /home/%{runner_user_rootless}/act_runner ]; then
|
||||
echo ' INFO Please read README.%{rootless}-%{dockerd}.md to finish the installation'
|
||||
echo ' INFO Please read README-%{rootless}-%{dockerd}.md to finish the installation'
|
||||
fi
|
||||
loginctl enable-linger %{runner_user_rootless}
|
||||
|
||||
@@ -134,6 +137,7 @@ install -D -m 0644 -vp %{SOURCE1} %{buildroot}%{_unitdir}/%{act_runner_service}
|
||||
install -D %{SOURCE7} %{buildroot}%{_sysusersdir}/%{name}.conf
|
||||
install -D %{SOURCE8} %{buildroot}%{_tmpfilesdir}/%{name}.conf
|
||||
bin/act_runner generate-config > %{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}
|
||||
@@ -146,6 +150,7 @@ install -D -m 0755 -vp %{SOURCE6} %{buildroot}%{_datadir}/%{name}/rootless-act_r
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%{_bindir}/*
|
||||
%dir %{_datadir}/%{name}
|
||||
|
||||
%files %{dockerd}
|
||||
%license LICENSE
|
||||
@@ -155,12 +160,13 @@ install -D -m 0755 -vp %{SOURCE6} %{buildroot}%{_datadir}/%{name}/rootless-act_r
|
||||
%{_unitdir}/*
|
||||
%{_sysusersdir}/%{name}.conf
|
||||
%{_tmpfilesdir}/%{name}.conf
|
||||
%{_datadir}/%{name}/act_runner-register.sh
|
||||
|
||||
%files %{dockerd_rootless}
|
||||
%license LICENSE
|
||||
%doc README-%{rootless}-%{dockerd}.md
|
||||
%{_userunitdir}/*
|
||||
%{_datadir}/*
|
||||
%{_datadir}/%{name}/rootless-act_runner-register.sh
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
|
||||
Reference in New Issue
Block a user