From owner-svn-ports-head@freebsd.org Tue May 15 17:23:55 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F339EE9E7C; Tue, 15 May 2018 17:23:55 +0000 (UTC) (envelope-from feld@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 BDB888120D; Tue, 15 May 2018 17:23:54 +0000 (UTC) (envelope-from feld@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 9E9D06814; Tue, 15 May 2018 17:23:54 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w4FHNsHl084014; Tue, 15 May 2018 17:23:54 GMT (envelope-from feld@FreeBSD.org) Received: (from feld@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w4FHNrXf084006; Tue, 15 May 2018 17:23:53 GMT (envelope-from feld@FreeBSD.org) Message-Id: <201805151723.w4FHNrXf084006@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: feld set sender to feld@FreeBSD.org using -f From: Mark Felder Date: Tue, 15 May 2018 17:23:53 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r470038 - in head: . www/miniflux www/miniflux/files X-SVN-Group: ports-head X-SVN-Commit-Author: feld X-SVN-Commit-Paths: in head: . www/miniflux www/miniflux/files X-SVN-Commit-Revision: 470038 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.26 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, 15 May 2018 17:23:55 -0000 Author: feld Date: Tue May 15 17:23:53 2018 New Revision: 470038 URL: https://svnweb.freebsd.org/changeset/ports/470038 Log: www/miniflux: Improvements - Working RC script - Rename config file to .env so it's obvious what it is - Don't depend on Postgres server by default - Depend on ca_root_nss so it can actually fetch articles over HTTPS - Run as a dedicated user PR: 228275 Approved by: maintainer Added: head/www/miniflux/files/miniflux.env.sample - copied, changed from r470037, head/www/miniflux/files/miniflux.conf.sample head/www/miniflux/files/miniflux.in (contents, props changed) Deleted: head/www/miniflux/files/miniflux.conf.sample Modified: head/GIDs head/UIDs head/www/miniflux/Makefile head/www/miniflux/pkg-plist Modified: head/GIDs ============================================================================== --- head/GIDs Tue May 15 17:20:02 2018 (r470037) +++ head/GIDs Tue May 15 17:23:53 2018 (r470038) @@ -826,7 +826,7 @@ chronyd:*:849: # free: 883 # free: 884 # free: 885 -# free: 886 +miniflux:*:886: pdagent:*:887: vuls:*:888: mattermost:*:889: Modified: head/UIDs ============================================================================== --- head/UIDs Tue May 15 17:20:02 2018 (r470037) +++ head/UIDs Tue May 15 17:23:53 2018 (r470038) @@ -832,7 +832,7 @@ archiva:*:871:871::0:0:Apache Archiva Daemon:/nonexist # free: 883 # free: 884 # free: 885 -# free: 886 +miniflux:*:886:886::0:0:Miniflux:/nonexistent:/usr/sbin/nologin pdagent:*:887:887::0:0:PagerDuty Agent:/nonexistent:/usr/sbin/nologin vuls:*:888:888::0:0:VULnerability Scanner:/var/db/vuls:/usr/sbin/nologin mattermost:*:889:889::0:0:Mattermost:/usr/local/www/mattermost:/usr/sbin/nologin Modified: head/www/miniflux/Makefile ============================================================================== --- head/www/miniflux/Makefile Tue May 15 17:20:02 2018 (r470037) +++ head/www/miniflux/Makefile Tue May 15 17:23:53 2018 (r470038) @@ -2,6 +2,7 @@ PORTNAME= miniflux DISTVERSION= 2.0.5 +PORTREVISION= 1 CATEGORIES= www MAINTAINER= krion@FreeBSD.org @@ -10,16 +11,30 @@ COMMENT= Miniflux is a self-hosted software to read RS LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE +RUN_DEPENDS= ${LOCALBASE}/share/certs/ca-root-nss.crt:security/ca_root_nss + +USERS= miniflux +GROUPS= miniflux + USES= go pgsql -WANT_PGSQL= server +WANT_PGSQL= client +USE_RC_SUBR= miniflux + USE_GITHUB= yes GH_ACCOUNT= miniflux GO_PKGNAME= github.com/miniflux/${PORTNAME} +OPTIONS_DEFINE= PGSQL_SERVER +OPTIONS_DEFAULT= +PGSQL_SERVER_DESC= Install the PostgreSQL Server Component +PGSQL_SERVER_VARS= WANT_PGSQL=server + +.include + post-install: - ${INSTALL_DATA} ${FILESDIR}/miniflux.conf.sample \ + ${INSTALL_DATA} ${FILESDIR}/miniflux.env.sample \ ${STAGEDIR}${PREFIX}/etc .include Copied and modified: head/www/miniflux/files/miniflux.env.sample (from r470037, head/www/miniflux/files/miniflux.conf.sample) ============================================================================== --- head/www/miniflux/files/miniflux.conf.sample Tue May 15 17:20:02 2018 (r470037, copy source) +++ head/www/miniflux/files/miniflux.env.sample Tue May 15 17:23:53 2018 (r470038) @@ -1,3 +1,3 @@ -# See https://docs.miniflux.net/ +# See https://docs.miniflux.net/en/latest/configuration.html LISTEN_ADDR=0.0.0.0:8080 Added: head/www/miniflux/files/miniflux.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/www/miniflux/files/miniflux.in Tue May 15 17:23:53 2018 (r470038) @@ -0,0 +1,34 @@ +#!/bin/sh +# +# Author: Mark Felder +# +# $FreeBSD$ +# + +# PROVIDE: miniflux +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable miniflux: +# miniflux_enable="YES" +# miniflux_flags="" + +. /etc/rc.subr + +name="miniflux" +rcvar=miniflux_enable + +load_rc_config $name + +: ${miniflux_enable="NO"} + +# Miniflux doesn’t use any config file, only environment variables. +set -a +. %%PREFIX%%/etc/miniflux.env +set +a + +pidfile="/var/run/miniflux.pid" +command=/usr/sbin/daemon +command_args=" -p ${pidfile} -u miniflux %%PREFIX%%/bin/miniflux | /usr/bin/logger -t miniflux &" + +run_rc_command "$1" Modified: head/www/miniflux/pkg-plist ============================================================================== --- head/www/miniflux/pkg-plist Tue May 15 17:20:02 2018 (r470037) +++ head/www/miniflux/pkg-plist Tue May 15 17:23:53 2018 (r470038) @@ -1,2 +1,2 @@ bin/miniflux -@sample etc/miniflux.conf.sample +@sample etc/miniflux.env.sample