Blame SPECS/rust-afterburn.spec

6aeae6
# Generated by rust2rpm 15
6aeae6
%bcond_without check
6aeae6
%global __cargo_skip_build 0
6aeae6
6aeae6
%global dracutmodulesdir %(pkg-config --variable=dracutmodulesdir dracut || echo '/usr/lib/dracut/modules.d')
6aeae6
6aeae6
%global crate afterburn
6aeae6
6aeae6
Name:           rust-%{crate}
b20654
Version:        5.3.0
b20654
Release:        1%{?dist}
6aeae6
Summary:        Simple cloud provider agent
6aeae6
6aeae6
# Upstream license specification: Apache-2.0
6aeae6
License:        ASL 2.0
6aeae6
URL:            https://crates.io/crates/afterburn
6aeae6
Source0:        %{crates_source}
6aeae6
Source1:        https://github.com/coreos/%{crate}/releases/download/v%{version}/%{crate}-%{version}-vendor.tar.gz
6aeae6
6aeae6
ExclusiveArch:  %{rust_arches}
6aeae6
%if 0%{?rhel} && !0%{?eln}
6aeae6
BuildRequires:  rust-toolset
6aeae6
BuildRequires:  openssl-devel
6aeae6
# This is needed because the cc crate, which is
6aeae6
# used for linking final build results of crates,
6aeae6
# does not work without it.
6aeae6
BuildRequires:  glibc-devel 
6aeae6
%else
6aeae6
BuildRequires:  rust-packaging
6aeae6
%endif
6aeae6
BuildRequires:  systemd
6aeae6
6aeae6
%global _description %{expand:
6aeae6
Simple cloud provider agent.}
6aeae6
6aeae6
%description %{_description}
6aeae6
6aeae6
%package     -n %{crate}
6aeae6
Summary:        %{summary}
6aeae6
# ASL 2.0
6aeae6
# ASL 2.0 or Boost
6aeae6
# BSD
6aeae6
# MIT
6aeae6
# MIT or ASL 2.0
6aeae6
# MPLv2.0 or MIT or ASL 2.0
6aeae6
# Unlicense or MIT
6aeae6
# zlib
6aeae6
License:        ASL 2.0 and MIT and BSD and zlib
6aeae6
%{?systemd_requires}
6aeae6
6aeae6
%description -n %{crate} %{_description}
6aeae6
6aeae6
%files       -n %{crate}
6aeae6
%license LICENSE
6aeae6
%doc README.md
6aeae6
%{_bindir}/afterburn
6aeae6
%{_unitdir}/afterburn.service
6aeae6
%{_unitdir}/afterburn-checkin.service
6aeae6
%{_unitdir}/afterburn-firstboot-checkin.service
6aeae6
%{_unitdir}/afterburn-sshkeys@.service
6aeae6
%{_unitdir}/afterburn-sshkeys.target
6aeae6
6aeae6
%post        -n %{crate}
6aeae6
%systemd_post afterburn.service
6aeae6
%systemd_post afterburn-checkin.service
6aeae6
%systemd_post afterburn-firstboot-checkin.service
6aeae6
%systemd_post afterburn-sshkeys@.service
6aeae6
6aeae6
%preun       -n %{crate}
6aeae6
%systemd_preun afterburn.service
6aeae6
%systemd_preun afterburn-checkin.service
6aeae6
%systemd_preun afterburn-firstboot-checkin.service
6aeae6
%systemd_preun afterburn-sshkeys@.service
6aeae6
6aeae6
%postun      -n %{crate}
6aeae6
%systemd_postun afterburn.service
6aeae6
%systemd_postun afterburn-checkin.service
6aeae6
%systemd_postun afterburn-firstboot-checkin.service
6aeae6
%systemd_postun afterburn-sshkeys@.service
6aeae6
6aeae6
%package     -n %{crate}-dracut
6aeae6
Summary:        Dracut modules for afterburn
6aeae6
BuildRequires:  pkgconfig(dracut)
6aeae6
Requires:       %{crate}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
6aeae6
Requires:       dracut
6aeae6
Requires:       dracut-network
6aeae6
6aeae6
%description -n %{crate}-dracut
6aeae6
Dracut module that enables afterburn and corresponding services
6aeae6
to run in the initramfs on boot.
6aeae6
6aeae6
%files       -n %{crate}-dracut
6aeae6
%{dracutmodulesdir}/30afterburn/
6aeae6
6aeae6
%prep
6aeae6
%autosetup -n %{crate}-%{version_no_tilde} -p1
6aeae6
%if 0%{?rhel} && !0%{?eln}
6aeae6
tar xvf %{SOURCE1}
6aeae6
mkdir -p .cargo
6aeae6
cat >.cargo/config << EOF
6aeae6
[source.crates-io]
6aeae6
replace-with = "vendored-sources"
6aeae6
6aeae6
[source.vendored-sources]
6aeae6
directory = "vendor"
6aeae6
EOF
6aeae6
%else
6aeae6
%cargo_prep
6aeae6
%endif
6aeae6
# afterburn-sshkeys@.service is by default enabled for the 'core' user in
6aeae6
# Fedora CoreOS.
6aeae6
# Based on https://github.com/coreos/afterburn/blob/master/Makefile.
6aeae6
sed -e 's,@DEFAULT_INSTANCE@,core,' < \
6aeae6
  systemd/afterburn-sshkeys@.service.in > \
