Package: release.debian.org
Severity: normal
Tags: bookworm
X-Debbugs-Cc: nfs-ut...@packages.debian.org, Anton Lundin <gla...@ac2.se>, Sam 
Hartman <hartm...@debian.org>, car...@debian.org, debian-ker...@lists.debian.org
Control: affects -1 + src:nfs-utils
User: release.debian....@packages.debian.org
Usertags: pu

Dear stable release managers,

[ Reason ]
This update fixes a regression with NFSv4 referrals not working in
Debian bookworm. The issue does not affect unstable, as there we
switched to compile with --enable-junction=yes, adding an additonal
dependency on libxml2. This solution is not applicable for bookworm to
avoid introducing the dependency.

The issue boils down that NFSv4 referrals without enabling junction
support were broken upstream in upstream commit 15dc0bead10d
("exportd: Moved cache upcalls routines  into libexport.a"), so
nfs-utils-2-5-3-rc6 which means that the regression affects people
using NFSv4 referrals in bullseye and moving to bookworm.

Upstream has recently fixed the issue for the case where nfs-utils is
still compiled with --enable-junction=no (which btw, is the default in
the version on bookworm).

Details:
https://lore.kernel.org/linux-nfs/zv7nrnxeutzpf...@eldamar.lan/T/#u
https://bugs.debian.org/1035908
https://bugs.debian.org/1083098

[ Impact ]
Using NFSv4 refferals in Debian bookworm is actually not possible.

[ Tests ]
Tests by upstream when preparing the patch and additionally confirmed
by Anton in https://bugs.debian.org/1035908#52

[ Risks ]
The change is very targeted to fix the issue so I do not expect real
fallouts from it. The risk would probably be higher compiling
nfs-utils in bookworm with junction support and needing to add the
libxml2 dependency. This is the encouraged way upstream but for the
nwer versions targetting trixie we will have that.

[ Checklist ]
  [x] *all* changes are documented in the d/changelog
  [x] I reviewed all changes and I approve them
  [x] attach debdiff against the package in (old)stable
  [x] the issue is verified as fixed in unstable

For the later checkpoint: technically it is not an issue there since
enablement of junction support. The change is in any case as well
included upstream in 2.8.2.

[ Changes ]
Apply the upstream patch to fix referrals when --enable-junction=no
(the default in bookworm) by backing out not needed #ifdef
HAVE_JUNCTION_SUPPORT which blocks the referrals from working when, as
code is backed out to make referrals work.

I applied two changes as well in the packaging for let the salsa CI
pass, set the release to 'bookworm' and for lintian suppress the
aliased-location tag, as the usrmerge-migration happened only in a
later version nfs-utils/1:2.6.3-4~exp1

[ Other info ]
Nothing more I guess.

