diff --git a/contrib/build_pkg.sh b/contrib/build_pkg.sh index d3dbdd995..7093e477a 100755 --- a/contrib/build_pkg.sh +++ b/contrib/build_pkg.sh @@ -179,7 +179,7 @@ if [ $opt_binpkg -eq 1 -a "$rc" -eq 0 ]; then eval rpmbuild -bb $rpmmacros $rpmopts $rpmspec $opt_defines >> ${pkg_log} 2>&1 else IFS=$':' - env $(echo $opt_exports | xargs) dpkg-buildpackage -us -uc -b >> ${pkg_log} 2>&1 + env $(echo $opt_exports | xargs) make_opt="${make_opt}" dpkg-buildpackage -us -uc -b >> ${pkg_log} 2>&1 rc=$((rc + $?)) unset IFS fi @@ -192,7 +192,7 @@ if [ $opt_tarpkg -eq 1 ]; then # Get version for directory name tarball_name=$(basename ${pkg_tarball}) tarball_root_dir=${tarball_name%.tar.gz} - + # Create a temporary directory using mktemp instead of a fixed name tarball_tmp=$(mktemp -d -p ${pkg_dir}) >> ${pkg_log} 2>&1 tar -xzf ${pkg_tarball} -C ${tarball_tmp} >> ${pkg_log} 2>&1 @@ -200,22 +200,22 @@ if [ $opt_tarpkg -eq 1 ]; then echo "ERROR: Failed to extract tarball ${pkg_tarball}. Exit" >> ${pkg_log} exit 1 fi - + # Move spec file to the root directory to support rpmbuild cp ${pkg_dir}/contrib/scripts/${pkg_spec} ${tarball_tmp}/${tarball_root_dir}/ >> ${pkg_log} 2>&1 # Remove the duplicate spec file rm ${tarball_tmp}/${tarball_root_dir}/contrib/scripts/${pkg_spec} >> ${pkg_log} 2>&1 - + # Create new tarball with proper structure pushd ${tarball_tmp} >> ${pkg_log} 2>&1 tar -czf ${pkg_outdir}/${tarball_name} ${tarball_root_dir} >> ${pkg_log} 2>&1 popd >> ${pkg_log} 2>&1 - + echo ${pkg_label} "Release tarball created: ${pkg_outdir}/${tarball_name}" - + # Add tarball temporary directory to cleanup pkg_cleanup="${pkg_cleanup} ${tarball_tmp}" - + fi if [ "$rc" -eq 0 ]; then diff --git a/contrib/jenkins_tests/rpm.sh b/contrib/jenkins_tests/rpm.sh index fa08b84ef..c3a1692e9 100755 --- a/contrib/jenkins_tests/rpm.sh +++ b/contrib/jenkins_tests/rpm.sh @@ -76,14 +76,14 @@ if [ $opt_binrpm -eq 1 ]; then if [ $opt_rpm -eq 1 ]; then test_exec="env RPM_BUILD_NCPUS=${NPROC} rpmbuild -bb --define='configure_options $jenkins_test_custom_configure' $rpmmacros $rpmopts $rpmspec" else - test_exec="env configure_options=\"$jenkins_test_custom_configure\" dpkg-buildpackage -us -uc -b" + test_exec="env make_opt=\"${make_opt}\" configure_options=\"$jenkins_test_custom_configure\" dpkg-buildpackage -us -uc -b" fi do_check_result "$test_exec" "$test_id" "binrpm" "$rpm_tap" "${rpm_dir}/rpm-${test_id}" test_id=$((test_id+1)) fi if [ $opt_checkpkg -eq 1 ]; then - test_exec="env RPM_BUILD_NCPUS=${NPROC} PRJ_RELEASE=1 ${WORKSPACE}/contrib/build_pkg.sh -b -s -a \"configure_options=$jenkins_test_custom_configure\" -i ${WORKSPACE} -o ${rpm_dir}/dist-pkg" + test_exec="env RPM_BUILD_NCPUS=${NPROC} make_opt=\"${make_opt}\" PRJ_RELEASE=1 ${WORKSPACE}/contrib/build_pkg.sh -b -s -a \"configure_options=$jenkins_test_custom_configure\" -i ${WORKSPACE} -o ${rpm_dir}/dist-pkg" do_check_result "$test_exec" "$test_id" "checkpkg" "$rpm_tap" "${rpm_dir}/rpm-${test_id}" do_archive "${rpm_dir}/dist-pkg/build_pkg.log" test_id=$((test_id+1)) diff --git a/debian/rules b/debian/rules index 071b9e366..a7456dc09 100755 --- a/debian/rules +++ b/debian/rules @@ -16,7 +16,7 @@ build-debug: ./configure --with-ofed=/usr --prefix=/usr \ --libdir=/usr/lib --includedir=/usr/include --sysconfdir=/etc \ --enable-opt-log=none --enable-debug ${configure_options} - make + make ${make_opt} cp -f src/core/.libs/libxlio.so libxlio-debug.so make clean @@ -24,6 +24,10 @@ build-debug: # Commands not to run override_dh_auto_configure: +# Use parallel build for production build +override_dh_auto_build: + dh_auto_build -- ${make_opt} + # Workaround for missing dependency information in libmongoclient package override_dh_shlibdeps: dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info