aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--UPDATING8
-rw-r--r--net-mgmt/unbound_exporter/Makefile24
-rw-r--r--net-mgmt/unbound_exporter/distinfo28
-rw-r--r--net-mgmt/unbound_exporter/files/pkg-message.in11
-rw-r--r--net-mgmt/unbound_exporter/files/unbound_exporter.in66
5 files changed, 57 insertions, 80 deletions
diff --git a/UPDATING b/UPDATING
index 0f011fb37882..f952518fa59e 100644
--- a/UPDATING
+++ b/UPDATING
@@ -5,6 +5,14 @@ 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.
+20221220:
+ AFFECTS: users of net-mgmt/unbound_exporter
+ AUTHOR: thomas@beingboiled.info
+
+ The config defaults for the log file and certificates have been changed.
+ See /usr/local/etc/rc.d/unbound_exporter for possible options and adjust
+ your rc.conf accordingly.
+
20221215:
AFFECTS: users of security/clamav
AUTHOR: yasu@FreeBSD.org
diff --git a/net-mgmt/unbound_exporter/Makefile b/net-mgmt/unbound_exporter/Makefile
index 6335625b64c7..f10bfeaa50d2 100644
--- a/net-mgmt/unbound_exporter/Makefile
+++ b/net-mgmt/unbound_exporter/Makefile
@@ -1,32 +1,20 @@
PORTNAME= unbound_exporter
-PORTVERSION= 0.3
+PORTVERSION= 0.4.1
DISTVERSIONPREFIX= v
-PORTREVISION= 7
CATEGORIES= net-mgmt
MAINTAINER= aduitsis@cpan.org
COMMENT= Prometheus metrics exporter for the Unbound DNS resolver
-WWW= https://github.com/kumina/unbound_exporter
+WWW= https://github.com/letsencrypt/unbound_exporter
LICENSE= APACHE20
-USES= go
-USE_GITHUB= yes
+USES= go:modules
USE_RC_SUBR= unbound_exporter
+GO_MODULE= github.com/letsencrypt/unbound_exporter
-GH_ACCOUNT= kumina
-GH_TUPLE= prometheus:client_golang:3fb53d:client_golang/vendor/github.com/prometheus/client_golang \
- prometheus:client_model:6f38060:client_model/vendor/github.com/prometheus/client_model \
- prometheus:common:49fee29:common/vendor/github.com/prometheus/common \
- prometheus:procfs:a1dba9c:procfs/vendor/github.com/prometheus/procfs \
- beorn7:perks:4c0e845:perks/vendor/github.com/beorn7/perks \
- golang:protobuf:2bba060:protobuf/vendor/github.com/golang/protobuf \
- matttproud:golang_protobuf_extensions:c12348c:extensions/vendor/github.com/matttproud/golang_protobuf_extensions \
- sirupsen:logrus:91da99d:logrus/vendor/github.com/Sirupsen/logrus \
- golang:crypto:3d3f9f41:crypto/vendor/golang.org/x/crypto \
- golang:sys:33540a1f6037:sys/vendor/golang.org/x/sys
-
-GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME}
+SUB_FILES= pkg-message
+SUB_LIST= USERS=${USERS} GROUPS=${GROUPS}
USERS= unbound
GROUPS= unbound
diff --git a/net-mgmt/unbound_exporter/distinfo b/net-mgmt/unbound_exporter/distinfo
index 2cacd3bdd3f6..6db3e95be3f9 100644
--- a/net-mgmt/unbound_exporter/distinfo
+++ b/net-mgmt/unbound_exporter/distinfo
@@ -1,23 +1,5 @@
-TIMESTAMP = 1618353057
-SHA256 (kumina-unbound_exporter-v0.3_GH0.tar.gz) = 6fee9aa7c0d1f6310832dcd2d41240f0c198e67a863f1b239c286cc1fd523d0e
-SIZE (kumina-unbound_exporter-v0.3_GH0.tar.gz) = 12018
-SHA256 (prometheus-client_golang-3fb53d_GH0.tar.gz) = 778ce90fdb4610cfc7c6382db9455ba15ca63c48c3f0e21cff9f1d0efeef98d3
-SIZE (prometheus-client_golang-3fb53d_GH0.tar.gz) = 129739
-SHA256 (prometheus-client_model-6f38060_GH0.tar.gz) = 6b4cc049a4588d8e93b7acf6cffa6a53034d5410128ae3752263f2bacf9e606c
-SIZE (prometheus-client_model-6f38060_GH0.tar.gz) = 54645
-SHA256 (prometheus-common-49fee29_GH0.tar.gz) = c38dd9ce34f65921f8e7604e6be471f4a49626b63e7312db21f98d65085a7be6
-SIZE (prometheus-common-49fee29_GH0.tar.gz) = 59151
-SHA256 (prometheus-procfs-a1dba9c_GH0.tar.gz) = 1702ef1142513b687bd544962828432f88195e12bbb079cbd68670b00c3e2d18
-SIZE (prometheus-procfs-a1dba9c_GH0.tar.gz) = 31615
-SHA256 (beorn7-perks-4c0e845_GH0.tar.gz) = 2d0c7784d2695b09c87710bc8c3c3d5b88ffeece31a650ed901763d215615478
-SIZE (beorn7-perks-4c0e845_GH0.tar.gz) = 10593
-SHA256 (golang-protobuf-2bba060_GH0.tar.gz) = ae917f15fd7de724cdce087b451326e6f364a898f03dc453a912ed7918e87742
-SIZE (golang-protobuf-2bba060_GH0.tar.gz) = 245284
-SHA256 (matttproud-golang_protobuf_extensions-c12348c_GH0.tar.gz) = da165c9275b77a0994b815bc7d761dcb2e4799a90fe49eec08d8bdff3a683f48
-SIZE (matttproud-golang_protobuf_extensions-c12348c_GH0.tar.gz) = 37200
-SHA256 (sirupsen-logrus-91da99d_GH0.tar.gz) = fe1633e0563ba4f1c24ad0a056ba71a0e19731052085470638ca0f6b084f6f1a
-SIZE (sirupsen-logrus-91da99d_GH0.tar.gz) = 37938
-SHA256 (golang-crypto-3d3f9f41_GH0.tar.gz) = 4f7727c350599f8254ebbf9bc98ff5a195628e68cb76df4eb7043d2fd9f431c6
-SIZE (golang-crypto-3d3f9f41_GH0.tar.gz) = 1644603
-SHA256 (golang-sys-33540a1f6037_GH0.tar.gz) = 09ebdf007413c2eaddce123137443d08d1848be410c58896e772f0481ec385d5
-SIZE (golang-sys-33540a1f6037_GH0.tar.gz) = 1497659
+TIMESTAMP = 1667511702
+SHA256 (go/net-mgmt_unbound_exporter/unbound_exporter-v0.4.1/v0.4.1.mod) = 1bd03db78e5d0be6f7e91fdb7f1c689c811529a74c0e7988ed1e13bf63fff2dd
+SIZE (go/net-mgmt_unbound_exporter/unbound_exporter-v0.4.1/v0.4.1.mod) = 485
+SHA256 (go/net-mgmt_unbound_exporter/unbound_exporter-v0.4.1/v0.4.1.zip) = 596d8f658e7f8a67ea2a5e36566a664168641fa5e793a170032df30a7c2d1092
+SIZE (go/net-mgmt_unbound_exporter/unbound_exporter-v0.4.1/v0.4.1.zip) = 28044
diff --git a/net-mgmt/unbound_exporter/files/pkg-message.in b/net-mgmt/unbound_exporter/files/pkg-message.in
new file mode 100644
index 000000000000..6eac52ec6758
--- /dev/null
+++ b/net-mgmt/unbound_exporter/files/pkg-message.in
@@ -0,0 +1,11 @@
+[
+{
+ type: upgrade
+ maximum_version: "0.4.1"
+ message: <<EOM
+The config defaults for the log file and certificates have been changed.
+See %%PREFIX%%/etc/rc.d/unbound_exporter for possible options
+and adjust your rc.conf accordingly.
+EOM
+}
+]
diff --git a/net-mgmt/unbound_exporter/files/unbound_exporter.in b/net-mgmt/unbound_exporter/files/unbound_exporter.in
index 6f7693e599c7..ee0c24cdefc0 100644
--- a/net-mgmt/unbound_exporter/files/unbound_exporter.in
+++ b/net-mgmt/unbound_exporter/files/unbound_exporter.in
@@ -7,24 +7,21 @@
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
-# unbound_exporter_enable (bool): Set to NO by default
-# Set it to YES to enable unbound_exporter
-# unbound_exporter_user (string): Set user to run unbound_exporter
-# Default is "%%USERS%%"
-# unbound_exporter_group (string): Set group to run unbound_exporter
-# Default is "%%GROUPS%%"
-# unbound_exporter_log_file (string): Set file that unbound_exporter will log to
-# Default is "/var/log/unbound_exporter.log"
+# unbound_exporter_enable (bool): Set to YES to enable unbound_exporter, default is NO
+# unbound_exporter_user (string): Set user to run as, default is "%%USERS%%"
+# unbound_exporter_log_file (string): Set log file location, default is no log file
+# unbound_exporter_syslog (bool): Set to YES to use syslog, default is NO
+# unbound_exporter_daemon (string): Set additional arguments for "daemon", default is none
+#
+# Use the following variables to override unbound_exporter's defaults:
+#
# unbound_exporter_ca (string): Set unbound ca filename
-# Default is /usr/local/etc/unbound/unbound_server.pem
# unbound_exporter_cert (string): Set unbound control cert filename
-# Default is /usr/local/etc/unbound/unbound_control.pem
# unbound_exporter_key (string): Set unbound control key filename
-# Default is /usr/local/etc/unbound/unbound_control.key
+# unbound_exporter_host (string): Set Unix or TCP address of unbound control socket
# unbound_exporter_bind (string): Set address to listen on
-# Default is :9167
+# unbound_exporter_path (string): Set metrics path
# unbound_exporter_args (string): Set additional command line arguments
-# Default is ""
. /etc/rc.subr
@@ -34,34 +31,25 @@ rcvar=unbound_exporter_enable
load_rc_config $name
: ${unbound_exporter_enable:=NO}
-: ${unbound_exporter_user:=unbound}
-: ${unbound_exporter_group:=unbound}
-: ${unbound_exporter_log_file=/var/log/unbound_exporter.log}
-: ${unbound_exporter_ca=%%PREFIX%%/etc/unbound/unbound_server.pem}
-: ${unbound_exporter_cert=%%PREFIX%%/etc/unbound/unbound_control.pem}
-: ${unbound_exporter_key=%%PREFIX%%/etc/unbound/unbound_control.key}
-: ${unbound_exporter_bind=:9167}
+: ${unbound_exporter_user:=%%USERS%%}
pidfile=/var/run/unbound_exporter.pid
command=/usr/sbin/daemon
-procname="%%PREFIX%%/bin/unbound_exporter"
-command_args="-p ${pidfile} /usr/bin/env ${procname} \
- -unbound.ca ${unbound_exporter_ca} \
- -unbound.cert ${unbound_exporter_cert} \
- -unbound.key ${unbound_exporter_key} \
- -web.listen-address ${unbound_exporter_bind} \
- ${unbound_exporter_args} > ${unbound_exporter_log_file} 2>&1"
-
-start_precmd=unbound_exporter_startprecmd
-
-unbound_exporter_startprecmd()
-{
- if [ ! -e ${pidfile} ]; then
- install -o ${unbound_exporter_user} -g ${unbound_exporter_group} /dev/null ${pidfile};
- fi
- if [ ! -f "${unbound_exporter_log_file}" ]; then
- install -o ${unbound_exporter_user} -g ${unbound_exporter_group} -m 640 /dev/null ${unbound_exporter_log_file};
- fi
-}
+command_args="-c -f -P ${pidfile} -u ${unbound_exporter_user} \
+ ${unbound_exporter_log_file:+-H -o $unbound_exporter_log_file} \
+ ${unbound_exporter_syslog:+-S} \
+ ${unbound_exporter_daemon} \
+ %%PREFIX%%/bin/unbound_exporter \
+ ${unbound_exporter_ca:+-unbound.ca $unbound_exporter_ca} \
+ ${unbound_exporter_cert:+-unbound.cert $unbound_exporter_cert} \
+ ${unbound_exporter_host:+-unbound.host $unbound_exporter_host} \
+ ${unbound_exporter_key:+-unbound.key $unbound_exporter_key} \
+ ${unbound_exporter_bind:+-web.listen-adress $unbound_exporter_bin}
+ ${unbound_exporter_path:+-web.telemetry-patch $unbound_exporter_path}
+ ${unbound_exporter_args}"
+
+# these were used in the past, but now "daemon" takes care of everything and must run as root
+unset unbound_exporter_user
+unset unbound_exporter_group
run_rc_command "$1"