diff --git a/www/forgejo/Makefile b/www/forgejo/Makefile index 11ed8f5b38bb..13181d0b4382 100644 --- a/www/forgejo/Makefile +++ b/www/forgejo/Makefile @@ -1,89 +1,89 @@ PORTNAME= forgejo DISTVERSIONPREFIX= v -DISTVERSION= 10.0.3 +DISTVERSION= 11.0.1 CATEGORIES= www MASTER_SITES= https://codeberg.org/forgejo/forgejo/releases/download/${DISTVERSIONPREFIX}${DISTVERSION}/ DISTNAME= forgejo-src-${DISTVERSION} MAINTAINER= stb@lassitu.de COMMENT= Compact self-hosted Git service WWW= https://forgejo.org/ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= git:devel/git -USES= cpe gmake go:1.23,no_targets +USES= cpe gmake go:no_targets USE_RC_SUBR= forgejo CONFLICTS_INSTALL= forgejo[0-79]* EXTRACT_AFTER_ARGS= --strip-components 1 SUB_FILES= app.ini.sample pkg-message SUB_LIST= GITUSER=${USERS} NO_WRKSUBDIR= yes USERS= git GROUPS= git PORTDATA= * OPTIONS_DEFINE= BINDATA GIT_LFS PAM SQLITE OPTIONS_DEFAULT= BINDATA GIT_LFS PAM SQLITE OPTIONS_SUB= yes BINDATA_DESC= Build a single monolithic binary, with all assets included GIT_LFS_DESC= Support for Git Large File Storage (LFS) PAM_DESC= Enable support for PAM BINDATA_VARS= GO_TAGS+=bindata GIT_LFS_RUN_DEPENDS= git-lfs:devel/git-lfs PAM_VARS= GO_TAGS+=pam SQLITE_VARS= GO_TAGS+="sqlite sqlite_unlock_notify" .include .if ${OPSYS} == FreeBSD DAEMONARGS= -S -l \$${forgejo_facility} -s \$${forgejo_priority} -T \ \$${name} .else DAEMONARGS= -f .endif 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"'" MAKE_ARGS= GOPATH=${WRKDIR} \ TAGS="${GO_TAGS}" \ GOFLAGS="-buildvcs=false" ALL_TARGET= backend MAKE_JOBS_UNSAFE= yes post-patch: ${ECHO_CMD} ${DISTVERSION} >${WRKSRC}/VERSION # Too lazy to figure out why go install won't work. do-install: # Go binary is statically linked and cannot be stripped, so use # INSTALL_SCRIPT. ${INSTALL_SCRIPT} ${WRKSRC}/gitea \ ${STAGEDIR}${PREFIX}/sbin/forgejo @${MKDIR} ${STAGEDIR}${ETCDIR}/conf ${INSTALL_DATA} ${WRKDIR}/app.ini.sample \ ${STAGEDIR}${ETCDIR}/conf/app.ini.sample ${INSTALL_DATA} ${WRKSRC}/custom/conf/app.example.ini \ ${STAGEDIR}${ETCDIR}/conf/app.ini.defaults ${MKDIR} ${STAGEDIR}${DATADIR} ${MKDIR} ${STAGEDIR}/var/db/forgejo/data ${MKDIR} ${STAGEDIR}/var/db/forgejo/forgejo-repositories ${MKDIR} ${STAGEDIR}/var/log/forgejo do-install-BINDATA-off: cd ${WRKSRC} && \ ${COPYTREE_SHARE} "options public templates" ${STAGEDIR}${DATADIR} .include diff --git a/www/forgejo/distinfo b/www/forgejo/distinfo index efbe922d8464..0e31c7002884 100644 --- a/www/forgejo/distinfo +++ b/www/forgejo/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1742780434 -SHA256 (forgejo-src-10.0.3.tar.gz) = 3d1931908bd30774d5d9d9c90e44848a8f6ea57115cb386fc027efdc47271733 -SIZE (forgejo-src-10.0.3.tar.gz) = 57115818 +TIMESTAMP = 1746741570 +SHA256 (forgejo-src-11.0.1.tar.gz) = b8ae645099821e978d096888d17d7e969b05b2b7576ae1d0f4850238305fedd6 +SIZE (forgejo-src-11.0.1.tar.gz) = 55352620 diff --git a/www/forgejo/files/patch-pam b/www/forgejo/files/patch-pam new file mode 100644 index 000000000000..78e5366e887b --- /dev/null +++ b/www/forgejo/files/patch-pam @@ -0,0 +1,115 @@ +--- vendor/github.com/msteinert/pam/v2/errors.go.orig 2025-05-02 07:02: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 data +- // is not available yet. +- ErrConvAgain Error = C.PAM_CONV_AGAIN +- // ErrIncomplete indicates to please call this function again to complete +- // 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:00:00 UTC ++++ vendor/github.com/msteinert/pam/v2/errors_linux.go +@@ -0,0 +1,21 @@ ++//go:build linux ++ ++package pam ++ ++/* ++#include ++*/ ++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 data ++ // is not available yet. ++ ErrConvAgain Error = C.PAM_CONV_AGAIN ++ // ErrIncomplete indicates to please call this function again to complete ++ // 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:02: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 struct 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 struct 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:02: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 ++*/ ++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 ++)