View | Details | Raw Unified | Return to bug 199074 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/wip/sysutils/ganglia-monitor-core/Makefile (-72 / +41 lines)
Lines 1-9 Link Here
1
# $FreeBSD: head/sysutils/ganglia-monitor-core/Makefile 371454 2014-10-24 16:56:10Z mva $
1
# $FreeBSD: head/sysutils/ganglia-monitor-core/Makefile 371454 2014-10-24 16:56:10Z mva $
2
2
3
PORTNAME=	monitor-core
3
PORTNAME=	monitor-core
4
PORTVERSION=	3.4.0
4
PORTVERSION=	3.6.0
5
PORTREVISION=	6
5
CATEGORIES=	sysutils net
6
CATEGORIES=	sysutils net parallel
7
MASTER_SITES=	SF/ganglia/ganglia%20monitoring%20core/${PORTVERSION}
6
MASTER_SITES=	SF/ganglia/ganglia%20monitoring%20core/${PORTVERSION}
8
PKGNAMEPREFIX=	ganglia-
7
PKGNAMEPREFIX=	ganglia-
9
.if defined(CLUSTER)
8
.if defined(CLUSTER)
Lines 11-36 Link Here
11
.endif
10
.endif
12
DISTNAME=	ganglia-${PORTVERSION}
11
DISTNAME=	ganglia-${PORTVERSION}
13
12
14
MAINTAINER=	ports@FreeBSD.org
13
MAINTAINER=	jwbacon@tds.net
15
COMMENT=	Ganglia cluster monitor, monitoring daemon
14
COMMENT=	Ganglia cluster monitor, monitoring daemon
16
15
16
LICENSE=	BSD3CLAUSE
17
17
LIB_DEPENDS=	libapr-1.so:${PORTSDIR}/devel/apr1 \
18
LIB_DEPENDS=	libapr-1.so:${PORTSDIR}/devel/apr1 \
18
		libconfuse.so:${PORTSDIR}/devel/libconfuse \
19
		libconfuse.so:${PORTSDIR}/devel/libconfuse \
19
		libpcre.so:${PORTSDIR}/devel/pcre \
20
		libpcre.so:${PORTSDIR}/devel/pcre \
20
		libexpat.so:${PORTSDIR}/textproc/expat2
21
		libexpat.so:${PORTSDIR}/textproc/expat2 \
21
22
		librrd.so:${PORTSDIR}/databases/rrdtool
22
PKGINSTALL=	${WRKDIR}/pkg-install
23
24
OPTIONS_DEFINE=	GMETAD
25
OPTIONS_DEFAULT=	GMETAD
26
GMETAD_DESC=	include gmetad
27
23
28
USES=		libtool pkgconfig python
24
USES=		libtool pkgconfig python
29
25
30
GNU_CONFIGURE=	yes
26
GNU_CONFIGURE=	yes
31
CONFIGURE_ARGS=	--enable-setuid=ganglia --enable-setgid=ganglia \
27
CONFIGURE_ARGS=	--enable-setuid=ganglia --enable-setgid=ganglia \
32
		--with-python=${PYTHON_CMD}
28
		--with-python=${PYTHON_CMD} \
33
CONFIGURE_ENV=	GANGLIA_ACK_SYSCONFDIR=1 "LDFLAGS=${LDFLAGS}"
29
		--with-gmetad
