-
-
Save rfairley/9b46cca7c5cf00cda6560a670c3aeeaf to your computer and use it in GitHub Desktop.
rust-zincati-review.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/rust-zincati.spec | |
+++ b/rust-zincati.spec | |
@@ -17,6 +17,7 @@ Source: %{crates_source} | |
ExclusiveArch: %{rust_arches} | |
BuildRequires: rust-packaging | |
+BuildRequires: systemd-rpm-macros | |
%global _description %{expand: | |
Update agent for Fedora CoreOS.} | |
@@ -32,6 +33,24 @@ Summary: %{summary} | |
%{_bindir}/zincati | |
%doc README.md | |
%license COPYRIGHT LICENSE | |
+%{_unitdir}/zincati.service | |
+%{_sysusersdir}/50-zincati.conf | |
+%dir %{_prefix}/lib/%{crate}/config.d | |
+%{_prefix}/lib/%{crate}/config.d/50-fedora-coreos-cincinnati.toml | |
+%dir /run/%{crate}/config.d | |
+%dir %{_sysconfdir}/%{crate}/config.d | |
+ | |
+%pre -n %{crate} | |
+%sysusers_create_package zincati 50-zincati.conf | |
+ | |
+%post -n %{crate} | |
+%systemd_post zincati.service | |
+ | |
+%preun -n %{crate} | |
+%systemd_preun zincati.service | |
+ | |
+%postun -n %{crate} | |
+%systemd_postun_with_restart zincati.service | |
%prep | |
%autosetup -n %{crate}-%{version_no_tilde} -p1 | |
@@ -45,6 +64,14 @@ Summary: %{summary} | |
%install | |
%cargo_install | |
+%{__install} -Dpm0644 -t %{buildroot}%{_prefix}/lib/%{crate}/config.d \ | |
+ dist/config.d/*.toml | |
+%{__mkdir_p} %{buildroot}/run/%{crate}/config.d | |
+%{__mkdir_p} %{buildroot}%{_sysconfdir}/%{crate}/config.d | |
+%{__install} -Dpm0644 -t %{buildroot}%{_sysusersdir} \ | |
+ dist/sysusers.d/*.conf | |
+%{__install} -Dpm0644 -t %{buildroot}%{_unitdir} \ | |
+ dist/systemd/system/*.service | |
%if %{with check} | |
%check |
Author
rfairley
commented
Jun 19, 2019
•
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment