From nobody Tue May 30 13:28:50 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QVtX22fx6z4XVb4; Tue, 30 May 2023 13:28:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QVtX21pBSz4MGl; Tue, 30 May 2023 13:28:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685453330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yviZaADZez1h98YBxfNLNdk5orOcty6yny9Tsw99EhU=; b=fIjgLXrvcKy0hrWG5/PUopqym+GvO6ls5dmuogxSP0GAZTFsFGI8vtVXfyj2QUbO7kLUHK TdHH5kny/016natHxivT1V6vnCP9XmQABorBI5suVprL7weeUBtWXk4NJzSEKcwpyiwc0t 254j9MZ5sG9tIifVqZHG4DsjKSw7/gXQcQWcb9D32Q9lyv3R+U1EfVRV75fD6Lk4uAb/Xs TqsiGF2Ob5gau5AOHOW5Z07S903wabGK9zlR2Wxfo1HgoW9IgP//Jo0cXRzGBqKkvn7bjn LEZU7gWRX+vbajRSr8Cn+kWw2XRFdVazvFcUmH0BvXrG+IukLqUQGXayKLELFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1685453330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yviZaADZez1h98YBxfNLNdk5orOcty6yny9Tsw99EhU=; b=wWzCB5T5gbbu7EHHKZ7KYvey339wAqdPx/dKw+qD84IdSHaphvGDUg65rBWaf3YJhfk76y +w0lmfbcU30mh8yO1JwxTLex6rfR8kReroxalcHsMKRb3MUC1ynXHlIVLn6epkZoGKxMQp b+woylWOUXgvEoNUXgMmJTbNJS3xd6AxGdm78rjqc6cykaT6Sh47whSOwEBr3fDV4OKYB2 t/xjqUfFM0NZnmfS2X0VZC8zG7+zHPX9Nc5FhXnM7V2ouG7bPoeNA2A/LywQAFGNyfbsft ruRwBRZPI20CzFHwGHi89XUfY0FWQKqasC4gLMBUjCFIGBFuioLrpglKzrX/Gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1685453330; a=rsa-sha256; cv=none; b=Dz4eM4rhQ3dyOuDXPn3Wsme37OEr0+K5Pj/Ze4zVUktcbwUfoJZdF2qhMy10ut02UNE3pp ljr7g2AUKVev55xNOa+ERBzpnTiym0RwRlDUnBEggEzaI/UvcWBsqfurLlWflb5Cp/D5tR mrhrIwBpl5kUQ9nb0uIUsJcyrWjw3tkG9G5rYkQ3jTjEWz48dVzehgZoHT4cH7X5REKTzp HynRAnSVXWBMqxaEONAD4Z8X6pe3PW2oENihIMkZzacZfhqod+LXcGXvmxuQ5ZcKS7ZAJY zOnxHm73ojRiuFW5m8QOCn4v+WhxLQ5utDnqd4n/9PYxpYs26iAzJyaC4VQtIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QVtX20hwYztwD; Tue, 30 May 2023 13:28:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34UDSopc051039; Tue, 30 May 2023 13:28:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34UDSoCZ051038; Tue, 30 May 2023 13:28:50 GMT (envelope-from git) Date: Tue, 30 May 2023 13:28:50 GMT Message-Id: <202305301328.34UDSoCZ051038@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Matthias Fechner Subject: git: 7cd195b1582f - main - www/gitlab-ce: simplify gitlab-pages documentation and add doce for it List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mfechner X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7cd195b1582f54938e4d9ca88cb3a09f0d9ff44b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mfechner: URL: https://cgit.FreeBSD.org/ports/commit/?id=7cd195b1582f54938e4d9ca88cb3a09f0d9ff44b commit 7cd195b1582f54938e4d9ca88cb3a09f0d9ff44b Author: Matthias Fechner AuthorDate: 2023-05-30 13:25:52 +0000 Commit: Matthias Fechner CommitDate: 2023-05-30 13:28:38 +0000 www/gitlab-ce: simplify gitlab-pages documentation and add doce for it How to configure Gitlab-Pages (currently without TLS) can be found here: https://gitlab.fechner.net/mfechner/Gitlab-docu/-/blob/master/install/16.0-freebsd.md#9-gitlab-pages I will check later if TLS configuration is even required if a TLS proxy like haproxy is in front of nginx. --- www/gitlab-ce/Makefile | 5 ++++- .../files/patch-config_gitlab.yml.example | 24 +++++++++++++++++++++- www/gitlab-pages/Makefile | 21 +++++++++++++++++-- www/gitlab-pages/files/gitlab_pages.in | 20 +++--------------- .../files/patch-gitlab-pages.conf.sample | 9 ++++++++ www/gitlab-pages/pkg-message | 3 +++ 6 files changed, 61 insertions(+), 21 deletions(-) diff --git a/www/gitlab-ce/Makefile b/www/gitlab-ce/Makefile index 559bc2adb3fa..2033b5434acf 100644 --- a/www/gitlab-ce/Makefile +++ b/www/gitlab-ce/Makefile @@ -1,5 +1,6 @@ PORTNAME= gitlab-ce PORTVERSION= 16.0.1 +PORTREVISION= 1 CATEGORIES= www devel MAINTAINER= mfechner@FreeBSD.org @@ -415,14 +416,16 @@ post-install: @${ECHO_CMD} "@dir ${WWWDIR_REL}/qa/tmp" >> ${TMPPLIST} @${ECHO_CMD} "@dir ${WWWDIR_REL}/spec/support/gitlab-git-test.git/refs/heads" >> ${TMPPLIST} @${ECHO_CMD} "@dir ${WWWDIR_REL}/spec/support/gitlab-git-test.git/refs/tags" >> ${TMPPLIST} - @${ECHO_CMD} "@dir(,,700) ${WWWDIR_REL}/shared" >> ${TMPPLIST} + @${ECHO_CMD} "@dir(,,755) ${WWWDIR_REL}/shared" >> ${TMPPLIST} @${ECHO_CMD} "@dir(,,700) ${WWWDIR_REL}/shared/artifacts" >> ${TMPPLIST} @${ECHO_CMD} "@dir(,,700) ${WWWDIR_REL}/shared/artifacts/tmp" >> ${TMPPLIST} @${ECHO_CMD} "@dir(,,700) ${WWWDIR_REL}/shared/artifacts/tmp/cache" >> ${TMPPLIST} @${ECHO_CMD} "@dir(,,700) ${WWWDIR_REL}/shared/artifacts/tmp/uploads" >> ${TMPPLIST} @${ECHO_CMD} "@dir(,,700) ${WWWDIR_REL}/shared/artifacts/tmp/work" >> ${TMPPLIST} @${ECHO_CMD} "@dir(,,770) ${WWWDIR_REL}/shared/packages" >> ${TMPPLIST} + @${ECHO_CMD} "@group gitlab-pages" >> ${TMPPLIST} @${ECHO_CMD} "@dir(,,770) ${WWWDIR_REL}/shared/pages" >> ${TMPPLIST} + @${ECHO_CMD} "@group www" >> ${TMPPLIST} @${ECHO_CMD} "@dir(,,700) ${WWWDIR_REL}/shared/terraform_state" >> ${TMPPLIST} @${ECHO_CMD} "@dir(,,700) ${WWWDIR_REL}/shared/tmp" >> ${TMPPLIST} @${ECHO_CMD} "@dir(,,700) ${WWWDIR_REL}/shared/lfs-objects" >> ${TMPPLIST} diff --git a/www/gitlab-ce/files/patch-config_gitlab.yml.example b/www/gitlab-ce/files/patch-config_gitlab.yml.example index da5cd9176063..657c39b445da 100644 --- a/www/gitlab-ce/files/patch-config_gitlab.yml.example +++ b/www/gitlab-ce/files/patch-config_gitlab.yml.example @@ -1,5 +1,27 @@ ---- config/gitlab.yml.example.orig 2023-05-18 16:48:55 UTC +--- config/gitlab.yml.example.orig 2023-05-22 18:44:12 UTC +++ config/gitlab.yml.example +@@ -456,7 +456,7 @@ production: &base + ## GitLab Pages + pages: + enabled: false +- access_control: false ++ access_control: true + # The location where pages are stored (default: shared/pages). + # path: shared/pages + +@@ -466,9 +466,9 @@ production: &base + host: example.com + port: 80 # Set to 443 if you serve the pages with HTTPS + https: false # Set to true if you serve the pages with HTTPS +- artifacts_server: true # Set to false if you want to disable online view of HTML artifacts +- # external_http: ["1.1.1.1:80", "[2001::1]:80"] # If defined, enables custom domain support in GitLab Pages +- # external_https: ["1.1.1.1:443", "[2001::1]:443"] # If defined, enables custom domain and certificate support in GitLab Pages ++ artifacts_server: false # Set to false if you want to disable online view of HTML artifacts ++ external_http: ["127.0.0.1:8090"] # If defined, enables custom domain support in GitLab Pages ++ # external_https: ["127.0.0.1:8090"] # If defined, enables custom domain and certificate support in GitLab Pages + + # File that contains the shared secret key for verifying access for gitlab-pages. + # Default is '.gitlab_pages_secret' relative to Rails.root (i.e. root of the GitLab app). @@ -1192,14 +1192,14 @@ production: &base # real path not the symlink. storages: # You must have at least a `default` storage path. diff --git a/www/gitlab-pages/Makefile b/www/gitlab-pages/Makefile index 95d35175c675..917bd3e699be 100644 --- a/www/gitlab-pages/Makefile +++ b/www/gitlab-pages/Makefile @@ -1,5 +1,6 @@ PORTNAME= gitlab-pages PORTVERSION= 16.0.1 +PORTREVISION= 1 DISTVERSIONPREFIX= v CATEGORIES= www MASTER_SITES+= https://gitlab.com/gitlab-org/gitlab-pages/-/raw/v${DISTVERSION}/ @@ -22,11 +23,27 @@ GL_COMMIT= 8cda253ced465c7c9764332d7f5210ea3c976236 GO_BUILDFLAGS= -ldflags="-X 'main.VERSION=${PORTVERSION}' -X 'main.REVISION=${GL_COMMIT}'" -PLIST_FILES= bin/gitlab-pages - USE_RC_SUBR= gitlab_pages USERS= gitlab-pages GROUPS= gitlab-pages +post-patch: + ${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" ${WRKSRC}/gitlab-pages.conf.sample + +do-install: + @${MKDIR} ${STAGEDIR}${DATADIR} + ${MKDIR} ${STAGEDIR}${DATADIR}/bin + (cd ${WRKDIR}/bin/ && ${COPYTREE_BIN} . ${STAGEDIR}${DATADIR}/bin) +.for x in gitlab-pages.conf.sample + ${INSTALL_DATA} ${WRKSRC}/${x} ${STAGEDIR}${DATADIR}/ +.endfor + +post-install: + ${FIND} -s ${STAGEDIR}${DATADIR} -not -type d | ${SORT} | \ + ${SED} -e 's#^${STAGEDIR}${PREFIX}/##' | \ + ${SED} -E -e '/sample$$/ s#^#@sample #; \ + s#${DATADIR_REL}/bin#@(,,555) ${DATADIR_REL}/bin#; ' >> ${TMPPLIST} + cat ${TMPPLIST} + .include diff --git a/www/gitlab-pages/files/gitlab_pages.in b/www/gitlab-pages/files/gitlab_pages.in index 99a19a3bad2c..f49fd4b4e6f6 100644 --- a/www/gitlab-pages/files/gitlab_pages.in +++ b/www/gitlab-pages/files/gitlab_pages.in @@ -31,6 +31,7 @@ load_rc_config $name : ${gitlab_pages_user:="gitlab-pages"} : ${gitlab_pages_group:="gitlab-pages"} : ${gitlab_pages_logfile:="/var/log/gitlab_pages.log"} +: ${gitlab_pages_args:="-config=%%PREFIX%%/share/gitlab-pages/gitlab-pages.conf"} export HOME=${gitlab_pages_dir} export PATH=${PATH}:%%PREFIX%%/bin @@ -38,24 +39,10 @@ export PATH=${PATH}:%%PREFIX%%/bin pidfile="/var/run/${name}.pid" gitlab_pages_chdir="${gitlab_pages_dir}" -procname=%%PREFIX%%/bin/gitlab-pages +procname=%%PREFIX%%/share/gitlab-pages/bin/gitlab-pages start_precmd="gitlab_pages_startprecmd" start_cmd="gitlab_pages_startcmd" -list_cmd="listfunc" -register_cmd="registerfunc" - -listfunc() -{ - cd ${gitlab_pages_chdir} ; \ - su -m ${gitlab_pages_user} -c "env HOME=${gitlab_pages_dir} %%PREFIX%%/bin/gitlab-pages list" -} - -registerfunc() -{ - cd ${gitlab_pages_chdir} ; \ - su -m ${gitlab_pages_user} -c "env HOME=${gitlab_pages_dir} %%PREFIX%%/bin/gitlab-pages register" -} gitlab_pages_startprecmd() { @@ -70,8 +57,7 @@ gitlab_pages_startprecmd() gitlab_pages_startcmd() { cd ${gitlab_pages_chdir} ; \ - daemon -u ${gitlab_pages_user} -p ${pidfile} /usr/local/bin/gitlab-pages ${gitlab_pages_args} run < /dev/null >> ${gitlab_pages_logfile} 2>> ${gitlab_pages_logfile} + daemon -u ${gitlab_pages_user} -p ${pidfile} ${procname} ${gitlab_pages_args} run < /dev/null >> ${gitlab_pages_logfile} 2>> ${gitlab_pages_logfile} } -extra_commands="list register" run_rc_command $1 diff --git a/www/gitlab-pages/files/patch-gitlab-pages.conf.sample b/www/gitlab-pages/files/patch-gitlab-pages.conf.sample new file mode 100644 index 000000000000..d73eae49370e --- /dev/null +++ b/www/gitlab-pages/files/patch-gitlab-pages.conf.sample @@ -0,0 +1,9 @@ +--- gitlab-pages.conf.sample.orig 2023-05-30 05:09:18 UTC ++++ gitlab-pages.conf.sample +@@ -0,0 +1,6 @@ ++listen-http=:8090 ++pages-root=%%PREFIX%%/www/gitlab-ce/shared/pages ++api-secret-key=%%PREFIX%%/www/gitlab-ce/.gitlab_pages_secret ++pages-domain=pages.example.com ++internal-gitlab-server=https://gitlab.example.com ++ diff --git a/www/gitlab-pages/pkg-message b/www/gitlab-pages/pkg-message new file mode 100644 index 000000000000..433068142f99 --- /dev/null +++ b/www/gitlab-pages/pkg-message @@ -0,0 +1,3 @@ +for detailed installation/configuration instruction please see e.g. here: +https://gitlab.fechner.net/mfechner/Gitlab-docu/-/blob/master/install/16.0-freebsd.md#9-gitlab-pages +