git: b754aa93b216 - main - textproc/gitlab-elasticsearch-indexer: update to 3.0.0

From: Matthias Fechner <mfechner_at_FreeBSD.org>
Date: Fri, 27 May 2022 17:19:12 UTC
The branch main has been updated by mfechner:

URL: https://cgit.FreeBSD.org/ports/commit/?id=b754aa93b2162274e64167c40cb9bc9e4f86a2d6

commit b754aa93b2162274e64167c40cb9bc9e4f86a2d6
Author:     Matthias Fechner <mfechner@FreeBSD.org>
AuthorDate: 2022-05-27 17:07:56 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2022-05-27 17:18:32 +0000

    textproc/gitlab-elasticsearch-indexer: update to 3.0.0
    
    Required for gitlab-ce 15.0.0.
---
 textproc/gitlab-elasticsearch-indexer/Makefile | 91 +++++++++++---------------
 textproc/gitlab-elasticsearch-indexer/distinfo | 82 ++---------------------
 2 files changed, 42 insertions(+), 131 deletions(-)

diff --git a/textproc/gitlab-elasticsearch-indexer/Makefile b/textproc/gitlab-elasticsearch-indexer/Makefile
index d6549a2a35b4..24dedf5dffe7 100644
--- a/textproc/gitlab-elasticsearch-indexer/Makefile
+++ b/textproc/gitlab-elasticsearch-indexer/Makefile
@@ -1,8 +1,9 @@
 # Created by: Matthias Fechner <mfechner@FreeBSD.org>
 
 PORTNAME=	gitlab-elasticsearch-indexer
-PORTVERSION=	2.17.0
-PORTREVISION=	2
+PORTVERSION=	3.0.0
+DISTVERSIONPREFIX=	v
+PORTREVISION=	0
 CATEGORIES=	textproc
 
 MAINTAINER=	mfechner@FreeBSD.org
@@ -16,67 +17,49 @@ LIB_DEPENDS=	libicui18n.so:devel/icu \
 		libicuuc.so:devel/icu
 #RUN_DEPENDS=	p5-Image-ExifTool>=0:graphics/p5-Image-ExifTool
 
-USES=		gmake go:modules pkgconfig
+USES=		gmake go:modules,no_targets pkgconfig
 
 USE_GITLAB=	yes
 GL_ACCOUNT=	gitlab-org
 # Find the commit hash here: https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/-/tags
-GL_COMMIT=	ef1440548effec15831eda2d246dacc43233cefb
+GL_COMMIT=	f49f8a54e8a65688a749f25303479915f3029464
 
