gnunet: update to 0.27.0

Changes since 0.25.1:

0.27.0:
 * util: Removed GNUNET_CRYPTO_symmetric_derive_iv API
 * util: Deprecate GNUNET_CRYPTO_symmetric_* APIs
 * util: Revise GNUNET_CRYPTO_hkdf_* APIs for safe variadic
   arguments. Fixes #10898

0.26.x:
 * util: Revise crypto API to prevent misuse of key material
 * util: Add various TIME related helper APIs
 * pils: Ship missing header
 * pq: fix NULL reporting in arrays
 * pq: fix consistency check errors
 * util: fix UTF-8 uppercase/lowercase conversion API insanity

0.25.2:
 * build: Various build system and detection logic improvements
 * reintroduce some flat file storages

Drop patches that have been merged upstream:
 - 0001-meson-convert-SQLite-version-detection-to-compile-time
 - 0002-meson-convert-cURL-version-detection-to-compile-time
 - 0003-meson-convert-libsodium-version-detection-to-compile
 - 0004-meson-convert-cURL-SSL-library-detection-to-compile
 - 0007-namecache-install-sql-files
 - 0008-namecache-build-flat-namecache-plugin

Refresh 0005-meson-detect-libcurl-gnutls.patch for the upstream
switch from cc.compiles to cc.run for the cURL SSL backend check.

