diff --git a/net-mgmt/prometheus2/Makefile b/net-mgmt/prometheus2/Makefile index 74d82742b983..12895584580a 100644 --- a/net-mgmt/prometheus2/Makefile +++ b/net-mgmt/prometheus2/Makefile @@ -1,6 +1,6 @@ PORTNAME= prometheus DISTVERSIONPREFIX= v -DISTVERSION= 2.30.0 +DISTVERSION= 2.30.3 CATEGORIES= net-mgmt MAINTAINER= dor.bsd@xm0.uk diff --git a/net-mgmt/prometheus2/Makefile.modules b/net-mgmt/prometheus2/Makefile.modules index 4cfee62c4714..7fc517df1a58 100644 --- a/net-mgmt/prometheus2/Makefile.modules +++ b/net-mgmt/prometheus2/Makefile.modules @@ -134,7 +134,7 @@ GH_TUPLE+= \ prometheus:client_golang:v1.11.0:prometheus_client_golang/vendor/github.com/prometheus/client_golang \ prometheus:client_model:v0.2.0:prometheus_client_model/vendor/github.com/prometheus/client_model \ prometheus:common:v0.1.0:prometheus_common_sigv4/vendor/github.com/prometheus/common/sigv4 \ - prometheus:common:v0.30.0:prometheus_common/vendor/github.com/prometheus/common \ + prometheus:common:v0.30.1:prometheus_common/vendor/github.com/prometheus/common \ prometheus:exporter-toolkit:v0.6.1:prometheus_exporter_toolkit/vendor/github.com/prometheus/exporter-toolkit \ prometheus:procfs:v0.6.0:prometheus_procfs/vendor/github.com/prometheus/procfs \ protocolbuffers:protobuf-go:v1.27.1:protocolbuffers_protobuf_go/vendor/google.golang.org/protobuf \ diff --git a/net-mgmt/prometheus2/distinfo b/net-mgmt/prometheus2/distinfo index 25b3c4617dcd..7c442c38bbee 100644 --- a/net-mgmt/prometheus2/distinfo +++ b/net-mgmt/prometheus2/distinfo @@ -1,8 +1,8 @@ -TIMESTAMP = 1632656002 -SHA256 (prometheus-prometheus-v2.30.0_GH0.tar.gz) = 900dc07f54c1251f22d18c2a5751bb1b0192b3d9960406a2c7ea3098a688d53c -SIZE (prometheus-prometheus-v2.30.0_GH0.tar.gz) = 6227471 -SHA256 (ports-assets-net-mgmt_prometheus2-v2.30.0_GH0.tar.gz) = f422bab1b693857724117983d1dfab1861877147a074eb1429b57be8e9a53650 -SIZE (ports-assets-net-mgmt_prometheus2-v2.30.0_GH0.tar.gz) = 6034456 +TIMESTAMP = 1635860474 +SHA256 (prometheus-prometheus-v2.30.3_GH0.tar.gz) = 66a835096e717c11db2ecb5f948c6346868fa1f877196ee2237fb4630df97c06 +SIZE (prometheus-prometheus-v2.30.3_GH0.tar.gz) = 6228469 +SHA256 (ports-assets-net-mgmt_prometheus2-v2.30.3_GH0.tar.gz) = 66280620a97e7c0a7c068ad5b68465d65261d53cdf217eb13fe19f8f3a953369 +SIZE (ports-assets-net-mgmt_prometheus2-v2.30.3_GH0.tar.gz) = 6034598 SHA256 (Azure-azure-sdk-for-go-v57.1.0_GH0.tar.gz) = 3b1214d3ae8568ecba5c03f10b5a1fd700107fe00734d3563e529745ecbc547a SIZE (Azure-azure-sdk-for-go-v57.1.0_GH0.tar.gz) = 42069618 SHA256 (Azure-go-autorest-446f41b7d65b_GH0.tar.gz) = 883e2603529a907a3da25d5e2389ab6473a80e6d79daf0d9ffc6385494e0da0a @@ -273,8 +273,8 @@ SHA256 (prometheus-client_model-v0.2.0_GH0.tar.gz) = 4ab1be9cdfa702d7f49beeb09a2 SIZE (prometheus-client_model-v0.2.0_GH0.tar.gz) = 10986 SHA256 (prometheus-common-v0.1.0_GH0.tar.gz) = 5c08a6066883c7043a5cd27a074e763b5de110f65c1ea6ffc8c9360038bb8dd9 SIZE (prometheus-common-v0.1.0_GH0.tar.gz) = 87363 -SHA256 (prometheus-common-v0.30.0_GH0.tar.gz) = 867c17dbef42eae180d959ca67f7534051939ffe187ad46c2a80397deb849f50 -SIZE (prometheus-common-v0.30.0_GH0.tar.gz) = 145566 +SHA256 (prometheus-common-v0.30.1_GH0.tar.gz) = 629e80ea0bcf9eb988ec696edf1507b134e04f799301c81b2ac7c0bf5fd95545 +SIZE (prometheus-common-v0.30.1_GH0.tar.gz) = 145668 SHA256 (prometheus-exporter-toolkit-v0.6.1_GH0.tar.gz) = cfc55484414f9439b9de342d08ff20d87175ad2add174fdf9f1482c393e5e74b SIZE (prometheus-exporter-toolkit-v0.6.1_GH0.tar.gz) = 49713 SHA256 (prometheus-procfs-v0.6.0_GH0.tar.gz) = 6ad7a23cf4db9fa5dbf2c5d8fbd0fbf5ffe48e3ddb7bf15f9359813d764ce73c diff --git a/net-mgmt/prometheus2/update-port.sh b/net-mgmt/prometheus2/update-port.sh new file mode 100755 index 000000000000..e4a9afa4fde5 --- /dev/null +++ b/net-mgmt/prometheus2/update-port.sh @@ -0,0 +1,53 @@ +#!/bin/sh +set -e + +modules_file="Makefile.modules" + +generate_modules() { + local outfile="$1" + + env M2T_GITHUB="${M2T_GITHUB}" \ + make gomod-vendor \ + > "${outfile}" +} + +# Ensure that the Makefile.modules is fit to use. +process_modules() { + local infile="$1" + + # Ensure that our GH_TUPLE is += to not override the GH_TUPLE in the main + # Makefile. + sed -I '' 's#GH_TUPLE=#GH_TUPLE+=#' "${infile}" + + # This fixes an issue with poudriere where some Go modules aren't in the + # correct loctaion for some reason. I'm still unsure why this is required. + # See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258548 + sed -I '' 's#simonpasquier_klog_gokit_v3/vendor/k8s.io/klog/v2#simonpasquier_klog_gokit_v3#' "${infile}" + + echo -e "\t@\${RM} -r \${WRKSRC}/vendor/k8s.io/klog/v2" >> "${infile}" + echo -e "\t@\${RLN} \${WRKSRC_simonpasquier_klog_gokit_v3} \${WRKSRC}/vendor/k8s.io/klog/v2" >> "${infile}" +} + +main() { + local outfile="$(mktemp)" + + # Download new distfiles + echo "Makesum part 1" + make makesum + + # Generate a modules file and process it to what we need + echo "Generating modules file" + generate_modules "${outfile}" + + echo "Processing modules file" + process_modules "${outfile}" + + # Download distfiles again to update with new Go modules + echo "Makesum part 2" + make makesum + + # Finally move the new modules file into place + mv "${outfile}" "${modules_file}" +} + +main