Date: Sun, 03 May 2026 13:13:06 +0000 From: Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav <des@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 4c26b0e0169a - main - www/forgejo: Convert to metaport and bump to 15 Message-ID: <69f749e2.3ec6a.43d3e822@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by des: URL: https://cgit.FreeBSD.org/ports/commit/?id=4c26b0e0169a1be8e675a386db7d1ed9f04a5c00 commit 4c26b0e0169a1be8e675a386db7d1ed9f04a5c00 Author: Dag-Erling Smørgrav <des@FreeBSD.org> AuthorDate: 2026-05-02 13:49:28 +0000 Commit: Dag-Erling Smørgrav <des@FreeBSD.org> CommitDate: 2026-05-03 13:12:15 +0000 www/forgejo: Convert to metaport and bump to 15 --- www/forgejo/Makefile | 96 ++----------------------------------- www/forgejo/distinfo | 3 -- www/forgejo/files/app.ini.sample.in | 94 ------------------------------------ www/forgejo/files/forgejo.in | 67 -------------------------- www/forgejo/files/pkg-message.in | 35 -------------- www/forgejo/pkg-plist | 8 ---- 6 files changed, 3 insertions(+), 300 deletions(-) diff --git a/www/forgejo/Makefile b/www/forgejo/Makefile index 6c57812aeb81..8f8cf992fdc9 100644 --- a/www/forgejo/Makefile +++ b/www/forgejo/Makefile @@ -1,103 +1,13 @@ PORTNAME= forgejo -DISTVERSIONPREFIX= v -DISTVERSION= 14.0.5 +PORTVERSION= 15 CATEGORIES= www -MASTER_SITES= https://codeberg.org/forgejo/forgejo/releases/download/${DISTVERSIONFULL}/ -DISTNAME= forgejo-src-${DISTVERSION} MAINTAINER= des@FreeBSD.org COMMENT= Compact self-hosted Git forge WWW= https://forgejo.org/ -LICENSE= GPLv3+ -LICENSE_FILE= ${WRKSRC}/LICENSE +RUN_DEPENDS= forgejo${PORTVERSION}>=0:www/forgejo${PORTVERSION} -RUN_DEPENDS= git:devel/git - -USES= cpe gmake go:1.25+,no_targets -USE_RC_SUBR= forgejo - -PIE_UNSAFE= yes - -CONFLICTS_INSTALL= forgejo-lts forgejo7 - -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= # - -.include <bsd.port.options.mk> - -.if ${OPSYS} == FreeBSD -DAEMONARGS= -S -l \$${forgejo_facility} -s \$${forgejo_priority} -T \ - \$${name} -.else -DAEMONARGS= -f -.endif -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 -.if ! ${PORT_OPTIONS:MBINDATA} - ${MKDIR} ${STAGEDIR}${DATADIR} -.endif - ${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: - cd ${WRKSRC} && \ - ${COPYTREE_SHARE} "options public templates" ${STAGEDIR}${DATADIR} +USES= metaport .include <bsd.port.mk> diff --git a/www/forgejo/distinfo b/www/forgejo/distinfo deleted file mode 100644 index 8291e1221ed0..000000000000 --- a/www/forgejo/distinfo +++ /dev/null @@ -1,3 +0,0 @@ -TIMESTAMP = 1777479557 -SHA256 (forgejo-src-14.0.5.tar.gz) = c5324571b1b8ef9d3ff954cd9372c37b0e0cabc902d2624ec6cbd8649d56e30d -SIZE (forgejo-src-14.0.5.tar.gz) = 48132807 diff --git a/www/forgejo/files/app.ini.sample.in b/www/forgejo/files/app.ini.sample.in deleted file mode 100644 index f06b9819cc84..000000000000 --- a/www/forgejo/files/app.ini.sample.in +++ /dev/null @@ -1,94 +0,0 @@ -# -# 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/forgejo/files/forgejo.in b/www/forgejo/files/forgejo.in deleted file mode 100644 index 1d70da60532b..000000000000 --- a/www/forgejo/files/forgejo.in +++ /dev/null @@ -1,67 +0,0 @@ -#!/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/forgejo/files/pkg-message.in b/www/forgejo/files/pkg-message.in deleted file mode 100644 index 17b47fd6688b..000000000000 --- a/www/forgejo/files/pkg-message.in +++ /dev/null @@ -1,35 +0,0 @@ -[ -{ type: install - message: <<EOM -Before starting forgejo for the first time, you must set a number of -secrets in the configuration file. For your convenience, a sample file -has been copied to %%PREFIX%%/etc/forgejo/conf/app.ini. - -You need to replace every occurence of CHANGE_ME in the file with -sensible values. Please refer to the official documentation at -https://forgejo.org for details. - -You will also likely need to create directories for persistent storage. -Run - su -m git -c 'forgejo doctor check' -to check if all prerequisites have been met. -EOM -} -{ type: upgrade - maximum_version: "1.21" - message: <<EOM -Since forgejo version 7, the startup script will run forgejo doctor check -to verify that forgejo can be started successfully. If you are sure that -forgejo will start even if doctor has identified an issue, you can disable -the check by setting forgejo_configcheck_enabled=NO in rc.conf. -EOM -} -{ type: upgrade - maximum_version: "8.0.2" - message: <<EOM -Breaking changes: upgrading from Forgejo 8 changes the semantics of some -authentication, breaking previously working API calls. Please see the -release notes for details: https://codeberg.org/forgejo/forgejo/milestone/7235 -EOM -} -] diff --git a/www/forgejo/pkg-plist b/www/forgejo/pkg-plist deleted file mode 100644 index a6868351c92f..000000000000 --- a/www/forgejo/pkg-plist +++ /dev/null @@ -1,8 +0,0 @@ -@sample %%ETCDIR%%/conf/app.ini.sample -%%ETCDIR%%/conf/app.ini.defaults -sbin/forgejo -%%NO_BINDATA%%@dir %%DATADIR%% -@dir(git,git,755) %%DBDIR%% -@dir(git,git,755) %%DBDIR%%/data -@dir(git,git,755) %%DBDIR%%/forgejo-repositories -@dir(git,git,755) %%LOGDIR%%home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69f749e2.3ec6a.43d3e822>
