pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Update wip/glusterfs after discussions on tech-pkg



Module Name:	pkgsrc-wip
Committed By:	Alexander Schreiber <als%thangorodrim.ch@localhost>
Pushed By:	als
Date:		Sun Mar 5 23:53:41 2023 +0000
Changeset:	b96ca7115bb4299e446d474c8cb4ad18d35890ab

Modified Files:
	glusterfs/Makefile
	glusterfs/distinfo
	glusterfs/patches/patch-libglusterfs-src-glusterfs-dict.h
Added Files:
	glusterfs/patches/patch-configure.ac_no_bash
	glusterfs/patches/patch-configure.ac_time_t
Removed Files:
	glusterfs/patches/patch-configure
	glusterfs/patches/patch-configure.ac

Log Message:
Update wip/glusterfs after discussions on tech-pkg

The in-progress work on wip/glusterfs was reviewed on tech-pkg
and various changes recommended by that discussion were implemented,
such as:
 - only patching configure.ac, then regenerating ./configure via
   autogen.sh instead of also patch ./configure
 - cleaning up the patches for
   - removing bash in configure
   - not using __WORDSIZE as a proxy for sizeof(time_t)
 - cleaning up interpreter replacements for bash/python due
   to upstream changes
 - properly marking this broken on all 32bit platforms

Thread on tech-pkg for this:
 http://mail-index.netbsd.org/tech-pkg/2023/02/27/msg027337.html

Signed-off-by: Alexander Schreiber <als%thangorodrim.ch@localhost>

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=b96ca7115bb4299e446d474c8cb4ad18d35890ab

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 glusterfs/Makefile                                 | 60 ++++++++---------
 glusterfs/distinfo                                 |  6 +-
 glusterfs/patches/patch-configure                  | 75 ----------------------
 glusterfs/patches/patch-configure.ac               | 35 ----------
 glusterfs/patches/patch-configure.ac_no_bash       | 22 +++++++
 glusterfs/patches/patch-configure.ac_time_t        | 21 ++++++
 .../patch-libglusterfs-src-glusterfs-dict.h        | 11 ++--
 7 files changed, 77 insertions(+), 153 deletions(-)

diffs:
diff --git a/glusterfs/Makefile b/glusterfs/Makefile
index 9a14a83e18..1718e21590 100644
--- a/glusterfs/Makefile
+++ b/glusterfs/Makefile
@@ -1,11 +1,10 @@
 # $NetBSD: Makefile,v 1.109 2022/06/30 11:18:23 nia Exp $
 
 DISTNAME=	glusterfs-10.3
-PKGREVISION=	9
 CATEGORIES=	filesystems
 MASTER_SITES=	http://bits.gluster.org/pub/gluster/glusterfs/src/
 
-MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
+MAINTAINER=	als%thangorodrim.ch@localhost
 HOMEPAGE=	https://www.gluster.org/
 COMMENT=	Cluster filesystem
 LICENSE=	gnu-gpl-v3
@@ -18,27 +17,23 @@ CONFIGURE_ARGS+=	--disable-fusermount
 CONFIGURE_ARGS+=	--disable-fuse-notifications
 CONFIGURE_ARGS+=	--localstatedir=${VARBASE}
 CONFIGURE_ARGS+=	--without-tcmalloc
-
-# While glusterfs never really supported 32bit platforms, older versions
-# tended to work. By now, it will die with SIGILL (executing ud2) on 32bit
-# (tested in i386) due to not being able to atomically update a 64bit value.
-BROKEN_ON_PLATFORM+=    *-*-earm*
-BROKEN_ON_PLATFORM+=    *-*-hppa
-BROKEN_ON_PLATFORM+=    *-*-i386
-BROKEN_ON_PLATFORM+=    *-*-m68000
-BROKEN_ON_PLATFORM+=    *-*-m68k
-BROKEN_ON_PLATFORM+=    *-*-mipseb
-BROKEN_ON_PLATFORM+=    *-*-mipsel
-BROKEN_ON_PLATFORM+=    *-*-powerpc
-BROKEN_ON_PLATFORM+=    *-*-riscv32
-BROKEN_ON_PLATFORM+=    *-*-sparc
-BROKEN_ON_PLATFORM+=    *-*-vax
+# 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
+# internal bits went from 32 to 64 bits and atomic updates where done
+# on those - can't do that for 64bit values on a 32bit arch.
+# https://github.com/gluster/glusterfs/issues/702 proposed an explicit
+# drop of 32bit and eventually it just happened. See
+# https://github.com/gluster/glusterfs/issues/3911#issuecomment-1451711686
+# for a more detailed explanation.
+BROKEN_ON_PLATFORM=   ${LP32PLATFORMS}
 
 # Make sure we do not attept to link with -lfl
 # Only libfl.a is available, and libtool wants libfl.so
 MAKE_FLAGS+=		LEXLIB=""
 
