]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
build/ops: rpm: stop install-deps.sh clobbering spec file Python build setting
authorNathan Cutler <ncutler@suse.com>
Tue, 20 Nov 2018 10:43:13 +0000 (11:43 +0100)
committerNathan Cutler <ncutler@suse.com>
Tue, 20 Nov 2018 14:00:48 +0000 (15:00 +0100)
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>
ceph.spec.in
install-deps.sh

index 3ab90a1f7c75c293cb13dab96ea8660a2ed300aa..a5ef095f34a9e0619900a94f78ebef43cd9fb5a7 100644 (file)
 %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
index 82bce59efe6bd0a2d4765272d8cc9f817f42494b..31c7c1249fd90bbc368e18e255597bf6b57ecf7e 100755 (executable)
@@ -33,13 +33,9 @@ function install_seastar_deps {
 }
 
 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
@@ -293,7 +289,6 @@ else
            $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