rdobuilder 77192f
# Current version of OVS that this package requires
rdobuilder 77192f
%define ovs_version 3.3
rdobuilder 77192f
rdobuilder 77192f
# Comma-separated (no spaces) e.g. 2.10,2.9 ... of prior fast-datapath
rdobuilder 77192f
# openvswitch and ovn packages we need to obsolete
rdobuilder 77192f
%define obsolete_ovs_versions 2.10,2.11,2.12,2.13,2.15,2.17,3.1,3.2
rdobuilder 77192f
rdobuilder 77192f
# Same as above, but enable ovs/ovn to be separate
rdobuilder 77192f
%define ovn_version 24.09
rdobuilder 77192f
%define obsolete_ovn_versions 2.10,2.11,2.12,2.13,-2021,22.03,22.06,22.09,22.12,23.03,23.06,23.09,24.03
rdobuilder 77192f
rdobuilder 77192f
# Lua macro to create a bunch of Obsoletes by splitting up the above
rdobuilder 77192f
# definition and substituting where there's an asterisk
rdobuilder 77192f
%{lua:
rdobuilder 77192f
function rdo_obsoletes(package, ver, obsoletes)
rdobuilder 77192f
  local s
rdobuilder 77192f
  local pkg
rdobuilder 77192f
  pkg = string.gsub(package, "*", "")
rdobuilder 77192f
  print("Obsoletes: "..pkg.." < "..ver.."\n")
rdobuilder 77192f
  for s in string.gmatch(obsoletes, "[^,]+") do
rdobuilder 77192f
    pkg = string.gsub(package, "*", s)
rdobuilder 77192f
    print("Obsoletes: "..pkg.." < "..ver.."\n")
rdobuilder 77192f
  end
rdobuilder 77192f
end
rdobuilder 77192f
rdobuilder 77192f
function ovs_obsoletes(package)
rdobuilder 77192f
  rdo_obsoletes(package, rpm.expand("%ovs_version"), rpm.expand("%obsolete_ovs_versions"))
rdobuilder 77192f
end
rdobuilder 77192f
rdobuilder 77192f
function ovn_obsoletes(package)
rdobuilder 77192f
  rdo_obsoletes(package, rpm.expand("%ovn_version"), rpm.expand("%obsolete_ovn_versions"))
rdobuilder 77192f
end}
rdobuilder 77192f
rdobuilder 77192f
######## OPENVSWITCH PACKAGING ########
rdobuilder 77192f
rdobuilder 77192f
Name:           rdo-openvswitch
rdobuilder 77192f
Epoch:          2
rdobuilder 77192f
Version:        %{ovs_version}
rdobuilder 77192f
Release:        2%{?dist}
rdobuilder 77192f
Summary:        Wrapper rpm to allow installing OVS with new versioning schemes
rdobuilder 77192f
rdobuilder 77192f
Group:          System Environment/Daemons
rdobuilder 77192f
License:        Public domain
rdobuilder 77192f
URL:            http://www.openvswitch.org
rdobuilder 77192f
BuildArch:      noarch
rdobuilder 77192f
rdobuilder 77192f
Requires:       openvswitch%{ovs_version}
rdobuilder 77192f
Requires:       network-scripts-openvswitch%{ovs_version}
rdobuilder 77192f
Provides:       openvswitch = %{?epoch:%{epoch}:}%{ovs_version}
rdobuilder 77192f
Provides:       rdo-openvswitch = %{?epoch:%{epoch}:}%{ovs_version}
rdobuilder 77192f
Provides:       rhosp-openvswitch = %{?epoch:%{epoch}:}%{ovs_version}
rdobuilder 77192f
%{lua:ovs_obsoletes("openvswitch*")}
rdobuilder 77192f
%{lua:ovs_obsoletes("network-scripts-openvswitch*")}
rdobuilder 77192f
rdobuilder 77192f
%description
rdobuilder 77192f
Wrapper rpm for the base openvswitch package
rdobuilder 77192f
rdobuilder 77192f
%package -n python3-rdo-openvswitch
rdobuilder 77192f
Summary:    wrapper for python-openvswitch rpm
rdobuilder 77192f
License:    Public domain
rdobuilder 77192f
Requires:   %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
rdobuilder 77192f
Requires:   python3-openvswitch%{ovs_version}
rdobuilder 77192f
Provides:   python3-openvswitch = %{?epoch:%{epoch}:}%{ovs_version}
rdobuilder 77192f
%{lua:ovs_obsoletes("python3-openvswitch*")}
rdobuilder 77192f
%{lua:ovs_obsoletes("python2-openvswitch*")}
rdobuilder 77192f
%{lua:ovs_obsoletes("python-openvswitch*")}
rdobuilder 77192f
rdobuilder 77192f
%description -n python3-rdo-openvswitch
rdobuilder 77192f
Wrapper rpm for the base python3-openvswitch package
rdobuilder 77192f
rdobuilder 77192f
%package devel
rdobuilder 77192f
Summary:    wrapper for openvswitch-devel rpm
rdobuilder 77192f
License:    Public domain
rdobuilder 77192f
Requires:   %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
rdobuilder 77192f
Requires:   openvswitch%{ovs_version}-devel
rdobuilder 77192f
Provides:   openvswitch-devel = %{?epoch:%{epoch}:}%{ovs_version}
rdobuilder 77192f
%{lua:ovs_obsoletes("openvswitch*-devel")}
rdobuilder 77192f
rdobuilder 77192f
%description devel
rdobuilder 77192f
Wrapper rpm for the base openvswitch-devel package
rdobuilder 77192f
rdobuilder 77192f
%package test
rdobuilder 77192f
Summary:    wrapper for openvswitch-test rpm
rdobuilder 77192f
License:    Public domain
rdobuilder 77192f
Requires:   python3-rdo-openvswitch = %{?epoch:%{epoch}:}%{version}-%{release}
rdobuilder 77192f
Requires:   openvswitch%{ovs_version}-test
rdobuilder 77192f
Provides:   openvswitch-test = %{?epoch:%{epoch}:}%{ovs_version}
rdobuilder 77192f
%{lua:ovs_obsoletes("openvswitch*-test")}
rdobuilder 77192f
rdobuilder 77192f
%description test
rdobuilder 77192f
Wrapper rpm for the base openvswitch-test package
rdobuilder 77192f
rdobuilder 77192f
%package -n rdo-network-scripts-openvswitch
rdobuilder 77192f
Summary:    wrapper for network-scripts-openvswitch rpm
rdobuilder 77192f
License:    Public domain
rdobuilder 77192f
Requires:   network-scripts-openvswitch%{ovs_version}
rdobuilder 77192f
Provides:   network-scripts-openvswitch = %{?epoch:%{epoch}:}%{ovs_version}
rdobuilder 77192f
%{lua:ovs_obsoletes("network-scripts-openvswitch*")}
rdobuilder 77192f
rdobuilder 77192f
%description -n rdo-network-scripts-openvswitch
rdobuilder 77192f
Wrapper rpm for the base network-scripts-openvswitch package
rdobuilder 77192f
rdobuilder 77192f
rdobuilder 77192f
######## OVN PACKAGING ########
rdobuilder 77192f
rdobuilder 77192f
%package -n rdo-ovn
rdobuilder 77192f
Version:    %{ovn_version}
rdobuilder 77192f
Summary:    wrapper for ovn rpm
rdobuilder 77192f
License:    Public domain
rdobuilder 77192f
Requires:   openvswitch
rdobuilder 77192f
Requires:   ovn%{ovn_version}
rdobuilder 77192f
Provides:   ovn = %{?epoch:%{epoch}:}%{ovn_version}
rdobuilder 77192f
Provides:   openvswitch-ovn-common = %{?epoch:%{epoch}:}%{ovn_version}
rdobuilder 77192f
Provides:   %{name}-ovn-common = %{?epoch:%{epoch}:}%{version}
rdobuilder 77192f
Obsoletes:  %{name}-ovn-common < %{?epoch:%{epoch}:}%{version}-%{release}
rdobuilder 77192f
Provides:   rdo-ovn-common = %{?epoch:%{epoch}:}%{version}
rdobuilder 77192f
Obsoletes:  rdo-ovn-common < %{?epoch:%{epoch}:}%{version}-%{release}
rdobuilder 77192f
Obsoletes:  ovn < %{?epoch:%{epoch}:}%{version}-%{release}
rdobuilder 77192f
# OVN packaging should do this, but doesn't?
rdobuilder 77192f
# Obsoletes: openvswitch-ovn-common < ...
rdobuilder 77192f
%{lua:ovn_obsoletes("ovn*")}
rdobuilder 77192f
rdobuilder 77192f
%description -n rdo-ovn
rdobuilder 77192f
Wrapper rpm for the base ovn package
rdobuilder 77192f
rdobuilder 77192f
%package -n rdo-ovn-central
rdobuilder 77192f
Version:    %{ovn_version}
rdobuilder 77192f
Summary:    wrapper for openvswitch-ovn-central rpm
rdobuilder 77192f
License:    Public domain
rdobuilder 77192f
Requires:   rdo-ovn = %{?epoch:%{epoch}:}%{version}-%{release}
rdobuilder 77192f
Requires:   ovn%{ovn_version}-central
rdobuilder 77192f
Provides:   openvswitch-ovn-central = %{?epoch:%{epoch}:}%{ovn_version}
rdobuilder 77192f
Obsoletes:  openvswitch-ovn-central < %{?epoch:%{epoch}:}%{ovn_version}
rdobuilder 77192f
Provides:   ovn-central = %{?epoch:%{epoch}:}%{ovn_version}
rdobuilder 77192f
Obsoletes:  ovn-central < %{?epoch:%{epoch}:}%{ovn_version}
rdobuilder 77192f
Provides:   %{name}-ovn-central = %{?epoch:%{epoch}:}%{ovn_version}
rdobuilder 77192f
Obsoletes:  %{name}-ovn-central < %{?epoch:%{epoch}:}%{version}-%{release}
rdobuilder 77192f
Obsoletes:  ovn-central < %{?epoch:%{epoch}:}%{version}-%{release}
rdobuilder 77192f
# OVN packaging should do this, but doesn't?
rdobuilder 77192f
%{lua:ovn_obsoletes("openvswitch*-ovn-central")}
rdobuilder 77192f
%{lua:ovn_obsoletes("ovn*-central")}
rdobuilder 77192f
rdobuilder 77192f
%description -n rdo-ovn-central
rdobuilder 77192f
Wrapper rpm for the base openvswitch-ovn-central package
rdobuilder 77192f
rdobuilder 77192f
%package -n rdo-ovn-host
rdobuilder 77192f
Version:    %{ovn_version}
rdobuilder 77192f
Summary:    wrapper for openvswitch-ovn-host rpm
rdobuilder 77192f
License:    Public domain
rdobuilder 77192f
Requires:   rdo-ovn = %{?epoch:%{epoch}:}%{version}-%{release}
rdobuilder 77192f
Requires:   ovn%{ovn_version}-host
rdobuilder 77192f
Provides:   openvswitch-ovn-host = %{?epoch:%{epoch}:}%{ovn_version}
rdobuilder 77192f
Obsoletes:  openvswitch-ovn-host < %{?epoch:%{epoch}:}%{ovn_version}
rdobuilder 77192f
Provides:   ovn-host = %{?epoch:%{epoch}:}%{ovn_version}
rdobuilder 77192f
Obsoletes:  ovn-host < %{?epoch:%{epoch}:}%{ovn_version}
rdobuilder 77192f
Provides:   %{name}-ovn-host = %{?epoch:%{epoch}:}%{ovn_version}
rdobuilder 77192f
Obsoletes:  %{name}-ovn-host < %{?epoch:%{epoch}:}%{version}-%{release}
rdobuilder 77192f
Obsoletes:  ovn-host < %{?epoch:%{epoch}:}%{version}-%{release}
rdobuilder 77192f
%{lua:ovn_obsoletes("openvswitch*-ovn-host")}
rdobuilder 77192f
%{lua:ovn_obsoletes("ovn*-host")}
rdobuilder 77192f
rdobuilder 77192f
%description -n rdo-ovn-host
rdobuilder 77192f
Wrapper rpm for the base openvswitch-ovn-host package
rdobuilder 77192f
rdobuilder 77192f
%package -n rdo-ovn-vtep
rdobuilder 77192f
Version:    %{ovn_version}
rdobuilder 77192f
Summary:    wrapper for openvswitch-ovn-vtep rpm
rdobuilder 77192f
License:    Public domain
rdobuilder 77192f
Requires:   rdo-ovn = %{?epoch:%{epoch}:}%{version}-%{release}
rdobuilder 77192f
Requires:   ovn%{ovn_version}-vtep
rdobuilder 77192f
Provides:   openvswitch-ovn-vtep = %{?epoch:%{epoch}:}%{ovn_version}
rdobuilder 77192f
Obsoletes:  openvswitch-ovn-vtep < %{?epoch:%{epoch}:}%{ovn_version}
rdobuilder 77192f
Provides:   ovn-vtep = %{?epoch:%{epoch}:}%{ovn_version}
rdobuilder 77192f
Obsoletes:  ovn-vtep < %{?epoch:%{epoch}:}%{ovn_version}
rdobuilder 77192f
Provides:   %{name}-ovn-vtep = %{?epoch:%{epoch}:}%{ovn_version}
rdobuilder 77192f
Obsoletes:  %{name}-ovn-vtep < %{?epoch:%{epoch}:}%{version}-%{release}
rdobuilder 77192f
Obsoletes:  ovn-vtep < %{?epoch:%{epoch}:}%{version}-%{release}
rdobuilder 77192f
%{lua:ovn_obsoletes("openvswitch*-ovn-vtep")}
rdobuilder 77192f
%{lua:ovn_obsoletes("ovn*-vtep")}
rdobuilder 77192f
rdobuilder 77192f
%description -n rdo-ovn-vtep
rdobuilder 77192f
Wrapper rpm for the base ovn-vtep package
rdobuilder 77192f
rdobuilder 77192f
%setup -q
rdobuilder 77192f
rdobuilder 77192f
%build
rdobuilder 77192f
rdobuilder 77192f
%files -n rdo-openvswitch
rdobuilder 77192f
%files -n python3-rdo-openvswitch
rdobuilder 77192f
%files devel
rdobuilder 77192f
%files test
rdobuilder 77192f
%files -n rdo-network-scripts-openvswitch
rdobuilder 77192f
%files -n rdo-ovn
rdobuilder 77192f
%files -n rdo-ovn-central
rdobuilder 77192f
%files -n rdo-ovn-host
rdobuilder 77192f
%files -n rdo-ovn-vtep
rdobuilder 77192f
rdobuilder 77192f
%changelog
rdobuilder 77192f
* Mon Oct 21 2024 Joel Capitao <jcapitao@redhat.com> - 3.3-2
rdobuilder 77192f
- Update to ovn24.09
rdobuilder 77192f
rdobuilder 77192f
* Wed Apr 24 2024 Yatin Karel <ykarel@redhat.com> - 3.3-1
rdobuilder 77192f
- Update to ovn24.03 and openvswitch3.3
rdobuilder 77192f
rdobuilder 77192f
* Fri Mar 15 2024 Yatin Karel <ykarel@redhat.com> - 3.2-2
rdobuilder 77192f
- Update to ovn23.09
rdobuilder 77192f
rdobuilder 77192f
* Mon Oct 23 2023 Yatin Karel <ykarel@redhat.com> - 3.2-1
rdobuilder 77192f
- Update to openvswitch3.2 and ovn23.06
rdobuilder 77192f
rdobuilder 77192f
* Mon Jul 10 2023 Yatin Karel <ykarel@redhat.com> - 3.1-3
rdobuilder 77192f
- Update to ovn23.03
rdobuilder 77192f
rdobuilder 77192f
* Fri Mar 24 2023 Alfredo Moralejo <amoralej@redhat.com> - 3.1-2
rdobuilder 77192f
- Update to ovn22.12
rdobuilder 77192f
rdobuilder 77192f
* Wed Mar 01 2023 Alfredo Moralejo <amoralej@redhat.com> - 3.1-1
rdobuilder 77192f
- Update OpenvSwitch to 3.1
rdobuilder 77192f
rdobuilder 77192f
* Fri Nov 25 2022 Alfredo Moralejo <amoralej@redhat.com> - 2.17.4
rdobuilder 77192f
- Update to ovn22.09
rdobuilder 77192f
rdobuilder 77192f
* Wed Sep 14 2022 Alfredo Moralejo <amoralej@redhat.com> - 2.17-3
rdobuilder 77192f
- Obsolete network-scripts-openvswitch lower than 2.17
rdobuilder 77192f
rdobuilder 77192f
* Tue Jul 19 2022 Alfredo Moralejo <amoralej@redhat.com> - 2.17-2
rdobuilder 77192f
- Update to ovn22.06
rdobuilder 77192f
rdobuilder 77192f
* Fri Jun 24 2022 Alfredo Moralejo <amoralej@redhat.com> - 2.17-1
rdobuilder 77192f
- Update to openvswitch2.17 and ovn22.03
rdobuilder 77192f
rdobuilder 77192f
* Fri Oct 01 2021 Alfredo Moralejo <amoralej@redhat.com> - 2.15-2
rdobuilder 77192f
- Re-add network-scripts-openvswitch2.15 as dependency for rdo-openvswitch.
rdobuilder 77192f
rdobuilder 77192f
* Tue May 25 2021 Yatin Karel <ykarel@redhat.com> - 2.15-1
rdobuilder 77192f
- Update to ovs 2.15 and ovn 2021
rdobuilder 77192f
rdobuilder 77192f
* Fri Oct 09 2020 Alfredo Moralejo <amoralej@redhat.xom> - 2.13-2
rdobuilder 77192f
- Adds wrapper subpackage for network-scripts-openvswitch
rdobuilder 77192f
rdobuilder 77192f
* Mon Sep 14 2020 Yatin Karel <ykarel@redhat.com> - 2.13-1
rdobuilder 77192f
- RDO Wrapper for OVS/OVN 2.13 builds from Fast DataPath
rdobuilder 77192f