diff --git a/package/libnfs/0004-move-link-against-gnutls-into-main-library-as-it-is-.patch b/package/libnfs/0004-move-link-against-gnutls-into-main-library-as-it-is-.patch new file mode 100644 index 0000000000..b61f162670 --- /dev/null +++ b/package/libnfs/0004-move-link-against-gnutls-into-main-library-as-it-is-.patch @@ -0,0 +1,26 @@ +From f054ce197a286fdd2fcb33ec1d9c236c5976adfb Mon Sep 17 00:00:00 2001 +From: fundawang +Date: Sun, 26 Jan 2025 16:39:03 +0800 +Subject: [PATCH] move link against gnutls into main library, as it is + referenced by tls/libtls.la + +Upstream: d205297a10bf8d7f8846bf42f0ed618543a561a9 +Signed-off-by: Thomas Petazzoni +--- + lib/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/Makefile.am b/lib/Makefile.am +index 82376cb..33be5e4 100644 +--- a/lib/Makefile.am ++++ b/lib/Makefile.am +@@ -48,5 +48,5 @@ libnfs_la_LIBADD = \ + + if HAVE_TLS + libnfs_la_CPPFLAGS += -I$(abs_top_srcdir)/tls +-libnfs_la_LIBADD += ../tls/libtls.la ++libnfs_la_LIBADD += ../tls/libtls.la -lgnutls + endif +-- +2.55.0 + diff --git a/package/libnfs/0005-move-link-against-gnutls-into-main-library-as-it-is-.patch b/package/libnfs/0005-move-link-against-gnutls-into-main-library-as-it-is-.patch new file mode 100644 index 0000000000..b4446115d4 --- /dev/null +++ b/package/libnfs/0005-move-link-against-gnutls-into-main-library-as-it-is-.patch @@ -0,0 +1,29 @@ +From 74437cb4e9d47daeeb3f851c5b14eb0d207ceb17 Mon Sep 17 00:00:00 2001 +From: fundawang +Date: Sun, 26 Jan 2025 16:39:59 +0800 +Subject: [PATCH] move link against gnutls into main library, as it is + referenced by tls/libtls.la + +Upstream: 546c9ed8624403078ef993138b56dce4c3558523 +Signed-off-by: Thomas Petazzoni +--- + utils/Makefile.am | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/utils/Makefile.am b/utils/Makefile.am +index bd584b8..2ae7636 100644 +--- a/utils/Makefile.am ++++ b/utils/Makefile.am +@@ -16,9 +16,6 @@ AM_CPPFLAGS = \ + "-D_U_=__attribute__((unused))" + + COMMON_LIBS = ../lib/libnfs.la $(LIBSOCKET) +-if HAVE_TLS +-COMMON_LIBS += -lgnutls +-endif + + nfs_cat_LDADD = $(COMMON_LIBS) + nfs_ls_LDADD = $(COMMON_LIBS) +-- +2.55.0 + diff --git a/package/libnfs/0006-autotools-fix-undefined-reference-if-libnfs-was-buil.patch b/package/libnfs/0006-autotools-fix-undefined-reference-if-libnfs-was-buil.patch new file mode 100644 index 0000000000..e8080a60b8 --- /dev/null +++ b/package/libnfs/0006-autotools-fix-undefined-reference-if-libnfs-was-buil.patch @@ -0,0 +1,41 @@ +From 8c6bf2f173fdca0a954ed206b3a386e33b5de47b Mon Sep 17 00:00:00 2001 +From: Andreas Ziegler <15275159+aeolio@users.noreply.github.com> +Date: Sun, 28 Jun 2026 06:20:48 +0000 +Subject: [PATCH] autotools: fix 'undefined reference' if libnfs was built with + gnutls support (#587) + +Signed-off-by: Andreas Ziegler <15275159+aeolio@users.noreply.github.com> +Upstream: a3e86449217fe5429c38e2b06c4f7e6b3cd3be32 +Signed-off-by: Thomas Petazzoni +--- + configure.ac | 2 ++ + libnfs.pc.in | 2 +- + 2 files changed, 3 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index a012004..6e5100f 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -284,6 +284,8 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + [[const char *v = GNUTLS_VERSION;]])],[libnfs_cv_HAVE_TLS=yes],[libnfs_cv_HAVE_TLS=no])]) + if test x"$libnfs_cv_HAVE_TLS" = x"yes"; then + AC_DEFINE(HAVE_TLS,1,[Whether we have linux tls support]) ++ # tell pkg-config that gnutls needs to be linked also ++ AC_SUBST(tls_library,"-lgnutls") + fi + AM_CONDITIONAL([HAVE_TLS], [test $libnfs_cv_HAVE_TLS = yes]) + +diff --git a/libnfs.pc.in b/libnfs.pc.in +index fdc012c..42be7b2 100644 +--- a/libnfs.pc.in ++++ b/libnfs.pc.in +@@ -10,5 +10,5 @@ Description: libnfs is a client library for accessing NFS shares over a network. + Version: @VERSION@ + Requires: + Conflicts: +-Libs: -L${libdir} -lnfs ++Libs: -L${libdir} -lnfs @tls_library@ + Cflags: -I${includedir} +-- +2.55.0 +