diff --git a/devel/gitaly/Makefile b/devel/gitaly/Makefile index b2e53bd7ed65..d45e5514ddc6 100644 --- a/devel/gitaly/Makefile +++ b/devel/gitaly/Makefile @@ -1,99 +1,99 @@ PORTNAME= gitaly -DISTVERSION= 15.1.4 +DISTVERSION= 15.2.0 DISTVERSIONPREFIX= v PORTREVISION= 0 CATEGORIES= devel MAINTAINER= mfechner@FreeBSD.org COMMENT= Smart reverse proxy for GitLab LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE # Make sure the following patch is included: # https://gitlab.com/gitlab-org/gitaly/-/merge_requests/4108 # it fixes segfaults reported here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259848 # define dependencies that are required for build and run under MY_DEPENDS MY_DEPENDS= git>=2.36.1:devel/git \ rubygem-bundler>=2.1.4:sysutils/rubygem-bundler \ rubygem-rugged>=1.2<2:devel/rubygem-rugged \ - rubygem-github-linguist>=7.12.1<8:textproc/rubygem-github-linguist \ + rubygem-github-linguist>=7.20<8:textproc/rubygem-github-linguist \ rubygem-gitlab-markup>=1.8.0<1.9.0:textproc/rubygem-gitlab-markup \ rubygem-activesupport61>=6.1.4.7<6.1.7:devel/rubygem-activesupport61 \ rubygem-rdoc>=6.3.2<7.0:devel/rubygem-rdoc \ rubygem-gitlab-gollum-lib>=4.2.7.10.gitlab.2<4.2.8:www/rubygem-gitlab-gollum-lib \ rubygem-gitlab-gollum-rugged_adapter>=0.4.4.4.gitlab.1<0.4.5.0:www/rubygem-gitlab-gollum-rugged_adapter \ rubygem-grpc142>=1.42.0.pre1<2:net/rubygem-grpc142 \ rubygem-sentry-raven>=3.0<4:devel/rubygem-sentry-raven \ rubygem-faraday1>=1.0.1<2:www/rubygem-faraday1 \ rubygem-rbtrace>=0.4.14:devel/rubygem-rbtrace \ - rubygem-gitlab-labkit>=0.22.0<0.24:devel/rubygem-gitlab-labkit \ + rubygem-gitlab-labkit>=0.23.0<1:devel/rubygem-gitlab-labkit \ rubygem-licensee>=9.14.1<9.15:devel/rubygem-licensee \ rubygem-google-protobuf319>=3.19.0<3.20:devel/rubygem-google-protobuf319 \ rubygem-gitlab-license_finder>=6.14.2.1<7:devel/rubygem-gitlab-license_finder BUILD_DEPENDS= gem:devel/ruby-gems \ bash>0:shells/bash \ ${MY_DEPENDS} RUN_DEPENDS= ${MY_DEPENDS} \ gitlab-shell>=13.22.1:devel/gitlab-shell LIB_DEPENDS= libgit2.so:devel/libgit2 USES= cpe gmake go:modules,no_targets pkgconfig USE_RUBY= yes CPE_VENDOR= gitlab MAKE_ENV= GOFLAGS="${GO_BUILDFLAGS}" # make sure to pass go build options into make process MAKE_ENV+= ${GO_ENV} USE_GITLAB= yes GL_ACCOUNT= gitlab-org # Find this here: https://gitlab.com/gitlab-org/gitaly/-/tags -GL_COMMIT= bde9c15df3104aad76ad7b919954718ac81c3b1f +GL_COMMIT= 91f52100ffca75bb08e295d34da3a02a46c5df78 # 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/gitaly/-/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) # --------------------------- post-patch: ${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" ${WRKSRC}/config.toml.example ${MV} ${WRKSRC}/config.toml.example ${WRKSRC}/config.toml.sample pre-build: (cd ${WRKSRC}/ruby && ${RM} Gemfile.lock && bundle install --local) do-install: ${MKDIR} ${STAGEDIR}${DATADIR} ${MKDIR} ${STAGEDIR}${DATADIR}/bin ${FIND} ${WRKSRC} -name '*.orig' -delete ${FIND} ${WRKSRC} -name "Gemfile.lock" -delete (cd ${WRKSRC}/_build/bin/ && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/bin && \ cd ${WRKSRC} && ${COPYTREE_SHARE} config.toml.sample ${STAGEDIR}${DATADIR}) && \ cd ${WRKSRC}/ruby && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/ruby post-install: ${FIND} -s ${STAGEDIR}${DATADIR} -not -type d | ${SORT} | \ ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' | \ ${SED} -E -e '/sample$$/ s#^#@sample #; \ /gitlab-shell-hook$$/ s#^#@(,,755) #; \ s#${DATADIR_REL}/ruby/bin#@(,,555) ${DATADIR_REL}/ruby/bin#; \ s#${DATADIR_REL}/bin#@(,,555) ${DATADIR_REL}/bin#; ' >> ${TMPPLIST} .include diff --git a/devel/gitaly/distinfo b/devel/gitaly/distinfo index bd69c12139c3..bfbc5da7f6b0 100644 --- a/devel/gitaly/distinfo +++ b/devel/gitaly/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1659071493 -SHA256 (go/devel_gitaly/gitlab-org-gitaly-bde9c15df3104aad76ad7b919954718ac81c3b1f_GL0/go.mod) = da3660541474ccb9c6cbe923f17450ae26a1d3c4465b9125281ff4361a7cb45b -SIZE (go/devel_gitaly/gitlab-org-gitaly-bde9c15df3104aad76ad7b919954718ac81c3b1f_GL0/go.mod) = 2054 -SHA256 (go/devel_gitaly/gitlab-org-gitaly-bde9c15df3104aad76ad7b919954718ac81c3b1f_GL0/gitlab-org-gitaly-bde9c15df3104aad76ad7b919954718ac81c3b1f_GL0.tar.gz) = 7ee9ffecf947e5b3c2f5418d0ce525da7997ca83173aa61768a5f217247f4c97 -SIZE (go/devel_gitaly/gitlab-org-gitaly-bde9c15df3104aad76ad7b919954718ac81c3b1f_GL0/gitlab-org-gitaly-bde9c15df3104aad76ad7b919954718ac81c3b1f_GL0.tar.gz) = 3940027 +TIMESTAMP = 1658817992 +SHA256 (go/devel_gitaly/gitlab-org-gitaly-91f52100ffca75bb08e295d34da3a02a46c5df78_GL0/go.mod) = dc003dfe788c03dfd145369d4d81321f1306df51dac7289a6491dc84e25b2bbc +SIZE (go/devel_gitaly/gitlab-org-gitaly-91f52100ffca75bb08e295d34da3a02a46c5df78_GL0/go.mod) = 9144 +SHA256 (go/devel_gitaly/gitlab-org-gitaly-91f52100ffca75bb08e295d34da3a02a46c5df78_GL0/gitlab-org-gitaly-91f52100ffca75bb08e295d34da3a02a46c5df78_GL0.tar.gz) = f3be6247359252ccad7dbb67c18819213310488842c7370d84766d8e2e40783a +SIZE (go/devel_gitaly/gitlab-org-gitaly-91f52100ffca75bb08e295d34da3a02a46c5df78_GL0/gitlab-org-gitaly-91f52100ffca75bb08e295d34da3a02a46c5df78_GL0.tar.gz) = 4001229 diff --git a/devel/gitaly/files/patch-Makefile b/devel/gitaly/files/patch-Makefile index cf5e2865e049..5394a42fc0b5 100644 --- a/devel/gitaly/files/patch-Makefile +++ b/devel/gitaly/files/patch-Makefile @@ -1,51 +1,51 @@ ---- Makefile.orig 2022-06-21 10:12:22 UTC +--- Makefile.orig 2022-07-21 13:59:14 UTC +++ Makefile -@@ -235,7 +235,7 @@ TEST_REPO_GIT := ${TEST_REPO_DIR}/gitlab-git-test. +@@ -247,7 +247,7 @@ TEST_REPO_GIT := ${TEST_REPO_DIR}/gitlab-git-test. BENCHMARK_REPO := ${TEST_REPO_DIR}/benchmark.git - # All executables provided by Gitaly --GITALY_EXECUTABLES = $(addprefix ${BUILD_DIR}/bin/,$(notdir $(shell find ${SOURCE_DIR}/cmd -mindepth 1 -maxdepth 1 -type d -print)) gitaly-git2go-v14) -+GITALY_EXECUTABLES = $(addprefix ${BUILD_DIR}/bin/,$(notdir $(shell find ${SOURCE_DIR}/cmd -mindepth 1 -maxdepth 1 -type d -print)) ) + # All executables provided by Gitaly. +-GITALY_EXECUTABLES = $(addprefix ${BUILD_DIR}/bin/,$(notdir $(shell find ${SOURCE_DIR}/cmd -mindepth 1 -maxdepth 1 -type d -print)) gitaly-git2go-v14) ++GITALY_EXECUTABLES = $(addprefix ${BUILD_DIR}/bin/,$(notdir $(shell find ${SOURCE_DIR}/cmd -mindepth 1 -maxdepth 1 -type d -print)) ) + # All executables packed inside the Gitaly binary. + GITALY_PACKED_EXECUTABLES = $(filter %gitaly-hooks %gitaly-git2go-v15 %gitaly-ssh %gitaly-lfs-smudge, ${GITALY_EXECUTABLES}) # Find all Go source files. - find_go_sources = $(shell find ${SOURCE_DIR} -type d \( -name ruby -o -name vendor -o -name testdata -o -name '_*' -o -path '*/proto/go/gitalypb' \) -prune -o -type f -name '*.go' -not -name '*.pb.go' -print | sort -u) - -@@ -497,7 +497,6 @@ libgit2: ${LIBGIT2_INSTALL_DIR}/lib/libgit2.a +@@ -533,7 +533,6 @@ libgit2: ${LIBGIT2_INSTALL_DIR}/lib/libgit2.a # step. Both Omnibus and CNG assume it is in the Gitaly root, not in # _build. Hence the '../' in front. ${SOURCE_DIR}/.ruby-bundle: ${GITALY_RUBY_DIR}/Gemfile.lock ${GITALY_RUBY_DIR}/Gemfile - ${Q}cd ${GITALY_RUBY_DIR} && bundle install ${Q}touch $@ ${SOURCE_DIR}/NOTICE: ${BUILD_DIR}/NOTICE -@@ -548,7 +547,7 @@ ${BUILD_DIR}/bin/%: ${BUILD_DIR}/intermediate/% | ${BU +@@ -584,7 +583,7 @@ ${BUILD_DIR}/bin/%: ${BUILD_DIR}/intermediate/% | ${BU @ # This fallback is unique but non-deterministic, making it sufficient to avoid generating the @ # GNU build-id from the empty string and causing guaranteed collisions. ${Q}GO_BUILD_ID=$$(go tool buildid "$<" || openssl rand -hex 32) && \ - GNU_BUILD_ID=$$(echo $$GO_BUILD_ID | sha1sum | cut -d' ' -f1) && \ + GNU_BUILD_ID=$$(echo $$GO_BUILD_ID | sha1 | cut -d' ' -f1) && \ if test "${OS}" = "Linux"; then \ go run "${SOURCE_DIR}"/tools/replace-buildid \ -input "$<" -input-build-id "${TEMPORARY_BUILD_ID}" \ -@@ -560,22 +559,11 @@ ${BUILD_DIR}/bin/%: ${BUILD_DIR}/intermediate/% | ${BU - ${BUILD_DIR}/intermediate/gitaly: GO_BUILD_TAGS = ${SERVER_BUILD_TAGS} +@@ -597,22 +596,11 @@ ${BUILD_DIR}/intermediate/gitaly: GO_BUILD_ + ${BUILD_DIR}/intermediate/gitaly: ${GITALY_PACKED_EXECUTABLES} ${BUILD_DIR}/intermediate/praefect: GO_BUILD_TAGS = ${SERVER_BUILD_TAGS} ${BUILD_DIR}/intermediate/gitaly-git2go-v15: GO_BUILD_TAGS = ${GIT2GO_BUILD_TAGS} -${BUILD_DIR}/intermediate/gitaly-git2go-v15: libgit2 ${BUILD_DIR}/intermediate/%: .FORCE @ # We're building intermediate binaries first which contain a fixed build ID @ # of "TEMP_GITALY_BUILD_ID". In the final binary we replace this build ID with @ # the computed build ID for this binary. ${Q}go build -o "$@" -ldflags '-B 0x${TEMPORARY_BUILD_ID} ${GO_LDFLAGS}' -tags "${GO_BUILD_TAGS}" $(addprefix ${SOURCE_DIR}/cmd/,$(@F)) - -# This target is required for backwards compatibility during zero-downtime -# upgrades and can be removed when v15.0 has been released. -${BUILD_DIR}/intermediate/gitaly-git2go-v14: GO_BUILD_TAGS = ${GIT2GO_BUILD_TAGS} -${BUILD_DIR}/intermediate/gitaly-git2go-v14: libgit2 -${BUILD_DIR}/intermediate/gitaly-git2go-v14: .FORCE - @ # gitaly-git2go-v14 pulls directly from a commit sha so that the gitaly-git2go-v14 - @ # binary can continue to be installed for the sake of zero downtime - @ # upgrades. - ${Q}GOBIN="$(dir $@)" go install -ldflags '-B 0x${TEMPORARY_BUILD_ID} ${GO_LDFLAGS}' -tags "${GO_BUILD_TAGS}" "gitlab.com/gitlab-org/gitaly/v14/cmd/gitaly-git2go-v14@c7c7c936c302ab435a0a56fbc19cfbd9bea0c835" # This is a build hack to avoid excessive rebuilding of targets. Instead of # depending on the Makefile, we start to depend on tool versions as defined in diff --git a/devel/gitaly/files/patch-ruby_Gemfile b/devel/gitaly/files/patch-ruby_Gemfile index a4f633b918c9..cacfa5d52e14 100644 --- a/devel/gitaly/files/patch-ruby_Gemfile +++ b/devel/gitaly/files/patch-ruby_Gemfile @@ -1,39 +1,33 @@ ---- ruby/Gemfile.orig 2022-06-21 10:12:22 UTC +--- ruby/Gemfile.orig 2022-07-21 13:59:14 UTC +++ ruby/Gemfile -@@ -2,8 +2,8 @@ source 'https://rubygems.org' +@@ -1,9 +1,9 @@ + source 'https://rubygems.org' gem 'rugged', '~> 1.2' - gem 'github-linguist', '~> 7.12', require: 'linguist' +-gem 'github-linguist', '~> 7.20.0', require: 'linguist' -gem 'gitlab-markup', '~> 1.7.1' -gem 'activesupport', '~> 6.1.4.7' ++gem 'github-linguist', '~> 7.20', require: 'linguist' +gem 'gitlab-markup', '~> 1.8.0' +gem 'activesupport', '~> 6.1.4' gem 'rdoc', '~> 6.0' gem 'gitlab-gollum-lib', '~> 4.2.7.10.gitlab.2', require: false gem 'gitlab-gollum-rugged_adapter', '~> 0.4.4.4.gitlab.1', require: false -@@ -13,24 +13,13 @@ gem 'faraday', '~> 1.0' - gem 'rbtrace', require: false - - # Labkit provides observability functionality --gem 'gitlab-labkit', '~> 0.21.1' -+gem 'gitlab-labkit', '~> 0.23.0' - - # Detects the open source license the repository includes - # This version needs to be in sync with GitLab CE/EE +@@ -20,17 +20,6 @@ gem 'gitlab-labkit', '~> 0.23' gem 'licensee', '~> 9.14.1' gem 'google-protobuf', '~> 3.19.0' - -group :development, :test do - gem 'rubocop', '~> 0.69', require: false - gem 'rspec', require: false - gem 'rspec-parameterized', require: false - gem 'timecop', require: false - gem 'factory_bot', require: false - gem 'pry', '~> 0.12.2', require: false - - gem 'grpc-tools', '~> 1.42.0' -end # Gems required in omnibus-gitlab pipeline group :development, :test, :omnibus do