30
CONFIGURE_ENV=	GANGLIA_ACK_SYSCONFDIR=1
34
CFLAGS+=	-I${LOCALBASE}/include
31
CFLAGS+=	-I${LOCALBASE}/include
35
LDFLAGS+=	-L${LOCALBASE}/lib
32
LDFLAGS+=	-L${LOCALBASE}/lib
36
33
Lines 39-95 Link Here
39
36
40
PLIST_SUB+=	PORTVERSION=${PORTVERSION}
37
PLIST_SUB+=	PORTVERSION=${PORTVERSION}
41
38
42
SUB_FILES=	pkg-install
39
SUB_FILES+=	pkg-message
43
44
.if defined (GMETAD_CONF)
45
.if !exists (${GMETAD_CONF})
46
IGNORE=		the variable GMETAD_CONF must point to a file when defined
47
.endif
48
.else
49
GMETAD_CONF=	${WRKSRC}/gmetad/gmetad.conf
50
.endif
51
52
.if defined (GMOND_CONF)
53
.if !exists (${GMOND_CONF})
54
IGNORE=		the variable GMOND_CONF must point to a file when defined
55
.endif
56
.else
57
GMOND_CONF=	${WRKDIR}/gmond.conf
58
.endif
59
40
60
.include <bsd.port.options.mk>
41
INSTALL_TARGET=	install-strip
61
42
62
USE_RC_SUBR=	gmond
43
USE_RC_SUBR=	gmond gmetad
63
.if ${PORT_OPTIONS:MGMETAD}
64
USE_RC_SUBR+=	gmetad
65
66
LIB_DEPENDS+=	librrd.so:${PORTSDIR}/databases/rrdtool
67
CONFIGURE_ARGS+=	--with-gmetad
68
PLIST_SUB+=	GMETAD=
69
SUB_LIST+=	GMETAD=
70
.else
71
PLIST_SUB+=	GMETAD="@comment "
72
SUB_LIST+=	GMETAD="\#"
73
.endif
74
44
75
USE_LDCONFIG=	yes
45
USE_LDCONFIG=	yes
76
46
77
CONF_DIR=	${PREFIX}/etc
47
CONF_DIR=	${PREFIX}/etc
78
48
79
FIX_CONF_FILES=	README \
80
		mans/gmetad.1 \
81
		mans/gmond.1
82
FIX_GMOND_CONF_DIR=	\
83
		gmond/modules/conf.d/modpython.conf.in \
84
		gmond/modules/python/Makefile.in \
85
		lib/default_conf.h.in
86
# gmond.conf.5 and gmond.conf.html can be generated from conf.pod, but
87
# doing so requires perl installed in the build stage.
88
FIX_USER_FILES=	gmetad/gmetad.conf.in \
89
		gmond/conf.pod \
90
		gmond/gmond.conf.5 \
91
		gmond/gmond.conf.html
92
93
MODULES=	modcpu.so \
49
MODULES=	modcpu.so \
94
		moddisk.so \
50
		moddisk.so \
95
		modload.so \
51
		modload.so \
Lines 100-126 Link Here
100
		modpython.so \
56
		modpython.so \
101
		modsys.so
57
		modsys.so
102
58
59
# gmond.conf.5 and gmond.conf.html can be generated from conf.pod, but
60
# doing so requires perl installed in the build stage.
103
post-patch:
61
post-patch:
104
	${REINPLACE_CMD} -e "s|/etc/ganglia/\(gm[a-z]*d.conf\)|${PREFIX}/etc/\1|g" \
62
	${REINPLACE_CMD} \
105
		${FIX_CONF_FILES:S|^|${WRKSRC}/|}
63
		-e "s|/etc/ganglia/\(gm[a-z]*d.conf\)|${PREFIX}/etc/\1|g" \
106
	${REINPLACE_CMD} -e "s|%%GMONDCONFDIR%%|gmond.conf.d|g" \
64
		${WRKSRC}/README \
107
		${FIX_GMOND_CONF_DIR:S|^|${WRKSRC}/|}
65
		${WRKSRC}/mans/gmetad.1 \
66
		${WRKSRC}/mans/gmond.1
108
	${REINPLACE_CMD} -e "s|nobody|ganglia|g" \
67
	${REINPLACE_CMD} -e "s|nobody|ganglia|g" \
109
		${FIX_USER_FILES:S|^|${WRKSRC}/|}
68
		${WRKSRC}/gmetad/gmetad.conf.in \
69
		${WRKSRC}/gmond/conf.pod \
70
		${WRKSRC}/gmond/gmond.conf.5 \
71
		${WRKSRC}/gmond/gmond.conf.html
110
72
111
post-build:
73
post-build:
112
	${WRKSRC}/gmond/gmond -t > ${WRKDIR}/gmond.conf
