From nobody Mon May 15 04:36:23 2023
X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QKRQb28Cxz4B6s3;
Mon, 15 May 2023 04:36:23 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK))
by mx1.freebsd.org (Postfix) with ESMTPS id 4QKRQb1gqKz4PJw;
Mon, 15 May 2023 04:36:23 +0000 (UTC)
(envelope-from git@FreeBSD.org)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim;
t=1684125383;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=/DRtk1WU8nqqCvZ19xAqopID3J9geBKXf1VbpkjsBgc=;
b=KS3m9b1lMack1jO13CphltOGk7G/ZMH7yiA43j5UAFkMA5RXx0gtlPciiLA7VtqN/IjmUK
dKTHCGdlwGHXtnbRVBexUgNI92IiLC+KGAvsy2WRWFTKGKpPLsnC04dOreBOzu/zLtoHA0
Pn189ftKH4iCOWTL/Jf9oGwzEei4wGsQIOsDCBEYdfhv4efUfhU8Qyzyk/+7//HJ60ysqr
2CBYMAtpdiPCQY/DibWhdlxXrKJhy1D2Pej60RLXwZhrgr/KIkmS+yDjtzbAyNLRqw9CVg
ZDShnJu6/7reiuEEeGTn6QoeBpTpaA7h3OxFETefIp1DcBDQ/gr3iyg44OaYZQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org;
s=dkim; t=1684125383;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:mime-version:mime-version:content-type:content-type:
content-transfer-encoding:content-transfer-encoding;
bh=/DRtk1WU8nqqCvZ19xAqopID3J9geBKXf1VbpkjsBgc=;
b=CZyKs0Nk4JTFd3mpt+ECMEdIH8GClHpCO2UADzun+fTdPRtiY3xf79OH+bCNG+aM9YjvDT
1o8vo963ed83o2wrksUQ4MfJ/E7YboTVtgXvnjdynOiaaFbuhhfH30O+P48+yoZyvg9Jsq
asibnMP+nLUvS0aH99jLyiGGMg/OPrT5q14b6tYmI/LJP4TdsvmLEetvJ00SLSqsG8FlTf
++cToUa471gSEYhBzjePDoKOZQWPVfElr+5BNIWkjTJCffks7WsegzqAqCPrsrlhNgEwQb
SWD3LGMsomKHIcy5g7025meILL+xn+bpJ9VIClcdpZzpQJ2JlhmlekXJ7QWiuQ==
ARC-Authentication-Results: i=1;
mx1.freebsd.org;
none
ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684125383; a=rsa-sha256; cv=none;
b=ZF3J4hpZK8NgHrOmU8/0nxRsi/3PiouavgYWsOB2hFlA8cImEfdUPDAjw2tFTjy303i1DF
Km5xBd/IMIB48aYf/IOO0Sx0yyp7gcUrm5kEmhN1BrPdQbJsv+Q+V+C+uAxBxpJ3bD3EMD
yO07lugAHGYKm7oRdIj87BMTzpcF1o7xd20+Gy6ABQ9IZJEDVEp+OQYawyVniJjkaXoScG
sq3WY+IGM0+ywc3PbEe4zjgDN9GnmEo6cSYtlPK8/LZMmRfc4y314uLrjUW+CGTV6YbrZo
eqpKhQ1w9XI7+Z7wLOkq4A4ZKso+eTIsWG1BuTep06oFgSAewQY+rRFhYI6tQg==
Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(Client did not present a certificate)
by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QKRQb0lRhzRHQ;
Mon, 15 May 2023 04:36:23 +0000 (UTC)
(envelope-from git@FreeBSD.org)
Received: from gitrepo.freebsd.org ([127.0.1.44])
by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34F4aNPY071228;
Mon, 15 May 2023 04:36:23 GMT
(envelope-from git@gitrepo.freebsd.org)
Received: (from git@localhost)
by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34F4aN3x071227;
Mon, 15 May 2023 04:36:23 GMT
(envelope-from git)
Date: Mon, 15 May 2023 04:36:23 GMT
Message-Id: <202305150436.34F4aN3x071227@gitrepo.freebsd.org>
To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org,
dev-commits-ports-main@FreeBSD.org
From: Koichiro Iwao
Subject: git: 9b9114f7e7c8 - main - www/tt-rss: Update to g20230509 and move database drivers to post config
List-Id: Commit messages for all branches of the ports repository
List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all
List-Help:
List-Post:
List-Subscribe:
List-Unsubscribe:
Sender: owner-dev-commits-ports-all@freebsd.org
X-BeenThere: dev-commits-ports-all@freebsd.org
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Git-Committer: meta
X-Git-Repository: ports
X-Git-Refname: refs/heads/main
X-Git-Reftype: branch
X-Git-Commit: 9b9114f7e7c81d53d9dc1f261a6ff9cf92826176
Auto-Submitted: auto-generated
X-ThisMailContainsUnwantedMimeParts: N
The branch main has been updated by meta:
URL: https://cgit.FreeBSD.org/ports/commit/?id=9b9114f7e7c81d53d9dc1f261a6ff9cf92826176
commit 9b9114f7e7c81d53d9dc1f261a6ff9cf92826176
Author: Derek Schrock
AuthorDate: 2023-05-13 21:20:07 +0000
Commit: Koichiro Iwao
CommitDate: 2023-05-15 04:34:57 +0000
www/tt-rss: Update to g20230509 and move database drivers to post config
- Update to g20230509 11946f014
- Move php database drivers a post install operation allowing the port
to support both databases without having to make option changes or
rebuilds.
- Update ttrssd to check for the configured driver
PR: 271397
---
UPDATING | 14 ++++++++++++++
www/tt-rss/Makefile | 28 ++++++++++++++--------------
www/tt-rss/distinfo | 6 +++---
www/tt-rss/files/pkg-message.in | 7 +++++++
www/tt-rss/files/ttrss_db_check.php.in | 8 ++++++++
www/tt-rss/files/ttrssd.in | 25 +++++++++++++++++++++----
www/tt-rss/pkg-plist | 1 +
7 files changed, 68 insertions(+), 21 deletions(-)
diff --git a/UPDATING b/UPDATING
index a547fac9a729..de937c8f811b 100644
--- a/UPDATING
+++ b/UPDATING
@@ -5,6 +5,20 @@ 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.
+20230513:
+ AFFECTS: users of www/tt-rss
+ AUTHOR: dereks@lifeofadishwasher.com
+
+ www/tt-rss now expects the user to install the database drivers by hand
+ allowing the port to be database independent however it would be best if you
+ mark the php driver packages as a non-automatic package such that
+ pkg-autoremove doesn't uninstall them.
+
+ Change 80 to your corresponding php version (80, 81, 82)
+
+ mysql: pkg set -yA 0 php80-mysqli php80-pdo_mysql;
+ pgsql: pkg set -yA 0 php80-pgsql php80-pdo_pgsql;
+
20230511:
AFFECTS: users of net-mgmt/py-netbox-secretstore
AUTHOR: kai@FreeBSD.org
diff --git a/www/tt-rss/Makefile b/www/tt-rss/Makefile
index 95188b47f223..ec348958373c 100644
--- a/www/tt-rss/Makefile
+++ b/www/tt-rss/Makefile
@@ -1,5 +1,5 @@
PORTNAME= tt-rss
-PORTVERSION= g20230413
+PORTVERSION= g20230509
PORTEPOCH= 2
CATEGORIES= www
@@ -15,7 +15,7 @@ USES= gettext-tools php:cli,web shebangfix
USE_GITLAB= yes
GL_SITE= https://gitlab.tt-rss.org
-GL_COMMIT= 0578bf802571781a0a7e3debbbec66437a7d28b4
+GL_COMMIT= 11946f0148d0b8a76ecc120fd9c1dc0b7fa04664
USE_PHP= ctype dom exif fileinfo filter iconv intl mbstring openssl \
pcntl pdo phar posix session simplexml tokenizer xml xmlwriter \
@@ -29,18 +29,22 @@ REINPLACE_ARGS= -i ""
NO_ARCH= yes
NO_BUILD= yes
-SUB_FILES= config.php httpd-tt-rss.conf pkg-message
-SUB_LIST= MYSQL=${MYSQL} \
- PGSQL=${PGSQL} \
+# Instead of depending on the extact database driver list php packages that tt-rss
+# depends on during install pkg-message as a post install setup.
+# mysql: php-mysqli php-pdo_mysql
+# pgsql: php-pgsql php-pdo_pgsql
+#
+# from Mk/Uses/php.mk create sub vars for mysqli/pdo_mysql pgsql/pdo_pgsql values
+SUB_FILES= config.php httpd-tt-rss.conf pkg-message ttrss_db_check.php
+SUB_LIST= MYSQL_DEPS="${mysqli_DEPENDS:T} ${pdo_mysql_DEPENDS:T}" \
+ PGSQL_DEPS="${pgsql_DEPENDS:T} ${pdo_pgsql_DEPENDS:T}" \
WWWOWN=${WWWOWN}
PLIST_SUB= WWWGRP=${WWWGRP} \
WWWOWN=${WWWOWN}
OPTIONS_DEFINE= CURL GD
-OPTIONS_DEFAULT= CURL GD MYSQL
-OPTIONS_SINGLE= DB
-OPTIONS_SINGLE_DB= MYSQL PGSQL
+OPTIONS_DEFAULT= CURL GD
CURL_DESC= Use SimplePie instead of Magpie
GD_DESC= Use OTP QR code generation
@@ -48,12 +52,6 @@ GD_DESC= Use OTP QR code generation
CURL_USE= PHP=curl
GD_USE= PHP=gd
-MYSQL_USE= PHP=mysqli,pdo_mysql
-MYSQL_VARS_OFF= MYSQL="\#"
-
-PGSQL_USE= PHP=pdo_pgsql,pgsql
-PGSQL_VARS_OFF= PGSQL="\#"
-
do-install:
${MKDIR} \
${STAGEDIR}${WWWDIR} \
@@ -68,6 +66,8 @@ do-install:
${RM} ${STAGEDIR}${WWWDIR}/config.php-dist
${INSTALL_DATA} ${WRKDIR}/config.php \
${STAGEDIR}${WWWDIR}/config.php.sample
+ ${INSTALL_DATA} ${WRKDIR}/ttrss_db_check.php \
+ ${STAGEDIR}${WWWDIR}/ttrss_db_check.php
${INSTALL_DATA} ${FILESDIR}/newsyslog.sample \
${STAGEDIR}${EXAMPLESDIR}
diff --git a/www/tt-rss/distinfo b/www/tt-rss/distinfo
index bd1e0fbc5158..dbafe558bf0f 100644
--- a/www/tt-rss/distinfo
+++ b/www/tt-rss/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1682227775
-SHA256 (tt-rss-tt-rss-0578bf802571781a0a7e3debbbec66437a7d28b4_GL0.tar.gz) = 76ec95062cfe868f6530c790e93f2dfe8ad40019b1015ce0e5b1398abc08e5df
-SIZE (tt-rss-tt-rss-0578bf802571781a0a7e3debbbec66437a7d28b4_GL0.tar.gz) = 8489761
+TIMESTAMP = 1684011742
+SHA256 (tt-rss-tt-rss-11946f0148d0b8a76ecc120fd9c1dc0b7fa04664_GL0.tar.gz) = e561b30e047ad727a91eb8e8597add2d4210b46f5404855c5cf6a8a93cde5bc7
+SIZE (tt-rss-tt-rss-11946f0148d0b8a76ecc120fd9c1dc0b7fa04664_GL0.tar.gz) = 8490369
diff --git a/www/tt-rss/files/pkg-message.in b/www/tt-rss/files/pkg-message.in
index 34bf547f3560..a0602b7e0475 100644
--- a/www/tt-rss/files/pkg-message.in
+++ b/www/tt-rss/files/pkg-message.in
@@ -3,6 +3,13 @@
message: <
diff --git a/www/tt-rss/files/ttrssd.in b/www/tt-rss/files/ttrssd.in
index 21bfde025c73..07b7a38e1c8e 100644
--- a/www/tt-rss/files/ttrssd.in
+++ b/www/tt-rss/files/ttrssd.in
@@ -23,6 +23,7 @@ load_rc_config "${name}"
: ${ttrssd_local_db:="YES"}
initdb_php="%%WWWDIR%%/update.php"
+dbcheck_php="%%WWWDIR%%/ttrss_db_check.php"
required_files="%%WWWDIR%%/config.php"
pidfile="/var/run/${name}.pid"
ppidfile="/var/run/${name}_parent.pid"
@@ -37,10 +38,10 @@ start_precmd=${name}_prestart
start_cmd=${name}_start
stop_cmd=${name}_stop
-%%MYSQL%%CHECK_CMD="%%LOCALBASE%%/bin/mysqladmin -u mysqld ping"
-%%MYSQL%%CHECK_MSG="${name}: mysqladmin command failed; mysql not ready?"
-%%PGSQL%%CHECK_CMD="%%LOCALBASE%%/bin/pg_isready"
-%%PGSQL%%CHECK_MSG="${name}: postgresql status failed; postgresql not ready?"
+MYSQL_CHECK_CMD="%%LOCALBASE%%/bin/mysqladmin -u mysqld ping"
+MYSQL_CHECK_MSG="${name}: mysqladmin command failed; mysql not ready?"
+PGSQL_CHECK_CMD="%%LOCALBASE%%/bin/pg_isready"
+PGSQL_CHECK_MSG="${name}: postgresql status failed; postgresql not ready?"
ttrssd_start() {
if ! [ -x $phpcli ]; then
@@ -75,6 +76,22 @@ ttrssd_prestart() {
if checkyesno ttrssd_local_db; then
# Wait for the local database to be started
+ database="$("$phpcli" -f "$dbcheck_php")"
+
+ case "$database" in
+ "mysql")
+ CHECK_CMD="$MYSQL_CHECK_CMD"
+ CHECK_MSG="$MYSQL_CHECK_MSG"
+ ;;
+ "pgsql")
+ CHECK_CMD="$PGSQL_CHECK_CMD"
+ CHECK_MSG="$PGSQL_CHECK_MSG"
+ ;;
+ *)
+ err 1 "Unknown database configured: $database"
+ ;;
+ esac
+
for n in $(seq 1 10); do
if $CHECK_CMD > /dev/null 2>&1; then
return
diff --git a/www/tt-rss/pkg-plist b/www/tt-rss/pkg-plist
index 257ffb6f3f02..3405bdf3b0a5 100644
--- a/www/tt-rss/pkg-plist
+++ b/www/tt-rss/pkg-plist
@@ -2017,6 +2017,7 @@
%%WWWDIR%%/plugins/toggle_sidebar/init.php
%%WWWDIR%%/prefs.php
%%WWWDIR%%/public.php
+%%WWWDIR%%/ttrss_db_check.php
%%WWWDIR%%/schema/ttrss_schema_mysql.sql
%%WWWDIR%%/schema/ttrss_schema_pgsql.sql
%%WWWDIR%%/sql/mysql/migrations/3.sql