]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-*: fix tcmalloc args for pre-cmake builds 628/head
authorDan Mick <dan.mick@redhat.com>
Thu, 2 Feb 2017 02:05:03 +0000 (18:05 -0800)
committerDan Mick <dan.mick@redhat.com>
Thu, 2 Feb 2017 23:09:35 +0000 (15:09 -0800)
Prior to cmake, --with(out)-tcmalloc must be passed to the
configure done during the actual build.  For rpm, that means an
extra arg to the invocation of rpmbuild in build_rpm; for deb,
debian/rules invokes configure.  Also, no reason to export
the shell variables; they're used locally and passed as
property files between Jenkins jobs.

Fixes: http://tracker.ceph.com/issues/18744
Signed-off-by: Dan Mick <dan.mick@redhat.com>
ceph-build/build/build_deb
ceph-build/build/build_rpm
ceph-dev-build/build/build_deb
ceph-dev-build/build/build_rpm
ceph-dev-new-build/build/build_deb
ceph-dev-new-build/build/build_rpm
ceph-dev-new-setup/build/build
ceph-dev-setup/build/build
ceph-setup/build/build

index 8c01bfc283444efd2471a1ee0f534b342a3fb9a3..852f733ca8e355259f4060052dd3b207588c331b 100644 (file)
@@ -75,6 +75,7 @@ echo building debs for $DIST
 # pass only those env vars specifically noted
 sudo \
     CEPH_EXTRA_CMAKE_ARGS=$CEPH_EXTRA_CMAKE_ARGS \
+    CEPH_EXTRA_CONFIGURE_ARGS=$CEPH_EXTRA_CONFIGURE_ARGS \
     pbuilder build \
     --distribution $DIST \
     --basetgz $pbuilddir/$DIST.tgz \
