Skip to content

Commit

Permalink
PS-7749: Rework ZenFS build structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Illia P authored and inikep committed Jul 25, 2023
1 parent 4c43726 commit c20ae25
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions build-ps/build-binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -311,22 +311,22 @@ fi
if [[ -f $INSTALLDIR/zenfs ]]; then
echo "ZenFS utils is built"
else
SOURCEDIR=${WORKDIR_ABS}/rocksdb-source
INSTALL_ROOT=${WORKDIR_ABS}/rocksdb-root
BUILD_ROOT=${WORKDIR_ABS}/rocksdb-build

mkdir ${WORKDIR_ABS}/rocksdb-root ${WORKDIR_ABS}/rocksdb-build
ln -s $SOURCEDIR/storage/rocksdb/rocksdb_plugins/zenfs/ $SOURCEDIR/storage/rocksdb/rocksdb/plugin/

pushd $SOURCEDIR
pushd $SOURCEDIR/storage/rocksdb/rocksdb/
CC=clang-12 CXX=clang++-12 make DISABLE_WARNING_AS_ERROR=1 PREFIX=${INSTALL_ROOT}/usr OBJ_DIR=${BUILD_ROOT} ROCKSDB_PLUGINS=zenfs -j$(nproc) install-static
popd

pushd $SOURCEDIR/plugin/zenfs/util
pushd $SOURCEDIR/storage/rocksdb/rocksdb/plugin/zenfs/util
PKG_CONFIG_PATH=$INSTALL_ROOT/usr/lib/pkgconfig make CC=clang-12 CXX=clang++-12 -j$(nproc)
popd

cp $SOURCEDIR/plugin/zenfs/util/zenfs $INSTALLDIR/
rm -rf $INSTALL_ROOT $BUILD_ROOT $SOURCEDIR
cp $SOURCEDIR/storage/rocksdb/rocksdb/plugin/zenfs/util/zenfs $INSTALLDIR/
rm -rf $INSTALL_ROOT $BUILD_ROOT
fi
fi
)
Expand Down
3 changes: 2 additions & 1 deletion build-ps/debian-zenfs/rules
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ endif
touch $@

cd $(builddir); \
cd rocksdb-source; \
mkdir storage/rocksdb/rocksdb/plugin/; ln -s storage/rocksdb/rocksdb_plugins/zenfs/ storage/rocksdb/rocksdb/plugin/; \
cd storage/rocksdb/rocksdb/; \
CC=clang-12 CXX=clang++-12 make -j$(NCPU) DISABLE_WARNING_AS_ERROR=1 PREFIX=$(CURDIR)/rocksdb-root/usr OBJ_DIR=$(CURDIR)/rocksdb-build ROCKSDB_PLUGINS=zenfs install-static; \
cd plugin/zenfs/util; \
PKG_CONFIG_PATH=$(CURDIR)/rocksdb-root/usr/lib/pkgconfig CC=clang-12 CXX=clang++-12 make -j$(NCPU)
Expand Down
3 changes: 1 addition & 2 deletions build-ps/percona-server-8.0_builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ enable_zenfs() {
rm build-ps/build-binary.sh
curl https://raw.githubusercontent.com/percona/percona-server/8.0/build-ps/build-binary.sh --output build-ps/build-binary.sh
chmod +x build-ps/build-binary.sh
git clone --recursive https://github.com/percona-ysorokin/rocksdb.git -b percona_wdc $WORKDIR/TARGET/rocksdb-source
mkdir -p storage/rocksdb/rocksdb/plugin/
elif [[ $mode == "debian" ]]; then
mkdir builddir
rm -rf debian
Expand All @@ -320,7 +320,6 @@ enable_zenfs() {
sed -i "s:@@PERCONA_VERSION_EXTRA@@:${MYSQL_VERSION_EXTRA#-}:g" debian/rules
sed -i "s:@@REVISION@@:${REVISION}:g" debian/rules
sed -i "s:@@TOKUDB_BACKUP_VERSION@@:${TOKUDB_VERSION}:g" debian/rules
git clone --recursive https://github.com/percona-ysorokin/rocksdb.git -b percona_wdc builddir/rocksdb-source
fi
return
}
Expand Down

0 comments on commit c20ae25

Please sign in to comment.