diff --git a/www/forgejo/Makefile b/www/forgejo/Makefile index 1b2111c3be11..92df5e9e5661 100644 --- a/www/forgejo/Makefile +++ b/www/forgejo/Makefile @@ -1,90 +1,90 @@ PORTNAME= forgejo DISTVERSIONPREFIX= v -DISTVERSION= 13.0.1 +DISTVERSION= 13.0.2 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= MIT LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= git:devel/git -USES= cpe gmake go:no_targets +USES= cpe gmake go:1.25,no_targets USE_RC_SUBR= forgejo PIE_UNSAFE= yes -CONFLICTS_INSTALL= forgejo[0-79]* +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 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.AppWorkPath=${DATADIR}"'" MAKE_ARGS= GOFLAGS="-buildvcs=false" \ GOPATH=${WRKDIR} \ TAGS="${GO_TAGS}" ALL_TARGET= backend MAKE_JOBS_UNSAFE= yes .include .if ${OPSYS} == FreeBSD DAEMONARGS= -S -l \$${forgejo_facility} -s \$${forgejo_priority} -T \ \$${name} .else DAEMONARGS= -f .endif SUB_LIST+= DAEMONARGS="${DAEMONARGS}" # 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}${DBDIR}/data ${MKDIR} ${STAGEDIR}${DBDIR}/forgejo-repositories ${MKDIR} ${STAGEDIR}${LOGDIR} 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 4c444383e3ce..ec6731f34bd8 100644 --- a/www/forgejo/distinfo +++ b/www/forgejo/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1761217700 -SHA256 (forgejo-src-13.0.1.tar.gz) = 98cb495cd07881d90aa32cf143facef4abba2b732684ab1d938af9fa3ab12f26 -SIZE (forgejo-src-13.0.1.tar.gz) = 55449730 +TIMESTAMP = 1761594542 +SHA256 (forgejo-src-13.0.2.tar.gz) = 6731d5e73a025c1a04aba0f84caf80886d5be0031f4c154ac63026e7fe30918a +SIZE (forgejo-src-13.0.2.tar.gz) = 55481937 diff --git a/www/forgejo/files/forgejo.in b/www/forgejo/files/forgejo.in index 516f63862e60..1474bd63438a 100644 --- a/www/forgejo/files/forgejo.in +++ b/www/forgejo/files/forgejo.in @@ -1,66 +1,67 @@ #!/bin/sh # PROVIDE: forgejo # REQUIRE: NETWORKING SYSLOG # 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_shared:="%%PREFIX%%/share/${name}"} : ${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_WORK_DIR=${forgejo_shared}" \ "FORGEJO_CUSTOM=${forgejo_custom}" \ "HOME=${githome}" \ "PATH=%%PREFIX%%/bin:${PATH}" \ "USER=${forgejo_user}" \ $command } forgejo_prestart() { if checkyesno forgejo_configcheck_enable; 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 errors. Run" >&2 - echo " su -m git -c '${name} doctor check'" >&2 - echo "for further details" - return 1 + 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"