aboutsummaryrefslogtreecommitdiff
path: root/sysutils/ganglia-monitor-core
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/ganglia-monitor-core')
-rw-r--r--sysutils/ganglia-monitor-core/Makefile91
-rw-r--r--sysutils/ganglia-monitor-core/distinfo1
-rw-r--r--sysutils/ganglia-monitor-core/files/gmetad.sh.sample57
-rw-r--r--sysutils/ganglia-monitor-core/files/gmond.sh.sample57
-rw-r--r--sysutils/ganglia-monitor-core/files/patch-gmetad_gmetad.c14
-rw-r--r--sysutils/ganglia-monitor-core/files/patch-gmetad_gmetad.conf18
-rw-r--r--sysutils/ganglia-monitor-core/files/patch-gmond_gmond.conf16
-rw-r--r--sysutils/ganglia-monitor-core/files/patch-lib_gmond__config.c14
-rw-r--r--sysutils/ganglia-monitor-core/files/pkg-install.in37
-rw-r--r--sysutils/ganglia-monitor-core/pkg-descr9
-rw-r--r--sysutils/ganglia-monitor-core/pkg-install37
-rw-r--r--sysutils/ganglia-monitor-core/pkg-plist40
12 files changed, 391 insertions, 0 deletions
diff --git a/sysutils/ganglia-monitor-core/Makefile b/sysutils/ganglia-monitor-core/Makefile
new file mode 100644
index 000000000000..0930c59102f3
--- /dev/null
+++ b/sysutils/ganglia-monitor-core/Makefile
@@ -0,0 +1,91 @@
+# Ports collection makefile for: ganglia-monitor-core
+# Date created: Wed Jan 23, 2003
+# Whom: Brooks Davis <brooks@freebsd.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= ganglia-monitor-core
+PORTVERSION= 2.5.2
+CATEGORIES= sysutils net parallel
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
+MASTER_SITE_SUBDIR= ganglia
+.if defined (WITHOUT_GMETAD)
+PKGNAMESUFFIX= -nogmetad
+.endif
+
+MAINTAINER= brooks@FreeBSD.org
+COMMENT= "Ganglia cluster monitor, monitoring daemon"
+
+.if !defined (WITHOUT_GMETAD)
+LIB_DEPENDS= rrd.0:${PORTSDIR}/net/rrdtool
+.endif
+
+GNU_CONFIGURE= yes
+CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
+ LIBS="-L${LOCALBASE}/lib"
+.if !defined (WITHOUT_GMETAD)
+CONFIGURE_ARGS+= --with-gmetad
+.endif
+USE_LIBTOOL= yes
+INSTALLS_SHLIB= yes
+.if defined (WITHOUT_GMETAD)
+PLIST_SUB+= GMETAD="@comment "
+.else
+PLIST_SUB+= GMETAD=
+.endif
+USE_REINPLACE= yes
+
+MAN1= gmetric.1 gmond.1 gstat.1
+.if !defined (WITHOUT_GMETAD)
+MAN1+= gmetad.1
+.endif
+
+CONF_DIR= ${PREFIX}/etc
+RC_DIR= ${PREFIX}/etc/rc.d
+
+FIX_CONF_FILES= ${WRKSRC}/lib/ganglia/gmond_config.h \
+ ${WRKSRC}/mans/gmetad.1 \
+ ${WRKSRC}/mans/gmond.1 \
+ ${WRKSRC}/gmetad/cmdline.c \
+ ${WRKSRC}/gmetad/cmdline.h \
+ ${WRKSRC}/gmond/cmdline.c \
+ ${WRKSRC}/gmond/cmdline.h
+FIX_DB_FILES= ${WRKSRC}/gmetad/gmetad.c \
+ ${WRKSRC}/gmetad/gmetad.conf
+
+post-patch:
+ ${REINPLACE_CMD} -e "s|/etc/\(gm[a-z]*d.conf\)|${CONF_DIR}/\1|g" \
+ ${FIX_CONF_FILES}
+ ${REINPLACE_CMD} -e "s|/var/lib/ganglia|/var/db/ganglia|g" \
+ ${FIX_DB_FILES}
+
+# Post-install
+#
+
+post-install: install-man install-sample-files install-startup-files
+ ${SH} pkg-install ${PKGNAME} POST-INSTALL
+
+install-man:
+ ${INSTALL_MAN} ${WRKSRC}/mans/gmetric.1 ${MANPREFIX}/man/man1
+ ${INSTALL_MAN} ${WRKSRC}/mans/gmond.1 ${MANPREFIX}/man/man1
+ ${INSTALL_MAN} ${WRKSRC}/mans/gstat.1 ${MANPREFIX}/man/man1
+.if !defined (WITHOUT_GMETAD)
+ ${INSTALL_MAN} ${WRKSRC}/mans/gmetad.1 ${MANPREFIX}/man/man1
+.endif
+
+install-sample-files:
+ ${INSTALL_DATA} ${WRKSRC}/gmond/gmond.conf \
+ ${CONF_DIR}/gmond.conf.sample
+.if !defined (WITHOUT_GMETAD)
+ ${INSTALL_DATA} ${WRKSRC}/gmetad/gmetad.conf \
+ ${CONF_DIR}/gmetad.conf.sample
+.endif
+
+install-startup-files:
+ ${INSTALL_SCRIPT} ${FILESDIR}/gmond.sh.sample ${RC_DIR}
+.if !defined (WITHOUT_GMETAD)
+ ${INSTALL_SCRIPT} ${FILESDIR}/gmetad.sh.sample ${RC_DIR}
+.endif
+
+.include <bsd.port.mk>
diff --git a/sysutils/ganglia-monitor-core/distinfo b/sysutils/ganglia-monitor-core/distinfo
new file mode 100644
index 000000000000..3812061efc8f
--- /dev/null
+++ b/sysutils/ganglia-monitor-core/distinfo
@@ -0,0 +1 @@
+MD5 (ganglia-monitor-core-2.5.2.tar.gz) = a1a01a24156eb6d375b0dd47490aa9b5
diff --git a/sysutils/ganglia-monitor-core/files/gmetad.sh.sample b/sysutils/ganglia-monitor-core/files/gmetad.sh.sample
new file mode 100644
index 000000000000..4cbce620dfcc
--- /dev/null
+++ b/sysutils/ganglia-monitor-core/files/gmetad.sh.sample
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# Start or stop gmetad.
+#
+
+rc_file=${0##*/}
+rc_arg=$1
+
+if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/${rc_file}\$"); then
+ echo "${rc_file}: Cannot determine PREFIX." >&2
+ echo "Please use the complete pathname." >&2
+ exit 64
+fi
+
+program_dir=${PREFIX}/sbin
+program_file=gmetad
+program_path=${program_dir}/${program_file}
+
+config_dir=${PREFIX}/etc
+config_file=${program_file}.conf
+config_path=${config_dir}/${config_file}
+
+syslog_facility=daemon.err
+
+case "$rc_arg" in
+start)
+ if [ ! -x ${program_path} ]; then
+ logger -sp ${syslog_facility} -t ${program_file} \
+ "unable to start: ${program_path} is missing."
+ exit 72
+ fi
+ if [ ! -f ${config_path} ]; then
+ logger -sp ${syslog_facility} -t ${program_file} \
+ "unable to start: ${config_path} is missing."
+ exit 72
+ fi
+ ${program_path} && echo -n " ${program_file}"
+ ;;
+stop)
+ killall ${program_file} 2> /dev/null
+ ;;
+restart)
+ $0 stop
+ $0 start
+ ;;
+status)
+ ps -auxww | egrep ${program_file} | egrep -v "($0|egrep)"
+ ;;
+*)
+ echo "usage: ${rc_file} {start|stop|restart|status}" >&2
+ exit 64
+ ;;
+esac
+
+exit 0
diff --git a/sysutils/ganglia-monitor-core/files/gmond.sh.sample b/sysutils/ganglia-monitor-core/files/gmond.sh.sample
new file mode 100644
index 000000000000..8acca301840d
--- /dev/null
+++ b/sysutils/ganglia-monitor-core/files/gmond.sh.sample
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# Start or stop gmond.
+#
+
+rc_file=${0##*/}
+rc_arg=$1
+
+if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/${rc_file}\$"); then
+ echo "${rc_file}: Cannot determine PREFIX." >&2
+ echo "Please use the complete pathname." >&2
+ exit 64
+fi
+
+program_dir=${PREFIX}/sbin
+program_file=gmond
+program_path=${program_dir}/${program_file}
+
+config_dir=${PREFIX}/etc
+config_file=${program_file}.conf
+config_path=${config_dir}/${config_file}
+
+syslog_facility=daemon.err
+
+case "$rc_arg" in
+start)
+ if [ ! -x ${program_path} ]; then
+ logger -sp ${syslog_facility} -t ${program_file} \
+ "unable to start: ${program_path} is missing."
+ exit 72
+ fi
+ if [ ! -f ${config_path} ]; then
+ logger -sp ${syslog_facility} -t ${program_file} \
+ "unable to start: ${config_path} is missing."
+ exit 72
+ fi
+ ${program_path} && echo -n " ${program_file}"
+ ;;
+stop)
+ killall ${program_file} 2> /dev/null
+ ;;
+restart)
+ $0 stop
+ $0 start
+ ;;
+status)
+ ps -auxww | egrep ${program_file} | egrep -v "($0|egrep)"
+ ;;
+*)
+ echo "usage: ${rc_file} {start|stop|restart|status}" >&2
+ exit 64
+ ;;
+esac
+
+exit 0
diff --git a/sysutils/ganglia-monitor-core/files/patch-gmetad_gmetad.c b/sysutils/ganglia-monitor-core/files/patch-gmetad_gmetad.c
new file mode 100644
index 000000000000..76fdd5276cb1
--- /dev/null
+++ b/sysutils/ganglia-monitor-core/files/patch-gmetad_gmetad.c
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- gmetad/gmetad.c.orig Mon Dec 9 14:43:23 2002
++++ gmetad/gmetad.c Fri Feb 21 11:52:24 2003
+@@ -40,7 +40,7 @@
+ pthread_mutex_t server_socket_mutex = PTHREAD_MUTEX_INITIALIZER;
+ int server_threads = 2;
+ char *rrd_rootdir = "/var/lib/ganglia/rrds";
+-char *setuid_username = "nobody";
++char *setuid_username = "ganglia";
+ int should_setuid = 1;
+ unsigned int source_index = 0;
+
diff --git a/sysutils/ganglia-monitor-core/files/patch-gmetad_gmetad.conf b/sysutils/ganglia-monitor-core/files/patch-gmetad_gmetad.conf
new file mode 100644
index 000000000000..9ed21c5722cf
--- /dev/null
+++ b/sysutils/ganglia-monitor-core/files/patch-gmetad_gmetad.conf
@@ -0,0 +1,18 @@
+
+$FreeBSD$
+
+--- gmetad/gmetad.conf.orig Wed Jan 29 10:17:02 2003
++++ gmetad/gmetad.conf Fri Feb 21 11:52:58 2003
+@@ -55,9 +55,9 @@
+ # default: on
+ # setuid off
+ #
+-# User gmetad will setuid to (defaults to "nobody")
+-# default: "nobody"
+-# setuid_username "nobody"
++# User gmetad will setuid to (defaults to "ganglia")
++# default: "ganglia"
++# setuid_username "ganglia"
+ #
+ # The port gmetad will answer requests for XML
+ # default: 8651
diff --git a/sysutils/ganglia-monitor-core/files/patch-gmond_gmond.conf b/sysutils/ganglia-monitor-core/files/patch-gmond_gmond.conf
new file mode 100644
index 000000000000..034675c09050
--- /dev/null
+++ b/sysutils/ganglia-monitor-core/files/patch-gmond_gmond.conf
@@ -0,0 +1,16 @@
+
+$FreeBSD$
+
+--- gmond/gmond.conf.orig Thu Feb 20 14:34:00 2003
++++ gmond/gmond.conf Thu Feb 20 14:35:09 2003
+@@ -99,8 +99,8 @@
+ # no_setuid on
+ #
+ # Which user should gmond run as?
+-# default: nobody
+-# setuid nobody
++# default: ganglia
++# setuid ganglia
+ #
+ # If you do not want this host to appear in the gexec host list, set
+ # this value to "on"
diff --git a/sysutils/ganglia-monitor-core/files/patch-lib_gmond__config.c b/sysutils/ganglia-monitor-core/files/patch-lib_gmond__config.c
new file mode 100644
index 000000000000..627a784d239b
--- /dev/null
+++ b/sysutils/ganglia-monitor-core/files/patch-lib_gmond__config.c
@@ -0,0 +1,14 @@
+
+$FreeBSD$
+
+--- lib/gmond_config.c.orig Thu Feb 20 14:32:29 2003
++++ lib/gmond_config.c Thu Feb 20 14:32:39 2003
+@@ -224,7 +224,7 @@
+ config->deaf = 0;
+ config->debug_level = 0;
+ config->no_setuid = 0;
+- config->setuid = conf_strdup("nobody");
++ config->setuid = conf_strdup("ganglia");
+ config->no_gexec = 0;
+ config->all_trusted = 0;
+
diff --git a/sysutils/ganglia-monitor-core/files/pkg-install.in b/sysutils/ganglia-monitor-core/files/pkg-install.in
new file mode 100644
index 000000000000..462943114667
--- /dev/null
+++ b/sysutils/ganglia-monitor-core/files/pkg-install.in
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+u=ganglia
+g=ganglia
+ugid=97
+homedir=/nonexistent
+shell=/sbin/nologin
+rrd_rootdir=/var/db/ganglia/rrds
+
+case $2 in
+POST-INSTALL)
+ if pw group show "${g}" >/dev/null 2>&1; then
+ echo "Using existing group \"${g}\"."
+ else
+ echo "Creating group \"${g}\", (gid: ${ugid})."
+ pw groupadd ${g} -g ${ugid}
+ if [ $? != 0 ]; then
+ echo "Failed to add group \"${g}\"."
+ exit 1
+ fi
+ fi
+ if pw user show "${u}" >/dev/null 2>&1; then
+ echo "Using existing user \"${u}\"."
+ else
+ echo "Creating user \"${u}\", (uid: ${ugid})."
+ pw useradd ${u} -u ${ugid} -g ${ugid} -h - \
+ -d ${homedir} -s ${shell} -c "Ganglia User"
+ if [ $? != 0 ]; then
+ echo "Failed to add user \"${u}\"."
+ exit 1
+ fi
+ fi
+
+ mkdir -p ${rrd_rootdir}
+ chown -R ${u}:${g} ${rrd_rootdir}
+ ;;
+esac
diff --git a/sysutils/ganglia-monitor-core/pkg-descr b/sysutils/ganglia-monitor-core/pkg-descr
new file mode 100644
index 000000000000..73f56ae3effd
--- /dev/null
+++ b/sysutils/ganglia-monitor-core/pkg-descr
@@ -0,0 +1,9 @@
+Ganglia provides a complete real-time monitoring and execution
+environment that is in use by hundreds of universities, private and
+government laboratories and commercial cluster implementors around the
+world. Whether you want to monitor hundreds of computers in real-time
+across a university campus or around the world, ganglia is for you.
+
+WWW: http://ganglia.sourceforge.net/
+
+-- Brooks Davis <brooks@FreeBSD.org>
diff --git a/sysutils/ganglia-monitor-core/pkg-install b/sysutils/ganglia-monitor-core/pkg-install
new file mode 100644
index 000000000000..462943114667
--- /dev/null
+++ b/sysutils/ganglia-monitor-core/pkg-install
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+u=ganglia
+g=ganglia
+ugid=97
+homedir=/nonexistent
+shell=/sbin/nologin
+rrd_rootdir=/var/db/ganglia/rrds
+
+case $2 in
+POST-INSTALL)
+ if pw group show "${g}" >/dev/null 2>&1; then
+ echo "Using existing group \"${g}\"."
+ else
+ echo "Creating group \"${g}\", (gid: ${ugid})."
+ pw groupadd ${g} -g ${ugid}
+ if [ $? != 0 ]; then
+ echo "Failed to add group \"${g}\"."
+ exit 1
+ fi
+ fi
+ if pw user show "${u}" >/dev/null 2>&1; then
+ echo "Using existing user \"${u}\"."
+ else
+ echo "Creating user \"${u}\", (uid: ${ugid})."
+ pw useradd ${u} -u ${ugid} -g ${ugid} -h - \
+ -d ${homedir} -s ${shell} -c "Ganglia User"
+ if [ $? != 0 ]; then
+ echo "Failed to add user \"${u}\"."
+ exit 1
+ fi
+ fi
+
+ mkdir -p ${rrd_rootdir}
+ chown -R ${u}:${g} ${rrd_rootdir}
+ ;;
+esac
diff --git a/sysutils/ganglia-monitor-core/pkg-plist b/sysutils/ganglia-monitor-core/pkg-plist
new file mode 100644
index 000000000000..4bec439d4427
--- /dev/null
+++ b/sysutils/ganglia-monitor-core/pkg-plist
@@ -0,0 +1,40 @@
+bin/gstat
+bin/gmetric
+etc/gmond.conf.sample
+%%GMETAD%%etc/gmetad.conf.sample
+etc/rc.d/gmond.sh.sample
+%%GMETAD%%etc/rc.d/gmetad.sh.sample
+include/ganglia.h
+include/ascii.h
+include/asciitab.h
+include/daemon_inetd.h
+include/daemon_init.h
+include/debug_msg.h
+include/error.h
+include/file.h
+include/hash.h
+include/iasciitab.h
+include/latin1tab.h
+include/llist.h
+include/my_inet_ntop.h
+include/nametab.h
+include/net.h
+include/rdwr.h
+include/utf8tab.h
+include/xmldef.h
+include/xmlparse.h
+include/xmlrole.h
+include/xmltok.h
+include/xmltok_impl.h
+include/gexec_funcs.h
+include/fsusage.h
+include/gexec_process.h
+include/gmond_config.h
+lib/libganglia.so.2
+lib/libganglia.so
+lib/libganglia.la
+lib/libganglia.a
+%%GMETAD%%sbin/gmetad
+sbin/gmond
+@dirrm include/ganglia
+@unexec rmdir /var/db/ganglia/rrds /var/db/ganglia 2>/dev/null || true