Not sure if the port maintainer is aware or not, but upstream collectd 5.5.0 is out. ref: https://collectd.org/wiki/index.php/Version_5.5
Yes, I knwo that there is new version. I'm working on to make new version. Please be patient :-)))
Thanks for the update! I searched for an open bug first, but didn't find one. Hopefully having this one will help anyone looking in the future, and possibly prevent duplicate notifications. :)
Created attachment 158744 [details] collectd5 patch for upgrade to version 5.5.0 I've made a patch for port which upgrades collectd to version 5.5.0. Patch was tested by poudriere. You can see the log: https://rtm.bsdserwis.com/poudriere/data/a1amd64-testing/2015-07-14_13h34m13s/logs/collectd5-5.5.0.log.
You can download patch directly from private site: http://prv.wtp3.org/collectd5.cummulative.patch
I get a failure when trying to build with the supplied cumulative patch. poudriere output: https://gist.github.com/cactus/c4a3e77341ce7db93ce0
If relevant, the output of patching is here: https://gist.github.com/cactus/c8a86cd8da9f506ca5ca
It looks strange for me. As you can find patch for curl_xml.c (it is removed from files/ subdirectory). I will check it again. Maybe I've made a mistake somewhere...
I do end up with an empty patch-src-curl_xml.c file, but the file did not get removed. Odd indeed! I will try manually removing that now empty file and see if it works.
I added -E to my patch command, and it looks like it is doing the right thing now. I am now getting a different error when building the port. poudriere output: https://gist.github.com/cactus/ce5db6302dd9b56dcfb3 My guess is that there is some issue with my configured options and a dependency or something.
Well, I've tested this path with (almost) all plugins selected. In your output there is dependency error on log_logstash. According to collectd documentation (https://collectd.org/wiki/index.php/Table_of_Plugins) this plugin was added to this version. As you can see there is no dedicated documentation to this plugin except collectd.conf. So I have to check what is dependency to build this plugin. Also: which options did you select?
Here is my poudriere options file content that I use for collectd5. I made no additional changes for the 5.5 version. ----8<---- # This file is auto-generated by 'make config'. # Options for collectd5-5.4.2_2 _OPTIONS_READ=collectd5-5.4.2_2 _FILE_COMPLETE_OPTIONS_LIST=CGI DEBUG GCRYPT VIRT CURL DBI JSON MEMCACHEC MODBUS MONGODB MYSQL NUTUPS PERL PGSQL PING PYTHON RABBITMQ REDIS ROUTEROS SIGROK SNMP STATGRAB TOKYOTYRANT VARNISH XML XMMS RRDTOOL NOTIFYEMAIL NOTIFYDESKTOP RIEMANN OPTIONS_FILE_UNSET+=CGI OPTIONS_FILE_UNSET+=DEBUG OPTIONS_FILE_UNSET+=GCRYPT OPTIONS_FILE_UNSET+=VIRT OPTIONS_FILE_UNSET+=CURL OPTIONS_FILE_UNSET+=DBI OPTIONS_FILE_UNSET+=JSON OPTIONS_FILE_UNSET+=MEMCACHEC OPTIONS_FILE_UNSET+=MODBUS OPTIONS_FILE_UNSET+=MONGODB OPTIONS_FILE_UNSET+=MYSQL OPTIONS_FILE_UNSET+=NUTUPS OPTIONS_FILE_UNSET+=PERL OPTIONS_FILE_UNSET+=PGSQL OPTIONS_FILE_UNSET+=PING OPTIONS_FILE_UNSET+=PYTHON OPTIONS_FILE_UNSET+=RABBITMQ OPTIONS_FILE_UNSET+=REDIS OPTIONS_FILE_UNSET+=ROUTEROS OPTIONS_FILE_UNSET+=SIGROK OPTIONS_FILE_SET+=SNMP OPTIONS_FILE_SET+=STATGRAB OPTIONS_FILE_UNSET+=TOKYOTYRANT OPTIONS_FILE_UNSET+=VARNISH OPTIONS_FILE_UNSET+=XML OPTIONS_FILE_UNSET+=XMMS OPTIONS_FILE_UNSET+=RRDTOOL OPTIONS_FILE_UNSET+=NOTIFYEMAIL OPTIONS_FILE_UNSET+=NOTIFYDESKTOP OPTIONS_FILE_UNSET+=RIEMANN ----8<----
looking at the configure.ac file upstream (https://github.com/collectd/collectd/blob/master/configure.ac) it appears that libyaml is required for logstash (likely json support?). if test "x$with_libyajl" = "xyes" then plugin_log_logstash="yes" fi I will try updating my options and disabling logstash as I won't be using it anyway.
Meant libyajl instead of libyaml in my previous comment.
(In reply to elij from comment #12) OK, my mistake. So I have to modify Makefile dependencies. And because I have all plugins selected libyaml was included :-))) Thanks a lot for your help
https://github.com/collectd/collectd/blob/master/README#L836 Indeed. Building without logstash appears to have worked. Not sure if this is exactly the right patch to make it optional... -----8<----- diff --git a/net-mgmt/collectd5/Makefile b/net-mgmt/collectd5/Makefile index dfcec28..2c81c15 100644 --- a/net-mgmt/collectd5/Makefile +++ b/net-mgmt/collectd5/Makefile @@ -42,6 +42,7 @@ MYSQL_DESC= Enable mysql-based plugins NOTIFYEMAIL_DESC= Enable notifications via email NOTIFYDESKTOP_DESC= Enable desktop notifications NUTUPS_DESC= Enable nut (ups) plugin +LOGSTASH_DESC= Enable logstash plugin OLRSD_DESC= Enable olsrd plugin ONEWIRE_DESC= Eanble onewire plugin (via owfs) OPENLDAP_DESC= Enable OpenLDAP plugin @@ -119,7 +120,6 @@ CONFIGURE_ARGS+= \ --enable-filecount \ --enable-load \ --enable-logfile \ - --enable-log_logstash \ --enable-match_empty_counter \ --enable-match_hashed \ --enable-match_regex \ @@ -314,6 +314,15 @@ CONFIGURE_ARGS+=--without-libupsclient --disable-nut PLIST_SUB+= NUTUPS="@comment " .endif +.if ${PORT_OPTIONS:MLOGSTASH} +LIB_DEPENDS+= libyajl.so:${PORTSDIR}/devel/yajl +CONFIGURE_ARGS+=--enable-log_logstash +PLIST_SUB+= LOGSTASH="" +.else +CONFIGURE_ARGS+=--disable-log_logstash +PLIST_SUB+= LOGSTASH="@comment " +.endif + .if ${PORT_OPTIONS:MOLSRD} CONFIGURE_ARGS+=--enable-olsrd PLIST_SUB+= OLSRD="" diff --git a/net-mgmt/collectd5/pkg-plist b/net-mgmt/collectd5/pkg-plist index e37bac3..7e6f936 100644 --- a/net-mgmt/collectd5/pkg-plist +++ b/net-mgmt/collectd5/pkg-plist @@ -36,7 +36,7 @@ lib/collectd/filecount.so %%IPMI%%lib/collectd/ipmi.so @dir /var/lib/collectd lib/collectd/load.so -lib/collectd/log_logstash.so +%%LOGSTASH%%lib/collectd/log_logstash.so lib/collectd/logfile.so lib/collectd/match_empty_counter.so lib/collectd/match_hashed.so -----8<-----
Created attachment 158871 [details] collectd5.cummulative.patch I've made changes (add option for log_logstash plugin). Also I've found typo for OLSRD_DESC. So you can test this new patch. Also you can download this patch from the same URL as previously: http://prv.wtp3.org/collectd5.cummulative.patch
(In reply to elij from comment #15) It seems that we worked simultaneously :-)))
Confirmed that building with your new cumulative patch worked great too. :)
Created attachment 158964 [details] collectd5-5.5.0.patch Nice work on this! I see there were a handful of QA issues shown with portlint so I've addressed them with the attached revision of your cumulative patch. WARN: Makefile: [513]: BROKEN messages should not be quoted. WARN: Makefile: [166]: IGNORE messages should begin with a lowercase letter and end without a period. WARN: Makefile: no ftp/http mirror in MASTER_SITES for users behind a proxy. WARN: /usr/ports/net-mgmt/collectd5/files/patch-src__daemon__collectd.h: patch was not generated using ``make makepatch''. It is recommended to use ``make makepatch'' to ensure proper patch format. WARN: /usr/ports/net-mgmt/collectd5/files/patch-src__daemon__Makefile.am: patch was not generated using ``make makepatch''. It is recommended to use ``make makepatch'' to ensure proper patch format. WARN: /usr/ports/net-mgmt/collectd5/files/patch-src__dns.c: patch was not generated using ``make makepatch''. It is recommended to use ``make makepatch'' to ensure proper patch format. WARN: /usr/ports/net-mgmt/collectd5/files/patch-src__Makefile.am: patch was not generated using ``make makepatch''. It is recommended to use ``make makepatch'' to ensure proper patch format. WARN: /usr/ports/net-mgmt/collectd5/files/patch-src__modbus.c: patch was not generated using ``make makepatch''. It is recommended to use ``make makepatch'' to ensure proper patch format. WARN: /usr/ports/net-mgmt/collectd5/files/patch-version-gen.sh: patch was not generated using ``make makepatch''. It is recommended to use ``make makepatch'' to ensure proper patch format. The patch I've attached addresses these. The patches were all standardized with the 'make makepatch' header to silence the noise from those warnings. The BROKEN message was an easy fix. The no ftp/http mirror for proxy users was solved with using the https link first followed by the http link. The only remaining message is unfixable since CGI is a proper acronym and we can't change that. WARN: Makefile: [167]: IGNORE messages should begin with a lowercase letter and end without a period. Lastly, being an SVN patch, this should cleanly apply and handle the file removals and additions. I had to run the commands below so this wraps it up with the SVN patch: svnlite rm --force patch-src-curl_xml.c patch-src__collectd.c patch-src__collectd.h patch-src__disk.c patch-src__users.c patch-src_modbus.c svnlite add patch-src__daemon__Makefile.am patch-src__daemon__collectd.h patch-src__modbus.c
Created attachment 158965 [details] Poudriere testport log from 10.1-RELEASE jail I'm using the 5.5.0 on two hosts and haven't seen any runtime issues. I use custom options for my hosts. Poudriere log attached for the default options. I've also built on the following range in Poudriere: 8.4-RELEASE-p31 amd64 8.4-RELEASE-p31 i386 9.3-RELEASE-p17 amd64 9.3-RELEASE-p17 i386 10.1-RELEASE-p14 amd64 10.1-RELEASE-p14 i386 11.0-CURRENT r284725 amd64 11.0-CURRENT r284725 i386
Comment on attachment 158964 [details] collectd5-5.5.0.patch Thank you very much for help with this patch. I see that it is also built without problems. So, this should be added to ports tree - I hope so :-)))
Comment on attachment 158871 [details] collectd5.cummulative.patch Bacause jason Unovitch corrected some issues with my patch, so it should be committed (instead of my one)
Hi. I'm still waiting on my FreeBSD account to get activated. I opened https://reviews.FreeBSD.org/D3245 for my mentors to review and sign off on. I intend to commit this as soon as I get access.
(In reply to Krzysztof from comment #22) Krzysztof, Can you clarify regarding the removal of /var/lib/collectd in the pkg-plist? From what I can see it's not being used however a sanity check that this is intended would be appreciated. @@ -115,5 +128,4 @@ man/man5/collectd.conf.5.gz man/man5/types.db.5.gz @dir /var/db/collectd -@dir /var/lib/collectd @dir /var/lib
(In reply to Jason Unovitch from comment #24) Well, I tried to remove /var/lib/ from pkg-plist. But it is installed (this directory is in some config variables). After my vacations I will try to find out this directory and remove it completelty from pkg-plist. Greetings from Italy :-)))
Created attachment 159449 [details] collectd5-5.5.0.patch (In reply to Krzysztof from comment #25) Krzysztof, What do you think of this revision? Changes: - Make Varnish 4 support compile - Make SIGROK support work - Remove the vestiages of /var/lib/collectd - Alphabetic sort of new options in OPTIONS_DEFINE and OPTIONS_GROUP_INPUT - Remove duplicate /var/lib and varnish.so entries in pkg-plist Details on 1-3 above: 1. For Varnish it came down to updating the cflags in patch/configure.ac ++ with_libvarnish_cflags="-I$withval/include/varnish" + with_libvarnish_libs="-L$withval/lib/varnish -lvarnishapi" 2. For SIGROK we need to get glib-2.0 in our CFLAGS with this in the Makefile +CFLAGS+= `pkg-config --cflags glib-2.0` 3. For /var/lib/collectd, the Makefile.am made this. There were also duplicate @dir entries in the pkg-plist for it so that is why didn't break QA + install-exec-hook: + $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run +- $(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/$(PACKAGE_NAME) + $(mkinstalldirs) $(DESTDIR)$(localstatedir)/log
Created attachment 159450 [details] Poudriere testport log from HEAD jail This Poudriere testport is with all options except SNMP. SNMP will only build in a 'bulk' build and fails testport because of an issue with net-mgmt/net-snmp that is outside your control. I've also did a testport will the default options. 8.4-RELEASE-p31 amd64 8.4-RELEASE-p31 i386 9.3-RELEASE-p17 amd64 9.3-RELEASE-p17 i386 10.1-RELEASE-p14 amd64 10.1-RELEASE-p14 i386 10.2-BETA2 amd64 10.2-BETA2 i386 11.0-CURRENT r284725 amd64 11.0-CURRENT r284725 i386 The issue with net-snmp causes this QA issue. That port is linking to the base system libarchive. ====> Running Q/A tests (stage-qa) Error: Bad linking on /usr/lib/libarchive.so.6: please add USES=libarchive Error: Bad linking on /usr/lib/libarchive.so.6: please add USES=libarchive *** Error code 1
(In reply to Jason Unovitch from comment #26) Never mind. It seems that /var/lib/collectd is quite persistent. The attached patch doesn't work at run time. # collectd -T Error: Unable to change to directory `/var/lib/collectd'.
Created attachment 159457 [details] collectd5-5.5.0.patch Revised to handle /var/lib/collectd5 better. I'm not sure how I feel about this. There are several places where the /var/lib is hard coded in and this feels more fragile than fixing it upstream.
Comment on attachment 159457 [details] collectd5-5.5.0.patch Jason, You've made a good work. I should think about it earlier :-))) So I approve this patch. And now this should work correctly. Greetings, -- Krzysztof
Comment on attachment 159457 [details] collectd5-5.5.0.patch I think I forgot to change flags that I approve this patch...
A commit references this bug: Author: junovitch Date: Tue Aug 11 01:48:59 UTC 2015 New revision: 393930 URL: https://svnweb.freebsd.org/changeset/ports/393930 Log: net-mgmt/collectd5: update 5.4.2 -> 5.5.0 PR: 201514 Submitted by: ports@bsdserwis.com (maintainer) Approved by: feld (mentor) Differential Revision: https://reviews.freebsd.org/D3245 Changes: head/net-mgmt/collectd5/Makefile head/net-mgmt/collectd5/distinfo head/net-mgmt/collectd5/files/patch-Makefile.am head/net-mgmt/collectd5/files/patch-configure.ac head/net-mgmt/collectd5/files/patch-src-curl_xml.c head/net-mgmt/collectd5/files/patch-src__Makefile.am head/net-mgmt/collectd5/files/patch-src__Makefile.in head/net-mgmt/collectd5/files/patch-src__collectd.c head/net-mgmt/collectd5/files/patch-src__collectd.h head/net-mgmt/collectd5/files/patch-src__daemon__Makefile.am head/net-mgmt/collectd5/files/patch-src__daemon__collectd.h head/net-mgmt/collectd5/files/patch-src__disk.c head/net-mgmt/collectd5/files/patch-src__dns.c head/net-mgmt/collectd5/files/patch-src__modbus.c head/net-mgmt/collectd5/files/patch-src__users.c head/net-mgmt/collectd5/files/patch-src_modbus.c head/net-mgmt/collectd5/files/patch-version-gen.sh head/net-mgmt/collectd5/pkg-descr head/net-mgmt/collectd5/pkg-plist
Thank you both for your work! Committed.