Bug 208410

Summary: www/tt-rss script should not check for local database
Product: Ports & Packages Reporter: john
Component: Individual Port(s)Assignee: Thierry Thomas <thierry>
Status: Closed FIXED    
Severity: Affects Some People Flags: thierry: maintainer-feedback+
Priority: ---    
Version: Latest   
Hardware: amd64   
OS: Any   
Attachments:
Description Flags
modified ttrssd file
none
Replace DBLOCAL option by a flag none

Description john 2016-03-30 23:28:06 UTC
Created attachment 168802 [details]
modified ttrssd file

The script tries to verify that a local database is running. However, I run my database in a separate jail, so I have to delete the ttrssd_prestart check just to get it to think about running. If you really want to verify that the DB is available, then a helper script should probably be created to test this separately using the actual config file instead of assuming a local database.
Comment 1 Thierry Thomas freebsd_committer freebsd_triage 2016-04-04 15:46:56 UTC
Have you tried the option DBLOCAL?
It defaults to local, but its purpase should be what you need.
Comment 2 john 2016-04-04 16:05:49 UTC
I don't see why that is a compile-time option. The flag shouldn't change any code or dependencies at compile time. If you are going to provide something like that, shouldn't it at least be an rc.conf option?

Also, I installed through the pkg command, so changing this flag using portmaster or the make install process is not intuitive at all.

Would you like me to take a try at getting it work using the rc.conf variable?
Comment 3 Thierry Thomas freebsd_committer freebsd_triage 2016-04-11 20:06:25 UTC
Please look at revision 356397:
https://svnweb.freebsd.org/ports?view=revision&revision=356397

It has been reported that sometimes the dæmon is launched before the database get available. Your patch is reverting this check.
Comment 4 john 2016-04-11 20:42:28 UTC
Yes, my point in comment #2 is that it doesn't make sense that this is a compile time option. This should be runtime option. I agree that my existing file as attached does not help everybody and likely would hurt most users of the default install.

What I am suggesting now is to remove the DBLOCAL use flag and instead modify files/ttrssd.in to take a run.conf configuration option instead.
Comment 5 Thierry Thomas freebsd_committer freebsd_triage 2016-04-13 19:51:30 UTC
OK, I see your point. I shall try to replace this option by a flag.
Comment 6 Thierry Thomas freebsd_committer freebsd_triage 2016-04-13 20:34:32 UTC
Created attachment 169301 [details]
Replace DBLOCAL option by a flag

Could you please check the proposed patch?
Comment 7 john 2016-04-13 21:29:26 UTC
Looks good to me. You may want to update files/pkg-message.in to note the change as well for people upgrading.
Comment 8 Thierry Thomas freebsd_committer freebsd_triage 2016-04-14 19:19:40 UTC
Committed, thanks for the report!
Comment 9 commit-hook freebsd_committer freebsd_triage 2016-04-14 19:20:03 UTC
A commit references this bug:

Author: thierry
Date: Thu Apr 14 19:19:37 UTC 2016
New revision: 413313
URL: https://svnweb.freebsd.org/changeset/ports/413313

Log:
  Replace the option DBLOCAL by a flag in /etc/rc.conf.

  PR:		208410
  Submitted by:	john (at) johnanddalene.net

Changes:
  head/UPDATING
  head/www/tt-rss/Makefile
  head/www/tt-rss/files/pkg-message.in
  head/www/tt-rss/files/ttrssd.in