Skip to content

Commit

Permalink
Adapt ci scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
psrok1 committed Jan 19, 2024
1 parent 93cf2d9 commit aa08816
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 26 deletions.
21 changes: 5 additions & 16 deletions ci/build_bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ source $SCRIPTPATH/build_utils.sh

set -e

INSTALL_PATH=/build/drakvuf/usr
# Usage of /build as root is required by DRAKVUF's mkdeb script
INSTALL_PATH=/build/usr
mkdir -p $INSTALL_PATH

# Build Xen
Expand All @@ -31,24 +32,12 @@ popd
# Build dwarf2json
pushd drakvuf/dwarf2json
/usr/local/go/bin/go build
mkdir -p /build/dwarf2json/
mv dwarf2json /build/dwarf2json/
popd

# Package DRAKVUF
pushd drakvuf
mkdir /out

# remove volatility3
sed -i '/volatility3/d' ./package/mkdeb
# change drakvuf build dir
sed -i 's/\/build/\/build\/drakvuf/g' ./package/mkdeb

DISTRO=$1
DRAKVUFVERSION=$(./scripts/version.sh --dev)
XENVERSION=$(./xen/version.sh --full ./xen/xen/Makefile)

echo "DISTRO=$DISTRO"
echo "DRAKVUFVERSION=$DRAKVUFVERSION"
echo "XENVERSION=$XENVERSION"

sh ./package/mkdeb "$DISTRO" "$DRAKVUFVERSION" "$XENVERSION"
sh ./package/mkdeb
popd
4 changes: 0 additions & 4 deletions ci/build_utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ function build_drakvuf() {
export PKG_CONFIG_PATH="$PREFIX/lib/pkgconfig/"
export LDFLAGS="-L$PREFIX/lib"
export CFLAGS="-I$PREFIX/include"
# Use clang as compiler, otherwise stuff doesn't build
# with drakvuf xen_helpers breaking on -Werror-c++-compat
export CC=clang
export CXX=clang++
autoreconf -vif
./configure --prefix=$PREFIX --enable-debug
make -j$(nproc)
Expand Down
10 changes: 4 additions & 6 deletions ci/custom_bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ function setup_repository () {
echo "[+] Setting up repository"
setup_repository

INSTALL_PATH=/build/drakvuf/usr
# Usage of /build as root is required by DRAKVUF's mkdeb script
INSTALL_PATH=/build/usr
mkdir -p $INSTALL_PATH

echo "[+] Building Xen"
Expand All @@ -85,16 +86,13 @@ popd
echo "[+] Building dwarf2json"
pushd $SANDBOX_DIR/drakvuf/dwarf2json
/usr/local/go/bin/go build
mkdir -p /build/dwarf2json/
mv dwarf2json /build/dwarf2json/
popd

echo "[+] Packaging DRAKVUF"
mkdir -p /out
pushd $SANDBOX_DIR/drakvuf

# Remove volatility3
sed -i '/volatility3/d' ./package/mkdeb
# Change drakvuf build dir
sed -i 's/\/build/\/build\/drakvuf/g' ./package/mkdeb

sh ./package/mkdeb
popd

0 comments on commit aa08816

Please sign in to comment.