Mon Mar 23 23:01:48 2020 UTC ()
glusterfs: Add bashism remediation patch


(gdt)
diff -r1.94 -r1.95 pkgsrc/filesystems/glusterfs/Makefile
diff -r1.67 -r1.68 pkgsrc/filesystems/glusterfs/distinfo
diff -r1.2 -r1.3 pkgsrc/filesystems/glusterfs/patches/patch-libglusterfs_src_common-utils.c

cvs diff -r1.94 -r1.95 pkgsrc/filesystems/glusterfs/Makefile (expand / switch to unified diff)

--- pkgsrc/filesystems/glusterfs/Makefile 2020/03/12 23:52:37 1.94
+++ pkgsrc/filesystems/glusterfs/Makefile 2020/03/23 23:01:48 1.95
@@ -1,17 +1,17 @@ @@ -1,17 +1,17 @@
1# $NetBSD: Makefile,v 1.94 2020/03/12 23:52:37 gdt Exp $ 1# $NetBSD: Makefile,v 1.95 2020/03/23 23:01:48 gdt Exp $
2 2
3DISTNAME= glusterfs-3.12.8 3DISTNAME= glusterfs-3.12.8
4PKGREVISION= 5 4PKGREVISION= 6
5CATEGORIES= filesystems 5CATEGORIES= filesystems
6MASTER_SITES= http://bits.gluster.org/pub/gluster/glusterfs/src/ 6MASTER_SITES= http://bits.gluster.org/pub/gluster/glusterfs/src/
7 7
8MAINTAINER= pkgsrc-users@NetBSD.org 8MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= https://www.gluster.org/ 9HOMEPAGE= https://www.gluster.org/
10COMMENT= Cluster filesystem 10COMMENT= Cluster filesystem
11LICENSE= gnu-gpl-v3 11LICENSE= gnu-gpl-v3
12 12
13GNU_CONFIGURE= yes 13GNU_CONFIGURE= yes
14USE_LIBTOOL= yes 14USE_LIBTOOL= yes
15USE_TOOLS+= flex bison pkg-config bash 15USE_TOOLS+= flex bison pkg-config bash
16 16
17CONFIGURE_ARGS+= --disable-fusermount 17CONFIGURE_ARGS+= --disable-fusermount

cvs diff -r1.67 -r1.68 pkgsrc/filesystems/glusterfs/distinfo (expand / switch to unified diff)

--- pkgsrc/filesystems/glusterfs/distinfo 2018/09/03 00:06:35 1.67
+++ pkgsrc/filesystems/glusterfs/distinfo 2020/03/23 23:01:48 1.68
@@ -1,7 +1,8 @@ @@ -1,7 +1,8 @@
1$NetBSD: distinfo,v 1.67 2018/09/03 00:06:35 gdt Exp $ 1$NetBSD: distinfo,v 1.68 2020/03/23 23:01:48 gdt Exp $
2 2
3SHA1 (glusterfs-3.12.8.tar.gz) = 9e8ab7a86c1a3eb476816c908718ad57753406ac 3SHA1 (glusterfs-3.12.8.tar.gz) = 9e8ab7a86c1a3eb476816c908718ad57753406ac
4RMD160 (glusterfs-3.12.8.tar.gz) = d0e09f748893829f85f6570eaad977f545745115 4RMD160 (glusterfs-3.12.8.tar.gz) = d0e09f748893829f85f6570eaad977f545745115
5SHA512 (glusterfs-3.12.8.tar.gz) = 4dfe00704489e5ce1c599d691105081c14f85209319c829d82e783fec09a4544e078dc956db5dce1d130e8fcc4e617b1dfecf915f9239e250869dc0cb2ef4397 5SHA512 (glusterfs-3.12.8.tar.gz) = 4dfe00704489e5ce1c599d691105081c14f85209319c829d82e783fec09a4544e078dc956db5dce1d130e8fcc4e617b1dfecf915f9239e250869dc0cb2ef4397
6Size (glusterfs-3.12.8.tar.gz) = 7389786 bytes 6Size (glusterfs-3.12.8.tar.gz) = 7389786 bytes
7SHA1 (patch-libglusterfs_src_common-utils.c) = 71fbae30991b93c2e06c0213eafb4d8b28c2cd91 7SHA1 (patch-libglusterfs_src_common-utils.c) = 526e702fe5538d3957f4192dec0781edae686d20
 8SHA1 (patch-tools_gfind__missing__files_gfind__missing__files.sh) = 000cbc70acbb4645b9e55654698fade5605aa5b8

