rust-zincati/rust-zincati.spec

207 lines
6.4 KiB
RPMSpec

# Generated by rust2rpm 15
%bcond_without check
%global __cargo_skip_build 0
%global crate zincati
Name: rust-%{crate}
Version: 0.0.14
Release: 1%{?dist}
Summary: Update agent for Fedora CoreOS
# Upstream license specification: Apache-2.0
License: ASL 2.0
URL: https://crates.io/crates/zincati
Source: %{crates_source}
ExclusiveArch: %{rust_arches}
BuildRequires: rust-packaging
BuildRequires: systemd-rpm-macros
Requires: polkit
%global _description %{expand:
Update agent for Fedora CoreOS.}
%description %{_description}
%package -n %{crate}
Summary: %{summary}
# (MIT or ASL 2.0) and BSD
# ASL 2.0
# ASL 2.0 or Boost
# BSD
# MIT
# MIT or ASL 2.0
# MPLv2.0
# Unlicense or MIT
# zlib
License: ASL 2.0 and BSD and MIT and MPLv2.0 and zlib
%description -n %{crate} %{_description}
%files -n %{crate}
%{_libexecdir}/zincati
%doc README.md
%license COPYRIGHT LICENSE
%dir %{_prefix}/lib/%{crate}
%dir %{_prefix}/lib/%{crate}/config.d
%{_prefix}/lib/%{crate}/config.d/*.toml
%attr(0775, zincati, zincati) %dir /run/%{crate}
%attr(0775, zincati, zincati) %dir /run/%{crate}/config.d
%attr(0770, zincati, zincati) %dir /run/%{crate}/private
%attr(0775, zincati, zincati) %dir /run/%{crate}/public
%verify(not size mtime md5) /run/%{crate}/public/metrics.promsock
%verify(not size mtime md5) /run/%{crate}/private/metrics.promsock
%dir %{_sysconfdir}/%{crate}
%dir %{_sysconfdir}/%{crate}/config.d
%{_unitdir}/zincati.service
%{_sysusersdir}/50-zincati.conf
%{_tmpfilesdir}/zincati.conf
%{_datadir}/polkit-1/rules.d/zincati.rules
%{_datadir}/polkit-1/actions/org.coreos.zincati.*
%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
%cargo_prep
%generate_buildrequires
%cargo_generate_buildrequires
%build
%cargo_build
%install
%cargo_install
# `zincati` should not be executed directly by users, so we move the binary
# out of `/usr/bin`. See: https://github.com/coreos/fedora-coreos-tracker/issues/244
mkdir -p %{buildroot}%{_libexecdir}
mv %{buildroot}%{_bindir}/zincati %{buildroot}%{_libexecdir}/zincati
install -Dpm0644 -t %{buildroot}%{_prefix}/lib/%{crate}/config.d \
dist/config.d/*.toml
mkdir -p %{buildroot}/run/%{crate}/config.d
mkdir -p %{buildroot}/run/%{crate}/private
mkdir -p %{buildroot}/run/%{crate}/public
touch %{buildroot}/run/%{crate}/public/metrics.promsock
mkdir -p %{buildroot}%{_sysconfdir}/%{crate}/config.d
install -Dpm0644 -t %{buildroot}%{_unitdir} \
dist/systemd/system/*.service
install -Dpm0644 -t %{buildroot}%{_sysusersdir} \
dist/sysusers.d/*.conf
install -Dpm0644 -t %{buildroot}%{_tmpfilesdir} \
dist/tmpfiles.d/*.conf
install -Dpm0644 -t %{buildroot}%{_datadir}/polkit-1/rules.d \
dist/polkit-1/rules.d/*.rules
install -Dpm0644 -t %{buildroot}%{_datadir}/polkit-1/actions \
dist/polkit-1/actions/org.coreos.zincati.*
ln -snf /run/%{crate}/public/metrics.promsock %{buildroot}/run/%{crate}/private/metrics.promsock
%if %{with check}
%check
%cargo_test
%endif
%changelog
* Wed Nov 11 13:55:25 UTC 2020 Luca BRUNO <lucab@lucabruno.net> - 0.0.14-1
- New upstream version
https://github.com/coreos/zincati/releases/tag/v0.0.14
* Tue Sep 29 2020 Dusty Mabe <dusty@dustymabe.com> - 0.0.13-1
- Update to 0.0.13
* 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
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.12-4
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.12-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jun 29 2020 Robert Fairley <rfairley@redhat.com> - 0.0.12-2
- Correct date in previous changelog
* Mon Jun 29 2020 Robert Fairley <rfairley@redhat.com> - 0.0.12-1
- Update to 0.0.12
* Fri May 22 12:14:40 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.0.11-1
- Update to 0.0.11
* Mon May 18 12:56:53 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.0.10-3
- Update mockito to 0.25
- Update fail to 0.4
- Update libsystemd to 0.2
* Wed Apr 15 18:22:39 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.0.10-2
- Update envsubst
* Wed Apr 15 2020 Robert Fairley <rfairley@redhat.com> - 0.10.0-1
- Update to 0.0.10
* Wed Mar 25 2020 Robert Fairley <rfairley@redhat.com> - 0.0.9-2
- Fix metrics socket symlink: make absolute
* Tue Mar 24 2020 Robert Fairley <rfairley@redhat.com> - 0.0.9-1
- Update to 0.0.9
* Sun Feb 23 10:42:48 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 0.0.8-1
- Update to 0.0.8
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Tue Oct 15 2019 Robert Fairley <rfairley@redhat.com> - 0.0.6-1
- Update to 0.0.6
* Wed Sep 11 2019 Robert Fairley <rfairley@redhat.com> - 0.0.5-1
- Update to 0.0.5
- Install binary under /usr/libexec
* Fri Aug 02 2019 Robert Fairley <rfairley@redhat.com> - 0.0.4-1
- Update to 0.0.4
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Jul 10 2019 Robert Fairley <rfairley@redhat.com> - 0.0.3-1
- Update to 0.0.3
- Temporarily relax futures to 0.1.27 and env_logger to 0.6.1
* Thu Jul 04 2019 Robert Fairley <rfairley@redhat.com> - 0.0.2-7
- Require the polkit package, rather than the rules.d directory
* Thu Jul 04 2019 Robert Fairley <rfairley@redhat.com> - 0.0.2-6
- Add polkit rule to authorize zincati to perform upgrades https://github.com/coreos/zincati/pull/59
* Tue Jul 02 2019 Robert Fairley <rfairley@redhat.com> - 0.0.2-5
- Add missing owned directories, tidy owned files list
* Tue Jul 02 2019 Robert Fairley <rfairley@redhat.com> - 0.0.2-4
- Add runtime directories ownership by zincati sysuser
* Wed Jun 26 2019 Robert Fairley <rfairley@redhat.com> - 0.0.2-3
- Patch to use liboverdrop-0.0.2
* Wed Jun 26 2019 Robert Fairley <rfairley@redhat.com> - 0.0.2-2
- Fix specfile log, and macro in comment
* Wed Jun 26 2019 Robert Fairley <rfairley@redhat.com> - 0.0.2-1
- Update to 0.0.2
* Tue Jun 18 13:38:53 UTC 2019 Robert Fairley <rfairley@redhat.com> - 0.0.1-1
- Initial package