Page MenuHomeFreeBSD

www/tt-rss: Update to g20210423
ClosedPublic

Authored by dereks_lifeofadishwasher.com on Apr 29 2021, 1:43 AM.
Tags
None
Referenced Files
F80224044: D30030.diff
Fri, Mar 29, 9:09 AM
Unknown Object (File)
Feb 23 2024, 5:35 PM
Unknown Object (File)
Feb 23 2024, 4:57 PM
Unknown Object (File)
Feb 15 2024, 7:41 PM
Unknown Object (File)
Feb 9 2024, 4:22 AM
Unknown Object (File)
Feb 9 2024, 4:22 AM
Unknown Object (File)
Feb 9 2024, 4:22 AM
Unknown Object (File)
Feb 2 2024, 6:19 AM
Subscribers

Details

Summary

This update adds a new plugin installer and removes the web based installer.
Moved schema init/updates to ttrssd however you can still use the web to update it.
There were some issues with ttrssd and a jail tty so I removed some of the subshell and did some additional clean up to that rc script.

  • Update to g20210423 (e8f78181f).
    • New config.php syntax.
    • Removeal of web installer.
    • New web based plug installer.
  • web plugin installer requires git.
  • pkg-message changes due to web installer removal.
  • ttrssd update to handle database schema upgrades.
  • ttrssd use daemon and cleanup.
  • UPDATING for config.php changes.
  • pkg-plist cleanup.
Test Plan
  • Copy any configs/data from /usr/local/www/tt-rss/ for backup
  • service ttrssd stop
  • pkg remove tt-rss
  • rm -rf /usr/local/www/tt-rss/
  • pkg install tt-rss
  • if needed, configure database
  • copy/update config
  • service ttrssd start
  • Confirm ttrssd and updated schema (if needed)
  • Goto hosts ttrss site.

Adding thierry@FreeBSD.org and uqs@FreeBSD.org as reviewers.
I'm assuming you're both tt-rss users?

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 39232
Build 36121: arc lint + arc unit

Event Timeline

dereks_lifeofadishwasher.com retitled this revision from www/tt-rss: Update to g20210423 This update adds a new plugin installer and removes the web based installer. Moved schema init/updates to ttrssd however you can still use the web to update it. There were some issues with ttrssd and a jail tty... to www/tt-rss: Update to g20210423.Apr 29 2021, 1:49 AM
dereks_lifeofadishwasher.com edited the summary of this revision. (Show Details)

Had an extra non-tt-rss commit mixed up with this. Removed.

Updating D30030: www/tt-rss: Update to g20210423

This update adds a new plugin installer and removes the web based installer.

Moved schema init/updates to ttrssd however you can still use the web to update it.

There were some issues with ttrssd and a jail tty...

This revision was not accepted when it landed; it landed in state Needs Review.Apr 30 2021, 8:43 AM
This revision was automatically updated to reflect the committed changes.

Updating tomorrow to handle the epoch bump.

UPDATING
16

s/via/or/

19

please move this URL inline, no need to have a "long" list of quotations or footnotes, when there is only 1.

Any additional comments?

Sorry, I did not understand why there is both this differential and a PR, neither why the previous PR has been backed-out. What is expected?

I've always opened them in pairs if I had a review. Open a PR in Bugzilla so it's publicly known and review so non-Phab members can follow along.

The reason why the PR was reverted is that the patch wasn't maintainer approved and the review was uncomplete.

I was assuming both you and uqs were both ttrss users so on top of reviewing the port you would point out new issues with this large update.

With that if everything looks good I'll upload a new patch to the PR.

After upgrading, I updated my config file, but I cannot run it in single user mode to update the schema.

I tried different things around
putenv(‘TTRSS_SINGLE_USER_MODE=true’);
but always without success!

Could you please put the correct one in config.php.sample?

  • Add commented SINGLE_SUER_MODE example in config.php.in

After upgrading, I updated my config file, but I cannot run it in single user mode to update the schema.

I tried different things around
putenv(‘TTRSS_SINGLE_USER_MODE=true’);
but always without success!

Could you please put the correct one in config.php.sample?

Assuming that's the copy/paste it looks like you're quotes are the open/closing single quote characters. Using ' should work there.

Thanks! I copied this sentence from the tt-rss forum, and with the used font did not notice the bad quote ;-)

With the right one, it goes further in single user mode, but the migration fails:

[07:50:35/51886] Starting migration to 141...
[07:50:35/51886] Failed on line: create table ttrss_user_prefs2 ( owner_uid integer not null, pref_name varchar(250), profile integer null, value longtext not null, foreign key (profile) references ttrss_settings_profiles(id) ON DELETE CASCADE, foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8
[07:50:35/51886] Migration failed: SQLSTATE[42000]: Syntax error or access violation: 1142 REFERENCES command denied to user 'xxxx'@'localhost' for table 'ttrss_settings_profiles'

So I had to run the migration scripts manually, connected as root: this is not very user friendly…

Furthermore, the installed scripts 143.sql, 144.sql and 145.sql do not increment the schema version, and then when you connect to tt-rss it wants to re-run the migration once more!
I had to run manually:
update ttrss_version set schema_version = 145;

Are these problems fixed in a newer version? Or is it documented somewhere?

Thanks! I copied this sentence from the tt-rss forum, and with the used font did not notice the bad quote ;-)

With the right one, it goes further in single user mode, but the migration fails:

[07:50:35/51886] Starting migration to 141...
[07:50:35/51886] Failed on line: create table ttrss_user_prefs2 ( owner_uid integer not null, pref_name varchar(250), profile integer null, value longtext not null, foreign key (profile) references ttrss_settings_profiles(id) ON DELETE CASCADE, foreign key (owner_uid) references ttrss_users(id) ON DELETE CASCADE) ENGINE=InnoDB DEFAULT CHARSET=UTF8
[07:50:35/51886] Migration failed: SQLSTATE[42000]: Syntax error or access violation: 1142 REFERENCES command denied to user 'xxxx'@'localhost' for table 'ttrss_settings_profiles'

So I had to run the migration scripts manually, connected as root: this is not very user friendly…

Furthermore, the installed scripts 143.sql, 144.sql and 145.sql do not increment the schema version, and then when you connect to tt-rss it wants to re-run the migration once more!
I had to run manually:
update ttrss_version set schema_version = 145;

Are these problems fixed in a newer version? Or is it documented somewhere?

I believe this is a mysql database user permission issue. show grants for <user> on ttrss_settings_profiles should include references? I don't believe any of the migration scripts alter/set/grant user permissions and assumed "ALL PRIVILEGES" for all ttrss tables. I have always used pgsql. I can test this assuming your user did in fact have the correct permissions.

Also, something to keep in mind, upstream is less supportive of mysql and if anything doesn't work it's possible support for that database would be dropped. I've wanted to change the default in the port to pgsql however, it seems that mysql has been the default for so long I'm hesitant to change it.

If the database user had proper permission the web ui or update.php (ttrssd) the application would have updated the schema version.

Also, with this update to the port will attempt to init and update the schema with the ttrssd. So a (re)start of ttrssd should have updated the schema. This semi-memics the process used by the ttrss docker compose.

Despite some difficulties to adapt the configuration, this port ends up working as before.

This revision is now accepted and ready to land.May 17 2021, 3:17 PM