cvs diff -r1.2 -r1.3 pkgsrc/filesystems/glusterfs/patches/Attic/patch-libglusterfs_src_common-utils.c (expand / switch to unified diff)

--- pkgsrc/filesystems/glusterfs/patches/Attic/patch-libglusterfs_src_common-utils.c 2018/08/06 02:22:31 1.2
+++ pkgsrc/filesystems/glusterfs/patches/Attic/patch-libglusterfs_src_common-utils.c 2020/03/23 23:01:48 1.3
@@ -1,33 +1,31 @@ @@ -1,33 +1,31 @@
1$NetBSD: patch-libglusterfs_src_common-utils.c,v 1.2 2018/08/06 02:22:31 manu Exp $ 1$NetBSD: patch-libglusterfs_src_common-utils.c,v 1.3 2020/03/23 23:01:48 gdt Exp $
2 2
3Make NetBSD memory size reading routine 64-bit aware 3Make NetBSD memory size reading routine 64-bit aware
4 4
5--- libglusterfs/src/common-utils.c.orig 2018-08-05 19:00:57.102350607 +0200 5--- libglusterfs/src/common-utils.c.orig 2018-04-12 17:46:46.578237383 +0000
6+++ libglusterfs/src/common-utils.c 2018-08-05 19:21:38.677872008 +0200 6+++ libglusterfs/src/common-utils.c
7@@ -2970,15 +2970,25 @@ 7@@ -2971,13 +2971,23 @@ get_mem_size ()
8  
9 memsize = page_size * num_pages; 8 memsize = page_size * num_pages;
10 #endif 9 #endif
11  10
12-#if defined GF_BSD_HOST_OS || defined GF_DARWIN_HOST_OS 11-#if defined GF_BSD_HOST_OS || defined GF_DARWIN_HOST_OS
13+#if defined GF_DARWIN_HOST_OS 12+#if defined GF_DARWIN_HOST_OS
14  13
15 size_t len = sizeof(memsize); 14 size_t len = sizeof(memsize);
16 int name [] = { CTL_HW, HW_PHYSMEM }; 15 int name [] = { CTL_HW, HW_PHYSMEM };
17  16
18 sysctl (name, 2, &memsize, &len, NULL, 0); 17 sysctl (name, 2, &memsize, &len, NULL, 0);
19 #endif 18 #endif
20+ 19+
21+#if defined __NetBSD__ 20+#if defined __NetBSD__
22+ 21+
23+ size_t len = sizeof(memsize); 22+ size_t len = sizeof(memsize);
24+ int name64 [] = { CTL_HW, HW_PHYSMEM64 }; 23+ int name64 [] = { CTL_HW, HW_PHYSMEM64 };
25+ 24+
26+ sysctl (name64, 2, &memsize, &len, NULL, 0); 25+ sysctl (name64, 2, &memsize, &len, NULL, 0);
27+ if (memsize == -1) 26+ if (memsize == -1)
28+ sysctl (name64, 2, &memsize, &len, NULL, 0); 27+ sysctl (name64, 2, &memsize, &len, NULL, 0);
29+#endif 28+#endif
30 return memsize; 29 return memsize;
31 } 30 }
32  31
33 /* Strips all whitespace characters in a string and returns length of new string