This is a initial try to port Wazuh agent to OpenBSD. It needs testing because it could not work correctly yet. I hope it helps another users or developers interested on test wazuh on OpenBSD.
Install wazuh-agent dependencies from packages
pkg_add cmake gmake libinotify sqlite3 nghttp2Extract ports tree to /usr directory
cd /usr/ports && ftp https://cdn.openbsd.org/pub/OpenBSD/snapshots/ports.tar.gzcd /usr/ports && tar xvfz ports.tar.gz && rm ports.tar.gzCopy wazuh-agent directory to /usr/ports/security
cd ~/ && ftp https://github.com/alonsobsd/wazuh-agent-openbsd/archive/refs/heads/main.tar.gzcd ~/ && tar main.tar.gz && cp -rf ~/wazuh-agent-openbsd/wazuh-agent /usr/ports/security/Edit user.list from ports tree
vi /usr/ports/infrastructure/db/user.listAdd the following entry to end of file
900 _wazuh _wazuh security/wazuh-agentIf an entry with id 900 exists, use other number (901, 902, etc). Don't forget change the user id into /usr/ports/security/wazuh-agent/pkg/PLIST
@newgroup _wazuh:900
@newuser _wazuh:900:_wazuh::Wazuh Owner:/var/ossec:/sbin/nologinFinally, add inotify library path to shared library cache
vi /etc/rc.conf.localshlib_dirs="/usr/local/lib/inotify"cd /usr/ports/security/wazuh-agent && make install cleanIf you want change default ports paths to test it from another ports directory, you can set the following:
vi /etc/mk.confPORTSDIR=/home/user/ports
WRKOBJDIR=/home/user/ports/obj/ports
DISTDIR=/home/user/ports/distfiles
PACKAGE_REPOSITORY=/home/user/ports/packagesWazuh agent version: 4.10.1
