aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMateusz Piotrowski <0mp@FreeBSD.org>2019-09-20 15:09:18 +0000
committerMateusz Piotrowski <0mp@FreeBSD.org>2019-09-20 15:09:18 +0000
commita6b9524388539e04471e0cecc04f3b4f26629555 (patch)
tree9c9161b2aaa469f935ce83e32c66b28ad2ae2f18
parentcad7d68f8d70431ce45bfdb84a39e4350f8f9c33 (diff)
downloadports-a6b9524388539e04471e0cecc04f3b4f26629555.tar.gz
ports-a6b9524388539e04471e0cecc04f3b4f26629555.zip
Update to v0.9.1
Changelogs: - https://github.com/prometheus/pushgateway/releases/tag/v0.9.1 - https://github.com/prometheus/pushgateway/releases/tag/v0.9.0 - https://github.com/prometheus/pushgateway/releases/tag/v0.7.0 - https://github.com/prometheus/pushgateway/releases/tag/v0.5.2 - https://github.com/prometheus/pushgateway/releases/tag/v0.5.1 - https://github.com/prometheus/pushgateway/releases/tag/v0.5.0 - https://github.com/prometheus/pushgateway/releases/tag/v0.4.0 The new persistent storage format is not backwards compatible. See the changelogs for details. - Define LICENSE_FILE. - Switch to USES=go:modules - Simplify targets. - Fix a couple of typos and style issues in the service file - Improve readability of comments in the service file - Do not install /var/db/pushgateway by default. It is going to be created by the service anyway. PR: 233660 Approved by: maintainer Event: EuroBSDcon 2019 Hackathon Differential Revision: https://reviews.freebsd.org/D21729
Notes
Notes: svn path=/head/; revision=512417
-rw-r--r--UPDATING7
-rw-r--r--net-mgmt/pushgateway/Makefile39
-rw-r--r--net-mgmt/pushgateway/distinfo42
-rw-r--r--net-mgmt/pushgateway/files/pushgateway.in48
-rw-r--r--net-mgmt/pushgateway/pkg-plist1
5 files changed, 95 insertions, 42 deletions
diff --git a/UPDATING b/UPDATING
index bbdc989a2cd7..de06b6bfdc6e 100644
--- a/UPDATING
+++ b/UPDATING
@@ -5,6 +5,13 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
+20190920:
+ AFFECTS: users of net-mgmt/pushgateway
+ AUTHOR: 0mp@FreeBSD.org
+
+ The persistent storage format used by pushgateway in the lastest version is
+ not backwards compatible. See the pushgateway changelogs for details.
+
20190911:
AFFECTS: users of security/bastillion
AUTHOR: netchild@FreeBSD.org
diff --git a/net-mgmt/pushgateway/Makefile b/net-mgmt/pushgateway/Makefile
index 3e8142151e3f..90c7ee02ac77 100644
--- a/net-mgmt/pushgateway/Makefile
+++ b/net-mgmt/pushgateway/Makefile
@@ -2,32 +2,45 @@
# $FreeBSD$
PORTNAME= pushgateway
-PORTVERSION= 0.3.1
-PORTREVISION= 1
-DISTVERSIONPREFIX=v
+DISTVERSIONPREFIX= v
+DISTVERSION= 0.9.1
CATEGORIES= net-mgmt
MAINTAINER= aduitsis@cpan.org
COMMENT= Prometheus push acceptor for ephemeral and batch jobs
LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
-USES= go gmake
-GH_ACCOUNT= prometheus
+USES= gmake go:modules
USE_GITHUB= yes
-
-GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME}
+GH_ACCOUNT= prometheus
+GH_TUPLE= \
+ alecthomas:kingpin:v2.2.6:alecthomas_kingpin/vendor/gopkg.in/alecthomas/kingpin.v2 \
+ alecthomas:template:fb15b899a751:alecthomas_template/vendor/github.com/alecthomas/template \
+ alecthomas:units:c3de453c63f4:alecthomas_units/vendor/github.com/alecthomas/units \
+ beorn7:perks:v1.0.1:beorn7_perks/vendor/github.com/beorn7/perks \
+ go-kit:kit:v0.9.0:go_kit_kit/vendor/github.com/go-kit/kit \
+ go-logfmt:logfmt:v0.4.0:go_logfmt_logfmt/vendor/github.com/go-logfmt/logfmt \
+ golang:protobuf:v1.3.2:golang_protobuf/vendor/github.com/golang/protobuf \
+ golang:sys:cbf593c0f2f3:golang_sys/vendor/golang.org/x/sys \
+ julienschmidt:httprouter:v1.2.0:julienschmidt_httprouter/vendor/github.com/julienschmidt/httprouter \
+ kr:logfmt:b84e30acd515:kr_logfmt/vendor/github.com/kr/logfmt \
+ matttproud:golang_protobuf_extensions:v1.0.1:matttproud_golang_protobuf_extensions/vendor/github.com/matttproud/golang_protobuf_extensions \
+ pkg:errors:v0.8.1:pkg_errors/vendor/github.com/pkg/errors \
+ prometheus:client_golang:v1.1.0:prometheus_client_golang/vendor/github.com/prometheus/client_golang \
+ prometheus:client_model:fd36f4220a90:prometheus_client_model/vendor/github.com/prometheus/client_model \
+ prometheus:common:v0.6.0:prometheus_common/vendor/github.com/prometheus/common \
+ prometheus:procfs:v0.0.3:prometheus_procfs/vendor/github.com/prometheus/procfs \
+ shurcooL:httpfs:8d4bc4ba7749:shurcool_httpfs/vendor/github.com/shurcooL/httpfs \
+ shurcooL:vfsgen:6a9ea43bcacd:shurcool_vfsgen/vendor/github.com/shurcooL/vfsgen
USE_RC_SUBR= pushgateway
USERS= prometheus
GROUPS= prometheus
-do-build:
- @(cd ${GO_WRKSRC} ; ${SETENV} ${MAKE_ENV} ${GO_ENV} go install)
-
-do-install:
- ${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/pushgateway ${STAGEDIR}${PREFIX}/bin
- ${MKDIR} ${STAGEDIR}${DESTDIR}/var/db/${PORTNAME}
+do-test:
+ @(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GO_ENV} ${GMAKE} test)
.include <bsd.port.mk>
diff --git a/net-mgmt/pushgateway/distinfo b/net-mgmt/pushgateway/distinfo
index ec7b07c4e8dc..01386424ecb9 100644
--- a/net-mgmt/pushgateway/distinfo
+++ b/net-mgmt/pushgateway/distinfo
@@ -1,3 +1,39 @@
-TIMESTAMP = 1486461319
-SHA256 (prometheus-pushgateway-v0.3.1_GH0.tar.gz) = 6b0fffd0ffd05babbcfd8838027e4bad8ee4d91aeaca705aa83d7ddf1f8bb6c6
-SIZE (prometheus-pushgateway-v0.3.1_GH0.tar.gz) = 1140371
+TIMESTAMP = 1568986174
+SHA256 (prometheus-pushgateway-v0.9.1_GH0.tar.gz) = bb559cef0da9457120ca3a6b13dc631977cc70f3cd90d53d6b53ffa2632b0376
+SIZE (prometheus-pushgateway-v0.9.1_GH0.tar.gz) = 4743766
+SHA256 (alecthomas-kingpin-v2.2.6_GH0.tar.gz) = 4624eae43489de8a71ea60efaf6744c581b6bd62909f7514c484c1ea0efaba5a
+SIZE (alecthomas-kingpin-v2.2.6_GH0.tar.gz) = 44383
+SHA256 (alecthomas-template-fb15b899a751_GH0.tar.gz) = 2e2a44375eca48ce941182504b5d13aa98182b9a3f64ace33bfda52208bd0f5e
+SIZE (alecthomas-template-fb15b899a751_GH0.tar.gz) = 55339
+SHA256 (alecthomas-units-c3de453c63f4_GH0.tar.gz) = b2eb77de46e677edb150bb4bf81d213416a477525980e315264cbd70b22d0ece
+SIZE (alecthomas-units-c3de453c63f4_GH0.tar.gz) = 3485
+SHA256 (beorn7-perks-v1.0.1_GH0.tar.gz) = 98db84bb0224a26094e6adba91b7ee7a1a7ace28cb648d818f8e779e6a19f825
+SIZE (beorn7-perks-v1.0.1_GH0.tar.gz) = 10867
+SHA256 (go-kit-kit-v0.9.0_GH0.tar.gz) = 41e92e4f5a6111e6f88bec9b46ca41d6eb9167dc2231813616bdf365e641be44
+SIZE (go-kit-kit-v0.9.0_GH0.tar.gz) = 251842
+SHA256 (go-logfmt-logfmt-v0.4.0_GH0.tar.gz) = eddccc7c8d39a6381f7152e73ebf3c725de317c5b984d8a77282e63915aa834d
+SIZE (go-logfmt-logfmt-v0.4.0_GH0.tar.gz) = 12724
+SHA256 (golang-protobuf-v1.3.2_GH0.tar.gz) = c9cda622857a17cf0877c5ba76688a931883e505f40744c9495638b6e3da1f65
+SIZE (golang-protobuf-v1.3.2_GH0.tar.gz) = 312285
+SHA256 (golang-sys-cbf593c0f2f3_GH0.tar.gz) = 3590c55ef807ee27909fecdd771996ab55ad5306f5174b877810a9a9915f0a18
+SIZE (golang-sys-cbf593c0f2f3_GH0.tar.gz) = 1454976
+SHA256 (julienschmidt-httprouter-v1.2.0_GH0.tar.gz) = 54bdf6b53508bead0a9d4bae96beba3ac5171ce3a2e44c84431a7f23570b8ff5
+SIZE (julienschmidt-httprouter-v1.2.0_GH0.tar.gz) = 22914
+SHA256 (kr-logfmt-b84e30acd515_GH0.tar.gz) = bf056ba7960b6846f2aa2c6ec0a217ead3e7259bc6c537f9f3ba3af6eb82cb80
+SIZE (kr-logfmt-b84e30acd515_GH0.tar.gz) = 6411
+SHA256 (matttproud-golang_protobuf_extensions-v1.0.1_GH0.tar.gz) = 2def0ee6f6b12b1efc0e3007d89f598608a072610e805c3655ea9d13c3ead49b
+SIZE (matttproud-golang_protobuf_extensions-v1.0.1_GH0.tar.gz) = 37184
+SHA256 (pkg-errors-v0.8.1_GH0.tar.gz) = 7a428967c6fc2e80cd84a0d9469ab6bd4dbe6b13493ba6294322a933a5a7e356
+SIZE (pkg-errors-v0.8.1_GH0.tar.gz) = 11009
+SHA256 (prometheus-client_golang-v1.1.0_GH0.tar.gz) = 4fd80a210cc090db117d92d126d15cdb5108c84e3178ffc7bd26cb2fa4298343
+SIZE (prometheus-client_golang-v1.1.0_GH0.tar.gz) = 140006
+SHA256 (prometheus-client_model-fd36f4220a90_GH0.tar.gz) = 17571c708bab9a1ba18d9dd0c9bfe96dff3f1b84c63e7d8d4c3489ef5c34ee40
+SIZE (prometheus-client_model-fd36f4220a90_GH0.tar.gz) = 57491
+SHA256 (prometheus-common-v0.6.0_GH0.tar.gz) = 3b58d10c44520d8fd3817b45599a6229123ccf8967db528063143266405b7c4f
+SIZE (prometheus-common-v0.6.0_GH0.tar.gz) = 99696
+SHA256 (prometheus-procfs-v0.0.3_GH0.tar.gz) = 3af9b805166932b771dfa19a4c94eb83ceefd2eb54d1a314c3bf15a5f3154d0d
+SIZE (prometheus-procfs-v0.0.3_GH0.tar.gz) = 91880
+SHA256 (shurcooL-httpfs-8d4bc4ba7749_GH0.tar.gz) = 761fc18152b6998a40b6aa8169fa1275cbbbdba0632096bf5a004a8c5d1c9d99
+SIZE (shurcooL-httpfs-8d4bc4ba7749_GH0.tar.gz) = 8713
+SHA256 (shurcooL-vfsgen-6a9ea43bcacd_GH0.tar.gz) = c13829c1cd9c7ab9395bf0d8e6b18731af112dc9a3b831423f851914d8b2c392
+SIZE (shurcooL-vfsgen-6a9ea43bcacd_GH0.tar.gz) = 13635
diff --git a/net-mgmt/pushgateway/files/pushgateway.in b/net-mgmt/pushgateway/files/pushgateway.in
index 275629dbfbec..d61b5975fa1e 100644
--- a/net-mgmt/pushgateway/files/pushgateway.in
+++ b/net-mgmt/pushgateway/files/pushgateway.in
@@ -1,5 +1,5 @@
#!/bin/sh
-#
+#
# $FreeBSD$
# PROVIDE: pushgateway
@@ -9,35 +9,34 @@
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
-# pushgateway_enable (bool): Set to NO by default
-# Set it to YES to enable pushgateway
-# pushgateway_user (string): Set user to run pushgateway
-# Default is "prometheus"
-# pushgateway_group (string): Set group to run pushgateway
-# Default is "prometheus"
-# pushgateway_data_dir (string): Set dir to run pushgateway in
-# Default is "/var/db/pushgateway"
-# pushgateway_persistence_file (string): Set file in which the pushed
-# metrics will be persisted
-# Default is "${pushgateway_data_dir}/persistent.data"
-# pushgateway_log_file (string): Set file that pushgateway will log to
-# Default is "/var/log/pushgateway.log"
-# pushgateway_args (string): Set additional command line arguments
-# Default is ""
+# pushgateway_enable (bool, default: "NO"):
+# Set it to YES to enable pushgateway.
+# pushgateway_user (string, default: "prometheus"):
+# Set user to run pushgateway.
+# pushgateway_group (string, default: "prometheus"):
+# Set group to run pushgateway.
+# pushgateway_data_dir (string, default: "/var/db/pushgateway"):
+# Set directory to run pushgateway in.
+# pushgateway_persistence_file (string, default: "${pushgateway_data_dir}/persistent.data")
+# Set file in which the pushed metrics will be persisted.
+# pushgateway_log_file (string, default: "/var/log/pushgateway.log")
+# Set file that pushgateway will log to.
+# pushgateway_args (string, default: ""):
+# Set additional command line arguments.
. /etc/rc.subr
name=pushgateway
rcvar=pushgateway_enable
-load_rc_config $name
+load_rc_config "$name"
: ${pushgateway_enable:=NO}
: ${pushgateway_user:=prometheus}
: ${pushgateway_group:=prometheus}
-: ${pushgateway_data_dir=/var/db/pushgateway}
-: ${pushgateway_persistence_file=${pushgateway_data_dir}/persistent.data}
-: ${pushgateway_log_file=/var/log/pushgateway.log}
+: ${pushgateway_data_dir:=/var/db/pushgateway}
+: ${pushgateway_persistence_file:=${pushgateway_data_dir}/persistent.data}
+: ${pushgateway_log_file:=/var/log/pushgateway.log}
pidfile=/var/run/pushgateway.pid
command=/usr/sbin/daemon
@@ -45,18 +44,17 @@ procname="%%PREFIX%%/bin/pushgateway"
sig_reload=HUP
extra_commands=reload
command_args="-p ${pidfile} /usr/bin/env ${procname} \
- -persistence.file=${pushgateway_persistence_file} \
+ --persistence.file=${pushgateway_persistence_file} \
${pushgateway_args} > ${pushgateway_log_file} 2>&1"
-
start_precmd=pushgateway_startprecmd
pushgateway_startprecmd()
{
- if [ ! -e ${pidfile} ]; then
- install -o ${pushgateway_user} -g ${pushgateway_group} /dev/null ${pidfile};
+ if [ ! -e "${pidfile}" ]; then
+ install -o ${pushgateway_user} -g ${pushgateway_group} /dev/null ${pidfile}
fi
if [ ! -f "${pushgateway_log_file}" ]; then
- install -o ${pushgateway_user} -g ${pushgateway_group} -m 640 /dev/null ${pushgateway_log_file};
+ install -o ${pushgateway_user} -g ${pushgateway_group} -m 640 /dev/null ${pushgateway_log_file}
fi
if [ ! -d ${pushgateway_data_dir} ]; then
install -d -o ${pushgateway_user} -g ${pushgateway_group} -m 750 ${pushgateway_data_dir}
diff --git a/net-mgmt/pushgateway/pkg-plist b/net-mgmt/pushgateway/pkg-plist
index cb0fb214e624..953a5f7d3292 100644
--- a/net-mgmt/pushgateway/pkg-plist
+++ b/net-mgmt/pushgateway/pkg-plist
@@ -1,2 +1 @@
bin/pushgateway
-@dir(prometheus,prometheus) /var/db/pushgateway