-REPLACE_PYTHON+=	contrib/ipaddr-py/ipaddr.py
 REPLACE_PYTHON+=	events/src/glustereventsd.py
 REPLACE_PYTHON+=	events/src/peer_eventsapi.py
 REPLACE_PYTHON+=	events/tools/eventsdash.py
@@ -48,35 +43,27 @@ REPLACE_PYTHON+=	extras/snap_scheduler/gcron.py
 REPLACE_PYTHON+=	extras/snap_scheduler/snap_scheduler.py
 REPLACE_PYTHON+=	geo-replication/src/peer_georep-sshkey.py.in
 REPLACE_PYTHON+=	geo-replication/src/peer_mountbroker.in
-REPLACE_PYTHON+=	geo-replication/src/peer_mountbroker.py
 REPLACE_PYTHON+=	geo-replication/src/peer_mountbroker.py.in
-REPLACE_PYTHON+=	geo-replication/syncdaemon/changelogagent.py
 REPLACE_PYTHON+=	geo-replication/syncdaemon/gsyncd.py
 REPLACE_PYTHON+=	geo-replication/syncdaemon/gsyncdstatus.py
 REPLACE_PYTHON+=	tools/gfind_missing_files/gfid_to_path.py
 REPLACE_PYTHON+=	tools/glusterfind/S57glusterfind-delete-post.py
 REPLACE_PYTHON+=	tools/glusterfind/glusterfind.in
-REPLACE_PYTHON+=	tools/glusterfind/src/__init__.py
 REPLACE_PYTHON+=	tools/glusterfind/src/brickfind.py
 REPLACE_PYTHON+=	tools/glusterfind/src/changelog.py
-REPLACE_PYTHON+=	tools/glusterfind/src/changelogdata.py
-REPLACE_PYTHON+=	tools/glusterfind/src/conf.py
-REPLACE_PYTHON+=	tools/glusterfind/src/libgfchangelog.py
 REPLACE_PYTHON+=	tools/glusterfind/src/main.py
 REPLACE_PYTHON+=	tools/glusterfind/src/nodeagent.py
-REPLACE_PYTHON+=	tools/glusterfind/src/utils.py
 
 REPLACE_BASH+=		extras/ganesha/ocf/ganesha_grace
 REPLACE_BASH+=		extras/ganesha/ocf/ganesha_mon
 REPLACE_BASH+=		extras/ganesha/ocf/ganesha_nfsd
-REPLACE_BASH+=		extras/ganesha/scripts/copy-export-ganesha.sh
 REPLACE_BASH+=		extras/ganesha/scripts/create-export-ganesha.sh
 REPLACE_BASH+=		extras/ganesha/scripts/dbus-send.sh
 REPLACE_BASH+=		extras/ganesha/scripts/ganesha-ha.sh
 REPLACE_BASH+=		extras/geo-rep/generate-gfid-file.sh
 REPLACE_BASH+=		extras/geo-rep/get-gfid.sh
 REPLACE_BASH+=		extras/geo-rep/gsync-upgrade.sh
-REPLACE_BASH+=		extras/geo-rep/slave-upgrade.sh
+REPLACE_BASH+=		extras/geo-rep/secondary-upgrade.sh
 REPLACE_BASH+=		extras/peer_add_secret_pub.in
 REPLACE_BASH+=		extras/post-upgrade-script-for-quota.sh
 REPLACE_BASH+=		extras/pre-upgrade-script-for-quota.sh
@@ -92,17 +79,20 @@ CHECK_PORTABILITY_SKIP+=	extras/peer_add_secret_pub.in
 
 SUBST_CLASSES+=		mtab
 SUBST_STAGE.mtab=	post-build
