pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/gitea gitea: let the RC script work unprivileged



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4fd16d0b7f63
branches:  trunk
changeset: 769646:4fd16d0b7f63
user:      khorben <khorben%pkgsrc.org@localhost>
date:      Thu Nov 18 02:45:29 2021 +0000

description:
gitea: let the RC script work unprivileged

This takes advantage of the introduction of the SYSCONFBASE variable.
Tested on NetBSD/amd64.

While there, also fix a couple substitutions in the default configuration file
(app.ini).

Bumps PKGREVISION.

diffstat:

 www/gitea/Makefile             |  6 +++---
 www/gitea/files/app.ini.sample |  2 +-
 www/gitea/files/gitea.sh       |  8 ++++++--
 3 files changed, 10 insertions(+), 6 deletions(-)

diffs (55 lines):

diff -r 282ec4db0223 -r 4fd16d0b7f63 www/gitea/Makefile
--- a/www/gitea/Makefile        Thu Nov 18 02:39:25 2021 +0000
+++ b/www/gitea/Makefile        Thu Nov 18 02:45:29 2021 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.60 2021/11/05 20:02:49 bsiegert Exp $
+# $NetBSD: Makefile,v 1.61 2021/11/18 02:45:29 khorben Exp $
 
 DISTNAME=      gitea-1.13.4
-PKGREVISION=   10
+PKGREVISION=   11
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=go-gitea/}
 CATEGORIES=    www
 GITHUB_TAG=    v${PKGVERSION_NOREV}
@@ -74,7 +74,7 @@
 SUBST_STAGE.fix-var=   pre-configure
 SUBST_MESSAGE.fix-var= Replace some vars
 SUBST_FILES.fix-var=   ${WRKDIR}/app.ini.sample
-SUBST_VARS.fix-var=    VARBASE GITEA_USER
+SUBST_VARS.fix-var=    PKG_SYSCONFDIR VARBASE GITEA_USER
 
 CONF_FILES_PERMS+=     ${EGDIR}/app.ini.sample ${PKG_SYSCONFDIR}/conf/app.ini \
                        ${GITEA_USER} ${GITEA_GROUP} 0600
diff -r 282ec4db0223 -r 4fd16d0b7f63 www/gitea/files/app.ini.sample
--- a/www/gitea/files/app.ini.sample    Thu Nov 18 02:39:25 2021 +0000
+++ b/www/gitea/files/app.ini.sample    Thu Nov 18 02:45:29 2021 +0000
@@ -17,7 +17,7 @@
 # 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.
+# and make @PKG_SYSCONFDIR@/gitea/conf writeable to the @GITEA_USER@ user.
 
 APP_NAME = Gitea: Git with a cup of tea
 RUN_USER = @GITEA_USER@
diff -r 282ec4db0223 -r 4fd16d0b7f63 www/gitea/files/gitea.sh
--- a/www/gitea/files/gitea.sh  Thu Nov 18 02:39:25 2021 +0000
+++ b/www/gitea/files/gitea.sh  Thu Nov 18 02:45:29 2021 +0000
@@ -1,11 +1,15 @@
 #!@RCD_SCRIPTS_SHELL@
 #
-# $NetBSD: gitea.sh,v 1.3 2021/03/01 23:47:09 khorben Exp $
+# $NetBSD: gitea.sh,v 1.4 2021/11/18 02:45:29 khorben Exp $
 #
 # PROVIDE: gitea
 # REQUIRE: DAEMON
+#
+# You will need to set some variables in @SYSCONFBASE@/rc.conf to start gitea:
+#
+# gitea=YES
 
-. /etc/rc.subr
+$_rc_subr_loaded . @SYSCONFBASE@/rc.subr
 
 name="gitea"
 rcvar=${name}



Home | Main Index | Thread Index | Old Index