Upgrade ganglia to 3.0.0.

3.0.0 mostly consists of a more flexable portable gmond which requires a
new config file format.  Information about changes in this release can
be found on the website at:

http://ganglia.info/archives/cat_releases.html

and in ports/UPDATING.
This commit is contained in:
Brooks Davis 2005-03-01 23:04:37 +00:00
parent 1609ab106d
commit f018d5629a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=130134
15 changed files with 174 additions and 254 deletions

View file

@ -6,6 +6,22 @@ You should get into the habit of checking this file for changes each
time you update your ports collection, before attempting any port
upgrades.
20050301:
AFFECTS: users of sysutils/ganglia-monitor-core
AUTHOR: brooks@FreeBSD.org
With the move to Ganglia 3.0.0, the configuration file for gmond has
changed completely. The -r or --convert options may be used to
emit a file in the new format given one in the old.
Startup is now controlled by an RC_SUBR script so the gmond_enable and
gmetad_enable variables will need to be set for gmond and gmetad to be
started. Existing gmond.sh and gmetad.sh scripts in PREFIX/etc/rc.d
should be removed.
Due to a bug in ganglia's build process, the previous version may need
to be removed before ganglia can be upgraded.
20050224:
AFFECTS: users of lang/ruby18 and any apps that depend on ruby18
AUTHOR: mezz@FreeBSD.org

View file

