1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-02 06:03:50 +00:00

www/tt-rss: Update to g20210423 e8f78181f

PR:	255476
Reported by:	dereks@lifeofadishwasher.com (maintainer)
Differential Revision: https://reviews.freebsd.org/D30030
This commit is contained in:
Fernando Apesteguía 2021-04-30 08:15:34 +02:00
parent bc5a5fbbef
commit ca4d4d01cf
7 changed files with 1242 additions and 1278 deletions

View File

@ -5,6 +5,19 @@ they are unavoidable.
You should get into the habit of checking this file for changes each time
you update your ports collection, before attempting any port upgrades.
20210428:
AFFECTS: users of www/tt-rss
AUTHOR: dereks@lifeofadishwasher.com
tt-rss config.php syntax has changed. You can find detailed changes
here[1] or look at config.php.sample. Expect your config.php to not
work with newer www/tt-rss releases.
Due to changes in ttrssd before updating you should stop ttrssd via
otherwise kill the php process running update_daemon2.php.
[1] https://tt-rss.org/wiki/GlobalConfig
20210426:
AFFECTS: users of x11-fonts/iosevka
AUTHOR: 0mp@FreeBSD.org

View File

@ -1,7 +1,7 @@
# Created by: Thierry Thomas <thierry@pompo.net>
PORTNAME= tt-rss
PORTVERSION= g20210123
PORTVERSION= g20210423
PORTEPOCH= 1
CATEGORIES= www
MASTER_SITES= https://git.tt-rss.org/fox/tt-rss/archive/
@ -13,15 +13,16 @@ COMMENT= Tiny Tiny RSS: web-based news feed (RSS/Atom) aggregator
LICENSE= GPLv2
RUN_DEPENDS= ${LOCALBASE}/bin/git:devel/git
USES= gettext-tools php:cli,web shebangfix
USE_PHP= ctype dom fileinfo filter hash iconv intl json mbstring pcntl \
posix session xmlrpc
USE_PHP= ctype dom exif fileinfo filter hash iconv intl json mbstring \
openssl pcntl pdo posix session tokenizer xml xmlrpc zip
USE_RC_SUBR= ttrssd
SHEBANG_FILES= lib/dojo-src/rebuild-dojo.sh update_daemon2.php \
utils/extract-i18n-js.pl
SHEBANG_FILES= update.php update_daemon2.php
_GIT_TAGNAME= 6c546f37b
_GIT_TAGNAME= e8f78181f
REINPLACE_ARGS= -i ""
@ -51,7 +52,7 @@ PGSQL_VARS_OFF= PGSQL="\#"
.include <bsd.port.options.mk>
SUB_FILES= httpd-tt-rss.conf pkg-message
SUB_FILES= config.php httpd-tt-rss.conf pkg-message
SUB_LIST= DB=${DB} \
MYSQL=${MYSQL} \
PGSQL=${PGSQL} \
@ -59,17 +60,6 @@ SUB_LIST= DB=${DB} \
PLIST_SUB= WWWGRP=${WWWGRP} \
WWWOWN=${WWWOWN}
PHP2FIX= config.php-dist update.php
SCRIPTS= update.php update_daemon2.php
pre-configure:
.for script in ${PHP2FIX}
${REINPLACE_CMD} -e 's|/usr/bin/php|${LOCALBASE}/bin/php|' \
-e 's|/usr/bin/env php| ${LOCALBASE}/bin/php|' \
${WRKSRC}/${script}
.endfor
do-install:
${MKDIR} ${STAGEDIR}${WWWDIR} ${STAGEDIR}${DATADIR}
(cd ${WRKSRC} && ${COPYTREE_SHARE} "*" ${STAGEDIR}${WWWDIR} \
@ -78,9 +68,8 @@ do-install:
${INSTALL_DATA} ${WRKDIR}/httpd-tt-rss.conf ${STAGEDIR}${DATADIR}
${ECHO} "${OPSYS}:${PORTVERSION}:${_GIT_TAGNAME}" > \
"${STAGEDIR}${WWWDIR}/version_static.txt"
${MV} ${STAGEDIR}${WWWDIR}/config.php-dist \
${RM} ${STAGEDIR}${WWWDIR}/config.php-dist
${INSTALL_DATA} ${WRKDIR}/config.php \
${STAGEDIR}${WWWDIR}/config.php.sample
${RLN} ${STAGEDIR}${WWWDIR}/config.php.sample \
${STAGEDIR}${WWWDIR}/config.php-dist
.include <bsd.port.mk>

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1611467057
SHA256 (tt-rss/6c546f37b.tar.gz) = dc84f8aaf11a6ebf1cfd620669e49a1ed860ae46f813cb5b301cfc84a0443263
SIZE (tt-rss/6c546f37b.tar.gz) = 3440210
TIMESTAMP = 1619238626
SHA256 (tt-rss/e8f78181f.tar.gz) = 826c86faeafa7b16f56dc9b4a194b801c1afc2fa2ed22310035cdd10f328f82d
SIZE (tt-rss/e8f78181f.tar.gz) = 6703910

View File

@ -0,0 +1,29 @@
<?php
/*
This file can be used to customize global defaults if environment method is not available (i.e. no Docker).
Use the following syntax to override defaults (options are declared in classes/config.php, prefixed by TTRSS_):
putenv('TTRSS_DB_HOST=myserver');
putenv('TTRSS_SELF_URL_PATH=http://example.com/tt-rss');
Plugin-required constants also go here, using define():
define('LEGACY_CONSTANT', 'value');
etc.
See this page for more information: https://tt-rss.org/wiki/GlobalConfig
*/
# Required for FreeBSD ports php location
putenv('TTRSS_PHP_EXECUTABLE=%%LOCALBASE%%/bin/php');
# Required for plugin installer usage of git
putenv("PATH=%%LOCALBASE%%/bin/:" . getenv("PATH"));
#putenv('TTRSS_SELF_URL_PATH=');
#putenv('TTRSS_DB_TYPE=');
#putenv('TTRSS_DB_HOST=');
#putenv('TTRSS_DB_USER=');
#putenv('TTRSS_DB_NAME=');
#putenv('TTRSS_DB_PASS=');

View File

@ -3,34 +3,28 @@
message: <<EOM
Tiny Tiny RSS is now installed, but it requires some additional setup.
You now need to create a database, a database user, and
configure the web server. Sample apache24 configs located at
%%DATADIR%%/httpd-tt-rss.conf
You now need to create a database, a database user, configure the
web server, and configure tt-rss. Sample apache24 configs located
at %%DATADIR%%/httpd-tt-rss.conf.
To use the web installer.
# rm %%WWWDIR%%/config.php
Goto http://localhost/tt-rss/install
Or configure by hand:
Source the script
%%WWWDIR%%/schema/ttrss_schema_%%DB%%.sql
Edit the configuration file
Configure tt-rss (https://tt-rss.org/wiki/GlobalConfig) :
%%WWWDIR%%/config.php
In both cases, enable the ttrssd daemon:
If your database is on another server:
# sysrc ttrssd_local_db=NO
Enable the ttrssd daemon:
# sysrc ttrssd_enable=YES
# service ttrssd start
If your database if on another server:
# sysrc ttrssd_local_db=NO
Goto config.php's TTRSS_SELF_URL_PATH in a web browser.
Default user is "admin", with the password "password".
Goto http://localhost/tt-rss/
Default user is "admin", with the password "password"
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. Also your
DB_USER must be granted to ALTER any tables of your DB_NAME.
After an upgrade, you might need to update your database schema.
Perform one of the following:
- Login as an admin user via the web ui, tt-rss will ask you to update.
- Restart the ttrssd service and view /var/log/ttrssd.log for shema updates.
- Temporally enable SINGLE_USER_MODE in config.php and open web ui.
EOM
}
]

