pkgsrc-WIP-changes archive

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

ganglia-monitor-core: Bring up to date with committed pkg



Module Name:	pkgsrc-wip
Committed By:	Jason Bacon <bacon%NetBSD.org@localhost>
Pushed By:	outpaddling
Date:		Wed Sep 19 18:01:15 2018 -0500
Changeset:	402d9ac21a8ea8420f2d90dd22c79561644903a2

Modified Files:
	ganglia-monitor-core/Makefile
	ganglia-monitor-core/PLIST
	ganglia-monitor-core/distinfo
Added Files:
	ganglia-monitor-core/MESSAGE.Linux
	ganglia-monitor-core/files/gmetad.service.in
	ganglia-monitor-core/files/gmond.service.in

Log Message:
ganglia-monitor-core: Bring up to date with committed pkg

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

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

diffstat:
 ganglia-monitor-core/MESSAGE.Linux           | 16 +++++++++
 ganglia-monitor-core/Makefile                | 51 ++++++++++++++++++++++++----
 ganglia-monitor-core/PLIST                   |  6 +++-
 ganglia-monitor-core/distinfo                |  2 +-
 ganglia-monitor-core/files/gmetad.service.in | 12 +++++++
 ganglia-monitor-core/files/gmond.service.in  | 11 ++++++
 6 files changed, 90 insertions(+), 8 deletions(-)

diffs:
diff --git a/ganglia-monitor-core/MESSAGE.Linux b/ganglia-monitor-core/MESSAGE.Linux
new file mode 100644
index 0000000000..141f89958e
--- /dev/null
+++ b/ganglia-monitor-core/MESSAGE.Linux
@@ -0,0 +1,16 @@
+===========================================================================
+$NetBSD: MESSAGE.Linux,v 1.1 2018/06/28 01:11:29 bacon Exp $
+
+The above refers to NetBSD.  Linux init and systemd scripts are available in
+
+	${PREFIX}/share/examples/ganglia/
+
+On RHEL and similar systems:
+
+Init scripts should be copied to /etc/rc.d/init.d/.
+Systemd scripts go in /etc/systemd/system/multi-user.target.wants/.
+
+Check the system documentation for other Linux-based operating systems to
+determine the equivalent locations.
+
+===========================================================================
diff --git a/ganglia-monitor-core/Makefile b/ganglia-monitor-core/Makefile
index 0a26162f1c..26a6547a4d 100644
--- a/ganglia-monitor-core/Makefile
+++ b/ganglia-monitor-core/Makefile
@@ -1,13 +1,13 @@
-# $NetBSD: Makefile,v 1.58 2018/04/16 14:35:04 wiz Exp $
+# $NetBSD: Makefile,v 1.60 2018/07/04 13:40:31 jperkin Exp $
 #
 
 DISTNAME=		ganglia-3.7.2
 PKGNAME=		ganglia-monitor-core-3.7.2
-PKGREVISION=		4
+PKGREVISION=		5
 CATEGORIES=		net parallel
 MASTER_SITES=		${MASTER_SITE_SOURCEFORGE:=ganglia/}
 
-MAINTAINER=		pkgsrc-users%NetBSD.org@localhost
+MAINTAINER=		bacon%NetBSD.org@localhost
 HOMEPAGE=		http://ganglia.sourceforge.net/
 COMMENT=		Ganglia cluster monitor, monitoring daemon
 LICENSE=		modified-bsd
@@ -23,6 +23,7 @@ PLIST_VARS+=		python
 
 PKG_OPTIONS_VAR=	PKG_OPTIONS.ganglia
 PKG_SUPPORTED_OPTIONS=	python		# Gmond support for python modules
+BUILD_DEFS+=		VARBASE
 
 .include "../../mk/bsd.prefs.mk"
 
@@ -68,10 +69,34 @@ SUBST_FILES.paths=	configure ganglia.html			\
 			gmond/modules/conf.d/modpython.conf.in	\
 			gmond/modules/python/README.in		\
 			mans/gmetad.1 mans/gmetric.1 mans/gmond.1
-SUBST_SED.paths+=	-e 's,/etc/ganglia,${PKG_SYSCONFDIR},g'
-SUBST_SED.paths+=	-e 's,/usr/lib/ganglia,${PREFIX}/lib/ganglia,g'
+SUBST_SED.paths+=	-e 's|/etc/ganglia|${PKG_SYSCONFDIR}|g'
+SUBST_SED.paths+=	-e 's|/usr/lib/ganglia|${PREFIX}/lib/ganglia|g'
 SUBST_VARS.paths+=	GANGLIA_VARBASE
 
+## gmond.conf.5 and gmond.conf.html can be generated from conf.pod, but
+## doing so requires perl installed in the build stage.
+SUBST_CLASSES+=		etcdir
+SUBST_STAGE.etcdir=	pre-configure
+SUBST_FILES.etcdir=	${WRKSRC}/README \
+			${WRKSRC}/mans/gmetad.1 \
+			${WRKSRC}/mans/gmond.1
+SUBST_SED.etcdir=	-e "s|/etc/ganglia/\(gm.*d\.conf\)|${PREFIX}/etc/\1|g"
+
+SUBST_CLASSES+=			linux_init
+SUBST_STAGE.linux_init=		pre-configure
+SUBST_FILES.linux_init=		gmond/gmond.init
+SUBST_FILES.linux_init+=	gmetad/gmetad.init
+SUBST_SED.linux_init=		-e 's|/usr/sbin|${PREFIX}/sbin|g'
+SUBST_SED.linux_init+=		-e 's|/etc/sysconfig|${PREFIX}&|g'
+SUBST_SED.linux_init+=		-e 's|/etc/ganglia|${PREFIX}&|g'
+SUBST_SED.linux_init+=		-e 's|/var/lock/subsys|${PREFIX}&|g'
+
+SUBST_CLASSES+=		systemd
+SUBST_STAGE.systemd=	pre-configure
+SUBST_FILES.systemd=	gmond/gmond.service gmetad/gmetad.service
+SUBST_SED.systemd=	-e 's|@runstatedir@|${PREFIX}/var/run|g'
+SUBST_SED.systemd+=	-e 's|@sbindir@|${PREFIX}/sbin|g'
+
 FILES_SUBST+=		GANGLIA_VARBASE=${GANGLIA_VARBASE}
 
 DOCDIR=			${PREFIX}/share/doc/ganglia
