pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Sync to pkgsrc 2023Q3.
Module Name: pkgsrc-wip
Committed By: Alexander Schreiber <als%thangorodrim.de@localhost>
Pushed By: als
Date: Wed Oct 23 23:08:22 2024 +0200
Changeset: dde374d90baf73ea95aa30bd5fbbc028a40b8c3e
Modified Files:
glusterfs/MESSAGE.Linux
glusterfs/Makefile
glusterfs/PLIST.Linux
glusterfs/PLIST.NetBSD
glusterfs/PLIST.common
glusterfs/distinfo
glusterfs/files/glusterd.sh
glusterfs/patches/patch-configure.ac
Added Files:
glusterfs/patches/patch-api_src_glfs.c
glusterfs/patches/patch-cli_src_cli-cmd-parser.c
glusterfs/patches/patch-cli_src_cli-xml-output.c
glusterfs/patches/patch-contrib_umountd_umountd.c
glusterfs/patches/patch-extras_geo-rep_gsync-sync-gfid.c
glusterfs/patches/patch-geo-replication_src_procdiggy.c
glusterfs/patches/patch-libglusterfs_src_glusterfs_logging.h
glusterfs/patches/patch-rpc_rpc-lib_src_xdr-rpc.h
glusterfs/patches/patch-xlators_cluster_ec_src_ec-code.c
glusterfs/patches/patch-xlators_cluster_ec_src_ec.c
glusterfs/patches/patch-xlators_debug_io-stats_src_io-stats.c
glusterfs/patches/patch-xlators_features_index_src_index.c
glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-ganesha.c
glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-geo-rep.c
glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-mountbroker.c
glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-pmap.c
glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-utils.c
glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-volume-set.c
glusterfs/patches/patch-xlators_storage_posix_src_posix-inode-fd-ops.c
Log Message:
Sync to pkgsrc 2023Q3.
Preparation for updating from upstream, so sync to current
state of official pkgsrc 2023Q3.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=dde374d90baf73ea95aa30bd5fbbc028a40b8c3e
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
glusterfs/MESSAGE.Linux | 2 +-
glusterfs/Makefile | 23 +++++----
glusterfs/PLIST.Linux | 6 +--
glusterfs/PLIST.NetBSD | 2 +-
glusterfs/PLIST.common | 2 +-
glusterfs/distinfo | 23 ++++++++-
glusterfs/files/glusterd.sh | 12 ++---
glusterfs/patches/patch-api_src_glfs.c | 16 +++++++
glusterfs/patches/patch-cli_src_cli-cmd-parser.c | 43 +++++++++++++++++
glusterfs/patches/patch-cli_src_cli-xml-output.c | 55 ++++++++++++++++++++++
glusterfs/patches/patch-configure.ac | 17 ++++++-
glusterfs/patches/patch-contrib_umountd_umountd.c | 25 ++++++++++
.../patches/patch-extras_geo-rep_gsync-sync-gfid.c | 16 +++++++
.../patches/patch-geo-replication_src_procdiggy.c | 25 ++++++++++
.../patch-libglusterfs_src_glusterfs_logging.h | 21 +++++++++
glusterfs/patches/patch-rpc_rpc-lib_src_xdr-rpc.h | 15 ++++++
.../patches/patch-xlators_cluster_ec_src_ec-code.c | 25 ++++++++++
.../patches/patch-xlators_cluster_ec_src_ec.c | 15 ++++++
.../patch-xlators_debug_io-stats_src_io-stats.c | 25 ++++++++++
.../patch-xlators_features_index_src_index.c | 24 ++++++++++
...ch-xlators_mgmt_glusterd_src_glusterd-ganesha.c | 25 ++++++++++
...ch-xlators_mgmt_glusterd_src_glusterd-geo-rep.c | 52 ++++++++++++++++++++
...lators_mgmt_glusterd_src_glusterd-mountbroker.c | 25 ++++++++++
...patch-xlators_mgmt_glusterd_src_glusterd-pmap.c | 25 ++++++++++
...atch-xlators_mgmt_glusterd_src_glusterd-utils.c | 16 +++++++
...xlators_mgmt_glusterd_src_glusterd-volume-set.c | 16 +++++++
...-xlators_storage_posix_src_posix-inode-fd-ops.c | 24 ++++++++++
27 files changed, 549 insertions(+), 26 deletions(-)
diffs:
diff --git a/glusterfs/MESSAGE.Linux b/glusterfs/MESSAGE.Linux
index 4685aaafe1..07a8538c20 100644
--- a/glusterfs/MESSAGE.Linux
+++ b/glusterfs/MESSAGE.Linux
@@ -1,5 +1,5 @@
===========================================================================
-$NetBSD$
+$NetBSD: MESSAGE.Linux,v 1.1 2023/06/04 00:45:01 gutteridge Exp $
For glusterfs servers:
- recommended filesystem: XFS
diff --git a/glusterfs/Makefile b/glusterfs/Makefile
index 8e8aeef873..fee4abe434 100644
--- a/glusterfs/Makefile
+++ b/glusterfs/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.116 2023/03/28 01:10:53 gutteridge Exp $
+# $NetBSD: Makefile,v 1.126 2024/08/19 06:08:08 wiz Exp $
DISTNAME= glusterfs-10.4
-# PKGREVISION= 2
+PKGREVISION= 7
CATEGORIES= filesystems
MASTER_SITES= https://bits.gluster.org/pub/gluster/glusterfs/src/
@@ -18,10 +18,10 @@ CONFIGURE_ARGS+= --disable-fusermount
CONFIGURE_ARGS+= --disable-fuse-notifications
CONFIGURE_ARGS+= --localstatedir=${VARBASE}
CONFIGURE_ARGS+= --without-tcmalloc
+# libtirpc not in pkgsrc (yet)
+# CONFIGURE_ARGS+= --without-libtirpc
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --datadir=${PREFIX}/share/examples/${PKGBASE}
-# libtirpc not in pkgsrc (yet)
-CONFIGURE_ARGS+= --without-libtirpc
# Upstream glusterfs effectively dropped support for 32bit platforms
# somewhere between 8.2 (works on e.g. NetBSD/i386) and 10.3 as various
@@ -135,11 +135,10 @@ pre-build:
${ECHO} "glusterd.vol.sample: glusterd.vol" >> Makefile && \
${ECHO} " cp glusterd.vol glusterd.vol.sample" >> Makefile
-
# Debug
-CFLAGS+= -g
-INSTALL_UNSTRIPPED= yes
-CONFIGURE_ARGS+= --enable-debug
+#CFLAGS+= -g
+#INSTALL_UNSTRIPPED= yes
+#CONFIGURE_ARGS+= --enable-debug
#.include "../../devel/boehm-gc/buildlink3.mk"
#CFLAGS+= -DGC_DEBUG
#CFLAGS+= -include gc.h
@@ -157,6 +156,13 @@ post-install:
${DESTDIR}/${PREFIX}/sbin/mount_glusterfs
.endif
+.include "../../lang/python/pyversion.mk"
+
+.if ${PYTHON_VERSION} > 311
+# uses distutils in configure
+TOOL_DEPENDS+= ${PYPKGPREFIX}-setuptools-[0-9]*:../../devel/py-setuptools
+.endif
+
.include "../../devel/libuuid/buildlink3.mk"
.include "../../devel/argp/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
@@ -170,6 +176,7 @@ BUILDLINK_API_DEPENDS.userspace-rcu+= userspace-rcu>=0.12.1
.endif
.include "../../lang/python/application.mk"
.include "../../lang/python/extension.mk"
+.include "../../devel/libtirpc/buildlink3.mk"
.if (${OPSYS} == "NetBSD" || ${OPSYS} == "FreeBSD") && exists(/usr/include/execinfo.h)
LIBS+= -lexecinfo
diff --git a/glusterfs/PLIST.Linux b/glusterfs/PLIST.Linux
index 98ffe287d7..c5dea93a25 100644
--- a/glusterfs/PLIST.Linux
+++ b/glusterfs/PLIST.Linux
@@ -1,11 +1,7 @@
-@comment $NetBSD$
+@comment $NetBSD: PLIST.Linux,v 1.1 2023/06/04 00:45:01 gutteridge Exp $
include/glusterfs/gf-io-uring.h
-lib/glusterfs/${GLUSTERFS_VERSION}/cloudsync-plugins/cloudsynccvlt.a
lib/glusterfs/${GLUSTERFS_VERSION}/cloudsync-plugins/cloudsynccvlt.la
-lib/glusterfs/${GLUSTERFS_VERSION}/cloudsync-plugins/cloudsynccvlt.so
-lib/glusterfs/${GLUSTERFS_VERSION}/xlator/features/cloudsync.a
lib/glusterfs/${GLUSTERFS_VERSION}/xlator/features/cloudsync.la
-lib/glusterfs/${GLUSTERFS_VERSION}/xlator/features/cloudsync.so
lib/systemd/system/gluster-ta-volume.service
lib/systemd/system/glusterd.service
lib/systemd/system/glustereventsd.service
diff --git a/glusterfs/PLIST.NetBSD b/glusterfs/PLIST.NetBSD
index 679afd0016..0840877ee1 100644
--- a/glusterfs/PLIST.NetBSD
+++ b/glusterfs/PLIST.NetBSD
@@ -1,3 +1,3 @@
-@comment $NetBSD$
+@comment $NetBSD: PLIST.NetBSD,v 1.1 2023/06/04 00:45:01 gutteridge Exp $
sbin/mount_glusterfs
sbin/umountd
diff --git a/glusterfs/PLIST.common b/glusterfs/PLIST.common
index 7547f7332a..0fe55228a4 100644
--- a/glusterfs/PLIST.common
+++ b/glusterfs/PLIST.common
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.42 2023/03/28 01:10:53 gutteridge Exp $
+@comment $NetBSD: PLIST.common,v 1.1 2023/06/04 00:45:01 gutteridge Exp $
${PYSITELIB}/gluster/__init__.py
${PYSITELIB}/gluster/__init__.pyc
${PYSITELIB}/gluster/__init__.pyo
diff --git a/glusterfs/distinfo b/glusterfs/distinfo
index 1620ae00f1..b769ba8a53 100644
--- a/glusterfs/distinfo
+++ b/glusterfs/distinfo
@@ -1,12 +1,31 @@
-$NetBSD: distinfo,v 1.76 2023/03/28 01:10:53 gutteridge Exp $
+$NetBSD: distinfo,v 1.82 2024/08/06 21:10:47 riastradh Exp $
BLAKE2s (glusterfs-10.4.tar.gz) = 9813ba102591f6ab715fc7d3dc089860888effe70dc146a4366667be0cc9bd0c
SHA512 (glusterfs-10.4.tar.gz) = 06c563ab77a29145b1fac44f5a56a91539accb69ba736fe6297aa3f38b128e68ba4f7d0b49ac6eb56397a51950fb4de882ff60037e91c61ad13dd89a18139d82
Size (glusterfs-10.4.tar.gz) = 8293872 bytes
-SHA1 (patch-configure.ac) = e4c2f65d6579aab9b62e28ba60b75ba542116811
+SHA1 (patch-api_src_glfs.c) = c35c974631b7674643edc31d526f18a648be9cce
+SHA1 (patch-cli_src_cli-cmd-parser.c) = 4bf24309275b6500e3acb0a12fcacf365b86ff04
+SHA1 (patch-cli_src_cli-xml-output.c) = afd03ce801992985864504dbc19887b62447da7d
+SHA1 (patch-configure.ac) = aa9da3d124299e6f42664408234318aee10d9061
+SHA1 (patch-contrib_umountd_umountd.c) = 631ecf62ff5815d1d935b12ccf0e8d285eed4319
SHA1 (patch-events-src-Makefile.am) = 5a112994c9990962a19eecd3933dabb18d5db2b0
SHA1 (patch-events-tools-Makefile.am) = b224ed16200befdb68e51eebd762257a0911e591
SHA1 (patch-extras-Makefile.am) = e5dead8310eed0fa0c6b12aa7a0da52bbeb4d41b
SHA1 (patch-extras-ganesha-config-Makefile.am) = 547f144948a394aa981a0b799cb7435681f8a5d5
+SHA1 (patch-extras_geo-rep_gsync-sync-gfid.c) = caaa112c1e42e6b2ccab2d902dff310fe3b314e1
SHA1 (patch-geo-replication_Makefile.am) = 71c2b4fa9d14d8489db8eaff11f7801792f53122
+SHA1 (patch-geo-replication_src_procdiggy.c) = 99af75d7ba7733b25c4cd2e1cc10c0341a3dd3a6
SHA1 (patch-libglusterfs-src-glusterfs-dict.h) = ebfdfe6ffbdda3532d15fe108d4214b1e9596304
+SHA1 (patch-libglusterfs_src_glusterfs_logging.h) = eefd14b5b6711e1002f925ea3c421a8ced3cb365
+SHA1 (patch-rpc_rpc-lib_src_xdr-rpc.h) = 0abbb0498c264922b0a36db0ef696666186805f6
+SHA1 (patch-xlators_cluster_ec_src_ec-code.c) = 8f8563e9eebe8c85ff1bba7fff808694cad0d259
+SHA1 (patch-xlators_cluster_ec_src_ec.c) = cc0e17403e544ce54fb0758c92d2d43b86ba2e66
+SHA1 (patch-xlators_debug_io-stats_src_io-stats.c) = e15f32db5a87429511e0ca7640a8697d75b24326
+SHA1 (patch-xlators_features_index_src_index.c) = 1eb997f585231d9ec53e5e9f252b9a3594597b80
+SHA1 (patch-xlators_mgmt_glusterd_src_glusterd-ganesha.c) = e459795097b8b5445eefdb1dc6305c206737800b
+SHA1 (patch-xlators_mgmt_glusterd_src_glusterd-geo-rep.c) = 51ada58de5beb3b0d5b9b6a620b184cca3f23eba
+SHA1 (patch-xlators_mgmt_glusterd_src_glusterd-mountbroker.c) = 15ead6a6bbc32e98db93a3488e67f82a33889ce5
+SHA1 (patch-xlators_mgmt_glusterd_src_glusterd-pmap.c) = 089542458e6d8189d3a40c9b6c9c0b37389b1d8a
+SHA1 (patch-xlators_mgmt_glusterd_src_glusterd-utils.c) = 5b50dbb72246918b5daf39bbdffc8c10124af2b4
+SHA1 (patch-xlators_mgmt_glusterd_src_glusterd-volume-set.c) = f8895fb70109fa65eacab6832c875efa588176aa
+SHA1 (patch-xlators_storage_posix_src_posix-inode-fd-ops.c) = 47cead403a15bd440b91c2a1673359095f2e1bdb
diff --git a/glusterfs/files/glusterd.sh b/glusterfs/files/glusterd.sh
old mode 100644
new mode 100755
index e3a612774e..6957dc1bdf
--- a/glusterfs/files/glusterd.sh
+++ b/glusterfs/files/glusterd.sh
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: glusterd.sh,v 1.12 2014/11/18 14:38:15 manu Exp $
+# $NetBSD: glusterd.sh,v 1.13 2024/07/05 02:21:34 riastradh Exp $
#
# PROVIDE: glusterd
@@ -12,9 +12,9 @@ glusterd_precmd()
{
fatal=0
- for d in /var/lib/glusterd /usr/pkg/etc/glusterd ; do
- if test -d /var/lib/glusterd ; then
- echo "Please migrate $d to /var/db/glusterd" >&2
+ for d in @VARBASE@/lib/glusterd @PKG_SYSCONFDIR@/glusterd ; do
+ if test -d "$d" ; then
+ echo "Please migrate $d to @VARBASE@/db/glusterd" >&2
fatal=1
fi
done
@@ -26,11 +26,11 @@ glusterd_precmd()
name="glusterd"
rcvar=$name
-command="/usr/pkg/sbin/${name}"
+command="@PREFIX@/sbin/${name}"
#start_precmd="glusterd_precmd"
pidfile="/var/run/${name}.pid"
command_args="-p ${pidfile}"
-required_files="/usr/pkg/etc/glusterfs/${name}.vol"
+required_files="@PKG_SYSCONFDIR@/glusterfs/${name}.vol"
load_rc_config $name
run_rc_command "$1"
diff --git a/glusterfs/patches/patch-api_src_glfs.c b/glusterfs/patches/patch-api_src_glfs.c
new file mode 100644
index 0000000000..bdf86a5d22
--- /dev/null
+++ b/glusterfs/patches/patch-api_src_glfs.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-api_src_glfs.c,v 1.2 2024/08/06 21:10:47 riastradh Exp $
+
+Avoid ctype(3) abuse.
+https://github.com/gluster/glusterfs/issues/4397
+
+--- api/src/glfs.c.orig 2023-04-06 09:01:24.660967197 +0000
++++ api/src/glfs.c
+@@ -861,7 +861,7 @@ pub_glfs_new(const char *volname)
+ }
+
+ for (i = 0; i < strlen(volname); i++) {
+- if (!isalnum(volname[i]) && (volname[i] != '_') &&
++ if (!isalnum((unsigned char)volname[i]) && (volname[i] != '_') &&
+ (volname[i] != '-')) {
+ errno = EINVAL;
+ return NULL;
diff --git a/glusterfs/patches/patch-cli_src_cli-cmd-parser.c b/glusterfs/patches/patch-cli_src_cli-cmd-parser.c
new file mode 100644
index 0000000000..b8bfe14701
--- /dev/null
+++ b/glusterfs/patches/patch-cli_src_cli-cmd-parser.c
@@ -0,0 +1,43 @@
+$NetBSD: patch-cli_src_cli-cmd-parser.c,v 1.2 2024/08/06 21:10:47 riastradh Exp $
+
+Avoid ctype(3) abuse.
+https://github.com/gluster/glusterfs/issues/4397
+
+--- cli/src/cli-cmd-parser.c.orig 2023-04-06 09:01:24.665967213 +0000
++++ cli/src/cli-cmd-parser.c
+@@ -536,7 +536,7 @@ cli_validate_volname(const char *volname
+ }
+
+ for (i = 0; i < volname_len; i++) {
+- if (!isalnum(volname[i]) && (volname[i] != '_') &&
++ if (!isalnum((unsigned char)volname[i]) && (volname[i] != '_') &&
+ (volname[i] != '-')) {
+ cli_err(
+ "Volume name should not contain \"%c\""
+@@ -4068,7 +4068,7 @@ cli_snap_clone_parse(dict_t *dict, const
+ clonename = (char *)words[cmdi];
+ for (i = 0; i < strlen(clonename); i++) {
+ /* Following volume name convention */
+- if (!isalnum(clonename[i]) &&
++ if (!isalnum((unsigned char)clonename[i]) &&
+ (clonename[i] != '_' && (clonename[i] != '-'))) {
+ /* TODO : Is this message enough?? */
+ cli_err(
+@@ -4150,7 +4150,7 @@ cli_snap_create_parse(dict_t *dict, cons
+ snapname = (char *)words[cmdi];
+ for (i = 0; i < strlen(snapname); i++) {
+ /* Following volume name convention */
+- if (!isalnum(snapname[i]) &&
++ if (!isalnum((unsigned char)snapname[i]) &&
+ (snapname[i] != '_' && (snapname[i] != '-'))) {
+ /* TODO : Is this message enough?? */
+ cli_err(
+@@ -5363,7 +5363,7 @@ cli_cmd_validate_volume(char *volname)
+ }
+
+ for (i = 0; i < volname_len; i++)
+- if (!isalnum(volname[i]) && (volname[i] != '_') &&
++ if (!isalnum((unsigned char)volname[i]) && (volname[i] != '_') &&
+ (volname[i] != '-')) {
+ cli_err(
+ "Volume name should not contain \"%c\""
diff --git a/glusterfs/patches/patch-cli_src_cli-xml-output.c b/glusterfs/patches/patch-cli_src_cli-xml-output.c
new file mode 100644
index 0000000000..fcdd499851
--- /dev/null
+++ b/glusterfs/patches/patch-cli_src_cli-xml-output.c
@@ -0,0 +1,55 @@
+$NetBSD: patch-cli_src_cli-xml-output.c,v 1.3 2024/08/06 21:10:47 riastradh Exp $
+
+Fix time type cast abuse.
+
+Avoid ctype(3) abuse.
+https://github.com/gluster/glusterfs/issues/4397
+
+--- cli/src/cli-xml-output.c.orig 2023-04-06 09:01:24.673967239 +0000
++++ cli/src/cli-xml-output.c
+@@ -1661,6 +1661,8 @@ cli_xml_output_vol_top_rw_perf(xmlTextWr
+ int ret = -1;
+ char *filename = NULL;
+ uint64_t throughput = 0;
++ int32_t time_sec;
++ int32_t time_usec;
+ struct timeval tv = {
+ 0,
+ };
+@@ -1692,14 +1694,16 @@ cli_xml_output_vol_top_rw_perf(xmlTextWr
+ XML_RET_CHECK_AND_GOTO(ret, out);
+
+ snprintf(key, sizeof(key), "%d-time-sec-%d", brick_index, member_index);
+- ret = dict_get_int32(dict, key, (int32_t *)&tv.tv_sec);
++ ret = dict_get_int32(dict, key, &time_sec); /* XXX Y2038 bug? */
+ if (ret)
+ goto out;
++ tv.tv_sec = time_sec;
+
+ snprintf(key, sizeof(key), "%d-time-usec-%d", brick_index, member_index);
+- ret = dict_get_int32(dict, key, (int32_t *)&tv.tv_usec);
++ ret = dict_get_int32(dict, key, &time_usec);
+ if (ret)
+ goto out;
++ tv.tv_usec = time_usec;
+
+ gf_time_fmt_tv(timestr, sizeof timestr, &tv, gf_timefmt_FT);
+ ret = xmlTextWriterWriteFormatElement(writer, (xmlChar *)"time", "%s",
+@@ -3413,7 +3417,7 @@ _output_gsync_config(FILE *fp, xmlTextWr
+ break;
+
+ v = resbuf + strlen(resbuf) - 1;
+- while (isspace(*v)) {
++ while (isspace((unsigned char)*v)) {
+ /* strip trailing space */
+ *v-- = '\0';
+ }
+@@ -3435,7 +3439,7 @@ _output_gsync_config(FILE *fp, xmlTextWr
+ goto out;
+ }
+ *v++ = '\0';
+- while (isspace(*v))
++ while (isspace((unsigned char)*v))
+ v++;
+ v = gf_strdup(v);
+ if (!v) {
diff --git a/glusterfs/patches/patch-configure.ac b/glusterfs/patches/patch-configure.ac
index 539babd23b..f3f24b6ce8 100644
--- a/glusterfs/patches/patch-configure.ac
+++ b/glusterfs/patches/patch-configure.ac
@@ -1,7 +1,11 @@
-$NetBSD: patch-configure.ac,v 1.4 2023/03/12 17:57:44 js Exp $
+$NetBSD: patch-configure.ac,v 1.6 2024/08/06 18:55:00 riastradh Exp $
Check for sizeof(time_t).
+Leave GF_DISTRIBUTION empty in cross-builds, not set to Unspecified
+which breaks things. (Maybe we should set this in CONFIGURE_ARGS if we
+can determine it.)
+
Defang bash 4.0 syntax in configure
(https://github.com/gluster/glusterfs/issues/3940).
@@ -19,7 +23,16 @@ Defang bash 4.0 syntax in configure
# YACC needs a check
AC_PROG_YACC
if test "x${YACC}" = "xbyacc" -o "x${YACC}" = "xyacc" -o "x${YACC}" = "x"; then
-@@ -1896,10 +1896,10 @@
+@@ -1276,8 +1281,6 @@ if test x$cross_compiling != xyes; then
+ if test "x$ac_cv_file__etc_redhat_release" = "xyes"; then
+ GF_DISTRIBUTION=Redhat
+ fi
+-else
+- GF_DISTRIBUTION=Unspecified
+ fi
+
+ AC_SUBST(GF_DISTRIBUTION)
+@@ -1899,10 +1902,10 @@ echo "Enable Brick Mux : $USE_BRICKM
echo "Building with LTO : $LTO_BUILD"
echo
diff --git a/glusterfs/patches/patch-contrib_umountd_umountd.c b/glusterfs/patches/patch-contrib_umountd_umountd.c
new file mode 100644
index 0000000000..469a055069
--- /dev/null
+++ b/glusterfs/patches/patch-contrib_umountd_umountd.c
@@ -0,0 +1,25 @@
+$NetBSD: patch-contrib_umountd_umountd.c,v 1.1 2024/08/06 18:51:19 riastradh Exp $
+
+Fix format strings.
+
+--- contrib/umountd/umountd.c.orig 2023-04-06 09:01:24.681967265 +0000
++++ contrib/umountd/umountd.c
+@@ -163,7 +163,7 @@ umountd_async (char *path, dev_t dev, in
+ ret = sys_lstat (path, &stbuf);
+ if (ret != 0) {
+ gf_log ("umountd", GF_LOG_WARNING,
+- "Cannot stat device from %s",
++ "Cannot stat device from %s: %s",
+ path, strerror (errno));
+ break;
+ }
+@@ -172,7 +172,8 @@ umountd_async (char *path, dev_t dev, in
+ if (unmount_ret != 0)
+ gf_log ("umountd", GF_LOG_INFO,
+ "device mismatch "
+- "(expect %lld, found %lld), "
++ "(expect %" GF_PRI_DEV ","
++ " found %" GF_PRI_DEV "), "
+ "someone else unmounted %s",
+ dev, stbuf.st_dev, path);
+ ret = 0;
diff --git a/glusterfs/patches/patch-extras_geo-rep_gsync-sync-gfid.c b/glusterfs/patches/patch-extras_geo-rep_gsync-sync-gfid.c
new file mode 100644
index 0000000000..e8b86dd90c
--- /dev/null
+++ b/glusterfs/patches/patch-extras_geo-rep_gsync-sync-gfid.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-extras_geo-rep_gsync-sync-gfid.c,v 1.2 2024/08/06 21:10:47 riastradh Exp $
+
+Avoid ctype(3) abuse.
+https://github.com/gluster/glusterfs/issues/4397
+
+--- extras/geo-rep/gsync-sync-gfid.c.orig 2023-04-06 09:01:24.705967342 +0000
++++ extras/geo-rep/gsync-sync-gfid.c
+@@ -63,7 +63,7 @@ main(int argc, char *argv[])
+
+ path += UUID_CANONICAL_FORM_LEN + 1;
+
+- while (isspace(*path))
++ while (isspace((unsigned char)*path))
+ path++;
+
+ len = strlen(line);
diff --git a/glusterfs/patches/patch-geo-replication_src_procdiggy.c b/glusterfs/patches/patch-geo-replication_src_procdiggy.c
new file mode 100644
index 0000000000..fbfd772492
--- /dev/null
+++ b/glusterfs/patches/patch-geo-replication_src_procdiggy.c
@@ -0,0 +1,25 @@
+$NetBSD: patch-geo-replication_src_procdiggy.c,v 1.2 2024/08/06 21:10:47 riastradh Exp $
+
+Avoid ctype(3) abuse.
+https://github.com/gluster/glusterfs/issues/4397
+
+--- geo-replication/src/procdiggy.c.orig 2023-04-06 09:01:24.722967396 +0000
++++ geo-replication/src/procdiggy.c
+@@ -55,7 +55,7 @@ pidinfo(pid_t pid, char **name)
+ if (name && !*name) {
+ p = strtail(buf, "Name:");
+ if (p) {
+- while (isspace(*++p))
++ while (isspace((unsigned char)*++p))
+ ;
+ *name = gf_strdup(p);
+ if (!*name) {
+@@ -71,7 +71,7 @@ pidinfo(pid_t pid, char **name)
+ break;
+ }
+
+- while (isspace(*++p))
++ while (isspace((unsigned char)*++p))
+ ;
+ ret = gf_string2int(p, &lpid);
+ if (ret == -1)
diff --git a/glusterfs/patches/patch-libglusterfs_src_glusterfs_logging.h b/glusterfs/patches/patch-libglusterfs_src_glusterfs_logging.h
new file mode 100644
index 0000000000..71a71013b8
--- /dev/null
+++ b/glusterfs/patches/patch-libglusterfs_src_glusterfs_logging.h
@@ -0,0 +1,21 @@
+$NetBSD: patch-libglusterfs_src_glusterfs_logging.h,v 1.1 2024/08/06 18:51:19 riastradh Exp $
+
+time_t is always int64_t on NetBSD(>=6), not unsigned long.
+suseconds_t is int on NetBSD, not long.
+
+--- libglusterfs/src/glusterfs/logging.h.orig 2023-04-06 09:01:24.752967492 +0000
++++ libglusterfs/src/glusterfs/logging.h
+@@ -32,8 +32,13 @@
+ #define GF_PRI_DEV PRIu64
+ #define GF_PRI_INODE PRIu64
+ #define GF_PRI_NLINK PRIu32
++#ifdef __NetBSD__
++#define GF_PRI_SECOND PRId64
++#define GF_PRI_SUSECONDS "06d"
++#else
+ #define GF_PRI_SECOND "lu"
+ #define GF_PRI_SUSECONDS "06ld"
++#endif
+ #define GF_PRI_SNSECONDS "09ld"
+ #define GF_PRI_USEC "ld"
+ #endif
diff --git a/glusterfs/patches/patch-rpc_rpc-lib_src_xdr-rpc.h b/glusterfs/patches/patch-rpc_rpc-lib_src_xdr-rpc.h
new file mode 100644
index 0000000000..7372d22914
--- /dev/null
+++ b/glusterfs/patches/patch-rpc_rpc-lib_src_xdr-rpc.h
@@ -0,0 +1,15 @@
+$NetBSD: patch-rpc_rpc-lib_src_xdr-rpc.h,v 1.1 2024/08/06 18:51:19 riastradh Exp $
+
+Fix rpc type printf formats for NetBSD.
+
+--- rpc/rpc-lib/src/xdr-rpc.h.orig 2023-04-06 09:01:24.771967553 +0000
++++ rpc/rpc-lib/src/xdr-rpc.h
+@@ -76,7 +76,7 @@ xdr_to_auth_unix_cred(char *msgbuf, int
+ #define rpc_call_verf_len(call) \
+ (rpc_opaque_auth_len((&(call)->ru.RM_cmb.cb_verf)))
+
+-#if defined(GF_DARWIN_HOST_OS) || !defined(HAVE_RPC_RPC_H)
++#if defined(GF_DARWIN_HOST_OS) || defined(__NetBSD__) || !defined(HAVE_RPC_RPC_H)
+ #define GF_PRI_RPC_XID PRIu32
+ #define GF_PRI_RPC_VERSION PRIu32
+ #define GF_PRI_RPC_PROG_ID PRIu32
diff --git a/glusterfs/patches/patch-xlators_cluster_ec_src_ec-code.c b/glusterfs/patches/patch-xlators_cluster_ec_src_ec-code.c
new file mode 100644
index 0000000000..73decfb286
--- /dev/null
+++ b/glusterfs/patches/patch-xlators_cluster_ec_src_ec-code.c
@@ -0,0 +1,25 @@
+$NetBSD: patch-xlators_cluster_ec_src_ec-code.c,v 1.2 2024/08/06 21:10:47 riastradh Exp $
+
+Avoid ctype(3) abuse.
+https://github.com/gluster/glusterfs/issues/4397
+
+--- xlators/cluster/ec/src/ec-code.c.orig 2023-04-06 09:01:24.919968028 +0000
++++ xlators/cluster/ec/src/ec-code.c
+@@ -838,7 +838,7 @@ ec_code_proc_trim_left(char *text, ssize
+ {
+ ssize_t len;
+
+- for (len = *length; (len > 0) && isspace(*text); len--) {
++ for (len = *length; (len > 0) && isspace((unsigned char)*text); len--) {
+ text++;
+ }
+ *length = len;
+@@ -856,7 +856,7 @@ ec_code_proc_trim_right(char *text, ssiz
+
+ last = text;
+ for (len = *length; (len > 0) && (*text != sep); len--) {
+- if (!isspace(*text)) {
++ if (!isspace((unsigned char)*text)) {
+ last = text + 1;
+ }
+ text++;
diff --git a/glusterfs/patches/patch-xlators_cluster_ec_src_ec.c b/glusterfs/patches/patch-xlators_cluster_ec_src_ec.c
new file mode 100644
index 0000000000..6b75a8c05e
--- /dev/null
+++ b/glusterfs/patches/patch-xlators_cluster_ec_src_ec.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-xlators_cluster_ec_src_ec.c,v 1.1 2024/08/06 18:51:19 riastradh Exp $
+
+Fix printf format for uintptr_t.
+
+--- xlators/cluster/ec/src/ec.c.orig 2023-04-06 09:01:24.928968057 +0000
++++ xlators/cluster/ec/src/ec.c
+@@ -74,7 +74,7 @@ ec_parse_options(xlator_t *this)
+
+ gf_msg_debug("ec", 0,
+ "Initialized with: nodes=%u, fragments=%u, "
+- "stripe_size=%u, node_mask=%" PRIxFAST32,
++ "stripe_size=%u, node_mask=%" PRIxPTR,
+ ec->nodes, ec->fragments, ec->stripe_size, ec->node_mask);
+
+ error = 0;
diff --git a/glusterfs/patches/patch-xlators_debug_io-stats_src_io-stats.c b/glusterfs/patches/patch-xlators_debug_io-stats_src_io-stats.c
new file mode 100644
index 0000000000..d163afed80
--- /dev/null
+++ b/glusterfs/patches/patch-xlators_debug_io-stats_src_io-stats.c
@@ -0,0 +1,25 @@
+$NetBSD: patch-xlators_debug_io-stats_src_io-stats.c,v 1.2 2024/08/06 21:10:47 riastradh Exp $
+
+Avoid ctype(3) abuse.
+https://github.com/gluster/glusterfs/issues/4397
+
+--- xlators/debug/io-stats/src/io-stats.c.orig 2023-04-06 09:01:24.932968070 +0000
++++ xlators/debug/io-stats/src/io-stats.c
+@@ -848,7 +848,7 @@ io_stats_dump_global_to_json_logfp(xlato
+ for (i = 0; i < GF_FOP_MAXVALUE; i++) {
+ lc_fop_name = strdupa(gf_fop_list[i]);
+ for (j = 0; lc_fop_name[j]; j++) {
+- lc_fop_name[j] = tolower(lc_fop_name[j]);
++ lc_fop_name[j] = tolower((unsigned char)lc_fop_name[j]);
+ }
+
+ fop_hits = GF_ATOMIC_GET(stats->fop_hits[i]);
+@@ -905,7 +905,7 @@ io_stats_dump_global_to_json_logfp(xlato
+ for (i = 0; i < GF_UPCALL_FLAGS_MAXVALUE; i++) {
+ lc_fop_name = strdupa(gf_upcall_list[i]);
+ for (j = 0; lc_fop_name[j]; j++) {
+- lc_fop_name[j] = tolower(lc_fop_name[j]);
++ lc_fop_name[j] = tolower((unsigned char)lc_fop_name[j]);
+ }
+ fop_hits = GF_ATOMIC_GET(stats->upcall_hits[i]);
+ if (interval == -1) {
diff --git a/glusterfs/patches/patch-xlators_features_index_src_index.c b/glusterfs/patches/patch-xlators_features_index_src_index.c
new file mode 100644
index 0000000000..a6e85e0cc7
--- /dev/null
+++ b/glusterfs/patches/patch-xlators_features_index_src_index.c
@@ -0,0 +1,24 @@
+$NetBSD: patch-xlators_features_index_src_index.c,v 1.1 2024/08/06 18:51:19 riastradh Exp $
+
+off_t is not unsigned long long; cast it for use with %llx.
+
+--- xlators/features/index/src/index.c.orig 2023-04-06 09:01:24.955968143 +0000
++++ xlators/features/index/src/index.c
+@@ -493,7 +493,7 @@ index_fill_readdir(fd_t *fd, index_fd_ct
+ "seekdir(0x%llx) failed on dir=%p: "
+ "Invalid argument (offset reused from "
+ "another DIR * structure?)",
+- off, dir);
++ (unsigned long long)off, dir);
+ errno = EINVAL;
+ count = -1;
+ goto out;
+@@ -545,7 +545,7 @@ index_fill_readdir(fd_t *fd, index_fd_ct
+ "seekdir(0x%llx) failed on dir=%p: "
+ "Invalid argument (offset reused from "
+ "another DIR * structure?)",
+- in_case, dir);
++ (unsigned long long)in_case, dir);
+ errno = EINVAL;
+ count = -1;
+ goto out;
diff --git a/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-ganesha.c b/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-ganesha.c
new file mode 100644
index 0000000000..0d1040c879
--- /dev/null
+++ b/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-ganesha.c
@@ -0,0 +1,25 @@
+$NetBSD: patch-xlators_mgmt_glusterd_src_glusterd-ganesha.c,v 1.2 2024/08/06 21:10:47 riastradh Exp $
+
+Avoid ctype(3) abuse.
+https://github.com/gluster/glusterfs/issues/4397
+
+--- xlators/mgmt/glusterd/src/glusterd-ganesha.c.orig 2023-04-06 09:01:24.993968265 +0000
++++ xlators/mgmt/glusterd/src/glusterd-ganesha.c
+@@ -52,7 +52,7 @@ parsing_ganesha_ha_conf(const char *key)
+ if (*pointer == '#') {
+ continue;
+ }
+- while (isblank(*pointer)) {
++ while (isblank((unsigned char)*pointer)) {
+ pointer++;
+ }
+ if (strncmp(pointer, key, strlen(key))) {
+@@ -80,7 +80,7 @@ parsing_ganesha_ha_conf(const char *key)
+ do {
+ end_pointer++;
+ } while (!(*end_pointer == '\'' || *end_pointer == '"' ||
+- isspace(*end_pointer) || *end_pointer == '\0'));
++ isspace((unsigned char)*end_pointer) || *end_pointer == '\0'));
+ *end_pointer = '\0';
+
+ /* got it. copy it and return */
diff --git a/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-geo-rep.c b/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-geo-rep.c
new file mode 100644
index 0000000000..640c7fd2b8
--- /dev/null
+++ b/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-geo-rep.c
@@ -0,0 +1,52 @@
+$NetBSD: patch-xlators_mgmt_glusterd_src_glusterd-geo-rep.c,v 1.2 2024/08/06 21:10:47 riastradh Exp $
+
+Avoid ctype(3) abuse.
+https://github.com/gluster/glusterfs/issues/4397
+
+--- xlators/mgmt/glusterd/src/glusterd-geo-rep.c.orig 2023-04-06 09:01:24.994968268 +0000
++++ xlators/mgmt/glusterd/src/glusterd-geo-rep.c
+@@ -764,7 +764,7 @@ _fcbk_conftodict(char *resbuf, size_t bl
+ if (!ptr)
+ break;
+ v = resbuf + strlen(resbuf) - 1;
+- while (isspace(*v))
++ while (isspace((unsigned char)*v))
+ /* strip trailing space */
+ *v-- = '\0';
+ if (v == resbuf)
+@@ -774,7 +774,7 @@ _fcbk_conftodict(char *resbuf, size_t bl
+ if (!v)
+ return -1;
+ *v++ = '\0';
+- while (isspace(*v))
++ while (isspace((unsigned char)*v))
+ v++;
+ v = gf_strdup(v);
+ if (!v)
+@@ -830,7 +830,7 @@ _fcbk_statustostruct(char *resbuf, size_
+ break;
+
+ v = resbuf + strlen(resbuf) - 1;
+- while (isspace(*v))
++ while (isspace((unsigned char)*v))
+ /* strip trailing space */
+ *v-- = '\0';
+ if (v == resbuf)
+@@ -840,7 +840,7 @@ _fcbk_statustostruct(char *resbuf, size_
+ if (!v)
+ return -1;
+ *v++ = '\0';
+- while (isspace(*v))
++ while (isspace((unsigned char)*v))
+ v++;
+ v = gf_strdup(v);
+ if (!v)
+@@ -4431,7 +4431,7 @@ glusterd_gsync_read_frm_status(char *pat
+ ret = -1;
+ } else {
+ char *p = buf + len - 1;
+- while (isspace(*p))
++ while (isspace((unsigned char)*p))
+ *p-- = '\0';
+ }
+ } else if (ret == 0)
diff --git a/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-mountbroker.c b/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-mountbroker.c
new file mode 100644
index 0000000000..c87ca228d6
--- /dev/null
+++ b/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-mountbroker.c
@@ -0,0 +1,25 @@
+$NetBSD: patch-xlators_mgmt_glusterd_src_glusterd-mountbroker.c,v 1.2 2024/08/06 21:10:48 riastradh Exp $
+
+Avoid ctype(3) abuse.
+https://github.com/gluster/glusterfs/issues/4397
+
+--- xlators/mgmt/glusterd/src/glusterd-mountbroker.c.orig 2023-04-06 09:01:25.000968288 +0000
++++ xlators/mgmt/glusterd/src/glusterd-mountbroker.c
+@@ -142,7 +142,7 @@ parse_mount_pattern_desc(gf_mount_spec_t
+ ret = SYNTAX_ERR;
+ goto out;
+ }
+- while (!strchr("|&)", *c2) && !isspace(*c2))
++ while (!strchr("|&)", *c2) && !isspace((unsigned char)*c2))
+ c2++;
+ skipwhite(&c2);
+ switch (*c2) {
+@@ -184,7 +184,7 @@ parse_mount_pattern_desc(gf_mount_spec_t
+ c2 = ""; /* reset c2 */
+ while (*c2 != ')') {
+ c2 = curs;
+- while (!isspace(*c2) && *c2 != ')')
++ while (!isspace((unsigned char)*c2) && *c2 != ')')
+ c2++;
+ sc = *c2;
+ *c2 = '\0';
diff --git a/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-pmap.c b/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-pmap.c
new file mode 100644
index 0000000000..df703ea648
--- /dev/null
+++ b/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-pmap.c
@@ -0,0 +1,25 @@
+$NetBSD: patch-xlators_mgmt_glusterd_src_glusterd-pmap.c,v 1.2 2024/08/06 21:10:48 riastradh Exp $
+
+Avoid ctype(3) abuse.
+https://github.com/gluster/glusterfs/issues/4397
+
+--- xlators/mgmt/glusterd/src/glusterd-pmap.c.orig 2023-04-06 09:01:25.007968310 +0000
++++ xlators/mgmt/glusterd/src/glusterd-pmap.c
+@@ -154,7 +154,7 @@ pmap_registry_search(xlator_t *this, cha
+ {
+ brck = tmp_port->brickname;
+ for (;;) {
+- for (i = 0; brck[i] && !isspace(brck[i]); ++i)
++ for (i = 0; brck[i] && !isspace((unsigned char)brck[i]); ++i)
+ ;
+ if (i == 0 && brck[i] == '\0')
+ break;
+@@ -179,7 +179,7 @@ pmap_registry_search(xlator_t *this, cha
+ * Skip over *any* amount of whitespace, including
+ * none (if we're already at the end of the string).
+ */
+- while (isspace(*brck))
++ while (isspace((unsigned char)*brck))
+ ++brck;
+ /*
+ * We're either at the end of the string (which will be
diff --git a/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-utils.c b/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-utils.c
new file mode 100644
index 0000000000..bbb58e41fc
--- /dev/null
+++ b/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-utils.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-xlators_mgmt_glusterd_src_glusterd-utils.c,v 1.5 2024/08/06 21:10:48 riastradh Exp $
+
+Avoid ctype(3) abuse.
+https://github.com/gluster/glusterfs/issues/4397
+
+--- xlators/mgmt/glusterd/src/glusterd-utils.c.orig 2023-04-06 09:01:25.033968393 +0000
++++ xlators/mgmt/glusterd/src/glusterd-utils.c
+@@ -7461,7 +7461,7 @@ glusterd_parse_inode_size(char *stream,
+ needle = nwstrtail(needle, pattern);
+
+ trail = needle;
+- while (trail && isdigit(*trail))
++ while (trail && isdigit((unsigned char)*trail))
+ trail++;
+ if (trail)
+ *trail = '\0';
diff --git a/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-volume-set.c b/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-volume-set.c
new file mode 100644
index 0000000000..93acf4373c
--- /dev/null
+++ b/glusterfs/patches/patch-xlators_mgmt_glusterd_src_glusterd-volume-set.c
@@ -0,0 +1,16 @@
+$NetBSD: patch-xlators_mgmt_glusterd_src_glusterd-volume-set.c,v 1.2 2024/08/06 21:10:48 riastradh Exp $
+
+Avoid ctype(3) abuse.
+https://github.com/gluster/glusterfs/issues/4397
+
+--- xlators/mgmt/glusterd/src/glusterd-volume-set.c.orig 2023-04-06 09:01:25.037968406 +0000
++++ xlators/mgmt/glusterd/src/glusterd-volume-set.c
+@@ -211,7 +211,7 @@ validate_uss_dir(glusterd_volinfo_t *vol
+ }
+
+ for (i = 1; value[i]; i++) {
+- if (isalnum(value[i]) || value[i] == '_' || value[i] == '-')
++ if (isalnum((unsigned char)value[i]) || value[i] == '_' || value[i] == '-')
+ continue;
+
+ snprintf(errstr, sizeof(errstr),
diff --git a/glusterfs/patches/patch-xlators_storage_posix_src_posix-inode-fd-ops.c b/glusterfs/patches/patch-xlators_storage_posix_src_posix-inode-fd-ops.c
new file mode 100644
index 0000000000..8f4c458d33
--- /dev/null
+++ b/glusterfs/patches/patch-xlators_storage_posix_src_posix-inode-fd-ops.c
@@ -0,0 +1,24 @@
+$NetBSD: patch-xlators_storage_posix_src_posix-inode-fd-ops.c,v 1.1 2024/08/06 18:51:19 riastradh Exp $
+
+off_t is not unsigned long long; cast it for use with %llx.
+
+--- xlators/storage/posix/src/posix-inode-fd-ops.c.orig 2023-04-06 09:01:25.088968570 +0000
++++ xlators/storage/posix/src/posix-inode-fd-ops.c
+@@ -5583,7 +5583,7 @@ posix_fill_readdir(fd_t *fd, struct posi
+ "seekdir(0x%llx) failed on dir=%p: "
+ "Invalid argument (offset reused from "
+ "another DIR * structure?)",
+- off, pfd->dir);
++ (unsigned long long)off, pfd->dir);
+ errno = EINVAL;
+ count = -1;
+ goto out;
+@@ -5659,7 +5659,7 @@ posix_fill_readdir(fd_t *fd, struct posi
+ "seekdir(0x%llx) failed on dir=%p: "
+ "Invalid argument (offset reused from "
+ "another DIR * structure?)",
+- in_case, pfd->dir);
++ (unsigned long long)in_case, pfd->dir);
+ errno = EINVAL;
+ count = -1;
+ goto out;
Home |
Main Index |
Thread Index |
Old Index