-SUBST_FILES.mtab=	doc/mount.glusterfs.8
-SUBST_FILES.mtab=	libglusterfs/src/compat.h
-SUBST_FILES.mtab=	xlators/mount/fuse/utils/mount.glusterfs.in
-SUBST_SED.mtab=		-e "s,mtab,/proc/mounts,g"
+SUBST_FILES.mtab+=	xlators/mount/fuse/utils/mount.glusterfs.in
+SUBST_SED.mtab+=	-e "s,mtab,/proc/mounts,g"
 
 SUBST_CLASSES+=		etc
 SUBST_STAGE.etc=	pre-build
 SUBST_FILES.etc=	libglusterfs/src/logging.c
-SUBST_FILES.etc=	doc/glusterfsd.8
+SUBST_FILES.etc+=	doc/glusterfsd.8
 SUBST_SED.etc=		-e "s,/etc/gluster,${PREFIX}/etc/gluster,g"
 
+SUBST_CLASSES+=		bash
+SUBST_STAGE.bash=	pre-configure
+SUBST_FILES.bash=	build-aux/pkg-version
+SUBST_SED.bash=		-e "s,/bin/bash,/usr/pkg/bin/bash,g"
+
 #EGDIR=			${PREFIX}/etc/glusterfs
 #CONF_FILES+=		${EGDIR}/glusterd.vol.sample ${EGDIR}/glusterd.vol
 OWN_DIRS+=		${VARBASE}/log/glusterfs
