Index: head/net-mgmt/prometheus/Makefile =================================================================== --- head/net-mgmt/prometheus/Makefile (revision 439238) +++ head/net-mgmt/prometheus/Makefile (revision 439239) @@ -1,37 +1,39 @@ # Created by: Jev Björsell # $FreeBSD$ PORTNAME= prometheus -PORTVERSION= 1.5.2 +PORTVERSION= 1.6.1 DISTVERSIONPREFIX= v CATEGORIES= net-mgmt MAINTAINER= ports@ecadlabs.com COMMENT= Systems monitoring and alerting toolkit LICENSE= APACHE20 USES= go gmake USE_GITHUB= yes GO_PKGNAME= github.com/${PORTNAME}/${PORTNAME} USE_RC_SUBR= prometheus USERS= prometheus GROUPS= prometheus -STRIP= # stripping can break go binaries - +LD_FLAG_STRING= ${GO_PKGNAME}/vendor/github.com/prometheus/common/version. do-build: - (cd ${GO_WRKSRC}/cmd/prometheus ; ${SETENV} ${GO_ENV} go install) - (cd ${GO_WRKSRC}/cmd/promtool ; ${SETENV} ${GO_ENV} go install) + (cd ${GO_WRKSRC}/cmd/prometheus ; ${SETENV} ${GO_ENV} go install -ldflags \ + "-s -X ${LD_FLAG_STRING}.Version=${PORTVERSION}") + + (cd ${GO_WRKSRC}/cmd/promtool ; ${SETENV} ${GO_ENV} go install -ldflags \ + "-s -X ${LD_FLAG_STRING}.Version=${PORTVERSION}") do-install: ${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/prometheus ${STAGEDIR}${PREFIX}/bin ${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/promtool ${STAGEDIR}${PREFIX}/bin ${INSTALL_DATA} ${WRKSRC}/documentation/examples/prometheus.yml ${STAGEDIR}${LOCALBASE}/etc/prometheus.yml.sample ${MKDIR} ${STAGEDIR}${DESTDIR}/var/db/prometheus .include Index: head/net-mgmt/prometheus/distinfo =================================================================== --- head/net-mgmt/prometheus/distinfo (revision 439238) +++ head/net-mgmt/prometheus/distinfo (revision 439239) @@ -1,3 +1,3 @@ -TIMESTAMP = 1486719210 -SHA256 (prometheus-prometheus-v1.5.2_GH0.tar.gz) = c4881cc305263cc8da434be69a20aa039386d4feab5e58f8b89a60bfe8b556ac -SIZE (prometheus-prometheus-v1.5.2_GH0.tar.gz) = 5183537 +TIMESTAMP = 1492658004 +SHA256 (prometheus-prometheus-v1.6.1_GH0.tar.gz) = ecc9ce94fce45994c23b76eb0c5acbb1b942513be601872c8cd74d0821450c5e +SIZE (prometheus-prometheus-v1.6.1_GH0.tar.gz) = 5220870 Index: head/net-mgmt/prometheus/files/prometheus.in =================================================================== --- head/net-mgmt/prometheus/files/prometheus.in (revision 439238) +++ head/net-mgmt/prometheus/files/prometheus.in (revision 439239) @@ -1,65 +1,65 @@ #!/bin/sh # PROVIDE: prometheus # REQUIRE: LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf.local or /etc/rc.conf # to enable this service: # # prometheus_enable (bool): Set to NO by default # Set it to YES to enable prometheus # prometheus_user (string): Set user to run prometheus # Default is "prometheus" # prometheus_group (string): Set group to run prometheus # Default is "prometheus" # prometheus_data_dir (string): Set dir to run prometheus in # Default is "/var/db/prometheus" # prometheus_log_file (string): Set file that prometheus will log to # Default is "/var/log/prometheus.log" # prometheus_args (string): Set additional command line arguments # Default is "" . /etc/rc.subr name=prometheus rcvar=prometheus_enable load_rc_config $name : ${prometheus_enable:="NO"} : ${prometheus_user:="prometheus"} : ${prometheus_group:="prometheus"} : ${prometheus_config:="%%PREFIX%%/etc/prometheus.yml"} : ${prometheus_data_dir:="/var/db/prometheus"} : ${prometheus_log_file:="/var/log/prometheus.log"} : ${prometheus_args:=""} pidfile=/var/run/prometheus.pid required_files="${prometheus_config}" command="/usr/sbin/daemon" procname="%%PREFIX%%/bin/prometheus" sig_reload=HUP extra_commands="reload" command_args="-p ${pidfile} /usr/bin/env ${procname} \ -config.file=${prometheus_config} \ -storage.local.path=${prometheus_data_dir} \ - ${prometheus_args} > ${prometheus_log_file} 2>&1" + ${prometheus_args} >> ${prometheus_log_file} 2>&1" start_precmd=prometheus_startprecmd prometheus_startprecmd() { if [ ! -e ${pidfile} ]; then install -o ${prometheus_user} -g ${prometheus_group} /dev/null ${pidfile}; fi if [ ! -f "${prometheus_log_file}" ]; then install -o ${prometheus_user} -g ${prometheus_group} -m 640 /dev/null ${prometheus_log_file}; fi if [ ! -d ${prometheus_data_dir} ]; then install -d -o ${prometheus_user} -g ${prometheus_group} -m 750 ${prometheus_data_dir} fi } load_rc_config $name run_rc_command "$1"