!11 [sync] PR-10: Add limit for requires

From: @openeuler-sync-bot 
Reviewed-by: @jxy_git 
Signed-off-by: @jxy_git
This commit is contained in:
openeuler-ci-bot 2022-11-14 03:18:54 +00:00 committed by Gitee
commit f32d2b3536
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,40 +1,13 @@
# Copyright 2016 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
#
# Refer to the README and COPYING files for full details of the license
%define __spec_install_post %{nil}
%define debug_package %{nil}
%define __os_install_post %{_dbpath}/brp-compress
# define the python package prefix based on distribution version
# this is needed to require a correct python-openvswitch package:
# python-openvswitch or python3-openvswitch for fedora >=28 or
# el >= 8
%if 0%{?fedora} >= 30 || 0%{?rhel} >= 8
%global ovn_support 0
%global required_python python%{python3_pkgversion}
%global required_python_interpreter %{__python3}
%define required_python_lib(l:) python%{python3_pkgversion}-%{*}
%global required_python_sitelib %{python3_sitelib}
%else
%global required_python python
%global required_python_interpreter %{__python2}
%global required_python_sitelib %{python2_sitelib}
%define required_python_lib(l:) %{-l*}%{*}
%endif
%global required_ovs_lib %{required_python_lib -l python- openvswitch}
%global required_six_lib %{required_python_lib -l python- six}
@ -46,7 +19,7 @@
Name: ovirt-provider-ovn
Version: 1.2.29
Release: 1%{?dist}
Release: 2
Summary: The oVirt external network provider for OVN
License: GPLv2+
BuildArch: noarch
@ -57,8 +30,10 @@ Requires: firewalld-filesystem
Requires: kernel >= 3.10.0-512
Requires: openvswitch >= 0:2.7
%if %{ovn_support}
Requires: openvswitch-ovn-central >= 0:2.7
Requires: openvswitch-ovn-common >= 0:2.7
%endif
Requires: %{required_ovs_lib} >= 0:2.7
Conflicts: openvswitch = 1:2.6.1
@ -113,8 +88,10 @@ Requires: firewalld-filesystem
Requires: kernel >= 3.10.0-512
Requires: openvswitch >= 0:2.7
%if %{ovn_support}
Requires: openvswitch-ovn-host >= 0:2.7
Requires: openvswitch-ovn-common >= 0:2.7
%endif
Requires: %{required_ovs_lib} >= 0:2.7
Conflicts: openvswitch = 1:2.6.1
@ -158,5 +135,8 @@ to OVN.
%changelog
* Fri Nov 04 2022 jiangxinyu <jiangxinyu@kylinos.cn> - 1.2.29-2
- Add limit for requires
* Thu Mar 5 2020 di.wang <di.wang@cs2c.com.cn> - 1.2.29-1
- Package Initialization