Created attachment 180399 [details] bug fix Classpath settings ignored The classpath setting is ignored when starting up riemann The following code displays the Java CLASSPATH: /usr/local/etc/riemann/riemann.config: (doseq [line (.getURLs (java.lang.ClassLoader/getSystemClassLoader))] (prn line)) When launching riemann as the service file currently does (the -X arguments are removed for brevity) we get the following result: /usr/local/openjdk8/bin/java -cp a/b:/usr/local/share/java/classes/riemann.jar -jar /usr/local/share/java/classes/riemann.jar /usr/local/etc/riemann/riemann.config [...] #object[java.net.URL 0xeed890d "file:/usr/local/share/java/classes/riemann.jar"] #object[java.net.URL 0x10f477e2 "file:/usr/local/etc/riemann/"] As we can see, no CLASSPATH support Riemann should be started like this: /usr/local/openjdk8/bin/java -cp a/b:/usr/local/share/java/classes/riemann.jar riemann.bin start /usr/local/etc/riemann/riemann.config [...] #object[java.net.URL 0x5b8572df "file:/usr/home/iznogoud/a/b"] #object[java.net.URL 0x7aaad0 "file:/usr/local/share/java/classes/riemann.jar"] #object[java.net.URL 0xeed890d "file:/usr/local/etc/riemann/"] Now we have CLASSPATH support :) A patch with a bug fix is attached Now in /etc/rc.conf.d/riemmann we can get the following configuration: riemann_jarfile="/usr/local/share/java/classes/riemann.jar" riemann_java_classpath="${riemann_jarfile}:xxx.jar:yyy.jar" Controlling the classpath may be of importance to some user especially the ones who want to use riemann plugins like https://github.com/pyr/riemann-extra/ 'hope that helps :)
Created attachment 180424 [details] v2 patch I'm not able to check this patch right now, hopefully tomorrow. But its a great idea and nice work Jerome. Merci Bcp.
Created attachment 180646 [details] v3 patch incl bumping portrevision krion@ LGTM this patch now includes the PORTREVISION which was missing from the previous one. # QA - portlint OK WARN: Makefile: possible use of absolute pathname "/var/log/${PORTNAME}...". WARN: Makefile: possible use of absolute pathname "/var/run/${PORTNAME}...". WARN: Makefile: no ftp/http mirror in MASTER_SITES for users behind a proxy. WARN: /usr/ports/net-mgmt/riemann/distinfo: [1]: TIMESTAMP is over 30 days old 0 fatal errors and 4 warnings found. - poudriere waiting for building everything still.
A commit references this bug: Author: krion Date: Mon Mar 13 18:25:44 UTC 2017 New revision: 436104 URL: https://svnweb.freebsd.org/changeset/ports/436104 Log: Fix Java CLASSPATH settings to launch riemann PR: 217457 Submitted by: jeromer@fastmail.net Approved by: maintainer, mat (mentor) Differential Revision: https://reviews.freebsd.org/D9977 Changes: head/net-mgmt/riemann/Makefile head/net-mgmt/riemann/files/riemann.in