mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
rpm: updates wrt min required fedora version
Update the min fedora to 26. 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. Reviewed-by: Jiri Denemark <jdenemar@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
5209781f67
commit
2efd35a307
@ -1,10 +1,12 @@
|
|||||||
# -*- rpm-spec -*-
|
# -*- rpm-spec -*-
|
||||||
|
|
||||||
# This spec file assumes you are building on a Fedora or RHEL version
|
# 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,
|
# that's still supported by the vendor. It may work on other distros
|
||||||
# or RHEL 6 or newer. It may need some tweaks for other distros.
|
# or versions, but no effort will be made to ensure that going forward.
|
||||||
# If neither fedora nor rhel was defined, try to guess them from dist
|
%define min_rhel 6
|
||||||
%if (0%{?fedora} && 0%{?fedora} >= 23) || (0%{?rhel} && 0%{?rhel} >= 6)
|
%define min_fedora 26
|
||||||
|
|
||||||
|
%if (0%{?fedora} && 0%{?fedora} >= %{min_fedora}) || (0%{?rhel} && 0%{?rhel} >= %{min_rhel})
|
||||||
%define supported_platform 1
|
%define supported_platform 1
|
||||||
%else
|
%else
|
||||||
%define supported_platform 0
|
%define supported_platform 0
|
||||||
@ -1141,7 +1143,7 @@ rm -rf .git
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%if ! %{supported_platform}
|
%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
|
exit 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user