From nobody Sun May 3 13:13:02 2026 X-Original-To: dev-commits-ports-main@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 4g7lZQ5C5Gz6RXc8 for ; Sun, 03 May 2026 13:13:02 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4g7lZQ2Ln7z3xJg for ; Sun, 03 May 2026 13:13:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777813982; 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=TCaMaSrZwTy5pXL6RcxNkki0q1xI4Tb7M0heOGPUEK8=; b=rn8zHFQWo8troz7Ba5yIfm90wXIiOVDcqfD3hrFf0pA7Y99yxv1D1tKyJbAOqHF/7EQ0YY 6J1SlHvgY7S7YNNel0UST802f/wWLwsFz+BSXbXD/xKgt276pcA1llGOJ416+Ht/uqFSMy aO/idAU1wClrktIf3r3CzEmM7Qf5Vo+ZfdqHvXTuwLkZ/IoRwiz0veUEi54M8bfHRR3QE6 KJIe/5G9JcqujqOXhqdHeENIqIjabK0gvecaVGW7y/aBiq6oqDe0uyzr5HnDJOoAUSUwyf /5NVbFt7boTTsGP8QaiqD541VT9zFOENWjYIq1ECfCfRtBC7O6lqHsEUhQVdIw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1777813982; a=rsa-sha256; cv=none; b=fTWuBmX40pGmqdR2UG0ETAuM476iwUTl4NU+kO/+h6pozsOL1JUieyYXaSJWyq+nv61+hf b9AtRfzThfNlgwUGmwFkVhE/6z7bwaaG5XVMZQOTHAhiYqUnXF8PX0Iq3Jl19tZBeabMZk 0HOl7Z5GgNjGvX2kL62v4pF0WMptB6rfUH9uK8W0NE6WLWPQ4Yw+zafZwXYB0q3R1KGTKs V92+UiPSzwKQch1B8JvvulcNxf/PxvAm8Ly+Rr+0PxBoCuwqZm02lO66B+ScLRpXs/6m7+ 3umHXiqiFTrJp0pyCnCR3Ym7zproVSvANkupLSj8lsyF4A2B5ikMu3vk8Zj1Zg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1777813982; 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=TCaMaSrZwTy5pXL6RcxNkki0q1xI4Tb7M0heOGPUEK8=; b=UEb6821pIh1un+8K5AvwOgbdScR0xSKwmA20yOj49f0bkzX3qa40+DSLhSSwqWskuNTDau L6QH2+eSrVSex5Xa+x4QXrfsjm9ROBmvPPSXFvkYR1+wTwmGi5iLfQHnHVsXB7/QH0F+b1 wH887Aaz98ce88IFnBLf1BfIHU0Bcu1Skg7K5Pns0/KTelEAhT5V+vrg8ngXiRKty4g5tM 7rOamlHaiVGDyQTBdPdDeLCknZmrP/h9LhmxzM8PrGSXwpnlxXnDC9iOhWkwu5/k2+AHnx 9AsUycDtjdPW0RRdn5mqrczFsf8PQ6C+rlBb0D/+Zyywpxm0USvsIl6V+zgYBA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4g7lZQ1f9czbCs for ; Sun, 03 May 2026 13:13:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d5f8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 03 May 2026 13:13:02 +0000 To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav Subject: git: 8a651f2e690b - main - www/forgejo11: Copy from www/forgejo-lts List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8a651f2e690b8c467b1058572f1856e2501d4fa4 Auto-Submitted: auto-generated Date: Sun, 03 May 2026 13:13:02 +0000 Message-Id: <69f749de.3d5f8.69dfddea@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/ports/commit/?id=8a651f2e690b8c467b1058572f1856e2501d4fa4 commit 8a651f2e690b8c467b1058572f1856e2501d4fa4 Author: Dag-Erling Smørgrav AuthorDate: 2026-04-30 21:43:28 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-03 13:12:14 +0000 www/forgejo11: Copy from www/forgejo-lts Also deprecate since the 11 branch will be unsupported in mid-July. --- www/Makefile | 1 + www/forgejo11/Makefile | 103 ++++++++++++++++++++++++++++++++++ www/forgejo11/distinfo | 5 ++ www/forgejo11/files/app.ini.sample.in | 94 +++++++++++++++++++++++++++++++ www/forgejo11/files/forgejo.in | 67 ++++++++++++++++++++++ www/forgejo11/files/pkg-message.in | 35 ++++++++++++ www/forgejo11/pkg-descr | 5 ++ www/forgejo11/pkg-plist | 8 +++ 8 files changed, 318 insertions(+) diff --git a/www/Makefile b/www/Makefile index 073b66fbbdcc..8c7eeedc505d 100644 --- a/www/Makefile +++ b/www/Makefile @@ -210,6 +210,7 @@ SUBDIR += foreign-cdm SUBDIR += forgejo SUBDIR += forgejo-lts + SUBDIR += forgejo11 SUBDIR += formication SUBDIR += foswiki SUBDIR += free-sa-devel diff --git a/www/forgejo11/Makefile b/www/forgejo11/Makefile new file mode 100644 index 000000000000..8cff1db4b297 --- /dev/null +++ b/www/forgejo11/Makefile @@ -0,0 +1,103 @@ +PORTNAME= forgejo +DISTVERSIONPREFIX= v +DISTVERSION= 11.0.13 +PORTREVISION= 1 +CATEGORIES= www +MASTER_SITES= https://codeberg.org/forgejo/forgejo/releases/download/${DISTVERSIONFULL}/ +PKGNAMESUFFIX= ${PORTVERSION:C/([0-9]+).*/\1/} +DISTNAME= forgejo-src-${DISTVERSION} + +PATCHFILES= 9762f9ea2041d4eaf38e47415ea0692fa60cf0a7.patch:-p1 +PATCH_SITES= https://codeberg.org/forgejo/forgejo/commit/ + +MAINTAINER= des@FreeBSD.org +COMMENT= Compact self-hosted Git forge +WWW= https://forgejo.org/ + +LICENSE= GPLv3+ +LICENSE_FILE= ${WRKSRC}/LICENSE + +DEPRECATED= End of life, please switch to www/forgejo-lts +EXPIRATION_DATE= 2026-06-30 + +RUN_DEPENDS= git:devel/git + +USES= cpe gmake go:1.25+,no_targets +USE_RC_SUBR= forgejo + +PIE_UNSAFE= yes + +CONFLICTS_INSTALL= forgejo[0-9]* + +EXTRACT_AFTER_ARGS= --strip-components 1 +DBDIR= /var/db/forgejo +LOGDIR= /var/log/forgejo +SUB_FILES= app.ini.sample pkg-message +SUB_LIST= GITUSER=${USERS} DBDIR=${DBDIR} LOGDIR=${LOGDIR} +PLIST_SUB= DBDIR=${DBDIR} LOGDIR=${LOGDIR} + +NO_WRKSUBDIR= yes + +USERS= git +GROUPS= git + +# If the BINDATA option is off, we will install assets into DATADIR +# and this line ensures that they are included in the packing list. +# Otherwise, assets are compiled into the binary, DATADIR remains +# empty, and this line has no effect. +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" + +SSP_UNSAFE= true +LDFLAGS= "'-X "forgejo.org/modules/setting.CustomPath=${PREFIX}/etc/forgejo"'" \ + "'-X "forgejo.org/modules/setting.StaticRootPath=${DATADIR}"'" \ + "'-X "forgejo.org/modules/setting.AppWorkPath=${DBDIR}"'" +MAKE_ARGS= GOFLAGS="-buildvcs=false" \ + GOPATH=${WRKDIR} \ + TAGS="${GO_TAGS}" +MAKE_JOBS_UNSAFE= yes + +# The default build target builds both the frontend and the backend. +# However, release tarballs include a prebuilt frontend, so save a +# little time by explicitly building only the backend. +ALL_TARGET= backend + +# Go binaries are statically linked +STRIP= # + +DAEMONARGS= -S -l \$${forgejo_facility} -s \$${forgejo_priority} -T \ + \$${name} +SUB_LIST+= DAEMONARGS="${DAEMONARGS}" + +# The provided Makefile does not include an install target. +do-install: + ${INSTALL_PROGRAM} ${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}${DBDIR}/data + ${MKDIR} ${STAGEDIR}${DBDIR}/forgejo-repositories + ${MKDIR} ${STAGEDIR}${LOGDIR} + +# If the BINDATA option is off, install assets into DATADIR. +do-install-BINDATA-off: + ${MKDIR} ${STAGEDIR}${DATADIR} + cd ${WRKSRC} && \ + ${COPYTREE_SHARE} "options public templates" ${STAGEDIR}${DATADIR} + +.include diff --git a/www/forgejo11/distinfo b/www/forgejo11/distinfo new file mode 100644 index 000000000000..a4c4fc0b2e92 --- /dev/null +++ b/www/forgejo11/distinfo @@ -0,0 +1,5 @@ +TIMESTAMP = 1777479827 +SHA256 (forgejo-src-11.0.13.tar.gz) = aa3d0f3c95a73dc031ebc7140b48ea745d74c416632e48870cadfada0fb2b6de +SIZE (forgejo-src-11.0.13.tar.gz) = 54353217 +SHA256 (9762f9ea2041d4eaf38e47415ea0692fa60cf0a7.patch) = 2d7452de27f0f88c2fd1a713363e10b1fdc201c12522200202923e7739db6440 +SIZE (9762f9ea2041d4eaf38e47415ea0692fa60cf0a7.patch) = 3840 diff --git a/www/forgejo11/files/app.ini.sample.in b/www/forgejo11/files/app.ini.sample.in new file mode 100644 index 000000000000..f06b9819cc84 --- /dev/null +++ b/www/forgejo11/files/app.ini.sample.in @@ -0,0 +1,94 @@ +# +# Sample Configuration for Forgejo using SQLite +# +# For information on the available settings, consult the online +# documentation, or see the accompanying file app.ini.defaults, which +# contains the settings incorporated into the forgejo binary. +# +# This sample configuration runs Forgejo with a local database. Before +# running this configuration, make sure to change the INTERNAL_TOKEN, +# JWT_SECRET, and SECRET_KEY variables. SECRET_KEY is a password of your +# 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 appropriate values using: +# gitea generate secret [INTERNAL_TOKEN|JWT_SECRET|LFS_JWT_SECRET|SECRET_KEY] +# 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. +# +# There are no pre-configured users; the first user to register becomes an +# admin. In this sample configuration, the HTTP server only listens on +# localhost. +# +# If you'd rather use the web-based installer, remove this conf/app.ini file +# and make %%ETCDIR%%/conf writeable to the git user. + +APP_NAME = Forgejo: A self-hosted lightweight software forge +RUN_MODE = prod +RUN_USER = %%GITUSER%% + +[database] +DB_TYPE = sqlite3 +HOST = 127.0.0.1:3306 +NAME = forgejo +PASSWD = +PATH = %%DBDIR%%/forgejo.db +SSL_MODE = disable +USER = root + +[indexer] +ISSUE_INDEXER_PATH = %%DBDIR%%/indexers/issues.bleve + +[log] +LEVEL = Info +MODE = file +ROOT_PATH = %%LOGDIR%% + +[mailer] +ENABLED = false + +[oauth2] +JWT_SECRET = CHANGE_ME + +[picture] +AVATAR_UPLOAD_PATH = %%DBDIR%%/data/avatars +DISABLE_GRAVATAR = true +ENABLE_FEDERATED_AVATAR = false + +[repository] +ROOT = %%DBDIR%%/forgejo-repositories +# Forgejo's default is 'bash', so if you have bash installed, you can comment +# this out. +SCRIPT_TYPE = sh + +[repository.upload] +TEMP_PATH = %%DBDIR%%/data/tmp/uploads + +[security] +INSTALL_LOCK = true +INTERNAL_TOKEN = CHANGE_ME +SECRET_KEY = CHANGE_ME + +[session] +PROVIDER = file +PROVIDER_CONFIG = %%DBDIR%%/data/sessions + +[server] +APP_DATA_PATH = %%DBDIR%%/data +DISABLE_SSH = false +DOMAIN = localhost +HTTP_ADDR = 127.0.0.1 +HTTP_PORT = 3000 +OFFLINE_MODE = false +ROOT_URL = http://localhost:3000/ +SSH_DOMAIN = %(DOMAIN)s +SSH_PORT = 22 + +[service] +DISABLE_REGISTRATION = false +ENABLE_CAPTCHA = true +ENABLE_NOTIFY_MAIL = false +REGISTER_EMAIL_CONFIRM = false +REQUIRE_SIGNIN_VIEW = false diff --git a/www/forgejo11/files/forgejo.in b/www/forgejo11/files/forgejo.in new file mode 100644 index 000000000000..1d70da60532b --- /dev/null +++ b/www/forgejo11/files/forgejo.in @@ -0,0 +1,67 @@ +#!/bin/sh + +# PROVIDE: forgejo +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf to enable forgejo: +# +#forgejo_enable="YES" + +. /etc/rc.subr + +name="forgejo" +rcvar="forgejo_enable" + +load_rc_config $name + +: ${forgejo_user:="%%GITUSER%%"} +: ${forgejo_enable:="NO"} +: ${forgejo_configcheck_enable:="YES"} +: ${forgejo_facility:="daemon"} +: ${forgejo_priority:="info"} +: ${forgejo_custom:="%%PREFIX%%/etc/${name}"} + +command="%%PREFIX%%/sbin/${name} web" +procname="%%PREFIX%%/sbin/${name}" +githome="$(eval echo ~${forgejo_user})" + +pidfile="/var/run/${name}.pid" + +start_cmd="${name}_start" +start_precmd="${name}_prestart" + +forgejo_start() { + for d in %%DBDIR%% %%LOGDIR%%; do + if [ ! -e "$d" ]; then + mkdir "$d" + chown ${forgejo_user} "$d" + fi + done + /usr/sbin/daemon %%DAEMONARGS%% \ + -u ${forgejo_user} -p ${pidfile} \ + /usr/bin/env -i \ + "FORGEJO_CUSTOM=${forgejo_custom}" \ + "HOME=${githome}" \ + "PATH=%%PREFIX%%/bin:${PATH}" \ + "USER=${forgejo_user}" \ + $command +} + +forgejo_prestart() { + if checkyesno forgejo_configcheck_enable; then + if ! errstr=$(/usr/bin/env -i \ + "FORGEJO_CUSTOM=${forgejo_custom}" \ + "HOME=${githome}" \ + "PATH=%%PREFIX%%/bin:${PATH}" \ + "USER=${forgejo_user}" \ + /usr/bin/su -m ${forgejo_user} -c \ + "%%PREFIX%%/sbin/${name} doctor check" 2>&1); then + rc=$? + echo "$errstr" >&2 + return $rc + fi + fi +} + +run_rc_command "$1" diff --git a/www/forgejo11/files/pkg-message.in b/www/forgejo11/files/pkg-message.in new file mode 100644 index 000000000000..17b47fd6688b --- /dev/null +++ b/www/forgejo11/files/pkg-message.in @@ -0,0 +1,35 @@ +[ +{ type: install + message: <