-# for go dependencies
-USE_GITHUB=	nodefault
-# generated with: make gomod-vendor
-# 39dd
-GH_TUPLE=	\
-		aws:aws-sdk-go:v1.38.35:aws_aws_sdk_go/vendor/github.com/aws/aws-sdk-go \
-		beorn7:perks:v1.0.1:beorn7_perks/vendor/github.com/beorn7/perks \
-		cespare:xxhash:v2.1.1:cespare_xxhash_v2/vendor/github.com/cespare/xxhash/v2 \
-		davecgh:go-spew:v1.1.1:davecgh_go_spew/vendor/github.com/davecgh/go-spew \
-		deoxxa:aws_signing_client:c20ee106809e:deoxxa_aws_signing_client/vendor/github.com/deoxxa/aws_signing_client \
-		go-enry:go-enry:v2.7.1:go_enry_go_enry_v2/vendor/github.com/go-enry/go-enry/v2 \
-		go-enry:go-oniguruma:v1.2.1:go_enry_go_oniguruma/vendor/github.com/go-enry/go-oniguruma \
-		go-yaml:yaml:9f266ea9e77c:go_yaml_yaml/vendor/gopkg.in/yaml.v3 \
-		golang:mod:v0.4.2:golang_mod/vendor/golang.org/x/mod \
-		golang:net:0714010a04ed:golang_net/vendor/golang.org/x/net \
-		golang:protobuf:v1.5.2:golang_protobuf/vendor/github.com/golang/protobuf \
-		golang:sys:97ca703d548d:golang_sys/vendor/golang.org/x/sys \
-		golang:text:v0.3.6:golang_text/vendor/golang.org/x/text \
-		golang:tools:v0.1.0:golang_tools/vendor/golang.org/x/tools \
-		golang:xerrors:5ec99f83aff1:golang_xerrors/vendor/golang.org/x/xerrors \
-		google:go-genproto:4a47615972c2:google_go_genproto/vendor/google.golang.org/genproto \
-		grpc-ecosystem:go-grpc-middleware:v1.3.0:grpc_ecosystem_go_grpc_middleware/vendor/github.com/grpc-ecosystem/go-grpc-middleware \
-		grpc:grpc-go:v1.38.0:grpc_grpc_go/vendor/google.golang.org/grpc \
-		hashicorp:yamux:a95892c5f864:hashicorp_yamux/vendor/github.com/hashicorp/yamux \
-		jmespath:go-jmespath:v0.4.0:jmespath_go_jmespath/vendor/github.com/jmespath/go-jmespath \
-		mailru:easyjson:1ea4449da983:mailru_easyjson/vendor/github.com/mailru/easyjson \
-		matttproud:golang_protobuf_extensions:v1.0.1:matttproud_golang_protobuf_extensions/vendor/github.com/matttproud/golang_protobuf_extensions \
-		oklog:ulid:v2.0.2:oklog_ulid_v2/vendor/github.com/oklog/ulid/v2 \
-		olivere:elastic:v6.2.24:olivere_elastic/vendor/github.com/olivere/elastic \
-		opentracing:opentracing-go:v1.2.0:opentracing_opentracing_go/vendor/github.com/opentracing/opentracing-go \
-		pkg:errors:v0.9.1:pkg_errors/vendor/github.com/pkg/errors \
-		pmezard:go-difflib:v1.0.0:pmezard_go_difflib/vendor/github.com/pmezard/go-difflib \
-		prometheus:client_golang:v1.10.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.18.0:prometheus_common/vendor/github.com/prometheus/common \
-		prometheus:procfs:v0.6.0:prometheus_procfs/vendor/github.com/prometheus/procfs \
-		protocolbuffers:protobuf-go:v1.26.0:protocolbuffers_protobuf_go/vendor/google.golang.org/protobuf \
-		sirupsen:logrus:v1.8.1:sirupsen_logrus/vendor/github.com/sirupsen/logrus \
-		stretchr:testify:v1.7.0:stretchr_testify/vendor/github.com/stretchr/testify
-
-GL_TUPLE=	gitlab-org:gitaly:00071e4ab87eaae7c4f68705613191046cd023be:gitlab_org_gitaly_v14/vendor/gitlab.com/gitlab-org/gitaly/v14 \
-		gitlab-org:labkit:397363e2404ac0276b1959373a1c1c2bc1610d67:gitlab_org_labkit/vendor/gitlab.com/gitlab-org/labkit \
-		lupine:icu:54c89d9b1ef6931b4ff61fa9f4ca645d3b86d6dc:lupine_icu/vendor/gitlab.com/lupine/icu
-
-_BUILD_DATE=	$$(date -u "+%Y-%m-%d-%H%M UTC")
+MAKE_ENV=	GOFLAGS="${GO_BUILDFLAGS}"
+# make sure to pass go build options into make process
+MAKE_ENV+=	${GO_ENV}
 
