ajout des recettes pour la compilation de wazuh agent

This commit is contained in:
2023-07-11 07:00:36 +00:00
parent c3ee5866d6
commit faf0597483
20 changed files with 1730 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
DESCRIPTION = "This is some background information about the Linux Auditing Framework"
HOMEPAGE = "https://github.com/linux-audit/audit-userspace"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
SRC_URI = "git://github.com/linux-audit/audit-userspace.git;branch=2.8_maintenance;protocol=https"
SRCREV = "5fae55c1ad15b3cefe6890eba7311af163e9133c"
S = "${WORKDIR}/git"
DEPENDS = "openldap tcp-wrappers coreutils-native python"
RDEPENDS_${PN} += "bash"
EXTRA_OECONF = "--with-python=no \
--with-libwrap \
--enable-gssapi-krb5=yes \
--with-arm --with-aarch64 --with-libcap-ng=yes \
--without-golang --enable-systemd"
inherit autotools
do_install_append() {
install -m 644 ${S}/lib/private.h ${D}${includedir}
install -m 644 ${S}/lib/dso.h ${D}${includedir}
}
FILES_${PN} += "/usr/lib/systemd/system/auditd.service"
FILES_${PN}-dev += "lib/private.h lib/dso.h"

View File

@@ -0,0 +1,51 @@
diff --git a/auparse/interpret.c b/auparse/interpret.c
index 51c4a5e4..337be2dd 100644
--- a/auparse/interpret.c
+++ b/auparse/interpret.c
@@ -44,8 +44,10 @@
#include <linux/ax25.h>
#include <linux/atm.h>
#include <linux/x25.h>
-#include <linux/if.h> // FIXME: remove when ipx.h is fixed
-#include <linux/ipx.h>
+#ifdef HAVE_IPX_HEADERS
+ #include <linux/if.h> // FIXME: remove when ipx.h is fixed
+ #include <linux/ipx.h>
+#endif
#include <linux/capability.h>
#include <sys/personality.h>
#include <sys/prctl.h>
@@ -1151,6 +1153,7 @@ static const char *print_sockaddr(const char *val)
x->sax25_call.ax25_call[6]);
}
break;
+#ifdef HAVE_IPX_HEADERS
case AF_IPX:
{
const struct sockaddr_ipx *ip =
@@ -1160,6 +1163,7 @@ static const char *print_sockaddr(const char *val)
str, ip->sipx_port, ip->sipx_network);
}
break;
+#endif
case AF_ATMPVC:
{
const struct sockaddr_atmpvc* at =
diff --git a/configure.ac b/configure.ac
index 6e345f12..5ff2d78e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -402,6 +402,13 @@ if test x"$LIBWRAP_LIBS" != "x"; then
AC_DEFINE_UNQUOTED(HAVE_LIBWRAP, [], Define if tcp_wrappers support is enabled )
fi
+# linux/ipx.h - deprecated in 2018
+AC_CHECK_HEADER(linux/ipx.h, ipx_headers=yes, ipx_headers=no)
+if test $ipx_headers = yes ; then
+ AC_DEFINE(HAVE_IPX_HEADERS,1,[IPX packet interpretation])
+fi
+
+
# See if we want to support lower capabilities for plugins
LIBCAP_NG_PATH

View File

@@ -0,0 +1,11 @@
--- a/src/ausearch-common.h
+++ b/src/ausearch-common.h
@@ -50,7 +50,7 @@ extern pid_t event_pid;
extern int event_exact_match;
extern uid_t event_uid, event_euid, event_loginuid;
extern const char *event_tuid, *event_teuid, *event_tauid;
-slist *event_node_list;
+extern slist *event_node_list;
extern const char *event_comm;
extern const char *event_filename;
extern const char *event_hostname;

View File

@@ -0,0 +1,21 @@
DESCRIPTION = "Ultralightweight JSON parser in ANSI C"
AUTHOR = "Dave Gamble"
HOMEPAGE = "https://github.com/DaveGamble/cJSON"
SECTION = "libs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=218947f77e8cb8e2fa02918dc41c50d0"
SRC_URI = "git://github.com/DaveGamble/cJSON.git;branch=master;protocol=https"
SRCREV = "d348621ca93571343a56862df7de4ff3bc9b5667"
S = "${WORKDIR}/git"
inherit cmake pkgconfig
EXTRA_OECMAKE += "\
-DENABLE_CJSON_UTILS=On \
-DENABLE_CUSTOM_COMPILER_FLAGS=OFF \
-DBUILD_SHARED_AND_STATIC_LIBS=On \
"
BBCLASSEXTEND = "native nativesdk"

View File

@@ -0,0 +1,29 @@
SUMMARY = "JSON for modern C++"
HOMEPAGE = "https://nlohmann.github.io/json/"
SECTION = "libs"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.MIT;md5=f5f7c71504da070bcf4f090205ce1080"
SRC_URI = "git://github.com/nlohmann/json.git;protocol=https;branch=develop"
PV = "3.7.3+git${SRCPV}"
SRCREV = "e7b3b40b5a95bc74b9a7f662830a27c49ffc01b4"
S = "${WORKDIR}/git"
inherit cmake
EXTRA_OECMAKE += "-DJSON_BuildTests=OFF"
# nlohmann-json is a header only C++ library, so the main package will be empty.
RDEPENDS_${PN}-dev = ""
BBCLASSEXTEND = "native nativesdk"
# other packages commonly reference the file directly as "json.hpp"
# create symlink to allow this usage
do_install_append() {
ln -s nlohmann/json.hpp ${D}${includedir}/json.hpp
}