* [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6
@ 2024-12-11 13:46 slymattz
2024-12-11 14:18 ` [PR PATCH] [Updated] " slymattz
` (20 more replies)
0 siblings, 21 replies; 22+ messages in thread
From: slymattz @ 2024-12-11 13:46 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1155 bytes --]
There is a new pull request by slymattz against master on the void-packages repository
https://github.com/slymattz/void-packages nfs-utils-2.8.2
https://github.com/void-linux/void-packages/pull/53467
nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- x86_64-musl
A patch file from https://github.com/void-linux/void-packages/pull/53467.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nfs-utils-2.8.2-53467.patch --]
[-- Type: text/x-diff, Size: 9051 bytes --]
From 55d292660701e45d1281dbf66d1f0ede328e8a3c Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Mon, 2 Dec 2024 14:03:53 +0100
Subject: [PATCH 1/3] nfs-utils: update to 2.8.2
---
.../patches/musl-getservbyport.patch | 18 ---
.../patches/musl-svcgssd-sysconf.patch | 103 ------------------
...s-utils-2.7.1-define_macros_for_musl.patch | 38 -------
srcpkgs/nfs-utils/template | 6 +-
4 files changed, 3 insertions(+), 162 deletions(-)
delete mode 100644 srcpkgs/nfs-utils/patches/musl-getservbyport.patch
delete mode 100644 srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
delete mode 100644 srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
diff --git a/srcpkgs/nfs-utils/patches/musl-getservbyport.patch b/srcpkgs/nfs-utils/patches/musl-getservbyport.patch
deleted file mode 100644
index 6a491d4a58ed0d..00000000000000
--- a/srcpkgs/nfs-utils/patches/musl-getservbyport.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-Musl will always return something with getservbyport so we cannot skip
-ports that returns non-null.
-
-diff --git a/utils/statd/rmtcall.c b/utils/statd/rmtcall.c
-index fd576d9..d72a0bf 100644
---- a/utils/statd/rmtcall.c
-+++ b/utils/statd/rmtcall.c
-@@ -93,8 +93,10 @@
- __func__);
- break;
- }
-+#if defined(__GLIBC__)
- se = getservbyport(sin.sin_port, "udp");
- if (se == NULL)
-+#endif
- break;
-
- if (retries == MAX_BRP_RETRIES) {
diff --git a/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch b/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
deleted file mode 100644
index aab0e9612bf23a..00000000000000
--- a/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
+++ /dev/null
@@ -1,103 +0,0 @@
---- a/support/nfsidmap/libnfsidmap.c
-+++ b/support/nfsidmap/libnfsidmap.c
-@@ -430,11 +430,17 @@
-
- nobody_user = conf_get_str("Mapping", "Nobody-User");
- if (nobody_user) {
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024; /*value on my gentoo glibc system that has _SC_GETPW_R_SIZE_MAX*/
- struct passwd *buf;
- struct passwd *pw = NULL;
- int err;
-
-+ /*sysconf can return -1 when _SC_GETPW_R_SIZE_MAX is not defined, like on musl systems, if cast to size_t this will lead
-+ to an integer overflow, which leads to a buffer overflow and crashes svcgssd */
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(sizeof(*buf) + buflen);
- if (buf) {
- err = getpwnam_r(nobody_user, buf, ((char *)buf) + sizeof(*buf), buflen, &pw);
-@@ -451,10 +457,16 @@
-
- nobody_group = conf_get_str("Mapping", "Nobody-Group");
- if (nobody_group) {
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024; /*value on my gentoo glibc system that has _SC_GETGR_R_SIZE_MAX*/
- struct group *buf;
- struct group *gr = NULL;
- int err;
-+
-+ /*sysconf can return -1 when _SC_GETGR_R_SIZE_MAX is not defined, like on musl systems, if cast to size_t this will lead
-+ to an integer overflow, which leads to a buffer overflow and crashes svcgssd */
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- buf = malloc(sizeof(*buf) + buflen);
- if (buf) {
---- a/support/nfsidmap/static.c
-+++ b/support/nfsidmap/static.c
-@@ -98,10 +98,14 @@
- {
- struct passwd *pw;
- struct pwbuf *buf;
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024;
- char *localname;
- int err;
-
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(sizeof(*buf) + buflen);
- if (!buf) {
- err = ENOMEM;
-@@ -149,9 +153,13 @@
- {
- struct group *gr;
- struct grbuf *buf;
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024;
- char *localgroup;
- int err;
-+
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- buf = malloc(sizeof(*buf) + buflen);
- if (!buf) {
---- a/support/nfsidmap/nss.c
-+++ b/support/nfsidmap/nss.c
-@@ -91,9 +91,13 @@
- struct passwd *pw = NULL;
- struct passwd pwbuf;
- char *buf;
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024;
- int err = -ENOMEM;
-
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(buflen);
- if (!buf)
- goto out;
-@@ -119,8 +123,12 @@
- struct group *gr = NULL;
- struct group grbuf;
- char *buf;
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024;
- int err;
-+
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- if (domain == NULL)
- domain = get_default_domain();
diff --git a/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch b/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
deleted file mode 100644
index df4c2db84341de..00000000000000
--- a/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff --git a/support/junction/path.c b/support/junction/path.c
-index 13a14386..dd0f59a0 100644
---- a/support/junction/path.c
-+++ b/support/junction/path.c
-@@ -23,6 +23,12 @@
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
- */
-
-+/* For musl */
-+#ifndef _GNU_SOURCE
-+#define _GNU_SOURCE
-+#endif
-+#include <limits.h>
-+
- #include <sys/types.h>
- #include <sys/stat.h>
-
-diff --git a/support/include/junction.h b/support/include/junction.h
-index 7257d80b..d127dd55 100644
---- a/support/include/junction.h
-+++ b/support/include/junction.h
-@@ -26,6 +26,16 @@
- #ifndef _NFS_JUNCTION_H_
- #define _NFS_JUNCTION_H_
-
-+/* For musl, refered to glibc's sys/cdefs.h */
-+#ifndef __attribute_malloc__
-+#define __attribute_malloc__ __attribute__((__malloc__))
-+#endif
-+
-+/* For musl, refered to glibc's sys/stat.h */
-+#ifndef ALLPERMS
-+#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
-+#endif
-+
- #include <stdint.h>
-
- /*
diff --git a/srcpkgs/nfs-utils/template b/srcpkgs/nfs-utils/template
index 60da30200b697b..2a393e9cd9d511 100644
--- a/srcpkgs/nfs-utils/template
+++ b/srcpkgs/nfs-utils/template
@@ -1,6 +1,6 @@
# Template file for 'nfs-utils'
pkgname=nfs-utils
-version=2.7.1
+version=2.8.2
revision=1
build_style=gnu-configure
configure_args="--with-statduser=nobody --enable-gss --enable-nfsv4
@@ -13,14 +13,14 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://www.linux-nfs.org/"
distfiles="${KERNEL_SITE}/utils/${pkgname}/${version}/${pkgname}-${version}.tar.xz"
-checksum=885c948a84a58bca4148f459588f9a7369dbb40dcc466f04e455c6b10fd0aa48
+checksum=a39bbea76ac0ab9e6e8699caf3c308b6b310c20d458e8fa8606196d358e7fb15
replaces="rpcgen>=0"
hostmakedepends="pkg-config libtirpc-devel rpcsvc-proto mit-krb5-devel"
makedepends="libblkid-devel libmount-devel libtirpc-devel
keyutils-devel libevent-devel mit-krb5-devel
device-mapper-devel libcap-devel sqlite-devel
- libxml2-devel"
+ libxml2-devel libnl3-devel"
depends="rpcbind"
python_version=3
conf_files="/etc/exports"
From 805c82fb23e2721213d15ae40a660f1f4e73921b Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Wed, 11 Dec 2024 14:23:55 +0100
Subject: [PATCH 2/3] libtirpc: update to 1.3.6
---
srcpkgs/libtirpc/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/libtirpc/template b/srcpkgs/libtirpc/template
index 88e331d0623942..298de5fb83c367 100644
--- a/srcpkgs/libtirpc/template
+++ b/srcpkgs/libtirpc/template
@@ -1,6 +1,6 @@
# Template file for 'libtirpc'
pkgname=libtirpc
-version=1.3.5
+version=1.3.6
revision=1
build_style=gnu-configure
hostmakedepends="pkg-config mit-krb5-devel"
@@ -12,7 +12,7 @@ license="BSD-3-Clause"
homepage="https://sourceforge.net/projects/libtirpc/"
changelog="http://git.linux-nfs.org/?p=steved/libtirpc.git;a=shortlog"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.bz2"
-checksum=9b31370e5a38d3391bf37edfa22498e28fe2142467ae6be7a17c9068ec0bf12f
+checksum=bbd26a8f0df5690a62a47f6aa30f797f3ef8d02560d1bc449a83066b5a1d3508
case "$XBPS_TARGET_MACHINE" in
*-musl) makedepends+=" musl-legacy-compat" ;;
From 06bb7646c0d15a70442986ee92545cab1270159c Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Wed, 11 Dec 2024 14:31:37 +0100
Subject: [PATCH 3/3] rpcbind: revbump for libtirpc
---
srcpkgs/rpcbind/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/rpcbind/template b/srcpkgs/rpcbind/template
index d2b173fef18829..002b5f231ce653 100644
--- a/srcpkgs/rpcbind/template
+++ b/srcpkgs/rpcbind/template
@@ -1,7 +1,7 @@
# Template file for 'rpcbind'
pkgname=rpcbind
version=1.2.7
-revision=2
+revision=3
build_style=gnu-configure
configure_args="--enable-warmstarts --with-statedir=/run --with-rpcuser=rpc
--with-systemdsystemunitdir=no"
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR PATCH] [Updated] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6
2024-12-11 13:46 [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6 slymattz
@ 2024-12-11 14:18 ` slymattz
2024-12-11 14:21 ` slymattz
` (19 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: slymattz @ 2024-12-11 14:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1704 bytes --]
There is an updated pull request by slymattz against master on the void-packages repository
https://github.com/slymattz/void-packages nfs-utils-2.8.2
https://github.com/void-linux/void-packages/pull/53467
nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- x86_64-musl
#### Patching for musl
1. https://patchwork.kernel.org/project/linux-nfs/patch/20241201153637.449538-1-b.tataroiu@gmail.com/ this patch has been applied upstream and is supposed to solve musl memory leaks (in earlier builds it was managed by musl-svcgssd-sysconf.patch)
2. the other patches except for musl-fix_long_unsigned_int.patch have also been accepted upstream
3. without musl-fix_long_unsigned_int.patch compilation errors occur on musl (for reference, see https://github.com/void-linux/void-packages/pull/52088#issue-2501336506)
A patch file from https://github.com/void-linux/void-packages/pull/53467.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nfs-utils-2.8.2-53467.patch --]
[-- Type: text/x-diff, Size: 8898 bytes --]
From 04c38e36726ca0f1a21e1b5f5a83d1e4cc6a9f53 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Mon, 2 Dec 2024 14:03:53 +0100
Subject: [PATCH 1/3] nfs-utils: update to 2.8.2
---
.../patches/musl-getservbyport.patch | 3 +-
.../patches/musl-svcgssd-sysconf.patch | 103 ------------------
...s-utils-2.7.1-define_macros_for_musl.patch | 38 -------
srcpkgs/nfs-utils/template | 6 +-
4 files changed, 4 insertions(+), 146 deletions(-)
delete mode 100644 srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
delete mode 100644 srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
diff --git a/srcpkgs/nfs-utils/patches/musl-getservbyport.patch b/srcpkgs/nfs-utils/patches/musl-getservbyport.patch
index 6a491d4a58ed0d..f41096ca1b3324 100644
--- a/srcpkgs/nfs-utils/patches/musl-getservbyport.patch
+++ b/srcpkgs/nfs-utils/patches/musl-getservbyport.patch
@@ -1,6 +1,5 @@
Musl will always return something with getservbyport so we cannot skip
ports that returns non-null.
-
diff --git a/utils/statd/rmtcall.c b/utils/statd/rmtcall.c
index fd576d9..d72a0bf 100644
--- a/utils/statd/rmtcall.c
@@ -14,5 +13,5 @@ index fd576d9..d72a0bf 100644
if (se == NULL)
+#endif
break;
-
+
if (retries == MAX_BRP_RETRIES) {
diff --git a/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch b/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
deleted file mode 100644
index aab0e9612bf23a..00000000000000
--- a/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
+++ /dev/null
@@ -1,103 +0,0 @@
---- a/support/nfsidmap/libnfsidmap.c
-+++ b/support/nfsidmap/libnfsidmap.c
-@@ -430,11 +430,17 @@
-
- nobody_user = conf_get_str("Mapping", "Nobody-User");
- if (nobody_user) {
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024; /*value on my gentoo glibc system that has _SC_GETPW_R_SIZE_MAX*/
- struct passwd *buf;
- struct passwd *pw = NULL;
- int err;
-
-+ /*sysconf can return -1 when _SC_GETPW_R_SIZE_MAX is not defined, like on musl systems, if cast to size_t this will lead
-+ to an integer overflow, which leads to a buffer overflow and crashes svcgssd */
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(sizeof(*buf) + buflen);
- if (buf) {
- err = getpwnam_r(nobody_user, buf, ((char *)buf) + sizeof(*buf), buflen, &pw);
-@@ -451,10 +457,16 @@
-
- nobody_group = conf_get_str("Mapping", "Nobody-Group");
- if (nobody_group) {
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024; /*value on my gentoo glibc system that has _SC_GETGR_R_SIZE_MAX*/
- struct group *buf;
- struct group *gr = NULL;
- int err;
-+
-+ /*sysconf can return -1 when _SC_GETGR_R_SIZE_MAX is not defined, like on musl systems, if cast to size_t this will lead
-+ to an integer overflow, which leads to a buffer overflow and crashes svcgssd */
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- buf = malloc(sizeof(*buf) + buflen);
- if (buf) {
---- a/support/nfsidmap/static.c
-+++ b/support/nfsidmap/static.c
-@@ -98,10 +98,14 @@
- {
- struct passwd *pw;
- struct pwbuf *buf;
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024;
- char *localname;
- int err;
-
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(sizeof(*buf) + buflen);
- if (!buf) {
- err = ENOMEM;
-@@ -149,9 +153,13 @@
- {
- struct group *gr;
- struct grbuf *buf;
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024;
- char *localgroup;
- int err;
-+
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- buf = malloc(sizeof(*buf) + buflen);
- if (!buf) {
---- a/support/nfsidmap/nss.c
-+++ b/support/nfsidmap/nss.c
-@@ -91,9 +91,13 @@
- struct passwd *pw = NULL;
- struct passwd pwbuf;
- char *buf;
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024;
- int err = -ENOMEM;
-
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(buflen);
- if (!buf)
- goto out;
-@@ -119,8 +123,12 @@
- struct group *gr = NULL;
- struct group grbuf;
- char *buf;
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024;
- int err;
-+
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- if (domain == NULL)
- domain = get_default_domain();
diff --git a/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch b/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
deleted file mode 100644
index df4c2db84341de..00000000000000
--- a/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff --git a/support/junction/path.c b/support/junction/path.c
-index 13a14386..dd0f59a0 100644
---- a/support/junction/path.c
-+++ b/support/junction/path.c
-@@ -23,6 +23,12 @@
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
- */
-
-+/* For musl */
-+#ifndef _GNU_SOURCE
-+#define _GNU_SOURCE
-+#endif
-+#include <limits.h>
-+
- #include <sys/types.h>
- #include <sys/stat.h>
-
-diff --git a/support/include/junction.h b/support/include/junction.h
-index 7257d80b..d127dd55 100644
---- a/support/include/junction.h
-+++ b/support/include/junction.h
-@@ -26,6 +26,16 @@
- #ifndef _NFS_JUNCTION_H_
- #define _NFS_JUNCTION_H_
-
-+/* For musl, refered to glibc's sys/cdefs.h */
-+#ifndef __attribute_malloc__
-+#define __attribute_malloc__ __attribute__((__malloc__))
-+#endif
-+
-+/* For musl, refered to glibc's sys/stat.h */
-+#ifndef ALLPERMS
-+#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
-+#endif
-+
- #include <stdint.h>
-
- /*
diff --git a/srcpkgs/nfs-utils/template b/srcpkgs/nfs-utils/template
index 60da30200b697b..2a393e9cd9d511 100644
--- a/srcpkgs/nfs-utils/template
+++ b/srcpkgs/nfs-utils/template
@@ -1,6 +1,6 @@
# Template file for 'nfs-utils'
pkgname=nfs-utils
-version=2.7.1
+version=2.8.2
revision=1
build_style=gnu-configure
configure_args="--with-statduser=nobody --enable-gss --enable-nfsv4
@@ -13,14 +13,14 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://www.linux-nfs.org/"
distfiles="${KERNEL_SITE}/utils/${pkgname}/${version}/${pkgname}-${version}.tar.xz"
-checksum=885c948a84a58bca4148f459588f9a7369dbb40dcc466f04e455c6b10fd0aa48
+checksum=a39bbea76ac0ab9e6e8699caf3c308b6b310c20d458e8fa8606196d358e7fb15
replaces="rpcgen>=0"
hostmakedepends="pkg-config libtirpc-devel rpcsvc-proto mit-krb5-devel"
makedepends="libblkid-devel libmount-devel libtirpc-devel
keyutils-devel libevent-devel mit-krb5-devel
device-mapper-devel libcap-devel sqlite-devel
- libxml2-devel"
+ libxml2-devel libnl3-devel"
depends="rpcbind"
python_version=3
conf_files="/etc/exports"
From ac7cda1ccbf367f80849c1ac2ba3d7a7b4913a17 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Wed, 11 Dec 2024 14:23:55 +0100
Subject: [PATCH 2/3] libtirpc: update to 1.3.6
---
srcpkgs/libtirpc/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/libtirpc/template b/srcpkgs/libtirpc/template
index 88e331d0623942..298de5fb83c367 100644
--- a/srcpkgs/libtirpc/template
+++ b/srcpkgs/libtirpc/template
@@ -1,6 +1,6 @@
# Template file for 'libtirpc'
pkgname=libtirpc
-version=1.3.5
+version=1.3.6
revision=1
build_style=gnu-configure
hostmakedepends="pkg-config mit-krb5-devel"
@@ -12,7 +12,7 @@ license="BSD-3-Clause"
homepage="https://sourceforge.net/projects/libtirpc/"
changelog="http://git.linux-nfs.org/?p=steved/libtirpc.git;a=shortlog"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.bz2"
-checksum=9b31370e5a38d3391bf37edfa22498e28fe2142467ae6be7a17c9068ec0bf12f
+checksum=bbd26a8f0df5690a62a47f6aa30f797f3ef8d02560d1bc449a83066b5a1d3508
case "$XBPS_TARGET_MACHINE" in
*-musl) makedepends+=" musl-legacy-compat" ;;
From 0c36f9898583104d8e02a4488eb10a518ceeae7d Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Wed, 11 Dec 2024 14:31:37 +0100
Subject: [PATCH 3/3] rpcbind: revbump for libtirpc
---
srcpkgs/rpcbind/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/rpcbind/template b/srcpkgs/rpcbind/template
index d2b173fef18829..002b5f231ce653 100644
--- a/srcpkgs/rpcbind/template
+++ b/srcpkgs/rpcbind/template
@@ -1,7 +1,7 @@
# Template file for 'rpcbind'
pkgname=rpcbind
version=1.2.7
-revision=2
+revision=3
build_style=gnu-configure
configure_args="--enable-warmstarts --with-statedir=/run --with-rpcuser=rpc
--with-systemdsystemunitdir=no"
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR PATCH] [Updated] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6
2024-12-11 13:46 [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6 slymattz
2024-12-11 14:18 ` [PR PATCH] [Updated] " slymattz
@ 2024-12-11 14:21 ` slymattz
2024-12-24 18:58 ` classabbyamp
` (18 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: slymattz @ 2024-12-11 14:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1704 bytes --]
There is an updated pull request by slymattz against master on the void-packages repository
https://github.com/slymattz/void-packages nfs-utils-2.8.2
https://github.com/void-linux/void-packages/pull/53467
nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- x86_64-musl
#### Patching for musl
1. https://patchwork.kernel.org/project/linux-nfs/patch/20241201153637.449538-1-b.tataroiu@gmail.com/ this patch has been applied upstream and is supposed to solve musl memory leaks (in earlier builds it was managed by musl-svcgssd-sysconf.patch)
2. the other patches except for musl-fix_long_unsigned_int.patch have also been accepted upstream
3. without musl-fix_long_unsigned_int.patch compilation errors occur on musl (for reference, see https://github.com/void-linux/void-packages/pull/52088#issue-2501336506)
A patch file from https://github.com/void-linux/void-packages/pull/53467.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nfs-utils-2.8.2-53467.patch --]
[-- Type: text/x-diff, Size: 8195 bytes --]
From 5511e868935d2cbdab9de1ef171a35181aca419d Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Mon, 2 Dec 2024 14:03:53 +0100
Subject: [PATCH 1/3] nfs-utils: update to 2.8.2
---
.../patches/musl-svcgssd-sysconf.patch | 103 ------------------
...s-utils-2.7.1-define_macros_for_musl.patch | 38 -------
srcpkgs/nfs-utils/template | 6 +-
3 files changed, 3 insertions(+), 144 deletions(-)
delete mode 100644 srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
delete mode 100644 srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
diff --git a/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch b/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
deleted file mode 100644
index aab0e9612bf23a..00000000000000
--- a/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
+++ /dev/null
@@ -1,103 +0,0 @@
---- a/support/nfsidmap/libnfsidmap.c
-+++ b/support/nfsidmap/libnfsidmap.c
-@@ -430,11 +430,17 @@
-
- nobody_user = conf_get_str("Mapping", "Nobody-User");
- if (nobody_user) {
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024; /*value on my gentoo glibc system that has _SC_GETPW_R_SIZE_MAX*/
- struct passwd *buf;
- struct passwd *pw = NULL;
- int err;
-
-+ /*sysconf can return -1 when _SC_GETPW_R_SIZE_MAX is not defined, like on musl systems, if cast to size_t this will lead
-+ to an integer overflow, which leads to a buffer overflow and crashes svcgssd */
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(sizeof(*buf) + buflen);
- if (buf) {
- err = getpwnam_r(nobody_user, buf, ((char *)buf) + sizeof(*buf), buflen, &pw);
-@@ -451,10 +457,16 @@
-
- nobody_group = conf_get_str("Mapping", "Nobody-Group");
- if (nobody_group) {
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024; /*value on my gentoo glibc system that has _SC_GETGR_R_SIZE_MAX*/
- struct group *buf;
- struct group *gr = NULL;
- int err;
-+
-+ /*sysconf can return -1 when _SC_GETGR_R_SIZE_MAX is not defined, like on musl systems, if cast to size_t this will lead
-+ to an integer overflow, which leads to a buffer overflow and crashes svcgssd */
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- buf = malloc(sizeof(*buf) + buflen);
- if (buf) {
---- a/support/nfsidmap/static.c
-+++ b/support/nfsidmap/static.c
-@@ -98,10 +98,14 @@
- {
- struct passwd *pw;
- struct pwbuf *buf;
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024;
- char *localname;
- int err;
-
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(sizeof(*buf) + buflen);
- if (!buf) {
- err = ENOMEM;
-@@ -149,9 +153,13 @@
- {
- struct group *gr;
- struct grbuf *buf;
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024;
- char *localgroup;
- int err;
-+
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- buf = malloc(sizeof(*buf) + buflen);
- if (!buf) {
---- a/support/nfsidmap/nss.c
-+++ b/support/nfsidmap/nss.c
-@@ -91,9 +91,13 @@
- struct passwd *pw = NULL;
- struct passwd pwbuf;
- char *buf;
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024;
- int err = -ENOMEM;
-
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(buflen);
- if (!buf)
- goto out;
-@@ -119,8 +123,12 @@
- struct group *gr = NULL;
- struct group grbuf;
- char *buf;
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024;
- int err;
-+
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- if (domain == NULL)
- domain = get_default_domain();
diff --git a/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch b/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
deleted file mode 100644
index df4c2db84341de..00000000000000
--- a/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff --git a/support/junction/path.c b/support/junction/path.c
-index 13a14386..dd0f59a0 100644
---- a/support/junction/path.c
-+++ b/support/junction/path.c
-@@ -23,6 +23,12 @@
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
- */
-
-+/* For musl */
-+#ifndef _GNU_SOURCE
-+#define _GNU_SOURCE
-+#endif
-+#include <limits.h>
-+
- #include <sys/types.h>
- #include <sys/stat.h>
-
-diff --git a/support/include/junction.h b/support/include/junction.h
-index 7257d80b..d127dd55 100644
---- a/support/include/junction.h
-+++ b/support/include/junction.h
-@@ -26,6 +26,16 @@
- #ifndef _NFS_JUNCTION_H_
- #define _NFS_JUNCTION_H_
-
-+/* For musl, refered to glibc's sys/cdefs.h */
-+#ifndef __attribute_malloc__
-+#define __attribute_malloc__ __attribute__((__malloc__))
-+#endif
-+
-+/* For musl, refered to glibc's sys/stat.h */
-+#ifndef ALLPERMS
-+#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
-+#endif
-+
- #include <stdint.h>
-
- /*
diff --git a/srcpkgs/nfs-utils/template b/srcpkgs/nfs-utils/template
index 60da30200b697b..2a393e9cd9d511 100644
--- a/srcpkgs/nfs-utils/template
+++ b/srcpkgs/nfs-utils/template
@@ -1,6 +1,6 @@
# Template file for 'nfs-utils'
pkgname=nfs-utils
-version=2.7.1
+version=2.8.2
revision=1
build_style=gnu-configure
configure_args="--with-statduser=nobody --enable-gss --enable-nfsv4
@@ -13,14 +13,14 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://www.linux-nfs.org/"
distfiles="${KERNEL_SITE}/utils/${pkgname}/${version}/${pkgname}-${version}.tar.xz"
-checksum=885c948a84a58bca4148f459588f9a7369dbb40dcc466f04e455c6b10fd0aa48
+checksum=a39bbea76ac0ab9e6e8699caf3c308b6b310c20d458e8fa8606196d358e7fb15
replaces="rpcgen>=0"
hostmakedepends="pkg-config libtirpc-devel rpcsvc-proto mit-krb5-devel"
makedepends="libblkid-devel libmount-devel libtirpc-devel
keyutils-devel libevent-devel mit-krb5-devel
device-mapper-devel libcap-devel sqlite-devel
- libxml2-devel"
+ libxml2-devel libnl3-devel"
depends="rpcbind"
python_version=3
conf_files="/etc/exports"
From d82dc47b319481f7355793a9e0f1b5b12d63ead3 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Wed, 11 Dec 2024 14:23:55 +0100
Subject: [PATCH 2/3] libtirpc: update to 1.3.6
---
srcpkgs/libtirpc/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/libtirpc/template b/srcpkgs/libtirpc/template
index 88e331d0623942..298de5fb83c367 100644
--- a/srcpkgs/libtirpc/template
+++ b/srcpkgs/libtirpc/template
@@ -1,6 +1,6 @@
# Template file for 'libtirpc'
pkgname=libtirpc
-version=1.3.5
+version=1.3.6
revision=1
build_style=gnu-configure
hostmakedepends="pkg-config mit-krb5-devel"
@@ -12,7 +12,7 @@ license="BSD-3-Clause"
homepage="https://sourceforge.net/projects/libtirpc/"
changelog="http://git.linux-nfs.org/?p=steved/libtirpc.git;a=shortlog"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.bz2"
-checksum=9b31370e5a38d3391bf37edfa22498e28fe2142467ae6be7a17c9068ec0bf12f
+checksum=bbd26a8f0df5690a62a47f6aa30f797f3ef8d02560d1bc449a83066b5a1d3508
case "$XBPS_TARGET_MACHINE" in
*-musl) makedepends+=" musl-legacy-compat" ;;
From 3ce883e4d6a27bcc76394d5d5bd3726fb38290a1 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Wed, 11 Dec 2024 14:31:37 +0100
Subject: [PATCH 3/3] rpcbind: revbump for libtirpc
---
srcpkgs/rpcbind/template | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/srcpkgs/rpcbind/template b/srcpkgs/rpcbind/template
index d2b173fef18829..002b5f231ce653 100644
--- a/srcpkgs/rpcbind/template
+++ b/srcpkgs/rpcbind/template
@@ -1,7 +1,7 @@
# Template file for 'rpcbind'
pkgname=rpcbind
version=1.2.7
-revision=2
+revision=3
build_style=gnu-configure
configure_args="--enable-warmstarts --with-statedir=/run --with-rpcuser=rpc
--with-systemdsystemunitdir=no"
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6
2024-12-11 13:46 [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6 slymattz
2024-12-11 14:18 ` [PR PATCH] [Updated] " slymattz
2024-12-11 14:21 ` slymattz
@ 2024-12-24 18:58 ` classabbyamp
2024-12-24 19:47 ` slymattz
` (17 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: classabbyamp @ 2024-12-24 18:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 179 bytes --]
New comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/53467#issuecomment-2561351218
Comment:
why does rpcbind need a revbump?
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6
2024-12-11 13:46 [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6 slymattz
` (2 preceding siblings ...)
2024-12-24 18:58 ` classabbyamp
@ 2024-12-24 19:47 ` slymattz
2024-12-24 19:52 ` [PR PATCH] [Updated] " slymattz
` (16 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: slymattz @ 2024-12-24 19:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 441 bytes --]
New comment by slymattz on void-packages repository
https://github.com/void-linux/void-packages/pull/53467#issuecomment-2561370706
Comment:
I suppose I just followed the convention from the previous commit to stay on the safe side. There's no particular reason, to be honest, though. Now let me `xbps-install -S -f rpcbind` on my machine, reboot and test whether NFS mounting works fine. If all goes well, I'll delete the revbump commit.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR PATCH] [Updated] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6
2024-12-11 13:46 [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6 slymattz
` (3 preceding siblings ...)
2024-12-24 19:47 ` slymattz
@ 2024-12-24 19:52 ` slymattz
2025-01-10 17:06 ` slymattz
` (15 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: slymattz @ 2024-12-24 19:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1738 bytes --]
There is an updated pull request by slymattz against master on the void-packages repository
https://github.com/slymattz/void-packages nfs-utils-2.8.2
https://github.com/void-linux/void-packages/pull/53467
nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- x86_64-musl
#### Patching for musl
1. _musl-svcgssd-sysconf.patch_ was used to prevent buffer overflow. However, the problem has been solved [upstream](https://patchwork.kernel.org/project/linux-nfs/patch/20241201153637.449538-1-b.tataroiu@gmail.com/)
2. _nfs-utils-2.7.1-define_macros_for_musl.patch_ has been incorporated upstream
3. _musl-getservbyport.patch_ stays as it hasn't been applied upstream
3. _musl-fix_long_unsigned_int.patch_ also stays as it fixes compilation errors on musl (for reference, see https://github.com/void-linux/void-packages/pull/52088#issue-2501336506)
A patch file from https://github.com/void-linux/void-packages/pull/53467.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nfs-utils-2.8.2-53467.patch --]
[-- Type: text/x-diff, Size: 7489 bytes --]
From 5511e868935d2cbdab9de1ef171a35181aca419d Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Mon, 2 Dec 2024 14:03:53 +0100
Subject: [PATCH 1/2] nfs-utils: update to 2.8.2
---
.../patches/musl-svcgssd-sysconf.patch | 103 ------------------
...s-utils-2.7.1-define_macros_for_musl.patch | 38 -------
srcpkgs/nfs-utils/template | 6 +-
3 files changed, 3 insertions(+), 144 deletions(-)
delete mode 100644 srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
delete mode 100644 srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
diff --git a/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch b/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
deleted file mode 100644
index aab0e9612bf23a..00000000000000
--- a/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
+++ /dev/null
@@ -1,103 +0,0 @@
---- a/support/nfsidmap/libnfsidmap.c
-+++ b/support/nfsidmap/libnfsidmap.c
-@@ -430,11 +430,17 @@
-
- nobody_user = conf_get_str("Mapping", "Nobody-User");
- if (nobody_user) {
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024; /*value on my gentoo glibc system that has _SC_GETPW_R_SIZE_MAX*/
- struct passwd *buf;
- struct passwd *pw = NULL;
- int err;
-
-+ /*sysconf can return -1 when _SC_GETPW_R_SIZE_MAX is not defined, like on musl systems, if cast to size_t this will lead
-+ to an integer overflow, which leads to a buffer overflow and crashes svcgssd */
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(sizeof(*buf) + buflen);
- if (buf) {
- err = getpwnam_r(nobody_user, buf, ((char *)buf) + sizeof(*buf), buflen, &pw);
-@@ -451,10 +457,16 @@
-
- nobody_group = conf_get_str("Mapping", "Nobody-Group");
- if (nobody_group) {
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024; /*value on my gentoo glibc system that has _SC_GETGR_R_SIZE_MAX*/
- struct group *buf;
- struct group *gr = NULL;
- int err;
-+
-+ /*sysconf can return -1 when _SC_GETGR_R_SIZE_MAX is not defined, like on musl systems, if cast to size_t this will lead
-+ to an integer overflow, which leads to a buffer overflow and crashes svcgssd */
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- buf = malloc(sizeof(*buf) + buflen);
- if (buf) {
---- a/support/nfsidmap/static.c
-+++ b/support/nfsidmap/static.c
-@@ -98,10 +98,14 @@
- {
- struct passwd *pw;
- struct pwbuf *buf;
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024;
- char *localname;
- int err;
-
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(sizeof(*buf) + buflen);
- if (!buf) {
- err = ENOMEM;
-@@ -149,9 +153,13 @@
- {
- struct group *gr;
- struct grbuf *buf;
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024;
- char *localgroup;
- int err;
-+
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- buf = malloc(sizeof(*buf) + buflen);
- if (!buf) {
---- a/support/nfsidmap/nss.c
-+++ b/support/nfsidmap/nss.c
-@@ -91,9 +91,13 @@
- struct passwd *pw = NULL;
- struct passwd pwbuf;
- char *buf;
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024;
- int err = -ENOMEM;
-
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(buflen);
- if (!buf)
- goto out;
-@@ -119,8 +123,12 @@
- struct group *gr = NULL;
- struct group grbuf;
- char *buf;
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024;
- int err;
-+
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- if (domain == NULL)
- domain = get_default_domain();
diff --git a/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch b/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
deleted file mode 100644
index df4c2db84341de..00000000000000
--- a/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff --git a/support/junction/path.c b/support/junction/path.c
-index 13a14386..dd0f59a0 100644
---- a/support/junction/path.c
-+++ b/support/junction/path.c
-@@ -23,6 +23,12 @@
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
- */
-
-+/* For musl */
-+#ifndef _GNU_SOURCE
-+#define _GNU_SOURCE
-+#endif
-+#include <limits.h>
-+
- #include <sys/types.h>
- #include <sys/stat.h>
-
-diff --git a/support/include/junction.h b/support/include/junction.h
-index 7257d80b..d127dd55 100644
---- a/support/include/junction.h
-+++ b/support/include/junction.h
-@@ -26,6 +26,16 @@
- #ifndef _NFS_JUNCTION_H_
- #define _NFS_JUNCTION_H_
-
-+/* For musl, refered to glibc's sys/cdefs.h */
-+#ifndef __attribute_malloc__
-+#define __attribute_malloc__ __attribute__((__malloc__))
-+#endif
-+
-+/* For musl, refered to glibc's sys/stat.h */
-+#ifndef ALLPERMS
-+#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
-+#endif
-+
- #include <stdint.h>
-
- /*
diff --git a/srcpkgs/nfs-utils/template b/srcpkgs/nfs-utils/template
index 60da30200b697b..2a393e9cd9d511 100644
--- a/srcpkgs/nfs-utils/template
+++ b/srcpkgs/nfs-utils/template
@@ -1,6 +1,6 @@
# Template file for 'nfs-utils'
pkgname=nfs-utils
-version=2.7.1
+version=2.8.2
revision=1
build_style=gnu-configure
configure_args="--with-statduser=nobody --enable-gss --enable-nfsv4
@@ -13,14 +13,14 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://www.linux-nfs.org/"
distfiles="${KERNEL_SITE}/utils/${pkgname}/${version}/${pkgname}-${version}.tar.xz"
-checksum=885c948a84a58bca4148f459588f9a7369dbb40dcc466f04e455c6b10fd0aa48
+checksum=a39bbea76ac0ab9e6e8699caf3c308b6b310c20d458e8fa8606196d358e7fb15
replaces="rpcgen>=0"
hostmakedepends="pkg-config libtirpc-devel rpcsvc-proto mit-krb5-devel"
makedepends="libblkid-devel libmount-devel libtirpc-devel
keyutils-devel libevent-devel mit-krb5-devel
device-mapper-devel libcap-devel sqlite-devel
- libxml2-devel"
+ libxml2-devel libnl3-devel"
depends="rpcbind"
python_version=3
conf_files="/etc/exports"
From d82dc47b319481f7355793a9e0f1b5b12d63ead3 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Wed, 11 Dec 2024 14:23:55 +0100
Subject: [PATCH 2/2] libtirpc: update to 1.3.6
---
srcpkgs/libtirpc/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/libtirpc/template b/srcpkgs/libtirpc/template
index 88e331d0623942..298de5fb83c367 100644
--- a/srcpkgs/libtirpc/template
+++ b/srcpkgs/libtirpc/template
@@ -1,6 +1,6 @@
# Template file for 'libtirpc'
pkgname=libtirpc
-version=1.3.5
+version=1.3.6
revision=1
build_style=gnu-configure
hostmakedepends="pkg-config mit-krb5-devel"
@@ -12,7 +12,7 @@ license="BSD-3-Clause"
homepage="https://sourceforge.net/projects/libtirpc/"
changelog="http://git.linux-nfs.org/?p=steved/libtirpc.git;a=shortlog"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.bz2"
-checksum=9b31370e5a38d3391bf37edfa22498e28fe2142467ae6be7a17c9068ec0bf12f
+checksum=bbd26a8f0df5690a62a47f6aa30f797f3ef8d02560d1bc449a83066b5a1d3508
case "$XBPS_TARGET_MACHINE" in
*-musl) makedepends+=" musl-legacy-compat" ;;
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR PATCH] [Updated] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6
2024-12-11 13:46 [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6 slymattz
` (4 preceding siblings ...)
2024-12-24 19:52 ` [PR PATCH] [Updated] " slymattz
@ 2025-01-10 17:06 ` slymattz
2025-03-31 20:33 ` slymattz
` (14 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: slymattz @ 2025-01-10 17:06 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1738 bytes --]
There is an updated pull request by slymattz against master on the void-packages repository
https://github.com/slymattz/void-packages nfs-utils-2.8.2
https://github.com/void-linux/void-packages/pull/53467
nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- x86_64-musl
#### Patching for musl
1. _musl-svcgssd-sysconf.patch_ was used to prevent buffer overflow. However, the problem has been solved [upstream](https://patchwork.kernel.org/project/linux-nfs/patch/20241201153637.449538-1-b.tataroiu@gmail.com/)
2. _nfs-utils-2.7.1-define_macros_for_musl.patch_ has been incorporated upstream
3. _musl-getservbyport.patch_ stays as it hasn't been applied upstream
3. _musl-fix_long_unsigned_int.patch_ also stays as it fixes compilation errors on musl (for reference, see https://github.com/void-linux/void-packages/pull/52088#issue-2501336506)
A patch file from https://github.com/void-linux/void-packages/pull/53467.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nfs-utils-2.8.2-53467.patch --]
[-- Type: text/x-diff, Size: 7489 bytes --]
From d06b50685f8aca7b5e918354b81fa2b3abc0938b Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Mon, 2 Dec 2024 14:03:53 +0100
Subject: [PATCH 1/2] nfs-utils: update to 2.8.2
---
.../patches/musl-svcgssd-sysconf.patch | 103 ------------------
...s-utils-2.7.1-define_macros_for_musl.patch | 38 -------
srcpkgs/nfs-utils/template | 6 +-
3 files changed, 3 insertions(+), 144 deletions(-)
delete mode 100644 srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
delete mode 100644 srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
diff --git a/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch b/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
deleted file mode 100644
index aab0e9612bf23a..00000000000000
--- a/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
+++ /dev/null
@@ -1,103 +0,0 @@
---- a/support/nfsidmap/libnfsidmap.c
-+++ b/support/nfsidmap/libnfsidmap.c
-@@ -430,11 +430,17 @@
-
- nobody_user = conf_get_str("Mapping", "Nobody-User");
- if (nobody_user) {
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024; /*value on my gentoo glibc system that has _SC_GETPW_R_SIZE_MAX*/
- struct passwd *buf;
- struct passwd *pw = NULL;
- int err;
-
-+ /*sysconf can return -1 when _SC_GETPW_R_SIZE_MAX is not defined, like on musl systems, if cast to size_t this will lead
-+ to an integer overflow, which leads to a buffer overflow and crashes svcgssd */
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(sizeof(*buf) + buflen);
- if (buf) {
- err = getpwnam_r(nobody_user, buf, ((char *)buf) + sizeof(*buf), buflen, &pw);
-@@ -451,10 +457,16 @@
-
- nobody_group = conf_get_str("Mapping", "Nobody-Group");
- if (nobody_group) {
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024; /*value on my gentoo glibc system that has _SC_GETGR_R_SIZE_MAX*/
- struct group *buf;
- struct group *gr = NULL;
- int err;
-+
-+ /*sysconf can return -1 when _SC_GETGR_R_SIZE_MAX is not defined, like on musl systems, if cast to size_t this will lead
-+ to an integer overflow, which leads to a buffer overflow and crashes svcgssd */
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- buf = malloc(sizeof(*buf) + buflen);
- if (buf) {
---- a/support/nfsidmap/static.c
-+++ b/support/nfsidmap/static.c
-@@ -98,10 +98,14 @@
- {
- struct passwd *pw;
- struct pwbuf *buf;
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024;
- char *localname;
- int err;
-
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(sizeof(*buf) + buflen);
- if (!buf) {
- err = ENOMEM;
-@@ -149,9 +153,13 @@
- {
- struct group *gr;
- struct grbuf *buf;
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024;
- char *localgroup;
- int err;
-+
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- buf = malloc(sizeof(*buf) + buflen);
- if (!buf) {
---- a/support/nfsidmap/nss.c
-+++ b/support/nfsidmap/nss.c
-@@ -91,9 +91,13 @@
- struct passwd *pw = NULL;
- struct passwd pwbuf;
- char *buf;
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024;
- int err = -ENOMEM;
-
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(buflen);
- if (!buf)
- goto out;
-@@ -119,8 +123,12 @@
- struct group *gr = NULL;
- struct group grbuf;
- char *buf;
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024;
- int err;
-+
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- if (domain == NULL)
- domain = get_default_domain();
diff --git a/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch b/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
deleted file mode 100644
index df4c2db84341de..00000000000000
--- a/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff --git a/support/junction/path.c b/support/junction/path.c
-index 13a14386..dd0f59a0 100644
---- a/support/junction/path.c
-+++ b/support/junction/path.c
-@@ -23,6 +23,12 @@
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
- */
-
-+/* For musl */
-+#ifndef _GNU_SOURCE
-+#define _GNU_SOURCE
-+#endif
-+#include <limits.h>
-+
- #include <sys/types.h>
- #include <sys/stat.h>
-
-diff --git a/support/include/junction.h b/support/include/junction.h
-index 7257d80b..d127dd55 100644
---- a/support/include/junction.h
-+++ b/support/include/junction.h
-@@ -26,6 +26,16 @@
- #ifndef _NFS_JUNCTION_H_
- #define _NFS_JUNCTION_H_
-
-+/* For musl, refered to glibc's sys/cdefs.h */
-+#ifndef __attribute_malloc__
-+#define __attribute_malloc__ __attribute__((__malloc__))
-+#endif
-+
-+/* For musl, refered to glibc's sys/stat.h */
-+#ifndef ALLPERMS
-+#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
-+#endif
-+
- #include <stdint.h>
-
- /*
diff --git a/srcpkgs/nfs-utils/template b/srcpkgs/nfs-utils/template
index 60da30200b697b..2a393e9cd9d511 100644
--- a/srcpkgs/nfs-utils/template
+++ b/srcpkgs/nfs-utils/template
@@ -1,6 +1,6 @@
# Template file for 'nfs-utils'
pkgname=nfs-utils
-version=2.7.1
+version=2.8.2
revision=1
build_style=gnu-configure
configure_args="--with-statduser=nobody --enable-gss --enable-nfsv4
@@ -13,14 +13,14 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://www.linux-nfs.org/"
distfiles="${KERNEL_SITE}/utils/${pkgname}/${version}/${pkgname}-${version}.tar.xz"
-checksum=885c948a84a58bca4148f459588f9a7369dbb40dcc466f04e455c6b10fd0aa48
+checksum=a39bbea76ac0ab9e6e8699caf3c308b6b310c20d458e8fa8606196d358e7fb15
replaces="rpcgen>=0"
hostmakedepends="pkg-config libtirpc-devel rpcsvc-proto mit-krb5-devel"
makedepends="libblkid-devel libmount-devel libtirpc-devel
keyutils-devel libevent-devel mit-krb5-devel
device-mapper-devel libcap-devel sqlite-devel
- libxml2-devel"
+ libxml2-devel libnl3-devel"
depends="rpcbind"
python_version=3
conf_files="/etc/exports"
From a58cc0a96de4dc51d0eb028a96fc246546a9af0e Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Wed, 11 Dec 2024 14:23:55 +0100
Subject: [PATCH 2/2] libtirpc: update to 1.3.6
---
srcpkgs/libtirpc/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/libtirpc/template b/srcpkgs/libtirpc/template
index 88e331d0623942..298de5fb83c367 100644
--- a/srcpkgs/libtirpc/template
+++ b/srcpkgs/libtirpc/template
@@ -1,6 +1,6 @@
# Template file for 'libtirpc'
pkgname=libtirpc
-version=1.3.5
+version=1.3.6
revision=1
build_style=gnu-configure
hostmakedepends="pkg-config mit-krb5-devel"
@@ -12,7 +12,7 @@ license="BSD-3-Clause"
homepage="https://sourceforge.net/projects/libtirpc/"
changelog="http://git.linux-nfs.org/?p=steved/libtirpc.git;a=shortlog"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.bz2"
-checksum=9b31370e5a38d3391bf37edfa22498e28fe2142467ae6be7a17c9068ec0bf12f
+checksum=bbd26a8f0df5690a62a47f6aa30f797f3ef8d02560d1bc449a83066b5a1d3508
case "$XBPS_TARGET_MACHINE" in
*-musl) makedepends+=" musl-legacy-compat" ;;
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR PATCH] [Updated] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6
2024-12-11 13:46 [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6 slymattz
` (5 preceding siblings ...)
2025-01-10 17:06 ` slymattz
@ 2025-03-31 20:33 ` slymattz
2025-03-31 20:41 ` slymattz
` (13 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: slymattz @ 2025-03-31 20:33 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1738 bytes --]
There is an updated pull request by slymattz against master on the void-packages repository
https://github.com/slymattz/void-packages nfs-utils-2.8.2
https://github.com/void-linux/void-packages/pull/53467
nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6
#### Testing the changes
- I tested the changes in this PR: **YES**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- x86_64-musl
#### Patching for musl
1. _musl-svcgssd-sysconf.patch_ was used to prevent buffer overflow. However, the problem has been solved [upstream](https://patchwork.kernel.org/project/linux-nfs/patch/20241201153637.449538-1-b.tataroiu@gmail.com/)
2. _nfs-utils-2.7.1-define_macros_for_musl.patch_ has been incorporated upstream
3. _musl-getservbyport.patch_ stays as it hasn't been applied upstream
3. _musl-fix_long_unsigned_int.patch_ also stays as it fixes compilation errors on musl (for reference, see https://github.com/void-linux/void-packages/pull/52088#issue-2501336506)
A patch file from https://github.com/void-linux/void-packages/pull/53467.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nfs-utils-2.8.2-53467.patch --]
[-- Type: text/x-diff, Size: 16888 bytes --]
From 65ca01ec3f2eab9ca088423dac63b37023043460 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Mon, 2 Dec 2024 14:03:53 +0100
Subject: [PATCH 1/2] nfs-utils: update to 2.8.3
---
.../patches/musl-fix_long_unsigned_int.patch | 76 ++++++-------
.../patches/musl-svcgssd-sysconf.patch | 103 ------------------
...s-utils-2.7.1-define_macros_for_musl.patch | 38 -------
srcpkgs/nfs-utils/template | 6 +-
4 files changed, 41 insertions(+), 182 deletions(-)
delete mode 100644 srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
delete mode 100644 srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
diff --git a/srcpkgs/nfs-utils/patches/musl-fix_long_unsigned_int.patch b/srcpkgs/nfs-utils/patches/musl-fix_long_unsigned_int.patch
index 28dc1da9a34368..cffd7d308303bc 100644
--- a/srcpkgs/nfs-utils/patches/musl-fix_long_unsigned_int.patch
+++ b/srcpkgs/nfs-utils/patches/musl-fix_long_unsigned_int.patch
@@ -1,5 +1,5 @@
---- a/utils/gssd/gssd.c 2024-08-20 14:30:33.000000000 +0200
-+++ b/utils/gssd/gssd.c 2024-09-08 13:01:06.098924979 +0200
+--- a/utils/gssd/gssd.c 2025-03-29 16:21:54.000000000 +0100
++++ b/utils/gssd/gssd.c 2025-03-31 22:19:59.859489111 +0200
@@ -65,6 +65,7 @@
#include <dirent.h>
#include <netdb.h>
@@ -15,7 +15,7 @@
- printerr(2, "watchdog: thread id 0x%lx cancelled successfully\n",
- info->tid);
+ printerr(2, "watchdog: thread id 0x%" PRIxPTR " cancelled successfully\n",
-+ (uintptr_t)info->tid);
++ (unsigned long)info->tid);
saveprev = info->list.tqe_prev;
TAILQ_REMOVE(&active_thread_list, info, list);
free(info);
@@ -26,7 +26,7 @@
- printerr(0, "watchdog: thread id 0x%lx timed out\n",
- info->tid);
+ printerr(0, "watchdog: thread id 0x%" PRIxPTR " timed out\n",
-+ (uintptr_t)info->tid);
++ (unsigned long)info->tid);
pthread_cancel(info->tid);
info->flags |= (UPCALL_THREAD_CANCELED|UPCALL_THREAD_WARNED);
do_error_downcall(info->fd, info->uid, -ETIMEDOUT);
@@ -35,7 +35,7 @@
- printerr(0, "watchdog: thread id 0x%lx running for %lld seconds\n",
- info->tid,
+ printerr(0, "watchdog: thread id 0x%" PRIxPTR " running for %lld seconds\n",
-+ (uintptr_t)info->tid,
++ (unsigned long)info->tid,
(long long int)(now.tv_sec - info->timeout.tv_sec + upcall_timeout));
info->flags |= UPCALL_THREAD_WARNED;
}
@@ -46,12 +46,12 @@
- printerr(0, "watchdog: attempt to join thread id 0x%lx returned %d (%s)!\n",
- info->tid, err, strerror(err));
+ printerr(0, "watchdog: attempt to join thread id 0x%" PRIxPTR " returned %d (%s)!\n",
-+ (uintptr_t)info->tid, err, strerror(err));
++ (unsigned long)info->tid, err, strerror(err));
break;
}
}
---- a/utils/gssd/gssd_proc.c 2024-08-20 14:30:33.000000000 +0200
-+++ b/utils/gssd/gssd_proc.c 2024-09-08 13:19:02.841249423 +0200
+--- a/utils/gssd/gssd_proc.c 2025-03-29 16:21:54.000000000 +0100
++++ b/utils/gssd/gssd_proc.c 2025-03-31 22:26:32.351326749 +0200
@@ -73,6 +73,7 @@
#ifdef HAVE_TIRPC_GSS_SECCREATE
#include <rpc/rpcsec_gss.h>
@@ -67,7 +67,7 @@
- printerr(2, "do_downcall(0x%lx): lifetime_rec=%s acceptor=%.*s\n",
- tid, sec2time(lifetime_rec), (int)acceptor->length, (char *)acceptor->value);
+ printerr(2, "do_downcall(0x%" PRIxPTR "): lifetime_rec=%s acceptor=%.*s\n",
-+ (uintptr_t)tid, sec2time(lifetime_rec), (int)acceptor->length, (char *)acceptor->value);
++ (unsigned long)tid, sec2time(lifetime_rec), (int)acceptor->length, (char *)acceptor->value);
buf_size = sizeof(uid) + sizeof(timeout) + sizeof(pd->pd_seq_win) +
sizeof(pd->pd_ctx_hndl.length) + pd->pd_ctx_hndl.length +
sizeof(context_token->length) + context_token->length +
@@ -76,7 +76,7 @@
out_err:
free(buf);
- printerr(1, "do_downcall(0x%lx): Failed to write downcall!\n", tid);
-+ printerr(1, "do_downcall(0x%" PRIxPTR "): Failed to write downcall!\n", (uintptr_t)tid);
++ printerr(1, "do_downcall(0x%" PRIxPTR "): Failed to write downcall!\n", (unsigned long)tid);
return;
}
@@ -85,7 +85,7 @@
pthread_t tid = pthread_self();
- printerr(2, "do_error_downcall(0x%lx): uid %d err %d\n", tid, uid, err);
-+ printerr(2, "do_error_downcall(0x%" PRIxPTR "): uid %d err %d\n", (uintptr_t)tid, uid, err);
++ printerr(2, "do_error_downcall(0x%" PRIxPTR "): uid %d err %d\n", (unsigned long)tid, uid, err);
if (WRITE_BYTES(&p, end, uid)) goto out_err;
if (WRITE_BYTES(&p, end, timeout)) goto out_err;
@@ -96,7 +96,7 @@
- printerr(3, "create_auth_rpc_client(0x%lx): creating %s client for server %s\n",
- tid, clp->protocol, clp->servername);
+ printerr(3, "create_auth_rpc_client(0x%" PRIxPTR "): creating %s client for server %s\n",
-+ (uintptr_t)tid, clp->protocol, clp->servername);
++ (unsigned long)tid, clp->protocol, clp->servername);
protocol = IPPROTO_TCP;
if ((strcmp(clp->protocol, "udp")) == 0)
@@ -107,54 +107,54 @@
- printerr(3, "create_auth_rpc_client(0x%lx): creating context with server %s\n",
- tid, tgtname);
+ printerr(3, "create_auth_rpc_client(0x%" PRIxPTR "): creating context with server %s\n",
-+ (uintptr_t)tid, tgtname);
++ (unsigned long)tid, tgtname);
#ifdef HAVE_TIRPC_GSS_SECCREATE
memset(&req, 0, sizeof(req));
req.my_cred = sec.cred;
-@@ -553,8 +554,8 @@
+@@ -567,8 +568,8 @@
int err, resp = -1;
pthread_t tid = pthread_self();
- printerr(2, "krb5_not_machine_creds(0x%lx): uid %d tgtname %s\n",
- tid, uid, tgtname);
+ printerr(2, "krb5_not_machine_creds(0x%" PRIxPTR "): uid %d tgtname %s\n",
-+ (uintptr_t)tid, uid, tgtname);
++ (unsigned long)tid, uid, tgtname);
*chg_err = change_identity(uid);
if (*chg_err) {
-@@ -602,8 +603,8 @@
+@@ -616,8 +617,8 @@
int success = 0;
pthread_t tid = pthread_self();
- printerr(2, "krb5_use_machine_creds(0x%lx): uid %d tgtname %s\n",
- tid, uid, tgtname);
+ printerr(2, "krb5_use_machine_creds(0x%" PRIxPTR "): uid %d tgtname %s\n",
-+ (uintptr_t)tid, uid, tgtname);
++ (unsigned long)tid, uid, tgtname);
do {
gssd_refresh_krb5_machine_credential(clp->servername,
-@@ -943,8 +944,8 @@
+@@ -957,8 +958,8 @@
free(tinfo);
return ret;
}
- printerr(2, "start_upcall_thread(0x%lx): created thread id 0x%lx\n",
- tid, th);
+ printerr(2, "start_upcall_thread(0x%" PRIxPTR "): created thread id 0x%" PRIxPTR "\n",
-+ (uintptr_t)tid, (uintptr_t)th);
++ (unsigned long)tid, (unsigned long)th);
tinfo->tid = th;
pthread_mutex_lock(&active_thread_list_lock);
-@@ -1008,7 +1009,7 @@
+@@ -1022,7 +1023,7 @@
}
lbuf[lbuflen-1] = 0;
- printerr(2, "\n%s(0x%lx): '%s' (%s)\n", __func__, tid,
-+ printerr(2, "\n%s(0x%" PRIxPTR "): '%s' (%s)\n", __func__, (uintptr_t)tid,
++ printerr(2, "\n%s(0x%" PRIxPTR "): '%s' (%s)\n", __func__, (unsigned long)tid,
lbuf, clp->relpath);
for (p = strtok(lbuf, " "); p; p = strtok(NULL, " ")) {
---- a/utils/gssd/krb5_util.c 2024-08-20 14:30:33.000000000 +0200
-+++ b/utils/gssd/krb5_util.c 2024-09-08 13:25:58.884113095 +0200
+--- a/utils/gssd/krb5_util.c 2025-03-29 16:21:54.000000000 +0100
++++ b/utils/gssd/krb5_util.c 2025-03-31 22:25:50.008589085 +0200
@@ -123,6 +123,7 @@
#include <sys/types.h>
@@ -163,56 +163,56 @@
#include "nfslib.h"
#include "gssd.h"
-@@ -426,8 +427,8 @@
+@@ -420,8 +421,8 @@
now += 300;
pthread_mutex_lock(&ple_lock);
if (ple->ccname && ple->endtime > now && !nocache && !force_renew) {
- printerr(3, "%s(0x%lx): Credentials in CC '%s' are good until %s",
- __func__, tid, ple->ccname, ctime((time_t *)&ple->endtime));
+ printerr(3, "%s(0x%" PRIxPTR "): Credentials in CC '%s' are good until %s",
-+ __func__, (uintptr_t)tid, ple->ccname, ctime((time_t *)&ple->endtime));
++ __func__, (unsigned long)tid, ple->ccname, ctime((time_t *)&ple->endtime));
code = 0;
pthread_mutex_unlock(&ple_lock);
goto out;
-@@ -527,8 +528,8 @@
- }
+@@ -478,8 +479,8 @@
+ pthread_mutex_unlock(&ple_lock);
code = 0;
-- printerr(2, "%s(0x%lx): principal '%s' ccache:'%s'\n",
-- __func__, tid, pname, cc_name);
+- printerr(2, "%s(0x%lx): principal '%s' ccache:'%s'\n",
+- __func__, tid, pname, ple->ccname);
+ printerr(2, "%s(0x%" PRIxPTR "): principal '%s' ccache:'%s'\n",
-+ __func__, (uintptr_t)tid, pname, cc_name);
++ __func__, (unsigned long)tid, pname, ple->ccname);
out:
- #ifdef HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS
- if (init_opts)
-@@ -667,8 +668,8 @@
+ if (opts)
+ krb5_get_init_creds_opt_free(context, opts);
+@@ -614,8 +615,8 @@
/* Get full target hostname */
retval = getaddrinfo(inhost, NULL, &hints, &addrs);
if (retval) {
- printerr(1, "%s(0x%lx): getaddrinfo(%s) failed: %s\n",
- __func__, tid, inhost, gai_strerror(retval));
+ printerr(1, "%s(0x%" PRIxPTR "): getaddrinfo(%s) failed: %s\n",
-+ __func__, (uintptr_t)tid, inhost, gai_strerror(retval));
++ __func__, (unsigned long)tid, inhost, gai_strerror(retval));
goto out;
}
strncpy(outhost, addrs->ai_canonname, outhostlen);
-@@ -677,8 +678,8 @@
+@@ -624,8 +625,8 @@
*c = tolower(*c);
if (get_verbosity() && strcmp(inhost, outhost))
- printerr(1, "%s(0x%0lx): inhost '%s' different than outhost '%s'\n",
- __func__, tid, inhost, outhost);
+ printerr(1, "%s(0x%" PRIxPTR "): inhost '%s' different than outhost '%s'\n",
-+ __func__, (uintptr_t)tid, inhost, outhost);
++ __func__, (unsigned long)tid, inhost, outhost);
retval = 0;
out:
-@@ -1021,7 +1022,7 @@
+@@ -968,7 +969,7 @@
tried_upper = 1;
}
} else {
- printerr(2, "find_keytab_entry(0x%lx): Success getting keytab entry for '%s'\n",tid, spn);
-+ printerr(2, "find_keytab_entry(0x%" PRIxPTR "): Success getting keytab entry for '%s'\n", (uintptr_t)tid, spn);
++ printerr(2, "find_keytab_entry(0x%" PRIxPTR "): Success getting keytab entry for '%s'\n",(unsigned long)tid, spn);
retval = 0;
goto out;
}
diff --git a/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch b/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
deleted file mode 100644
index aab0e9612bf23a..00000000000000
--- a/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
+++ /dev/null
@@ -1,103 +0,0 @@
---- a/support/nfsidmap/libnfsidmap.c
-+++ b/support/nfsidmap/libnfsidmap.c
-@@ -430,11 +430,17 @@
-
- nobody_user = conf_get_str("Mapping", "Nobody-User");
- if (nobody_user) {
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024; /*value on my gentoo glibc system that has _SC_GETPW_R_SIZE_MAX*/
- struct passwd *buf;
- struct passwd *pw = NULL;
- int err;
-
-+ /*sysconf can return -1 when _SC_GETPW_R_SIZE_MAX is not defined, like on musl systems, if cast to size_t this will lead
-+ to an integer overflow, which leads to a buffer overflow and crashes svcgssd */
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(sizeof(*buf) + buflen);
- if (buf) {
- err = getpwnam_r(nobody_user, buf, ((char *)buf) + sizeof(*buf), buflen, &pw);
-@@ -451,10 +457,16 @@
-
- nobody_group = conf_get_str("Mapping", "Nobody-Group");
- if (nobody_group) {
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024; /*value on my gentoo glibc system that has _SC_GETGR_R_SIZE_MAX*/
- struct group *buf;
- struct group *gr = NULL;
- int err;
-+
-+ /*sysconf can return -1 when _SC_GETGR_R_SIZE_MAX is not defined, like on musl systems, if cast to size_t this will lead
-+ to an integer overflow, which leads to a buffer overflow and crashes svcgssd */
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- buf = malloc(sizeof(*buf) + buflen);
- if (buf) {
---- a/support/nfsidmap/static.c
-+++ b/support/nfsidmap/static.c
-@@ -98,10 +98,14 @@
- {
- struct passwd *pw;
- struct pwbuf *buf;
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024;
- char *localname;
- int err;
-
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(sizeof(*buf) + buflen);
- if (!buf) {
- err = ENOMEM;
-@@ -149,9 +153,13 @@
- {
- struct group *gr;
- struct grbuf *buf;
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024;
- char *localgroup;
- int err;
-+
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- buf = malloc(sizeof(*buf) + buflen);
- if (!buf) {
---- a/support/nfsidmap/nss.c
-+++ b/support/nfsidmap/nss.c
-@@ -91,9 +91,13 @@
- struct passwd *pw = NULL;
- struct passwd pwbuf;
- char *buf;
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024;
- int err = -ENOMEM;
-
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(buflen);
- if (!buf)
- goto out;
-@@ -119,8 +123,12 @@
- struct group *gr = NULL;
- struct group grbuf;
- char *buf;
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024;
- int err;
-+
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- if (domain == NULL)
- domain = get_default_domain();
diff --git a/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch b/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
deleted file mode 100644
index df4c2db84341de..00000000000000
--- a/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff --git a/support/junction/path.c b/support/junction/path.c
-index 13a14386..dd0f59a0 100644
---- a/support/junction/path.c
-+++ b/support/junction/path.c
-@@ -23,6 +23,12 @@
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
- */
-
-+/* For musl */
-+#ifndef _GNU_SOURCE
-+#define _GNU_SOURCE
-+#endif
-+#include <limits.h>
-+
- #include <sys/types.h>
- #include <sys/stat.h>
-
-diff --git a/support/include/junction.h b/support/include/junction.h
-index 7257d80b..d127dd55 100644
---- a/support/include/junction.h
-+++ b/support/include/junction.h
-@@ -26,6 +26,16 @@
- #ifndef _NFS_JUNCTION_H_
- #define _NFS_JUNCTION_H_
-
-+/* For musl, refered to glibc's sys/cdefs.h */
-+#ifndef __attribute_malloc__
-+#define __attribute_malloc__ __attribute__((__malloc__))
-+#endif
-+
-+/* For musl, refered to glibc's sys/stat.h */
-+#ifndef ALLPERMS
-+#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
-+#endif
-+
- #include <stdint.h>
-
- /*
diff --git a/srcpkgs/nfs-utils/template b/srcpkgs/nfs-utils/template
index 60da30200b697b..7c00bd883c7bd9 100644
--- a/srcpkgs/nfs-utils/template
+++ b/srcpkgs/nfs-utils/template
@@ -1,6 +1,6 @@
# Template file for 'nfs-utils'
pkgname=nfs-utils
-version=2.7.1
+version=2.8.3
revision=1
build_style=gnu-configure
configure_args="--with-statduser=nobody --enable-gss --enable-nfsv4
@@ -13,14 +13,14 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://www.linux-nfs.org/"
distfiles="${KERNEL_SITE}/utils/${pkgname}/${version}/${pkgname}-${version}.tar.xz"
-checksum=885c948a84a58bca4148f459588f9a7369dbb40dcc466f04e455c6b10fd0aa48
+checksum=11e7c5847a8423a72931c865bd9296e7fd56ff270a795a849183900961711725
replaces="rpcgen>=0"
hostmakedepends="pkg-config libtirpc-devel rpcsvc-proto mit-krb5-devel"
makedepends="libblkid-devel libmount-devel libtirpc-devel
keyutils-devel libevent-devel mit-krb5-devel
device-mapper-devel libcap-devel sqlite-devel
- libxml2-devel"
+ libxml2-devel libnl3-devel"
depends="rpcbind"
python_version=3
conf_files="/etc/exports"
From 20fecbb08b107c97821d4f76eb89629a56b4af74 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Wed, 11 Dec 2024 14:23:55 +0100
Subject: [PATCH 2/2] libtirpc: update to 1.3.6
---
srcpkgs/libtirpc/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/libtirpc/template b/srcpkgs/libtirpc/template
index 88e331d0623942..298de5fb83c367 100644
--- a/srcpkgs/libtirpc/template
+++ b/srcpkgs/libtirpc/template
@@ -1,6 +1,6 @@
# Template file for 'libtirpc'
pkgname=libtirpc
-version=1.3.5
+version=1.3.6
revision=1
build_style=gnu-configure
hostmakedepends="pkg-config mit-krb5-devel"
@@ -12,7 +12,7 @@ license="BSD-3-Clause"
homepage="https://sourceforge.net/projects/libtirpc/"
changelog="http://git.linux-nfs.org/?p=steved/libtirpc.git;a=shortlog"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.bz2"
-checksum=9b31370e5a38d3391bf37edfa22498e28fe2142467ae6be7a17c9068ec0bf12f
+checksum=bbd26a8f0df5690a62a47f6aa30f797f3ef8d02560d1bc449a83066b5a1d3508
case "$XBPS_TARGET_MACHINE" in
*-musl) makedepends+=" musl-legacy-compat" ;;
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR PATCH] [Updated] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6
2024-12-11 13:46 [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6 slymattz
` (6 preceding siblings ...)
2025-03-31 20:33 ` slymattz
@ 2025-03-31 20:41 ` slymattz
2025-04-10 19:22 ` nfs-utils: update to 2.8.3, " slymattz
` (12 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: slymattz @ 2025-03-31 20:41 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1742 bytes --]
There is an updated pull request by slymattz against master on the void-packages repository
https://github.com/slymattz/void-packages nfs-utils-2.8.2
https://github.com/void-linux/void-packages/pull/53467
nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6
#### Testing the changes
- I tested the changes in this PR: **testing**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- x86_64-musl
#### Patching for musl
1. _musl-svcgssd-sysconf.patch_ was used to prevent buffer overflow. However, the problem has been solved [upstream](https://patchwork.kernel.org/project/linux-nfs/patch/20241201153637.449538-1-b.tataroiu@gmail.com/)
2. _nfs-utils-2.7.1-define_macros_for_musl.patch_ has been incorporated upstream
3. _musl-getservbyport.patch_ stays as it hasn't been applied upstream
3. _musl-fix_long_unsigned_int.patch_ also stays as it fixes compilation errors on musl (for reference, see https://github.com/void-linux/void-packages/pull/52088#issue-2501336506)
A patch file from https://github.com/void-linux/void-packages/pull/53467.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nfs-utils-2.8.2-53467.patch --]
[-- Type: text/x-diff, Size: 11512 bytes --]
From bedea52e870818403368875fafa32f147c309fa1 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Mon, 2 Dec 2024 14:03:53 +0100
Subject: [PATCH 1/2] nfs-utils: update to 2.8.3
---
.../patches/musl-fix_long_unsigned_int.patch | 44 ++++----
.../patches/musl-svcgssd-sysconf.patch | 103 ------------------
...s-utils-2.7.1-define_macros_for_musl.patch | 38 -------
srcpkgs/nfs-utils/template | 6 +-
4 files changed, 25 insertions(+), 166 deletions(-)
delete mode 100644 srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
delete mode 100644 srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
diff --git a/srcpkgs/nfs-utils/patches/musl-fix_long_unsigned_int.patch b/srcpkgs/nfs-utils/patches/musl-fix_long_unsigned_int.patch
index 28dc1da9a34368..87900cb543c43a 100644
--- a/srcpkgs/nfs-utils/patches/musl-fix_long_unsigned_int.patch
+++ b/srcpkgs/nfs-utils/patches/musl-fix_long_unsigned_int.patch
@@ -1,5 +1,5 @@
---- a/utils/gssd/gssd.c 2024-08-20 14:30:33.000000000 +0200
-+++ b/utils/gssd/gssd.c 2024-09-08 13:01:06.098924979 +0200
+--- a/utils/gssd/gssd.c 2025-03-29 16:21:54.000000000 +0100
++++ b/utils/gssd/gssd.c 2025-03-31 22:19:59.859489111 +0200
@@ -65,6 +65,7 @@
#include <dirent.h>
#include <netdb.h>
@@ -50,8 +50,8 @@
break;
}
}
---- a/utils/gssd/gssd_proc.c 2024-08-20 14:30:33.000000000 +0200
-+++ b/utils/gssd/gssd_proc.c 2024-09-08 13:19:02.841249423 +0200
+--- a/utils/gssd/gssd_proc.c 2025-03-29 16:21:54.000000000 +0100
++++ b/utils/gssd/gssd_proc.c 2025-03-31 22:26:32.351326749 +0200
@@ -73,6 +73,7 @@
#ifdef HAVE_TIRPC_GSS_SECCREATE
#include <rpc/rpcsec_gss.h>
@@ -111,7 +111,7 @@
#ifdef HAVE_TIRPC_GSS_SECCREATE
memset(&req, 0, sizeof(req));
req.my_cred = sec.cred;
-@@ -553,8 +554,8 @@
+@@ -567,8 +568,8 @@
int err, resp = -1;
pthread_t tid = pthread_self();
@@ -122,7 +122,7 @@
*chg_err = change_identity(uid);
if (*chg_err) {
-@@ -602,8 +603,8 @@
+@@ -616,8 +617,8 @@
int success = 0;
pthread_t tid = pthread_self();
@@ -133,7 +133,7 @@
do {
gssd_refresh_krb5_machine_credential(clp->servername,
-@@ -943,8 +944,8 @@
+@@ -957,8 +958,8 @@
free(tinfo);
return ret;
}
@@ -144,7 +144,7 @@
tinfo->tid = th;
pthread_mutex_lock(&active_thread_list_lock);
-@@ -1008,7 +1009,7 @@
+@@ -1022,7 +1023,7 @@
}
lbuf[lbuflen-1] = 0;
@@ -153,8 +153,8 @@
lbuf, clp->relpath);
for (p = strtok(lbuf, " "); p; p = strtok(NULL, " ")) {
---- a/utils/gssd/krb5_util.c 2024-08-20 14:30:33.000000000 +0200
-+++ b/utils/gssd/krb5_util.c 2024-09-08 13:25:58.884113095 +0200
+--- a/utils/gssd/krb5_util.c 2025-03-29 16:21:54.000000000 +0100
++++ b/utils/gssd/krb5_util.c 2025-03-31 22:25:50.008589085 +0200
@@ -123,6 +123,7 @@
#include <sys/types.h>
@@ -163,7 +163,7 @@
#include "nfslib.h"
#include "gssd.h"
-@@ -426,8 +427,8 @@
+@@ -420,8 +421,8 @@
now += 300;
pthread_mutex_lock(&ple_lock);
if (ple->ccname && ple->endtime > now && !nocache && !force_renew) {
@@ -174,18 +174,18 @@
code = 0;
pthread_mutex_unlock(&ple_lock);
goto out;
-@@ -527,8 +528,8 @@
- }
+@@ -478,8 +479,8 @@
+ pthread_mutex_unlock(&ple_lock);
code = 0;
-- printerr(2, "%s(0x%lx): principal '%s' ccache:'%s'\n",
-- __func__, tid, pname, cc_name);
+- printerr(2, "%s(0x%lx): principal '%s' ccache:'%s'\n",
+- __func__, tid, pname, ple->ccname);
+ printerr(2, "%s(0x%" PRIxPTR "): principal '%s' ccache:'%s'\n",
-+ __func__, (uintptr_t)tid, pname, cc_name);
++ __func__, (uintptr_t)tid, pname, ple->ccname);
out:
- #ifdef HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS
- if (init_opts)
-@@ -667,8 +668,8 @@
+ if (opts)
+ krb5_get_init_creds_opt_free(context, opts);
+@@ -614,8 +615,8 @@
/* Get full target hostname */
retval = getaddrinfo(inhost, NULL, &hints, &addrs);
if (retval) {
@@ -196,7 +196,7 @@
goto out;
}
strncpy(outhost, addrs->ai_canonname, outhostlen);
-@@ -677,8 +678,8 @@
+@@ -624,8 +625,8 @@
*c = tolower(*c);
if (get_verbosity() && strcmp(inhost, outhost))
@@ -207,12 +207,12 @@
retval = 0;
out:
-@@ -1021,7 +1022,7 @@
+@@ -968,7 +969,7 @@
tried_upper = 1;
}
} else {
- printerr(2, "find_keytab_entry(0x%lx): Success getting keytab entry for '%s'\n",tid, spn);
-+ printerr(2, "find_keytab_entry(0x%" PRIxPTR "): Success getting keytab entry for '%s'\n", (uintptr_t)tid, spn);
++ printerr(2, "find_keytab_entry(0x%" PRIxPTR "): Success getting keytab entry for '%s'\n",(uintptr_t)tid, spn);
retval = 0;
goto out;
}
diff --git a/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch b/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
deleted file mode 100644
index aab0e9612bf23a..00000000000000
--- a/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
+++ /dev/null
@@ -1,103 +0,0 @@
---- a/support/nfsidmap/libnfsidmap.c
-+++ b/support/nfsidmap/libnfsidmap.c
-@@ -430,11 +430,17 @@
-
- nobody_user = conf_get_str("Mapping", "Nobody-User");
- if (nobody_user) {
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024; /*value on my gentoo glibc system that has _SC_GETPW_R_SIZE_MAX*/
- struct passwd *buf;
- struct passwd *pw = NULL;
- int err;
-
-+ /*sysconf can return -1 when _SC_GETPW_R_SIZE_MAX is not defined, like on musl systems, if cast to size_t this will lead
-+ to an integer overflow, which leads to a buffer overflow and crashes svcgssd */
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(sizeof(*buf) + buflen);
- if (buf) {
- err = getpwnam_r(nobody_user, buf, ((char *)buf) + sizeof(*buf), buflen, &pw);
-@@ -451,10 +457,16 @@
-
- nobody_group = conf_get_str("Mapping", "Nobody-Group");
- if (nobody_group) {
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024; /*value on my gentoo glibc system that has _SC_GETGR_R_SIZE_MAX*/
- struct group *buf;
- struct group *gr = NULL;
- int err;
-+
-+ /*sysconf can return -1 when _SC_GETGR_R_SIZE_MAX is not defined, like on musl systems, if cast to size_t this will lead
-+ to an integer overflow, which leads to a buffer overflow and crashes svcgssd */
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- buf = malloc(sizeof(*buf) + buflen);
- if (buf) {
---- a/support/nfsidmap/static.c
-+++ b/support/nfsidmap/static.c
-@@ -98,10 +98,14 @@
- {
- struct passwd *pw;
- struct pwbuf *buf;
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024;
- char *localname;
- int err;
-
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(sizeof(*buf) + buflen);
- if (!buf) {
- err = ENOMEM;
-@@ -149,9 +153,13 @@
- {
- struct group *gr;
- struct grbuf *buf;
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024;
- char *localgroup;
- int err;
-+
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- buf = malloc(sizeof(*buf) + buflen);
- if (!buf) {
---- a/support/nfsidmap/nss.c
-+++ b/support/nfsidmap/nss.c
-@@ -91,9 +91,13 @@
- struct passwd *pw = NULL;
- struct passwd pwbuf;
- char *buf;
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024;
- int err = -ENOMEM;
-
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(buflen);
- if (!buf)
- goto out;
-@@ -119,8 +123,12 @@
- struct group *gr = NULL;
- struct group grbuf;
- char *buf;
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024;
- int err;
-+
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- if (domain == NULL)
- domain = get_default_domain();
diff --git a/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch b/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
deleted file mode 100644
index df4c2db84341de..00000000000000
--- a/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff --git a/support/junction/path.c b/support/junction/path.c
-index 13a14386..dd0f59a0 100644
---- a/support/junction/path.c
-+++ b/support/junction/path.c
-@@ -23,6 +23,12 @@
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
- */
-
-+/* For musl */
-+#ifndef _GNU_SOURCE
-+#define _GNU_SOURCE
-+#endif
-+#include <limits.h>
-+
- #include <sys/types.h>
- #include <sys/stat.h>
-
-diff --git a/support/include/junction.h b/support/include/junction.h
-index 7257d80b..d127dd55 100644
---- a/support/include/junction.h
-+++ b/support/include/junction.h
-@@ -26,6 +26,16 @@
- #ifndef _NFS_JUNCTION_H_
- #define _NFS_JUNCTION_H_
-
-+/* For musl, refered to glibc's sys/cdefs.h */
-+#ifndef __attribute_malloc__
-+#define __attribute_malloc__ __attribute__((__malloc__))
-+#endif
-+
-+/* For musl, refered to glibc's sys/stat.h */
-+#ifndef ALLPERMS
-+#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
-+#endif
-+
- #include <stdint.h>
-
- /*
diff --git a/srcpkgs/nfs-utils/template b/srcpkgs/nfs-utils/template
index 60da30200b697b..7c00bd883c7bd9 100644
--- a/srcpkgs/nfs-utils/template
+++ b/srcpkgs/nfs-utils/template
@@ -1,6 +1,6 @@
# Template file for 'nfs-utils'
pkgname=nfs-utils
-version=2.7.1
+version=2.8.3
revision=1
build_style=gnu-configure
configure_args="--with-statduser=nobody --enable-gss --enable-nfsv4
@@ -13,14 +13,14 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://www.linux-nfs.org/"
distfiles="${KERNEL_SITE}/utils/${pkgname}/${version}/${pkgname}-${version}.tar.xz"
-checksum=885c948a84a58bca4148f459588f9a7369dbb40dcc466f04e455c6b10fd0aa48
+checksum=11e7c5847a8423a72931c865bd9296e7fd56ff270a795a849183900961711725
replaces="rpcgen>=0"
hostmakedepends="pkg-config libtirpc-devel rpcsvc-proto mit-krb5-devel"
makedepends="libblkid-devel libmount-devel libtirpc-devel
keyutils-devel libevent-devel mit-krb5-devel
device-mapper-devel libcap-devel sqlite-devel
- libxml2-devel"
+ libxml2-devel libnl3-devel"
depends="rpcbind"
python_version=3
conf_files="/etc/exports"
From 5d517be155da5a2d7ff0f6c0ad849748a6d8bb57 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Wed, 11 Dec 2024 14:23:55 +0100
Subject: [PATCH 2/2] libtirpc: update to 1.3.6
---
srcpkgs/libtirpc/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/libtirpc/template b/srcpkgs/libtirpc/template
index 88e331d0623942..298de5fb83c367 100644
--- a/srcpkgs/libtirpc/template
+++ b/srcpkgs/libtirpc/template
@@ -1,6 +1,6 @@
# Template file for 'libtirpc'
pkgname=libtirpc
-version=1.3.5
+version=1.3.6
revision=1
build_style=gnu-configure
hostmakedepends="pkg-config mit-krb5-devel"
@@ -12,7 +12,7 @@ license="BSD-3-Clause"
homepage="https://sourceforge.net/projects/libtirpc/"
changelog="http://git.linux-nfs.org/?p=steved/libtirpc.git;a=shortlog"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.bz2"
-checksum=9b31370e5a38d3391bf37edfa22498e28fe2142467ae6be7a17c9068ec0bf12f
+checksum=bbd26a8f0df5690a62a47f6aa30f797f3ef8d02560d1bc449a83066b5a1d3508
case "$XBPS_TARGET_MACHINE" in
*-musl) makedepends+=" musl-legacy-compat" ;;
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: nfs-utils: update to 2.8.3, libtirpc: update to 1.3.6
2024-12-11 13:46 [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6 slymattz
` (7 preceding siblings ...)
2025-03-31 20:41 ` slymattz
@ 2025-04-10 19:22 ` slymattz
2025-04-10 20:28 ` slymattz
` (11 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: slymattz @ 2025-04-10 19:22 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 326 bytes --]
New comment by slymattz on void-packages repository
https://github.com/void-linux/void-packages/pull/53467#issuecomment-2794934366
Comment:
@classabbyamp I've been testing this both on the server and client side in the past week and haven't encountered any issues while using nfs-utils 2.8.3. Does this PR look good to you?
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: nfs-utils: update to 2.8.3, libtirpc: update to 1.3.6
2024-12-11 13:46 [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6 slymattz
` (8 preceding siblings ...)
2025-04-10 19:22 ` nfs-utils: update to 2.8.3, " slymattz
@ 2025-04-10 20:28 ` slymattz
2025-04-10 20:32 ` slymattz
` (10 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: slymattz @ 2025-04-10 20:28 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 962 bytes --]
New comment by slymattz on void-packages repository
https://github.com/void-linux/void-packages/pull/53467#issuecomment-2794934366
Comment:
@classabbyamp I've been testing this both on the server and client side in the past week and haven't encountered any issues while using nfs-utils 2.8.3.
That being said, I do get a warning in dmesg:
```
[ 10.921372] NFSD: Unable to initialize client recovery tracking! (-110)
[ 10.921375] NFSD: Is nfsdcld running? If not, enable CONFIG_NFSD_LEGACY_CLIENT_TRACKING.
[ 10.921376] NFSD: starting 90-second grace period (net f0000000)
```
```
zcat /proc/config.gz | grep CONFIG_NFSD_LEGACY_CLIENT_TRACKING
# CONFIG_NFSD_LEGACY_CLIENT_TRACKING is not set
```
```
uname -r
6.12.20_1
```
The thing in question is better documented [here](https://bugs.gentoo.org/935724). I would love to pick someone's brain on this. Perhaps a new runit sv script should be written to start nfsdcld for nfsv4 servers.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: nfs-utils: update to 2.8.3, libtirpc: update to 1.3.6
2024-12-11 13:46 [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6 slymattz
` (9 preceding siblings ...)
2025-04-10 20:28 ` slymattz
@ 2025-04-10 20:32 ` slymattz
2025-04-10 21:12 ` slymattz
` (9 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: slymattz @ 2025-04-10 20:32 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 976 bytes --]
New comment by slymattz on void-packages repository
https://github.com/void-linux/void-packages/pull/53467#issuecomment-2794934366
Comment:
@classabbyamp I've been testing this both on the server and client side in the past week and haven't encountered any issues while using nfs-utils 2.8.3.
That being said, I do get a warning in dmesg on the server:
```
[ 10.921372] NFSD: Unable to initialize client recovery tracking! (-110)
[ 10.921375] NFSD: Is nfsdcld running? If not, enable CONFIG_NFSD_LEGACY_CLIENT_TRACKING.
[ 10.921376] NFSD: starting 90-second grace period (net f0000000)
```
```
zcat /proc/config.gz | grep CONFIG_NFSD_LEGACY_CLIENT_TRACKING
# CONFIG_NFSD_LEGACY_CLIENT_TRACKING is not set
```
```
uname -r
6.12.20_1
```
The thing in question is better documented [here](https://bugs.gentoo.org/935724). I would love to pick someone's brain on this. Perhaps a new runit sv script should be written to start nfsdcld for nfsv4 servers.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: nfs-utils: update to 2.8.3, libtirpc: update to 1.3.6
2024-12-11 13:46 [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6 slymattz
` (10 preceding siblings ...)
2025-04-10 20:32 ` slymattz
@ 2025-04-10 21:12 ` slymattz
2025-04-10 21:17 ` [PR PATCH] [Updated] " slymattz
` (8 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: slymattz @ 2025-04-10 21:12 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 846 bytes --]
New comment by slymattz on void-packages repository
https://github.com/void-linux/void-packages/pull/53467#issuecomment-2794934366
Comment:
@classabbyamp I've been testing this both on the server and client side in the past week and haven't encountered any issues while using nfs-utils 2.8.3.
That being said, I do get a warning in dmesg on the server:
```
[ 10.921372] NFSD: Unable to initialize client recovery tracking! (-110)
[ 10.921375] NFSD: Is nfsdcld running? If not, enable CONFIG_NFSD_LEGACY_CLIENT_TRACKING.
[ 10.921376] NFSD: starting 90-second grace period (net f0000000)
```
```
zcat /proc/config.gz | grep CONFIG_NFSD_LEGACY_CLIENT_TRACKING
# CONFIG_NFSD_LEGACY_CLIENT_TRACKING is not set
```
```
uname -r
6.12.20_1
```
The thing in question is better documented [here](https://bugs.gentoo.org/935724).
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR PATCH] [Updated] nfs-utils: update to 2.8.3, libtirpc: update to 1.3.6
2024-12-11 13:46 [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6 slymattz
` (11 preceding siblings ...)
2025-04-10 21:12 ` slymattz
@ 2025-04-10 21:17 ` slymattz
2025-04-10 21:24 ` slymattz
` (7 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: slymattz @ 2025-04-10 21:17 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1825 bytes --]
There is an updated pull request by slymattz against master on the void-packages repository
https://github.com/slymattz/void-packages nfs-utils-2.8.2
https://github.com/void-linux/void-packages/pull/53467
nfs-utils: update to 2.8.3, libtirpc: update to 1.3.6
#### Testing the changes
- I tested the changes in this PR (nfs-utils 2.8.3 + libtirpc 1.3.6): **YES (both server and client sides work as expected)**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- x86_64-musl
#### Patching for musl
1. _musl-svcgssd-sysconf.patch_ was used to prevent buffer overflow. However, the problem has been solved [upstream](https://patchwork.kernel.org/project/linux-nfs/patch/20241201153637.449538-1-b.tataroiu@gmail.com/)
2. _nfs-utils-2.7.1-define_macros_for_musl.patch_ has been incorporated upstream
3. _musl-getservbyport.patch_ stays as it hasn't been applied upstream
3. _musl-fix_long_unsigned_int.patch_ also stays as it fixes compilation errors on musl (for reference, see https://github.com/void-linux/void-packages/pull/52088#issue-2501336506)
A patch file from https://github.com/void-linux/void-packages/pull/53467.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nfs-utils-2.8.2-53467.patch --]
[-- Type: text/x-diff, Size: 12255 bytes --]
From 444e838722d12c6e1be606bca5ef4ffa9178ccce Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Mon, 2 Dec 2024 14:03:53 +0100
Subject: [PATCH 1/2] nfs-utils: update to 2.8.3
---
srcpkgs/nfs-utils/files/nfsdcld/run | 10 ++
.../patches/musl-fix_long_unsigned_int.patch | 44 ++++----
.../patches/musl-svcgssd-sysconf.patch | 103 ------------------
...s-utils-2.7.1-define_macros_for_musl.patch | 38 -------
srcpkgs/nfs-utils/template | 7 +-
5 files changed, 36 insertions(+), 166 deletions(-)
create mode 100644 srcpkgs/nfs-utils/files/nfsdcld/run
delete mode 100644 srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
delete mode 100644 srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
diff --git a/srcpkgs/nfs-utils/files/nfsdcld/run b/srcpkgs/nfs-utils/files/nfsdcld/run
new file mode 100644
index 00000000000000..8fba3d0d2e59a4
--- /dev/null
+++ b/srcpkgs/nfs-utils/files/nfsdcld/run
@@ -0,0 +1,10 @@
+#!/bin/sh
+exec 2>&1
+
+# Make sure the nfs-server service is running.
+sv check nfs-server >/dev/null || exit 1
+
+# Use custom settings for nfsdcld
+[ -r ./conf ] && . ./conf
+
+exec nfsdcld ${NFSDCLD_OPTS} --foreground
diff --git a/srcpkgs/nfs-utils/patches/musl-fix_long_unsigned_int.patch b/srcpkgs/nfs-utils/patches/musl-fix_long_unsigned_int.patch
index 28dc1da9a34368..87900cb543c43a 100644
--- a/srcpkgs/nfs-utils/patches/musl-fix_long_unsigned_int.patch
+++ b/srcpkgs/nfs-utils/patches/musl-fix_long_unsigned_int.patch
@@ -1,5 +1,5 @@
---- a/utils/gssd/gssd.c 2024-08-20 14:30:33.000000000 +0200
-+++ b/utils/gssd/gssd.c 2024-09-08 13:01:06.098924979 +0200
+--- a/utils/gssd/gssd.c 2025-03-29 16:21:54.000000000 +0100
++++ b/utils/gssd/gssd.c 2025-03-31 22:19:59.859489111 +0200
@@ -65,6 +65,7 @@
#include <dirent.h>
#include <netdb.h>
@@ -50,8 +50,8 @@
break;
}
}
---- a/utils/gssd/gssd_proc.c 2024-08-20 14:30:33.000000000 +0200
-+++ b/utils/gssd/gssd_proc.c 2024-09-08 13:19:02.841249423 +0200
+--- a/utils/gssd/gssd_proc.c 2025-03-29 16:21:54.000000000 +0100
++++ b/utils/gssd/gssd_proc.c 2025-03-31 22:26:32.351326749 +0200
@@ -73,6 +73,7 @@
#ifdef HAVE_TIRPC_GSS_SECCREATE
#include <rpc/rpcsec_gss.h>
@@ -111,7 +111,7 @@
#ifdef HAVE_TIRPC_GSS_SECCREATE
memset(&req, 0, sizeof(req));
req.my_cred = sec.cred;
-@@ -553,8 +554,8 @@
+@@ -567,8 +568,8 @@
int err, resp = -1;
pthread_t tid = pthread_self();
@@ -122,7 +122,7 @@
*chg_err = change_identity(uid);
if (*chg_err) {
-@@ -602,8 +603,8 @@
+@@ -616,8 +617,8 @@
int success = 0;
pthread_t tid = pthread_self();
@@ -133,7 +133,7 @@
do {
gssd_refresh_krb5_machine_credential(clp->servername,
-@@ -943,8 +944,8 @@
+@@ -957,8 +958,8 @@
free(tinfo);
return ret;
}
@@ -144,7 +144,7 @@
tinfo->tid = th;
pthread_mutex_lock(&active_thread_list_lock);
-@@ -1008,7 +1009,7 @@
+@@ -1022,7 +1023,7 @@
}
lbuf[lbuflen-1] = 0;
@@ -153,8 +153,8 @@
lbuf, clp->relpath);
for (p = strtok(lbuf, " "); p; p = strtok(NULL, " ")) {
---- a/utils/gssd/krb5_util.c 2024-08-20 14:30:33.000000000 +0200
-+++ b/utils/gssd/krb5_util.c 2024-09-08 13:25:58.884113095 +0200
+--- a/utils/gssd/krb5_util.c 2025-03-29 16:21:54.000000000 +0100
++++ b/utils/gssd/krb5_util.c 2025-03-31 22:25:50.008589085 +0200
@@ -123,6 +123,7 @@
#include <sys/types.h>
@@ -163,7 +163,7 @@
#include "nfslib.h"
#include "gssd.h"
-@@ -426,8 +427,8 @@
+@@ -420,8 +421,8 @@
now += 300;
pthread_mutex_lock(&ple_lock);
if (ple->ccname && ple->endtime > now && !nocache && !force_renew) {
@@ -174,18 +174,18 @@
code = 0;
pthread_mutex_unlock(&ple_lock);
goto out;
-@@ -527,8 +528,8 @@
- }
+@@ -478,8 +479,8 @@
+ pthread_mutex_unlock(&ple_lock);
code = 0;
-- printerr(2, "%s(0x%lx): principal '%s' ccache:'%s'\n",
-- __func__, tid, pname, cc_name);
+- printerr(2, "%s(0x%lx): principal '%s' ccache:'%s'\n",
+- __func__, tid, pname, ple->ccname);
+ printerr(2, "%s(0x%" PRIxPTR "): principal '%s' ccache:'%s'\n",
-+ __func__, (uintptr_t)tid, pname, cc_name);
++ __func__, (uintptr_t)tid, pname, ple->ccname);
out:
- #ifdef HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS
- if (init_opts)
-@@ -667,8 +668,8 @@
+ if (opts)
+ krb5_get_init_creds_opt_free(context, opts);
+@@ -614,8 +615,8 @@
/* Get full target hostname */
retval = getaddrinfo(inhost, NULL, &hints, &addrs);
if (retval) {
@@ -196,7 +196,7 @@
goto out;
}
strncpy(outhost, addrs->ai_canonname, outhostlen);
-@@ -677,8 +678,8 @@
+@@ -624,8 +625,8 @@
*c = tolower(*c);
if (get_verbosity() && strcmp(inhost, outhost))
@@ -207,12 +207,12 @@
retval = 0;
out:
-@@ -1021,7 +1022,7 @@
+@@ -968,7 +969,7 @@
tried_upper = 1;
}
} else {
- printerr(2, "find_keytab_entry(0x%lx): Success getting keytab entry for '%s'\n",tid, spn);
-+ printerr(2, "find_keytab_entry(0x%" PRIxPTR "): Success getting keytab entry for '%s'\n", (uintptr_t)tid, spn);
++ printerr(2, "find_keytab_entry(0x%" PRIxPTR "): Success getting keytab entry for '%s'\n",(uintptr_t)tid, spn);
retval = 0;
goto out;
}
diff --git a/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch b/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
deleted file mode 100644
index aab0e9612bf23a..00000000000000
--- a/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
+++ /dev/null
@@ -1,103 +0,0 @@
---- a/support/nfsidmap/libnfsidmap.c
-+++ b/support/nfsidmap/libnfsidmap.c
-@@ -430,11 +430,17 @@
-
- nobody_user = conf_get_str("Mapping", "Nobody-User");
- if (nobody_user) {
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024; /*value on my gentoo glibc system that has _SC_GETPW_R_SIZE_MAX*/
- struct passwd *buf;
- struct passwd *pw = NULL;
- int err;
-
-+ /*sysconf can return -1 when _SC_GETPW_R_SIZE_MAX is not defined, like on musl systems, if cast to size_t this will lead
-+ to an integer overflow, which leads to a buffer overflow and crashes svcgssd */
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(sizeof(*buf) + buflen);
- if (buf) {
- err = getpwnam_r(nobody_user, buf, ((char *)buf) + sizeof(*buf), buflen, &pw);
-@@ -451,10 +457,16 @@
-
- nobody_group = conf_get_str("Mapping", "Nobody-Group");
- if (nobody_group) {
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024; /*value on my gentoo glibc system that has _SC_GETGR_R_SIZE_MAX*/
- struct group *buf;
- struct group *gr = NULL;
- int err;
-+
-+ /*sysconf can return -1 when _SC_GETGR_R_SIZE_MAX is not defined, like on musl systems, if cast to size_t this will lead
-+ to an integer overflow, which leads to a buffer overflow and crashes svcgssd */
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- buf = malloc(sizeof(*buf) + buflen);
- if (buf) {
---- a/support/nfsidmap/static.c
-+++ b/support/nfsidmap/static.c
-@@ -98,10 +98,14 @@
- {
- struct passwd *pw;
- struct pwbuf *buf;
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024;
- char *localname;
- int err;
-
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(sizeof(*buf) + buflen);
- if (!buf) {
- err = ENOMEM;
-@@ -149,9 +153,13 @@
- {
- struct group *gr;
- struct grbuf *buf;
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024;
- char *localgroup;
- int err;
-+
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- buf = malloc(sizeof(*buf) + buflen);
- if (!buf) {
---- a/support/nfsidmap/nss.c
-+++ b/support/nfsidmap/nss.c
-@@ -91,9 +91,13 @@
- struct passwd *pw = NULL;
- struct passwd pwbuf;
- char *buf;
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024;
- int err = -ENOMEM;
-
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(buflen);
- if (!buf)
- goto out;
-@@ -119,8 +123,12 @@
- struct group *gr = NULL;
- struct group grbuf;
- char *buf;
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024;
- int err;
-+
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- if (domain == NULL)
- domain = get_default_domain();
diff --git a/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch b/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
deleted file mode 100644
index df4c2db84341de..00000000000000
--- a/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff --git a/support/junction/path.c b/support/junction/path.c
-index 13a14386..dd0f59a0 100644
---- a/support/junction/path.c
-+++ b/support/junction/path.c
-@@ -23,6 +23,12 @@
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
- */
-
-+/* For musl */
-+#ifndef _GNU_SOURCE
-+#define _GNU_SOURCE
-+#endif
-+#include <limits.h>
-+
- #include <sys/types.h>
- #include <sys/stat.h>
-
-diff --git a/support/include/junction.h b/support/include/junction.h
-index 7257d80b..d127dd55 100644
---- a/support/include/junction.h
-+++ b/support/include/junction.h
-@@ -26,6 +26,16 @@
- #ifndef _NFS_JUNCTION_H_
- #define _NFS_JUNCTION_H_
-
-+/* For musl, refered to glibc's sys/cdefs.h */
-+#ifndef __attribute_malloc__
-+#define __attribute_malloc__ __attribute__((__malloc__))
-+#endif
-+
-+/* For musl, refered to glibc's sys/stat.h */
-+#ifndef ALLPERMS
-+#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
-+#endif
-+
- #include <stdint.h>
-
- /*
diff --git a/srcpkgs/nfs-utils/template b/srcpkgs/nfs-utils/template
index 60da30200b697b..77901c2b707f41 100644
--- a/srcpkgs/nfs-utils/template
+++ b/srcpkgs/nfs-utils/template
@@ -1,6 +1,6 @@
# Template file for 'nfs-utils'
pkgname=nfs-utils
-version=2.7.1
+version=2.8.3
revision=1
build_style=gnu-configure
configure_args="--with-statduser=nobody --enable-gss --enable-nfsv4
@@ -13,14 +13,14 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://www.linux-nfs.org/"
distfiles="${KERNEL_SITE}/utils/${pkgname}/${version}/${pkgname}-${version}.tar.xz"
-checksum=885c948a84a58bca4148f459588f9a7369dbb40dcc466f04e455c6b10fd0aa48
+checksum=11e7c5847a8423a72931c865bd9296e7fd56ff270a795a849183900961711725
replaces="rpcgen>=0"
hostmakedepends="pkg-config libtirpc-devel rpcsvc-proto mit-krb5-devel"
makedepends="libblkid-devel libmount-devel libtirpc-devel
keyutils-devel libevent-devel mit-krb5-devel
device-mapper-devel libcap-devel sqlite-devel
- libxml2-devel"
+ libxml2-devel libnl3-devel"
depends="rpcbind"
python_version=3
conf_files="/etc/exports"
@@ -53,6 +53,7 @@ post_install() {
vsv rpcsvcgssd
vsv statd
vsv nfs-server
+ vsv nfsdcld
# replacement scripts
rm -rf ${DESTDIR}/usr/bin/start-statd
vbin ${FILESDIR}/start-statd
From a82804eae316e52e6753e277e8ffa985e63298df Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Wed, 11 Dec 2024 14:23:55 +0100
Subject: [PATCH 2/2] libtirpc: update to 1.3.6
---
srcpkgs/libtirpc/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/libtirpc/template b/srcpkgs/libtirpc/template
index 88e331d0623942..298de5fb83c367 100644
--- a/srcpkgs/libtirpc/template
+++ b/srcpkgs/libtirpc/template
@@ -1,6 +1,6 @@
# Template file for 'libtirpc'
pkgname=libtirpc
-version=1.3.5
+version=1.3.6
revision=1
build_style=gnu-configure
hostmakedepends="pkg-config mit-krb5-devel"
@@ -12,7 +12,7 @@ license="BSD-3-Clause"
homepage="https://sourceforge.net/projects/libtirpc/"
changelog="http://git.linux-nfs.org/?p=steved/libtirpc.git;a=shortlog"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.bz2"
-checksum=9b31370e5a38d3391bf37edfa22498e28fe2142467ae6be7a17c9068ec0bf12f
+checksum=bbd26a8f0df5690a62a47f6aa30f797f3ef8d02560d1bc449a83066b5a1d3508
case "$XBPS_TARGET_MACHINE" in
*-musl) makedepends+=" musl-legacy-compat" ;;
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: nfs-utils: update to 2.8.3, libtirpc: update to 1.3.6
2024-12-11 13:46 [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6 slymattz
` (12 preceding siblings ...)
2025-04-10 21:17 ` [PR PATCH] [Updated] " slymattz
@ 2025-04-10 21:24 ` slymattz
2025-04-10 21:29 ` [PR PATCH] [Updated] " slymattz
` (6 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: slymattz @ 2025-04-10 21:24 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 681 bytes --]
New comment by slymattz on void-packages repository
https://github.com/void-linux/void-packages/pull/53467#issuecomment-2795200156
Comment:
OK. So I've prepared a runit service for nfsdcld as I'm running an nfs4 service on my server and this is what I get after linking the new service to /var/service/ and rebooting:
```
[ 10.661793] NFSD: Using nfsdcld client tracking operations.
[ 10.661802] NFSD: starting 90-second grace period (net f0000000)
[ 13.258038] r8169 0000:04:00.0 enp4s0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 18.235430] NFSD: all clients done reclaiming, ending NFSv4 grace period (net f0000000)
```
So it seems to be working properly.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR PATCH] [Updated] nfs-utils: update to 2.8.3, libtirpc: update to 1.3.6
2024-12-11 13:46 [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6 slymattz
` (13 preceding siblings ...)
2025-04-10 21:24 ` slymattz
@ 2025-04-10 21:29 ` slymattz
2025-04-10 21:34 ` [PR REVIEW] " classabbyamp
` (5 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: slymattz @ 2025-04-10 21:29 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1825 bytes --]
There is an updated pull request by slymattz against master on the void-packages repository
https://github.com/slymattz/void-packages nfs-utils-2.8.2
https://github.com/void-linux/void-packages/pull/53467
nfs-utils: update to 2.8.3, libtirpc: update to 1.3.6
#### Testing the changes
- I tested the changes in this PR (nfs-utils 2.8.3 + libtirpc 1.3.6): **YES (both server and client sides work as expected)**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- x86_64-musl
#### Patching for musl
1. _musl-svcgssd-sysconf.patch_ was used to prevent buffer overflow. However, the problem has been solved [upstream](https://patchwork.kernel.org/project/linux-nfs/patch/20241201153637.449538-1-b.tataroiu@gmail.com/)
2. _nfs-utils-2.7.1-define_macros_for_musl.patch_ has been incorporated upstream
3. _musl-getservbyport.patch_ stays as it hasn't been applied upstream
3. _musl-fix_long_unsigned_int.patch_ also stays as it fixes compilation errors on musl (for reference, see https://github.com/void-linux/void-packages/pull/52088#issue-2501336506)
A patch file from https://github.com/void-linux/void-packages/pull/53467.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nfs-utils-2.8.2-53467.patch --]
[-- Type: text/x-diff, Size: 12249 bytes --]
From 2dd29f825d8871559bc268df92f74439c2bd8ed9 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Mon, 2 Dec 2024 14:03:53 +0100
Subject: [PATCH 1/2] nfs-utils: update to 2.8.3
---
srcpkgs/nfs-utils/files/nfsdcld/run | 10 ++
.../patches/musl-fix_long_unsigned_int.patch | 44 ++++----
.../patches/musl-svcgssd-sysconf.patch | 103 ------------------
...s-utils-2.7.1-define_macros_for_musl.patch | 38 -------
srcpkgs/nfs-utils/template | 7 +-
5 files changed, 36 insertions(+), 166 deletions(-)
create mode 100644 srcpkgs/nfs-utils/files/nfsdcld/run
delete mode 100644 srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
delete mode 100644 srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
diff --git a/srcpkgs/nfs-utils/files/nfsdcld/run b/srcpkgs/nfs-utils/files/nfsdcld/run
new file mode 100644
index 00000000000000..cf0d6d1eb5ae79
--- /dev/null
+++ b/srcpkgs/nfs-utils/files/nfsdcld/run
@@ -0,0 +1,10 @@
+#!/bin/sh
+exec 2>&1
+
+# Make sure the nfs-server service is running.
+sv check nfs-server >/dev/null || exit 1
+
+# Use custom settings for nfsdcld
+[ -r ./conf ] && . ./conf
+
+exec nfsdcld ${OPTS:- --foreground}
diff --git a/srcpkgs/nfs-utils/patches/musl-fix_long_unsigned_int.patch b/srcpkgs/nfs-utils/patches/musl-fix_long_unsigned_int.patch
index 28dc1da9a34368..87900cb543c43a 100644
--- a/srcpkgs/nfs-utils/patches/musl-fix_long_unsigned_int.patch
+++ b/srcpkgs/nfs-utils/patches/musl-fix_long_unsigned_int.patch
@@ -1,5 +1,5 @@
---- a/utils/gssd/gssd.c 2024-08-20 14:30:33.000000000 +0200
-+++ b/utils/gssd/gssd.c 2024-09-08 13:01:06.098924979 +0200
+--- a/utils/gssd/gssd.c 2025-03-29 16:21:54.000000000 +0100
++++ b/utils/gssd/gssd.c 2025-03-31 22:19:59.859489111 +0200
@@ -65,6 +65,7 @@
#include <dirent.h>
#include <netdb.h>
@@ -50,8 +50,8 @@
break;
}
}
---- a/utils/gssd/gssd_proc.c 2024-08-20 14:30:33.000000000 +0200
-+++ b/utils/gssd/gssd_proc.c 2024-09-08 13:19:02.841249423 +0200
+--- a/utils/gssd/gssd_proc.c 2025-03-29 16:21:54.000000000 +0100
++++ b/utils/gssd/gssd_proc.c 2025-03-31 22:26:32.351326749 +0200
@@ -73,6 +73,7 @@
#ifdef HAVE_TIRPC_GSS_SECCREATE
#include <rpc/rpcsec_gss.h>
@@ -111,7 +111,7 @@
#ifdef HAVE_TIRPC_GSS_SECCREATE
memset(&req, 0, sizeof(req));
req.my_cred = sec.cred;
-@@ -553,8 +554,8 @@
+@@ -567,8 +568,8 @@
int err, resp = -1;
pthread_t tid = pthread_self();
@@ -122,7 +122,7 @@
*chg_err = change_identity(uid);
if (*chg_err) {
-@@ -602,8 +603,8 @@
+@@ -616,8 +617,8 @@
int success = 0;
pthread_t tid = pthread_self();
@@ -133,7 +133,7 @@
do {
gssd_refresh_krb5_machine_credential(clp->servername,
-@@ -943,8 +944,8 @@
+@@ -957,8 +958,8 @@
free(tinfo);
return ret;
}
@@ -144,7 +144,7 @@
tinfo->tid = th;
pthread_mutex_lock(&active_thread_list_lock);
-@@ -1008,7 +1009,7 @@
+@@ -1022,7 +1023,7 @@
}
lbuf[lbuflen-1] = 0;
@@ -153,8 +153,8 @@
lbuf, clp->relpath);
for (p = strtok(lbuf, " "); p; p = strtok(NULL, " ")) {
---- a/utils/gssd/krb5_util.c 2024-08-20 14:30:33.000000000 +0200
-+++ b/utils/gssd/krb5_util.c 2024-09-08 13:25:58.884113095 +0200
+--- a/utils/gssd/krb5_util.c 2025-03-29 16:21:54.000000000 +0100
++++ b/utils/gssd/krb5_util.c 2025-03-31 22:25:50.008589085 +0200
@@ -123,6 +123,7 @@
#include <sys/types.h>
@@ -163,7 +163,7 @@
#include "nfslib.h"
#include "gssd.h"
-@@ -426,8 +427,8 @@
+@@ -420,8 +421,8 @@
now += 300;
pthread_mutex_lock(&ple_lock);
if (ple->ccname && ple->endtime > now && !nocache && !force_renew) {
@@ -174,18 +174,18 @@
code = 0;
pthread_mutex_unlock(&ple_lock);
goto out;
-@@ -527,8 +528,8 @@
- }
+@@ -478,8 +479,8 @@
+ pthread_mutex_unlock(&ple_lock);
code = 0;
-- printerr(2, "%s(0x%lx): principal '%s' ccache:'%s'\n",
-- __func__, tid, pname, cc_name);
+- printerr(2, "%s(0x%lx): principal '%s' ccache:'%s'\n",
+- __func__, tid, pname, ple->ccname);
+ printerr(2, "%s(0x%" PRIxPTR "): principal '%s' ccache:'%s'\n",
-+ __func__, (uintptr_t)tid, pname, cc_name);
++ __func__, (uintptr_t)tid, pname, ple->ccname);
out:
- #ifdef HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS
- if (init_opts)
-@@ -667,8 +668,8 @@
+ if (opts)
+ krb5_get_init_creds_opt_free(context, opts);
+@@ -614,8 +615,8 @@
/* Get full target hostname */
retval = getaddrinfo(inhost, NULL, &hints, &addrs);
if (retval) {
@@ -196,7 +196,7 @@
goto out;
}
strncpy(outhost, addrs->ai_canonname, outhostlen);
-@@ -677,8 +678,8 @@
+@@ -624,8 +625,8 @@
*c = tolower(*c);
if (get_verbosity() && strcmp(inhost, outhost))
@@ -207,12 +207,12 @@
retval = 0;
out:
-@@ -1021,7 +1022,7 @@
+@@ -968,7 +969,7 @@
tried_upper = 1;
}
} else {
- printerr(2, "find_keytab_entry(0x%lx): Success getting keytab entry for '%s'\n",tid, spn);
-+ printerr(2, "find_keytab_entry(0x%" PRIxPTR "): Success getting keytab entry for '%s'\n", (uintptr_t)tid, spn);
++ printerr(2, "find_keytab_entry(0x%" PRIxPTR "): Success getting keytab entry for '%s'\n",(uintptr_t)tid, spn);
retval = 0;
goto out;
}
diff --git a/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch b/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
deleted file mode 100644
index aab0e9612bf23a..00000000000000
--- a/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
+++ /dev/null
@@ -1,103 +0,0 @@
---- a/support/nfsidmap/libnfsidmap.c
-+++ b/support/nfsidmap/libnfsidmap.c
-@@ -430,11 +430,17 @@
-
- nobody_user = conf_get_str("Mapping", "Nobody-User");
- if (nobody_user) {
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024; /*value on my gentoo glibc system that has _SC_GETPW_R_SIZE_MAX*/
- struct passwd *buf;
- struct passwd *pw = NULL;
- int err;
-
-+ /*sysconf can return -1 when _SC_GETPW_R_SIZE_MAX is not defined, like on musl systems, if cast to size_t this will lead
-+ to an integer overflow, which leads to a buffer overflow and crashes svcgssd */
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(sizeof(*buf) + buflen);
- if (buf) {
- err = getpwnam_r(nobody_user, buf, ((char *)buf) + sizeof(*buf), buflen, &pw);
-@@ -451,10 +457,16 @@
-
- nobody_group = conf_get_str("Mapping", "Nobody-Group");
- if (nobody_group) {
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024; /*value on my gentoo glibc system that has _SC_GETGR_R_SIZE_MAX*/
- struct group *buf;
- struct group *gr = NULL;
- int err;
-+
-+ /*sysconf can return -1 when _SC_GETGR_R_SIZE_MAX is not defined, like on musl systems, if cast to size_t this will lead
-+ to an integer overflow, which leads to a buffer overflow and crashes svcgssd */
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- buf = malloc(sizeof(*buf) + buflen);
- if (buf) {
---- a/support/nfsidmap/static.c
-+++ b/support/nfsidmap/static.c
-@@ -98,10 +98,14 @@
- {
- struct passwd *pw;
- struct pwbuf *buf;
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024;
- char *localname;
- int err;
-
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(sizeof(*buf) + buflen);
- if (!buf) {
- err = ENOMEM;
-@@ -149,9 +153,13 @@
- {
- struct group *gr;
- struct grbuf *buf;
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024;
- char *localgroup;
- int err;
-+
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- buf = malloc(sizeof(*buf) + buflen);
- if (!buf) {
---- a/support/nfsidmap/nss.c
-+++ b/support/nfsidmap/nss.c
-@@ -91,9 +91,13 @@
- struct passwd *pw = NULL;
- struct passwd pwbuf;
- char *buf;
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024;
- int err = -ENOMEM;
-
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(buflen);
- if (!buf)
- goto out;
-@@ -119,8 +123,12 @@
- struct group *gr = NULL;
- struct group grbuf;
- char *buf;
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024;
- int err;
-+
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- if (domain == NULL)
- domain = get_default_domain();
diff --git a/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch b/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
deleted file mode 100644
index df4c2db84341de..00000000000000
--- a/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff --git a/support/junction/path.c b/support/junction/path.c
-index 13a14386..dd0f59a0 100644
---- a/support/junction/path.c
-+++ b/support/junction/path.c
-@@ -23,6 +23,12 @@
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
- */
-
-+/* For musl */
-+#ifndef _GNU_SOURCE
-+#define _GNU_SOURCE
-+#endif
-+#include <limits.h>
-+
- #include <sys/types.h>
- #include <sys/stat.h>
-
-diff --git a/support/include/junction.h b/support/include/junction.h
-index 7257d80b..d127dd55 100644
---- a/support/include/junction.h
-+++ b/support/include/junction.h
-@@ -26,6 +26,16 @@
- #ifndef _NFS_JUNCTION_H_
- #define _NFS_JUNCTION_H_
-
-+/* For musl, refered to glibc's sys/cdefs.h */
-+#ifndef __attribute_malloc__
-+#define __attribute_malloc__ __attribute__((__malloc__))
-+#endif
-+
-+/* For musl, refered to glibc's sys/stat.h */
-+#ifndef ALLPERMS
-+#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
-+#endif
-+
- #include <stdint.h>
-
- /*
diff --git a/srcpkgs/nfs-utils/template b/srcpkgs/nfs-utils/template
index 60da30200b697b..77901c2b707f41 100644
--- a/srcpkgs/nfs-utils/template
+++ b/srcpkgs/nfs-utils/template
@@ -1,6 +1,6 @@
# Template file for 'nfs-utils'
pkgname=nfs-utils
-version=2.7.1
+version=2.8.3
revision=1
build_style=gnu-configure
configure_args="--with-statduser=nobody --enable-gss --enable-nfsv4
@@ -13,14 +13,14 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://www.linux-nfs.org/"
distfiles="${KERNEL_SITE}/utils/${pkgname}/${version}/${pkgname}-${version}.tar.xz"
-checksum=885c948a84a58bca4148f459588f9a7369dbb40dcc466f04e455c6b10fd0aa48
+checksum=11e7c5847a8423a72931c865bd9296e7fd56ff270a795a849183900961711725
replaces="rpcgen>=0"
hostmakedepends="pkg-config libtirpc-devel rpcsvc-proto mit-krb5-devel"
makedepends="libblkid-devel libmount-devel libtirpc-devel
keyutils-devel libevent-devel mit-krb5-devel
device-mapper-devel libcap-devel sqlite-devel
- libxml2-devel"
+ libxml2-devel libnl3-devel"
depends="rpcbind"
python_version=3
conf_files="/etc/exports"
@@ -53,6 +53,7 @@ post_install() {
vsv rpcsvcgssd
vsv statd
vsv nfs-server
+ vsv nfsdcld
# replacement scripts
rm -rf ${DESTDIR}/usr/bin/start-statd
vbin ${FILESDIR}/start-statd
From 517f1080b03cf8087ca284c3ba256a511af2e104 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Wed, 11 Dec 2024 14:23:55 +0100
Subject: [PATCH 2/2] libtirpc: update to 1.3.6
---
srcpkgs/libtirpc/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/libtirpc/template b/srcpkgs/libtirpc/template
index 88e331d0623942..298de5fb83c367 100644
--- a/srcpkgs/libtirpc/template
+++ b/srcpkgs/libtirpc/template
@@ -1,6 +1,6 @@
# Template file for 'libtirpc'
pkgname=libtirpc
-version=1.3.5
+version=1.3.6
revision=1
build_style=gnu-configure
hostmakedepends="pkg-config mit-krb5-devel"
@@ -12,7 +12,7 @@ license="BSD-3-Clause"
homepage="https://sourceforge.net/projects/libtirpc/"
changelog="http://git.linux-nfs.org/?p=steved/libtirpc.git;a=shortlog"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.bz2"
-checksum=9b31370e5a38d3391bf37edfa22498e28fe2142467ae6be7a17c9068ec0bf12f
+checksum=bbd26a8f0df5690a62a47f6aa30f797f3ef8d02560d1bc449a83066b5a1d3508
case "$XBPS_TARGET_MACHINE" in
*-musl) makedepends+=" musl-legacy-compat" ;;
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR REVIEW] nfs-utils: update to 2.8.3, libtirpc: update to 1.3.6
2024-12-11 13:46 [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6 slymattz
` (14 preceding siblings ...)
2025-04-10 21:29 ` [PR PATCH] [Updated] " slymattz
@ 2025-04-10 21:34 ` classabbyamp
2025-04-10 21:35 ` classabbyamp
` (4 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: classabbyamp @ 2025-04-10 21:34 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 251 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/53467#discussion_r2038374216
Comment:
this does not check that nfs-server is running, because the nfs-server service has no `check` file
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR REVIEW] nfs-utils: update to 2.8.3, libtirpc: update to 1.3.6
2024-12-11 13:46 [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6 slymattz
` (15 preceding siblings ...)
2025-04-10 21:34 ` [PR REVIEW] " classabbyamp
@ 2025-04-10 21:35 ` classabbyamp
2025-04-10 21:45 ` slymattz
` (3 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: classabbyamp @ 2025-04-10 21:35 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 168 bytes --]
New review comment by classabbyamp on void-packages repository
https://github.com/void-linux/void-packages/pull/53467#discussion_r2038374680
Comment:
useless comment
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR REVIEW] nfs-utils: update to 2.8.3, libtirpc: update to 1.3.6
2024-12-11 13:46 [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6 slymattz
` (16 preceding siblings ...)
2025-04-10 21:35 ` classabbyamp
@ 2025-04-10 21:45 ` slymattz
2025-04-10 21:50 ` [PR PATCH] [Updated] " slymattz
` (2 subsequent siblings)
20 siblings, 0 replies; 22+ messages in thread
From: slymattz @ 2025-04-10 21:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 478 bytes --]
New review comment by slymattz on void-packages repository
https://github.com/void-linux/void-packages/pull/53467#discussion_r2038385162
Comment:
Point taken. But the run file for nfs-server has this line:
`sv check statd >/dev/null || exit 1`
And statd doesn't provide a check file.
I think I'm just going to delete this check line altogether. If I'm reading what Gentoo [does](https://935724.bugs.gentoo.org/attachment.cgi?id=918022) correctly, it shouldn't be there.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR PATCH] [Updated] nfs-utils: update to 2.8.3, libtirpc: update to 1.3.6
2024-12-11 13:46 [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6 slymattz
` (17 preceding siblings ...)
2025-04-10 21:45 ` slymattz
@ 2025-04-10 21:50 ` slymattz
2025-04-10 21:55 ` [PR REVIEW] " slymattz
2025-04-12 17:33 ` [PR PATCH] [Merged]: " classabbyamp
20 siblings, 0 replies; 22+ messages in thread
From: slymattz @ 2025-04-10 21:50 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1825 bytes --]
There is an updated pull request by slymattz against master on the void-packages repository
https://github.com/slymattz/void-packages nfs-utils-2.8.2
https://github.com/void-linux/void-packages/pull/53467
nfs-utils: update to 2.8.3, libtirpc: update to 1.3.6
#### Testing the changes
- I tested the changes in this PR (nfs-utils 2.8.3 + libtirpc 1.3.6): **YES (both server and client sides work as expected)**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- x86_64-musl
#### Patching for musl
1. _musl-svcgssd-sysconf.patch_ was used to prevent buffer overflow. However, the problem has been solved [upstream](https://patchwork.kernel.org/project/linux-nfs/patch/20241201153637.449538-1-b.tataroiu@gmail.com/)
2. _nfs-utils-2.7.1-define_macros_for_musl.patch_ has been incorporated upstream
3. _musl-getservbyport.patch_ stays as it hasn't been applied upstream
3. _musl-fix_long_unsigned_int.patch_ also stays as it fixes compilation errors on musl (for reference, see https://github.com/void-linux/void-packages/pull/52088#issue-2501336506)
A patch file from https://github.com/void-linux/void-packages/pull/53467.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nfs-utils-2.8.2-53467.patch --]
[-- Type: text/x-diff, Size: 12120 bytes --]
From 8ef8b5af263ec6fe45cb96add3f179f0a70f9d78 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Mon, 2 Dec 2024 14:03:53 +0100
Subject: [PATCH 1/2] nfs-utils: update to 2.8.3
---
srcpkgs/nfs-utils/files/nfsdcld/run | 6 +
.../patches/musl-fix_long_unsigned_int.patch | 44 ++++----
.../patches/musl-svcgssd-sysconf.patch | 103 ------------------
...s-utils-2.7.1-define_macros_for_musl.patch | 38 -------
srcpkgs/nfs-utils/template | 7 +-
5 files changed, 32 insertions(+), 166 deletions(-)
create mode 100644 srcpkgs/nfs-utils/files/nfsdcld/run
delete mode 100644 srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
delete mode 100644 srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
diff --git a/srcpkgs/nfs-utils/files/nfsdcld/run b/srcpkgs/nfs-utils/files/nfsdcld/run
new file mode 100644
index 00000000000000..c6cf1ca474758d
--- /dev/null
+++ b/srcpkgs/nfs-utils/files/nfsdcld/run
@@ -0,0 +1,6 @@
+#!/bin/sh
+exec 2>&1
+
+[ -r ./conf ] && . ./conf
+
+exec nfsdcld ${OPTS:- --foreground}
diff --git a/srcpkgs/nfs-utils/patches/musl-fix_long_unsigned_int.patch b/srcpkgs/nfs-utils/patches/musl-fix_long_unsigned_int.patch
index 28dc1da9a34368..87900cb543c43a 100644
--- a/srcpkgs/nfs-utils/patches/musl-fix_long_unsigned_int.patch
+++ b/srcpkgs/nfs-utils/patches/musl-fix_long_unsigned_int.patch
@@ -1,5 +1,5 @@
---- a/utils/gssd/gssd.c 2024-08-20 14:30:33.000000000 +0200
-+++ b/utils/gssd/gssd.c 2024-09-08 13:01:06.098924979 +0200
+--- a/utils/gssd/gssd.c 2025-03-29 16:21:54.000000000 +0100
++++ b/utils/gssd/gssd.c 2025-03-31 22:19:59.859489111 +0200
@@ -65,6 +65,7 @@
#include <dirent.h>
#include <netdb.h>
@@ -50,8 +50,8 @@
break;
}
}
---- a/utils/gssd/gssd_proc.c 2024-08-20 14:30:33.000000000 +0200
-+++ b/utils/gssd/gssd_proc.c 2024-09-08 13:19:02.841249423 +0200
+--- a/utils/gssd/gssd_proc.c 2025-03-29 16:21:54.000000000 +0100
++++ b/utils/gssd/gssd_proc.c 2025-03-31 22:26:32.351326749 +0200
@@ -73,6 +73,7 @@
#ifdef HAVE_TIRPC_GSS_SECCREATE
#include <rpc/rpcsec_gss.h>
@@ -111,7 +111,7 @@
#ifdef HAVE_TIRPC_GSS_SECCREATE
memset(&req, 0, sizeof(req));
req.my_cred = sec.cred;
-@@ -553,8 +554,8 @@
+@@ -567,8 +568,8 @@
int err, resp = -1;
pthread_t tid = pthread_self();
@@ -122,7 +122,7 @@
*chg_err = change_identity(uid);
if (*chg_err) {
-@@ -602,8 +603,8 @@
+@@ -616,8 +617,8 @@
int success = 0;
pthread_t tid = pthread_self();
@@ -133,7 +133,7 @@
do {
gssd_refresh_krb5_machine_credential(clp->servername,
-@@ -943,8 +944,8 @@
+@@ -957,8 +958,8 @@
free(tinfo);
return ret;
}
@@ -144,7 +144,7 @@
tinfo->tid = th;
pthread_mutex_lock(&active_thread_list_lock);
-@@ -1008,7 +1009,7 @@
+@@ -1022,7 +1023,7 @@
}
lbuf[lbuflen-1] = 0;
@@ -153,8 +153,8 @@
lbuf, clp->relpath);
for (p = strtok(lbuf, " "); p; p = strtok(NULL, " ")) {
---- a/utils/gssd/krb5_util.c 2024-08-20 14:30:33.000000000 +0200
-+++ b/utils/gssd/krb5_util.c 2024-09-08 13:25:58.884113095 +0200
+--- a/utils/gssd/krb5_util.c 2025-03-29 16:21:54.000000000 +0100
++++ b/utils/gssd/krb5_util.c 2025-03-31 22:25:50.008589085 +0200
@@ -123,6 +123,7 @@
#include <sys/types.h>
@@ -163,7 +163,7 @@
#include "nfslib.h"
#include "gssd.h"
-@@ -426,8 +427,8 @@
+@@ -420,8 +421,8 @@
now += 300;
pthread_mutex_lock(&ple_lock);
if (ple->ccname && ple->endtime > now && !nocache && !force_renew) {
@@ -174,18 +174,18 @@
code = 0;
pthread_mutex_unlock(&ple_lock);
goto out;
-@@ -527,8 +528,8 @@
- }
+@@ -478,8 +479,8 @@
+ pthread_mutex_unlock(&ple_lock);
code = 0;
-- printerr(2, "%s(0x%lx): principal '%s' ccache:'%s'\n",
-- __func__, tid, pname, cc_name);
+- printerr(2, "%s(0x%lx): principal '%s' ccache:'%s'\n",
+- __func__, tid, pname, ple->ccname);
+ printerr(2, "%s(0x%" PRIxPTR "): principal '%s' ccache:'%s'\n",
-+ __func__, (uintptr_t)tid, pname, cc_name);
++ __func__, (uintptr_t)tid, pname, ple->ccname);
out:
- #ifdef HAVE_KRB5_GET_INIT_CREDS_OPT_SET_ADDRESSLESS
- if (init_opts)
-@@ -667,8 +668,8 @@
+ if (opts)
+ krb5_get_init_creds_opt_free(context, opts);
+@@ -614,8 +615,8 @@
/* Get full target hostname */
retval = getaddrinfo(inhost, NULL, &hints, &addrs);
if (retval) {
@@ -196,7 +196,7 @@
goto out;
}
strncpy(outhost, addrs->ai_canonname, outhostlen);
-@@ -677,8 +678,8 @@
+@@ -624,8 +625,8 @@
*c = tolower(*c);
if (get_verbosity() && strcmp(inhost, outhost))
@@ -207,12 +207,12 @@
retval = 0;
out:
-@@ -1021,7 +1022,7 @@
+@@ -968,7 +969,7 @@
tried_upper = 1;
}
} else {
- printerr(2, "find_keytab_entry(0x%lx): Success getting keytab entry for '%s'\n",tid, spn);
-+ printerr(2, "find_keytab_entry(0x%" PRIxPTR "): Success getting keytab entry for '%s'\n", (uintptr_t)tid, spn);
++ printerr(2, "find_keytab_entry(0x%" PRIxPTR "): Success getting keytab entry for '%s'\n",(uintptr_t)tid, spn);
retval = 0;
goto out;
}
diff --git a/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch b/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
deleted file mode 100644
index aab0e9612bf23a..00000000000000
--- a/srcpkgs/nfs-utils/patches/musl-svcgssd-sysconf.patch
+++ /dev/null
@@ -1,103 +0,0 @@
---- a/support/nfsidmap/libnfsidmap.c
-+++ b/support/nfsidmap/libnfsidmap.c
-@@ -430,11 +430,17 @@
-
- nobody_user = conf_get_str("Mapping", "Nobody-User");
- if (nobody_user) {
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024; /*value on my gentoo glibc system that has _SC_GETPW_R_SIZE_MAX*/
- struct passwd *buf;
- struct passwd *pw = NULL;
- int err;
-
-+ /*sysconf can return -1 when _SC_GETPW_R_SIZE_MAX is not defined, like on musl systems, if cast to size_t this will lead
-+ to an integer overflow, which leads to a buffer overflow and crashes svcgssd */
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(sizeof(*buf) + buflen);
- if (buf) {
- err = getpwnam_r(nobody_user, buf, ((char *)buf) + sizeof(*buf), buflen, &pw);
-@@ -451,10 +457,16 @@
-
- nobody_group = conf_get_str("Mapping", "Nobody-Group");
- if (nobody_group) {
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024; /*value on my gentoo glibc system that has _SC_GETGR_R_SIZE_MAX*/
- struct group *buf;
- struct group *gr = NULL;
- int err;
-+
-+ /*sysconf can return -1 when _SC_GETGR_R_SIZE_MAX is not defined, like on musl systems, if cast to size_t this will lead
-+ to an integer overflow, which leads to a buffer overflow and crashes svcgssd */
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- buf = malloc(sizeof(*buf) + buflen);
- if (buf) {
---- a/support/nfsidmap/static.c
-+++ b/support/nfsidmap/static.c
-@@ -98,10 +98,14 @@
- {
- struct passwd *pw;
- struct pwbuf *buf;
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024;
- char *localname;
- int err;
-
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(sizeof(*buf) + buflen);
- if (!buf) {
- err = ENOMEM;
-@@ -149,9 +153,13 @@
- {
- struct group *gr;
- struct grbuf *buf;
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024;
- char *localgroup;
- int err;
-+
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- buf = malloc(sizeof(*buf) + buflen);
- if (!buf) {
---- a/support/nfsidmap/nss.c
-+++ b/support/nfsidmap/nss.c
-@@ -91,9 +91,13 @@
- struct passwd *pw = NULL;
- struct passwd pwbuf;
- char *buf;
-- size_t buflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETPW_R_SIZE_MAX);
-+ size_t buflen = 1024;
- int err = -ENOMEM;
-
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-+
- buf = malloc(buflen);
- if (!buf)
- goto out;
-@@ -119,8 +123,12 @@
- struct group *gr = NULL;
- struct group grbuf;
- char *buf;
-- size_t buflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ long scbuflen = sysconf(_SC_GETGR_R_SIZE_MAX);
-+ size_t buflen = 1024;
- int err;
-+
-+ if (scbuflen > 0)
-+ buflen = (size_t)scbuflen;
-
- if (domain == NULL)
- domain = get_default_domain();
diff --git a/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch b/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
deleted file mode 100644
index df4c2db84341de..00000000000000
--- a/srcpkgs/nfs-utils/patches/nfs-utils-2.7.1-define_macros_for_musl.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-diff --git a/support/junction/path.c b/support/junction/path.c
-index 13a14386..dd0f59a0 100644
---- a/support/junction/path.c
-+++ b/support/junction/path.c
-@@ -23,6 +23,12 @@
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
- */
-
-+/* For musl */
-+#ifndef _GNU_SOURCE
-+#define _GNU_SOURCE
-+#endif
-+#include <limits.h>
-+
- #include <sys/types.h>
- #include <sys/stat.h>
-
-diff --git a/support/include/junction.h b/support/include/junction.h
-index 7257d80b..d127dd55 100644
---- a/support/include/junction.h
-+++ b/support/include/junction.h
-@@ -26,6 +26,16 @@
- #ifndef _NFS_JUNCTION_H_
- #define _NFS_JUNCTION_H_
-
-+/* For musl, refered to glibc's sys/cdefs.h */
-+#ifndef __attribute_malloc__
-+#define __attribute_malloc__ __attribute__((__malloc__))
-+#endif
-+
-+/* For musl, refered to glibc's sys/stat.h */
-+#ifndef ALLPERMS
-+#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)/* 07777 */
-+#endif
-+
- #include <stdint.h>
-
- /*
diff --git a/srcpkgs/nfs-utils/template b/srcpkgs/nfs-utils/template
index 60da30200b697b..77901c2b707f41 100644
--- a/srcpkgs/nfs-utils/template
+++ b/srcpkgs/nfs-utils/template
@@ -1,6 +1,6 @@
# Template file for 'nfs-utils'
pkgname=nfs-utils
-version=2.7.1
+version=2.8.3
revision=1
build_style=gnu-configure
configure_args="--with-statduser=nobody --enable-gss --enable-nfsv4
@@ -13,14 +13,14 @@ maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later"
homepage="https://www.linux-nfs.org/"
distfiles="${KERNEL_SITE}/utils/${pkgname}/${version}/${pkgname}-${version}.tar.xz"
-checksum=885c948a84a58bca4148f459588f9a7369dbb40dcc466f04e455c6b10fd0aa48
+checksum=11e7c5847a8423a72931c865bd9296e7fd56ff270a795a849183900961711725
replaces="rpcgen>=0"
hostmakedepends="pkg-config libtirpc-devel rpcsvc-proto mit-krb5-devel"
makedepends="libblkid-devel libmount-devel libtirpc-devel
keyutils-devel libevent-devel mit-krb5-devel
device-mapper-devel libcap-devel sqlite-devel
- libxml2-devel"
+ libxml2-devel libnl3-devel"
depends="rpcbind"
python_version=3
conf_files="/etc/exports"
@@ -53,6 +53,7 @@ post_install() {
vsv rpcsvcgssd
vsv statd
vsv nfs-server
+ vsv nfsdcld
# replacement scripts
rm -rf ${DESTDIR}/usr/bin/start-statd
vbin ${FILESDIR}/start-statd
From 5c256ac6ba22a58cc857abce9fd8e3d9f9372336 Mon Sep 17 00:00:00 2001
From: Mateusz Sylwestrzak <slymattz@gmail.com>
Date: Wed, 11 Dec 2024 14:23:55 +0100
Subject: [PATCH 2/2] libtirpc: update to 1.3.6
---
srcpkgs/libtirpc/template | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/srcpkgs/libtirpc/template b/srcpkgs/libtirpc/template
index 88e331d0623942..298de5fb83c367 100644
--- a/srcpkgs/libtirpc/template
+++ b/srcpkgs/libtirpc/template
@@ -1,6 +1,6 @@
# Template file for 'libtirpc'
pkgname=libtirpc
-version=1.3.5
+version=1.3.6
revision=1
build_style=gnu-configure
hostmakedepends="pkg-config mit-krb5-devel"
@@ -12,7 +12,7 @@ license="BSD-3-Clause"
homepage="https://sourceforge.net/projects/libtirpc/"
changelog="http://git.linux-nfs.org/?p=steved/libtirpc.git;a=shortlog"
distfiles="${SOURCEFORGE_SITE}/${pkgname}/${pkgname}-${version}.tar.bz2"
-checksum=9b31370e5a38d3391bf37edfa22498e28fe2142467ae6be7a17c9068ec0bf12f
+checksum=bbd26a8f0df5690a62a47f6aa30f797f3ef8d02560d1bc449a83066b5a1d3508
case "$XBPS_TARGET_MACHINE" in
*-musl) makedepends+=" musl-legacy-compat" ;;
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR REVIEW] nfs-utils: update to 2.8.3, libtirpc: update to 1.3.6
2024-12-11 13:46 [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6 slymattz
` (18 preceding siblings ...)
2025-04-10 21:50 ` [PR PATCH] [Updated] " slymattz
@ 2025-04-10 21:55 ` slymattz
2025-04-12 17:33 ` [PR PATCH] [Merged]: " classabbyamp
20 siblings, 0 replies; 22+ messages in thread
From: slymattz @ 2025-04-10 21:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 632 bytes --]
New review comment by slymattz on void-packages repository
https://github.com/void-linux/void-packages/pull/53467#discussion_r2038394406
Comment:
```
#!/bin/sh
exec 2>&1
[ -r ./conf ] && . ./conf
exec nfsdcld ${OPTS:- --foreground}
```
Rebooted the server and it seems to be running fine.
Dmesg:
```
[ 10.748502] NFSD: Using nfsdcld client tracking operations.
[ 10.748506] NFSD: starting 90-second grace period (net f0000000)
[ 13.445710] r8169 0000:04:00.0 enp4s0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 21.388685] NFSD: all clients done reclaiming, ending NFSv4 grace period (net f0000000)
```
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [PR PATCH] [Merged]: nfs-utils: update to 2.8.3, libtirpc: update to 1.3.6
2024-12-11 13:46 [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6 slymattz
` (19 preceding siblings ...)
2025-04-10 21:55 ` [PR REVIEW] " slymattz
@ 2025-04-12 17:33 ` classabbyamp
20 siblings, 0 replies; 22+ messages in thread
From: classabbyamp @ 2025-04-12 17:33 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1659 bytes --]
There's a merged pull request on the void-packages repository
nfs-utils: update to 2.8.3, libtirpc: update to 1.3.6
https://github.com/void-linux/void-packages/pull/53467
Description:
#### Testing the changes
- I tested the changes in this PR (nfs-utils 2.8.3 + libtirpc 1.3.6): **YES (both server and client sides work as expected)**
<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture: x86_64-glibc
- I built this PR locally for these architectures (if supported. mark crossbuilds):
- x86_64-musl
#### Patching for musl
1. _musl-svcgssd-sysconf.patch_ was used to prevent buffer overflow. However, the problem has been solved [upstream](https://patchwork.kernel.org/project/linux-nfs/patch/20241201153637.449538-1-b.tataroiu@gmail.com/)
2. _nfs-utils-2.7.1-define_macros_for_musl.patch_ has been incorporated upstream
3. _musl-getservbyport.patch_ stays as it hasn't been applied upstream
3. _musl-fix_long_unsigned_int.patch_ also stays as it fixes compilation errors on musl (for reference, see https://github.com/void-linux/void-packages/pull/52088#issue-2501336506)
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2025-04-12 17:33 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-11 13:46 [PR PATCH] nfs-utils: update to 2.8.2, libtirpc: update to 1.3.6 slymattz
2024-12-11 14:18 ` [PR PATCH] [Updated] " slymattz
2024-12-11 14:21 ` slymattz
2024-12-24 18:58 ` classabbyamp
2024-12-24 19:47 ` slymattz
2024-12-24 19:52 ` [PR PATCH] [Updated] " slymattz
2025-01-10 17:06 ` slymattz
2025-03-31 20:33 ` slymattz
2025-03-31 20:41 ` slymattz
2025-04-10 19:22 ` nfs-utils: update to 2.8.3, " slymattz
2025-04-10 20:28 ` slymattz
2025-04-10 20:32 ` slymattz
2025-04-10 21:12 ` slymattz
2025-04-10 21:17 ` [PR PATCH] [Updated] " slymattz
2025-04-10 21:24 ` slymattz
2025-04-10 21:29 ` [PR PATCH] [Updated] " slymattz
2025-04-10 21:34 ` [PR REVIEW] " classabbyamp
2025-04-10 21:35 ` classabbyamp
2025-04-10 21:45 ` slymattz
2025-04-10 21:50 ` [PR PATCH] [Updated] " slymattz
2025-04-10 21:55 ` [PR REVIEW] " slymattz
2025-04-12 17:33 ` [PR PATCH] [Merged]: " classabbyamp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).