| Summary: | www/tt-rss: Missing dependencies, wrong filenames and default permissions | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Ports & Packages | Reporter: | Ulrich Spörlein <uqs> | ||||||||||
| Component: | Individual Port(s) | Assignee: | Ulrich Spörlein <uqs> | ||||||||||
| Status: | Closed FIXED | ||||||||||||
| Severity: | Affects Many People | CC: | dereks | ||||||||||
| Priority: | --- | Keywords: | needs-qa | ||||||||||
| Version: | Latest | Flags: | koobs:
maintainer-feedback+
koobs: merge-quarterly? |
||||||||||
| Hardware: | Any | ||||||||||||
| OS: | Any | ||||||||||||
| URL: | https://reviews.freebsd.org/D26061 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Ulrich Spörlein
2020-08-11 13:44:40 UTC
I believe the original intent was to not use the web interface to init. the database and write out the config.php which is where you're running in to issues with config.php-dist. You can see this via the pkg-message. Edit config.php as needed and init. the database via psql command as the postgres user with the proper schema file, database, user. So is there a need to support the web interface here? If not the existing config.php.sample and config.php can remain as is. Yep, I was looking at include/sanity_check.php for requirements didn't realize there's a couple other places to look and my existing installation had iconv for other reasons. So yep we need to add iconv to USE_PHP. We'll need an @dir( ... cache/images) here too.. oops. Yes it appears some of those root owned dirs/files are from mkdir -p created locations maybe? I see a couple other changes that semi-break the reconfig of pgsql/mysql on the fly in the dist/sample and it appears the apache sample config is a little dated. See patch for resolving 1 and 3. Should we ignore 2? Created attachment 217163 [details]
First pass at fixing issues with a fresh install
^Triage: Reporter is committer, assign accordingly. Any committer may commit to any repository with an accepted review from any committer with existing access to that repository. Committers may obtain review via a Differential in Phabricator, adding the "Contributor Reviewers ($Repository)" group as a Reviewer, reaching out to other committers; directly or via mailing lists, or setting the attachment flag to: maintainer-approval ? <person-youd-like-to-review> Hi Derek, thanks for looking at this. The patch looks good to me for (1) and (3) (I haven't used the apache config, as I'm running this under nginx). As for (2), I think we should fix it, especially as: - the fix is trivial, just don't rename the file, and - the web-based setup seems more documented online and apparently is what the developers of tt-rss support, and - that web-based setup correctly flagged the missing iconv module, so it's a good thing :) It was also easier to setup and init the database. I rarely need to use the psql or mysql CLIs so not having to deal with them is a plus :) Is there a reason the file is being renamed in the first place? That seems a bit gratuitous. If the changed name is really required, I would suggest to copy/link instead of renaming it, so both dist or sample files are present (and updated). What do you think? (In reply to Ulrich Spörlein from comment #4) I'll create a review for this and we'll take the discussion there. Created attachment 217224 [details]
Current patch from phab diff
- Default permissions for cache/images broken on new installations
- Permissions on misc dirs not set to www:www
- apache sample updated with 2.4 syntax
- Add missing PHP extension iconv
- patch web isntaller to make config.php 0400
- Use modern port settings mechinisms
- Don't copy .empty files
- Clean up pkg-plist to be root:www and www:www where write is needed
- Don't try to edit config.php-dist on the fly. Leave that to admin post
install or use the web installer.
- Keep config.php-dist around for the web installer
- Rewrite inscrutions to support the web installer by opt-in by
deleting config.php created by @sample
Created attachment 217250 [details]
v3 from Phab diff. Fixing pkg-message and changing base directory permissions
- Add missing % in pkg-message.in from rm line.
- Make the base directory root:www 0755.
Since the web installer can't create config.php now remove the patch to make it 0400
Created attachment 217330 [details]
v4 final Patch from D26061
- apache sample updated with 2.4 syntax
- Add missing PHP extension iconv
- Use alt. options for MYSQL/PGSQL, CURL, GD
- Don't copy .empty files from extracted dist
- Update pkg-message for web installer support
- root:www all files, www:www user rw where needed
A commit references this bug: Author: uqs Date: Fri Aug 21 13:55:17 UTC 2020 New revision: 545598 URL: https://svnweb.freebsd.org/changeset/ports/545598 Log: www/tt-rss: Fix default permissions, apache sample, add missing iconv dep. PR: 248601 Submitted by: maintainer Reported by: uqs Differential Revision: https://reviews.freebsd.org/D26061 Changes: head/www/tt-rss/Makefile head/www/tt-rss/files/httpd-tt-rss.conf.in head/www/tt-rss/files/pkg-message.in head/www/tt-rss/pkg-plist Thanks for the fix! |