@@ -117,6 +107,10 @@ PLIST_SUBST+=		PYSITELIB=${PYSITELIB:Q}
 PLIST_SUBST+=		GLUSTERFS_VERSION=${DISTNAME:S/glusterfs-//}
 MESSAGE_SRC=		${PKGDIR}/MESSAGE.${OPSYS}
 
+
+pre-configure:
+	cd ${WRKSRC} && ./autogen.sh
+
 pre-build:
 	cd ${WRKSRC}/extras && 					\
 	${ECHO} "glusterd.vol.sample: glusterd.vol" >> Makefile &&	\
@@ -135,8 +129,6 @@ CONFIGURE_ARGS+=	--enable-debug
 #CFLAGS+=		-include gc.h
 #LIBS+=			-lgc
 
-TOOL_DEPENDS+=	automake>=1.13:../../devel/automake
-
 .include "../../mk/bsd.prefs.mk"
 
 .include "../../devel/libuuid/buildlink3.mk"
diff --git a/glusterfs/distinfo b/glusterfs/distinfo
index 18bf24f9bd..32cc2244f0 100644
--- a/glusterfs/distinfo
+++ b/glusterfs/distinfo
@@ -3,6 +3,6 @@ $NetBSD: distinfo,v 1.73 2021/10/26 10:25:29 nia Exp $
 BLAKE2s (glusterfs-10.3.tar.gz) = c2f9b5670d1df7a787e445207caa421a949f1fb98cafb587441925efe8d9e25a
 SHA512 (glusterfs-10.3.tar.gz) = af7c8a15db48196a5f7022e4da87ae8d8d43a12c8968b242f40fb43ea562d1d214e75b3a67800f8594c97847e15c01367b6d464964252551d6f8d3e93fb0f832
 Size (glusterfs-10.3.tar.gz) = 8283537 bytes
-SHA1 (patch-configure) = ab60e8108975d04b19e5846abb4c56965bcded91
-SHA1 (patch-configure.ac) = fff9e2e1c7bf9959188dc0cb35bf9a09dc14b67b
-SHA1 (patch-libglusterfs-src-glusterfs-dict.h) = 1e2d7c61adc773060b19ec0656c7dbfdab19b270
+SHA1 (patch-configure.ac_no_bash) = b188c9ea883677e4515ae0f48b6afffdc8b4c183
+SHA1 (patch-configure.ac_time_t) = 2bf7b3d6845216429d0064b4b5c47c9daf328c94
+SHA1 (patch-libglusterfs-src-glusterfs-dict.h) = ebfdfe6ffbdda3532d15fe108d4214b1e9596304
diff --git a/glusterfs/patches/patch-configure b/glusterfs/patches/patch-configure
deleted file mode 100644
index 7c276c4de2..0000000000
--- a/glusterfs/patches/patch-configure
+++ /dev/null
@@ -1,75 +0,0 @@
-$NetBSD$
-
-Defang bash 4.0 syntax in configure and check for sizeof(time_t).
-
-upstream bugs
- - (bash) https://github.com/gluster/glusterfs/issues/3940
- - (sizeof(time_t)) https://github.com/gluster/glusterfs/issues/3942
-
---- configure.orig   2023-01-08 22:27:37.625063111 +0100
-+++ configure    2023-01-08 22:26:52.017860403 +0100
-@@ -778,6 +778,7 @@
- MATH_LIB
- YFLAGS
- YACC
-+SIZEOF_TIME_T
- SIZEOF_LONG_LONG
- SIZEOF_LONG
- SIZEOF_INT
-@@ -13640,6 +13641,43 @@
- 
- 
- 
-+# size of time_t
-+# The cast to long int works around a bug in the HP C Compiler
-+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-+# This bug is HP SR number 8606223364.
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
-+$as_echo_n "checking size of time_t... " >&6; }
-+if ${ac_cv_sizeof_time_t+:} false; then :
-+  $as_echo_n "(cached) " >&6
-+else
-+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t"        "$ac_includes_default"; then :
-+
-+else
-+  if test "$ac_cv_type_time_t" = yes; then
-+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-+as_fn_error 77 "cannot compute sizeof (time_t)
-+See \`config.log' for more details" "$LINENO" 5; }
-+   else
-+     ac_cv_sizeof_time_t=0
-+   fi
-+fi
-+
-+fi
-+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
-+$as_echo "$ac_cv_sizeof_time_t" >&6; }
-+
-+
-+
-+cat >>confdefs.h <<_ACEOF
-+#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
-+_ACEOF
-+
-+
-+SIZEOF_TIME_T=$ac_cv_sizeof_time_t
-+
-+
- # YACC needs a check
- for ac_prog in 'bison -y' byacc
- do
-@@ -20213,10 +20251,10 @@
- echo "Building with LTO    : $LTO_BUILD"
- echo
- 
--# dnl Note: ${X^^} capitalization assumes bash >= 4.x
- if test "x$SANITIZER" != "xnone"; then
-+        UC_SANITIZER=$(echo ${SANITIZER} | tr 'a-z' 'A-Z')
-         echo "Note: since glusterfs processes are daemon processes, use"
--        echo "'export ${SANITIZER^^}_OPTIONS=log_path=/path/to/xxx.log' to collect"
-+        echo "'export ${UC_SANITIZER}_OPTIONS=log_path=/path/to/xxx.log' to collect"
-         echo "sanitizer output. Further details and more options can be"
-         echo "found at https://github.com/google/sanitizers.";
- fi
diff --git a/glusterfs/patches/patch-configure.ac b/glusterfs/patches/patch-configure.ac
deleted file mode 100644
index a7d7ae5b09..0000000000
--- a/glusterfs/patches/patch-configure.ac
+++ /dev/null
@@ -1,35 +0,0 @@
-$NetBSD$
-
-Defang bash 4.0 syntax in configure and check for sizeof(time_t).
-
-upstream bugs
- - (bash) https://github.com/gluster/glusterfs/issues/3940
- - (sizeof(time_t)) https://github.com/gluster/glusterfs/issues/3942
-
---- configure.ac.orig   2023-01-01 23:19:38.254216893 +0100
-+++ configure.ac        2023-01-02 15:14:21.968041528 +0100
-@@ -544,6 +544,11 @@
- AC_SUBST(SIZEOF_LONG)
- AC_SUBST(SIZEOF_LONG_LONG)
- 
-+# size of time_t
-+AC_CHECK_SIZEOF(time_t)
-+SIZEOF_TIME_T=$ac_cv_sizeof_time_t
-+AC_SUBST(SIZEOF_TIME_T)
-+
- # YACC needs a check
- AC_PROG_YACC
- if test "x${YACC}" = "xbyacc" -o "x${YACC}" = "xyacc" -o "x${YACC}" = "x"; then
-@@ -1896,10 +1901,10 @@
- echo "Building with LTO    : $LTO_BUILD"
- echo
- 
--# dnl Note: ${X^^} capitalization assumes bash >= 4.x
- if test "x$SANITIZER" != "xnone"; then
-+        UC_SANITIZER=$(echo ${SANITIZER} | tr 'a-z' 'A-Z')
-         echo "Note: since glusterfs processes are daemon processes, use"
--        echo "'export ${SANITIZER^^}_OPTIONS=log_path=/path/to/xxx.log' to collect"
-+        echo "'export ${UC_SANITIZER}_OPTIONS=log_path=/path/to/xxx.log' to collect"
-         echo "sanitizer output. Further details and more options can be"
-         echo "found at https://github.com/google/sanitizers.";
- fi
diff --git a/glusterfs/patches/patch-configure.ac_no_bash b/glusterfs/patches/patch-configure.ac_no_bash
new file mode 100644
index 0000000000..e743a929b4
--- /dev/null
+++ b/glusterfs/patches/patch-configure.ac_no_bash
@@ -0,0 +1,22 @@
+$NetBSD$
+
+Defang bash 4.0 syntax in configure.
+
+upstream bugs
+ - (bash) https://github.com/gluster/glusterfs/issues/3940
+
+--- configure.ac.orig   2023-01-01 23:19:38.254216893 +0100
++++ configure.ac        2023-01-02 15:14:21.968041528 +0100
+@@ -1896,10 +1901,10 @@
+ echo "Building with LTO    : $LTO_BUILD"
+ echo
+ 
+-# dnl Note: ${X^^} capitalization assumes bash >= 4.x
+ if test "x$SANITIZER" != "xnone"; then
++        UC_SANITIZER=$(echo ${SANITIZER} | tr 'a-z' 'A-Z')
+         echo "Note: since glusterfs processes are daemon processes, use"
+-        echo "'export ${SANITIZER^^}_OPTIONS=log_path=/path/to/xxx.log' to collect"
++        echo "'export ${UC_SANITIZER}_OPTIONS=log_path=/path/to/xxx.log' to collect"
+         echo "sanitizer output. Further details and more options can be"
+         echo "found at https://github.com/google/sanitizers.";
+ fi
diff --git a/glusterfs/patches/patch-configure.ac_time_t b/glusterfs/patches/patch-configure.ac_time_t
new file mode 100644
index 0000000000..beb5534951
--- /dev/null
+++ b/glusterfs/patches/patch-configure.ac_time_t
@@ -0,0 +1,21 @@
+$NetBSD$
+
+Check for sizeof(time_t).
+
+upstream bugs
+ - (bash) https://github.com/gluster/glusterfs/issues/3940
+
+--- configure.ac.orig   2023-01-01 23:19:38.254216893 +0100
++++ configure.ac        2023-01-02 15:14:21.968041528 +0100
+@@ -544,6 +544,11 @@
+ AC_SUBST(SIZEOF_LONG)
+ AC_SUBST(SIZEOF_LONG_LONG)
+ 
++# size of time_t
++AC_CHECK_SIZEOF(time_t)
++SIZEOF_TIME_T=$ac_cv_sizeof_time_t
++AC_SUBST(SIZEOF_TIME_T)
++
+ # YACC needs a check
+ AC_PROG_YACC
+ if test "x${YACC}" = "xbyacc" -o "x${YACC}" = "xyacc" -o "x${YACC}" = "x"; then
diff --git a/glusterfs/patches/patch-libglusterfs-src-glusterfs-dict.h b/glusterfs/patches/patch-libglusterfs-src-glusterfs-dict.h
index a1ed96b951..9e060b0b4c 100644
--- a/glusterfs/patches/patch-libglusterfs-src-glusterfs-dict.h
+++ b/glusterfs/patches/patch-libglusterfs-src-glusterfs-dict.h
@@ -1,12 +1,11 @@
 $NetBSD$
 
-Do not take for granted that __WORDSIZE is defined to distinguish 
-between 32 and 64 bit platforms. Instead use ULONG_MAX from <limits.h>
-which is mandated by ISO C99.
+Do not use __WORDSIZE as proxy for sizeof(time_t), since:
+ - __WORDSIZE is glibc (and thus Linux) only
+ - machine word size is a bad proxy for sizeof(time_t), e.g.
+   NetBSD on 32bit arch (i386) also has sizeof(time_t) == 8
 
-Still not a good solution, as __WORDSIZE is used as a proxy for sizeof(time_t),
-but some superficial tests indicate that sizeof(time_t) seems to track with
-machine word size on reasonably current platforms.
+Instead use configure to check sizeof(time_t) and use this.
 
 upstream bug https://github.com/gluster/glusterfs/issues/3942
 


Home | Main Index | Thread Index | Old Index