pkgsrc-Bugs archive

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

Re: pkg/57285: glusterfs package doens't handle config files properly



I've got a patch ready to fix the config file handling for
glusterfs. Patch is against current git of pkgsrc and attached.


-- 
"Opportunity is missed by most people because it is dressed in overalls and
 looks like work."                                      -- Thomas A. Edison
diff -Nru --exclude=CVS /usr/pkgsrc/filesystems/glusterfs/Makefile wip/glusterfs/Makefile
--- /usr/pkgsrc/filesystems/glusterfs/Makefile	2023-03-26 21:51:06.119945333 +0000
+++ wip/glusterfs/Makefile	2023-03-26 22:56:12.305366291 +0000
@@ -20,6 +20,8 @@
 CONFIGURE_ARGS+=	--without-tcmalloc
 # libtirpc not in pkgsrc (yet)
 CONFIGURE_ARGS+=	--without-libtirpc
+CONFIGURE_ARGS+=	--sysconfdir=${PKG_SYSCONFDIR}
+CONFIGURE_ARGS+=	--datadir=${PREFIX}/share/${PKGBASE}
 
 # Upstream glusterfs effectively dropped support for 32bit platforms
 # somewhere between 8.2 (works on e.g. NetBSD/i386) and 10.3 as various
@@ -94,8 +96,26 @@
 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
+EGDIR=		${PREFIX}/share/${PKGBASE}/config
+CONF_FILES+=	${EGDIR}/eventsconfig.json ${PKG_SYSCONFDIR}/glusterfs/eventsconfig.json
+CONF_FILES+=	${EGDIR}/ganesha/ganesha-ha.conf.sample ${PKG_SYSCONFDIR}/glusterfs/ganesha/ganesha-ha.conf.sample
+CONF_FILES+=	${EGDIR}/gluster-rsyslog-5.8.conf ${PKG_SYSCONFDIR}/glusterfs/gluster-rsyslog-5.8.conf
+CONF_FILES+=	${EGDIR}/gluster-rsyslog-7.2.conf ${PKG_SYSCONFDIR}/glusterfs/gluster-rsyslog-7.2.conf
+CONF_FILES+=	${EGDIR}/glusterd.vol ${PKG_SYSCONFDIR}/glusterfs/glusterd.vol
+CONF_FILES+=	${EGDIR}/glusterfs-georep-logrotate ${PKG_SYSCONFDIR}/glusterfs/glusterfs-georep-logrotate
+CONF_FILES+=	${EGDIR}/glusterfs-logrotate ${PKG_SYSCONFDIR}/glusterfs/glusterfs-logrotate
+CONF_FILES+=	${EGDIR}/group-db-workload ${PKG_SYSCONFDIR}/glusterfs/group-db-workload
+CONF_FILES+=	${EGDIR}/group-distributed-virt ${PKG_SYSCONFDIR}/glusterfs/group-distributed-virt
+CONF_FILES+=	${EGDIR}/group-gluster-block ${PKG_SYSCONFDIR}/glusterfs/group-gluster-block
+CONF_FILES+=	${EGDIR}/group-metadata-cache ${PKG_SYSCONFDIR}/glusterfs/group-metadata-cache
+CONF_FILES+=	${EGDIR}/group-nl-cache ${PKG_SYSCONFDIR}/glusterfs/group-nl-cache
+CONF_FILES+=	${EGDIR}/group-samba ${PKG_SYSCONFDIR}/glusterfs/group-samba
+CONF_FILES+=	${EGDIR}/group-virt.example ${PKG_SYSCONFDIR}/glusterfs/group-virt.example
+CONF_FILES+=	${EGDIR}/logger.conf.example ${PKG_SYSCONFDIR}/glusterfs/logger.conf.example
+CONF_FILES+=	${EGDIR}/thin-arbiter.vol ${PKG_SYSCONFDIR}/glusterfs/thin-arbiter.vol
+OWN_DIRS+=		${PKG_SYSCONFDIR}/glusterfs
+OWN_DIRS+=		${PKG_SYSCONFDIR}/glusterfs/ganesha
+
 OWN_DIRS+=		${VARBASE}/log/glusterfs
 BUILD_DEFS+=		VARBASE
 
