Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Oct 2017 07:55:33 +0000 (UTC)
From:      Tobias Kortkamp <tobik@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r453097 - in head/www/gitea: . files
Message-ID:  <201710290755.v9T7tXW3034774@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tobik
Date: Sun Oct 29 07:55:33 2017
New Revision: 453097
URL: https://svnweb.freebsd.org/changeset/ports/453097

Log:
  www/gitea: Fix rc script on FreeBSD 10.x/11.0
  
  On FreeBSD 10.x/11.0 daemon(8) doesn't have -s,-l,-t, so starting
  gitea would fail.  We partially revert the change from r453018 and use
  the old behavior on these versions and don't log stdout/stderr to
  syslog.
  
  PR:		223283
  Approved by:	stb@lassitu.de (maintainer)

Modified:
  head/www/gitea/Makefile
  head/www/gitea/files/gitea.in

Modified: head/www/gitea/Makefile
==============================================================================
--- head/www/gitea/Makefile	Sun Oct 29 07:46:31 2017	(r453096)
+++ head/www/gitea/Makefile	Sun Oct 29 07:55:33 2017	(r453097)
@@ -4,6 +4,7 @@
 PORTNAME=	gitea
 PORTVERSION=	1.2.2
 DISTVERSIONPREFIX=	v
+PORTREVISION=	1
 CATEGORIES=	www
 
 MAINTAINER=	stb@lassitu.de
@@ -32,13 +33,22 @@ GROUPS=		git
 OPTIONS_DEFINE=	CERT PAM SQLITE
 CERT_DESC=	Automatic creation of self-signed certificates
 PAM_DESC=	Authentication using PAM
-SQLITE=		Add SQLite as database backend
 
 OPTIONS_DEFAULT=	${OPTIONS_DEFINE}
 
 CERT_VARS=	GO_TAGS+=cert
 PAM_VARS=	GO_TAGS+=pam
 SQLITE_VARS=	GO_TAGS+=sqlite
+
+.include <bsd.port.options.mk>
+
+.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1100513
+DAEMONARGS=	-S -l \$${gitea_facility} -s \$${gitea_priority} -t \$${name}
+.else
+DAEMONARGS=	-f
+.endif
+
+SUB_LIST+=	DAEMONARGS="${DAEMONARGS}"
 
 post-patch:
 	# Gitea releases don't supply the release version number; the

Modified: head/www/gitea/files/gitea.in
==============================================================================
--- head/www/gitea/files/gitea.in	Sun Oct 29 07:46:31 2017	(r453096)
+++ head/www/gitea/files/gitea.in	Sun Oct 29 07:55:33 2017	(r453097)
@@ -32,8 +32,8 @@ pidfile="/var/run/${name}.pid"
 start_cmd="${name}_start"
 
 gitea_start() {
-	/usr/sbin/daemon -l ${gitea_facility} -s ${gitea_priority} \
-		-u ${gitea_user} -p ${pidfile} -t "${command}" \
+	/usr/sbin/daemon %%DAEMONARGS%% \
+		-u ${gitea_user} -p ${pidfile} \
 		/usr/bin/env -i \
 		"GITEA_WORK_DIR=${gitea_shared}" \
 		"GITEA_CUSTOM=%%PREFIX%%/etc/${name}" \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201710290755.v9T7tXW3034774>