Bug 252733 - devel/phabricator phd daemon wrong REQUIRE
Summary: devel/phabricator phd daemon wrong REQUIRE
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Michael Gmelin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-16 04:48 UTC by Evgeny Moysevich
Modified: 2024-04-27 10:38 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (grembo)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 freebsd_triage 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:

  BUGS
       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.
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-04-27 10:37:56 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=45feeb1269ce3a009cd27c3734b7f87400123880

commit 45feeb1269ce3a009cd27c3734b7f87400123880
Author:     Michael Gmelin <grembo@FreeBSD.org>
AuthorDate: 2024-04-27 10:32:53 +0000
Commit:     Michael Gmelin <grembo@FreeBSD.org>
CommitDate: 2024-04-27 10:36:57 +0000

    devel/phabricator: Start phd after mysql

    PR:             252733
    Reported by:    Evgeny Moysevich

 devel/phabricator/Makefile     | 2 +-
 devel/phabricator/files/phd.in | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)