@@ -131,6 +151,11 @@
 
 .include "../../mk/bsd.prefs.mk"
 
+# only needed on Linux since glibc dropped RPC support
+.if ${OPSYS} != "Linux"
+CONFIGURE_ARGS+=	--without-libtirpc
+.endif
+
 .include "../../devel/libuuid/buildlink3.mk"
 .include "../../devel/argp/buildlink3.mk"
 .include "../../security/openssl/buildlink3.mk"
diff -Nru --exclude=CVS /usr/pkgsrc/filesystems/glusterfs/PLIST wip/glusterfs/PLIST
--- /usr/pkgsrc/filesystems/glusterfs/PLIST	2023-03-26 21:51:06.120643477 +0000
+++ wip/glusterfs/PLIST	2023-03-26 21:35:49.347674312 +0000
@@ -9,23 +9,6 @@
 ${PYSITELIB}/gluster/cliutils/cliutils.pyc
 ${PYSITELIB}/gluster/cliutils/cliutils.pyo
 bin/glusterfind
-etc/ganesha/ganesha-ha.conf.sample
-etc/glusterfs/eventsconfig.json
-etc/glusterfs/gluster-rsyslog-5.8.conf
-etc/glusterfs/gluster-rsyslog-7.2.conf
-etc/glusterfs/glusterd.vol
-etc/glusterfs/glusterfs-georep-logrotate
-etc/glusterfs/glusterfs-logrotate
-etc/glusterfs/group-db-workload
-etc/glusterfs/group-distributed-virt
-etc/glusterfs/group-gluster-block
-etc/glusterfs/group-metadata-cache
-etc/glusterfs/group-nl-cache
-etc/glusterfs/group-samba
-etc/glusterfs/group-virt.example
-etc/glusterfs/gsyncd.conf
-etc/glusterfs/logger.conf.example
-etc/glusterfs/thin-arbiter.vol
 include/glusterfs/api/glfs-handles.h
 include/glusterfs/api/glfs.h
 include/glusterfs/async.h
@@ -354,6 +337,23 @@
 share/doc/glusterfs/glusterfs-mode.el
 share/doc/glusterfs/glusterfs.vim
 share/examples/rc.d/glusterd
+share/glusterfs/config/eventsconfig.json
+share/glusterfs/config/ganesha/ganesha-ha.conf.sample
+share/glusterfs/config/gluster-rsyslog-5.8.conf
+share/glusterfs/config/gluster-rsyslog-7.2.conf
+share/glusterfs/config/glusterd.vol
+share/glusterfs/config/glusterfs-georep-logrotate
+share/glusterfs/config/glusterfs-logrotate
+share/glusterfs/config/group-db-workload
+share/glusterfs/config/group-distributed-virt
+share/glusterfs/config/group-gluster-block
+share/glusterfs/config/group-metadata-cache
+share/glusterfs/config/group-nl-cache
+share/glusterfs/config/group-samba
+share/glusterfs/config/group-virt.example
+share/glusterfs/config/gsyncd.conf
+share/glusterfs/config/logger.conf.example
+share/glusterfs/config/thin-arbiter.vol
 share/glusterfs/scripts/eventsdash.py
 share/glusterfs/scripts/post-upgrade-script-for-quota.sh
 share/glusterfs/scripts/pre-upgrade-script-for-quota.sh
