]> git.apps.os.sepia.ceph.com Git - ceph-build.git/commitdiff
cmake: modified several scripts for cmake support 485/head
authorAli Maredia <amaredia@redhat.com>
Fri, 16 Sep 2016 16:55:04 +0000 (12:55 -0400)
committerAli Maredia <amaredia@redhat.com>
Wed, 21 Sep 2016 20:01:03 +0000 (16:01 -0400)
Modified build scripts to support configuration
for both cmake and automake builds.

Removed traces of blkin library from builds.

Added cmake as a rpm requirement for ansible
slaves

Signed-off-by: Ali Maredia <amaredia@redhat.com>
ansible/examples/slave.yml
ansible/examples/slave_static.yml
ceph-dev-setup/build/build
ceph-dev/config/definitions/ceph-dev.yml
ceph-setup/build/build

index f22c1ed295e615dcbef21d550d2210a6e75a8fca..b1d28b4e49a8d4f956b7586ee5d51dc89e571699 100644 (file)
@@ -81,6 +81,7 @@
         - autoconf
         - redhat-lsb-core
         - automake
+        - cmake
         - binutils
         - bison
         - flex
index 37aabf29e3dcb91c802fa444b5941f60ac5cb492..3dffe8e9e2bc54ba5b0230e318452546f4cb3fa7 100644 (file)
         - autoconf
         - redhat-lsb-core
         - automake
+        - cmake
         - binutils
         - bison
         - flex
         - libtool
         - autotools-dev
         - automake
+        - cmake
         - debian-archive-keyring
         # jenkins-job-builder job:
         - libyaml-dev
index 81344dc5a368659adee12e075d46e360020ad3e8..244c02b4c35f2d290b5e2f7be33a77716de6f8fe 100644 (file)
@@ -43,25 +43,43 @@ echo "Running submodule update ..."
 git submodule update --init
 
 # Flavor Builds support
-# TODO: enable CMAKE
-#export CEPH_EXTRA_CMAKE_ARGS
 
-FLAVOR_FLAGS="--without-cryptopp"
+#cryptopp is not default for CMake
+AUTOCONF_FLAVOR_FLAGS="--without-cryptopp"
 
 if [ "${FLAVOR}" == "notcmalloc" ]
 then
-    echo "Detected notcmalloc flavor: will use flag: --without-tcmalloc"
-    FLAVOR_FLAGS="$FLAVOR_FLAGS --without-tcmalloc"
-    #export CEPH_EXTRA_CMAKE_ARGS="$CEPH_EXTRA_CMAKE_ARGS -DALLOCATOR=libc"
+    echo "Detected notcmalloc flavor: will use flag: --without-tcmalloc or -DALLOCATOR=libc"
+    AUTOCONF_FLAVOR_FLAGS="$AUTOCONF_FLAVOR_FLAGS --without-tcmalloc"
+    export CEPH_EXTRA_CMAKE_ARGS="$CEPH_EXTRA_CMAKE_ARGS -DALLOCATOR=libc"
 else
-    FLAVOR_FLAGS="$FLAVOR_FLAGS --with-tcmalloc"
-    #export CEPH_EXTRA_CMAKE_ARGS="$CEPH_EXTRA_CMAKE_ARGS -DALLOCATOR=tcmalloc"
+    AUTOCONF_FLAVOR_FLAGS="$AUTOCONF_FLAVOR_FLAGS --with-tcmalloc"
+    export CEPH_EXTRA_CMAKE_ARGS="$CEPH_EXTRA_CMAKE_ARGS -DALLOCATOR=tcmalloc"
 fi
 
-if [ "${FLAVOR}" == "blkin" ]
-then
-    echo "Detected bklin flavor: will use flag: --with-blkin"
-    FLAVOR_FLAGS="$FLAVOR_FLAGS --with-blkin"
+
+# make-dist does not exist for autotools builds
+if [ ! -x make-dist ]
+    echo "Using autotools build system"
+    echo "Running autogen.sh ..."
+    ./autogen.sh
+    echo "Running configure ..."
+    ./configure \
+      --disable-option-checking \
+      '--prefix=/usr' \
+      '--sbindir=/sbin' \
+      '--localstatedir=/var' \
+      '--sysconfdir=/etc' \
+      '--with-debug' \
+      '--with-nss' \
+      '--with-radosgw' \
+      '--disable-static' \
+      '--without-lttng' \
+      $AUTOCONF_FLAVOR_FLAGS \
+      'CFLAGS= -Wno-unused-parameter' \
+      'CXXFLAGS=  -Wno-unused-parameter' \
+      --cache-file=/dev/null \
+      --srcdir=.
 fi
 
 mkdir -p release
@@ -104,38 +122,18 @@ else
 
     if [ -x make-dist ]
     then
-      ./make-dist $cephver
-      vers=`ls ceph-*.tar.bz2 | cut -c 6- | sed 's/.tar.bz2//'`
-      extension="tar.bz2"
-      extract_flags="jxf"
-      compress_flags="jcf"
+        ./make-dist $cephver
+        vers=`ls ceph-*.tar.bz2 | cut -c 6- | sed 's/.tar.bz2//'`
+        extension="tar.bz2"
+        extract_flags="jxf"
+        compress_flags="jcf"
     else
