[meta-security][PATCH 01/15] aide: Fix compilation with nettle 4.x

Scott Murray <[email protected]>
Newsgroups org.yoctoproject.lists.yocto-patches
Message-ID <c4c37c0074b7edf99adbce02c250b6140a6e71f0.1787777775.git.scott.murray@konsulko.com>
Backport unreleased change from upstream to handle building with nettle
4.x now that openembedded-core has upgraded to it.

Signed-off-by: Scott Murray <[email protected]>
---
 .../0002-Support-build-with-nettle-4.patch    | 53 +++++++++++++++++++
 recipes-ids/aide/aide_0.19.3.bb               |  1 +
 2 files changed, 54 insertions(+)
 create mode 100644 recipes-ids/aide/aide/0002-Support-build-with-nettle-4.patch

diff --git a/recipes-ids/aide/aide/0002-Support-build-with-nettle-4.patch b/recipes-ids/aide/aide/0002-Support-build-with-nettle-4.patch
new file mode 100644
index 0000000..d9c6fad
--- /dev/null
+++ b/recipes-ids/aide/aide/0002-Support-build-with-nettle-4.patch
@@ -0,0 +1,53 @@
+From 84936cec8ddb7151327563800d752d1d20e39224 Mon Sep 17 00:00:00 2001
+From: Hannes von Haugwitz <[email protected]>
+Date: Tue, 26 May 2026 21:41:52 +0200
+Subject: [PATCH] Support build with nettle 4
+
+* closes: #218
+
+Upstream-Status: Backport [https://github.com/aide/aide/commit/61130addb02a58d7de95d6b8f344ab9b6151d6aa]
+Signed-off-by: Scott Murray <[email protected]>
+---
+ ChangeLog | 3 +++
+ src/md.c  | 6 ++++++
+ 2 files changed, 9 insertions(+)
+
+diff --git a/ChangeLog b/ChangeLog
+index 89905e3..5b3963e 100644
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,6 @@
++2026-05-26 Hannes von Haugwitz <[email protected]>
++	* Support build with nettle 4 (closes: #218)
++
+ 2026-01-31 Hannes von Haugwitz <[email protected]>
+ 	* Release aide 0.19.3
+ 
+diff --git a/src/md.c b/src/md.c
+index e4e66ad..1aec9d9 100644
+--- a/src/md.c
++++ b/src/md.c
+@@ -47,6 +47,8 @@
+ #include <nettle/gosthash94.h>
+ #include <nettle/streebog.h>
+ 
++#include <nettle/version.h>
++
+ typedef struct {
+   nettle_hash_init_func *init;
+   nettle_hash_update_func *update;
+@@ -166,7 +168,11 @@ int close_md(struct md_container* md, md_hashsums * hs, const char *filename, co
+         for (HASHSUM i = 0 ; i < num_hashes ; ++i) {
+             DB_ATTR_TYPE h = ATTR(hashsums[i].attribute);
+             if (h&md->calc_attr) {
++#if NETTLE_VERSION_MAJOR < 4
+                 nettle_functions[i].digest(&md->ctx[i].md5, hashsums[i].length, hs->hashsums[i]);
++#else
++                nettle_functions[i].digest(&md->ctx[i].md5, hs->hashsums[i]);
++#endif
+             }
+         }
+ #endif
+-- 
+2.47.3
+
diff --git a/recipes-ids/aide/aide_0.19.3.bb b/recipes-ids/aide/aide_0.19.3.bb
index 68e3bfa..8d4efbb 100644
--- a/recipes-ids/aide/aide_0.19.3.bb
+++ b/recipes-ids/aide/aide_0.19.3.bb
@@ -7,6 +7,7 @@ DEPENDS = "bison-native libpcre2"
 
 SRC_URI = "https://github.com/aide/aide/releases/download/v${PV}/${BPN}-${PV}.tar.gz \
            file://0001-Fixes-build-issues.patch \
+           file://0002-Support-build-with-nettle-4.patch \
            file://aide.conf \
 "
 
-- 
2.55.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.