]> git.proxmox.com Git - mirror_ovs.git/commitdiff
rhel: openvswitch-fedora.spec.in: Specify PYTHON and PYTHON3
authorTimothy Redaelli <tredaelli@redhat.com>
Thu, 10 May 2018 15:21:41 +0000 (17:21 +0200)
committerAnsis Atteka <aatteka@ovn.org>
Thu, 10 May 2018 19:00:43 +0000 (12:00 -0700)
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>
rhel/openvswitch-fedora.spec.in

index 6dbf20ce1ac44d4ce824867c4c3536d4600366b4..9462ce236bf103432c71e4a1a2525b1522888640 100644 (file)
@@ -222,7 +222,13 @@ Docker network plugins for OVN.
        --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}