Stuart Henderson wrote (2023-01-07 17:24 CET):
> On 2023/01/07 16:53, Stefan Hagen wrote:
> > But actually, I don't see a reason for this directory at all.
> 
> The rc script starts gitea with uid _gitea, so it doesn't have
> access to write to /var/www/run with default perms.
> 

I took me a minute to figure out that I need SUBST_VARS to make VARBASE 
work in PLIST, but now it works as intended.

I committed the bash fix already. So this is only for the socket dir.

OK?

Index: www/gitea/Makefile
===================================================================
RCS file: /cvs/ports/www/gitea/Makefile,v
retrieving revision 1.87
diff -u -p -u -p -r1.87 Makefile
--- www/gitea/Makefile  8 Jan 2023 09:21:31 -0000       1.87
+++ www/gitea/Makefile  8 Jan 2023 10:11:19 -0000
@@ -3,7 +3,7 @@ COMMENT =               compact self-hosted Git servi
 VERSION =              1.17.4
 DISTNAME =             gitea-src-${VERSION}
 PKGNAME =              gitea-${VERSION}
-REVISION =             0
+REVISION =             1
 
 MASTER_SITES =         
https://github.com/go-gitea/gitea/releases/download/v${VERSION}/
 
@@ -33,6 +33,8 @@ RUN_DEPENDS =         devel/git \
 
 ALL_TARGET =           code.gitea.io/gitea
 WRKSRC =               ${MODGO_WORKSPACE}/src/${ALL_TARGET}
+
+SUBST_VARS =           VARBASE
 
 pre-configure:
        ${SUBST_CMD} ${WRKDIST}/custom/conf/app.example.ini
Index: www/gitea/pkg/PLIST
===================================================================
RCS file: /cvs/ports/www/gitea/pkg/PLIST,v
retrieving revision 1.28
diff -u -p -u -p -r1.28 PLIST
--- www/gitea/pkg/PLIST 8 Nov 2022 11:17:16 -0000       1.28
+++ www/gitea/pkg/PLIST 8 Jan 2023 10:11:19 -0000
@@ -17,6 +17,9 @@ share/gitea/conf/app.example.ini
 @owner _gitea
 @group _gitea
 @sample ${SYSCONFDIR}/gitea/app.ini
+@mode 750
+@group daemon
+@sample ${VARBASE}/www/run/gitea/
 @mode
 @owner
 @group
@@ -1192,7 +1195,7 @@ share/gitea/templates/user/settings/secu
 @sample ${LOCALSTATEDIR}/gitea/
 @sample ${LOCALSTATEDIR}/gitea/custom/
 @sample ${LOCALSTATEDIR}/log/gitea/
-@cwd /var/www
+@cwd ${VARBASE}/www
 @mode
 @owner
 @group

Reply via email to