The community docs section for source building Openvasd on Debian flavours is incorrect.
The issue seems to relate to recent Openvasd source versions having a slightly changed file path structure. The published build instructions have not yet been updated to reflect this change (around Nov 2024) , which in turn causes new Openvasd builds to fail.
The below works with Debain 12…
tar -C $SOURCE_DIR -xvzf $SOURCE_DIR/openvas-scanner-$OPENVAS_DAEMON.tar.gz
mkdir -p $INSTALL_DIR/openvasd/usr/local/bin
cd $SOURCE_DIR/openvas-scanner-$OPENVAS_DAEMON/rust/src/openvasd
cargo build --release
sudo cp -v ../target/release/openvasd $INSTALL_DIR/openvasd/usr/local/bin/
cd $SOURCE_DIR/openvas-scanner-$OPENVAS_DAEMON/rust/src/scannerctl
cargo build --release
sudo cp -v ../../target/release/openvasd $INSTALL_DIR/openvasd/usr/local/bin/
sudo cp -v ../../target/release/scannerctl $INSTALL_DIR/openvasd/usr/local/bin/
sudo cp -rv $INSTALL_DIR/openvasd/* /
Explanation:
Openvasd source is now found in the paths /rust/src/openvasd
and /rust/src/scannerctl
. This change impacts the assumed current working directory and subsequent location to copy newly built binaries from. The updated sudo cp -v
commands needs ../..
to correctly step back 2 directory levels to copy the new binaries.