From owner-svn-ports-head@freebsd.org Tue Jan 9 19:41:38 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCC5AE6D71A; Tue, 9 Jan 2018 19:41:38 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8BE216CEB1; Tue, 9 Jan 2018 19:41:38 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BD8B51B592; Tue, 9 Jan 2018 19:41:37 +0000 (UTC) (envelope-from pi@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w09Jfb7C064522; Tue, 9 Jan 2018 19:41:37 GMT (envelope-from pi@FreeBSD.org) Received: (from pi@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w09JfbiR064519; Tue, 9 Jan 2018 19:41:37 GMT (envelope-from pi@FreeBSD.org) Message-Id: <201801091941.w09JfbiR064519@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pi set sender to pi@FreeBSD.org using -f From: Kurt Jaeger Date: Tue, 9 Jan 2018 19:41:37 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r458562 - in head/devel/gogs: . files X-SVN-Group: ports-head X-SVN-Commit-Author: pi X-SVN-Commit-Paths: in head/devel/gogs: . files X-SVN-Commit-Revision: 458562 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jan 2018 19:41:38 -0000 Author: pi Date: Tue Jan 9 19:41:37 2018 New Revision: 458562 URL: https://svnweb.freebsd.org/changeset/ports/458562 Log: devel/gogs: fix rc.d script status and file commit history pagination PR: 224614 Submitted by: Dmitri Goutnik (maintainer), Douglas Thrift Added: head/devel/gogs/files/patch-routes_repo_commit.go (contents, props changed) Modified: head/devel/gogs/Makefile head/devel/gogs/files/gogs-service.in Modified: head/devel/gogs/Makefile ============================================================================== --- head/devel/gogs/Makefile Tue Jan 9 19:16:16 2018 (r458561) +++ head/devel/gogs/Makefile Tue Jan 9 19:41:37 2018 (r458562) @@ -3,7 +3,7 @@ PORTNAME= gogs DISTVERSIONPREFIX= v DISTVERSION= 0.11.34 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel www MAINTAINER= dg@syrec.org Modified: head/devel/gogs/files/gogs-service.in ============================================================================== --- head/devel/gogs/files/gogs-service.in Tue Jan 9 19:16:16 2018 (r458561) +++ head/devel/gogs/files/gogs-service.in Tue Jan 9 19:41:37 2018 (r458562) @@ -26,20 +26,17 @@ load_rc_config ${name} : ${%%PORTNAME%%_enable="NO"} : ${%%PORTNAME%%_config="%%ETCDIR%%/conf/app.ini"} +logfile=/var/log/%%PORTNAME%%.log +pidfile=/var/run/%%PORTNAME%%.pid +command="/usr/bin/true" +procname="/usr/sbin/daemon" + is_process_running() { - local pidfile=$1 - [ -f $pidfile ] && procstat `cat $pidfile` >/dev/null 2>&1 + [ -f $pidfile ] && procstat $(cat $pidfile) >/dev/null 2>&1 } -stop_daemon() { - # assume PID is also PGID (daemon(8) PID is always PGID) - [ -f "$1" ] && kill -- -$(cat $1) -} - %%PORTNAME%%_start() { - local logfile=/var/log/%%PORTNAME%%.log - local pidfile=/var/run/%%PORTNAME%%.pid - if is_process_running $pidfile; then + if is_process_running; then echo "%%PORTNAME%% is already running (pid=$(cat $pidfile))" return 1 fi @@ -49,7 +46,7 @@ stop_daemon() { chmod 640 $logfile cd %%PREFIX%%/libexec/%%PORTNAME%% /usr/sbin/daemon -P $pidfile -u %%GOGS_USER%% %%PREFIX%%/libexec/%%PORTNAME%%/%%PORTNAME%% web --config ${%%PORTNAME%%_config} >>$logfile 2>&1 - if is_process_running $pidfile; then + if is_process_running; then echo "started %%PORTNAME%% (pid=$(cat $pidfile))" else echo "failed to start %%PORTNAME%%" @@ -57,15 +54,13 @@ stop_daemon() { } %%PORTNAME%%_stop() { - local pidfile=/var/run/%%PORTNAME%%.pid - if is_process_running $pidfile; then - echo "stopping %%PORTNAME%% (pid=$(cat $pidfile))" - stop_daemon $pidfile + if is_process_running; then + local pid=$(cat $pidfile) + echo "stopping %%PORTNAME%% (pid=$pid)" + kill -- -$pid else echo "%%PORTNAME%% isn't running" fi } - -command="/usr/bin/true" run_rc_command "$1" Added: head/devel/gogs/files/patch-routes_repo_commit.go ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/gogs/files/patch-routes_repo_commit.go Tue Jan 9 19:41:37 2018 (r458562) @@ -0,0 +1,10 @@ +--- routes/repo/commit.go.orig 2017-12-31 13:07:52 UTC ++++ routes/repo/commit.go +@@ -45,6 +44,7 @@ func RenderIssueLinks(oldCommits *list.L + func renderCommits(c *context.Context, filename string) { + c.Data["Title"] = c.Tr("repo.commits.commit_history") + " ยท " + c.Repo.Repository.FullName() + c.Data["PageIsCommits"] = true ++ c.Data["FileName"] = filename + + page := c.QueryInt("page") + if page < 1 {