diff options
author | Brooks Davis <brooks@FreeBSD.org> | 2005-03-01 23:04:37 +0000 |
---|---|---|
committer | Brooks Davis <brooks@FreeBSD.org> | 2005-03-01 23:04:37 +0000 |
commit | f018d5629aa7e9d8d87e3a38f34661dd6a670da5 (patch) | |
tree | 1779f7ca1dcb46342cd1130ed8ae4c304c595292 /sysutils/ganglia-monitor-core | |
parent | 1609ab106d0a857eff6eadcd38b1bd823b74ccf2 (diff) | |
download | ports-f018d5629aa7e9d8d87e3a38f34661dd6a670da5.tar.gz ports-f018d5629aa7e9d8d87e3a38f34661dd6a670da5.zip |
Notes
Diffstat (limited to 'sysutils/ganglia-monitor-core')
-rw-r--r-- | sysutils/ganglia-monitor-core/Makefile | 98 | ||||
-rw-r--r-- | sysutils/ganglia-monitor-core/distinfo | 4 | ||||
-rw-r--r-- | sysutils/ganglia-monitor-core/files/ganglia.sh.in | 40 | ||||
-rw-r--r-- | sysutils/ganglia-monitor-core/files/gmetad.sh.sample | 57 | ||||
-rw-r--r-- | sysutils/ganglia-monitor-core/files/gmond.sh.sample | 57 | ||||
-rw-r--r-- | sysutils/ganglia-monitor-core/files/patch-ganglia.pod | 18 | ||||
-rw-r--r-- | sysutils/ganglia-monitor-core/files/patch-gmetad_conf.c | 6 | ||||
-rw-r--r-- | sysutils/ganglia-monitor-core/files/patch-gmond_g25__config.c (renamed from sysutils/ganglia-monitor-core/files/patch-lib_gmond__config.c) | 8 | ||||
-rw-r--r-- | sysutils/ganglia-monitor-core/files/patch-gmond_gmond.conf | 16 | ||||
-rw-r--r-- | sysutils/ganglia-monitor-core/files/patch-lib_libgmond.c | 23 | ||||
-rw-r--r-- | sysutils/ganglia-monitor-core/files/pkg-install.in | 13 | ||||
-rw-r--r-- | sysutils/ganglia-monitor-core/pkg-descr | 2 | ||||
-rw-r--r-- | sysutils/ganglia-monitor-core/pkg-install | 37 | ||||
-rw-r--r-- | sysutils/ganglia-monitor-core/pkg-plist | 35 |
14 files changed, 159 insertions, 255 deletions
diff --git a/sysutils/ganglia-monitor-core/Makefile b/sysutils/ganglia-monitor-core/Makefile index eb887a97300c..bd5c5c924894 100644 --- a/sysutils/ganglia-monitor-core/Makefile +++ b/sysutils/ganglia-monitor-core/Makefile @@ -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 - -# Post-install -# + ${FIX_DB_FILES:S|^|${WRKSRC}/|} -post-install: install-man install-sample-files install-startup-files - ${SH} pkg-install ${PKGNAME} POST-INSTALL +post-build: + ${WRKSRC}/gmond/gmond -t > ${WRKDIR}/gmond.conf -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 -.endif - -install-startup-files: - ${INSTALL_SCRIPT} ${FILESDIR}/gmond.sh.sample ${RC_DIR} -.if !defined (WITHOUT_GMETAD) - ${INSTALL_SCRIPT} ${FILESDIR}/gmetad.sh.sample ${RC_DIR} + ${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 -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/sysutils/ganglia-monitor-core/distinfo b/sysutils/ganglia-monitor-core/distinfo index 0b6d29c78e8c..f481fbaed1ea 100644 --- a/sysutils/ganglia-monitor-core/distinfo +++ b/sysutils/ganglia-monitor-core/distinfo @@ -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 diff --git a/sysutils/ganglia-monitor-core/files/ganglia.sh.in b/sysutils/ganglia-monitor-core/files/ganglia.sh.in new file mode 100644 index 000000000000..964c748d9017 --- /dev/null +++ b/sysutils/ganglia-monitor-core/files/ganglia.sh.in @@ -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 $* diff --git a/sysutils/ganglia-monitor-core/files/gmetad.sh.sample b/sysutils/ganglia-monitor-core/files/gmetad.sh.sample deleted file mode 100644 index 4cbce620dfcc..000000000000 --- a/sysutils/ganglia-monitor-core/files/gmetad.sh.sample +++ /dev/null @@ -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 diff --git a/sysutils/ganglia-monitor-core/files/gmond.sh.sample b/sysutils/ganglia-monitor-core/files/gmond.sh.sample deleted file mode 100644 index 8acca301840d..000000000000 --- a/sysutils/ganglia-monitor-core/files/gmond.sh.sample +++ /dev/null @@ -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 diff --git a/sysutils/ganglia-monitor-core/files/patch-ganglia.pod b/sysutils/ganglia-monitor-core/files/patch-ganglia.pod new file mode 100644 index 000000000000..9647438e6fcc --- /dev/null +++ b/sysutils/ganglia-monitor-core/files/patch-ganglia.pod @@ -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 diff --git a/sysutils/ganglia-monitor-core/files/patch-gmetad_conf.c b/sysutils/ganglia-monitor-core/files/patch-gmetad_conf.c index 7ca61393c51d..12bc6ee6482b 100644 --- a/sysutils/ganglia-monitor-core/files/patch-gmetad_conf.c +++ b/sysutils/ganglia-monitor-core/files/patch-gmetad_conf.c @@ -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; diff --git a/sysutils/ganglia-monitor-core/files/patch-lib_gmond__config.c b/sysutils/ganglia-monitor-core/files/patch-gmond_g25__config.c index 627a784d239b..faf21c8520ba 100644 --- a/sysutils/ganglia-monitor-core/files/patch-lib_gmond__config.c +++ b/sysutils/ganglia-monitor-core/files/patch-gmond_g25__config.c @@ -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; diff --git a/sysutils/ganglia-monitor-core/files/patch-gmond_gmond.conf b/sysutils/ganglia-monitor-core/files/patch-gmond_gmond.conf deleted file mode 100644 index 034675c09050..000000000000 --- a/sysutils/ganglia-monitor-core/files/patch-gmond_gmond.conf +++ /dev/null @@ -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" diff --git a/sysutils/ganglia-monitor-core/files/patch-lib_libgmond.c b/sysutils/ganglia-monitor-core/files/patch-lib_libgmond.c new file mode 100644 index 000000000000..93e5fad0824f --- /dev/null +++ b/sysutils/ganglia-monitor-core/files/patch-lib_libgmond.c @@ -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\ diff --git a/sysutils/ganglia-monitor-core/files/pkg-install.in b/sysutils/ganglia-monitor-core/files/pkg-install.in index a1382a8c05df..9a111f010c7e 100644 --- a/sysutils/ganglia-monitor-core/files/pkg-install.in +++ b/sysutils/ganglia-monitor-core/files/pkg-install.in @@ -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 diff --git a/sysutils/ganglia-monitor-core/pkg-descr b/sysutils/ganglia-monitor-core/pkg-descr index 73f56ae3effd..30bc3baa9ff9 100644 --- a/sysutils/ganglia-monitor-core/pkg-descr +++ b/sysutils/ganglia-monitor-core/pkg-descr @@ -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> diff --git a/sysutils/ganglia-monitor-core/pkg-install b/sysutils/ganglia-monitor-core/pkg-install deleted file mode 100644 index a1382a8c05df..000000000000 --- a/sysutils/ganglia-monitor-core/pkg-install +++ /dev/null @@ -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 diff --git a/sysutils/ganglia-monitor-core/pkg-plist b/sysutils/ganglia-monitor-core/pkg-plist index c049c2190b15..9f0667cc0e2b 100644 --- a/sysutils/ganglia-monitor-core/pkg-plist +++ b/sysutils/ganglia-monitor-core/pkg-plist @@ -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 |