specfile: Remove %pre section

We have been using the systemd RPM macro `tmpfiles_create_package`
incorrectly. Since the entries in `tmpfiles.d` and `sysusers.d` are
not prerequisites for installation, https://src.fedoraproject.org/rpms/systemd/blob/master/f/triggers.systemd#_68
should be sufficient to ensure that the necessary tmpfiles and users
are created post installation.
This commit is contained in:
Kelvin Fan 2020-09-23 16:26:28 -04:00
parent 68d0543537
commit 82cfd04819
1 changed files with 4 additions and 5 deletions

View File

@ -6,7 +6,7 @@
Name: rust-%{crate}
Version: 0.0.12
Release: 5%{?dist}
Release: 6%{?dist}
Summary: Update agent for Fedora CoreOS
# Upstream license specification: Apache-2.0
@ -69,10 +69,6 @@ License: ASL 2.0 and BSD and MIT and MPLv2.0 and zlib
%{_tmpfilesdir}/zincati.conf
%{_datadir}/polkit-1/rules.d/zincati.rules
%pre -n %{crate}
%sysusers_create_package %{crate} 50-zincati.conf
%tmpfiles_create_package %{crate} zincati.conf
%post -n %{crate}
%systemd_post zincati.service
@ -123,6 +119,9 @@ ln -snf /run/%{crate}/public/metrics.promsock %{buildroot}/run/%{crate}/private/
%endif
%changelog
* Wed Sep 23 2020 Kelvin Fan <kfan@redhat.com> - 0.0.12-6
- Remove unnecessary usage of systemd RPM macro in %pre
* Sun Aug 16 15:01:58 GMT 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.0.12-5
- Rebuild