From 9e17790691ce8de3a99f6bdf843e3231abef34f3 Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Sun, 23 Oct 2022 19:27:52 -0400 Subject: [PATCH 1/2] Add minimum build information for RHEL 8 and RHEL 9 --- packaging/rpm/amanda.spec.src | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/packaging/rpm/amanda.spec.src b/packaging/rpm/amanda.spec.src index 23f83b64cc..89ae2449a9 100644 --- a/packaging/rpm/amanda.spec.src +++ b/packaging/rpm/amanda.spec.src @@ -134,7 +134,19 @@ %define distver 7 %define curl libcurl %endif - + %if %(awk '$1 == "Red" && $6 ~ /8.*/ { exit 1; }' /etc/redhat-release; echo $?) + %define dist redhat + %define disttag rhel + %define distver 8 + %define curl libcurl + %endif + %if %(awk '$1 == "Red" && $6 ~ /9.*/ { exit 1; }' /etc/redhat-release; echo $?) + %define dist redhat + %define disttag rhel + %define distver 9 + %define curl libcurl + %endif + # If dist is undefined, we didn't detect. %{!?dist:%define dist unknown} %endif From 1b594f583c5063a368662bed2c3dfa998a925467 Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Mon, 24 Oct 2022 10:20:37 -0400 Subject: [PATCH 2/2] %{?use_libtirpc} --- packaging/rpm/amanda.spec.src | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/packaging/rpm/amanda.spec.src b/packaging/rpm/amanda.spec.src index 89ae2449a9..d55f5230bf 100644 --- a/packaging/rpm/amanda.spec.src +++ b/packaging/rpm/amanda.spec.src @@ -138,13 +138,15 @@ %define dist redhat %define disttag rhel %define distver 8 - %define curl libcurl + %define curl libcurl + %define use_libtirpc BuildRequires: libtirpc-devel %endif %if %(awk '$1 == "Red" && $6 ~ /9.*/ { exit 1; }' /etc/redhat-release; echo $?) %define dist redhat %define disttag rhel %define distver 9 - %define curl libcurl + %define curl libcurl + %define use_libtirpc BuildRequires: libtirpc-devel %endif # If dist is undefined, we didn't detect. @@ -228,6 +230,7 @@ BuildRequires: %{curl}-devel >= 7.10.0 BuildRequires: openssl BuildRequires: openssl-devel BuildRequires: perl(ExtUtils::Embed) +%{?use_libtirpc} %{?prereq_sharutils} Requires: /bin/awk Requires: /bin/date