diff options
author | fhajny <fhajny@pkgsrc.org> | 2016-02-16 12:48:18 +0000 |
---|---|---|
committer | fhajny <fhajny@pkgsrc.org> | 2016-02-16 12:48:18 +0000 |
commit | 7a238264d8fa529184ced822c941e27fa1e3b090 (patch) | |
tree | 22ac25b6346ef359daa410c8bda0bec3822c9023 /parallel/ganglia-monitor-core | |
parent | 0ad5cb04a013df722769bdf1f3d836efe48acd2a (diff) | |
download | pkgsrc-7a238264d8fa529184ced822c941e27fa1e3b090.tar.gz |
Update parallel/ganglia-monitor-core to 3.7.2. Add SMF support.
Upstream changelog follows.
3.7.2
* Fix for a memory leak if override_hostname or override_ip are used
3.7.1
* Hash table in gmetad has been reworked to support much higher metric
counts and larger number of metrics
* A number of GMond python modules have been rewritten and enhanced
3.7.0
* Add support for sending Ganglia metrics to Riemann
* Performance improvements for gmetad
* Export internal gmetad metrics
3.6.0
* Improvements
- Add ability to gzip XML output in gmond
- Forward Graphite metrics over UDP for increased scalability
- Configurable graphite prefix
- Memcached publish support - export metrics into memcached
- Improve metric summarization performance under heavy load
* Bug fixes
- Reduce CPU utilization when running in deaf mode
3.5.0
* gmond uses a separate thread to service gmetad requests. This should
improve performance
* Updates to a number of core Python collection modules
3.4.0
* web
- now distributed as a separate source tarball, web/ tree is not present
in the ganglia-3.4.0 tarball
* gmond:
- setgid() and initgroups() are invoked when setuid() is invoked - gmond
no longer runs in root group (there may be side-effects from this change)
- new UDP RX channel parameter `buffer' to set the socket buffer size
3.3.7
* gmond
- BUG100: fails to start in Solaris zones
- fails to start when no address on the network interface (added
retry_bind parameter)
- BUG321: fails to start when Solaris CPU in state FAILED (seg fault)
3.3.6
* gmond
- BUG327: memory leak when receive channel is not configured or not
hearing any data
3.3.5
* General
- Return to the use of autotools (make dist) for building the release
- Release with a valid version number in configure.in
* Gmetad
- Fix for gmetad buffer overflow with metric value of DOUBLE_MAX
* Gmond python modules
- multi traffic module has been replaced with multi interface which
correctly reports all interfaces
* Gmond
- Fix for issues/11
- Expose some useful functions in the public C API to assist module
developers
3.3.1
* Web
- Graph Zooming off when Ganglia Web server and web browser in different
time zones
- Metrics chooser in cluster view now provides metric drop down in
addition to autocomplete
- Ability to specify default size for graphs in Views
Gmetad
- You can now disable RRD writing - useful if you are using Ganglia only
to feed Graphite
- Export to graphite now handles spaces in metrics, groups
- Minor code clean up and fixes
* Gmond
- Diskstat python module incorrect IO time reporting has been fixed.
3.3.0
* Web UI shipped with Ganglia has been upgraded to the Ganglia Web
2.0 interface. Changes to web UI from Gweb 2.2.0 are as follows
- Additional Nagios integration scripts
- Contributed by Etsy - stacked graph in the cluster view
- Ability to hide/show events on individual graphs or whole pages
- Numerous bug fixes and small enhancements
* metric names are sanitized to avoid breaking gmetad/UI when characters
such as <, > are supplied. Those are now replaced with underscores
* gmetad supports sending metrics to graphite. Uncomment proper section
of gmetad.conf to enable
* Default RRD resolution changed. It affects only newly created RRDs. To
change to old behavior please modify the RRA field in gmetad.conf
* Number of Python modules from Ganglia gmond_python_modules repository
have been included such as disk statistics, individual interface
statistics, etc. Most of the modules are disabled. To enable rename
the files in /etc/ganglia/conf.d.
* sFlow has been enhanced to support Virtual machine pool/Java
VM/Memcache/Apache/NGINX/Tomcat and node.js metrics. You can read more
at sFlow blog
3.2.0
* sFlow support - more and even more
* hostname/ip override - you can specify an arbitrary host name and IP
to be shown in the UI.
* FreeBSD patches
* Python module improvements
* Bugfixes and improvements over 3.1.7
3.1.7:
* Fix build support for RHEL5/issue with commas in CFLAGS
* multicpu module: show CPU utilization as a value between 0-100% for
each core
3.1.3 - 3.1.6:
* Merge commit 1966 from trunk to fix "contrib/removespikes.pl"
* Bootstrapping with Debian 5.0 (lenny) versions of autotools for
this and future releases.
* Require user to explicitly specify sysconfdir when building from source,
due to the fact that the old behavior was not consistent with the
documented behavior.
* Configuration files and scripts are now created during the install phase
rather than during configure. This allows values such as @sysconfdir@
to be used in the template configuration files.
* Abolish the use of release names - only release numbers will be used
to distinguish versions in future
* libmetrics: workaround system header conflict in DFBSD >= 2.4 (BUG245)
* Use PCRE regex matching to configure metrics using the name_match directive
* rrdcached support
* gmetad now uses apr and the sleep intervals between polls are randomized
in a way that supports shorter polling intervals
* FreeBSD support: fixes for crashes and disk statistics (BUG153)
* Further tweaks to Solaris build support (remove C99 hack)
* Eliminate conflict with ncpus symbol name on older Solaris
* AIX support: determine if the host is a virtual server (BUG226)
* AIX support: setting linker flags (BUG227), add -lm
* AIX support: tweaks for AIX >= v6.1
* AIX support: revised init scripts for gmond and gmetad
* Check for Python.h explicitly
* Include the necessary Python files in the distribution tarball, regardless
of how BUILD_PYTHON is set (r2215).
* Remove references to GNU toolchain in documentation
* Fortify write_data_to_rrd against overflows
* Web interface: minor formatting changes
* mcast_if implementation tweaked so that the send channel will be bound
to the IP of the outgoing interface
* Documentation updates relating to the options for multihomed hosts,
particularly bind, bind_hostname and mcast_if
* gmond: Limit the use of APR_POLLSET_THREADSAFE to Linux >= 2.6
* gmond: improve/revert setuid behavior in configure script
* gmond: Fix the allow_extra_data configuration directive (BUG199)
* gmond: Ensure that a complete XML dump is delivered before closing
the send socket. Submitted by: Jerry <adawzq 126 com>
* gmond: add bind and bind_hostname parameters for udp_send_channel()
* gmetad: BUG232: eliminate case-sensitive hostname bug, user can choose to
maintain legacy behavior though.
* gmond: BUG237: revise fix for segfault on Solaris where first CPU not in
slot 0
* gmond: support for HUP signal on platforms with execve
* gmond: status module: return gmond version info as string metrics
* gmond: Check return status of apr_pollset_create. Use
APR_POLLSET_THREADSAFE on Linux.
* build: various configure options: Solaris 8 with Sun Studio 11 support,
extra modules for static linking, default setuid, release number,
build multicpu and status during static builds, support for
SYSCONFDIR (BUG16)
* RPM: include status module, allow packager to supply own gmond.conf
* build: Look in lib64 rather than lib for apr, confuse and expat on x86_64
Diffstat (limited to 'parallel/ganglia-monitor-core')
17 files changed, 379 insertions, 72 deletions
diff --git a/parallel/ganglia-monitor-core/Makefile b/parallel/ganglia-monitor-core/Makefile index 136bd503264..0dbd37927d9 100644 --- a/parallel/ganglia-monitor-core/Makefile +++ b/parallel/ganglia-monitor-core/Makefile @@ -1,52 +1,77 @@ -# $NetBSD: Makefile,v 1.53 2015/04/25 14:24:44 tnn Exp $ +# $NetBSD: Makefile,v 1.54 2016/02/16 12:48:18 fhajny Exp $ # -DISTNAME= ganglia-3.1.2 -PKGNAME= ganglia-monitor-core-3.1.2 -PKGREVISION= 25 +DISTNAME= ganglia-3.7.2 +PKGNAME= ganglia-monitor-core-3.7.2 CATEGORIES= net parallel MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=ganglia/} MAINTAINER= pkgsrc-users@NetBSD.org HOMEPAGE= http://ganglia.sourceforge.net/ COMMENT= Ganglia cluster monitor, monitoring daemon +LICENSE= modified-bsd GNU_CONFIGURE= yes SET_LIBDIR= yes -CONFIGURE_ARGS+= --with-gmetad USE_LIBTOOL= yes -USE_LANGUAGES+= c c++ c99 +USE_LANGUAGES= c c99 +USE_TOOLS+= pkg-config PLIST_VARS+= python PKG_OPTIONS_VAR= PKG_OPTIONS.ganglia PKG_SUPPORTED_OPTIONS= python # Gmond support for python modules +.include "../../mk/bsd.prefs.mk" + +CONFIGURE_ARGS+= --with-gmetad +CONFIGURE_ARGS+= --enable-setuid=${GANGLIA_USER} +CONFIGURE_ARGS+= --enable-setgid=${GANGLIA_GROUP} + .include "../../mk/bsd.options.mk" .if !empty(PKG_OPTIONS:Mpython) CONFIGURE_ARGS+= --with-python=${PYTHONBIN} PLIST.python= yes +CONF_FILES+= ${EGDIR}/conf.d/modpython.conf \ + ${PKG_SYSCONFDIR}/gmond.conf.d/modpython.conf .include "../../lang/python/application.mk" .else CONFIGURE_ARGS+= --disable-python .endif -SUBST_CLASSES+= pkg_sysconfdir -SUBST_STAGE.pkg_sysconfdir= pre-configure -SUBST_MESSAGE.pkg_sysconfdir= Fixing PKG_SYSCONFDIR -SUBST_FILES.pkg_sysconfdir= ganglia.html \ - gmetad/cmdline.c gmetad/cmdline.h \ - gmetric/cmdline.c gmetric/cmdline.h \ - gmond/cmdline.c gmond/cmdline.h \ - gmond/g25_config.h gmond/gmond.conf.5 \ - gmond/modules/conf.d/modpython.conf \ - gmond/modules/conf.d/modpython.conf.in \ - gmond/modules/python/README.in \ - mans/gmetad.1 mans/gmetric.1 mans/gmond.1 -SUBST_SED.pkg_sysconfdir+= -e 's,/etc/ganglia,${PKG_SYSCONFDIR},g' -SUBST_SED.pkg_sysconfdir+= -e 's,/usr/lib/ganglia,${PREFIX}/lib/ganglia,g' +GANGLIA_USER?= ganglia +GANGLIA_GROUP?= ${GANGLIA_USER} +GANGLIA_VARBASE?= ${VARBASE}/db + +PKG_GROUPS+= ${GANGLIA_GROUP} +PKG_USERS+= ${GANGLIA_USER}:${GANGLIA_GROUP} +PKG_GECOS.${GANGLIA_USER}= Ganglia daemon user +PKG_HOME.${GANGLIA_USER}= ${GANGLIA_VARBASE}/ganglia + +OWN_DIRS_PERMS+= ${GANGLIA_VARBASE}/ganglia ${GANGLIA_USER} ${GANGLIA_GROUP} 0755 +OWN_DIRS_PERMS+= ${GANGLIA_VARBASE}/ganglia/rrds ${GANGLIA_USER} ${GANGLIA_GROUP} 0755 + +INSTALL_MAKE_FLAGS+= sysconfdir=${EGDIR} + +SUBST_CLASSES+= paths +SUBST_STAGE.paths= pre-configure +SUBST_MESSAGE.paths= Fixing default paths +SUBST_FILES.paths= configure ganglia.html \ + gmetad/cmdline.c gmetad/cmdline.h \ + gmetric/cmdline.c gmetric/cmdline.h \ + gmond/cmdline.c gmond/cmdline.h \ + gmond/g25_config.h gmond/gmond.conf.5 \ + gmond/modules/conf.d/modpython.conf \ + 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_VARS.paths+= GANGLIA_VARBASE + +FILES_SUBST+= GANGLIA_VARBASE=${GANGLIA_VARBASE} DOCDIR= ${PREFIX}/share/doc/ganglia EGDIR= ${PREFIX}/share/examples/ganglia @@ -54,23 +79,20 @@ CONF_FILES= ${EGDIR}/gmond.conf ${PKG_SYSCONFDIR}/gmond.conf CONF_FILES+= ${EGDIR}/gmetad.conf ${PKG_SYSCONFDIR}/gmetad.conf RCD_SCRIPTS= gmond gmetad +SMF_NAME= ganglia +SMF_INSTANCES= ${RCD_SCRIPTS} INSTALLATION_DIRS= ${DOCDIR} ${EGDIR} ${PKGMANDIR}/man1 ${PKGMANDIR}/man5 post-install: - ${INSTALL_MAN} ${WRKSRC}/mans/gmetad.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ - ${INSTALL_MAN} ${WRKSRC}/mans/gmetric.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ - ${INSTALL_MAN} ${WRKSRC}/mans/gmond.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ - ${INSTALL_MAN} ${WRKSRC}/mans/gstat.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ - ${INSTALL_MAN} ${WRKSRC}/gmond/gmond.conf.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5/ - ${INSTALL_DATA} ${WRKSRC}/gmetad/gmetad.conf ${DESTDIR}${EGDIR}/ ${WRKSRC}/gmond/gmond -t > ${DESTDIR}${EGDIR}/gmond.conf ${INSTALL_DATA} ${WRKSRC}/gmond/modules/python/README ${DESTDIR}${DOCDIR}/ .include "../../databases/rrdtool/buildlink3.mk" .include "../../devel/apr/buildlink3.mk" .include "../../devel/confuse/buildlink3.mk" -.include "../../mk/pthread.buildlink3.mk" +.include "../../devel/pcre/buildlink3.mk" +.include "../../devel/zlib/buildlink3.mk" .include "../../textproc/expat/buildlink3.mk" - +.include "../../mk/pthread.buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/parallel/ganglia-monitor-core/PLIST b/parallel/ganglia-monitor-core/PLIST index 6384049ec35..261da16fd57 100644 --- a/parallel/ganglia-monitor-core/PLIST +++ b/parallel/ganglia-monitor-core/PLIST @@ -1,9 +1,10 @@ -@comment $NetBSD: PLIST,v 1.6 2014/03/11 14:05:12 jperkin Exp $ +@comment $NetBSD: PLIST,v 1.7 2016/02/16 12:48:18 fhajny Exp $ bin/ganglia-config bin/gmetric bin/gstat include/ganglia.h include/ganglia_gexec.h +include/gm_file.h include/gm_metric.h include/gm_mmn.h include/gm_msg.h @@ -20,6 +21,7 @@ ${PLIST.python}lib/ganglia/modpython.so lib/ganglia/modsys.so lib/libganglia.la man/man1/gmetad.1 +man/man1/gmetad.py.1 man/man1/gmetric.1 man/man1/gmond.1 man/man1/gstat.1 @@ -29,3 +31,4 @@ sbin/gmond share/doc/ganglia/README share/examples/ganglia/gmetad.conf share/examples/ganglia/gmond.conf +${PLIST.python}share/examples/ganglia/conf.d/modpython.conf diff --git a/parallel/ganglia-monitor-core/distinfo b/parallel/ganglia-monitor-core/distinfo index 585f21b01aa..dbbddaeda0f 100644 --- a/parallel/ganglia-monitor-core/distinfo +++ b/parallel/ganglia-monitor-core/distinfo @@ -1,10 +1,18 @@ -$NetBSD: distinfo,v 1.13 2015/11/02 23:46:12 agc Exp $ +$NetBSD: distinfo,v 1.14 2016/02/16 12:48:18 fhajny Exp $ -SHA1 (ganglia-3.1.2.tar.gz) = be5db246eb755d8c450140d1c80afef4f1179fe1 -RMD160 (ganglia-3.1.2.tar.gz) = 1f78cf1019759e12c3c65901fd74ac65dfddf4e3 -SHA512 (ganglia-3.1.2.tar.gz) = 788d6a369c2d5c9186b491659c9d3986fbebf0b34021e3b1d26eaf534d0457c922b33dcca735bd7e4ce302428d95040473d097f9363595c3c4e131272c4da07e -Size (ganglia-3.1.2.tar.gz) = 1213196 bytes -SHA1 (patch-aa) = e258e4efb1ae012db51901de87e614cede78812c -SHA1 (patch-ab) = 260a78711c2c7f1111ce8c4b0d54d2edd60dde08 -SHA1 (patch-ac) = a7d4251eed047cb6ffb89c23d87b0db1dbe7b5f4 +SHA1 (ganglia-3.7.2.tar.gz) = 5ea23da8e5b85da53216dd7c742c8154e7aa576e +RMD160 (ganglia-3.7.2.tar.gz) = 9b5c48bcf2aa489caea689713dabb12804d9cee2 +SHA512 (ganglia-3.7.2.tar.gz) = a88955e59421a447e5752a9bfe5f599d989a7a5a0141141ab3601d1ab250be4eebbede8bcef8baa151b2f9deaf3f56e30aef8ea709f3cc820a79fa3d3961e0df +Size (ganglia-3.7.2.tar.gz) = 1302320 bytes +SHA1 (patch-ac) = 5b9aaa5c8d5cb194e8c467e6e56ff5e235de7c69 +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-gmond_gmond.conf.5) = dfabfee6fb26cd5a384c1baed48fe631b957cf5b +SHA1 (patch-gmond_modules_conf.d_modpython.conf.in) = 5b0d79efb34dae2f46dd911509759e8d75b4af96 SHA1 (patch-lib__gm_protocol_dr.c) = 9d17d79bb1a6426a2547c00006819483aff47363 +SHA1 (patch-lib__update_pidfile.c) = a8ed4fbeabf5d46a523c5cd3b891e5752d74187b +SHA1 (patch-lib_default__conf.h.in) = 70dbcbc39226369c9fb4f59240b8568854ac4e87 +SHA1 (patch-libmetrics__solaris__metrics.c) = 2b6ad945ed7eafa05fe4c24a535b00deba46173d +SHA1 (patch-libmetrics_freebsd_metrics.c) = acb3485a603c13fd4a9f7d7af621988f777ede6e diff --git a/parallel/ganglia-monitor-core/files/smf/manifest.xml b/parallel/ganglia-monitor-core/files/smf/manifest.xml new file mode 100644 index 00000000000..605f4aa9b1d --- /dev/null +++ b/parallel/ganglia-monitor-core/files/smf/manifest.xml @@ -0,0 +1,42 @@ +<?xml version="1.0"?> +<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> +<service_bundle type="manifest" name="gmetad"> + <service name="@SMF_PREFIX@/ganglia" type="service" version="1"> + <dependency name="network" grouping="require_all" restart_on="error" type="service"> + <service_fmri value="svc:/milestone/network:default" /> + </dependency> + <dependency name="filesystem" grouping="require_all" restart_on="error" type="service"> + <service_fmri value="svc:/system/filesystem/local" /> + </dependency> + <method_context working_directory="@GANGLIA_VARBASE@/ganglia" /> + <property_group name="startd" type="framework"> + <propval name="duration" type="astring" value="contract" /> + <propval name="ignore_error" type="astring" value="core,signal" /> + </property_group> + <instance name="gmetad" enabled="false"> + <exec_method type="method" name="start" exec="@PREFIX@/sbin/gmetad" timeout_seconds="60" /> + <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" /> + <property_group name="application" type="application"> + <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/gmetad.conf" /> + </property_group> + <template> + <common_name> + <loctext xml:lang="C">Ganglia Meta Daemon</loctext> + </common_name> + </template> + </instance> + <instance name="gmond" enabled="false"> + <exec_method type="method" name="start" exec="@PREFIX@/sbin/gmond" timeout_seconds="60" /> + <exec_method type="method" name="stop" exec=":kill" timeout_seconds="60" /> + <property_group name="application" type="application"> + <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/gmond.conf" /> + </property_group> + <template> + <common_name> + <loctext xml:lang="C">Ganglia Monitoring Daemon</loctext> + </common_name> + </template> + </instance> + <stability value="Evolving" /> + </service> +</service_bundle> diff --git a/parallel/ganglia-monitor-core/patches/patch-aa b/parallel/ganglia-monitor-core/patches/patch-aa deleted file mode 100644 index 73b6fbbb9d0..00000000000 --- a/parallel/ganglia-monitor-core/patches/patch-aa +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-aa,v 1.4 2009/11/10 14:55:18 brook Exp $ - ---- gmetad/conf.c.orig 2009-01-28 16:23:20.000000000 -0700 -+++ gmetad/conf.c -@@ -265,7 +265,7 @@ set_defaults (gmetad_config_t *config) - config->debug_level = 0; - config->should_setuid = 1; - config->setuid_username = "nobody"; -- config->rrd_rootdir = "/var/lib/ganglia/rrds"; -+ config->rrd_rootdir = "/var/db/ganglia/rrds"; - config->scalable_mode = 1; - config->all_trusted = 0; - config->num_RRAs = 5; diff --git a/parallel/ganglia-monitor-core/patches/patch-ab b/parallel/ganglia-monitor-core/patches/patch-ab deleted file mode 100644 index 16ae1387058..00000000000 --- a/parallel/ganglia-monitor-core/patches/patch-ab +++ /dev/null @@ -1,11 +0,0 @@ -$NetBSD: patch-ab,v 1.5 2009/11/10 14:55:18 brook Exp $ - ---- gmetad/gmetad.conf.orig 2009-01-28 16:23:20.000000000 -0700 -+++ gmetad/gmetad.conf -@@ -110,5 +110,5 @@ data_source "my cluster" localhost - # - #------------------------------------------------------------------------------- - # Where gmetad stores its round-robin databases --# default: "/var/lib/ganglia/rrds" -+# default: "/var/db/ganglia/rrds" - # rrd_rootdir "/some/other/place" diff --git a/parallel/ganglia-monitor-core/patches/patch-ac b/parallel/ganglia-monitor-core/patches/patch-ac index 71737b34480..18844fa7090 100644 --- a/parallel/ganglia-monitor-core/patches/patch-ac +++ b/parallel/ganglia-monitor-core/patches/patch-ac @@ -1,4 +1,4 @@ -$NetBSD: patch-ac,v 1.5 2013/02/26 11:01:32 joerg Exp $ +$NetBSD: patch-ac,v 1.6 2016/02/16 12:48:18 fhajny Exp $ First chunk: update sysctl name for changes in NetBSD. @@ -12,7 +12,7 @@ also changed proc_run_func somewhat to only count actually running processes (having a look at NetBSD's ps(1) implementation) - without the change, I got around 30 running processes on an idle machine. ---- libmetrics/netbsd/metrics.c.orig 2009-01-28 23:23:20.000000000 +0000 +--- libmetrics/netbsd/metrics.c.orig 2015-07-01 19:49:35.000000000 +0000 +++ libmetrics/netbsd/metrics.c @@ -9,10 +9,15 @@ * Tested on NetBSD 2.0.2 (i386) @@ -42,7 +42,7 @@ change, I got around 30 running processes on an idle machine. if (sysctlbyname("machdep.est.frequency.target", &cpu_speed, &len, NULL, 0) == -1) val.uint32 = 0; #endif -@@ -559,44 +567,40 @@ proc_total_func ( void ) +@@ -559,49 +567,56 @@ proc_total_func ( void ) g_val_t proc_run_func( void ) { @@ -111,16 +111,33 @@ change, I got around 30 running processes on an idle machine. output: return val; -@@ -1135,36 +1139,41 @@ get_netbw(double *in_bytes, double *out_ + } + ++/* ++** FIXME - This metric is not valid on NetBSD ++*/ ++g_val_t ++cpu_steal_func ( void ) ++{ ++ static g_val_t val; ++ val.f = 0.0; ++ return val; ++} ++ + g_val_t + mem_free_func ( void ) + { +@@ -1135,36 +1150,41 @@ get_netbw(double *in_bytes, double *out_ next = buf; while (next < lim) { + struct if_msghdr tmp; ifm = (struct if_msghdr *)next; -+ memcpy(&tmp, ifm, sizeof(tmp)); - +- - if (ifm->ifm_type == RTM_IFINFO) { ++ memcpy(&tmp, ifm, sizeof(tmp)); ++ + if (tmp.ifm_type == RTM_IFINFO) { sdl = (struct sockaddr_dl *)(ifm + 1); } else { @@ -132,7 +149,7 @@ change, I got around 30 running processes on an idle machine. + fprintf(stderr, "msglen = %d\n", tmp.ifm_msglen); fprintf(stderr, "buf:%p, next:%p, lim:%p\n", buf, next, lim); - exit (1); + goto output; } - next += ifm->ifm_msglen; @@ -145,9 +162,9 @@ change, I got around 30 running processes on an idle machine. break; - next += nextifm->ifm_msglen; -+ memcpy(&msglen, &nextifm->ifm_msglen, -+ sizeof(nextifm->ifm_msglen)); -+ next += msglen; ++ memcpy(&msglen, &nextifm->ifm_msglen, ++ sizeof(nextifm->ifm_msglen)); ++ next += msglen; } - if ((ifm->ifm_flags & IFF_LOOPBACK) || @@ -161,7 +178,7 @@ change, I got around 30 running processes on an idle machine. /* If we don't have a previous value yet, make a slot. */ if (index >= indexes) { -@@ -1187,25 +1196,25 @@ get_netbw(double *in_bytes, double *out_ +@@ -1187,25 +1207,25 @@ get_netbw(double *in_bytes, double *out_ */ if (!seen[index]) { seen[index] = 1; diff --git a/parallel/ganglia-monitor-core/patches/patch-configure b/parallel/ganglia-monitor-core/patches/patch-configure new file mode 100644 index 00000000000..128f93c688a --- /dev/null +++ b/parallel/ganglia-monitor-core/patches/patch-configure @@ -0,0 +1,89 @@ +$NetBSD: patch-configure,v 1.1 2016/02/16 12:48:18 fhajny Exp $ + +- Portability. +- Make local storage dir consistent. +- Fix C99 handling on SunOS. + +--- configure.orig 2015-07-01 19:49:35.000000000 +0000 ++++ configure +@@ -12844,7 +12844,7 @@ if test "${with_memcached+set}" = set; t + fi + + +-if test x"$memcache" == xyes; then ++if test x"$memcache" = xyes; then + + pkg_failed=no + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DEPS" >&5 +@@ -12948,7 +12948,7 @@ if test "${with_riemann+set}" = set; the + fi + + +-if test x"$with_riemann" == xyes; then ++if test x"$with_riemann" = xyes; then + echo + echo Checking for Protocol Buffers + +@@ -13368,7 +13368,7 @@ if test x"$libpcrepath" != x && test x"$ + echo "Added -I$libpcrepath/include to CFLAGS" + echo "Added -L$libpcrepath/${LIB_SUFFIX} to LDFLAGS" + fi +-if test x"$libpcre" == xyes ; then ++if test x"$libpcre" = xyes ; then + for ac_header in pcre/pcre.h pcre.h + do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +@@ -15779,7 +15779,7 @@ fi + rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + +-varstatedir="/var/lib" ++varstatedir="@GANGLIA_VARBASE@" + + # Used when static linking requested + EXPORT_SYMBOLS="-export-dynamic" +@@ -15901,11 +15901,7 @@ $as_echo "#define DARWIN 1" >>confdefs.h + $as_echo "#define SUPPORT_GEXEC 0" >>confdefs.h + + CFLAGS="$CFLAGS -D__EXTENSIONS__ -DHAVE_STRERROR" +- if test x"$ac_cv_prog_cc_c99" = x -o x"$ac_cv_prog_cc_c99" = xno; then +- CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=199506L" +- else +- CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112L" +- fi ++ CFLAGS="$CFLAGS -D_POSIX_C_SOURCE=200112L" + if test x"$ac_cv_c_compiler_gnu" != xyes; then + LIBS="-lm $LIBS" + fi +@@ -15917,7 +15913,6 @@ $as_echo "#define SOLARIS 1" >>confdefs. + + $as_echo "#define SUPPORT_GEXEC 0" >>confdefs.h + +- varstatedir="/var/db" + osreldate=`awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $3 }' /usr/include/osreldate.h` + if test $osreldate -lt 502102; then + CFLAGS="-pthread $CFLAGS -D_REENTRANT" +@@ -15930,7 +15925,6 @@ $as_echo "#define FREEBSD 1" >>confdefs. + + $as_echo "#define SUPPORT_GEXEC 0" >>confdefs.h + +- varstatedir="/var/db" + + $as_echo "#define DRAGONFLYBSD 1" >>confdefs.h + +@@ -15938,7 +15932,6 @@ $as_echo "#define DRAGONFLYBSD 1" >>conf + *netbsd*) + $as_echo "#define SUPPORT_GEXEC 0" >>confdefs.h + +- varstatedir="/var/db" + + $as_echo "#define NETBSD 1" >>confdefs.h + +@@ -15946,7 +15939,6 @@ $as_echo "#define NETBSD 1" >>confdefs.h + *openbsd*) + $as_echo "#define SUPPORT_GEXEC 0" >>confdefs.h + +- varstatedir="/var/db" + + $as_echo "#define OPENBSD 1" >>confdefs.h + diff --git a/parallel/ganglia-monitor-core/patches/patch-gmetad_conf.c.in b/parallel/ganglia-monitor-core/patches/patch-gmetad_conf.c.in new file mode 100644 index 00000000000..75758583615 --- /dev/null +++ b/parallel/ganglia-monitor-core/patches/patch-gmetad_conf.c.in @@ -0,0 +1,15 @@ +$NetBSD: patch-gmetad_conf.c.in,v 1.1 2016/02/16 12:48:18 fhajny Exp $ + +Use setuid user from configure. + +--- gmetad/conf.c.in.orig 2015-07-01 19:49:35.000000000 +0000 ++++ gmetad/conf.c.in +@@ -475,7 +475,7 @@ set_defaults (gmetad_config_t *config) + config->trusted_hosts = NULL; + config->debug_level = 0; + config->should_setuid = 1; +- config->setuid_username = "nobody"; ++ config->setuid_username = SETUID_USER; + config->rrd_rootdir = "@varstatedir@/ganglia/rrds"; + config->rrdcached_addrstr = NULL; + memset(&config->rrdcached_address, 0, sizeof (config->rrdcached_address)); diff --git a/parallel/ganglia-monitor-core/patches/patch-gmetad_data__thread.c b/parallel/ganglia-monitor-core/patches/patch-gmetad_data__thread.c new file mode 100644 index 00000000000..796dbdaac8a --- /dev/null +++ b/parallel/ganglia-monitor-core/patches/patch-gmetad_data__thread.c @@ -0,0 +1,14 @@ +$NetBSD: patch-gmetad_data__thread.c,v 1.1 2016/02/16 12:48:18 fhajny Exp $ + +Portability. + +--- gmetad/data_thread.c.orig 2015-07-01 19:49:35.000000000 +0000 ++++ gmetad/data_thread.c +@@ -1,6 +1,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <unistd.h> ++#include <sys/filio.h> + #include <sys/ioctl.h> + #include <sys/poll.h> + #include <sys/time.h> diff --git a/parallel/ganglia-monitor-core/patches/patch-gmetad_rrd__helpers.c b/parallel/ganglia-monitor-core/patches/patch-gmetad_rrd__helpers.c new file mode 100644 index 00000000000..3040adb5f53 --- /dev/null +++ b/parallel/ganglia-monitor-core/patches/patch-gmetad_rrd__helpers.c @@ -0,0 +1,14 @@ +$NetBSD: patch-gmetad_rrd__helpers.c,v 1.1 2016/02/16 12:48:18 fhajny Exp $ + +Portability. + +--- gmetad/rrd_helpers.c.orig 2015-07-01 19:49:35.000000000 +0000 ++++ gmetad/rrd_helpers.c +@@ -2,6 +2,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> ++#include <sys/filio.h> + #include <sys/types.h> + #include <sys/stat.h> + #include <unistd.h> diff --git a/parallel/ganglia-monitor-core/patches/patch-gmond_gmond.conf.5 b/parallel/ganglia-monitor-core/patches/patch-gmond_gmond.conf.5 new file mode 100644 index 00000000000..dfdc574a7cf --- /dev/null +++ b/parallel/ganglia-monitor-core/patches/patch-gmond_gmond.conf.5 @@ -0,0 +1,21 @@ +$NetBSD: patch-gmond_gmond.conf.5,v 1.1 2016/02/16 12:48:18 fhajny Exp $ + +Default paths. + +--- gmond/gmond.conf.5.orig 2015-07-01 19:49:35.000000000 +0000 ++++ gmond/gmond.conf.5 +@@ -718,12 +718,12 @@ to be garbled.) + This directive allows the user to include additional configuration files + rather than having to add all gmond configuration directives to the + gmond.conf file. The following example includes any file with the extension +-of .conf contained in the directory conf.d as if the contents of the included ++of .conf contained in the directory gmond.conf.d as if the contents of the included + configuration files were part of the original gmond.conf file. This allows + the user to modularize their configuration file. One usage example might + be to load individual metric modules by including module specific .conf files. + .PP +-include ('/etc/ganglia/conf.d/*.conf') ++include ('/etc/ganglia/gmond.conf.d/*.conf') + .SH "ACCESS CONTROL" + .IX Header "ACCESS CONTROL" + The \fBudp_recv_channel\fR and \fBtcp_accept_channel\fR directives diff --git a/parallel/ganglia-monitor-core/patches/patch-gmond_modules_conf.d_modpython.conf.in b/parallel/ganglia-monitor-core/patches/patch-gmond_modules_conf.d_modpython.conf.in new file mode 100644 index 00000000000..1a08fa83d1b --- /dev/null +++ b/parallel/ganglia-monitor-core/patches/patch-gmond_modules_conf.d_modpython.conf.in @@ -0,0 +1,17 @@ +$NetBSD: patch-gmond_modules_conf.d_modpython.conf.in,v 1.1 2016/02/16 12:48:18 fhajny Exp $ + +Default paths. + +--- gmond/modules/conf.d/modpython.conf.in.orig 2015-07-01 19:49:35.000000000 +0000 ++++ gmond/modules/conf.d/modpython.conf.in +@@ -9,8 +9,8 @@ modules { + module { + name = "python_module" + path = "modpython.so" +- params = "@moduledir@/python_modules" ++ params = "@moduledir@" + } + } + +-include ("@sysconfdir@/conf.d/*.pyconf") ++include ("@sysconfdir@/gmond.conf.d/*.pyconf") diff --git a/parallel/ganglia-monitor-core/patches/patch-lib__update_pidfile.c b/parallel/ganglia-monitor-core/patches/patch-lib__update_pidfile.c new file mode 100644 index 00000000000..34613096664 --- /dev/null +++ b/parallel/ganglia-monitor-core/patches/patch-lib__update_pidfile.c @@ -0,0 +1,15 @@ +$NetBSD: patch-lib__update_pidfile.c,v 1.1 2016/02/16 12:48:18 fhajny Exp $ + +Portability. + +--- lib/update_pidfile.c.orig 2015-07-01 19:49:35.000000000 +0000 ++++ lib/update_pidfile.c +@@ -1,7 +1,7 @@ + /** + * @file update_pidfile.c Functions for standalone daemons + */ +-#define _XOPEN_SOURCE 500 /* for getpgid */ ++#define _XOPEN_SOURCE 700 /* for getpgid */ + #include <sys/types.h> + #include <sys/stat.h> + #include <stdio.h> diff --git a/parallel/ganglia-monitor-core/patches/patch-lib_default__conf.h.in b/parallel/ganglia-monitor-core/patches/patch-lib_default__conf.h.in new file mode 100644 index 00000000000..b9da566b3ab --- /dev/null +++ b/parallel/ganglia-monitor-core/patches/patch-lib_default__conf.h.in @@ -0,0 +1,15 @@ +$NetBSD: patch-lib_default__conf.h.in,v 1.1 2016/02/16 12:48:18 fhajny Exp $ + +Default paths. + +--- lib/default_conf.h.in.orig 2015-07-01 19:49:35.000000000 +0000 ++++ lib/default_conf.h.in +@@ -393,7 +393,7 @@ collection_group {\n\ + }\n\ + }\n\ + \n\ +-include (\"" SYSCONFDIR "/conf.d/*.conf\")\n\ ++include (\"" SYSCONFDIR "/gmond.conf.d/*.conf\")\n\ + \n\ + " + diff --git a/parallel/ganglia-monitor-core/patches/patch-libmetrics__solaris__metrics.c b/parallel/ganglia-monitor-core/patches/patch-libmetrics__solaris__metrics.c new file mode 100644 index 00000000000..b5d79b0472b --- /dev/null +++ b/parallel/ganglia-monitor-core/patches/patch-libmetrics__solaris__metrics.c @@ -0,0 +1,15 @@ +$NetBSD: patch-libmetrics__solaris__metrics.c,v 1.1 2016/02/16 12:48:18 fhajny Exp $ + +Portability. + +--- libmetrics/solaris/metrics.c.orig 2015-07-01 19:49:35.000000000 +0000 ++++ libmetrics/solaris/metrics.c +@@ -1362,7 +1362,7 @@ part_max_used_func ( void ) + g_val_t + cpu_steal_func ( void ) + { +- static g_val_t val=0; ++ static g_val_t val={0}; + return val; + } + diff --git a/parallel/ganglia-monitor-core/patches/patch-libmetrics_freebsd_metrics.c b/parallel/ganglia-monitor-core/patches/patch-libmetrics_freebsd_metrics.c new file mode 100644 index 00000000000..35a0a154cd5 --- /dev/null +++ b/parallel/ganglia-monitor-core/patches/patch-libmetrics_freebsd_metrics.c @@ -0,0 +1,24 @@ +$NetBSD: patch-libmetrics_freebsd_metrics.c,v 1.1 2016/02/16 12:48:18 fhajny Exp $ + +Portability. + +--- libmetrics/freebsd/metrics.c.orig 2013-05-07 09:39:40.000000000 -0500 ++++ libmetrics/freebsd/metrics.c 2014-10-14 15:32:43.000000000 -0500 +@@ -461,6 +461,17 @@ + return val; + } + ++/* ++** FIXME - Not yet implemented on FreeBSD. ++*/ ++g_val_t ++cpu_steal_func ( void ) ++{ ++ g_val_t val; ++ val.f = 0.0; ++ return val; ++} ++ + g_val_t + load_one_func ( void ) + { |