[libvirt] [PATCH] rpm: updates wrt min required fedora version

Daniel P. Berrange posted 1 patch 6 years, 3 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20180111163145.5661-1-berrange@redhat.com
libvirt.spec.in | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
[libvirt] [PATCH] rpm: updates wrt min required fedora version
Posted by Daniel P. Berrange 6 years, 3 months ago
Update the min fedora to 25. Use a macro to record the min versions so that the
later error message is always in sync with the earlier version check. Clarify
the comment that refers to guessing of dist which does not actually happen.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 libvirt.spec.in | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/libvirt.spec.in b/libvirt.spec.in
index 7e1b6a27d3..713961573a 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1,10 +1,12 @@
 # -*- rpm-spec -*-
 
 # This spec file assumes you are building on a Fedora or RHEL version
-# that's still supported by the vendor: that means Fedora 23 or newer,
-# or RHEL 6 or newer. It may need some tweaks for other distros.
-# If neither fedora nor rhel was defined, try to guess them from dist
-%if (0%{?fedora} && 0%{?fedora} >= 23) || (0%{?rhel} && 0%{?rhel} >= 6)
+# that's still supported by the vendor. It may work on other distros
+# or versions, but no effort will be made to ensure that going forward.
+%define min_rhel 6
+%define min_fedora 25
+
+%if (0%{?fedora} && 0%{?fedora} >= %{min_fedora}) || (0%{?rhel} && 0%{?rhel} >= %{min_rhel})
     %define supported_platform 1
 %else
     %define supported_platform 0
@@ -1132,7 +1134,7 @@ rm -rf .git
 
 %build
 %if ! %{supported_platform}
-echo "This RPM requires either Fedora >= 20 or RHEL >= 6"
+echo "This RPM requires either Fedora >= %{min_fedora} or RHEL >= %{min_rhel}"
 exit 1
 %endif
 
-- 
2.14.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] rpm: updates wrt min required fedora version
Posted by Jiri Denemark 6 years, 3 months ago
On Thu, Jan 11, 2018 at 16:31:45 +0000, Daniel P. Berrange wrote:
> Update the min fedora to 25. Use a macro to record the min versions so that the
> later error message is always in sync with the earlier version check. Clarify
> the comment that refers to guessing of dist which does not actually happen.
> 
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
>  libvirt.spec.in | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] rpm: updates wrt min required fedora version
Posted by Andrea Bolognani 6 years, 3 months ago
On Thu, 2018-01-11 at 16:31 +0000, Daniel P. Berrange wrote:
> Update the min fedora to 25. Use a macro to record the min versions so that the
> later error message is always in sync with the earlier version check. Clarify
> the comment that refers to guessing of dist which does not actually happen.
> 
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
>  libvirt.spec.in | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/libvirt.spec.in b/libvirt.spec.in
> index 7e1b6a27d3..713961573a 100644
> --- a/libvirt.spec.in
> +++ b/libvirt.spec.in
> @@ -1,10 +1,12 @@
>  # -*- rpm-spec -*-
>  
>  # This spec file assumes you are building on a Fedora or RHEL version
> -# that's still supported by the vendor: that means Fedora 23 or newer,
> -# or RHEL 6 or newer. It may need some tweaks for other distros.
> -# If neither fedora nor rhel was defined, try to guess them from dist
> -%if (0%{?fedora} && 0%{?fedora} >= 23) || (0%{?rhel} && 0%{?rhel} >= 6)
> +# that's still supported by the vendor. It may work on other distros
> +# or versions, but no effort will be made to ensure that going forward.
> +%define min_rhel 6
> +%define min_fedora 25

This should be 26 - Fedora 25 has been EOL'd already. Same in the
commit message, of course.

With that fixed,

  Reviewed-by: Andrea Bolognani <abologna@redhat.com>

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list