diff --git a/www/gitea/Makefile b/www/gitea/Makefile index b35eef040c15..f64f166e2fa4 100644 --- a/www/gitea/Makefile +++ b/www/gitea/Makefile @@ -1,78 +1,81 @@ PORTNAME= gitea DISTVERSIONPREFIX= v -DISTVERSION= 1.22.6 -PORTREVISION= 1 +DISTVERSION= 1.23.1 CATEGORIES= www MASTER_SITES= https://github.com/go-gitea/gitea/releases/download/${DISTVERSIONPREFIX}${DISTVERSION}/ \ https://dl.gitea.io/gitea/${DISTVERSION}/ DISTNAME= gitea-src-${DISTVERSION} MAINTAINER= stb@lassitu.de COMMENT= Compact self-hosted Git service WWW= https://gitea.io/en-US/ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= git:devel/git -USES= cpe gmake go:1.22,no_targets +USES= cpe gmake go:1.23,no_targets USE_RC_SUBR= gitea EXTRACT_AFTER_ARGS= --strip-components 1 # since 1.17.0, archive includes gitea-src-VERSION directory 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= 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 \$${gitea_facility} -s \$${gitea_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/gitea"'" LDFLAGS+= "'-X "code.gitea.io/gitea/modules/setting.AppWorkPath=${PREFIX}/share/gitea"'" 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 @${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/gitea + ${MKDIR} ${STAGEDIR}/var/db/gitea/gitea-repositories + ${MKDIR} ${STAGEDIR}/var/log/gitea do-install-BINDATA-off: cd ${WRKSRC} && ${COPYTREE_SHARE} "options public templates" ${STAGEDIR}${DATADIR} .include diff --git a/www/gitea/distinfo b/www/gitea/distinfo index 9260354fa231..4781f67ed8c4 100644 --- a/www/gitea/distinfo +++ b/www/gitea/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1734459279 -SHA256 (gitea-src-1.22.6.tar.gz) = 251a3ee97e11f288764f9e15d0163116a04f2811b9d0d3c32f46a04f90f0756e -SIZE (gitea-src-1.22.6.tar.gz) = 54465618 +TIMESTAMP = 1737883673 +SHA256 (gitea-src-1.23.1.tar.gz) = da4d36c4c9fe3980b4ba130526cf030ba7dba51d3a6844c6723a6eaef34b6df9 +SIZE (gitea-src-1.23.1.tar.gz) = 55539987 diff --git a/www/gitea/files/app.ini.sample.in b/www/gitea/files/app.ini.sample.in index 71cccbf31650..0080ed412ca4 100644 --- a/www/gitea/files/app.ini.sample.in +++ b/www/gitea/files/app.ini.sample.in @@ -1,93 +1,95 @@ # # Sample Configuration for Gitea 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 gitea binary. # # This sample configuration runs Gitea 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. +# JWT_SECRET, LFS_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 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_KEY] +# and then copy that output to the appropriate place in this file. # -# You can let Gitea add these to the config for you; you need to make -# app.ini writeable by the git user. +# Alternatively, you can let Gitea 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 %%PREFIX%%/etc/gitea/conf writeable to the git user. APP_NAME = Gitea: A self-hosted lightweight software forge RUN_MODE = prod RUN_USER = %%GITUSER%% [database] DB_TYPE = sqlite3 HOST = 127.0.0.1:3306 NAME = gitea PASSWD = PATH = /var/db/gitea/gitea.db SSL_MODE = disable USER = root [indexer] ISSUE_INDEXER_PATH = /var/db/gitea/indexers/issues.bleve [log] LEVEL = Info MODE = file ROOT_PATH = /var/log/gitea [mailer] ENABLED = false [oauth2] JWT_SECRET = CHANGE_ME [picture] AVATAR_UPLOAD_PATH = /var/db/gitea/data/avatars DISABLE_GRAVATAR = true ENABLE_FEDERATED_AVATAR = false [repository] ROOT = /var/db/gitea/gitea-repositories # Gitea's default is 'bash', so if you have bash installed, you can comment # this out. SCRIPT_TYPE = sh [repository.upload] TEMP_PATH = /var/db/gitea/data/tmp/uploads [security] INSTALL_LOCK = true INTERNAL_TOKEN = CHANGE_ME SECRET_KEY = CHANGE_ME [session] PROVIDER = file PROVIDER_CONFIG = /var/db/gitea/data/sessions [server] APP_DATA_PATH = /var/db/gitea/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/gitea/files/gitea.in b/www/gitea/files/gitea.in index 566a4b46ef93..affda78defa1 100644 --- a/www/gitea/files/gitea.in +++ b/www/gitea/files/gitea.in @@ -1,65 +1,66 @@ #!/bin/sh # PROVIDE: gitea # REQUIRE: NETWORKING SYSLOG # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable gitea: # #gitea_enable="YES" . /etc/rc.subr name="gitea" rcvar="gitea_enable" load_rc_config $name : ${gitea_user:="%%GITUSER%%"} : ${gitea_enable:="NO"} : ${gitea_configcheck_enable:="YES"} : ${gitea_facility:="daemon"} : ${gitea_priority:="info"} : ${gitea_shared:="%%PREFIX%%/share/${name}"} : ${gitea_custom:="%%PREFIX%%/etc/${name}"} command="%%PREFIX%%/sbin/${name} web" procname="%%PREFIX%%/sbin/${name}" githome="$(eval echo ~${gitea_user})" pidfile="/var/run/${name}.pid" start_cmd="${name}_start" start_precmd="${name}_prestart" gitea_start() { for d in /var/db/gitea /var/log/gitea; do if [ ! -e "$d" ]; then mkdir "$d" chown ${gitea_user} "$d" fi done /usr/sbin/daemon %%DAEMONARGS%% \ -u ${gitea_user} -p ${pidfile} \ + -l daemon -s warning \ /usr/bin/env -i \ "GITEA_WORK_DIR=${gitea_shared}" \ "GITEA_CUSTOM=${gitea_custom}" \ "HOME=${githome}" \ "PATH=%%PREFIX%%/bin:${PATH}" \ "USER=${gitea_user}" \ $command } gitea_prestart() { if checkyesno gitea_configcheck_enable; then if su -m ${gitea_user} -c "%%PREFIX%%/sbin/${name} doctor check >/dev/null"; then else echo "cannot start ${name} because of configuration errors. Run" >&2 echo " su -m git -c '${name} doctor check'" >&2 echo "for further details" return 1 fi fi } run_rc_command "$1" diff --git a/www/gitea/pkg-plist b/www/gitea/pkg-plist index 209e1c8e372c..acab89e7b63f 100644 --- a/www/gitea/pkg-plist +++ b/www/gitea/pkg-plist @@ -1,3 +1,6 @@ @sample %%ETCDIR%%/conf/app.ini.sample %%ETCDIR%%/conf/app.ini.defaults sbin/gitea +@dir(git,git,755) /var/db/gitea +@dir(git,git,755) /var/db/gitea/gitea-repositories +@dir(git,git,755) /var/log/gitea