View | Details | Raw Unified | Return to bug 278876 | Differences between
and this patch

Collapse All | Expand All

(-)b/www/forgejo/Makefile (-5 / +5 lines)
Lines 1-7 Link Here
1
PORTNAME=	forgejo
1
PORTNAME=	forgejo
2
DISTVERSIONPREFIX=	v
2
DISTVERSIONPREFIX=	v
3
DISTVERSION=	1.21.10-0
3
DISTVERSION=	7.0.2
4
PORTREVISION=	1
5
CATEGORIES=	www
4
CATEGORIES=	www
6
MASTER_SITES=	https://codeberg.org/forgejo/forgejo/releases/download/${DISTVERSIONPREFIX}${DISTVERSION}/
5
MASTER_SITES=	https://codeberg.org/forgejo/forgejo/releases/download/${DISTVERSIONPREFIX}${DISTVERSION}/
7
DISTNAME=	forgejo-src-${DISTVERSION}
6
DISTNAME=	forgejo-src-${DISTVERSION}
Lines 54-63 DAEMONARGS= -f Link Here
54
SUB_LIST+=	DAEMONARGS="${DAEMONARGS}"
53
SUB_LIST+=	DAEMONARGS="${DAEMONARGS}"
55
54
56
SSP_UNSAFE=	true
55
SSP_UNSAFE=	true
57
# Default LDFLAGS are incompatible with build
56
LDFLAGS+=	"'-X "code.gitea.io/gitea/modules/setting.CustomPath=${PREFIX}/etc/forgejo"'"
58
MAKE_ENV=	LDFLAGS="${LDFLAGS} ${EXTRA_LDFLAGS}"
57
LDFLAGS+=	"'-X "code.gitea.io/gitea/modules/setting.AppWorkPath=${PREFIX}/share/forgejo"'"
59
MAKE_ARGS=	GOPATH=${WRKDIR} \
58
MAKE_ARGS=	GOPATH=${WRKDIR} \
60
		TAGS="${GO_TAGS}"
59
		TAGS="${GO_TAGS}" \
60
		GOFLAGS="-buildvcs=false"
61
ALL_TARGET=	backend
61
ALL_TARGET=	backend
62
MAKE_JOBS_UNSAFE=	yes
62
MAKE_JOBS_UNSAFE=	yes
63
63
(-)b/www/forgejo/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1712360403
1
TIMESTAMP = 1715265831
2
SHA256 (forgejo-src-1.21.10-0.tar.gz) = 0cc21835404e40355cf7125b479efebb1fecf2cc17d018d4d54521d75943caf5
2
SHA256 (forgejo-src-7.0.2.tar.gz) = 39b2079be7671f2248dcc36377ae20be65f20695d7f968ae227c0fc55dacca06
3
SIZE (forgejo-src-1.21.10-0.tar.gz) = 58820868
3
SIZE (forgejo-src-7.0.2.tar.gz) = 54862292
(-)b/www/forgejo/files/forgejo.in (-1 / +15 lines)
Lines 17-24 load_rc_config $name Link Here
17
17
18
: ${forgejo_user:="%%GITUSER%%"}
18
: ${forgejo_user:="%%GITUSER%%"}
19
: ${forgejo_enable:="NO"}
19
: ${forgejo_enable:="NO"}
20
: ${forgejo_configcheck_enable:="YES"}
20
: ${forgejo_facility:="daemon"}
21
: ${forgejo_facility:="daemon"}
21
: ${forgejo_priority:="debug"}
22
: ${forgejo_priority:="info"}
22
: ${forgejo_shared:="%%PREFIX%%/share/${name}"}
23
: ${forgejo_shared:="%%PREFIX%%/share/${name}"}
23
: ${forgejo_custom:="%%PREFIX%%/etc/${name}"}
24
: ${forgejo_custom:="%%PREFIX%%/etc/${name}"}
24
25
Lines 29-34 githome="$(eval echo ~${forgejo_user})" Link Here
29
pidfile="/var/run/${name}.pid"
30
pidfile="/var/run/${name}.pid"
30
31
31
start_cmd="${name}_start"
32
start_cmd="${name}_start"
33
start_precmd="${name}_prestart"
32
34
33
forgejo_start() {
35
forgejo_start() {
34
	for d in /var/db/forgejo /var/log/forgejo; do
36
	for d in /var/db/forgejo /var/log/forgejo; do
Lines 48-51 forgejo_start() { Link Here
48
		$command
50
		$command
49
}
51
}
50
52
53
forgejo_prestart() {
54
	if checkyesno forgejo_configcheck_enable; then
55
		if su -m ${forgejo_user} -c "%%PREFIX%%/sbin/${name} doctor check >/dev/null"; then
56
		else
57
			echo "cannot start ${name} because of configuration errors. Run" >&2
58
			echo "    su -m git -c '${name} doctor check'" >&2
59
			echo "for further details"
60
			return 1
61
		fi
62
	fi
63
}
64
51
run_rc_command "$1"
65
run_rc_command "$1"
(-)b/www/forgejo/pkg-message (-5 / +19 lines)
Lines 1-13 Link Here
1
[
1
[
2
{ type: install
2
{ type: install
3
  message: <<EOM
3
  message: <<EOM
4
Before starting forgejo you must create the main configuration file.
4
Before starting forgejo for the first time, you must set a number of
5
secrets in the configuration file. For your convenience, a sample file
6
has been copied to %%PREFIX%%/etc/forgejo/conf/app.ini.
5
7
6
    cp /usr/local/etc/forgejo/conf/app.ini.sample /usr/local/etc/forgejo/conf/app.ini
8
You need to replace every occurence of CHANGE_ME in the file with
7
    ${EDITOR} /usr/local/etc/forgejo/conf/app.ini
9
sensible values. Please refer to the official documentation at
10
https://forgejo.org for details.
11
12
You will also likely need to create directories for persistent storage.
13
Run
14
    su -m git -c 'forgejo doctor check'
15
to check if all prerequisites have been met.
8
16
9
You need to replace every occurence of CHANGE_ME in the file with sensitive
10
values. Please refer to the official documentation for details.
11
EOM
17
EOM
12
}
18
}
19
{ type: upgrade
20
  maximum_version: forgejo-1.21
21
  message: <<EOF
22
Since forgejo version 7, the startup script will run forgejo doctor check
23
to verify that forgejo can be started successfully. If you are sure that
24
forgejo will start even if doctor has identified an issue, you can disable
25
the check by setting forgejo_configcheck_enabled=NO in rc.conf.
26
EOM
13
]
27
]

Return to bug 278876