index c672f38344b173996d042d64985faad600e2208a..5001d54590dc75c49c899f2bebd0cb2bc1b8c9e0 100644 (file)
@@ -34,7 +34,7 @@ cp -a rpm/*.patch ${BUILDAREA}/SOURCES/. || true
 # Build RPMs
 BUILDAREA=`readlink -fn ${BUILDAREA}`   ### rpm wants absolute path
 cd ${BUILDAREA}/SPECS
-rpmbuild -ba --define "_topdir ${BUILDAREA}" ceph.spec
+rpmbuild -ba --define "_topdir ${BUILDAREA}" ${CEPH_EXTRA_RPMBUILD_ARGS} ceph.spec
 
 echo done
 
index a9088370d0e346968b59a84990551bd13bef9f51..d30367cb84ad032b55579f7c99582fb7727b781b 100644 (file)
@@ -75,6 +75,7 @@ echo building debs for $DIST
 # pass only those env vars specifically noted
 sudo \
     CEPH_EXTRA_CMAKE_ARGS=$CEPH_EXTRA_CMAKE_ARGS \
+    CEPH_EXTRA_CONFIGURE_ARGS=$CEPH_EXTRA_CONFIGURE_ARGS \
     pbuilder build \
     --distribution $DIST \
     --basetgz $pbuilddir/$DIST.tgz \
index 9efde9bad81a8e7a3fa078088cd333b02a079f97..338f62e7334b71783956f1394233d8a266ea82c4 100644 (file)
@@ -45,7 +45,7 @@ cp -a rpm/*.patch ${BUILDAREA}/SOURCES/. || true
 # Build RPMs
 BUILDAREA=`readlink -fn ${BUILDAREA}`   ### rpm wants absolute path
 cd ${BUILDAREA}/SPECS
-rpmbuild -ba --define "_topdir ${BUILDAREA}" ceph.spec
+rpmbuild -ba --define "_topdir ${BUILDAREA}" ${CEPH_EXTRA_RPMBUILD_ARGS} ceph.spec
 
 # The following was copied from autobuild-ceph/build-ceph-rpm.sh
 # which creates the ceph-release rpm meant to create the repository file for the repo
index a9088370d0e346968b59a84990551bd13bef9f51..d30367cb84ad032b55579f7c99582fb7727b781b 100644 (file)
@@ -75,6 +75,7 @@ echo building debs for $DIST
 # pass only those env vars specifically noted
 sudo \
     CEPH_EXTRA_CMAKE_ARGS=$CEPH_EXTRA_CMAKE_ARGS \
+    CEPH_EXTRA_CONFIGURE_ARGS=$CEPH_EXTRA_CONFIGURE_ARGS \
     pbuilder build \
     --distribution $DIST \
     --basetgz $pbuilddir/$DIST.tgz \
index 9efde9bad81a8e7a3fa078088cd333b02a079f97..338f62e7334b71783956f1394233d8a266ea82c4 100644 (file)
@@ -45,7 +45,7 @@ cp -a rpm/*.patch ${BUILDAREA}/SOURCES/. || true
 # Build RPMs
 BUILDAREA=`readlink -fn ${BUILDAREA}`   ### rpm wants absolute path
 cd ${BUILDAREA}/SPECS
-rpmbuild -ba --define "_topdir ${BUILDAREA}" ceph.spec
+rpmbuild -ba --define "_topdir ${BUILDAREA}" ${CEPH_EXTRA_RPMBUILD_ARGS} ceph.spec
 
 # The following was copied from autobuild-ceph/build-ceph-rpm.sh
 # which creates the ceph-release rpm meant to create the repository file for the repo
index 56dc78ed8554851fbb7476277c61358a13a7d8e0..d82289126816db02b1ef1b10fad3c57bf7d687ef 100644 (file)
@@ -57,10 +57,14 @@ 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"
+    CEPH_EXTRA_CONFIGURE_ARGS="--without-tcmalloc"
+    CEPH_EXTRA_RPMBUILD_ARGS="--without tcmalloc"
+    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"
+    CEPH_EXTRA_CONFIGURE_ARGS="--with-tcmalloc"
+    CEPH_EXTRA_RPMBUILD_ARGS="--with tcmalloc"
+    CEPH_EXTRA_CMAKE_ARGS="$CEPH_EXTRA_CMAKE_ARGS -DALLOCATOR=tcmalloc"
 fi
 
 # When using autotools/autoconf it is possible to see output from `git diff`
@@ -209,6 +213,10 @@ cat > dist/branch << EOF
 BRANCH=${BRANCH}
 EOF
 
+# CEPH_EXTRA_{CONFIGURE,RPMBUILD}_ARGS are consumed by ceph-build before
+# the switch to cmake; CEPH_EXTRA_CMAKE_ARGS is for after cmake
 cat > dist/other_envvars << EOF
+CEPH_EXTRA_CONFIGURE_ARGS=${CEPH_EXTRA_CONFIGURE_ARGS}
+CEPH_EXTRA_RPMBUILD_ARGS=${CEPH_EXTRA_RPMBUILD_ARGS}
 CEPH_EXTRA_CMAKE_ARGS=${CEPH_EXTRA_CMAKE_ARGS}
 EOF
index 01083b128cc0bc6db953231a2708a46ecb27026b..37b06b696b70bff210248c293ca3140172c7aec3 100644 (file)
@@ -52,10 +52,14 @@ 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"
+    CEPH_EXTRA_CONFIGURE_ARGS="--without-tcmalloc"
+    CEPH_EXTRA_RPMBUILD_ARGS="--without tcmalloc"
+    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"
+    CEPH_EXTRA_CONFIGURE_ARGS="--with-tcmalloc"
+    CEPH_EXTRA_RPMBUILD_ARGS="--with tcmalloc"
+    CEPH_EXTRA_CMAKE_ARGS="$CEPH_EXTRA_CMAKE_ARGS -DALLOCATOR=tcmalloc"
 fi
 
 # When using autotools/autoconf it is possible to see output from `git diff`
@@ -204,6 +208,10 @@ cat > dist/branch << EOF
 BRANCH=${BRANCH}
 EOF
 
+# CEPH_EXTRA_{CONFIGURE,RPMBUILD}_ARGS are consumed by ceph-build before
+# the switch to cmake; CEPH_EXTRA_CMAKE_ARGS is for after cmake
 cat > dist/other_envvars << EOF
+CEPH_EXTRA_CONFIGURE_ARGS=${CEPH_EXTRA_CONFIGURE_ARGS}
+CEPH_EXTRA_RPMBUILD_ARGS=${CEPH_EXTRA_RPMBUILD_ARGS}
 CEPH_EXTRA_CMAKE_ARGS=${CEPH_EXTRA_CMAKE_ARGS}
 EOF
index 86c421c2a8e7ab2d0e70c61bee6dc519ffa57aaa..f7b1863334b91ad0a7b32050b835c90569f2f737 100644 (file)
@@ -47,10 +47,14 @@ 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"
+    CEPH_EXTRA_CONFIGURE_ARGS="--without-tcmalloc"
+    CEPH_EXTRA_RPMBUILD_ARGS="--without tcmalloc"
+    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"
+    CEPH_EXTRA_CONFIGURE_ARGS="--with-tcmalloc"
+    CEPH_EXTRA_RPMBUILD_ARGS="--with tcmalloc"
+    CEPH_EXTRA_CMAKE_ARGS="$CEPH_EXTRA_CMAKE_ARGS -DALLOCATOR=tcmalloc"
 fi
 
 
@@ -192,6 +196,10 @@ cat > dist/sha1 << EOF
 SHA1=${GIT_COMMIT}
 EOF
 
+# CEPH_EXTRA_{CONFIGURE,RPMBUILD}_ARGS are consumed by ceph-build before
+# the switch to cmake; CEPH_EXTRA_CMAKE_ARGS is for after cmake
 cat > dist/other_envvars << EOF
+CEPH_EXTRA_CONFIGURE_ARGS=${CEPH_EXTRA_CONFIGURE_ARGS}
+CEPH_EXTRA_RPMBUILD_ARGS=${CEPH_EXTRA_RPMBUILD_ARGS}
 CEPH_EXTRA_CMAKE_ARGS=${CEPH_EXTRA_CMAKE_ARGS}
 EOF