spec: introduce conditionals for upstream vendoring (RHEL opt-in)
This commit is contained in:
parent
8a953c6b06
commit
31d4fd455f
|
@ -1,12 +1,12 @@
|
|||
# Generated by rust2rpm 15
|
||||
%bcond_without check
|
||||
%global __cargo_skip_build 0
|
||||
|
||||
%global __cargo_skip_build 0
|
||||
%global crate zincati
|
||||
|
||||
Name: rust-%{crate}
|
||||
Version: 0.0.19
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Update agent for Fedora CoreOS
|
||||
|
||||
# Upstream license specification: Apache-2.0
|
||||
|
@ -14,11 +14,18 @@ License: ASL 2.0
|
|||
URL: https://crates.io/crates/%{crate}
|
||||
Source0: %{crates_source}
|
||||
Source1: https://github.com/coreos/%{crate}/releases/download/v%{version}/%{crate}-%{version}-vendor.tar.gz
|
||||
Patch0: zincati-fix-metadata.diff
|
||||
%if 0%{?fedora}
|
||||
Patch0: fedora-tweak-cargo-manifest.diff
|
||||
%endif
|
||||
|
||||
ExclusiveArch: %{rust_arches}
|
||||
|
||||
%if 0%{?rhel}
|
||||
BuildRequires: rust-toolset
|
||||
%else
|
||||
BuildRequires: rust-packaging
|
||||
%endif
|
||||
BuildRequires: pkgconfig(openssl)
|
||||
BuildRequires: systemd-rpm-macros
|
||||
|
||||
Requires: polkit
|
||||
|
@ -74,11 +81,18 @@ License: ASL 2.0 and BSD and MIT and MPLv2.0 and zlib
|
|||
%systemd_postun_with_restart zincati.service
|
||||
|
||||
%prep
|
||||
%autosetup -n %{crate}-%{version_no_tilde} -p1
|
||||
%autosetup -N -n %{crate}-%{version_no_tilde}
|
||||
%if 0%{?rhel}
|
||||
%cargo_prep -V 1
|
||||
%else
|
||||
%cargo_prep
|
||||
%endif
|
||||
%autopatch -p1
|
||||
|
||||
%if !0%{?rhel}
|
||||
%generate_buildrequires
|
||||
%cargo_generate_buildrequires
|
||||
%endif
|
||||
|
||||
%build
|
||||
%cargo_build
|
||||
|
@ -114,6 +128,9 @@ ln -snf /run/%{crate}/public/metrics.promsock %{buildroot}/run/%{crate}/private/
|
|||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Apr 08 2021 Luca BRUNO <lucab@lucabruno.net> - 0.0.19-2
|
||||
- Introduce conditionals for upstream vendoring (RHEL opt-in).
|
||||
|
||||
* Tue Mar 23 2021 Kelvin Fan <kfan@redhat.com> - 0.0.19-1
|
||||
- New upstream version
|
||||
https://github.com/coreos/zincati/releases/tag/v0.0.19
|
||||
|
|
Loading…
Reference in New Issue