View | Details | Raw Unified | Return to bug 271397
Collapse All | Expand All

(-)b/UPDATING (+14 lines)
Lines 5-10 they are unavoidable. Link Here
5
You should get into the habit of checking this file for changes each time
5
You should get into the habit of checking this file for changes each time
6
you update your ports collection, before attempting any port upgrades.
6
you update your ports collection, before attempting any port upgrades.
7
7
8
20230513:
9
  AFFECTS: users of www/tt-rss
10
  AUTHOR: dereks@lifeofadishwasher.com
11
12
  www/tt-rss now expects the user to install the database drivers by hand
13
  allowing the port to be database independent however it would be best if you
14
  mark the php driver packages as a non-automatic package such that
15
  pkg-autoremove doesn't uninstall them.
16
17
  Change 80 to your corresponding php version (80, 81, 82)
18
19
  mysql: pkg set -yA 0 php80-mysqli php80-pdo_mysql;
20
  pgsql: pkg set -yA 0 php80-pgsql php80-pdo_pgsql;
21
8
20230511:
22
20230511:
9
  AFFECTS: users of net-mgmt/py-netbox-secretstore
23
  AFFECTS: users of net-mgmt/py-netbox-secretstore
10
  AUTHOR: kai@FreeBSD.org
24
  AUTHOR: kai@FreeBSD.org
(-)b/www/tt-rss/Makefile (-14 / +14 lines)
Lines 1-5 Link Here
1
PORTNAME=	tt-rss
1
PORTNAME=	tt-rss
2
PORTVERSION=	g20230413
2
PORTVERSION=	g20230509
3
PORTEPOCH=	2
3
PORTEPOCH=	2
4
CATEGORIES=	www
4
CATEGORIES=	www
5
5
Lines 15-21 USES= gettext-tools php:cli,web shebangfix Link Here
15
15
16
USE_GITLAB=	yes
16
USE_GITLAB=	yes
17
GL_SITE=	https://gitlab.tt-rss.org
17
GL_SITE=	https://gitlab.tt-rss.org
18
GL_COMMIT=	0578bf802571781a0a7e3debbbec66437a7d28b4
18
GL_COMMIT=	11946f0148d0b8a76ecc120fd9c1dc0b7fa04664
19
19
20
USE_PHP=	ctype dom exif fileinfo filter iconv intl mbstring openssl \
20
USE_PHP=	ctype dom exif fileinfo filter iconv intl mbstring openssl \
21
		pcntl pdo phar posix session simplexml tokenizer xml xmlwriter \
21
		pcntl pdo phar posix session simplexml tokenizer xml xmlwriter \
Lines 29-46 REINPLACE_ARGS= -i "" Link Here
29
NO_ARCH=	yes
29
NO_ARCH=	yes
30
NO_BUILD=	yes
30
NO_BUILD=	yes
31
31
32
SUB_FILES=	config.php httpd-tt-rss.conf pkg-message
32
# Instead of depending on the extact database driver list php packages that tt-rss
33
SUB_LIST=	MYSQL=${MYSQL} \
33
# depends on during install pkg-message as a post install setup.
34
		PGSQL=${PGSQL} \
34
# mysql: php-mysqli php-pdo_mysql
35
# pgsql: php-pgsql php-pdo_pgsql
36
#
37
# from Mk/Uses/php.mk create sub vars for mysqli/pdo_mysql pgsql/pdo_pgsql values
38
SUB_FILES=	config.php httpd-tt-rss.conf pkg-message ttrss_db_check.php
39
SUB_LIST=	MYSQL_DEPS="${mysqli_DEPENDS:T} ${pdo_mysql_DEPENDS:T}" \
40
		PGSQL_DEPS="${pgsql_DEPENDS:T} ${pdo_pgsql_DEPENDS:T}" \
35
		WWWOWN=${WWWOWN}
41
		WWWOWN=${WWWOWN}
36
42
37
PLIST_SUB=	WWWGRP=${WWWGRP} \
43
PLIST_SUB=	WWWGRP=${WWWGRP} \
38
		WWWOWN=${WWWOWN}
44
		WWWOWN=${WWWOWN}
