Subject: [RFC PATCH] community/miniflux: provide runtime directory

From: Jan “Khardix” Staněk <[email-masked]>
Date: Sun, 21 Feb 2021 07:53:38 -0800

Miniflux has the ability to listen on Unix socket;
it has to be placed into directory
that is writable by miniflux user
and readable by others.

The service now creates suitable directory on start if configured to do so.
Suggested path is provided as commented-out variable in conf.d file.

Signed-off-by: Jan “Khardix” Staněk <[email-masked]>
---
 community/miniflux/APKBUILD       | 6 +++---
 community/miniflux/miniflux.confd | 1 +
 community/miniflux/miniflux.initd | 1 +
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/community/miniflux/APKBUILD b/community/miniflux/APKBUILD
index 4004a855d2..67c9a6cfd5 100644
--- a/community/miniflux/APKBUILD
+++ b/community/miniflux/APKBUILD
@@ -2,7 +2,7 @@
 # Maintainer: Frédéric Guillot <[email-masked]>
 pkgname=miniflux
 pkgver=2.0.28
-pkgrel=0
+pkgrel=1
 pkgdesc="Minimalist and opionated feed reader"
 url="https://miniflux.app/"
 arch="all !mips64" # limited by go
@@ -40,7 +40,7 @@ package() {
 }

 sha512sums="0a370c252d723f2519938904a3bfd5212ce6c5df76c4222a2306d71c99282429672bb8998b18e239308e555bf49c62c7bd864dd07f11668e2830b7de82e9a58b
 miniflux-2.0.28.tar.gz
-31d3d5928d1021cdd276868f1c66414a24e644965d4140cf4412b6dabd102e7e310195b14543eeb4040f0399b6faffafed2b1c8d95ce52fa9824ecfb2d71dd22
 miniflux.initd
-a1fca92e9005b9c8c80310060b0c23d91c435ef57d12c138d7f4a6ffb6a23ebc9bfc76e963385dfd4f9cef4ea1c7009521595f621617e56eae6efd3e54670d56
 miniflux.confd
+58cb9d3cdbe372a3085f82cb538d193f5dbf9082309b0a772756a2bc2e569bca1ef939490e1cb41a5b392699b4f39e3ed4964f943e675acc8b2b2fc362b9c844
 miniflux.initd
+596205ad8d60b7b79c9f03b29234d9fe9ddc4bb26254367a90d18828d9a01149086ab73488b45ac4932e69b8787f980b7cd72d866f7cafd9b0185b3b38a1fbfa
 miniflux.confd
 fc0084e0d31a4ce29fc0110411dba8f9fd60c16af08a3364b3f828558981a308a5f9871908594753d868cdf9faf86f84f95e0134afdff8983da2b179ebdd24c1
 miniflux.conf
 f9d594df6ea267b6d1f060090d39825998a03af02751ee5af446e84c84794ae01d16617c2737f00c3af5325fb27f26aa680b4ba1747dcf16acb22dbc23477e7d
 miniflux.logrotate"
diff --git a/community/miniflux/miniflux.confd
b/community/miniflux/miniflux.confd
index 576e814c1b..5280b17ebe 100644
--- a/community/miniflux/miniflux.confd
+++ b/community/miniflux/miniflux.confd
@@ -1,2 +1,3 @@
 miniflux_opts="-config-file /etc/miniflux.conf"
 miniflux_log_file="/var/log/miniflux.log"
+#miniflux_runtime_dir="/run/miniflux"
diff --git a/community/miniflux/miniflux.initd
b/community/miniflux/miniflux.initd
index ee8c36f7a5..5f57842108 100644
--- a/community/miniflux/miniflux.initd
+++ b/community/miniflux/miniflux.initd
@@ -16,4 +16,5 @@ depend() {
 start_pre() {
 	checkpath -f -m 0644 -o ${SVCNAME}:${SVCNAME} "$miniflux_log_file"
 	[ -f "/etc/conf.d/${RC_SVCNAME}" ] && checkpath --file --mode 0600
--owner root:root "/etc/conf.d/${RC_SVCNAME}"
+	[ -n "$miniflux_runtime_dir" ] && checkpath --directory --mode 0755
--owner "${command_user}" "$miniflux_runtime_dir"
 }
-- 
2.30.1