Skip to content

Commit

Permalink
Include system agent unit file in specfile
Browse files Browse the repository at this point in the history
Signed-off-by: David Cassany <[email protected]>
(cherry picked from commit 5bf5b3c)
  • Loading branch information
davidcassany committed Sep 20, 2023
1 parent 087a49f commit 809e3e7
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .obs/specfile/elemental.spec
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,7 @@ cp -a framework/files/* %{buildroot}
rm -rf %{buildroot}/var/log/journal

# remove luet config in Elemental Teal
rm -rf %{buildroot}/etc/luet

# belongs to elemental-system-agent package
rm %{buildroot}%{_unitdir}/elemental-system-agent.service
rm -rf %{buildroot}/etc/luet

# remove placeholders
rm -rf %{buildroot}/usr/libexec/.placeholder
Expand All @@ -82,6 +79,7 @@ rm -rf %{buildroot}/usr/libexec/.placeholder
%service_add_pre elemental-register-install.service
%service_add_pre elemental-register-reset.service
%service_add_pre elemental-register.timer
%service_add_pre elemental-system-agent.service
%endif

%post
Expand All @@ -92,13 +90,15 @@ rm -rf %{buildroot}/usr/libexec/.placeholder
%service_add_post elemental-register-install.service
%service_add_post elemental-register-reset.service
%service_add_post elemental-register.timer
%service_add_post elemental-system-agent.service
%else
%systemd_post elemental-populate-node-labels.service
%systemd_post shutdown-containerd.service
%systemd_post elemental-register.service
%systemd_post elemental-register-install.service
%systemd_post elemental-register-reset.service
%systemd_post elemental-register.timer
%systemd_post elemental-system-agent.service
%endif

%preun
Expand All @@ -109,13 +109,15 @@ rm -rf %{buildroot}/usr/libexec/.placeholder
%service_del_preun elemental-register-install.service
%service_del_preun elemental-register-reset.service
%service_del_preun elemental-register.timer
%service_del_preun elemental-system-agent.service
%else
%systemd_preun elemental-populate-node-labels.service
%systemd_preun shutdown-containerd.service
%systemd_preun elemental-register.service
%systemd_preun elemental-register-install.service
%systemd_preun elemental-register-reset.service
%systemd_preun elemental-register.timer
%systemd_preun elemental-system-agent.service
%endif

%postun
Expand All @@ -126,13 +128,15 @@ rm -rf %{buildroot}/usr/libexec/.placeholder
%service_del_postun elemental-register-install.service
%service_del_postun elemental-register-reset.service
%service_del_postun elemental-register.timer
%service_del_postun elemental-system-agent.service
%else
%systemd_postun elemental-populate-node-labels.service
%systemd_postun shutdown-containerd.service
%systemd_postun elemental-register.service
%systemd_postun elemental-register-install.service
%systemd_postun elemental-register-reset.service
%systemd_postun elemental-register.timer
%systemd_postun elemental-system-agent.service
%endif

%files
Expand All @@ -154,6 +158,7 @@ rm -rf %{buildroot}/usr/libexec/.placeholder
%{_unitdir}/elemental-register-reset.service
%{_unitdir}/elemental-register.timer
%{_unitdir}/elemental-populate-node-labels.service
%{_unitdir}/elemental-system-agent.service
%{_sbindir}/elemental-populate-node-labels
%dir /usr/libexec
%dir %{systemdir}
Expand Down

0 comments on commit 809e3e7

Please sign in to comment.