From 2f24705a1ab306291615e4b7be0d445e93194a5a Mon Sep 17 00:00:00 2001 From: Haikel Guemar Date: Tue, 24 Jul 2018 09:20:25 +0200 Subject: [PATCH] Fix epoch issues when rebuilding on RHEL Do not require rebuilds on either Fedora/EPEL --- puppet.spec | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/puppet.spec b/puppet.spec index 3f30a12..2be5ccb 100644 --- a/puppet.spec +++ b/puppet.spec @@ -13,6 +13,13 @@ %global _with_systemd 1 %endif +# FIXME(hguemar): RH products builds of facter and hiera have introduced epochs +# does not impact Fedora nor EPEL +%if 0%{?rhel} && 0%{?rhel} >= 7 && !0%{?epel} +%global has_epoch 1 +%endif + + %global confdir conf %global pending_upgrade_path %{_localstatedir}/lib/rpm-state/puppet %global pending_upgrade_file %{pending_upgrade_path}/upgrade_pending @@ -71,18 +78,18 @@ BuildRequires: ruby-facter < 4 Requires: ruby-facter >= 3.0 Requires: ruby-facter < 4 %else -BuildRequires: facter >= 2.0 -BuildRequires: facter < 4 -Requires: facter >= 2.0 -Requires: facter < 4 +BuildRequires: facter >= %{?has_epoch:1:}2.0 +BuildRequires: facter < %{?has_epoch:1:}4 +Requires: facter >= %{?has_epoch:1:}2.0 +Requires: facter < %{?has_epoch:1:}4 %endif BuildRequires: hiera >= 2.0 -BuildRequires: hiera < 4 +BuildRequires: hiera < %{?has_epoch:1:}4 Requires: hiera >= 2.0 -Requires: hiera < 4 +Requires: hiera < %{?has_epoch:1:}4 Obsoletes: hiera-puppet < 1.0.0-2 Provides: hiera-puppet = %{version}-%{release}