pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/filesystems
Module Name: pkgsrc
Committed By: riastradh
Date: Tue Aug 6 18:51:20 UTC 2024
Modified Files:
pkgsrc/filesystems/glusterfs: Makefile distinfo
pkgsrc/filesystems/glusterfs8: Makefile distinfo
Added Files:
pkgsrc/filesystems/glusterfs/patches: patch-cli_src_cli-xml-output.c
patch-contrib_umountd_umountd.c
patch-libglusterfs_src_glusterfs_logging.h
patch-rpc_rpc-lib_src_xdr-rpc.h patch-xlators_cluster_ec_src_ec.c
patch-xlators_features_index_src_index.c
patch-xlators_storage_posix_src_posix-inode-fd-ops.c
pkgsrc/filesystems/glusterfs8/patches: patch-cli_src_cli-xml-output.c
patch-cli_src_cli.c patch-contrib_umountd_umountd.c
patch-libglusterfs_src_glusterfs_logging.h
patch-rpc_rpc-lib_src_xdr-rpc.h patch-xlators_cluster_ec_src_ec.c
patch-xlators_features_index_src_index.c
patch-xlators_storage_posix_src_posix-inode-fd-ops.c
Log Message:
filesystems/glusterfs: Fix printf formats and integer pointer casts.
To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 pkgsrc/filesystems/glusterfs/Makefile
cvs rdiff -u -r1.78 -r1.79 pkgsrc/filesystems/glusterfs/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/filesystems/glusterfs/patches/patch-cli_src_cli-xml-output.c \
pkgsrc/filesystems/glusterfs/patches/patch-contrib_umountd_umountd.c \
pkgsrc/filesystems/glusterfs/patches/patch-libglusterfs_src_glusterfs_logging.h \
pkgsrc/filesystems/glusterfs/patches/patch-rpc_rpc-lib_src_xdr-rpc.h \
pkgsrc/filesystems/glusterfs/patches/patch-xlators_cluster_ec_src_ec.c \
pkgsrc/filesystems/glusterfs/patches/patch-xlators_features_index_src_index.c \
pkgsrc/filesystems/glusterfs/patches/patch-xlators_storage_posix_src_posix-inode-fd-ops.c
cvs rdiff -u -r1.7 -r1.8 pkgsrc/filesystems/glusterfs8/Makefile
cvs rdiff -u -r1.1 -r1.2 pkgsrc/filesystems/glusterfs8/distinfo
cvs rdiff -u -r0 -r1.1 \
pkgsrc/filesystems/glusterfs8/patches/patch-cli_src_cli-xml-output.c \
pkgsrc/filesystems/glusterfs8/patches/patch-cli_src_cli.c \
pkgsrc/filesystems/glusterfs8/patches/patch-contrib_umountd_umountd.c \
pkgsrc/filesystems/glusterfs8/patches/patch-libglusterfs_src_glusterfs_logging.h \
pkgsrc/filesystems/glusterfs8/patches/patch-rpc_rpc-lib_src_xdr-rpc.h \
pkgsrc/filesystems/glusterfs8/patches/patch-xlators_cluster_ec_src_ec.c \
pkgsrc/filesystems/glusterfs8/patches/patch-xlators_features_index_src_index.c \
pkgsrc/filesystems/glusterfs8/patches/patch-xlators_storage_posix_src_posix-inode-fd-ops.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/filesystems/glusterfs/Makefile
diff -u pkgsrc/filesystems/glusterfs/Makefile:1.123 pkgsrc/filesystems/glusterfs/Makefile:1.124
--- pkgsrc/filesystems/glusterfs/Makefile:1.123 Fri Jul 5 02:21:34 2024
+++ pkgsrc/filesystems/glusterfs/Makefile Tue Aug 6 18:51:18 2024
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.123 2024/07/05 02:21:34 riastradh Exp $
+# $NetBSD: Makefile,v 1.124 2024/08/06 18:51:18 riastradh Exp $
DISTNAME= glusterfs-10.4
-PKGREVISION= 5
+PKGREVISION= 6
CATEGORIES= filesystems
MASTER_SITES= https://bits.gluster.org/pub/gluster/glusterfs/src/
Index: pkgsrc/filesystems/glusterfs/distinfo
diff -u pkgsrc/filesystems/glusterfs/distinfo:1.78 pkgsrc/filesystems/glusterfs/distinfo:1.79
--- pkgsrc/filesystems/glusterfs/distinfo:1.78 Tue Jun 6 00:58:05 2023
+++ pkgsrc/filesystems/glusterfs/distinfo Tue Aug 6 18:51:18 2024
@@ -1,12 +1,19 @@
-$NetBSD: distinfo,v 1.78 2023/06/06 00:58:05 gutteridge Exp $
+$NetBSD: distinfo,v 1.79 2024/08/06 18:51:18 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-cli_src_cli-xml-output.c) = 1448eec53bce1bdcd35e2363d126d29c11db64c6
SHA1 (patch-configure.ac) = bc76ecb683f7a6eef32d6b11f86df4760c12e032
+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-geo-replication_Makefile.am) = 71c2b4fa9d14d8489db8eaff11f7801792f53122
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.c) = cc0e17403e544ce54fb0758c92d2d43b86ba2e66
+SHA1 (patch-xlators_features_index_src_index.c) = 1eb997f585231d9ec53e5e9f252b9a3594597b80
+SHA1 (patch-xlators_storage_posix_src_posix-inode-fd-ops.c) = 47cead403a15bd440b91c2a1673359095f2e1bdb
Index: pkgsrc/filesystems/glusterfs8/Makefile
diff -u pkgsrc/filesystems/glusterfs8/Makefile:1.7 pkgsrc/filesystems/glusterfs8/Makefile:1.8
--- pkgsrc/filesystems/glusterfs8/Makefile:1.7 Fri Jul 5 02:21:34 2024
+++ pkgsrc/filesystems/glusterfs8/Makefile Tue Aug 6 18:51:19 2024
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.7 2024/07/05 02:21:34 riastradh Exp $
+# $NetBSD: Makefile,v 1.8 2024/08/06 18:51:19 riastradh Exp $
DISTNAME= glusterfs-8.2
-PKGREVISION= 14
+PKGREVISION= 15
CATEGORIES= filesystems
MASTER_SITES= http://bits.gluster.org/pub/gluster/glusterfs/src/
Index: pkgsrc/filesystems/glusterfs8/distinfo
diff -u pkgsrc/filesystems/glusterfs8/distinfo:1.1 pkgsrc/filesystems/glusterfs8/distinfo:1.2
--- pkgsrc/filesystems/glusterfs8/distinfo:1.1 Sun Mar 12 11:55:59 2023
+++ pkgsrc/filesystems/glusterfs8/distinfo Tue Aug 6 18:51:19 2024
@@ -1,14 +1,22 @@
-$NetBSD: distinfo,v 1.1 2023/03/12 11:55:59 js Exp $
+$NetBSD: distinfo,v 1.2 2024/08/06 18:51:19 riastradh Exp $
BLAKE2s (glusterfs-8.2.tar.gz) = 8e3161a768b5875b190f44cc3698de3ea9703c2550306c019dc6776c4ab12cd7
SHA512 (glusterfs-8.2.tar.gz) = e11ffd544cdfd55e4309bcf10d9f6d3cb13b3c0beeaf578e024c9b40df19f5bc5dc6965bca1166e96e05e42041093c48772b160952c235f7456f0898594d01d2
Size (glusterfs-8.2.tar.gz) = 7761620 bytes
+SHA1 (patch-cli_src_cli-xml-output.c) = 594cdba0a33f9343b8e29b90f4af2ceb448d403d
+SHA1 (patch-cli_src_cli.c) = 118117233b0a2974cc6e6b898155ec3eca79dd22
SHA1 (patch-config.h.in) = 1560806ebd786139b404544461dcda0ec1d60b37
SHA1 (patch-configure) = 07d7a61d7c24ab8b0e4bb00ab6ae2452e41d903f
SHA1 (patch-configure.ac) = fcb7da30005e9a08e7a0f4ac2f5e55511580aa18
+SHA1 (patch-contrib_umountd_umountd.c) = 3597f0e85608dc0fd39c5bf0c180f59cd8b3fe86
+SHA1 (patch-libglusterfs_src_glusterfs_logging.h) = eefd14b5b6711e1002f925ea3c421a8ced3cb365
+SHA1 (patch-rpc_rpc-lib_src_xdr-rpc.h) = 6a3826bbacdd082551dd34fd51a4d0be268b102d
SHA1 (patch-rpc_rpc_lib_rpcsvc.c) = 287e5da091a2610ee010a44a5b51a90a402cff01
SHA1 (patch-tools_gfind__missing__files_gfind__missing__files.sh) = 67d374d8dc3213bd3d159e7cb8479c14e8ba162d
+SHA1 (patch-xlators_cluster_ec_src_ec.c) = f5becc3ba27cb3510b455ecbba7c2b8ca8370bb3
+SHA1 (patch-xlators_features_index_src_index.c) = b8cccd113afe10ff0ec446f9ba7de7cf245dbca4
SHA1 (patch-xlators_mgmt_glusterd_src_glusterd-utils.c) = 3e8e6fa5e4baff94532f58a6509f7b5817ce02bf
SHA1 (patch-xlators_mount_fuse_src_fuse-bridge.c) = 4706bc7264b7e4ec7f01cc143f3edce96213401e
SHA1 (patch-xlators_performance_write-behind_src_write-behind.c) = cf3eea86ab4255a7714b25a35a98495eff0f772e
SHA1 (patch-xlators_storage_posix_src_posix-entry-ops.c) = 2c1acf30097ca4ce7b6ec6e1212f989c86201553
+SHA1 (patch-xlators_storage_posix_src_posix-inode-fd-ops.c) = 12d8521427cdeb8a014b0aad54ca6829a0f33d95
Added files:
Index: pkgsrc/filesystems/glusterfs/patches/patch-cli_src_cli-xml-output.c
diff -u /dev/null pkgsrc/filesystems/glusterfs/patches/patch-cli_src_cli-xml-output.c:1.1
--- /dev/null Tue Aug 6 18:51:20 2024
+++ pkgsrc/filesystems/glusterfs/patches/patch-cli_src_cli-xml-output.c Tue Aug 6 18:51:19 2024
@@ -0,0 +1,34 @@
+$NetBSD: patch-cli_src_cli-xml-output.c,v 1.1 2024/08/06 18:51:19 riastradh Exp $
+
+Fix time type cast abuse.
+
+--- 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",
Index: pkgsrc/filesystems/glusterfs/patches/patch-contrib_umountd_umountd.c
diff -u /dev/null pkgsrc/filesystems/glusterfs/patches/patch-contrib_umountd_umountd.c:1.1
--- /dev/null Tue Aug 6 18:51:20 2024
+++ pkgsrc/filesystems/glusterfs/patches/patch-contrib_umountd_umountd.c Tue Aug 6 18:51:19 2024
@@ -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;
Index: pkgsrc/filesystems/glusterfs/patches/patch-libglusterfs_src_glusterfs_logging.h
diff -u /dev/null pkgsrc/filesystems/glusterfs/patches/patch-libglusterfs_src_glusterfs_logging.h:1.1
--- /dev/null Tue Aug 6 18:51:20 2024
+++ pkgsrc/filesystems/glusterfs/patches/patch-libglusterfs_src_glusterfs_logging.h Tue Aug 6 18:51:19 2024
@@ -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
Index: pkgsrc/filesystems/glusterfs/patches/patch-rpc_rpc-lib_src_xdr-rpc.h
diff -u /dev/null pkgsrc/filesystems/glusterfs/patches/patch-rpc_rpc-lib_src_xdr-rpc.h:1.1
--- /dev/null Tue Aug 6 18:51:20 2024
+++ pkgsrc/filesystems/glusterfs/patches/patch-rpc_rpc-lib_src_xdr-rpc.h Tue Aug 6 18:51:19 2024
@@ -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
Index: pkgsrc/filesystems/glusterfs/patches/patch-xlators_cluster_ec_src_ec.c
diff -u /dev/null pkgsrc/filesystems/glusterfs/patches/patch-xlators_cluster_ec_src_ec.c:1.1
--- /dev/null Tue Aug 6 18:51:20 2024
+++ pkgsrc/filesystems/glusterfs/patches/patch-xlators_cluster_ec_src_ec.c Tue Aug 6 18:51:19 2024
@@ -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;
Index: pkgsrc/filesystems/glusterfs/patches/patch-xlators_features_index_src_index.c
diff -u /dev/null pkgsrc/filesystems/glusterfs/patches/patch-xlators_features_index_src_index.c:1.1
--- /dev/null Tue Aug 6 18:51:20 2024
+++ pkgsrc/filesystems/glusterfs/patches/patch-xlators_features_index_src_index.c Tue Aug 6 18:51:19 2024
@@ -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;
Index: pkgsrc/filesystems/glusterfs/patches/patch-xlators_storage_posix_src_posix-inode-fd-ops.c
diff -u /dev/null pkgsrc/filesystems/glusterfs/patches/patch-xlators_storage_posix_src_posix-inode-fd-ops.c:1.1
--- /dev/null Tue Aug 6 18:51:20 2024
+++ pkgsrc/filesystems/glusterfs/patches/patch-xlators_storage_posix_src_posix-inode-fd-ops.c Tue Aug 6 18:51:19 2024
@@ -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;
Index: pkgsrc/filesystems/glusterfs8/patches/patch-cli_src_cli-xml-output.c
diff -u /dev/null pkgsrc/filesystems/glusterfs8/patches/patch-cli_src_cli-xml-output.c:1.1
--- /dev/null Tue Aug 6 18:51:20 2024
+++ pkgsrc/filesystems/glusterfs8/patches/patch-cli_src_cli-xml-output.c Tue Aug 6 18:51:19 2024
@@ -0,0 +1,39 @@
+$NetBSD: patch-cli_src_cli-xml-output.c,v 1.1 2024/08/06 18:51:19 riastradh Exp $
+
+Avoid wrong-size integer casts and fix format string.
+
+--- cli/src/cli-xml-output.c.orig 2020-09-16 18:40:32.172503539 +0000
++++ cli/src/cli-xml-output.c
+@@ -1661,8 +1661,8 @@ cli_xml_output_vol_top_rw_perf(xmlTextWr
+ int ret = -1;
+ char *filename = NULL;
+ uint64_t throughput = 0;
+- long int time_sec = 0;
+- long int time_usec = 0;
++ int32_t time_sec = 0;
++ int32_t time_usec = 0;
+ char timestr[256] = {
+ 0,
+ };
+@@ -1692,18 +1692,18 @@ 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 *)&time_sec);
++ ret = dict_get_int32(dict, key, &time_sec); /* XXX Y2038 bug? */
+ if (ret)
+ goto out;
+
+ snprintf(key, sizeof(key), "%d-time-usec-%d", brick_index, member_index);
+- ret = dict_get_int32(dict, key, (int32_t *)&time_usec);
++ ret = dict_get_int32(dict, key, &time_usec);
+ if (ret)
+ goto out;
+
+ gf_time_fmt(timestr, sizeof timestr, time_sec, gf_timefmt_FT);
+ len = strlen(timestr);
+- snprintf(timestr + len, sizeof(timestr) - len, ".%" GF_PRI_SUSECONDS,
++ snprintf(timestr + len, sizeof(timestr) - len, ".%" PRIu32,
+ time_usec);
+ ret = xmlTextWriterWriteFormatElement(writer, (xmlChar *)"time", "%s",
+ timestr);
Index: pkgsrc/filesystems/glusterfs8/patches/patch-cli_src_cli.c
diff -u /dev/null pkgsrc/filesystems/glusterfs8/patches/patch-cli_src_cli.c:1.1
--- /dev/null Tue Aug 6 18:51:20 2024
+++ pkgsrc/filesystems/glusterfs8/patches/patch-cli_src_cli.c Tue Aug 6 18:51:19 2024
@@ -0,0 +1,15 @@
+$NetBSD: patch-cli_src_cli.c,v 1.1 2024/08/06 18:51:19 riastradh Exp $
+
+Avoid ctype(3) abuse.
+
+--- cli/src/cli.c.orig 2020-09-16 18:40:32.173503540 +0000
++++ cli/src/cli.c
+@@ -349,7 +349,7 @@ is_valid_int(char *str)
+
+ /* Check for non-digit chars in the rest of the string */
+ while (*str) {
+- if (!isdigit(*str))
++ if (!isdigit((unsigned char)*str))
+ return _gf_false;
+ else
+ ++str;
Index: pkgsrc/filesystems/glusterfs8/patches/patch-contrib_umountd_umountd.c
diff -u /dev/null pkgsrc/filesystems/glusterfs8/patches/patch-contrib_umountd_umountd.c:1.1
--- /dev/null Tue Aug 6 18:51:20 2024
+++ pkgsrc/filesystems/glusterfs8/patches/patch-contrib_umountd_umountd.c Tue Aug 6 18:51:19 2024
@@ -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 2020-09-16 18:40:32.181503544 +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;
Index: pkgsrc/filesystems/glusterfs8/patches/patch-libglusterfs_src_glusterfs_logging.h
diff -u /dev/null pkgsrc/filesystems/glusterfs8/patches/patch-libglusterfs_src_glusterfs_logging.h:1.1
--- /dev/null Tue Aug 6 18:51:20 2024
+++ pkgsrc/filesystems/glusterfs8/patches/patch-libglusterfs_src_glusterfs_logging.h Tue Aug 6 18:51:19 2024
@@ -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
Index: pkgsrc/filesystems/glusterfs8/patches/patch-rpc_rpc-lib_src_xdr-rpc.h
diff -u /dev/null pkgsrc/filesystems/glusterfs8/patches/patch-rpc_rpc-lib_src_xdr-rpc.h:1.1
--- /dev/null Tue Aug 6 18:51:20 2024
+++ pkgsrc/filesystems/glusterfs8/patches/patch-rpc_rpc-lib_src_xdr-rpc.h Tue Aug 6 18:51:19 2024
@@ -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 2020-09-16 18:40:32.262503593 +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
Index: pkgsrc/filesystems/glusterfs8/patches/patch-xlators_cluster_ec_src_ec.c
diff -u /dev/null pkgsrc/filesystems/glusterfs8/patches/patch-xlators_cluster_ec_src_ec.c:1.1
--- /dev/null Tue Aug 6 18:51:20 2024
+++ pkgsrc/filesystems/glusterfs8/patches/patch-xlators_cluster_ec_src_ec.c Tue Aug 6 18:51:19 2024
@@ -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 2020-09-16 18:40:32.395503673 +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;
Index: pkgsrc/filesystems/glusterfs8/patches/patch-xlators_features_index_src_index.c
diff -u /dev/null pkgsrc/filesystems/glusterfs8/patches/patch-xlators_features_index_src_index.c:1.1
--- /dev/null Tue Aug 6 18:51:20 2024
+++ pkgsrc/filesystems/glusterfs8/patches/patch-xlators_features_index_src_index.c Tue Aug 6 18:51:19 2024
@@ -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 2020-09-16 18:40:32.419503688 +0000
++++ xlators/features/index/src/index.c
+@@ -483,7 +483,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;
+@@ -535,7 +535,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;
Index: pkgsrc/filesystems/glusterfs8/patches/patch-xlators_storage_posix_src_posix-inode-fd-ops.c
diff -u /dev/null pkgsrc/filesystems/glusterfs8/patches/patch-xlators_storage_posix_src_posix-inode-fd-ops.c:1.1
--- /dev/null Tue Aug 6 18:51:20 2024
+++ pkgsrc/filesystems/glusterfs8/patches/patch-xlators_storage_posix_src_posix-inode-fd-ops.c Tue Aug 6 18:51:19 2024
@@ -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 2020-09-16 18:40:32.527503753 +0000
++++ xlators/storage/posix/src/posix-inode-fd-ops.c
+@@ -5422,7 +5422,7 @@ posix_fill_readdir(fd_t *fd, DIR *dir, o
+ "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;
+@@ -5495,7 +5495,7 @@ posix_fill_readdir(fd_t *fd, DIR *dir, o
+ "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;
Home |
Main Index |
Thread Index |
Old Index