diff -Nru --exclude=CVS /usr/pkgsrc/filesystems/glusterfs/distinfo wip/glusterfs/distinfo
--- /usr/pkgsrc/filesystems/glusterfs/distinfo	2023-03-26 21:51:06.121214229 +0000
+++ wip/glusterfs/distinfo	2023-03-26 21:35:49.348508230 +0000
@@ -4,4 +4,9 @@
 SHA512 (glusterfs-10.3.tar.gz) = af7c8a15db48196a5f7022e4da87ae8d8d43a12c8968b242f40fb43ea562d1d214e75b3a67800f8594c97847e15c01367b6d464964252551d6f8d3e93fb0f832
 Size (glusterfs-10.3.tar.gz) = 8283537 bytes
 SHA1 (patch-configure.ac) = e4c2f65d6579aab9b62e28ba60b75ba542116811
+SHA1 (patch-events-src-Makefile.am) = 2eccb54787d1c91ec2fa8254ff4d841ec59872ff
+SHA1 (patch-events-tools-Makefile.am) = d020ed0d657f473bcc93d2a048693c90903fc3ea
+SHA1 (patch-extras-Makefile.am) = ac8f2452894c05f5961d2c4d9f047ecad62274af
+SHA1 (patch-extras-ganesha-config-Makefile.am) = 66edb599e9b644e934f29b6bdb9bf1076b46c6ff
+SHA1 (patch-geo-replication_Makefile.am) = 7ae32924d53a5d7d3f02dff6373fd5f26acfc763
 SHA1 (patch-libglusterfs-src-glusterfs-dict.h) = ebfdfe6ffbdda3532d15fe108d4214b1e9596304
