Blame rust-zincati.spec

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