@@ -84,10 +109,24 @@ SMF_NAME=		ganglia
 SMF_INSTANCES=		${RCD_SCRIPTS}
 
 INSTALLATION_DIRS=	${DOCDIR} ${EGDIR} ${PKGMANDIR}/man1 ${PKGMANDIR}/man5
+INSTALLATION_DIRS+=	var/lock/subsys
+
+post-extract:
+	${CP} ${FILESDIR}/gmond.service.in ${WRKSRC}/gmond/gmond.service
+	${CP} ${FILESDIR}/gmetad.service.in ${WRKSRC}/gmetad/gmetad.service
 
 post-install:
 	${WRKSRC}/gmond/gmond -t > ${DESTDIR}${EGDIR}/gmond.conf
-	${INSTALL_DATA} ${WRKSRC}/gmond/modules/python/README ${DESTDIR}${DOCDIR}/
+	${INSTALL_DATA} ${WRKSRC}/gmond/modules/python/README \
+		${DESTDIR}${DOCDIR}
+	${INSTALL_SCRIPT} ${WRKSRC}/gmond/gmond.init \
+		${DESTDIR}${EGDIR}/gmond.init.linux
+	${INSTALL_SCRIPT} ${WRKSRC}/gmond/gmond.service \
+		${DESTDIR}${EGDIR}
+	${INSTALL_SCRIPT} ${WRKSRC}/gmetad/gmetad.init \
+		${DESTDIR}${EGDIR}/gmetad.init.linux
+	${INSTALL_SCRIPT} ${WRKSRC}/gmetad/gmetad.service \
+		${DESTDIR}${EGDIR}
 
 .include "../../databases/rrdtool/buildlink3.mk"
 .include "../../devel/apr/buildlink3.mk"
diff --git a/ganglia-monitor-core/PLIST b/ganglia-monitor-core/PLIST
index c99b06287d..ffcf323b48 100644
--- a/ganglia-monitor-core/PLIST
+++ b/ganglia-monitor-core/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.8 2018/01/01 22:29:51 rillig Exp $
+@comment $NetBSD: PLIST,v 1.9 2018/06/28 01:05:01 bacon Exp $
 bin/ganglia-config
 bin/gmetric
 bin/gstat
@@ -31,4 +31,8 @@ sbin/gmond
 share/doc/ganglia/README
 ${PLIST.python}share/examples/ganglia/conf.d/modpython.conf
 share/examples/ganglia/gmetad.conf
+share/examples/ganglia/gmetad.init.linux
+share/examples/ganglia/gmetad.service
 share/examples/ganglia/gmond.conf
+share/examples/ganglia/gmond.init.linux
+share/examples/ganglia/gmond.service
diff --git a/ganglia-monitor-core/distinfo b/ganglia-monitor-core/distinfo
index 3ccc07e0f5..53b6bbc855 100644
--- a/ganglia-monitor-core/distinfo
+++ b/ganglia-monitor-core/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.15 2017/06/30 00:52:44 kamil Exp $
+$NetBSD: distinfo,v 1.16 2018/06/28 01:05:01 bacon Exp $
 
 SHA1 (ganglia-3.7.2.tar.gz) = 5ea23da8e5b85da53216dd7c742c8154e7aa576e
 RMD160 (ganglia-3.7.2.tar.gz) = 9b5c48bcf2aa489caea689713dabb12804d9cee2
diff --git a/ganglia-monitor-core/files/gmetad.service.in b/ganglia-monitor-core/files/gmetad.service.in
new file mode 100644
index 0000000000..d7800655a6
--- /dev/null
+++ b/ganglia-monitor-core/files/gmetad.service.in
@@ -0,0 +1,12 @@
+[Unit]
+Description=Ganglia Meta Daemon
+After=network-online.target
+
+[Service]
+Type=forking
+PIDFile=@runstatedir@/gmetad.pid
+ExecStart=@sbindir@/gmetad --pid-file=@runstatedir@/gmetad.pid
+EnvironmentFile=-@envdir@/gmetad
+
+[Install]
+WantedBy=multi-user.target
diff --git a/ganglia-monitor-core/files/gmond.service.in b/ganglia-monitor-core/files/gmond.service.in
new file mode 100644
index 0000000000..13774e80e6
--- /dev/null
+++ b/ganglia-monitor-core/files/gmond.service.in
@@ -0,0 +1,11 @@
+[Unit]
+Description=Ganglia Monitor Daemon
+After=network-online.target
+
+[Service]
+Type=forking
+PIDFile=@runstatedir@/gmond.pid
+ExecStart=@sbindir@/gmond --pid-file=@runstatedir@/gmond.pid
+
+[Install]
+WantedBy=multi-user.target


Home | Main Index | Thread Index | Old Index