diff -Nru --exclude=CVS /usr/pkgsrc/filesystems/glusterfs/patches/patch-events-src-Makefile.am wip/glusterfs/patches/patch-events-src-Makefile.am
--- /usr/pkgsrc/filesystems/glusterfs/patches/patch-events-src-Makefile.am	1970-01-01 00:00:00.000000000 +0000
+++ wip/glusterfs/patches/patch-events-src-Makefile.am	2023-03-26 21:35:49.348964999 +0000
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Move config file examples into datadir/config.
+
+--- events/src/Makefile.am.orig	2023-03-26 20:21:30.925479702 +0200
++++ events/src/Makefile.am	2023-03-26 20:23:29.931392874 +0200
+@@ -18,7 +18,7 @@
+ 
+ if BUILD_EVENTS
+ eventspeerscriptdir = $(GLUSTERFS_LIBEXECDIR)
+-eventsconfdir = $(sysconfdir)/glusterfs
++eventsconfdir = $(datadir)/config
+ eventsconf_DATA = eventsconfig.json
+ 
+ events_PYTHON += handlers.py
diff -Nru --exclude=CVS /usr/pkgsrc/filesystems/glusterfs/patches/patch-events-tools-Makefile.am wip/glusterfs/patches/patch-events-tools-Makefile.am
--- /usr/pkgsrc/filesystems/glusterfs/patches/patch-events-tools-Makefile.am	1970-01-01 00:00:00.000000000 +0000
+++ wip/glusterfs/patches/patch-events-tools-Makefile.am	2023-03-26 21:35:49.349307786 +0000
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Move config file examples into datadir/config.
+
+--- ./events/tools/Makefile.am.orig	2023-03-26 22:02:34.114370386 +0200
++++ ./events/tools/Makefile.am	2023-03-26 22:04:34.696253263 +0200
+@@ -1,6 +1,6 @@
+ EXTRA_DIST = eventsdash.py
+ 
+ if BUILD_EVENTS
+-scriptsdir = $(datadir)/glusterfs/scripts
++scriptsdir = $(datadir)/scripts
+ scripts_SCRIPTS = eventsdash.py
+ endif
diff -Nru --exclude=CVS /usr/pkgsrc/filesystems/glusterfs/patches/patch-extras-Makefile.am wip/glusterfs/patches/patch-extras-Makefile.am
--- /usr/pkgsrc/filesystems/glusterfs/patches/patch-extras-Makefile.am	1970-01-01 00:00:00.000000000 +0000
+++ wip/glusterfs/patches/patch-extras-Makefile.am	2023-03-26 21:35:49.349713430 +0000
@@ -0,0 +1,31 @@
+$NetBSD$
+
+Move config file examples into datadir/config.
+
+--- extras/Makefile.am.orig	2023-03-26 21:13:51.077824013 +0200
++++ extras/Makefile.am	2023-03-26 22:06:51.601849285 +0200
+@@ -14,7 +14,7 @@
+           $(GEOREP_EXTRAS_SUBDIR) snap_scheduler firewalld cliutils python \
+ 		  ganesha
+ 
+-confdir = $(sysconfdir)/glusterfs
++confdir = $(datadir)/config
+ if WITH_SERVER
+ conf_DATA = glusterfs-logrotate gluster-rsyslog-7.2.conf gluster-rsyslog-5.8.conf \
+ 	    logger.conf.example glusterfs-georep-logrotate group-virt.example \
+@@ -22,13 +22,13 @@
+ 	    group-db-workload group-distributed-virt group-samba
+ endif
+ 
+-voldir = $(sysconfdir)/glusterfs
++voldir = $(datadir)/config
+ vol_DATA = thin-arbiter/thin-arbiter.vol
+ if WITH_SERVER
+ vol_DATA += glusterd.vol
+ endif
+ 
+-scriptsdir = $(datadir)/glusterfs/scripts
++scriptsdir = $(datadir)/scripts
+ scripts_SCRIPTS = thin-arbiter/setup-thin-arbiter.sh
+ if WITH_SERVER
+ scripts_SCRIPTS += post-upgrade-script-for-quota.sh \
diff -Nru --exclude=CVS /usr/pkgsrc/filesystems/glusterfs/patches/patch-extras-ganesha-config-Makefile.am wip/glusterfs/patches/patch-extras-ganesha-config-Makefile.am
--- /usr/pkgsrc/filesystems/glusterfs/patches/patch-extras-ganesha-config-Makefile.am	1970-01-01 00:00:00.000000000 +0000
+++ wip/glusterfs/patches/patch-extras-ganesha-config-Makefile.am	2023-03-26 21:35:49.350157628 +0000
@@ -0,0 +1,12 @@
+$NetBSD$
+
+Move config file examples into datadir/config.
+
+--- extras/ganesha/config/Makefile.am.orig	2023-03-26 21:12:29.411265897 +0200
++++ extras/ganesha/config/Makefile.am	2023-03-26 21:13:03.550663093 +0200
+@@ -1,4 +1,4 @@
+ EXTRA_DIST= ganesha-ha.conf.sample
+ 
+-confdir = $(sysconfdir)/ganesha
++confdir = $(datadir)/config/ganesha
+ conf_DATA = ganesha-ha.conf.sample
diff -Nru --exclude=CVS /usr/pkgsrc/filesystems/glusterfs/patches/patch-geo-replication_Makefile.am wip/glusterfs/patches/patch-geo-replication_Makefile.am
--- /usr/pkgsrc/filesystems/glusterfs/patches/patch-geo-replication_Makefile.am	1970-01-01 00:00:00.000000000 +0000
+++ wip/glusterfs/patches/patch-geo-replication_Makefile.am	2023-03-26 21:35:49.350593444 +0000
@@ -0,0 +1,13 @@
+$NetBSD$
+
+Move config file examples into datadir/config.
+
+--- geo-replication/Makefile.am.orig	2023-03-26 21:48:57.832695826 +0200
++++ geo-replication/Makefile.am	2023-03-26 21:49:19.972307456 +0200
+@@ -4,5 +4,5 @@
+ 
+ EXTRA_DIST = gsyncd.conf.in
+ 
+-gsyncdconfdir = $(sysconfdir)/glusterfs/
++gsyncdconfdir = $(datadir)/config/
+ gsyncdconf_DATA = gsyncd.conf


Home | Main Index | Thread Index | Old Index