Bug 252733

Summary: devel/phabricator phd daemon wrong REQUIRE
Product: Ports & Packages Reporter: Evgeny Moysevich <moysevich>
Component: Individual Port(s)Assignee: Michael Gmelin <grembo>
Status: Open ---    
Severity: Affects Many People Flags: bugzilla: maintainer-feedback? (grembo)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   

Description Evgeny Moysevich 2021-01-16 04:48:21 UTC
REQUIRE for phd deaemon is set to LOGIN currently.
I believe it should be set to mysql instead, because phd depends on MySQL and shouldn't be started until MySQL is running.
Comment 1 Michael Gmelin freebsd_committer 2021-01-16 08:28:24 UTC
In general you are correct, *if* the database is running on the same host/within the same jail.

It's quite common for a database to run on a separate host though (be it in a separate jail, a separate server, or sourced from a service/cloud provider). In these cases you probably wouldn't install a mysql or mariadb server within the same instance, which causes rcorder to issue a warning:

  rcorder: requirement `mysql' in file `/usr/local/etc/rc.d/phd' has no providers.

This won't prevent the service from starting though, as rcorder(8) says:

       The "REQUIRE" keyword is misleading: It does not describe which daemons
       have to be running before a script will be started.  It describes which
       scripts must be placed before it in the dependency ordering.  For
       example, if your script has a "REQUIRE" on "named", it means the script
       must be placed after the "named" script in the dependency ordering, not
       necessarily that it requires named(8) to be started or enabled.

I'm happy to change the rc script to "require" mysql, but it would still be nice if there was a way to make this work in a clean/configurable way.