74
	${WRKSRC}/gmond/gmond -t > ${WRKDIR}/gmond.conf
113
75
114
post-install:
76
post-install:
115
.if ${PORT_OPTIONS:MGMETAD}
77
	${INSTALL_DATA} ${WRKDIR}/gmond.conf \
116
	${INSTALL_SCRIPT} ${FILESDIR}/gmetasnap.sh ${STAGEDIR}${PREFIX}/sbin/gmetasnap
78
		${STAGEDIR}${PREFIX}/etc/gmond.conf.sample
117
	${INSTALL_MAN} ${WRKSRC}/mans/gmetad.1 ${STAGEDIR}${MANPREFIX}/man/man1
79
	${INSTALL_SCRIPT} ${FILESDIR}/gmetasnap.sh \
118
	${INSTALL_DATA} ${GMETAD_CONF} ${STAGEDIR}${PREFIX}/etc/gmetad.conf.sample
80
		${STAGEDIR}${PREFIX}/sbin/gmetasnap
119
.endif
81
	${INSTALL_DATA} ${WRKSRC}/gmetad/gmetad.conf \
120
	${INSTALL_MAN} ${WRKSRC}/mans/gmetric.1 ${STAGEDIR}${MANPREFIX}/man/man1
82
		${STAGEDIR}${PREFIX}/etc/gmetad.conf.sample
121
	${INSTALL_MAN} ${WRKSRC}/mans/gmond.1 ${STAGEDIR}${MANPREFIX}/man/man1
83
	${INSTALL_MAN} ${WRKSRC}/mans/gmetad.1 \
122
	${INSTALL_MAN} ${WRKSRC}/gmond/gmond.conf.5 ${STAGEDIR}${MANPREFIX}/man/man5
84
		${STAGEDIR}${MANPREFIX}/man/man1
123
	${INSTALL_MAN} ${WRKSRC}/mans/gstat.1 ${STAGEDIR}${MANPREFIX}/man/man1
85
	${INSTALL_MAN} \
124
	${INSTALL_DATA} ${GMOND_CONF} ${STAGEDIR}${PREFIX}/etc/gmond.conf.sample
86
		${WRKSRC}/mans/gmetric.1 \
87
		${WRKSRC}/mans/gmond.1 \
88
		${WRKSRC}/mans/gstat.1 \
89
		${STAGEDIR}${MANPREFIX}/man/man1
90
	${INSTALL_MAN} ${WRKSRC}/gmond/gmond.conf.5 \
91
		${STAGEDIR}${MANPREFIX}/man/man5
92
	${MKDIR} ${STAGEDIR}/var/db/ganglia/rrds
93
	${MKDIR} ${STAGEDIR}${PREFIX}/lib/ganglia/python_modules
125
94
126
.include <bsd.port.mk>
95
.include <bsd.port.mk>
(-)/usr/wip/sysutils/ganglia-monitor-core/distinfo (-2 / +2 lines)
Lines 1-2 Link Here
1
SHA256 (ganglia-3.4.0.tar.gz) = 036838b17621c10383daa98f705bb01a10d44031eeb6f310c3685a9ec2dbe800
1
SHA256 (ganglia-3.6.0.tar.gz) = 89eae02e1a117040d60b3b561fe55f88d7f8cf41b94af1492969ef68e6797886
2
SIZE (ganglia-3.4.0.tar.gz) = 1156001
2
SIZE (ganglia-3.6.0.tar.gz) = 1248273
(-)/usr/wip/sysutils/ganglia-monitor-core/files/patch-gmetad_Makefile.in (-4 / +4 lines)
Lines 1-7 Link Here
1
--- gmetad.orig/Makefile.in	2012-10-01 18:24:48.000000000 +0000
1
--- gmetad/Makefile.in.orig	2013-05-07 09:39:40.000000000 -0500
2
+++ gmetad/Makefile.in	2012-10-01 18:38:55.000000000 +0000
2
+++ gmetad/Makefile.in	2014-10-14 15:31:54.000000000 -0500
3
@@ -591,8 +591,6 @@
3
@@ -659,8 +659,6 @@
4
 	$(FIXCONFIG) gmetad.conf.in
