diff --git a/package/neon/0001-Revert-Advertise-TS_SSL-feature-with-OpenSSL-1.1.0.patch b/package/neon/0001-Revert-Advertise-TS_SSL-feature-with-OpenSSL-1.1.0.patch new file mode 100644 index 0000000000..02088bfe02 --- /dev/null +++ b/package/neon/0001-Revert-Advertise-TS_SSL-feature-with-OpenSSL-1.1.0.patch @@ -0,0 +1,76 @@ +From 8f9e110b391f065536780d19c2257ad7afd83522 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Mon, 31 Jan 2022 23:42:13 +0100 +Subject: [PATCH] Revert "Advertise TS_SSL feature with OpenSSL >= 1.1.0." + +This reverts commit 281c84fc3996c757efdf6e9b3f906d7a1fc08b1d. + +Indeed openssl can be built on toolchains without threads support which +will result in the following build failure: + +ne_openssl.c:43:10: fatal error: pthread.h: No such file or directory + 43 | #include + | ^~~~~~~~~~~ + +Fixes: + - http://autobuild.buildroot.org/results/da995ef26001357e51a5907de9c6111b9ff89bdf + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/notroj/neon/pull/71] +--- + macros/neon.m4 | 15 ++++----------- + src/ne_openssl.c | 4 ++-- + 2 files changed, 6 insertions(+), 13 deletions(-) + +diff --git a/macros/neon.m4 b/macros/neon.m4 +index 129d4ac..5a5fb1b 100644 +--- a/macros/neon.m4 ++++ b/macros/neon.m4 +@@ -960,13 +960,9 @@ yes|openssl) + AC_CHECK_HEADERS(openssl/ssl.h openssl/opensslv.h,, + [AC_MSG_ERROR([OpenSSL headers not found, cannot enable SSL support])]) + ++ # Enable EGD support if using 0.9.7 or newer + NE_CHECK_OPENSSLVER(ne_cv_lib_ssl097, 0.9.7, 0x00907000L) +- NE_CHECK_OPENSSLVER(ne_cv_lib_ssl110, 1.1.0, 0x10100000L) +- if test "$ne_cv_lib_ssl110" = "yes"; then +- NE_ENABLE_SUPPORT(SSL, [SSL support enabled, using OpenSSL $NE_SSL_VERSION]) +- AC_DEFINE(HAVE_OPENSSL11, 1, [Enable OpenSSL 1.1 support]) +- elif test "$ne_cv_lib_ssl097" = "yes"; then +- # Enable EGD support if using 0.9.7 or newer ++ if test "$ne_cv_lib_ssl097" = "yes"; then + AC_MSG_NOTICE([OpenSSL >= 0.9.7; EGD support not needed in neon]) + NE_ENABLE_SUPPORT(SSL, [SSL support enabled, using OpenSSL $NE_SSL_VERSION]) + NE_CHECK_FUNCS(CRYPTO_set_idptr_callback SSL_SESSION_cmp) +@@ -1074,11 +1070,8 @@ CC/CFLAGS/LIBS must be used to make the POSIX library interfaces + available]),, + enable_threadsafe_ssl=no) + +-case ${enable_threadsafe_ssl}X${ne_cv_lib_ssl110} in +-*Xyes) +- NE_ENABLE_SUPPORT(TS_SSL, [OpenSSL is natively thread-safe]) +- ;; +-posixX*|yesX*) ++case $enable_threadsafe_ssl in ++posix|yes) + ne_pthr_ok=yes + AC_CHECK_FUNCS([pthread_mutex_init pthread_mutex_lock],,[ne_pthr_ok=no]) + if test "${ne_pthr_ok}" = "no"; then +diff --git a/src/ne_openssl.c b/src/ne_openssl.c +index 41a5c05..96c768e 100644 +--- a/src/ne_openssl.c ++++ b/src/ne_openssl.c +@@ -1194,8 +1194,8 @@ char *ne_vstrhash(unsigned int flags, va_list ap) + return ne__strhash2hex(v, vlen, flags); + } + +-#if defined(NE_HAVE_TS_SSL) && OPENSSL_VERSION_NUMBER < 0x10100000L +-/* From OpenSSL 1.1.0 locking callbacks are no longer needed. */ ++#if defined(NE_HAVE_TS_SSL) && OPENSSL_VERSION_NUMBER < 0x10101000L ++/* For OpenSSL 1.1.1 locking callbacks are no longer need at all. */ + #define WITH_OPENSSL_LOCKING (1) + + /* Implementation of locking callbacks to make OpenSSL thread-safe. +-- +2.34.1 + diff --git a/package/neon/0002-configure.ac-fix-autoreconf.patch b/package/neon/0002-configure.ac-fix-autoreconf.patch new file mode 100644 index 0000000000..cd63d1ed41 --- /dev/null +++ b/package/neon/0002-configure.ac-fix-autoreconf.patch @@ -0,0 +1,28 @@ +From cf779609a5dd38f0a8fdb3c4539371f13fd3a24a Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Tue, 8 Feb 2022 18:34:25 +0100 +Subject: [PATCH] configure.ac: fix autoreconf + +Add AC_CONFIG_MACRO_DIR(macros) to fix autoreconf + +Signed-off-by: Fabrice Fontaine +[Upstream status: not sent yet] +--- + configure.ac | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 37b14ec..122151d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1,5 +1,7 @@ + AC_PREREQ(2.58) dnl 2.58 required for AS_HELP_STRING + ++AC_CONFIG_MACRO_DIR(macros) ++ + dnl Extract the version (sans LF) from .version, created at release-time. + m4_define(ne_version, [m4_translit(m4_include(.version), [ + ])]) +-- +2.34.1 + diff --git a/package/neon/neon.mk b/package/neon/neon.mk index 3bbd12561f..eae6bfbad6 100644 --- a/package/neon/neon.mk +++ b/package/neon/neon.mk @@ -10,6 +10,8 @@ NEON_LICENSE = LGPL-2.0+ (library), GPL-2.0+ (manual and tests) NEON_LICENSE_FILES = src/COPYING.LIB test/COPYING README.md NEON_CPE_ID_VENDOR = webdav NEON_INSTALL_STAGING = YES +# We're patching configure.ac +NEON_AUTORECONF = YES NEON_CONF_OPTS = --without-gssapi --disable-rpath NEON_CONFIG_SCRIPTS = neon-config NEON_DEPENDENCIES = host-pkgconf $(TARGET_NLS_DEPENDENCIES)