diff --git a/SPECS/rpm-ostree.spec b/SPECS/rpm-ostree.spec index c0dd32c..93198c2 100644 --- a/SPECS/rpm-ostree.spec +++ b/SPECS/rpm-ostree.spec @@ -1,20 +1,7 @@ -# Upstream has --enable-rust, but let's use it by default in Fedora -# Note the Rust sources are in the tarball using cargo-vendor. -# For RHEL > 7 we need the toolset. -%if 0%{?fedora} >= 28 || 0%{?rhel} > 7 - %bcond_without rust - %if 0%{?rhel} > 7 - %define rusttoolset_version rust-toolset-1.26 - %define rusttoolset scl enable %{rusttoolset_version} -- - %endif -%else - %bcond_with rust -%endif - Summary: Hybrid image/package system Name: rpm-ostree Version: 2018.8 -Release: 2%{?dist} +Release: 2%{?dist}.0.1 #VCS: https://github.com/cgwalters/rpm-ostree # This tarball is generated via "cd packaging && make -f Makefile.dist-packaging dist-snapshot" # in the upstream git. If rust is enabled, it contains vendored sources. @@ -24,25 +11,23 @@ URL: https://github.com/projectatomic/rpm-ostree Patch0: 0001-Backport-f50f9e8d-to-v2018.8-for-RHEL8.patch -%if %{with rust} - %if !%{defined rust_arches} - # It's not defined yet in the base CentOS7 root - %define rust_arches x86_64 i686 armv7hl aarch64 ppc64 ppc64le s390x - %endif # defined rust_arches +%if !%{defined rust_arches} +# It's not defined yet in the base CentOS7 root +%define rust_arches x86_64 i686 armv7hl aarch64 ppc64 ppc64le s390x +%endif # defined rust_arches + ExclusiveArch: %{rust_arches} - %if %{defined rusttoolset_version} -BuildRequires: %{rusttoolset_version}-cargo -BuildRequires: %{rusttoolset_version}-rust -BuildRequires: %{rusttoolset_version}-runtime - %else - # This one is only in Fedora, we're not actually using it right now - # but we may in the future. - %if 0%{?fedora} >= 28 + +%if 0%{?fedora} BuildRequires: rust-packaging - %endif +%else +%if 0%{?rhel} < 8 +# really, this is for CentOS 7 (CAHC) BuildRequires: cargo - %endif # defined rusttoolset_version -%endif # with_rust +%else +BuildRequires: rust-toolset +%endif +%endif # For the autofiles bits below BuildRequires: /usr/bin/python3 @@ -132,16 +117,12 @@ The %{name}-devel package includes the header files for %{name}-libs. %autosetup -Sgit -n %{name}-%{version} %build -%{?rusttoolset} env NOCONFIGURE=1 ./autogen.sh -# Override the invocation of ./configure, since %%configure is multi-line, we -# can't just prefix it with scl enable. -%define _configure %{?rusttoolset} ./configure -%configure --disable-silent-rules --enable-gtk-doc \ - %{?with_rust:--enable-rust} -%{?rusttoolset} make %{?_smp_mflags} +env NOCONFIGURE=1 ./autogen.sh +%configure --disable-silent-rules --enable-gtk-doc +make %{?_smp_mflags} %install -%{?rusttoolset} make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p -c" +make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p -c" find $RPM_BUILD_ROOT -name '*.la' -delete # I try to do continuous delivery via rpmdistro-gitoverlay while @@ -201,6 +182,10 @@ $PYTHON autofiles.py > files.devel \ %files devel -f files.devel %changelog +* Wed Jun 05 2019 Johnny Hughes +- https://src.fedoraproject.org/rpms/rpm-ostree/pull-request/27 + Simplify Rust conditionals (to build via default rust-toolset) + * Mon Oct 15 2018 Jonathan Lebon - 2018.8-2 - Add new source and patch to drop cbindgen requirement