Backport "Add ovs.compat module to python package" (#1619712)

Backport a variant of "dhparams: Fix .c file generation with OpenSSL >= 1.1.1-pre9"
f38
Timothy Redaelli 6 years ago
parent bca9d9121b
commit 460da50b8c

@ -0,0 +1,31 @@
From f18adea51cac4f40c50d59d7c001264a8ce83cb3 Mon Sep 17 00:00:00 2001
From: Terry Wilson <twilson@redhat.com>
Date: Fri, 31 Aug 2018 13:40:54 -0500
Subject: [PATCH] Add ovs.compat module to python package
Signed-off-by: Terry Wilson <twilson@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Timothy Redaelli <tredaelli@redhat.com>
(cherry picked from commit 2360464d629de3acacabd960ffc02fbb5081028d)
Signed-off-by: Ben Pfaff <blp@ovn.org>
---
python/setup.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/python/setup.py b/python/setup.py
index 0e86834ea..b52657df3 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -63,7 +63,8 @@ setup_args = dict(
url='http://www.openvswitch.org/',
author='Open vSwitch',
author_email='dev@openvswitch.org',
- packages=['ovs', 'ovs.db', 'ovs.unixctl'],
+ packages=['ovs', 'ovs.compat', 'ovs.compat.sortedcontainers',
+ 'ovs.db', 'ovs.unixctl'],
keywords=['openvswitch', 'ovs', 'OVSDB'],
license='Apache 2.0',
classifiers=[
--
2.17.1

@ -0,0 +1,38 @@
From 44343cb1ca4232f23dba24cab98d3605686f5700 Mon Sep 17 00:00:00 2001
From: Timothy Redaelli <tredaelli@redhat.com>
Date: Fri, 7 Sep 2018 15:14:53 +0200
Subject: [PATCH] dhparams: Fix .c file generation with OpenSSL >= 1.1.1-pre9
Since OpenSSL upstream commit 201b305a2409
("apps/dsaparam.c generates code that is intended to be pasted or included into
an existing source file: the function is static, and the code doesn't include
dsa.h. Match the generated C source style of dsaparam.") "openssl dhparam -C"
generates the get_dh functions as static, but the functions are used inside
stream-ssl.c and so the static keyword cannot be used.
This commit removes the static keyword from the get_dh functions during
dhparams.c file generation by restoring the current behaviour.
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
(cherry picked from commit dc041eae5019a936618c398a2a1d106f65604ccc)
---
lib/automake.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/automake.mk b/lib/automake.mk
index 8ecad1241..70461ec8c 100644
--- a/lib/automake.mk
+++ b/lib/automake.mk
@@ -438,7 +438,7 @@ lib/dhparams.c: lib/dh1024.pem lib/dh2048.pem lib/dh4096.pem
openssl dhparam -C -in $(srcdir)/lib/dh1024.pem -noout && \
openssl dhparam -C -in $(srcdir)/lib/dh2048.pem -noout && \
openssl dhparam -C -in $(srcdir)/lib/dh4096.pem -noout) \
- | sed 's/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp && \
+ | sed 's/^static DH/DH/; s/\(get_dh[0-9]*\)()/\1(void)/' > lib/dhparams.c.tmp && \
mv lib/dhparams.c.tmp lib/dhparams.c
else
lib_libopenvswitch_la_SOURCES += lib/stream-nossl.c
--
2.17.1

@ -40,7 +40,7 @@ Name: openvswitch
Summary: Open vSwitch daemon/database/utilities
URL: http://www.openvswitch.org/
Version: 2.9.2
Release: 5%{?commit0:.%{date}git%{shortcommit0}}%{?dist}
Release: 6%{?commit0:.%{date}git%{shortcommit0}}%{?dist}
# Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the
# lib/sflow*.[ch] files are SISSL
@ -71,10 +71,15 @@ Patch41: 0002-netdev-tc-offloads-Add-support-for-IP-fragmentation.patch
Patch42: 0001-lib-netdev-tc-offloads-Fix-frag-first-later-translat.patch
Patch43: 0002-lib-tc-Fix-sparse-warnings.patch
Patch50: 0001-Add-ovs.compat-module-to-python-package.patch
# Don't enable new TLS versions by default (needed since OpenSSL 1.1.1)
Patch310: 0001-stream-ssl-Don-t-enable-new-TLS-versions-by-default.patch
Patch311: 0002-stream-ssl-Define-SSL_OP_NO_SSL_MASK-for-OpenSSL-ver.patch
Patch315: 0001-dhparams-Fix-.c-file-generation-with-OpenSSL-1.1.1-p.patch
BuildRequires: gcc-c++
BuildRequires: gcc
BuildRequires: python2-sphinx
@ -656,6 +661,10 @@ chown -R openvswitch:openvswitch /etc/openvswitch
%{_unitdir}/ovn-controller-vtep.service
%changelog
* Fri Sep 14 2018 Timothy Redaelli <tredaelli@redhat.com> - 2.9.2-6
- Backport "Add ovs.compat module to python package" (#1619712)
- Backport a variant of "dhparams: Fix .c file generation with OpenSSL >= 1.1.1-pre9"
* Mon Aug 13 2018 Timothy Redaelli <tredaelli@redhat.com> - 2.9.2-5
- Backport "Don't enable new TLS versions by default"

Loading…
Cancel
Save