Index: head/www/gitea/Makefile =================================================================== --- head/www/gitea/Makefile (revision 542494) +++ head/www/gitea/Makefile (revision 542495) @@ -1,80 +1,78 @@ # $FreeBSD$ PORTNAME= gitea DISTVERSIONPREFIX= v -DISTVERSION= 1.11.8 +DISTVERSION= 1.12.2 CATEGORIES= www MASTER_SITES= https://github.com/go-gitea/gitea/releases/download/${DISTVERSIONPREFIX}${DISTVERSION}/ DISTNAME= gitea-src-${DISTVERSION} -NO_WRKSUBDIR= yes MAINTAINER= stb@lassitu.de COMMENT= Compact self-hosted Git service LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE RUN_DEPENDS= git:devel/git USES= gmake go:no_targets USE_RC_SUBR= gitea +NO_WRKSUBDIR= yes +PORTDATA= * SUB_FILES+= app.ini.sample SUB_LIST+= GITUSER=${USERS} USERS= git GROUPS= git 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 -# use sane defaults for path, overriden with actual PREFIX in start script -EXTRA_LDFLAGS= -X code.gitea.io/gitea/modules/setting.CustomPath=${PREFIX}/etc/gitea -EXTRA_LDFLAGS+= -X code.gitea.io/gitea/modules/setting.AppWorkPath=${PREFIX}/share/gitea # Default LDFLAGS are incompatible with build MAKE_ENV= LDFLAGS="${LDFLAGS} ${EXTRA_LDFLAGS}" MAKE_ARGS= GOPATH=${WRKDIR} TAGS="${GO_TAGS}" 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.ini.sample ${STAGEDIR}${ETCDIR}/conf/app.ini.defaults @${MKDIR} ${STAGEDIR}${DESTDIR}/var/db/${PORTNAME} @${MKDIR} ${STAGEDIR}${DESTDIR}/var/log/${PORTNAME} @${MKDIR} ${STAGEDIR}${DESTDIR}/var/run/${PORTNAME} do-install-BINDATA-off: cd ${WRKSRC} && ${COPYTREE_SHARE} "options public templates" ${STAGEDIR}${DATADIR} .include Index: head/www/gitea/distinfo =================================================================== --- head/www/gitea/distinfo (revision 542494) +++ head/www/gitea/distinfo (revision 542495) @@ -1,3 +1,3 @@ -TIMESTAMP = 1593337278 -SHA256 (gitea-src-1.11.8.tar.gz) = f4f965bd8f7da9320b6693c249eab07ff8baf5ef81649fd9025133f91391bab8 -SIZE (gitea-src-1.11.8.tar.gz) = 68927493 +TIMESTAMP = 1595065693 +SHA256 (gitea-src-1.12.2.tar.gz) = 695dae81327bdfaa4adaa9d3dc9d2bdcb78d54ac73abac3a630750465858ff8b +SIZE (gitea-src-1.12.2.tar.gz) = 135139394 Index: head/www/gitea/files/patch-vendor_github.com_go-git_go-git_v5_storage_filesystem_dotgit_dotgit.go =================================================================== --- head/www/gitea/files/patch-vendor_github.com_go-git_go-git_v5_storage_filesystem_dotgit_dotgit.go (revision 542494) +++ head/www/gitea/files/patch-vendor_github.com_go-git_go-git_v5_storage_filesystem_dotgit_dotgit.go (nonexistent) @@ -1,38 +0,0 @@ -# This patch fixes a bug where attempting to view branches with a / in the name -# would return an HTTP 500 Internal Server Error. The underlying issue ended up -# being that go-git implicitly relied on read() of a dirfd to succeed, so for a -# branch named "stable/11" it would stop and assume "stable" was the ref, but it -# was really just a directory. - -# This patch was accepted upstream here: -# https://github.com/go-git/go-git/pull/39 -# go-gitea is expected to merge it when go-git creates a new release for them to -# import, and this patch can silently go away as soon as it conflicts. - ---- vendor/github.com/go-git/go-git/v5/storage/filesystem/dotgit/dotgit.go.orig 2020-04-01 17:02:04 UTC -+++ vendor/github.com/go-git/go-git/v5/storage/filesystem/dotgit/dotgit.go -@@ -57,6 +57,9 @@ var ( - // targeting a non-existing object. This usually means the repository - // is corrupt. - ErrSymRefTargetNotFound = errors.New("symbolic reference target not found") -+ // ErrIsDir is returned when a reference file is attempting to be read, -+ // but the path specified is a directory. -+ ErrIsDir = errors.New("reference path is a directory") - ) - - // Options holds configuration for the storage. -@@ -926,6 +929,14 @@ func (d *DotGit) addRefFromHEAD(refs *[]*plumbing.Refe - - func (d *DotGit) readReferenceFile(path, name string) (ref *plumbing.Reference, err error) { - path = d.fs.Join(path, d.fs.Join(strings.Split(name, "/")...)) -+ st, err := d.fs.Stat(path) -+ if err != nil { -+ return nil, err -+ } -+ if st.IsDir() { -+ return nil, ErrIsDir -+ } -+ - f, err := d.fs.Open(path) - if err != nil { - return nil, err Property changes on: head/www/gitea/files/patch-vendor_github.com_go-git_go-git_v5_storage_filesystem_dotgit_dotgit.go ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/www/gitea/files/gitea.in =================================================================== --- head/www/gitea/files/gitea.in (revision 542494) +++ head/www/gitea/files/gitea.in (revision 542495) @@ -1,46 +1,47 @@ #!/bin/sh # # $FreeBSD$ # # 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_facility:="daemon"} : ${gitea_priority:="debug"} : ${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" gitea_start() { /usr/sbin/daemon %%DAEMONARGS%% \ -u ${gitea_user} -p ${pidfile} \ /usr/bin/env -i \ "GITEA_WORK_DIR=${gitea_shared}" \ - "GITEA_CUSTOM=%%PREFIX%%/etc/${name}" \ + "GITEA_CUSTOM=${gitea_custom}" \ "HOME=${githome}" \ "PATH=%%PREFIX%%/bin:${PATH}" \ "USER=${gitea_user}" \ $command } run_rc_command "$1" Index: head/www/gitea/pkg-message =================================================================== --- head/www/gitea/pkg-message (revision 542494) +++ head/www/gitea/pkg-message (revision 542495) @@ -1,12 +1,12 @@ [ -{ type: install +{ type: upgrade maximum_version: 1.7.6 message: <