-      echo "Running autogen.sh ..."
-      ./autogen.sh
-      echo "Running configure ..."
-      ./configure \
-        --disable-option-checking \
-        '--prefix=/usr' \
-        '--sbindir=/sbin' \
-        '--localstatedir=/var' \
-        '--sysconfdir=/etc' \
-        '--with-debug' \
-        '--with-nss' \
-        '--with-radosgw' \
-        '--disable-static' \
-        '--without-lttng' \
-        $FLAVOR_FLAGS \
-        'CFLAGS= -Wno-unused-parameter' \
-        'CXXFLAGS=  -Wno-unused-parameter' \
-        --cache-file=/dev/null \
-        --srcdir=.
-
-      make dist
-      make dist-bzip2
-      vers=`ls ceph-*.tar.gz | cut -c 6- | sed 's/.tar.gz//'`
-      extension="tar.gz"
-      extract_flags="zxf"
-      compress_flags="zcf"
+        make dist
+        make dist-bzip2
+        vers=`ls ceph-*.tar.gz | cut -c 6- | sed 's/.tar.gz//'`
+        extension="tar.gz"
+        extract_flags="zxf"
+        compress_flags="zcf"
     fi
 
     echo tarball vers $vers
index 079d728618183f9d3aa77ba0bab8c8a771ea5eea..385fc6b3dd2fe0df6f342e309a68ab55acd7e7b1 100644 (file)
@@ -56,9 +56,8 @@ If this is checked, then the binaries will be built and pushed to chacra even if
           choices:
             - default
             - notcmalloc
-            - blkin
           default: "default"
-          description: "Type of Ceph build, choices are: notcmalloc, and blkin. Defaults to: 'default'"
+          description: "Type of Ceph build, choices are: notcmalloc, default (i.e. with tcmalloc). Defaults to: 'default'"
 
     builders:
       - multijob:
index 6fad406d07f25c41534df62a9221e9c76cbf00b5..c43885c1e20fae686c2ccd5c96c7ab1b37876f25 100644 (file)
@@ -38,24 +38,44 @@ fi
 echo "Running submodule update ..."
 git submodule update --init
 
-echo "Running autogen.sh ..."
-./autogen.sh
-echo "Running configure ..."
-./configure \
-  --disable-option-checking \
-  '--prefix=/usr' \
-  '--sbindir=/sbin' \
-  '--localstatedir=/var' \
-  '--sysconfdir=/etc' \
-  '--with-debug' \
-  '--with-nss' \
-  '--with-radosgw' \
-  '--disable-static' \
-  '--without-lttng' \
-  'CFLAGS= -Wno-unused-parameter' \
-  'CXXFLAGS=  -Wno-unused-parameter' \
-  --cache-file=/dev/null \
-  --srcdir=.
+# Flavor Builds support
+
+#cryptopp is not default for CMake
+AUTOCONF_FLAVOR_FLAGS="--without-cryptopp"
+
+if [ "${FLAVOR}" == "notcmalloc" ]
+then
+    echo "Detected notcmalloc flavor: will use flag: --without-tcmalloc or -DALLOCATOR=libc"
+    AUTOCONF_FLAVOR_FLAGS="$AUTOCONF_FLAVOR_FLAGS --without-tcmalloc"
+    export CEPH_EXTRA_CMAKE_ARGS="$CEPH_EXTRA_CMAKE_ARGS -DALLOCATOR=libc"
+else
+    AUTOCONF_FLAVOR_FLAGS="$AUTOCONF_FLAVOR_FLAGS --with-tcmalloc"
+    export CEPH_EXTRA_CMAKE_ARGS="$CEPH_EXTRA_CMAKE_ARGS -DALLOCATOR=tcmalloc"
+fi
+
+# make-dist does not exist for autotools builds
+if [ ! -x make-dist ]
+    echo "Using autotools build system"
+    echo "Running autogen.sh ..."
+    ./autogen.sh
+    echo "Running configure ..."
+    ./configure \
+      --disable-option-checking \
+      '--prefix=/usr' \
+      '--sbindir=/sbin' \
+      '--localstatedir=/var' \
+      '--sysconfdir=/etc' \
+      '--with-debug' \
+      '--with-nss' \
+      '--with-radosgw' \
+      '--disable-static' \
+      '--without-lttng' \
+      $AUTOCONF_FLAVOR_FLAGS \
+      'CFLAGS= -Wno-unused-parameter' \
+      'CXXFLAGS=  -Wno-unused-parameter' \
+      --cache-file=/dev/null \
+      --srcdir=.
+fi
 
 mkdir -p release
 
@@ -92,10 +112,22 @@ else
     echo building tarball
     rm ceph-*.tar.gz || true
     rm ceph-*.tar.bz2 || true
-    make dist
-    make dist-bzip2
+    if [ -x make-dist ]
+    then
+        ./make-dist $cephver
+        vers=`ls ceph-*.tar.bz2 | cut -c 6- | sed 's/.tar.bz2//'`
+        extension="tar.bz2"
+        extract_flags="jxf"
+        compress_flags="jcf"
+    else
+        make dist
+        make dist-bzip2
+        vers=`ls ceph-*.tar.gz | cut -c 6- | sed 's/.tar.gz//'`
+        extension="tar.gz"
+        extract_flags="zxf"
+        compress_flags="zcf"
+    fi
 
-    vers=`ls ceph-*.tar.gz | cut -c 6- | sed 's/.tar.gz//'`
     echo tarball vers $vers
 
     echo extracting