Regards,
Salvatore
diff -Nru nfs-utils-2.6.2/debian/changelog nfs-utils-2.6.2/debian/changelog
--- nfs-utils-2.6.2/debian/changelog    2023-01-11 21:41:40.000000000 +0100
+++ nfs-utils-2.6.2/debian/changelog    2024-12-11 15:00:17.000000000 +0100
@@ -1,3 +1,12 @@
+nfs-utils (1:2.6.2-4+deb12u1) bookworm; urgency=medium
+
+  * debian/salsa-ci.yml: Set release to bookworm
+  * d/salsa-ci.yml: Suppress aliased-location lintian errors
+  * exports: Fix referrals when --enable-junction=no
+    (Closes: #1083098, #1035908)
+
+ -- Salvatore Bonaccorso <car...@debian.org>  Wed, 11 Dec 2024 15:00:17 +0100
+
 nfs-utils (1:2.6.2-4) unstable; urgency=medium
 
   [ Guillem Jover ]
diff -Nru 
nfs-utils-2.6.2/debian/patches/exports-Fix-referrals-when-enable-junction-no.patch
 
nfs-utils-2.6.2/debian/patches/exports-Fix-referrals-when-enable-junction-no.patch
--- 
nfs-utils-2.6.2/debian/patches/exports-Fix-referrals-when-enable-junction-no.patch
  1970-01-01 01:00:00.000000000 +0100
+++ 
nfs-utils-2.6.2/debian/patches/exports-Fix-referrals-when-enable-junction-no.patch
  2024-12-11 15:00:17.000000000 +0100
@@ -0,0 +1,65 @@
+From: Scott Mayhew <smay...@redhat.com>
+Date: Sun, 8 Dec 2024 06:08:53 -0500
+Subject: exports: Fix referrals when --enable-junction=no
+Origin: 
https://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commit;h=371929c8f0b5eb9aae1a23cc273413b9f4c0165e
+Bug-Debian: https://bugs.debian.org/1083098
+Bug-Debian: https://bugs.debian.org/1035908
+
+Commit 15dc0bea ("exportd: Moved cache upcalls routines into
+libexport.a") caused write_fsloc() to be elided when junction support is
+disabled. Remove the not needed #ifdef HAVE_JUNCTION_SUPPORT which
+blocks the referrals from working when --enable-junction=no is set.
+(only the #ifdef HAVE_JUNCTION_SUPPORT should be around actual
+junction code).
+
+Fixes: 15dc0bea ("exportd: Moved cache upcalls routines into libexport.a")
+Link: https://bugs.debian.org/1035908
+Link: https://bugs.debian.org/1083098
+
+Reviewed-by: Roland Mainz <roland.ma...@nrubsig.org>
+Reviewed-by: Chuck Lever <chuck.le...@oracle.com>
+Signed-off-by: Scott Mayhew <smay...@redhat.com>
+Signed-off-by: Steve Dickson <ste...@redhat.com>
+---
+ support/export/cache.c | 7 -------
+ 1 file changed, 7 deletions(-)
+
+--- a/support/export/cache.c
++++ b/support/export/cache.c
+@@ -33,10 +33,7 @@
+ #include "export.h"
+ #include "pseudoflavors.h"
+ #include "xcommon.h"
+-
+-#ifdef HAVE_JUNCTION_SUPPORT
+ #include "fsloc.h"
+-#endif
+ 
+ #ifdef USE_BLKID
+ #include "blkid/blkid.h"
+@@ -908,7 +905,6 @@ out:
+       xlog(D_CALL, "nfsd_fh: found %p path %s", found, found ? found->e_path 
: NULL);
+ }
+ 
+-#ifdef HAVE_JUNCTION_SUPPORT
+ static void write_fsloc(char **bp, int *blen, struct exportent *ep)
+ {
+       struct servers *servers;
+@@ -931,7 +927,6 @@ static void write_fsloc(char **bp, int *
+       qword_addint(bp, blen, servers->h_referral);
+       release_replicas(servers);
+ }
+-#endif
+ static void write_secinfo(char **bp, int *blen, struct exportent *ep, int 
flag_mask)
+ {
+       struct sec_entry *p;
+@@ -975,9 +970,7 @@ static int dump_to_cache(int f, char *bu
+               qword_addint(&bp, &blen, exp->e_anongid);
+               qword_addint(&bp, &blen, exp->e_fsid);
+ 
+-#ifdef HAVE_JUNCTION_SUPPORT
+               write_fsloc(&bp, &blen, exp);
+-#endif
+               write_secinfo(&bp, &blen, exp, flag_mask);
+               if (exp->e_uuid == NULL || different_fs) {
+                       char u[16];
diff -Nru nfs-utils-2.6.2/debian/patches/series 
nfs-utils-2.6.2/debian/patches/series
--- nfs-utils-2.6.2/debian/patches/series       2023-01-11 21:41:40.000000000 
+0100
+++ nfs-utils-2.6.2/debian/patches/series       2024-12-11 15:00:17.000000000 
+0100
@@ -8,3 +8,4 @@
 systemd-Apply-all-sysctl-settings-through-udev-rule-.patch
 auth-rpcgss-module.service-Don-t-fail-inside-linux-c.patch
 systemd-Don-t-degrade-system-state-for-nfs-clients-w.patch
+exports-Fix-referrals-when-enable-junction-no.patch
diff -Nru nfs-utils-2.6.2/debian/salsa-ci.yml 
nfs-utils-2.6.2/debian/salsa-ci.yml
--- nfs-utils-2.6.2/debian/salsa-ci.yml 2023-01-11 21:41:40.000000000 +0100
+++ nfs-utils-2.6.2/debian/salsa-ci.yml 2024-12-11 15:00:17.000000000 +0100
@@ -3,8 +3,10 @@
   - 
https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
 
 variables:
-  RELEASE: 'unstable'
+  RELEASE: 'bookworm'
   # We only build arch:any packages
   SALSA_CI_DISABLE_BUILD_PACKAGE_ALL: 'true'
   # Currently triggering falsely (bugs #973313, #1000977)
-  SALSA_CI_LINTIAN_SUPPRESS_TAGS: 'groff-message,elf-error'
+  # Suppress 'aliased-location' as usrmerge-migration happened only
+  # in nfs-utils/1:2.6.3-4~exp1
+  SALSA_CI_LINTIAN_SUPPRESS_TAGS: 'groff-message,elf-error,aliased-location'

Reply via email to