Currently python2 and python3 binaries are searched by following the
PATHs, but, on Fedora, the python2 package does not provides /bin/python2
and so if the PATH contains /bin before /usr/bin (for example by using
the ansible poc) then the resulting RPM file will require /bin/python2
instead of /usr/bin/python2 and this breaks some tools (for example
createrepo).
This patch specify the full path of python2 interpreter and,
if python3-openvswitch package is built, the full path of python3
interpreter.
Reported-by: Ansis Atteka <ansisatteka@gmail.com>
Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2018-May/346796.html
Signed-off-by: Timothy Redaelli <tredaelli@redhat.com>
Acked-by: Ansis Atteka <aatteka@ovn.org>
--with-dpdk=$(dirname %{_datadir}/dpdk/*/.config) \
%endif
--enable-ssl \
- --with-pkidir=%{_sharedstatedir}/openvswitch/pki
+ --with-pkidir=%{_sharedstatedir}/openvswitch/pki \
+%if 0%{?fedora} > 22 || %{with build_python3}
+ PYTHON3=%{__python3} \
+ PYTHON=%{__python2}
+%else
+ PYTHON=%{__python}
+%endif
build-aux/dpdkstrip.py \
%if %{with dpdk}