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]>
  • Loading branch information
davidcassany committed Sep 19, 2023
1 parent 4960ffc commit e483c5b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .obs/specfile/elemental.spec
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ cp -a framework/files/* %{buildroot}

rm -rf %{buildroot}/var/log/journal

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

# remove placeholders
rm -rf %{buildroot}/usr/libexec/.placeholder

Expand All @@ -79,6 +76,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 @@ -89,13 +87,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 @@ -106,13 +106,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 @@ -123,13 +125,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 @@ -151,6 +155,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 e483c5b

Please sign in to comment.