I am running into issues from yesterday when I build GVM using 21.04. Specifically, I am running into installation issues in gvm-libs. I have not changed my script and it worked before. I believe the PATHing was changed and I need to update it to get a newly built GVM up and running. Here is the error that I see:
function install_gvm_libs() {
set -e
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
cd ~/src/gvm-libs
mkdir -p build
cd build
rm -rf *
cmake -DCMAKE_INSTALL_PREFIX="$GVM_INSTALL_PREFIX" ..
make -j
make doc
make install
}
Could I be told as to what PATHs were recently changed in GVM? Would appreciate any help!
When I put the pathing for my installation, I still receive errors of Permission denied such as -DGVM_PID_DIR="$GVM_INSTALL_PREFIX". Am I not doing something right when the recent change occurred? Thanks.
Same problem here also. It seems GVM_INSTALL_PREFIX variable is completely ignored at compile time. Before that patch, the variable was successfully used by cmake, and the installation root dir was changed accordingly. With the new patch, it looks like cmake is overriding this variable to the new defaults in this patch.
Looking at the patch itself; this is expected to happens when the variables SYSCONFDIR,LOCALSTATEDIR, GVM_RUN_DIR and GVM_PID_DIR are unset.
If unset, they are by default set to the new defaults but without the GVM_INSTALL_PREFIX path first.
This looks aberrant to me. Unless there is a reason I’m not seeing ?
So only way to get around this is to manually set SYSCONFDIR,LOCALSTATEDIR, GVM_RUN_DIR and GVM_PID_DIR to whatever your install path is.
I’ve explained the reason behind this change in the gvm-libs PR too.
We just switched the default installation for state and config files. For a normal system wide user installation the old way of including the prefix in all paths just doesn’t make sense. It is only useful for a developer setup. For example the /run dir is very special with systemd and using PREFIX/run will not give you the same behavior of the system.
For a usage guide you can take a look at our GSM manual. Most things from the chapter https://docs.greenbone.net/GSM-Manual/gos-21.04/en/web-interface.html should be valid for the open source version too (our product has only very little changes regarding the web interface and scanning).
creating a cronjob creating the gvm folder so the .lock file can be placed is a easy work around:
here’s the cronjob: @reboot mkdir /var/run/gvm && chown gvm:gvm /var/run/gvm
this should help with scans getting interrupted after getting queued, and permission issues relating to the gvm folder