6aeae6
  systemd/afterburn-sshkeys@.service
6aeae6
6aeae6
%if !0%{?rhel} || 0%{?eln}
6aeae6
%generate_buildrequires
6aeae6
%cargo_generate_buildrequires
6aeae6
%endif
6aeae6
6aeae6
%build
6aeae6
%cargo_build
6aeae6
6aeae6
%install
6aeae6
%if 0%{?rhel} && !0%{?eln}
6aeae6
%make_install INSTALL="install -p -c"
6aeae6
%else
6aeae6
%cargo_install
6aeae6
install -Dpm0644 -t %{buildroot}%{_unitdir} \
6aeae6
  systemd/*.service systemd/*.target
6aeae6
%endif
6aeae6
mkdir -p %{buildroot}%{dracutmodulesdir}
6aeae6
cp -a dracut/* %{buildroot}%{dracutmodulesdir}
6aeae6
6aeae6
%if %{with check}
6aeae6
%check
6aeae6
%cargo_test
6aeae6
%endif
6aeae6
6aeae6
%changelog
b20654
* Mon May 2 2022 Sohan Kunkerkar <skunkerk@redhat.com> - 5.3.0-1
b20654
- Update to 5.3.0
b20654
6aeae6
* Wed Mar 09 2022 Timothée Ravier <tim@siosm.fr> - 5.2.0-2
6aeae6
- Remove Windows binaries from vendor tarball
6aeae6
6aeae6
* Fri Jan 14 2022 Benjamin Gilbert <bgilbert@redhat.com> - 5.2.0-1
6aeae6
- Update to 5.2.0
6aeae6
6aeae6
* Fri Sep 24 2021 Sohan Kunkerkar <skunkerk@redhat.com> - 5.1.0-3
6aeae6
- Vendor rust dependencies on el9
6aeae6
6aeae6
* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 5.1.0-2
6aeae6
- Rebuilt with OpenSSL 3.0.0
6aeae6
6aeae6
* Tue Aug 10 2021 Sohan Kunkerkar <skunkerk@redhat.com> - 5.1.0-1
6aeae6
- Update to 5.1.0
6aeae6
6aeae6
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.0.0-2
6aeae6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
6aeae6
6aeae6
* Fri Apr 09 2021 Sohan Kunkerkar <skunkerk@redhat.com> - 5.0.0-1
6aeae6
- Update to 5.0.0
6aeae6
6aeae6
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.0-4
6aeae6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
6aeae6
6aeae6
* Mon Dec 28 13:26:51 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 4.6.0-3
6aeae6
- Rebuild
6aeae6
6aeae6
* Mon Dec 14 2020 Sohan Kunkerkar <skunkerk@redhat.com> - 4.6.0-2
6aeae6
- Rebuild because of Fedora infra issues last week to see if a new build fixes some 
6aeae6
  problems we are seeing.
6aeae6
6aeae6
* Wed Dec 09 2020 Sohan Kunkerkar <skunkerk@redhat.com> - 4.6.0-1
6aeae6
- Update to 4.6.0 
6aeae6
6aeae6
* Thu Oct 22 2020 Dusty Mabe <dusty@dustymabe.com> - 4.5.3-1
6aeae6
- Update to 4.5.3
6aeae6
6aeae6
* Wed Oct 14 2020 Dusty Mabe <dusty@dustymabe.com> - 4.5.1-3
6aeae6
- Backport patch to get afterburn sshkeys working on openstack.
6aeae6
    - https://github.com/coreos/afterburn/pull/493
6aeae6
6aeae6
* Wed Sep 30 2020 Fabio Valentini <decathorpe@gmail.com> - 4.5.1-2
6aeae6
- Un-downgrade mockito to 0.27.
6aeae6
6aeae6
* Thu Sep 03 2020 Dusty Mabe <dusty@dustymabe.com> - 4.5.1-1
6aeae6
- Update to 4.5.1
6aeae6
6aeae6
* Sun Aug 16 15:01:11 GMT 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 4.5.0-2
6aeae6
- Rebuild
6aeae6
6aeae6
* Thu Aug 13 2020 Dusty Mabe <dusty@dustymabe.com> - 4.5.0-1
6aeae6
- Update to 4.5.0
6aeae6
6aeae6
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.2-2
6aeae6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
6aeae6
6aeae6
* Fri Jul 24 2020 Dusty Mabe <dusty@dustymabe.com> - 4.4.2-1
6aeae6
- Update to 4.4.2
6aeae6
6aeae6
* Sat May 23 11:27:14 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 4.4.0-1
6aeae6
- Update to 4.4.0
6aeae6
6aeae6
* Fri May 22 11:30:58 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 4.3.3-4
6aeae6
- Update users to 0.10
6aeae6
6aeae6
* Mon May 18 12:54:25 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 4.3.3-3
6aeae6
- Update mockito to 0.25
6aeae6
6aeae6
* Sun May 17 13:37:32 CEST 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 4.3.3-2
6aeae6
- Update few dependencies
6aeae6
6aeae6
* Fri May 01 2020 Robert Fairley <rfairley@redhat.com> - 4.3.3-1
6aeae6
- Update to 4.3.3
6aeae6
6aeae6
* Fri Feb 28 21:23:17 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 4.3.2-1
6aeae6
- Update to 4.3.2
6aeae6
6aeae6
* Fri Feb 21 2020 Josh Stone <jistone@redhat.com> - 4.3.1-3
6aeae6
- Bump nix to 0.17 and mockito 0.23
6aeae6
6aeae6
* Tue Feb 11 15:24:47 CET 2020 Igor Raits <ignatenkobrain@fedoraproject.org> - 4.3.1-2
6aeae6
- Update deps
6aeae6
6aeae6
* Fri Feb 07 2020 Robert Fairley <rfairley@redhat.com> - 4.3.1-1
6aeae6
- Update to 4.3.1
6aeae6
6aeae6
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.0-3
6aeae6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
6aeae6
6aeae6
* Thu Jan 09 2020 Josh Stone <jistone@redhat.com> - 4.2.0-2
6aeae6
- Bump to nix 0.16, mockito 0.22
6aeae6
6aeae6
* Tue Oct 15 2019 Robert Fairley <rfairley@redhat.com> - 4.2.0-1
6aeae6
- Update to 4.2.0
6aeae6
6aeae6
* Sat Sep 21 13:11:54 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.1.3-1
6aeae6
- Update to 4.1.3
6aeae6
6aeae6
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.2-2
6aeae6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
6aeae6
6aeae6
* Tue Jul 23 2019 Robert Fairley <rfairley@redhat.com> - 4.1.2-1
6aeae6
- Update to 4.1.2
6aeae6
6aeae6
* Sat Jun 22 11:59:02 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.1.1-3
6aeae6
- Rename dracut subpackage
6aeae6
6aeae6
* Sat Jun 22 11:06:19 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.1.1-2
6aeae6
- Add dracut modules
6aeae6
6aeae6
* Fri Jun 21 2019 Robert Fairley <rfairley@redhat.com> - 4.1.1-1
6aeae6
- Update to 4.1.1
6aeae6
- Regenerate specfile using rust2rpm 10 with DynamicBuildRequires
6aeae6
6aeae6
* Wed Jun 05 2019 Josh Stone <jistone@redhat.com> - 4.1.0-3
6aeae6
- Bump nix to 0.14
6aeae6
6aeae6
* Wed May 22 17:17:00 CEST 2019 Robert Fairley <rfairley@redhat.com> - 4.1.0-2
6aeae6
- Add afterburn-sshkeys@.service patches to enable the unit on supported platfoms only
6aeae6
6aeae6
* Sat Apr 27 09:55:54 CEST 2019 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 4.1.0-1
6aeae6
- Initial package