@ -6,90 +6,96 @@
#
PORTNAME= ganglia-monitor-core
PORTVERSION= 2.5.6
PORTVERSION= 3.0.0
CATEGORIES= sysutils net parallel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ganglia
.if defined (WITHOUT_GMETAD)
PKGNAMESUFFIX= -nogmetad
.endif
DISTNAME= ganglia-${PORTVERSION}
MAINTAINER= brooks@FreeBSD.org
COMMENT= Ganglia cluster monitor, monitoring daemon
.if !defined (WITHOUT_GMETAD)
PKGINSTALL= ${WRKSRC}/pkg-install
.if defined (WITH_GMETAD)
LIB_DEPENDS= rrd.0:${PORTSDIR}/net/rrdtool
.endif
OPTIONS+= GMETAD "include gmetad" on
GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
CPPFLAGS= -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
LDFLAGS= -L${LOCALBASE}/lib
.if !defined (WITHOUT_GMETAD)
USE_REINPLACE= yes
USE_BZIP2= yes
USE_LIBTOOL_VER= 15
USE_RC_SUBR= ganglia.sh
SUB_FILES= pkg-install
.include <bsd.port.pre.mk>
.if defined (WITH_GMETAD)
CONFIGURE_ARGS+= --with-gmetad
.endif
USE_LIBTOOL_VER=13
INSTALLS_SHLIB= yes
.if defined (WITHOUT_GMETAD)
.if !defined (WITH_GMETAD)
PLIST_SUB+= GMETAD="@comment "
SUB_LIST+= GMETAD="\#"
.else
PLIST_SUB+= GMETAD=
SUB_LIST+= GMETAD=
.endif
USE_REINPLACE= yes
MAN1= gmetric.1 gmond.1 gstat.1
.if !defined (WITHOUT_GMETAD)
.if defined (WITH_GMETAD)
MAN1+= gmetad.1
.endif
MAN5= gmond.conf.5
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/conf.c \
${WRKSRC}/gmetad/gmetad.conf
FIX_CONF_FILES= ganglia.pod \
mans/gmetad.1 \
mans/gmond.1 \
gmetad/cmdline.c \
gmetad/cmdline.h \
gmond/g25_config.h \
gmetric/cmdline.c \
gmetric/cmdline.h \
gmond/cmdline.c \
gmond/cmdline.h
FIX_DB_FILES= ganglia.pod \
gmetad/conf.c \
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|/etc/\(gm[a-z]*d.conf\)|${PREFIX}/etc/\1|g" \
${FIX_CONF_FILES:S|^|${WRKSRC}/|}
${REINPLACE_CMD} -e "s|/var/lib/ganglia|/var/db/ganglia|g" \
${FIX_DB_FILES}
${REINPLACE_CMD} -e 's|-pthread||g' ${WRKSRC}/configure
${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure
${FIX_DB_FILES:S|^|${WRKSRC}/|}
# Post-install
#
post-build:
${WRKSRC}/gmond/gmond -t > ${WRKDIR}/gmond.conf
post-install: install-man install-sample-files install-startup-files
${SH} pkg-install ${PKGNAME} POST-INSTALL
install-man:
post-install:
${INSTALL_MAN} ${WRKSRC}/mans/gmetric.1 ${MANPREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/mans/gmond.1 ${MANPREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/gmond/gmond.conf.5 ${MANPREFIX}/man/man5
${INSTALL_MAN} ${WRKSRC}/mans/gstat.1 ${MANPREFIX}/man/man1
.if !defined (WITHOUT_GMETAD)
.if defined (WITH_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} ${WRKDIR}/gmond.conf ${PREFIX}/etc/gmond.conf.sample
.if defined (WITH_GMETAD)
${INSTALL_DATA} ${WRKSRC}/gmetad/gmetad.conf \
${CONF_DIR}/gmetad.conf.sample
${PREFIX}/etc/gmetad.conf.sample
@if [ ! -f ${CONF_DIR}/gmetad.conf ]; then \
${INSTALL_DATA} ${WRKSRC}/gmetad/gmetad.conf ${CONF_DIR} ;\
fi
.endif
${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
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>
.include <bsd.port.post.mk>

View file

@ -1,2 +1,2 @@
MD5 (ganglia-monitor-core-2.5.6.tar.gz) = 51b0066369063fdbfd7073fe4f443340
SIZE (ganglia-monitor-core-2.5.6.tar.gz) = 493093
MD5 (ganglia-3.0.0.tar.bz2) = 62e514a34fb237dfb0649608d8a9377a
SIZE (ganglia-3.0.0.tar.bz2) = 2528890

View file

@ -0,0 +1,40 @@
#!/bin/sh
# $FreeBSD$
# PROVIDE: ganglia
# REQIORE: DAEMON
# KEYWORD: FreeBSD shutdown
gmond_enable="NO"
gmond_conf="%%PREFIX%%/etc/gmond.conf"
gmetad_enable="NO"
gmetad_conf="%%PREFIX%%/etc/gmetad.conf"
. %%RC_SUBR%%
name=gmond
rcvar=`set_rcvar`
command="%%PREFIX%%/sbin/${name}"
load_rc_config ganglia
load_rc_config $name
command_args="-c ${gmond_conf}"
required_files=${gmond_conf}
run_rc_command $*
# Don't continue if we didn't run gmond
if ! checkyesno ${rcvar}; then
return 0
fi
name=gmetad
rcvar=`set_rcvar`
command="%%PREFIX%%/sbin/${name}"
load_rc_config $name
command_args="-c ${gmetad_conf}"
required_files=${gmetad_conf}
run_rc_command $*

View file

@ -1,57 +0,0 @@
#!/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

View file

@ -1,57 +0,0 @@
#!/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

View file

@ -0,0 +1,18 @@
$FreeBSD$
--- ganglia.pod.orig
+++ ganglia.pod
@@ -451,9 +451,9 @@
# 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

View file

@ -1,9 +1,9 @@
$FreeBSD$
--- gmetad/conf.c.orig Tue May 27 11:02:49 2003
+++ gmetad/conf.c Tue Oct 28 11:10:08 2003
@@ -251,7 +251,7 @@
--- gmetad/conf.c.orig
+++ gmetad/conf.c
@@ -249,7 +249,7 @@
config->trusted_hosts = NULL;
config->debug_level = 0;
config->should_setuid = 1;

View file

@ -1,9 +1,9 @@
$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 @@
--- gmond/g25_config.c.orig
+++ gmond/g25_config.c
@@ -228,7 +228,7 @@
config->deaf = 0;
config->debug_level = 0;
config->no_setuid = 0;
@ -11,4 +11,4 @@ $FreeBSD$
+ config->setuid = conf_strdup("ganglia");
config->no_gexec = 0;
config->all_trusted = 0;
config->host_dmax = 0;

View file

@ -1,16 +0,0 @@
$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"

View file

@ -0,0 +1,23 @@
$FreeBSD$
--- lib/libgmond.c.orig
+++ lib/libgmond.c
@@ -39,7 +39,7 @@
static cfg_opt_t globals_opts[] = {
CFG_BOOL("daemonize", 1, CFGF_NONE),
CFG_BOOL("setuid", 1, CFGF_NONE),
- CFG_STR("user", "nobody", CFGF_NONE),
+ CFG_STR("user", "ganglia", CFGF_NONE),
/* later i guess we should add "group" as well */
CFG_INT("debug_level", 0, CFGF_NONE),
CFG_INT("max_udp_msg_len", 1472, CFGF_NONE),
@@ -125,7 +125,7 @@
The values closely match ./gmond/metric.h definitions in 2.5.x */ \n\
globals { \n\
setuid = yes \n\
- user = nobody \n\
+ user = ganglia \n\
cleanup_threshold = 300 /*secs */ \n\
} \n\
\n\

View file

@ -31,7 +31,16 @@ POST-INSTALL)
fi
fi
mkdir -p ${rrd_rootdir}
chown -R ${u}:${g} ${rrd_rootdir}
if [ ! -f %%PREFIX%%/etc/gmond.conf ]; then
cp %%PREFIX%%/etc/gmond.conf.sample %%PREFIX%%/etc/gmond.conf
fi
%%GMETAD%% mkdir -p ${rrd_rootdir}
%%GMETAD%% chown -R ${u}:${g} ${rrd_rootdir}
%%GMETAD%%
%%GMETAD%% if [ ! -f %%PREFIX%%/etc/gmetad.conf ]; then
%%GMETAD%% cp %%PREFIX%%/etc/gmetad.conf.sample %%PREFIX%%/etc/gmetad.conf
%%GMETAD%% fi
;;
esac

View file

@ -4,6 +4,6 @@ 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/
WWW: http://ganglia.info/
-- Brooks Davis <brooks@FreeBSD.org>

View file

@ -1,37 +0,0 @@
#!/bin/sh
u=ganglia
g=ganglia
ugid=102
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

View file

@ -1,42 +1,17 @@
@comment $FreeBSD$
bin/ganglia-config
bin/gstat
bin/gmetric
@unexec if cmp -s %D/etc/gmond.conf %D/etc/gmond.conf.sample; then rm -f %D/etc/gmond.conf; fi
etc/gmond.conf.sample
%%GMETAD%%@unexec cmp -s %D/etc/gmetad.conf %D/etc/gmetad.conf.sample && rm -f %D/etc/gmetad.conf
%%GMETAD%%etc/gmetad.conf.sample
etc/rc.d/gmond.sh.sample
%%GMETAD%%etc/rc.d/gmetad.sh.sample
include/ganglia.h
include/ganglia/ascii.h
include/ganglia/asciitab.h
include/ganglia/daemon_inetd.h
include/ganglia/daemon_init.h
include/ganglia/debug_msg.h
include/ganglia/error.h
include/ganglia/file.h
include/ganglia/hash.h
include/ganglia/iasciitab.h
include/ganglia/latin1tab.h
include/ganglia/llist.h
include/ganglia/my_inet_ntop.h
include/ganglia/nametab.h
include/ganglia/net.h
include/ganglia/rdwr.h
include/ganglia/utf8tab.h
include/ganglia/xmldef.h
include/ganglia/xmlparse.h
include/ganglia/xmlrole.h
include/ganglia/xmltok.h
include/ganglia/xmltok_impl.h
include/ganglia/gexec_funcs.h
include/ganglia/fsusage.h
include/ganglia/gexec_process.h
include/ganglia/gmond_config.h
lib/libganglia.so.2
lib/libganglia-3.0.0.so.0
lib/libganglia-3.0.0.so
lib/libganglia.so
lib/libganglia.la
lib/libganglia.a
%%GMETAD%%sbin/gmetad
sbin/gmond
@dirrm include/ganglia
@unexec rmdir %D/var/db/ganglia/rrds 2>/dev/null || true
@unexec rmdir %D/var/db/ganglia 2>/dev/null || true