Link: https://git.gnunet.org/gnunet.git/tree/NEWS?h=v0.27.0
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle
2026-05-08 18:16:43 +01:00
parent 90b98c14fd
commit 9667c7473d
8 changed files with 14 additions and 219 deletions
+3 -3
View File
@@ -2,11 +2,11 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=gnunet
PKG_VERSION:=0.25.1
PKG_RELEASE:=2
PKG_VERSION:=0.27.0
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@GNU/gnunet
PKG_HASH:=21336c16cd57f91f9d5fd5359482d9151a7cdf0d6396f8b61828c17ccc668f5c
PKG_HASH:=9dd8feb3f3b8d0993766a49ab618f80bb93017f3bc795b6dda84697397302a07
PKG_LICENSE:=AGPL-3.0
PKG_LICENSE_FILES:=COPYING
@@ -1,35 +0,0 @@
From 05ec421a2f72f4fd63702959d677e9a7ac538d80 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Fri, 10 Oct 2025 00:44:56 +0100
Subject: [PATCH 1/8] meson: convert SQLite version detection to compile-time
test
Use compile-time test instead of relying on testing the SQLite version
at runtime. This is done to make cross-compilation possible again.
---
meson.build | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--- a/meson.build
+++ b/meson.build
@@ -175,14 +175,17 @@ if not sqlite_dep.found()
sqlite_dep = cc.find_library('sqlite3', required: true)
sqlite_version_check = '''#include <sqlite3.h>
int main(int argc, char **argv) {
- return (SQLITE_VERSION_NUMBER >= 3035000) ? 0 : 1;
+ #if SQLITE_VERSION_NUMBER < 3035000
+ #error "SQLite version >= 3.35.0 required"
+ #endif
+ return 0;
}
'''
- if cc.run(
+ if not cc.compiles(
sqlite_version_check,
name: 'sqlite version check',
dependencies: sqlite_dep,
- ).returncode() != 0
+ )
error('Sqlite version >= 3.35.0 requried')
endif
endif
@@ -1,35 +0,0 @@
From 473009abbdbc1dbee86a049ef55955da56952cc8 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Fri, 10 Oct 2025 00:50:32 +0100
Subject: [PATCH 2/8] meson: convert cURL version detection to compile-time
test
Use compile-time test instead of relying on testing the cURL version
at runtime. This is done to make cross-compilation possible again.
---
meson.build | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--- a/meson.build
+++ b/meson.build
@@ -194,14 +194,17 @@ if not curl_dep.found()
curl_dep = cc.find_library('curl', required: true)
curl_version_check = '''#include <curl/curl.h>
int main(int argc, char **argv) {
- return (LIBCURL_VERSION_NUM >= 0x075500) ? 0 : 1;
+ #if LIBCURL_VERSION_NUM < 0x075500
+ #error "cURL version >= 7.85.0 required"
+ #endif
+ return 0;
}
'''
- if cc.run(
+ if not cc.compiles(
curl_version_check,
name: 'cURL version check',
dependencies: curl_dep,
- ).returncode() != 0
+ )
error('cURL version >=7.85.0 required')
endif
endif
@@ -1,39 +0,0 @@
From 8ed32eb1d705ee1838ac1da81ca8f1f821493c94 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Fri, 10 Oct 2025 00:53:51 +0100
Subject: [PATCH 3/8] meson: convert libsodium version detection to
compile-time test
Use compile-time test instead of relying on testing the libsodium version
at runtime. This is done to make cross-compilation possible again.
---
meson.build | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
--- a/meson.build
+++ b/meson.build
@@ -244,16 +244,19 @@ if not sodium_dep.found()
sodium_dep = cc.find_library('sodium', required: true)
sodium_version_check = '''#include <sodium.h>
int main(int argc, char **argv) {
- return ((SODIUM_LIBRARY_VERSION_MAJOR > 10) ||
- ((SODIUM_LIBRARY_VERSION_MAJOR == 10) &&
- (SODIUM_LIBRARY_VERSION_MINOR >= 3))) ? 0 : 1;
+ #if !((SODIUM_LIBRARY_VERSION_MAJOR > 10) || \
+ ((SODIUM_LIBRARY_VERSION_MAJOR == 10) && \
+ (SODIUM_LIBRARY_VERSION_MINOR >= 3)))
+ #error "libsodium version >= 1.0.18 required"
+ #endif
+ return 0
}
'''
- if cc.run(
+ if not cc.compiles(
sodium_version_check,
name: 'sodium version check',
dependencies: sodium_dep,
- ).returncode() != 0
+ )
error('libsodium version >=1.0.18 required')
endif
endif
@@ -1,41 +0,0 @@
From 642fa9ac91c8c1d1cac835550fe5421358e048c1 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Fri, 10 Oct 2025 00:55:57 +0100
Subject: [PATCH 4/8] meson: convert cURL SSL library detection to compile-time
test
Use compile-time test instead of relying on testing the cURL SSL library
at runtime. This is done to make cross-compilation possible again.
---
meson.build | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
--- a/meson.build
+++ b/meson.build
@@ -477,17 +477,23 @@ if cc.check_header('gnutls/dane.h')
endif
curl_ssl_check = '''#include <curl/curl.h>
int main(int argc, char **argv) {
- return (CURLSSLSET_OK != curl_global_sslset(CURLSSLBACKEND_GNUTLS, NULL, NULL));
+ #ifndef CURLSSLSET_OK
+ #error "cURL SSL backend configuration not supported"
+ #endif
+ #ifndef CURLSSLBACKEND_GNUTLS
+ #error "cURL GnuTLS backend not available"
+ #endif
+ return 0;
}
'''
-result = cc.run(
+curl_gnutls_available = cc.compiles(
curl_ssl_check,
name: 'cURL gnutls check',
dependencies: curl_dep,
)
private_config.set('curl_gnutls', 0)
-if result.returncode() == 0
+if curl_gnutls_available
private_config.set('curl_gnutls', 1)
endif
@@ -11,7 +11,7 @@ there is a dedicated libcurl-gnutls library and favor using it.
--- a/meson.build
+++ b/meson.build
@@ -189,10 +189,17 @@ if not sqlite_dep.found()
@@ -194,10 +194,17 @@ if not sqlite_dep.found()
error('Sqlite version >= 3.35.0 requried')
endif
endif
@@ -33,7 +33,7 @@ there is a dedicated libcurl-gnutls library and favor using it.
int main(int argc, char **argv) {
#if LIBCURL_VERSION_NUM < 0x075500
#error "cURL version >= 7.85.0 required"
@@ -200,12 +207,34 @@ if not curl_dep.found()
@@ -205,12 +212,34 @@ if not curl_dep.found()
return 0;
}
'''
@@ -74,11 +74,11 @@ there is a dedicated libcurl-gnutls library and favor using it.
endif
endif
zlib_dep = dependency('zlib', required: false)
@@ -487,11 +516,19 @@ curl_ssl_check = '''#include <curl/curl.
@@ -489,13 +518,22 @@ curl_ssl_check = '''#include <curl/curl.
}
'''
-curl_gnutls_available = cc.compiles(
-result = cc.run(
- curl_ssl_check,
- name: 'cURL gnutls check',
- dependencies: curl_dep,
@@ -88,14 +88,18 @@ there is a dedicated libcurl-gnutls library and favor using it.
+if curl_is_gnutls
+ curl_gnutls_available = true
+else
+ # Fall back to compile-time check for regular libcurl with gnutls support
+ curl_gnutls_available = cc.compiles(
+ # Fall back to runtime check for regular libcurl with gnutls support
+ result = cc.run(
+ curl_ssl_check,
+ name: 'cURL gnutls check',
+ dependencies: curl_dep,
+ )
+ curl_gnutls_available = result.returncode() == 0
+endif
+
private_config.set('curl_gnutls', 0)
if curl_gnutls_available
-if result.returncode() == 0
+if curl_gnutls_available
private_config.set('curl_gnutls', 1)
endif
@@ -1,31 +0,0 @@
From 94aa64ed0363e8c62f126cfe42843468cc775132 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Fri, 10 Oct 2025 01:33:41 +0100
Subject: [PATCH 7/8] namecache: install sql files
---
src/plugin/namecache/meson.build | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
--- a/src/plugin/namecache/meson.build
+++ b/src/plugin/namecache/meson.build
@@ -1,3 +1,19 @@
+configure_file(
+ input: 'namecache-0001.sql',
+ output: 'namecache-0001.sql',
+ configuration: cdata,
+ install: true,
+ install_dir: get_option('datadir') / 'gnunet' / 'sql',
+)
+
+configure_file(
+ input: 'namecache-drop.sql',
+ output: 'namecache-drop.sql',
+ configuration: cdata,
+ install: true,
+ install_dir: get_option('datadir') / 'gnunet' / 'sql',
+)
+
shared_module(
'gnunet_plugin_namecache_sqlite',
['plugin_namecache_sqlite.c'],
@@ -1,28 +0,0 @@
From 87de1cfe4d7f306d25ed12505f188203874dd9b6 Mon Sep 17 00:00:00 2001
From: Daniel Golle <daniel@makrotopia.org>
Date: Fri, 10 Oct 2025 01:34:17 +0100
Subject: [PATCH 8/8] namecache: build flat namecache plugin
---
src/plugin/namecache/meson.build | 10 ++++++++++
1 file changed, 10 insertions(+)
--- a/src/plugin/namecache/meson.build
+++ b/src/plugin/namecache/meson.build
@@ -29,6 +29,16 @@ shared_module(
install_dir: get_option('libdir') / 'gnunet',
)
+shared_module(
+ 'gnunet_plugin_namecache_flat',
+ ['plugin_namecache_flat.c'],
+ install_rpath: rpath_option,
+ dependencies: [libgnunetutil_dep, libgnunetgnsrecord_dep],
+ include_directories: [incdir, configuration_inc],
+ install: true,
+ install_dir: get_option('libdir') / 'gnunet',
+)
+
if pq_dep.found()
shared_module(
'gnunet_plugin_namecache_postgres',