diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:20 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 18:24:20 +0000 |
commit | 483eb2f56657e8e7f419ab1a4fab8dce9ade8609 (patch) | |
tree | e5d88d25d870d5dedacb6bbdbe2a966086a0a5cf /src/spdk/autopackage.sh | |
parent | Initial commit. (diff) | |
download | ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.tar.xz ceph-483eb2f56657e8e7f419ab1a4fab8dce9ade8609.zip |
Adding upstream version 14.2.21.upstream/14.2.21upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/spdk/autopackage.sh')
-rwxr-xr-x | src/spdk/autopackage.sh | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/src/spdk/autopackage.sh b/src/spdk/autopackage.sh new file mode 100755 index 00000000..19b5cd28 --- /dev/null +++ b/src/spdk/autopackage.sh @@ -0,0 +1,63 @@ +#!/usr/bin/env bash + +set -xe + +rootdir=$(readlink -f $(dirname $0)) +source "$rootdir/test/common/autotest_common.sh" + +out=$PWD + +MAKEFLAGS=${MAKEFLAGS:--j16} +cd $rootdir + +timing_enter autopackage + +$MAKE clean + +if [ `git status --porcelain --ignore-submodules | wc -l` -ne 0 ]; then + echo make clean left the following files: + git status --porcelain + exit 1 +fi + +spdk_pv=spdk-$(date +%Y_%m_%d) +spdk_tarball=${spdk_pv}.tar +dpdk_pv=dpdk-$(date +%Y_%m_%d) +dpdk_tarball=${dpdk_pv}.tar +ipsec_pv=ipsec-$(date +%Y_%m_%d) +ipsec_tarball=${ipsec_pv}.tar + +find . -iname "spdk-*.tar* dpdk-*.tar* ipsec-*.tar*" -delete +git archive HEAD^{tree} --prefix=${spdk_pv}/ -o ${spdk_tarball} + +# Build from packaged source +tmpdir=$(mktemp -d) +echo "tmpdir=$tmpdir" +tar -C "$tmpdir" -xf $spdk_tarball + +if [ -z "$WITH_DPDK_DIR" ]; then + cd dpdk + git archive HEAD^{tree} --prefix=dpdk/ -o ../${dpdk_tarball} + cd .. + tar -C "$tmpdir/${spdk_pv}" -xf $dpdk_tarball +fi + +if [ -d "intel-ipsec-mb" ]; then + cd intel-ipsec-mb + git archive HEAD^{tree} --prefix=intel-ipsec-mb/ -o ../${ipsec_tarball} + cd .. + tar -C "$tmpdir/${spdk_pv}" -xf $ipsec_tarball +fi + +( + cd "$tmpdir"/spdk-* + # use $config_params to get the right dependency options, but disable coverage and ubsan + # explicitly since they are not needed for this build + ./configure $config_params --disable-debug --enable-werror --disable-coverage --disable-ubsan + time $MAKE ${MAKEFLAGS} +) +rm -rf "$tmpdir" + +timing_exit autopackage + +timing_finish |