Add a /etc directory for the root dockerd setup

Also don't show the post install advice when upgrading
This commit is contained in:
2025-01-23 15:11:10 +01:00
parent 3909595b8e
commit 03b2910573
2 changed files with 15 additions and 14 deletions
+13 -11
View File
@@ -16,7 +16,7 @@ A runner for Gitea based on act.}
Name: gitea-act-runner
Version: 0.2.10
Release: %autorelease -b 6
Release: %autorelease -b 7
Summary: A runner for Gitea based on act.
%global act_runner_service %{name}.service
@@ -91,15 +91,17 @@ fi
%post %{dockerd_rootless}
%systemd_user_post %{act_runner_rootless_service} %{dockerd_rootless_service}
loginctl enable-linger %{runner_user_rootless}
echo Please read README.%{rootless}-%{dockerd}.md to finish the installation
if [ $1 -eq 1 ] || [ ! -d /home/%{runner_user_rootless}/act_runner ]; then
echo ' INFO Please read README.%{rootless}-%{dockerd}.md to finish the installation'
fi
%preun %{dockerd_rootless}
loginctl disable-linger %{runner_user_rootless}
%systemd_user_preun %{dockerd_rootless_service} %{act_runner_rootless_service}
loginctl disable-linger %{runner_user_rootless}
%postun %{dockerd_rootless}
if [ $1 -eq 0 ]; then
userdel -rZf %{runner_user_rootless}
userdel -rf %{runner_user_rootless}
fi
%prep
@@ -110,19 +112,18 @@ fi
go build %{gobuild_baseflags} -o bin/%{act_runner_bin} %{goipath}
%install
install -m 0755 -vd %{buildroot}%{_bindir}
install -m 0755 -vd %{buildroot}%{_unitdir}
install -m 0755 -vd %{buildroot}%{_userunitdir}
install -m 0755 -vd %{buildroot}%{_docdir}/%{name}
install -m 0755 -vd %{buildroot}%{_datadir}/%{name}
# 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 -D -m 0644 -vp %{SOURCE1} %{buildroot}%{_unitdir}/%{act_runner_service}
# Rootless dockerd
# 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
@@ -135,6 +136,7 @@ install -D -m 0755 -vp %{SOURCE6} %{buildroot}%{_datadir}/%{name}/rootless-act_r
%files %{dockerd}
%license LICENSE
%doc README-%{dockerd}.md
%dir %{_sysconfdir}/%{name}
%{_unitdir}/*
%files %{dockerd_rootless}