-GO_BUILDFLAGS=	-ldflags "\
-		-X 'main.Version=v${PORTVERSION}' \
-		-X 'main.BuildTime=${_BUILD_DATE}'"
-GO_TARGET=	gitlab.com/gitlab-org/${PORTNAME}
+# for go dependencies
+# Gitlab hosts there dependencies on their own platform and not on go-proxy
+# so we download the required go.mod file from gitlab
+# lines are taken from go.mk
+# ---------------------------
+FETCH_DEPENDS=	${GO_CMD}:${GO_PORT} \
+		ca_root_nss>0:security/ca_root_nss
+MASTER_SITES+=	https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/-/raw/v${DISTVERSION}/
+DISTFILES+=	go.mod
+DIST_SUBDIR=	go/${PKGORIGIN:S,/,_,g}/${DISTNAME}
+EXTRACT_ONLY+=	${DISTFILES:N*.mod\:*:N*.mod:C/:.*//}
+_USES_fetch+=	800:go-post-fetch
+go-post-fetch:
+	@${ECHO_MSG} "===> Fetching ${GO_MODNAME} dependencies";
+	@(cd ${DISTDIR}/${DIST_SUBDIR}; \
+		[ -e go.mod ] || ${RLN} ${GO_MODFILE} go.mod; \
+		${SETENV} ${GO_ENV} GOPROXY=${GO_GOPROXY} ${GO_CMD} mod download -x all)
+# ---------------------------
 
 PLIST_FILES=	bin/${PORTNAME}
 
+# add a git tag, as that is required by the build script
+pre-build:
+	cd ${WRKSRC} && \
+		git init && \
+		git config user.email "${MAINTAINER}" && \
+		git config user.name "Matthias Fechner" && \
+		git add . && \
+		git commit -m "tag" && \
+		git tag v${PORTVERSION}
+
 do-install:
-	${INSTALL_PROGRAM} ${WRKDIR}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
+	${INSTALL_PROGRAM} ${WRKSRC}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
 
 .include <bsd.port.mk>
diff --git a/textproc/gitlab-elasticsearch-indexer/distinfo b/textproc/gitlab-elasticsearch-indexer/distinfo
index 13c259b47f44..8632aab30a56 100644
--- a/textproc/gitlab-elasticsearch-indexer/distinfo
+++ b/textproc/gitlab-elasticsearch-indexer/distinfo
@@ -1,77 +1,5 @@
-TIMESTAMP = 1640123838
-SHA256 (aws-aws-sdk-go-v1.38.35_GH0.tar.gz) = 1c1cd41669e75f4225b8fda42f7500f21408d0a8575ad3665542338ba267242b
-SIZE (aws-aws-sdk-go-v1.38.35_GH0.tar.gz) = 18967606
-SHA256 (beorn7-perks-v1.0.1_GH0.tar.gz) = 98db84bb0224a26094e6adba91b7ee7a1a7ace28cb648d818f8e779e6a19f825
-SIZE (beorn7-perks-v1.0.1_GH0.tar.gz) = 10867
-SHA256 (cespare-xxhash-v2.1.1_GH0.tar.gz) = 0ee31178d2c5a1249be4e26294a2f428008dc4e1ecbbfbe47f74e41026df1148
-SIZE (cespare-xxhash-v2.1.1_GH0.tar.gz) = 9292
-SHA256 (davecgh-go-spew-v1.1.1_GH0.tar.gz) = 7d82b9bb7291adbe7498fe946920ab3e7fc9e6cbfc3b2294693fad00bf0dd17e
-SIZE (davecgh-go-spew-v1.1.1_GH0.tar.gz) = 42152
-SHA256 (deoxxa-aws_signing_client-c20ee106809e_GH0.tar.gz) = 209275015c4670eff326456edf6ac3b995a29968decae686ccdaf25013d6df72
-SIZE (deoxxa-aws_signing_client-c20ee106809e_GH0.tar.gz) = 4323
-SHA256 (go-enry-go-enry-v2.7.1_GH0.tar.gz) = 5b964e7597da0a7dbb0fdb1645f86ec025c19033b7dd6c7776f40e167246eb94
-SIZE (go-enry-go-enry-v2.7.1_GH0.tar.gz) = 3352302
-SHA256 (go-enry-go-oniguruma-v1.2.1_GH0.tar.gz) = e3c2389e61b5c1c7ee137560d645e2d82e5a119349930de35d81b91b92da81ed
-SIZE (go-enry-go-oniguruma-v1.2.1_GH0.tar.gz) = 13799
-SHA256 (go-yaml-yaml-9f266ea9e77c_GH0.tar.gz) = 63efc9aabcbb56b2c9469927784fd67ecb3a79720c4fa754c511335a04156d04
-SIZE (go-yaml-yaml-9f266ea9e77c_GH0.tar.gz) = 86898
-SHA256 (golang-mod-v0.4.2_GH0.tar.gz) = ce4131eb443ac67ededb139a43bae4fbb2c4b84843936495c6a6de92b8033917
-SIZE (golang-mod-v0.4.2_GH0.tar.gz) = 104584
-SHA256 (golang-net-0714010a04ed_GH0.tar.gz) = 62ba863366262fbbc211a65b1301f7fcf75f5f710fd979c27607af49ea51ba21
-SIZE (golang-net-0714010a04ed_GH0.tar.gz) = 1250017
-SHA256 (golang-protobuf-v1.5.2_GH0.tar.gz) = 088cc0f3ba18fb8f9d00319568ff0af5a06d8925a6e6cb983bb837b4efb703b3
-SIZE (golang-protobuf-v1.5.2_GH0.tar.gz) = 171702
-SHA256 (golang-sys-97ca703d548d_GH0.tar.gz) = 8442ec1ca5eba53626b04367d9c39bc69fb0a2ceef9a2a950e848308b4ef0b15
-SIZE (golang-sys-97ca703d548d_GH0.tar.gz) = 1253842
-SHA256 (golang-text-v0.3.6_GH0.tar.gz) = f66bebcf21985b0a713d67c6c35dfc9800d3b6d00d62b83ed0ce5b2ed4cb9760
-SIZE (golang-text-v0.3.6_GH0.tar.gz) = 8351095
-SHA256 (golang-tools-v0.1.0_GH0.tar.gz) = 88f66c1a7ff0f7fce20c0808d2769baa977f56f74197c9681cd864d0977e97a2
-SIZE (golang-tools-v0.1.0_GH0.tar.gz) = 2683055
-SHA256 (golang-xerrors-5ec99f83aff1_GH0.tar.gz) = 71975d658357e170fd6a41f92539cde8b39c9cd8bfe5931b6311bc5f5c0da0d7
-SIZE (golang-xerrors-5ec99f83aff1_GH0.tar.gz) = 13664
-SHA256 (google-go-genproto-4a47615972c2_GH0.tar.gz) = b24811e4ac7d0d46c4778cb87a4afd77f99eaf152fd43609fcb004ed1f4b98df
-SIZE (google-go-genproto-4a47615972c2_GH0.tar.gz) = 8968771
-SHA256 (grpc-ecosystem-go-grpc-middleware-v1.3.0_GH0.tar.gz) = c9b908202c05a7f821b03ee49cd678e7e71469519054629770e0565d78275cbc
-SIZE (grpc-ecosystem-go-grpc-middleware-v1.3.0_GH0.tar.gz) = 103780
-SHA256 (grpc-grpc-go-v1.38.0_GH0.tar.gz) = fd6a2e2ae9e810670fdb63d196275ddb171e7f99f3bb801a02dde973de2f557b
-SIZE (grpc-grpc-go-v1.38.0_GH0.tar.gz) = 1253222
-SHA256 (hashicorp-yamux-a95892c5f864_GH0.tar.gz) = 9468ab6cee06cee3e1883a99f5d763bd8d9111e13ce499c5f5f5a705a9979789
-SIZE (hashicorp-yamux-a95892c5f864_GH0.tar.gz) = 24397
-SHA256 (jmespath-go-jmespath-v0.4.0_GH0.tar.gz) = aa86d00b6836345eee196c13df2df084a18e0b1159935de9289f2ef6a7fe375d
-SIZE (jmespath-go-jmespath-v0.4.0_GH0.tar.gz) = 128861
-SHA256 (mailru-easyjson-1ea4449da983_GH0.tar.gz) = 8dee8a32ea94e56c90118b1ff02286bfe403ffe498274cf6aa3a08f6f5ebb8b3
-SIZE (mailru-easyjson-1ea4449da983_GH0.tar.gz) = 75475
-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 (oklog-ulid-v2.0.2_GH0.tar.gz) = d2b0dadd45201cd3385736bd5bd9c8c572e42249e713fe65dfb1e1df6870e3e3
-SIZE (oklog-ulid-v2.0.2_GH0.tar.gz) = 56670
-SHA256 (olivere-elastic-v6.2.24_GH0.tar.gz) = 35365df3873ee77e84d0ce75f4397e07b3429143ab69d8214f4d5bc9883e7517
-SIZE (olivere-elastic-v6.2.24_GH0.tar.gz) = 389800
-SHA256 (opentracing-opentracing-go-v1.2.0_GH0.tar.gz) = cb32b383422a9aae11d260657d52a3789bd799802881b9ced3ee82c370be6f76
-SIZE (opentracing-opentracing-go-v1.2.0_GH0.tar.gz) = 35914
-SHA256 (pkg-errors-v0.9.1_GH0.tar.gz) = 56bfd893023daa498508bfe161de1be83299fcf15376035e7df79cbd7d6fa608
-SIZE (pkg-errors-v0.9.1_GH0.tar.gz) = 13415
-SHA256 (pmezard-go-difflib-v1.0.0_GH0.tar.gz) = 28f3dc1b5c0efd61203ab07233f774740d3bf08da4d8153fb5310db6cea0ebda
-SIZE (pmezard-go-difflib-v1.0.0_GH0.tar.gz) = 11398
-SHA256 (prometheus-client_golang-v1.10.0_GH0.tar.gz) = e7305f84aa6553d9dd4bfd148d29289df36a9df82dae7be3c6eda62feb56f3d1
-SIZE (prometheus-client_golang-v1.10.0_GH0.tar.gz) = 176316
-SHA256 (prometheus-client_model-v0.2.0_GH0.tar.gz) = 4ab1be9cdfa702d7f49beeb09a256bcc6a2aad55e8a0a37e7732a46934264e12
-SIZE (prometheus-client_model-v0.2.0_GH0.tar.gz) = 10986
-SHA256 (prometheus-common-v0.18.0_GH0.tar.gz) = 64b0963add6f1945d8da40452d9bf796db263e4d8aba26cf17fdcc3f76b8f940
-SIZE (prometheus-common-v0.18.0_GH0.tar.gz) = 123693
-SHA256 (prometheus-procfs-v0.6.0_GH0.tar.gz) = 6ad7a23cf4db9fa5dbf2c5d8fbd0fbf5ffe48e3ddb7bf15f9359813d764ce73c
-SIZE (prometheus-procfs-v0.6.0_GH0.tar.gz) = 169898
-SHA256 (protocolbuffers-protobuf-go-v1.26.0_GH0.tar.gz) = 26218474bcf776ecf32d7d194c6bfaca8e7b4f0c087e5b595fd50fbb31409676
-SIZE (protocolbuffers-protobuf-go-v1.26.0_GH0.tar.gz) = 1270215
-SHA256 (sirupsen-logrus-v1.8.1_GH0.tar.gz) = e9492c08ac8f202b438ccfb992bf81b7860739cf8f2266958e0c574c7abfdd74
-SIZE (sirupsen-logrus-v1.8.1_GH0.tar.gz) = 47161
-SHA256 (stretchr-testify-v1.7.0_GH0.tar.gz) = 560c0984072cb436b17bbce5699b205d5aa2beb58ef7a94530d7724b5739a8d6
-SIZE (stretchr-testify-v1.7.0_GH0.tar.gz) = 91073
-SHA256 (gitlab-org-gitlab-elasticsearch-indexer-ef1440548effec15831eda2d246dacc43233cefb_GL0.tar.gz) = bd9906c629e56cc22411607fa5edeba38ded4275ddd83b56b25f1e0b2ce6aff7
-SIZE (gitlab-org-gitlab-elasticsearch-indexer-ef1440548effec15831eda2d246dacc43233cefb_GL0.tar.gz) = 79922
-SHA256 (gitlab-org-gitaly-00071e4ab87eaae7c4f68705613191046cd023be_GL0.tar.gz) = c847a4d2f5996a68fc3d58de4a5793932dd06e945f48141d4d773c0c1168e574
-SIZE (gitlab-org-gitaly-00071e4ab87eaae7c4f68705613191046cd023be_GL0.tar.gz) = 3704730
-SHA256 (gitlab-org-labkit-397363e2404ac0276b1959373a1c1c2bc1610d67_GL0.tar.gz) = e48dae8ea183f946189a9ac7e4cbe4bc0fa583e6baafb0074a3463a879565ecb
-SIZE (gitlab-org-labkit-397363e2404ac0276b1959373a1c1c2bc1610d67_GL0.tar.gz) = 171896
-SHA256 (lupine-icu-54c89d9b1ef6931b4ff61fa9f4ca645d3b86d6dc_GL0.tar.gz) = a7905e581f4efade5e173449b8703db75a82c39c9ce78ad9ba3e73c5d64d6d8d
-SIZE (lupine-icu-54c89d9b1ef6931b4ff61fa9f4ca645d3b86d6dc_GL0.tar.gz) = 12038
+TIMESTAMP = 1653646017
+SHA256 (go/textproc_gitlab-elasticsearch-indexer/gitlab-org-gitlab-elasticsearch-indexer-f49f8a54e8a65688a749f25303479915f3029464_GL0/go.mod) = 28ac3af418cab3f928bd7caf3df8cfe51244e33abf9c1535a64d214cd100f518
+SIZE (go/textproc_gitlab-elasticsearch-indexer/gitlab-org-gitlab-elasticsearch-indexer-f49f8a54e8a65688a749f25303479915f3029464_GL0/go.mod) = 623
+SHA256 (go/textproc_gitlab-elasticsearch-indexer/gitlab-org-gitlab-elasticsearch-indexer-f49f8a54e8a65688a749f25303479915f3029464_GL0/gitlab-org-gitlab-elasticsearch-indexer-f49f8a54e8a65688a749f25303479915f3029464_GL0.tar.gz) = 53d7397f512d2874efa9b3e704facf9f7f992027508f25e20936aba2c8ff1047
+SIZE (go/textproc_gitlab-elasticsearch-indexer/gitlab-org-gitlab-elasticsearch-indexer-f49f8a54e8a65688a749f25303479915f3029464_GL0/gitlab-org-gitlab-elasticsearch-indexer-f49f8a54e8a65688a749f25303479915f3029464_GL0.tar.gz) = 81018