4
 	$(FIXCONFIG) gmetad.service.in
5
 
5
 
6
 install-data-hook:	gmetad.conf
6
 install-data-hook:	gmetad.conf
7
-	mkdir -p $(DESTDIR)$(sysconfdir) && \
7
-	mkdir -p $(DESTDIR)$(sysconfdir) && \
(-)/usr/wip/sysutils/ganglia-monitor-core/files/patch-gmetad_conf.c.in (-3 / +3 lines)
Lines 1-6 Link Here
1
--- gmetad/conf.c.in.orig	2012-10-01 18:44:59.000000000 +0000
1
--- gmetad/conf.c.in.orig	2013-05-07 09:39:40.000000000 -0500
2
+++ gmetad/conf.c.in	2012-10-01 18:45:20.000000000 +0000
2
+++ gmetad/conf.c.in	2014-10-14 15:31:54.000000000 -0500
3
@@ -330,7 +330,7 @@
3
@@ -374,7 +374,7 @@
4
    config->trusted_hosts = NULL;
4
    config->trusted_hosts = NULL;
5
    config->debug_level = 0;
5
    config->debug_level = 0;
6
    config->should_setuid = 1;
6
    config->should_setuid = 1;
(-)/usr/wip/sysutils/ganglia-monitor-core/files/patch-gmond_modules_conf.d_modpython.conf.in (-4 / +9 lines)
Lines 1-8 Link Here
1
--- gmond/modules/conf.d/modpython.conf.in.orig	2012-10-01 18:52:02.000000000 +0000
1
--- gmond/modules/conf.d/modpython.conf.in.orig	2013-05-07 09:39:40.000000000 -0500
2
+++ gmond/modules/conf.d/modpython.conf.in	2012-10-01 18:52:22.000000000 +0000
2
+++ gmond/modules/conf.d/modpython.conf.in	2014-10-14 15:31:54.000000000 -0500
3
@@ -13,4 +13,4 @@
3
@@ -9,8 +9,8 @@
4
   module {
5
     name = "python_module"
6
     path = "modpython.so"
7
-    params = "@moduledir@/python_modules"
8
+    params = "@moduledir@"
4
   }
9
   }
5
 }
10
 }
6
 
11
 
7
-include ("@sysconfdir@/conf.d/*.pyconf")
12
-include ("@sysconfdir@/conf.d/*.pyconf")
8
+include ("@sysconfdir@/%%GMONDCONFDIR%%/*.pyconf")
13
+include ("@sysconfdir@/gmond.conf.d/*.pyconf")
(-)/usr/wip/sysutils/ganglia-monitor-core/files/patch-gmond_modules_python_Makefile.in (-5 / +5 lines)
Lines 1-13 Link Here
1
--- gmond/modules/python/Makefile.in.orig	2012-10-01 19:01:51.000000000 +0000
1
--- gmond/modules/python/Makefile.in.orig	2013-05-07 09:39:40.000000000 -0500
2
+++ gmond/modules/python/Makefile.in	2012-10-01 19:03:40.000000000 +0000
2
+++ gmond/modules/python/Makefile.in	2014-10-14 15:31:54.000000000 -0500
3
@@ -588,8 +588,8 @@
3
@@ -601,8 +601,8 @@
4
 # Note that README is listed as a dependency to be generated, but it
4
 # Note that README is listed as a dependency to be generated, but it
5
 # is not currently installed anywhere
5
 # is not currently installed anywhere
6
 install-exec-hook:	../conf.d/modpython.conf README
6
 install-exec-hook:	../conf.d/modpython.conf README
