svn commit: r470038 - in head: . www/miniflux www/miniflux/files
Mark Felder
feld at FreeBSD.org
Tue May 15 17:23:55 UTC 2018
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 at 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 <bsd.port.options.mk>
+
post-install:
- ${INSTALL_DATA} ${FILESDIR}/miniflux.conf.sample \
+ ${INSTALL_DATA} ${FILESDIR}/miniflux.env.sample \
${STAGEDIR}${PREFIX}/etc
.include <bsd.port.mk>
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 <feld at FreeBSd.org>
+#
+# $FreeBSD$
+#
+
+# PROVIDE: miniflux
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+# Add the following lines to /etc/rc.conf to enable miniflux:
+# miniflux_enable="YES"
+# miniflux_flags="<set as needed>"
+
+. /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
- at sample etc/miniflux.conf.sample
+ at sample etc/miniflux.env.sample
More information about the svn-ports-all
mailing list