Re: git: 25356383b9bd - main - www/forgejo: Update 11.0.1 => 11.0.2

From: Cy Schubert <Cy.Schubert_at_cschubert.com>
Date: Sun, 22 Jun 2025 13:43:18 UTC
In message <202506212159.55LLxP0a066610@gitrepo.freebsd.org>, Vladimir 
Druzenko
 writes:
> The branch main has been updated by vvd:
>
> URL: https://cgit.FreeBSD.org/ports/commit/?id=25356383b9bdf25b8c7db5258d595a
> a83a4e39d6
>
> commit 25356383b9bdf25b8c7db5258d595aa83a4e39d6
> Author:     Stefan Bethke <stb@lassitu.de>
> AuthorDate: 2025-06-21 21:48:41 +0000
> Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
> CommitDate: 2025-06-21 21:59:01 +0000
>
>     www/forgejo: Update 11.0.1 => 11.0.2
>     
>     Release notes:
>     https://codeberg.org/forgejo/forgejo/src/branch/forgejo/release-notes-pub
> lished/11.0.2.md
>     
>     Also "fast-fix" rc script:
>       Command error: stat /usr/local/sbin/custom/conf/app.ini: no such file o
> r directory
>       cannot start forgejo because of configuration errors. Run
>           su -m git -c 'forgejo doctor check'
>       for further details
>     
>     PR:     287010
> ---
>  www/forgejo/Makefile                |   7 +--
>  www/forgejo/distinfo                |   6 +-
>  www/forgejo/files/app.ini.sample.in |   5 +-
>  www/forgejo/files/forgejo.in        |   3 +-
>  www/forgejo/files/patch-pam         | 115 ----------------------------------
> --
>  5 files changed, 11 insertions(+), 125 deletions(-)
>
> diff --git a/www/forgejo/Makefile b/www/forgejo/Makefile
> index ffc9ae4c1ee5..a54af4448ce2 100644
> --- a/www/forgejo/Makefile
> +++ b/www/forgejo/Makefile
> @@ -1,7 +1,6 @@
>  PORTNAME=	forgejo
>  DISTVERSIONPREFIX=	v
> -DISTVERSION=	11.0.1
> -PORTREVISION=	1
> +DISTVERSION=	11.0.2
>  CATEGORIES=	www
>  MASTER_SITES=	https://codeberg.org/forgejo/forgejo/releases/download/
> ${DISTVERSIONPREFIX}${DISTVERSION}/
>  DISTNAME=	forgejo-src-${DISTVERSION}
> @@ -56,8 +55,8 @@ DAEMONARGS=	-f
>  SUB_LIST+=	DAEMONARGS="${DAEMONARGS}"
>  
>  SSP_UNSAFE=	true
> -LDFLAGS+=	"'-X "code.gitea.io/gitea/modules/setting.CustomPath=${PREFIX}/
> etc/forgejo"'"
> -LDFLAGS+=	"'-X "code.gitea.io/gitea/modules/setting.AppWorkPath=${PREFIX}
> /share/forgejo"'"
> +LDFLAGS+=	"'-X "forgejo.org/modules/setting.CustomPath=${PREFIX}/etc/forg
> ejo"'" \
> +		"'-X "forgejo.org/modules/setting.AppWorkPath=${PREFIX}/share/f
> orgejo"'"
>  MAKE_ARGS=	GOPATH=${WRKDIR} \
>  		TAGS="${GO_TAGS}" \
>  		GOFLAGS="-buildvcs=false"
> diff --git a/www/forgejo/distinfo b/www/forgejo/distinfo
> index 0e31c7002884..bc1a84164f32 100644
> --- a/www/forgejo/distinfo
> +++ b/www/forgejo/distinfo
> @@ -1,3 +1,3 @@
> -TIMESTAMP = 1746741570
> -SHA256 (forgejo-src-11.0.1.tar.gz) = b8ae645099821e978d096888d17d7e969b05b2b
> 7576ae1d0f4850238305fedd6
> -SIZE (forgejo-src-11.0.1.tar.gz) = 55352620
> +TIMESTAMP = 1750496838
> +SHA256 (forgejo-src-11.0.2.tar.gz) = de6646704769ae69e80feeb8aef0ae6fffad846
> 02fc2d003a49c903e36f9d06d
> +SIZE (forgejo-src-11.0.2.tar.gz) = 55477978
> diff --git a/www/forgejo/files/app.ini.sample.in b/www/forgejo/files/app.ini.
> sample.in
> index d625a9ebabab..b54e756578be 100644
> --- a/www/forgejo/files/app.ini.sample.in
> +++ b/www/forgejo/files/app.ini.sample.in
> @@ -11,8 +11,9 @@
>  # choosing, INTERNAL_TOKEN is a 64-byte random number in BASE64 encoding,
>  # JWT_SECRET is a 32-byte random number in BASE64 encoding.
>  #
> -# You can generate the token using for example:
> -#   openssl rand -base64 64
> +# You can generate appropriate values using:
> +#   gitea generate secret [INTERNAL_TOKEN|JWT_SECRET|LFS_JWT_SECRET|SECRET_K
> EY]
> +# and then copy that output to the appropriate place in this file.
>  #
>  # You can let Forgejo add these to the config for you; you need to make
>  # app.ini writeable by the git user.
> diff --git a/www/forgejo/files/forgejo.in b/www/forgejo/files/forgejo.in
> index 2879239c7d68..026fed82b0b2 100644
> --- a/www/forgejo/files/forgejo.in
> +++ b/www/forgejo/files/forgejo.in
> @@ -52,7 +52,8 @@ forgejo_start() {
>  
>  forgejo_prestart() {
>  	if checkyesno forgejo_configcheck_enable; then
> -		if su -m ${forgejo_user} -c "%%PREFIX%%/sbin/${name} doctor che
> ck >/dev/null"; then
> +		if su -m ${forgejo_user} -c "FORGEJO_CUSTOM=${forgejo_custom} \
> +			%%PREFIX%%/sbin/${name} doctor check >/dev/null"; then
>  		else
>  			echo "cannot start ${name} because of configuration err
> ors. Run" >&2
>  			echo "    su -m git -c '${name} doctor check'" >&2
> diff --git a/www/forgejo/files/patch-pam b/www/forgejo/files/patch-pam
> deleted file mode 100644
> index 78e5366e887b..000000000000
> --- a/www/forgejo/files/patch-pam
> +++ /dev/null
> @@ -1,115 +0,0 @@
> ---- vendor/github.com/msteinert/pam/v2/errors.go.orig	2025-05-02 07:0
> 2:58 UTC
> -+++ vendor/github.com/msteinert/pam/v2/errors.go
> -@@ -77,15 +77,6 @@ const (
> - 	ErrAuthtokExpired Error = C.PAM_AUTHTOK_EXPIRED
> - 	// ErrModuleUnknown indicates a module is not known.
> - 	ErrModuleUnknown Error = C.PAM_MODULE_UNKNOWN
> --	// ErrBadItem indicates a bad item passed to pam_*_item().
> --	ErrBadItem Error = C.PAM_BAD_ITEM
> --	// ErrConvAgain indicates a conversation function is event driven and d
> ata
> --	// is not available yet.
> --	ErrConvAgain Error = C.PAM_CONV_AGAIN
> --	// ErrIncomplete indicates to please call this function again to comple
> te
> --	// authentication stack. Before calling again, verify that conversation
> --	// is completed.
> --	ErrIncomplete Error = C.PAM_INCOMPLETE
> - )
> - 
> - // Error returns the error message for the given status.
> ---- vendor/github.com/msteinert/pam/v2/errors_linux.go.orig	1970-01-01 00:0
> 0:00 UTC
> -+++ vendor/github.com/msteinert/pam/v2/errors_linux.go
> -@@ -0,0 +1,21 @@
> -+//go:build linux
> -+
> -+package pam
> -+
> -+/*
> -+#include <security/pam_appl.h>
> -+*/
> -+import "C"
> -+
> -+// Pam Return types
> -+const (
> -+	// ErrBadItem indicates a bad item passed to pam_*_item().
> -+	ErrBadItem Error = C.PAM_BAD_ITEM
> -+	// ErrConvAgain indicates a conversation function is event driven and d
> ata
> -+	// is not available yet.
> -+	ErrConvAgain Error = C.PAM_CONV_AGAIN
> -+	// ErrIncomplete indicates to please call this function again to comple
> te
> -+	// authentication stack. Before calling again, verify that conversation
> -+	// is completed.
> -+	ErrIncomplete Error = C.PAM_INCOMPLETE
> -+)
> ---- vendor/github.com/msteinert/pam/v2/transaction.c.orig	2025-05-02 07:0
> 2:58 UTC
> -+++ vendor/github.com/msteinert/pam/v2/transaction.c
> -@@ -47,15 +47,30 @@ void init_pam_conv(struct pam_conv *conv, uintptr_t ap
> - 	conv->appdata_ptr = (void *)appdata;
> - }
> - 
> -+#ifdef OPENPAM
> -+int pam_start_confdir(const char *service_name, const char *user, const str
> uct pam_conv *pam_conversation,
> -+		      const char *confdir, pam_handle_t **pamh)
> -+{
> -+	if (pamh != NULL)
> -+		*pamh = NULL;
> -+
> -+	return PAM_SYSTEM_ERR;
> -+}
> -+#else
> - // pam_start_confdir is a recent PAM api to declare a confdir (mostly for
> - // tests) weaken the linking dependency to detect if it’s present.
> - int pam_start_confdir(const char *service_name, const char *user, const str
> uct pam_conv *pam_conversation,
> - 		      const char *confdir, pam_handle_t **pamh) __attribute__((
> weak));
> -+#endif
> - 
> - int check_pam_start_confdir(void)
> - {
> -+#ifdef OPENPAM
> -+	return 1;
> -+#else
> - 	if (pam_start_confdir == NULL)
> - 		return 1;
> - 
> - 	return 0;
> -+#endif
> - }
> ---- vendor/github.com/msteinert/pam/v2/transaction.go.orig	2025-05-02 07:0
> 2:58 UTC
> -+++ vendor/github.com/msteinert/pam/v2/transaction.go
> -@@ -257,14 +257,6 @@ const (
> - 	Ruser Item = C.PAM_RUSER
> - 	// UserPrompt is the string use to prompt for a username.
> - 	UserPrompt Item = C.PAM_USER_PROMPT
> --	// FailDelay is the app supplied function to override failure delays.
> --	FailDelay Item = C.PAM_FAIL_DELAY
> --	// Xdisplay is the X display name
> --	Xdisplay Item = C.PAM_XDISPLAY
> --	// Xauthdata is the X server authentication data.
> --	Xauthdata Item = C.PAM_XAUTHDATA
> --	// AuthtokType is the type for pam_get_authtok
> --	AuthtokType Item = C.PAM_AUTHTOK_TYPE
> - )
> - 
> - // SetItem sets a PAM information item.
> ---- vendor/github.com/msteinert/pam/v2/transaction_linux.go.orig	1970-01
> -01 00:00:00 UTC
> -+++ vendor/github.com/msteinert/pam/v2/transaction_linux.go
> -@@ -0,0 +1,20 @@
> -+//go:build linux
> -+
> -+package pam
> -+
> -+/*
> -+#include <security/pam_appl.h>
> -+*/
> -+import "C"
> -+
> -+// PAM Item types.
> -+const (
> -+	// FailDelay is the app supplied function to override failure delays.
> -+	FailDelay Item = C.PAM_FAIL_DELAY
> -+	// Xdisplay is the X display name
> -+	Xdisplay Item = C.PAM_XDISPLAY
> -+	// Xauthdata is the X server authentication data.
> -+	Xauthdata Item = C.PAM_XAUTHDATA
> -+	// AuthtokType is the type for pam_get_authtok
> -+	AuthtokType Item = C.PAM_AUTHTOK_TYPE
> -+)
>

Buiding under poudriere results in this:

=======================<phase: build          >============================
===== env: NO_DEPENDS=yes USER=nobody UID=65534 GID=65534
===>  Building for forgejo-11.0.2
go: downloading go1.24.3 (freebsd/amd64)
go: download go1.24.3: golang.org/toolchain@v0.0.1-go1.24.3.freebsd-amd64: 
Get "https://proxy.golang.org/golang.org/toolchain/@v/v0.0.1-go1.24.3.freebs
d-amd64.zip": dial tcp: lookup proxy.golang.org on 10.1.1.91:53: write udp 
127.0.0.1:58068->10.1.1.91:53: write: can't assign requested address
go: downloading go1.24.3 (freebsd/amd64)
go: download go1.24.3: golang.org/toolchain@v0.0.1-go1.24.3.freebsd-amd64: 
Get "https://proxy.golang.org/golang.org/toolchain/@v/v0.0.1-go1.24.3.freebs
d-amd64.zip": dial tcp: lookup proxy.golang.org on 10.1.1.91:53: write udp 
127.0.0.1:62086->10.1.1.91:53: write: can't assign requested address
gmake: /bin/go: No such file or directory
go: downloading go1.24.3 (freebsd/amd64)
go: download go1.24.3: golang.org/toolchain@v0.0.1-go1.24.3.freebsd-amd64: 
Get "https://proxy.golang.org/golang.org/toolchain/@v/v0.0.1-go1.24.3.freebs
d-amd64.zip": dial tcp: lookup proxy.golang.org on 10.1.1.91:53: write udp 
127.0.0.1:23519->10.1.1.91:53: write: can't assign requested address
/bin/sh: /bin/go: not found
Forgejo requires Go 1.24 or greater to build. You can get it at 
https://go.dev/dl/
gmake: *** [Makefile:288: go-check] Error 1
*** Error code 1

Stop.
make: stopped making "build" in /usr/ports/www/forgejo


-- 
Cheers,
Cy Schubert <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  https://FreeBSD.org
NTP:           <cy@nwtime.org>    Web:  https://nwtime.org

			e**(i*pi)+1=0