7
-	mkdir -p $(DESTDIR)$(sysconfdir)/conf.d && \
7
-	mkdir -p $(DESTDIR)$(sysconfdir)/conf.d && \
8
-	  $(INSTALL_DATA) ../conf.d/modpython.conf $(DESTDIR)$(sysconfdir)/conf.d/modpython.conf
8
-	  $(INSTALL_DATA) ../conf.d/modpython.conf $(DESTDIR)$(sysconfdir)/conf.d/modpython.conf
9
+	mkdir -p $(DESTDIR)$(sysconfdir)/%%GMONDCONFDIR%% && \
9
+	mkdir -p $(DESTDIR)$(sysconfdir)/gmond.conf.d && \
10
+	  $(INSTALL_DATA) ../conf.d/modpython.conf $(DESTDIR)$(sysconfdir)/%%GMONDCONFDIR%%/modpython.conf 
10
+	  $(INSTALL_DATA) ../conf.d/modpython.conf $(DESTDIR)$(sysconfdir)/gmond.conf.d/modpython.conf 
11
 
11
 
12
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
12
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
13
 # Otherwise a system limit (for SysV at least) may be exceeded.
13
 # Otherwise a system limit (for SysV at least) may be exceeded.
(-)/usr/wip/sysutils/ganglia-monitor-core/files/patch-lib_default__conf.h.in (-4 / +4 lines)
Lines 1-11 Link Here
1
--- lib/default_conf.h.in.orig	2012-10-01 19:06:52.000000000 +0000
1
--- lib/default_conf.h.in.orig	2013-05-07 09:39:40.000000000 -0500
2
+++ lib/default_conf.h.in	2012-10-01 19:08:01.000000000 +0000
2
+++ lib/default_conf.h.in	2014-10-14 15:31:54.000000000 -0500
3
@@ -381,7 +381,7 @@
3
@@ -397,7 +397,7 @@
4
   }\n\
4
   }\n\
5
 }\n\
5
 }\n\
6
 \n\
6
 \n\
