From 9aaef75e2185782e9fc8f5ea84432bf44af35678 Mon Sep 17 00:00:00 2001 From: Timothy Redaelli Date: Wed, 21 Nov 2018 23:58:47 +0100 Subject: [PATCH] Fix C JSON library creation on Fedora Rawhide and exit if shared library cannot be created --- openvswitch.spec | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/openvswitch.spec b/openvswitch.spec index 7e85e97..9742386 100644 --- a/openvswitch.spec +++ b/openvswitch.spec @@ -62,7 +62,7 @@ Name: openvswitch Summary: Open vSwitch daemon/database/utilities URL: http://www.openvswitch.org/ Version: 2.10.0 -Release: 3%{?commit0:.%{date}git%{shortcommit0}}%{?dist} +Release: 4%{?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 @@ -358,16 +358,22 @@ cp -a $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/ovstest \ # Build the JSON C extension for the Python lib (#1417738) pushd python %if %{with_python2} -CPPFLAGS="-I ../include" \ -LDFLAGS="%{__global_ldflags} -L $RPM_BUILD_ROOT%{_libdir}" \ - %py2_build +( +export CPPFLAGS="-I ../include" +export LDFLAGS="%{__global_ldflags} -L $RPM_BUILD_ROOT%{_libdir}" +%py2_build %py2_install +[ -f "$RPM_BUILD_ROOT/%{python2_sitearch}/ovs/_json.so" ] +) %endif %if %{with_python3} -CPPFLAGS="-I ../include" \ -LDFLAGS="%{__global_ldflags} -L $RPM_BUILD_ROOT%{_libdir}" \ - %py3_build +( +export CPPFLAGS="-I ../include" +export LDFLAGS="%{__global_ldflags} -L $RPM_BUILD_ROOT%{_libdir}" +%py3_build %py3_install +[ -f "$RPM_BUILD_ROOT/%{python3_sitearch}/ovs/_json.cpython-%{python3_version_nodots}m-%{_arch}-%{_target_os}%{?_gnu}.so" ] +) %endif popd @@ -745,6 +751,9 @@ chown -R openvswitch:openvswitch /etc/openvswitch %{_unitdir}/ovn-controller-vtep.service %changelog +* Wed Nov 21 2018 Timothy Redaelli - 2.10.0-4 +- Fix C JSON library creation on Fedora Rawhide and exit if shared library cannot be created + * Fri Nov 02 2018 Timothy Redaelli - 2.10.0-3 - Build for any architectures