39
45
40
OPTIONS_DEFINE=		CURL GD
46
OPTIONS_DEFINE=		CURL GD
41
OPTIONS_DEFAULT=	CURL GD MYSQL
47
OPTIONS_DEFAULT=	CURL GD
42
OPTIONS_SINGLE=		DB
43
OPTIONS_SINGLE_DB=	MYSQL PGSQL
44
48
45
CURL_DESC=	Use SimplePie instead of Magpie
49
CURL_DESC=	Use SimplePie instead of Magpie
46
GD_DESC=	Use OTP QR code generation
50
GD_DESC=	Use OTP QR code generation
Lines 48-59 GD_DESC= Use OTP QR code generation Link Here
48
CURL_USE=	PHP=curl
52
CURL_USE=	PHP=curl
49
GD_USE=		PHP=gd
53
GD_USE=		PHP=gd
50
54
51
MYSQL_USE=	PHP=mysqli,pdo_mysql
52
MYSQL_VARS_OFF=	MYSQL="\#"
53
54
PGSQL_USE=	PHP=pdo_pgsql,pgsql
55
PGSQL_VARS_OFF=	PGSQL="\#"
56
57
do-install:
55
do-install:
58
	${MKDIR} \
56
	${MKDIR} \
59
		${STAGEDIR}${WWWDIR} \
57
		${STAGEDIR}${WWWDIR} \
Lines 68-73 do-install: Link Here
68
	${RM} ${STAGEDIR}${WWWDIR}/config.php-dist
66
	${RM} ${STAGEDIR}${WWWDIR}/config.php-dist
69
	${INSTALL_DATA} ${WRKDIR}/config.php \
67
	${INSTALL_DATA} ${WRKDIR}/config.php \
70
		${STAGEDIR}${WWWDIR}/config.php.sample
68
		${STAGEDIR}${WWWDIR}/config.php.sample
69
	${INSTALL_DATA} ${WRKDIR}/ttrss_db_check.php \
70
		${STAGEDIR}${WWWDIR}/ttrss_db_check.php
71
	${INSTALL_DATA} ${FILESDIR}/newsyslog.sample \
71
	${INSTALL_DATA} ${FILESDIR}/newsyslog.sample \
72
		${STAGEDIR}${EXAMPLESDIR}
72
		${STAGEDIR}${EXAMPLESDIR}
73
73
(-)b/www/tt-rss/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1682227775
1
TIMESTAMP = 1684011742
2
SHA256 (tt-rss-tt-rss-0578bf802571781a0a7e3debbbec66437a7d28b4_GL0.tar.gz) = 76ec95062cfe868f6530c790e93f2dfe8ad40019b1015ce0e5b1398abc08e5df
2
SHA256 (tt-rss-tt-rss-11946f0148d0b8a76ecc120fd9c1dc0b7fa04664_GL0.tar.gz) = e561b30e047ad727a91eb8e8597add2d4210b46f5404855c5cf6a8a93cde5bc7
3
SIZE (tt-rss-tt-rss-0578bf802571781a0a7e3debbbec66437a7d28b4_GL0.tar.gz) = 8489761
3
SIZE (tt-rss-tt-rss-11946f0148d0b8a76ecc120fd9c1dc0b7fa04664_GL0.tar.gz) = 8490369
(-)b/www/tt-rss/files/pkg-message.in (+7 lines)
Lines 3-8 Link Here
3
  message: <<EOM
3
  message: <<EOM
4
Tiny Tiny RSS is now installed, but it requires some additional setup.
4
Tiny Tiny RSS is now installed, but it requires some additional setup.
5
5
6
Install your corresponding php database drivers:
7
8
       msyql: mysqli pdo_mysql
9
              pkg install %%MYSQL_DEPS%%
10
  postgresql: pgsql pdo_pgsql
11
              pkg install %%PGSQL_DEPS%%
