Fedora 29 still ships a Python 2 binary, but some of Ceph's build
dependencies are only available in py3 versions there. In other
words, from F29 on, it is no longer possible to do a py2 Ceph build
on Fedora, even if a python2 binary exists on the system.
If that were not enough, the Python 2 that ships with Fedora 29 is
linked against a non-compatible version of OpenSSL.
Before this commit, install-deps.sh was overriding the spec file's
Python build setting based on the presence or absence of a python2
binary. As the bug cited below indicates, this was not a good idea.
It's better for the spec file to be explicit about which OS versions
are py2 and which are py3, and just stick to that.
Fixes: http://tracker.ceph.com/issues/37301
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
Signed-off-by: Nathan Cutler <ncutler@suse.com>
%endif
%endif
%bcond_with seastar
-%if 0%{?fedora} || 0%{?suse_version} >= 1500
-# distros where py2 is _optional_
+%if 0%{?fedora} >= 29 || 0%{?suse_version} >= 1500
+# distros that need a py3 Ceph build
%bcond_with python2
%else
-# distros where py2 is _mandatory_
+# distros that need a py2 Ceph build
%bcond_without python2
%endif
%if 0%{?fedora} || 0%{?suse_version} >= 1500
}
function munge_ceph_spec_in {
+ # http://rpm.org/user_doc/conditional_builds.html
local OUTFILE=$1
sed -e 's/@//g' -e 's/%bcond_with make_check/%bcond_without make_check/g' < ceph.spec.in > $OUTFILE
- if type python2 > /dev/null 2>&1 ; then
- sed -i -e 's/%bcond_with python2/%bcond_without python2/g' $OUTFILE
- else
- sed -i -e 's/%bcond_without python2/%bcond_with python2/g' $OUTFILE
- fi
if [ $WITH_SEASTAR ]; then
sed -i -e 's/%bcond_with seastar/%bcond_without seastar/g' $OUTFILE
fi
$SUDO yum-config-manager --disable centos-sclo-rh || true
$SUDO yum remove centos-release-scl || true
fi
-
case $ID in
fedora)
if test $yumdnf = yum; then