aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2016-04-14 19:19:36 +0000
committerThierry Thomas <thierry@FreeBSD.org>2016-04-14 19:19:36 +0000
commit4cf92ab11ed5c8b44fdfbbac17e8f5989724e9d0 (patch)
tree5ae3e43ec3402b7396a920f70d4099cc6d4c8a03
parent2b036f026c88be12a2fe0ddc15a2b3a8040a86ec (diff)
downloadports-4cf92ab11ed5c8b44fdfbbac17e8f5989724e9d0.tar.gz
ports-4cf92ab11ed5c8b44fdfbbac17e8f5989724e9d0.zip
Replace the option DBLOCAL by a flag in /etc/rc.conf.
PR: 208410 Submitted by: john (at) johnanddalene.net
Notes
Notes: svn path=/head/; revision=413313
-rw-r--r--UPDATING12
-rw-r--r--www/tt-rss/Makefile14
-rw-r--r--www/tt-rss/files/pkg-message.in1
-rw-r--r--www/tt-rss/files/ttrssd.in15
4 files changed, 28 insertions, 14 deletions
diff --git a/UPDATING b/UPDATING
index 56fbfb136552..3d430afe1356 100644
--- a/UPDATING
+++ b/UPDATING
@@ -6,6 +6,18 @@ You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
20160414:
+ AFFECTS: Users of www/tt-rss
+ AUTHOR: thierry@FreeBSD.org
+
+ Tiny Tiny RSS can use a database running on a separate server.
+ Previously, in this case, you had to set the option DBLOCAL; this option
+ has been removed and replaced by a settable run-time flag: now you
+ should set
+ ttrssd_local_db="NO"
+ in your /etc/rc.conf .
+
+
+20160414:
AFFECTS: Users of graphics/kipi-plugin-googledrive and graphics/kipi-plugin-picasaweb
AUTHOR: kde@FreeBSD.org
diff --git a/www/tt-rss/Makefile b/www/tt-rss/Makefile
index c6302b17b84e..f8681922b02a 100644
--- a/www/tt-rss/Makefile
+++ b/www/tt-rss/Makefile
@@ -3,6 +3,7 @@
PORTNAME= tt-rss
PORTVERSION= 16.1.2016.02.23
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= https://tt-rss.org/gitlab/fox/tt-rss/repository/archive${EXTRACT_SUFX}?ref=${GL_TAGNAME}&num;/
@@ -26,13 +27,12 @@ WRKSRC= ${WRKDIR}/tt-rss.git
USE_RC_SUBR= ttrssd
-OPTIONS_DEFINE= CURL GD DBLOCAL
+OPTIONS_DEFINE= CURL GD
OPTIONS_SINGLE= DB
OPTIONS_SINGLE_DB= MYSQL PGSQL
-OPTIONS_DEFAULT= CURL GD MYSQL DBLOCAL
+OPTIONS_DEFAULT= CURL GD MYSQL
CURL_DESC= Use SimplePie instead of Magpie
GD_DESC= Use OTP QR code generation
-DBLOCAL_DESC= Database is local?
.include <bsd.port.options.mk>
@@ -58,14 +58,8 @@ USE_PHP+= curl
USE_PHP+= gd
.endif
-.if ${PORT_OPTIONS:MDBLOCAL}
-DBLOCAL=
-.else
-DBLOCAL= "\#"
-.endif
-
SUB_FILES= httpd-tt-rss.conf pkg-message
-SUB_LIST= DB=${DB} WWWOWN=${WWWOWN} MYSQL=${MYSQL} PGSQL=${PGSQL} DBLOCAL=${DBLOCAL}
+SUB_LIST= DB=${DB} WWWOWN=${WWWOWN} MYSQL=${MYSQL} PGSQL=${PGSQL}
PLIST_SUB= WWWOWN=${WWWOWN} WWWGRP=${WWWGRP}
PKGMESSAGE= ${WRKDIR}/pkg-message
diff --git a/www/tt-rss/files/pkg-message.in b/www/tt-rss/files/pkg-message.in
index 377461368bd2..d988ce09f1fe 100644
--- a/www/tt-rss/files/pkg-message.in
+++ b/www/tt-rss/files/pkg-message.in
@@ -21,6 +21,7 @@ Then, you should be able to check <http://localhost/tt-rss/> and
And to update your feeds, you have to enable the daemon ttrssd in
/etc/rc.conf and start %%PREFIX%%/etc/rc.d/ttrssd . You may also add an entry
for /var/log/ttrssd.log in your /etc/newsyslog.conf .
+Note: set `ttrssd_local_db="NO"' if your database is on another server.
Important note: after an upgrade, you have to set SINGLE_USER_MODE to true
in your config.php; remember to modify after that if needed. And your
diff --git a/www/tt-rss/files/ttrssd.in b/www/tt-rss/files/ttrssd.in
index 6d66e09570a4..0b620a91bcb0 100644
--- a/www/tt-rss/files/ttrssd.in
+++ b/www/tt-rss/files/ttrssd.in
@@ -7,10 +7,13 @@
# REQUIRE: LOGIN mysql postgresql
# KEYWORD: shutdown
-# Add the following line to /etc/rc.conf to enable `ttrssd':
+# Add the following lines to /etc/rc.conf to enable `ttrssd':
#
-#ttrssd_enable="YES"
+# ttrssd_enable="YES"
#
+# ttrssd_local_db (bool): Set to "YES" by default.
+# Set it to "NO" if the database is on another
+# server.
. /etc/rc.subr
@@ -20,6 +23,7 @@ rcvar=ttrssd_enable
# read settings, set default values
load_rc_config "${name}"
: ${ttrssd_enable="NO"}
+: ${ttrssd_local_db:="YES"}
required_files="%%WWWDIR%%/config.php"
pidfile="/var/run/${name}.pid"
@@ -30,7 +34,7 @@ phpupd="update_daemon2.php"
ttrssd_log="/var/log/${name}.log"
ttrssd_user="%%WWWOWN%%"
-%%DBLOCAL%%start_precmd=${name}_prestart
+start_precmd=${name}_prestart
start_cmd=${name}_start
stop_cmd=${name}_stop
@@ -56,7 +60,9 @@ ttrssd_stop() {
}
ttrssd_prestart() {
-local _count=0
+ if checkyesno ttrssd_local_db; then
+ # Wait for the local database to be started
+ local _count=0
while : ; do
$CHECK_CMD > /dev/null 2>&1 && return
@@ -67,6 +73,7 @@ local _count=0
sleep 1
done
+ fi
}
run_rc_command "$1"