12
6
You now need to create a database, a database user, configure the
13
You now need to create a database, a database user, configure the
7
web server, and configure tt-rss.  Sample apache24 configs located
14
web server, and configure tt-rss.  Sample apache24 configs located
8
at %%DATADIR%%/httpd-tt-rss.conf.
15
at %%DATADIR%%/httpd-tt-rss.conf.
(-)b/www/tt-rss/files/ttrss_db_check.php.in (+8 lines)
Added Link Here
1
<?php
2
chdir("%%WWWDIR%%");
3
4
require_once "%%WWWDIR%%/classes/config.php";
5
require_once "%%WWWDIR%%/include/functions.php";
6
7
print(strtolower(Config::get(Config::DB_TYPE)));
8
?>
(-)b/www/tt-rss/files/ttrssd.in (-4 / +21 lines)
Lines 23-28 load_rc_config "${name}" Link Here
23
: ${ttrssd_local_db:="YES"}
23
: ${ttrssd_local_db:="YES"}
24
24
25
initdb_php="%%WWWDIR%%/update.php"
25
initdb_php="%%WWWDIR%%/update.php"
26
dbcheck_php="%%WWWDIR%%/ttrss_db_check.php"
26
required_files="%%WWWDIR%%/config.php"
27
required_files="%%WWWDIR%%/config.php"
27
pidfile="/var/run/${name}.pid"
28
pidfile="/var/run/${name}.pid"
28
ppidfile="/var/run/${name}_parent.pid"
29
ppidfile="/var/run/${name}_parent.pid"
Lines 37-46 start_precmd=${name}_prestart Link Here
37
start_cmd=${name}_start
38
start_cmd=${name}_start
38
stop_cmd=${name}_stop
39
stop_cmd=${name}_stop
39
40
40
%%MYSQL%%CHECK_CMD="%%LOCALBASE%%/bin/mysqladmin -u mysqld ping"
41
MYSQL_CHECK_CMD="%%LOCALBASE%%/bin/mysqladmin -u mysqld ping"
41
%%MYSQL%%CHECK_MSG="${name}: mysqladmin command failed; mysql not ready?"
42
MYSQL_CHECK_MSG="${name}: mysqladmin command failed; mysql not ready?"
42
%%PGSQL%%CHECK_CMD="%%LOCALBASE%%/bin/pg_isready"
43
PGSQL_CHECK_CMD="%%LOCALBASE%%/bin/pg_isready"
43
%%PGSQL%%CHECK_MSG="${name}: postgresql status failed; postgresql not ready?"
44
PGSQL_CHECK_MSG="${name}: postgresql status failed; postgresql not ready?"
44
45
45
ttrssd_start() {
46
ttrssd_start() {
46
	if ! [ -x $phpcli ]; then
47
	if ! [ -x $phpcli ]; then
Lines 75-80 ttrssd_prestart() { Link Here
75
	if checkyesno ttrssd_local_db; then
76
	if checkyesno ttrssd_local_db; then
76
		# Wait for the local database to be started
77
		# Wait for the local database to be started
77
78
79
		database="$("$phpcli" -f "$dbcheck_php")"
80
81
		case  "$database" in
82
		    "mysql")
83
			CHECK_CMD="$MYSQL_CHECK_CMD"
84
			CHECK_MSG="$MYSQL_CHECK_MSG"
85
			;;
86
		    "pgsql")
87
			CHECK_CMD="$PGSQL_CHECK_CMD"
88
			CHECK_MSG="$PGSQL_CHECK_MSG"
89
			;;
90
		    *)
91
			err 1 "Unknown database configured: $database"
92
			;;
93
		esac
94
78
		for n in $(seq 1 10); do
95
		for n in $(seq 1 10); do
79
			if $CHECK_CMD > /dev/null 2>&1; then
96
			if $CHECK_CMD > /dev/null 2>&1; then
80
			    return
97
			    return
(-)b/www/tt-rss/pkg-plist (-1 / +1 lines)
Lines 2017-2022 Link Here
2017
%%WWWDIR%%/plugins/toggle_sidebar/init.php
2017
%%WWWDIR%%/plugins/toggle_sidebar/init.php
2018
%%WWWDIR%%/prefs.php
2018
%%WWWDIR%%/prefs.php
2019
%%WWWDIR%%/public.php
2019
%%WWWDIR%%/public.php
2020
%%WWWDIR%%/ttrss_db_check.php
2020
%%WWWDIR%%/schema/ttrss_schema_mysql.sql
2021
%%WWWDIR%%/schema/ttrss_schema_mysql.sql
2021
%%WWWDIR%%/schema/ttrss_schema_pgsql.sql
2022
%%WWWDIR%%/schema/ttrss_schema_pgsql.sql
2022
%%WWWDIR%%/sql/mysql/migrations/3.sql
2023
%%WWWDIR%%/sql/mysql/migrations/3.sql
2023
- 

Return to bug 271397