3bfa0c383e
- wazuh-indexer and wazuh-dashboards now use 2.9.0 version of opensearch and opensearch-dashboard - Revert beats dependency to beats7 (filebeat) at security/wazuh-server. beats8 has some issues with filebeat (Take a look at PR/272701)
100 lines
5 KiB
Text
100 lines
5 KiB
Text
--- src/Makefile 2023-08-04 05:19:33.000000000 -0500
|
|
+++ src/Makefile 2023-08-11 02:02:09.552633000 -0500
|
|
@@ -39,9 +39,11 @@
|
|
|
|
HAS_CHECKMODULE = $(shell command -v checkmodule > /dev/null && echo YES)
|
|
HAS_SEMODULE_PACKAGE = $(shell command -v semodule_package > /dev/null && echo YES)
|
|
+ifeq (${uname_S},Linux)
|
|
CHECK_ARCHLINUX := $(shell sh -c 'grep "Arch Linux" /etc/os-release > /dev/null && echo YES || echo not')
|
|
CHECK_CENTOS5 := $(shell sh -c 'grep "CentOS release 5." /etc/redhat-release 2>&1 > /dev/null && echo YES || echo not')
|
|
CHECK_ALPINE := $(shell sh -c 'grep "Alpine Linux" /etc/os-release 2>&1 > /dev/null && echo YES || echo not')
|
|
+endif
|
|
|
|
ARCH_FLAGS =
|
|
|
|
@@ -240,10 +242,10 @@
|
|
ifeq (${uname_S},FreeBSD)
|
|
DEFINES+=-DFreeBSD
|
|
OSSEC_CFLAGS+=-pthread -I/usr/local/include
|
|
- OSSEC_LDFLAGS+=-pthread
|
|
+ OSSEC_LDFLAGS+=-pthread -lnghttp2
|
|
OSSEC_LDFLAGS+=-L/usr/local/lib
|
|
OSSEC_LDFLAGS+='-Wl,-rpath,$$ORIGIN/../lib'
|
|
- AR_LDFLAGS+=-pthread
|
|
+ AR_LDFLAGS+=-pthread -lnghttp2
|
|
AR_LDFLAGS+=-L/usr/local/lib
|
|
AR_LDFLAGS+='-Wl,-rpath,$$ORIGIN/../../lib'
|
|
PRECOMPILED_OS:=freebsd
|
|
@@ -855,6 +857,8 @@
|
|
EXTERNAL_LIBS += $(LIBCURL_LIB)
|
|
else ifeq (${uname_S},Linux)
|
|
EXTERNAL_LIBS += $(LIBCURL_LIB)
|
|
+else ifeq (${uname_S},FreeBSD)
|
|
+ EXTERNAL_LIBS += $(LIBCURL_LIB)
|
|
else ifeq (${uname_S},Darwin)
|
|
EXTERNAL_LIBS += $(LIBCURL_LIB)
|
|
endif
|
|
@@ -1036,10 +1040,14 @@
|
|
ifeq (${uname_S},Linux)
|
|
cd $(EXTERNAL_CURL) && CPPFLAGS="-fPIC -I${ROUTE_PATH}/${EXTERNAL_OPENSSL}include" LDFLAGS="-L${ROUTE_PATH}/${EXTERNAL_OPENSSL}" LIBS="-ldl -lpthread" ./configure --disable-ldap --without-libidn2 --without-libpsl --without-brotli
|
|
else
|
|
+ifeq (${uname_S},FreeBSD)
|
|
+ cd $(EXTERNAL_CURL) && CPPFLAGS="-fPIC -I${ROUTE_PATH}/${EXTERNAL_OPENSSL}include" LDFLAGS="-L${ROUTE_PATH}/${EXTERNAL_OPENSSL}" LIBS="-pthread" ./configure --with-ssl="${ROUTE_PATH}/${EXTERNAL_OPENSSL}" --disable-ldap --without-libidn2 --without-brotli --without-nghttp2 --without-librtmp
|
|
+else
|
|
cd $(EXTERNAL_CURL) && CPPFLAGS="-fPIC -I${ROUTE_PATH}/${EXTERNAL_OPENSSL}include" LDFLAGS="-L${ROUTE_PATH}/${EXTERNAL_OPENSSL}" LIBS="-lpthread" ./configure --disable-ldap --without-libidn2
|
|
endif
|
|
endif
|
|
endif
|
|
+endif
|
|
|
|
|
|
#### procps #########
|
|
@@ -2224,14 +2232,37 @@
|
|
mkdir -p ${WPYTHON_DIR}
|
|
cp external/${WPYTHON_TAR} ${WPYTHON_DIR}/${WPYTHON_TAR} && ${TAR} ${WPYTHON_DIR}/${WPYTHON_TAR} -C ${WPYTHON_DIR} && rm -rf ${WPYTHON_DIR}/${WPYTHON_TAR}
|
|
endif
|
|
+ifeq (${uname_S},FreeBSD)
|
|
+ mkdir -p $(STAGEDIR)${INSTALLDIR}/lib
|
|
+ find $(STAGEDIR)${WPYTHON_DIR} -name "*${WLIBPYTHON}" -exec ln -f {} $(STAGEDIR)${INSTALLDIR}/lib/${WLIBPYTHON} \;
|
|
+else
|
|
find ${WPYTHON_DIR} -name "*${WLIBPYTHON}" -exec ln -f {} ${INSTALLDIR}/lib/${WLIBPYTHON} \;
|
|
+endif
|
|
|
|
python_dependencies := requirements.txt
|
|
|
|
+ifeq (${uname_S},FreeBSD)
|
|
+install_dependencies:
|
|
+ifneq (,$(wildcard ${EXTERNAL_CPYTHON}))
|
|
+ $(STAGEDIR)${WPYTHON_DIR}/bin/python3 -B -m pip install --upgrade pip --prefix=${WPYTHON_DIR} --root=$(STAGEDIR) --no-index --find-links=wazuh-cache/ --cache-dir=wazuh-cache/ --no-compile
|
|
+ LD_LIBRARY_PATH="$(STAGEDIR)${INSTALLDIR}/lib" LDFLAGS="-L$(STAGEDIR)${INSTALLDIR}/lib" $(STAGEDIR)${WPYTHON_DIR}/bin/python3 -m pip install wazuh-cache-any/*.whl --root=$(STAGEDIR) --prefix=${WPYTHON_DIR} --no-deps --no-compile
|
|
+ LD_LIBRARY_PATH="$(STAGEDIR)${INSTALLDIR}/lib" LDFLAGS="-L$(STAGEDIR)${INSTALLDIR}/lib" $(STAGEDIR)${WPYTHON_DIR}/bin/python3 -m pip install wazuh-cache-${uname_M}/*.whl --root=$(STAGEDIR) --prefix=${WPYTHON_DIR} --no-deps --no-compile
|
|
+endif
|
|
+
|
|
+install_framework:
|
|
+ cd ../framework && $(STAGEDIR)${WPYTHON_DIR}/bin/python3 -B setup.py clean --all install --prefix=${WPYTHON_DIR} --root=$(STAGEDIR) --wazuh-version=$(shell cat VERSION) --install-type=${TARGET} --no-compile
|
|
+ chmod -R o=- $(STAGEDIR)${WPYTHON_DIR}
|
|
+
|
|
+install_api:
|
|
+ cd ../api && $(STAGEDIR)${WPYTHON_DIR}/bin/python3 -B setup.py clean --all install --prefix=${WPYTHON_DIR} --root=$(STAGEDIR) --no-compile
|
|
+
|
|
+install_mitre:
|
|
+ cd ../tools/mitre && $(STAGEDIR)${WPYTHON_DIR}/bin/python3 mitredb.py -d $(STAGEDIR)${INSTALLDIR}/var/db/mitre.db
|
|
+else
|
|
install_dependencies: install_python
|
|
ifneq (,$(wildcard ${EXTERNAL_CPYTHON}))
|
|
- ${WPYTHON_DIR}/bin/python3 -m pip install --upgrade pip --index-url=file://${ROUTE_PATH}/${EXTERNAL_CPYTHON}/Dependencies/simple
|
|
- LD_LIBRARY_PATH="${INSTALLDIR}/lib" LDFLAGS="-L${INSTALLDIR}/lib" ${WPYTHON_DIR}/bin/pip3 install -r ../framework/${python_dependencies} --index-url=file://${ROUTE_PATH}/${EXTERNAL_CPYTHON}/Dependencies/simple
|
|
+ ${WPYTHON_DIR}/bin/python3 -m pip install --upgrade pip --index-url=file://${ROUTE_PATH}/${EXTERNAL_CPYTHON}/Dependencies/simple
|
|
+ LD_LIBRARY_PATH="${INSTALLDIR}/lib" LDFLAGS="-L${INSTALLDIR}/lib" ${WPYTHON_DIR}/bin/pip3 install -r ../framework/${python_dependencies} --index-url=file://${ROUTE_PATH}/${EXTERNAL
|
|
endif
|
|
|
|
install_framework: install_python
|
|
@@ -2244,7 +2275,7 @@
|
|
|
|
install_mitre: install_python
|
|
cd ../tools/mitre && ${WPYTHON_DIR}/bin/python3 mitredb.py -d ${INSTALLDIR}/var/db/mitre.db
|
|
-
|
|
+endif
|
|
|
|
####################
|
|
#### test ##########
|