[packages/libnfs] - updated to 6.0.2 (new soname)
qboosh
qboosh at pld-linux.org
Fri Jun 6 18:26:55 CEST 2025
commit a9315f3a33b28290199beda04c31d4bad383c6d2
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Jun 6 18:03:48 2025 +0200
- updated to 6.0.2 (new soname)
libnfs-heimdal.patch | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++
libnfs-link.patch | 21 ++++++++++++++
libnfs.spec | 26 +++++++++++++----
3 files changed, 122 insertions(+), 5 deletions(-)
---
diff --git a/libnfs.spec b/libnfs.spec
index 3adfa52..4f8c623 100644
--- a/libnfs.spec
+++ b/libnfs.spec
@@ -1,20 +1,32 @@
+#
+# Conditional build:
+%bcond_with krb5 # MIT Kerberos instead of Heimdal
+
Summary: Client library for accessing NFS shares over network
Summary(pl.UTF-8): Biblioteka kliencka do dostępu do udziałów NFS poprzez sieć
Name: libnfs
-Version: 5.0.3
+Version: 6.0.2
Release: 1
# library code is LGPL, protocol definition files are BSD licensed
License: LGPL v2.1+ and BSD
Group: Libraries
#Source0Download: https://github.com/sahlberg/libnfs/tags
Source0: https://github.com/sahlberg/libnfs/archive/libnfs-%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 27318b6192c960f440415d3284663162
+# Source0-md5: 36efdd459200a2504c84f89786270daf
+Patch0: %{name}-link.patch
+Patch1: %{name}-heimdal.patch
URL: https://github.com/sahlberg/libnfs
-BuildRequires: autoconf >= 2.50
+BuildRequires: autoconf >= 2.60
BuildRequires: automake
-BuildRequires: libtool
+BuildRequires: gnutls-devel
+BuildRequires: libtool >= 2:2
BuildRequires: pkgconfig
BuildRequires: popt-devel
+%if %{with krb5}
+BuildRequires: krb5-devel
+%else
+BuildRequires: heimdal-devel
+%endif
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -77,6 +89,10 @@ użyciu biblioteki libnfs.
%prep
%setup -q -n %{name}-libnfs-%{version}
+%patch -P0 -p1
+%if %{without krb5}
+%patch -P1 -p1
+%endif
%build
%{__libtoolize}
@@ -109,7 +125,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%doc CHANGELOG COPYING LICENCE-BSD.txt README
%attr(755,root,root) %{_libdir}/libnfs.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libnfs.so.14
+%attr(755,root,root) %ghost %{_libdir}/libnfs.so.16
%files devel
%defattr(644,root,root,755)
diff --git a/libnfs-heimdal.patch b/libnfs-heimdal.patch
new file mode 100644
index 0000000..c47b455
--- /dev/null
+++ b/libnfs-heimdal.patch
@@ -0,0 +1,80 @@
+--- libnfs-libnfs-6.0.2/lib/krb5-wrapper.c.orig 2024-12-14 09:03:11.000000000 +0100
++++ libnfs-libnfs-6.0.2/lib/krb5-wrapper.c 2025-06-05 21:57:25.240046026 +0200
+@@ -57,7 +57,7 @@
+ #include <sys/unistd.h>
+ #endif
+
+-#include <krb5/krb5.h>
++#include <krb5.h>
+ #if __APPLE__
+ #include <GSS/GSS.h>
+ #else
+@@ -157,7 +157,6 @@ krb5_auth_init(struct rpc_context *rpc,
+ char *nc_password = NULL;
+ //gss_buffer_desc passwd;
+ gss_OID_set_desc mechOidSet;
+- gss_OID_set_desc wantMech;
+
+ auth_data = calloc(1, sizeof(struct private_auth_data));
+ if (auth_data == NULL) {
+@@ -225,8 +224,9 @@ krb5_auth_init(struct rpc_context *rpc,
+ return NULL;
+ }
+
+- #ifndef __APPLE__ /* gss_set_neg_mechs is not defined on macOS/iOS. */
++ #if !defined(__APPLE__) && 0 /* gss_set_neg_mechs is not defined on macOS/iOS/Heimdal. */
+ if (rpc->sec != RPC_SEC_UNDEFINED) {
++ gss_OID_set_desc wantMech;
+ wantMech.count = 1;
+
+ switch (rpc->sec) {
+--- libnfs-libnfs-6.0.2/configure.ac.orig 2024-12-14 09:03:11.000000000 +0100
++++ libnfs-libnfs-6.0.2/configure.ac 2025-06-05 21:51:28.888643214 +0200
+@@ -43,7 +43,7 @@ AC_ARG_WITH([libkrb5],
+ [AS_HELP_STRING([--without-libkrb5],
+ [Do not link with libkrb5 even if available.])])
+ AS_IF([test "x$with_libkrb5" != "xno"], [
+- MAYBE_LIBKRB5="-lgssapi_krb5"
++ MAYBE_LIBKRB5="-lgssapi"
+ AC_DEFINE([HAVE_LIBKRB5], [1], [Whether we use gssapi_krb5 or not])
+ AC_MSG_NOTICE([Build with gssapi_krb5 support])
+ dnl Check for gssapi/gssapi.h
+--- libnfs-libnfs-6.0.2/include/libnfs-private.h.orig 2024-12-14 09:03:11.000000000 +0100
++++ libnfs-libnfs-6.0.2/include/libnfs-private.h 2025-06-06 06:28:36.997216189 +0200
+@@ -268,7 +268,7 @@ struct tls_context {
+
+ #define INC_STATS(rpc, stat) ++((rpc)->stats.stat)
+
+-struct gss_ctx_id_struct;
++struct gss_ctx_id_t_desc_struct;
+ struct rpc_context {
+ uint32_t magic;
+ int fd;
+@@ -437,7 +437,7 @@ struct rpc_context {
+ char *context;
+
+ void *auth_data; /* for krb5 */
+- struct gss_ctx_id_struct *gss_context;
++ struct gss_ctx_id_t_desc_struct *gss_context;
+ #endif /* HAVE_LIBKRB5 */
+
+ /* Is a server context ? */
+--- libnfs-libnfs-6.0.2/include/nfsc/libnfs-zdr.h.orig 2024-12-14 09:03:11.000000000 +0100
++++ libnfs-libnfs-6.0.2/include/nfsc/libnfs-zdr.h 2025-06-06 06:29:07.237052366 +0200
+@@ -118,14 +118,14 @@ struct opaque_cred {
+ uint32_t oa_length;
+ };
+
+-struct gss_ctx_id_struct;
++struct gss_ctx_id_t_desc_struct;
+ struct opaque_verf {
+ uint32_t oa_flavor;
+ caddr_t oa_base;
+ uint32_t oa_length;
+
+ /* GSS */
+- struct gss_ctx_id_struct *gss_context;
++ struct gss_ctx_id_t_desc_struct *gss_context;
+ };
+ extern struct opaque_verf _null_auth;
+
diff --git a/libnfs-link.patch b/libnfs-link.patch
new file mode 100644
index 0000000..b492166
--- /dev/null
+++ b/libnfs-link.patch
@@ -0,0 +1,21 @@
+--- libnfs-libnfs-6.0.2/lib/Makefile.am.orig 2024-12-14 09:03:11.000000000 +0100
++++ libnfs-libnfs-6.0.2/lib/Makefile.am 2025-06-06 17:29:04.539202035 +0200
+@@ -30,8 +30,7 @@ libnfs_la_SOURCES = \
+ SOCURRENT=16
+ SOREVISION=2
+ SOAGE=0
+-libnfs_la_LDFLAGS = -version-info $(SOCURRENT):$(SOREVISION):$(SOAGE) \
+- $(MAYBE_LIBKRB5)
++libnfs_la_LDFLAGS = -version-info $(SOCURRENT):$(SOREVISION):$(SOAGE)
+ if HAVE_WIN32
+ libnfs_la_LDFLAGS += -no-undefined
+ endif
+@@ -44,6 +43,8 @@ libnfs_la_LIBADD = \
+ ../nsm/libnsm.la \
+ ../portmap/libportmap.la \
+ ../rquota/librquota.la \
++ $(MAYBE_LIBKRB5) \
++ -lgnutls \
+ $(LIBSOCKET)
+
+ if HAVE_TLS
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libnfs.git/commitdiff/a9315f3a33b28290199beda04c31d4bad383c6d2
More information about the pld-cvs-commit
mailing list