View File

@ -22,12 +22,14 @@ load_rc_config "${name}"
: ${ttrssd_enable="NO"}
: ${ttrssd_local_db:="YES"}
initdb_php="%%WWWDIR%%/update.php"
required_files="%%WWWDIR%%/config.php"
pidfile="/var/run/${name}.pid"
ppidfile="/var/run/${name}_parent.pid"
phpcli="%%LOCALBASE%%/bin/php"
command_interpreter=$phpcli
long_name="Tiny Tiny RSS updating feeds daemon."
phpupd="update_daemon2.php"
phpupd="%%WWWDIR%%/update_daemon2.php"
ttrssd_log="/var/log/${name}.log"
ttrssd_user="%%WWWOWN%%"
@ -37,40 +39,49 @@ stop_cmd=${name}_stop
%%MYSQL%%CHECK_CMD="%%LOCALBASE%%/bin/mysqladmin -u mysqld ping"
%%MYSQL%%CHECK_MSG="${name}: mysqladmin command failed; mysql not ready?"
# Waiting for pg_isready when 9.3 is the default
%%PGSQL%%CHECK_CMD="%%LOCALBASE%%/etc/rc.d/postgresql status"
%%PGSQL%%CHECK_CMD="%%LOCALBASE%%/bin/pg_isready"
%%PGSQL%%CHECK_MSG="${name}: postgresql status failed; postgresql not ready?"
ttrssd_start() {
[ -x $phpcli ] || (echo "$phpcli not found"; exit 1)
[ -f $pidfile ] && (echo "$name already running?"; exit 2)
if ! [ -x $phpcli ]; then
echo "$phpcli not found"
exit 1
fi
if [ -f $pidfile ]; then
echo "$name already running?"
exit 2
fi
echo "Starting $long_name"
(cd %%WWWDIR%% && su -fm $ttrssd_user -c "./$phpupd" > $ttrssd_log &) && \
echo $$ > $pidfile
daemon -P "$ppidfile" -p "$pidfile" -u "$ttrssd_user" -o "$ttrssd_log" \
sh -c "${initdb_php} --update-schema=force-yes; $phpupd"
}
ttrssd_stop() {
[ -f $pidfile ] || (echo "$name not running?"; exit 1)
if ! [ -f $pidfile ]; then
echo "$name not running?"
exit 1
fi
echo "Stopping $long_name"
kill `ps ax | grep $phpupd | grep -v grep | awk '{print $1}'`
rm -f $pidfile
pkill -CHLD -F "$pidfile"
pkill -F "$pidfile"
pwait "$(cat $ppidfile)"
}
ttrssd_prestart() {
if checkyesno ttrssd_local_db; then
# Wait for the local database to be started
local _count=0
if checkyesno ttrssd_local_db; then
# Wait for the local database to be started
while : ; do
$CHECK_CMD > /dev/null 2>&1 && return
_count=$(( $_count + 1 ))
if [ $_count -gt 10 ]; then
err 1 $CHECK_MSG
fi
sleep 1
done
fi
for n in $(seq 1 10); do
if $CHECK_CMD > /dev/null 2>&1; then
return
fi
sleep 1
done
err 1 $CHECK_MSG
fi
}
run_rc_command "$1"

File diff suppressed because it is too large Load Diff