7
-include (\"" SYSCONFDIR "/conf.d/*.conf\")\n\
7
-include (\"" SYSCONFDIR "/conf.d/*.conf\")\n\
8
+include (\"" SYSCONFDIR "/%%GMONDCONFDIR%%/*.conf\")\n\
8
+include (\"" SYSCONFDIR "/gmond.conf.d/*.conf\")\n\
9
 \n\
9
 \n\
10
 "
10
 "
11
 
11
 
(-)/usr/wip/sysutils/ganglia-monitor-core/files/patch-libmetrics_freebsd_metrics.c (+20 lines)
Line 0 Link Here
1
--- libmetrics/freebsd/metrics.c.orig	2013-05-07 09:39:40.000000000 -0500
2
+++ libmetrics/freebsd/metrics.c	2014-10-14 15:32:43.000000000 -0500
3
@@ -461,6 +461,17 @@
4
    return val;
5
 }
6
 
7
+/*
8
+** FIXME - Not yet implemented on FreeBSD.
9
+*/
10
+g_val_t
11
+cpu_steal_func ( void )
12
+{
13
+   g_val_t val;
14
+   val.f = 0.0;
15
+   return val;
16
+}
17
+
18
 g_val_t
19
 load_one_func ( void )
20
 {
(-)/usr/wip/sysutils/ganglia-monitor-core/files/pkg-install.in (-21 lines)
Lines 1-21 Link Here
1
#!/bin/sh
2
3
u=ganglia
4
g=ganglia
5
rrd_rootdir=/var/db/ganglia/rrds
6
7
case $2 in
8
POST-INSTALL)
9
	if [ ! -f %%PREFIX%%/etc/gmond.conf ]; then
10
		cp %%PREFIX%%/etc/gmond.conf.sample %%PREFIX%%/etc/gmond.conf
11
	fi
12
13
%%GMETAD%%	mkdir -p ${rrd_rootdir}
14
%%GMETAD%%	chown -R ${u}:${g} ${rrd_rootdir}
15
%%GMETAD%%
16
%%GMETAD%%	if [ ! -f %%PREFIX%%/etc/gmetad.conf ]; then
17
%%GMETAD%%		cp %%PREFIX%%/etc/gmetad.conf.sample %%PREFIX%%/etc/gmetad.conf
18
%%GMETAD%%	fi
19
20
	;;
21
esac
(-)/usr/wip/sysutils/ganglia-monitor-core/files/pkg-message.in (+13 lines)
Line 0 Link Here
1
2
======================================================================
3
4
First-time configuration:
5
6
Copy %%PREFIX%%/etc/gmond.conf.sample to %%PREFIX%%/etc/gmond.conf
7
and %%PREFIX%%/etc/gmetad.conf.sample to %%PREFIX%%/etc/gmetad.conf
8
and edit to suit your network.
9
10
To enable services, set gmond_enable/gmond_flags and/or
11
gmetad_enable/gmetad_flags in /etc/rc.conf.
12
13
======================================================================
(-)/usr/wip/sysutils/ganglia-monitor-core/pkg-plist (-15 / +14 lines)
Lines 1-23 Link Here
1
bin/ganglia-config
1
bin/ganglia-config
2
bin/gstat
3
bin/gmetric
2
bin/gmetric
4
@unexec if cmp -s %D/etc/gmond.conf %D/etc/gmond.conf.sample; then rm -f %D/etc/gmond.conf; fi
3
bin/gstat
5
etc/gmond.conf.d/modpython.conf
4
etc/gmond.conf.d/modpython.conf
6
etc/gmond.conf.sample
5
etc/gmond.conf.sample
7
%%GMETAD%%@unexec if cmp -s %D/etc/gmetad.conf %D/etc/gmetad.conf.sample; then rm -f %D/etc/gmetad.conf; fi
6
etc/gmetad.conf.sample
8
%%GMETAD%%etc/gmetad.conf.sample
9
include/ganglia.h
7
include/ganglia.h
10
include/ganglia_gexec.h
8
include/ganglia_gexec.h
11
include/gm_file.h
9
include/gm_file.h
12
include/gm_mmn.h
13
include/gm_metric.h
10
include/gm_metric.h
11
include/gm_mmn.h
14
include/gm_msg.h
12
include/gm_msg.h
15
include/gm_protocol.h
13
include/gm_protocol.h
16
include/gm_value.h
14
include/gm_value.h
17
lib/libganglia-%%PORTVERSION%%.so.0
18
lib/libganglia-%%PORTVERSION%%.so.0.0.0
19
lib/libganglia.a
20
lib/libganglia.so
21
lib/ganglia/modcpu.so
15
lib/ganglia/modcpu.so
22
lib/ganglia/moddisk.so
16
lib/ganglia/moddisk.so
23
lib/ganglia/modload.so
17
lib/ganglia/modload.so
Lines 27-40 Link Here
27
lib/ganglia/modproc.so
21
lib/ganglia/modproc.so
28
lib/ganglia/modpython.so
22
lib/ganglia/modpython.so
29
lib/ganglia/modsys.so
23
lib/ganglia/modsys.so
24
lib/libganglia-%%PORTVERSION%%.so.0
25
lib/libganglia-%%PORTVERSION%%.so.0.0.0
26
lib/libganglia.a
27
lib/libganglia.so
28
man/man1/gmetad.1.gz
29
man/man1/gmetad.py.1.gz
30
man/man1/gmetric.1.gz
30
man/man1/gmetric.1.gz
31
%%GMETAD%%man/man1/gmetad.1.gz
32
%%GMETAD%%man/man1/gmetad.py.1.gz
33
man/man1/gmond.1.gz
31
man/man1/gmond.1.gz
34
man/man1/gstat.1.gz
32
man/man1/gstat.1.gz
35
man/man5/gmond.conf.5.gz
33
man/man5/gmond.conf.5.gz
36
%%GMETAD%%sbin/gmetad
34
sbin/gmetad
37
%%GMETAD%%sbin/gmetasnap
35
sbin/gmetasnap
38
sbin/gmond
36
sbin/gmond
39
@dirrmtry etc/gmond.conf.d
37
@dir lib/ganglia/python_modules
40
@dirrm lib/ganglia
38
@dir(ganglia,ganglia,) /var/db/ganglia/rrds
39
@dir(ganglia,ganglia,) /var/db/ganglia

Return to bug 199074