Github messages for voidlinux
 help / color / mirror / Atom feed
* [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
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ 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] 7+ 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
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ 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] 7+ 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
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ 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] 7+ 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
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ 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] 7+ 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
  2025-01-10 17:06 ` slymattz
  5 siblings, 0 replies; 7+ 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] 7+ 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
  5 siblings, 0 replies; 7+ 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] 7+ 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
  5 siblings, 0 replies; 7+ 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] 7+ messages in thread

end of thread, other threads:[~2025-01-10 17:06 UTC | newest]

Thread overview: 7+ 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

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).