pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/parallel/ganglia-monitor-core parallel/ganglia-monitor...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/17f9aada0813
branches:  trunk
changeset: 309927:17f9aada0813
user:      bacon <bacon%pkgsrc.org@localhost>
date:      Thu Jun 28 01:05:01 2018 +0000

description:
parallel/ganglia-monitor-core: Unbreak linux build, add Linux rc files

Add MESSAGE.Linux with instructions for init and systemd.

Take ownership from pkgsrc-users.

diffstat:

 parallel/ganglia-monitor-core/Makefile                            |  51 ++++++++-
 parallel/ganglia-monitor-core/PLIST                               |   6 +-
 parallel/ganglia-monitor-core/distinfo                            |   6 +-
 parallel/ganglia-monitor-core/files/gmetad.service.in             |  12 ++
 parallel/ganglia-monitor-core/files/gmond.service.in              |  11 ++
 parallel/ganglia-monitor-core/patches/patch-gmetad_data__thread.c |   8 +-
 parallel/ganglia-monitor-core/patches/patch-gmetad_rrd__helpers.c |   8 +-
 7 files changed, 86 insertions(+), 16 deletions(-)

diffs (206 lines):

diff -r 5f630b4d622d -r 17f9aada0813 parallel/ganglia-monitor-core/Makefile
--- a/parallel/ganglia-monitor-core/Makefile    Wed Jun 27 19:33:58 2018 +0000
+++ b/parallel/ganglia-monitor-core/Makefile    Thu Jun 28 01:05:01 2018 +0000
@@ -1,13 +1,13 @@
-# $NetBSD: Makefile,v 1.58 2018/04/16 14:35:04 wiz Exp $
+# $NetBSD: Makefile,v 1.59 2018/06/28 01:05:01 bacon 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 @@
 
 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 @@
                        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=    post-patch
+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=                post-patch
+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=   post-patch
+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_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 -r 5f630b4d622d -r 17f9aada0813 parallel/ganglia-monitor-core/PLIST
--- a/parallel/ganglia-monitor-core/PLIST       Wed Jun 27 19:33:58 2018 +0000
+++ b/parallel/ganglia-monitor-core/PLIST       Thu Jun 28 01:05:01 2018 +0000
@@ -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 @@
 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 -r 5f630b4d622d -r 17f9aada0813 parallel/ganglia-monitor-core/distinfo
--- a/parallel/ganglia-monitor-core/distinfo    Wed Jun 27 19:33:58 2018 +0000
+++ b/parallel/ganglia-monitor-core/distinfo    Thu Jun 28 01:05:01 2018 +0000
@@ -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
@@ -7,8 +7,8 @@
 SHA1 (patch-ac) = 09a96c391f185ddd5f7a64a8b030f38c36ffbc76
 SHA1 (patch-configure) = d8f096263a8b2f04e30d4a053b4636ac5d1cd95f
 SHA1 (patch-gmetad_conf.c.in) = 75aa2d0c5d8af8a2864f7225444f1f263df4a60b
-SHA1 (patch-gmetad_data__thread.c) = 8dedb930e54872dab97d659f7d911a540171dbfd
-SHA1 (patch-gmetad_rrd__helpers.c) = 643c359f461e9616b547b276281bcc9a39a77a28
+SHA1 (patch-gmetad_data__thread.c) = 1af7a1c5b3f78bf65de42638e8ed595bf718107a
+SHA1 (patch-gmetad_rrd__helpers.c) = e1afe61311b0df96f633983e673652b32a1938f4
 SHA1 (patch-gmond_gmond.conf.5) = dfabfee6fb26cd5a384c1baed48fe631b957cf5b
 SHA1 (patch-gmond_modules_conf.d_modpython.conf.in) = 5b0d79efb34dae2f46dd911509759e8d75b4af96
 SHA1 (patch-lib__gm_protocol_dr.c) = 9d17d79bb1a6426a2547c00006819483aff47363
diff -r 5f630b4d622d -r 17f9aada0813 parallel/ganglia-monitor-core/files/gmetad.service.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/parallel/ganglia-monitor-core/files/gmetad.service.in     Thu Jun 28 01:05:01 2018 +0000
@@ -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 -r 5f630b4d622d -r 17f9aada0813 parallel/ganglia-monitor-core/files/gmond.service.in
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/parallel/ganglia-monitor-core/files/gmond.service.in      Thu Jun 28 01:05:01 2018 +0000
@@ -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
diff -r 5f630b4d622d -r 17f9aada0813 parallel/ganglia-monitor-core/patches/patch-gmetad_data__thread.c
--- a/parallel/ganglia-monitor-core/patches/patch-gmetad_data__thread.c Wed Jun 27 19:33:58 2018 +0000
+++ b/parallel/ganglia-monitor-core/patches/patch-gmetad_data__thread.c Thu Jun 28 01:05:01 2018 +0000
@@ -1,14 +1,16 @@
-$NetBSD: patch-gmetad_data__thread.c,v 1.1 2016/02/16 12:48:18 fhajny Exp $
+$NetBSD: patch-gmetad_data__thread.c,v 1.2 2018/06/28 01:05:01 bacon Exp $
 
-Portability.
+# Portability
 
 --- gmetad/data_thread.c.orig  2015-07-01 19:49:35.000000000 +0000
 +++ gmetad/data_thread.c
-@@ -1,6 +1,7 @@
+@@ -1,6 +1,9 @@
  #include <stdio.h>
  #include <stdlib.h>
  #include <unistd.h>
++#ifndef __linux__
 +#include <sys/filio.h>
++#endif
  #include <sys/ioctl.h>
  #include <sys/poll.h>
  #include <sys/time.h>
diff -r 5f630b4d622d -r 17f9aada0813 parallel/ganglia-monitor-core/patches/patch-gmetad_rrd__helpers.c
--- a/parallel/ganglia-monitor-core/patches/patch-gmetad_rrd__helpers.c Wed Jun 27 19:33:58 2018 +0000
+++ b/parallel/ganglia-monitor-core/patches/patch-gmetad_rrd__helpers.c Thu Jun 28 01:05:01 2018 +0000
@@ -1,14 +1,16 @@
-$NetBSD: patch-gmetad_rrd__helpers.c,v 1.1 2016/02/16 12:48:18 fhajny Exp $
+$NetBSD: patch-gmetad_rrd__helpers.c,v 1.2 2018/06/28 01:05:01 bacon Exp $
 
-Portability.
+# Portability
 
 --- gmetad/rrd_helpers.c.orig  2015-07-01 19:49:35.000000000 +0000
 +++ gmetad/rrd_helpers.c
-@@ -2,6 +2,7 @@
+@@ -2,6 +2,9 @@
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
++#ifndef __linux__
 +#include <sys/filio.h>
++#endif
  #include <sys/types.h>
  #include <sys/stat.h>
  #include <unistd.h>



Home | Main Index | Thread Index | Old Index