diff options
author | thierry <thierry@FreeBSD.org> | 2016-04-15 03:19:36 +0800 |
---|---|---|
committer | thierry <thierry@FreeBSD.org> | 2016-04-15 03:19:36 +0800 |
commit | 7c1626d4416291c953fa11533b0eb16b6a675c71 (patch) | |
tree | 5ae3e43ec3402b7396a920f70d4099cc6d4c8a03 | |
parent | 0adf2589358e7b42fd131565f9738259e13fc689 (diff) | |
download | freebsd-ports-gnome-7c1626d4416291c953fa11533b0eb16b6a675c71.tar.gz freebsd-ports-gnome-7c1626d4416291c953fa11533b0eb16b6a675c71.tar.zst freebsd-ports-gnome-7c1626d4416291c953fa11533b0eb16b6a675c71.zip |
Replace the option DBLOCAL by a flag in /etc/rc.conf.
PR: 208410
Submitted by: john (at) johnanddalene.net
-rw-r--r-- | UPDATING | 12 | ||||
-rw-r--r-- | www/tt-rss/Makefile | 14 | ||||
-rw-r--r-- | www/tt-rss/files/pkg-message.in | 1 | ||||
-rw-r--r-- | www/tt-rss/files/ttrssd.in | 15 |
4 files changed, 28 insertions, 14 deletions
@@ -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}#/ @@ -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" |