Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions contrib/build_pkg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -192,30 +192,30 @@ 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
if [ $? -ne 0 ]; 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
Expand Down
4 changes: 2 additions & 2 deletions contrib/jenkins_tests/rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
6 changes: 5 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,18 @@ 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


# Commands not to run
override_dh_auto_configure:

# Use parallel build for production build
override_dh_auto_build:
dh_auto_build -- ${make_opt}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check if this package can be built without having this variable like it will in UBS

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I commented make_opt definition in globals.sh and the package built successfully:
https://nbuprod.blsm.nvidia.com/swx-media-master/job/libxlio/job/LibXLIO-opensource/2328/


# Workaround for missing dependency information in libmongoclient package
override_dh_shlibdeps:
dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info