SHA256
1
0
forked from pool/openvswitch
Dominique Leuenberger 2018-06-02 10:10:47 +00:00 committed by Git OBS Bridge
commit 17e41490fe
4 changed files with 300 additions and 58 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3699ce579acd346e9aa2fba89514cdcc79b231f6227659eea6714917b398419d
size 6933057

3
openvswitch-2.9.2.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:90f084dc282fdb588a2cfff351fea359492f69600f1e4a1286e24e44901de113
size 7105444

View File

@ -1,3 +1,36 @@
-------------------------------------------------------------------
Tue May 29 08:06:29 UTC 2018 - mchandras@suse.de
- Version bump to 2.9.2. Some of the changes are:
* OVSDB has new, experimental support for database clustering:
- New high-level documentation in ovsdb(7).
- New file format documentation for developers in ovsdb(5).
- Protocol documentation moved from ovsdb-server(1) to ovsdb-server(7).
- ovsdb-server now supports online schema conversion via
"ovsdb-client convert".
- ovsdb-server now always hosts a built-in database named _Server. See
ovsdb-server(5) for more details.
- ovsdb-client: New "get-schema-cksum", "query", "backup", "restore",
and "wait" commands. New --timeout option.
- ovsdb-tool: New "create-cluster", "join-cluster", "db-cid", "db-sid",
"db-local-address", "db-is-clustered", "db-is-standalone", "db-name",
"schema-name", "compare-versions", and "check-cluster" commands.
- ovsdb-server: New ovs-appctl commands for managing clusters.
- ovs-sandbox: New support for clustered databases.
* OVN:
- ovn-sbctl, ovn-nbctl: New options --leader-only, --no-leader-only.
* Bug fixes
- Use openvswitch user/group for the log directory (3f556d66edb9)
-------------------------------------------------------------------
Wed May 9 07:24:44 UTC 2018 - mchandras@suse.de
- Add support for RedHat distributions. All SUSE macros are now
conditional and the spec file has been adapted based on the upstream
one (fate#324537)
- spec-cleaner fixes
-------------------------------------------------------------------
Wed May 2 07:58:27 UTC 2018 - mchandras@suse.de

View File

@ -24,9 +24,14 @@
%endif
%define lname libopenvswitch-2_9-0
%ifarch aarch64 x86_64 %{ix86}
# DPDK enabled by default
%if 0%{?suse_version}
# DPDK enabled only SUSE/openSUSE
%bcond_without dpdk
%else
# DPDK disabled elsewhere even if supported by the architecture.
%bcond_with dpdk
%endif
%else
# No DPDK support on these architectures
%bcond_with dpdk
%endif
@ -36,7 +41,7 @@
# Disable building the external kernel datapath by default
%bcond_with kmp
Name: openvswitch
Version: 2.9.0
Version: 2.9.2
Release: 0
Summary: A multilayer virtual network switch
# All code is Apache-2.0 except
@ -44,32 +49,21 @@ Summary: A multilayer virtual network switch
# - utilities/bugtool which is LGPL-2.1
License: Apache-2.0 AND LGPL-2.1-only AND SISSL
Group: Productivity/Networking/System
URL: http://openvswitch.org/
Url: http://openvswitch.org/
Source0: http://openvswitch.org/releases/openvswitch-%{version}.tar.gz
Source1: preamble
Source89: Module.supported.updates
BuildRequires: %{python_module devel}
BuildRequires: %{python_module six}
BuildRequires: %{python_module xml}
BuildRequires: %{pythons}
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fdupes
BuildRequires: graphviz
BuildRequires: libcap-ng-devel
BuildRequires: libopenssl-devel
BuildRequires: libtool
BuildRequires: make
BuildRequires: pkgconfig
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(openssl)
Requires: logrotate
Requires: modutils
# ovs-ctl / ovs-pki use /usr/bin/uuidgen:
Requires: util-linux
Requires(post): %fillup_prereq
Requires(pre): shadow
Suggests: logrotate
Provides: openvswitch-common = %{version}
Obsoletes: openvswitch-common < 2.7.0
Provides: openvswitch-controller = %{version}
@ -82,7 +76,30 @@ Provides: %{name}-switch = %{version}
Obsoletes: %{name}-dpdk < 2.7.0
Obsoletes: %{name}-dpdk-switch < 2.7.0
Obsoletes: %{name}-switch < 2.7.0
%if 0%{?suse_version}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module six}
BuildRequires: %{python_module xml}
BuildRequires: fdupes
BuildRequires: libopenssl-devel
BuildRequires: python-rpm-macros
Requires(post): %fillup_prereq
Requires(pre): shadow
Suggests: logrotate
%{?systemd_requires}
%else
BuildRequires: findutils
BuildRequires: openssl-devel
BuildRequires: python-devel
BuildRequires: python-six
BuildRequires: python2-rpm-macros
BuildRequires: python3-rpm-macros
BuildRequires: systemd-units
Requires(post): systemd-units
Requires(postun): systemd-units
Requires(pre): shadow-utils
Requires(preun): systemd-units
%endif
# Needed by the testsuite
%if %{with check}
BuildRequires: procps
@ -364,6 +381,9 @@ pushd source
< rhel/usr_lib_systemd_system_ovs-vswitchd.service.in \
> rhel/usr_lib_systemd_system_ovs-vswitchd.service
%if 0%{?suse_version}
export PYTHON='%{_bindir}/python3'
%endif
%configure \
--disable-static \
--enable-libcapng \
@ -418,8 +438,18 @@ done
%{buildroot}%{_prefix}/lib/udev/rules.d/91-vfio.rules
%endif
%if 0%{?suse_version}
install -D -m 644 rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template \
%{buildroot}%{_fillupdir}/sysconfig.openvswitch
%else
install -D -m 644 rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template \
%{buildroot}%{_sysconfdir}/sysconfig/openvswitch
install -d -m 0755 %{buildroot}/%{_sysconfdir}/sysconfig/network-scripts/
install -p -m 0755 rhel/etc_sysconfig_network-scripts_ifdown-ovs \
%{buildroot}%{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs
install -p -m 0755 rhel/etc_sysconfig_network-scripts_ifup-ovs \
%{buildroot}%{_sysconfdir}/sysconfig/network-scripts/ifup-ovs
%endif
install -d -m 755 %{buildroot}%{_sysconfdir}/logrotate.d
install -d -m 755 %{buildroot}%{_localstatedir}/log/openvswitch
@ -447,19 +477,26 @@ find %{buildroot}%{_docdir}/%{name}/ -type f ! -name '*.rst' -delete
popd
# python2
# Python subpackages
# SLES
%if 0%{?suse_version}
mkdir -p %{buildroot}%{python2_sitelib}
cp -a %{buildroot}%{_datadir}/openvswitch/python/* %{buildroot}%{python2_sitelib}
# Build the byte compiled files
%py_compile %{buildroot}%{python2_sitelib}
%fdupes %{buildroot}%{python2_sitelib}
# python3
mkdir -p %{buildroot}%{python3_sitelib}
cp -a %{buildroot}%{_datadir}/openvswitch/python/* %{buildroot}%{python3_sitelib}
# Build the byte compiled files
%py3_compile %{buildroot}%{python3_sitelib}
%fdupes %{buildroot}%{python3_sitelib}
%else
# RHEL
install -d -m 0755 %{buildroot}%{python2_sitelib}
cp -a %{buildroot}%{_datadir}/openvswitch/python/* \
%{buildroot}%{python2_sitelib}
# No python3 for RHEL. We are missing python3-* packages from EPEL
%endif
rm -rf %{buildroot}%{_datadir}/openvswitch/python
@ -482,10 +519,21 @@ if [ $1 -eq 1 ]; then
# In the case of upgrade, this is not needed
chown -R openvswitch:openvswitch %{_sysconfdir}/openvswitch
fi
%service_add_post ovsdb-server.service
%service_add_post ovs-vswitchd.service
%service_add_post openvswitch.service
%if 0%{?suse_version}
%service_add_post ovsdb-server.service
%service_add_post ovs-vswitchd.service
%service_add_post openvswitch.service
%{fillup_only -n openvswitch}
%else
%if 0%{?systemd_post:1}
%systemd_post %{name}.service
%else
# Package install, not upgrade
if [ $1 -eq 1 ]; then
/bin/systemctl daemon-reload >dev/null || :
fi
%endif
%endif
%posttrans
# Save the "enabled" state across the transition of ownership
@ -505,15 +553,25 @@ fi
# the OvS can break remote administration during the update so let the
# admin decide when it's the best time for an OvS restart.
# 5771f476573445710834234a6a9f7bd999a027e7 ("fedora: do not restart the service on a pkg upgrade")
export DISABLE_RESTART_ON_UPDATE=yes
%service_del_postun ovsdb-server.service
%service_del_postun ovs-vswitchd.service
%service_del_postun openvswitch.service
%if 0%{?suse_version}
export DISABLE_RESTART_ON_UPDATE=yes
%service_del_postun ovsdb-server.service
%service_del_postun ovs-vswitchd.service
%service_del_postun openvswitch.service
%else
%if 0%{?systemd_postun:1}
%systemd_postun %{name}.service
%else
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
%endif
%endif
%pre
%if 0%{?suse_version}
%service_add_pre ovsdb-server.service
%service_add_pre ovs-vswitchd.service
%service_add_pre openvswitch.service
%endif
# Save the "enabled" state across the transition of
# ownership of openvswitch.service from openvswitch-switch to
# openvswitch.
@ -536,64 +594,200 @@ getent passwd openvswitch >/dev/null || \
exit 0
%preun
# This prevents networking breakages on package removals
# This prevents networking breakages on package removals.
export DISABLE_STOP_ON_REMOVAL=yes
%service_del_preun ovsdb-server.service
%service_del_preun ovs-vswitchd.service
%service_del_preun openvswitch.service
%if 0%{?suse_version}
%service_del_preun ovsdb-server.service
%service_del_preun ovs-vswitchd.service
%service_del_preun openvswitch.service
%else
%if 0%{?systemd_preun:1}
%systemd_preun %{name}.service
%else
# Package install, not upgrade
if [ $1 -eq 0 ]; then
/bin/systemctl --no-reload disable %{name}.service >/dev/null 2>&1 || :
/bin/systemctl stop %{name}.service >/dev/null 2>&1 || :
fi
%endif
%endif
%post -n %{lname} -p /sbin/ldconfig
%postun -n %{lname} -p /sbin/ldconfig
%pre ovn-central
%if 0%{?suse_version}
%service_add_pre ovn-northd.service
%endif
%pre ovn-host
%if 0%{?suse_version}
%service_add_pre ovn-controller.service
%endif
%pre ovn-vtep
%if 0%{?suse_version}
%service_add_pre ovn-controller-vtep.service
%endif
%post ovn-central
%service_add_post ovn-northd.service
%if 0%{?suse_version}
%service_add_post ovn-northd.service
%else
%if 0%{?systemd_post:1}
%systemd_post ovn-northd.service
%else
# Package install, not upgrade
if [ $1 -eq 1 ]; then
/bin/systemctl daemon-reload >dev/null || :
fi
%endif
%endif
%post ovn-host
%service_add_post ovn-controller.service
%if 0%{?suse_version}
%service_add_post ovn-controller.service
%else
%if 0%{?systemd_post:1}
%systemd_post ovn-controller.service
%else
# Package install, not upgrade
if [ $1 -eq 1 ]; then
/bin/systemctl daemon-reload >dev/null || :
fi
%endif
%endif
%post ovn-vtep
%service_add_post ovn-controller-vtep.service
%if 0%{?suse_version}
%service_add_post ovn-controller-vtep.service
%else
%if 0%{?systemd_post:1}
%systemd_post ovn-controller-vtep.service
%else
# Package install, not upgrade
if [ $1 -eq 1 ]; then
/bin/systemctl daemon-reload >dev/null || :
fi
%endif
%endif
%preun ovn-central
%service_del_preun ovn-northd.service
# This prevents networking breakages on package removals.
export DISABLE_STOP_ON_REMOVAL=yes
%if 0%{?suse_version}
%service_del_preun ovn-northd.service
%else
%if 0%{?systemd_preun:1}
%systemd_preun ovn-northd.service
%else
# Package install, not upgrade
if [ $1 -eq 0 ]; then
/bin/systemctl --no-reload disable ovn-northd.service >/dev/null 2>&1 || :
/bin/systemctl stop ovn-northd.service >/dev/null 2>&1 || :
fi
%endif
%endif
%preun ovn-host
%service_del_preun ovn-controller.service
# This prevents networking breakages on package removals.
export DISABLE_STOP_ON_REMOVAL=yes
%if 0%{?suse_version}
%service_del_preun ovn-controller.service
%else
%if 0%{?systemd_preun:1}
%systemd_preun ovn-controller.service
%else
# Package install, not upgrade
if [ $1 -eq 0 ]; then
/bin/systemctl --no-reload disable ovn-controller.service >/dev/null 2>&1 || :
/bin/systemctl stop ovn-controller.service >/dev/null 2>&1 || :
fi
%endif
%endif
%preun ovn-vtep
%service_del_preun ovn-controller-vtep.service
# This prevents networking breakages on package removals.
export DISABLE_STOP_ON_REMOVAL=yes
%if 0%{?suse_version}
%service_del_preun ovn-controller-vtep.service
%else
%if 0%{?systemd_preun:1}
%systemd_preun ovn-controller-vtep.service
%else
# Package install, not upgrade
if [ $1 -eq 0 ]; then
/bin/systemctl --no-reload disable ovn-controller-vtep.service >/dev/null 2>&1 || :
/bin/systemctl stop ovn-controller-vtep.service >/dev/null 2>&1 || :
fi
%endif
%endif
%postun ovn-central
# 44dd4cc49c8a4f9413baa822f111686fd8964160 ("fedora: do not restart ovn svcs
# automatically on pkg upgrade")
export DISABLE_RESTART_ON_UPDATE=yes
%service_del_postun ovn-northd.service
%if 0%{?suse_version}
%service_del_postun ovn-northd.service
%else
%if 0%{?systemd_postun:1}
%systemd_postun ovn-northd.service
%else
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
%endif
%endif
%post ovn-common -p /sbin/ldconfig
%postun ovn-common -p /sbin/ldconfig
%postun ovn-host
# 44dd4cc49c8a4f9413baa822f111686fd8964160 ("fedora: do not restart ovn svcs
# automatically on pkg upgrade")
export DISABLE_RESTART_ON_UPDATE=yes
%service_del_postun ovn-controller.service
%if 0%{?suse_version}
export DISABLE_RESTART_ON_UPDATE=yes
%service_del_postun ovn-controller.service
%else
%if 0%{?systemd_postun:1}
%systemd_postun ovn-controller.service
%else
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
%endif
%endif
%postun ovn-vtep
# 44dd4cc49c8a4f9413baa822f111686fd8964160 ("fedora: do not restart ovn svcs
# automatically on pkg upgrade")
export DISABLE_RESTART_ON_UPDATE=yes
%service_del_postun ovn-controller-vtep.service
%if 0%{?suse_version}
export DISABLE_RESTART_ON_UPDATE=yes
%service_del_postun ovn-controller-vtep.service
%else
%if 0%{?systemd_postun:1}
%systemd_postun ovn-controller-vtep.service
%else
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
%endif
%endif
%preun test
%stop_on_removal openvswitch-testcontroller
# This prevents networking breakages on package removals.
export DISABLE_STOP_ON_REMOVAL=yes
%if 0%{?suse_version}
%service_del_preun openvswitch-testcontroller
%else
%if 0%{?systemd_post:1}
%systemd_preun openvswitch-testcontroller.service
%else
# Package install, not upgrade
if [ $1 -eq 0 ]; then
/bin/systemctl --no-reload disable openvswitch-testcontroller.service >/dev/null 2>&1 || :
/bin/systemctl stop openvswitch-testcontroller.service >/dev/null 2>&1 || :
fi
%endif
%endif
%postun test
%restart_on_update openvswitch-testcontroller
%if 0%{?suse_version}
export DISABLE_RESTART_ON_UPDATE=yes
%service_del_postun openvswitch-testcontroller
%else
%if 0%{?systemd_postun:1}
%systemd_postun openvswitch-testcontroller.service
%else
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
%endif
%endif
%post vtep -p /sbin/ldconfig
%postun vtep -p /sbin/ldconfig
@ -601,7 +795,7 @@ export DISABLE_RESTART_ON_UPDATE=yes
%files
%defattr(-,openvswitch,openvswitch)
%dir %{_sysconfdir}/openvswitch
%config %{_sysconfdir}/openvswitch/default.conf
%config(noreplace) %{_sysconfdir}/openvswitch/default.conf
%config %ghost %{_sysconfdir}/openvswitch/conf.db
%ghost %{_sysconfdir}/openvswitch/.conf.db.~lock~
%config %ghost %{_sysconfdir}/openvswitch/system-id.conf
@ -632,6 +826,7 @@ export DISABLE_RESTART_ON_UPDATE=yes
%{_mandir}/man1/ovsdb-server.1%{?ext_man}
%{_mandir}/man1/ovsdb-tool.1%{?ext_man}
%{_mandir}/man5/ovs-vswitchd.conf.db.5%{?ext_man}
%{_mandir}/man5/ovsdb-server.5%{?ext_man}
%{_mandir}/man7/ovs-fields.7%{?ext_man}
%{_mandir}/man8/ovs-appctl.8%{?ext_man}
%{_mandir}/man8/ovs-bugtool.8%{?ext_man}
@ -652,11 +847,19 @@ export DISABLE_RESTART_ON_UPDATE=yes
%{_unitdir}/openvswitch.service
%{_unitdir}/ovs-vswitchd.service
%{_unitdir}/ovsdb-server.service
%if 0%{?suse_version}
%{_fillupdir}/sysconfig.openvswitch
%attr(755,-,-) %dir %{_localstatedir}/log/openvswitch
%else
%config(noreplace) %{_sysconfdir}/sysconfig/openvswitch
%{_sysconfdir}/sysconfig/network-scripts/ifup-ovs
%{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs
%endif
%attr(750,openvswitch,openvswitch) %dir %{_localstatedir}/log/openvswitch
%ghost %attr(755,root,root) %{_rundir}/openvswitch
%if %{with dpdk}
%{_prefix}/lib/udev/rules.d/91-vfio.rules
%doc source/AUTHORS.rst source/CONTRIBUTING.rst source/NEWS source/README.rst
%license source/COPYING source/NOTICE
%endif
%files doc
@ -693,11 +896,13 @@ export DISABLE_RESTART_ON_UPDATE=yes
%files -n python2-openvswitch-test
%{python2_sitelib}/ovstest/
%if 0%{?suse_version}
%files -n python3-openvswitch
%{python3_sitelib}/ovs/
%files -n python3-openvswitch-test
%{python3_sitelib}/ovstest/
%endif
%files ovn-docker
%{_bindir}/ovn-docker-overlay-driver
@ -723,8 +928,10 @@ export DISABLE_RESTART_ON_UPDATE=yes
%{_mandir}/man8/ovn-sbctl.8%{?ext_man}
%files ovn-central
%dir %{_libexecdir}/firewalld
%dir %{_libexecdir}/firewalld/services
# Can't use libexecdir because it differs between
# RedHat and SUSE and firewalld expects things in /usr/lib
%dir %{_prefix}/lib/firewalld
%dir %{_prefix}/lib/firewalld/services
%{_bindir}/ovn-northd
%{_mandir}/man8/ovn-northd.8%{?ext_man}
%{_datadir}/openvswitch/ovn-nb.ovsschema
@ -734,8 +941,10 @@ export DISABLE_RESTART_ON_UPDATE=yes
%{_prefix}/lib/firewalld/services/ovn-central-firewall-service.xml
%files ovn-host
%dir %{_libexecdir}/firewalld
%dir %{_libexecdir}/firewalld/services
# Can't use libexecdir because it differs between
# RedHat and SUSE and firewalld expects things in /usr/lib
%dir %{_prefix}/lib/firewalld
%dir %{_prefix}/lib/firewalld/services
%{_bindir}/ovn-controller
%{_mandir}/man8/ovn-controller.8%{?ext_man}
%{_unitdir}/ovn-controller.service