Bug 239144 - Identify generic RC framework extensions to improve ports script debugging
Summary: Identify generic RC framework extensions to improve ports script debugging
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs mailing list
URL:
Keywords: dogfood, feature, needs-qa
Depends on:
Blocks: 239124 239126 239127
  Show dependency treegraph
 
Reported: 2019-07-11 15:43 UTC by Tara
Modified: 2019-07-15 13:27 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tara 2019-07-11 15:43:00 UTC
This is supposed to be a blocker bug for

#239126
#239127
#239124

to come up with a nicer/global way of handling figuring out why a port doesn't startup.

* Problem:

Right now, if a port/service doesn't start for whatever reason, other than sh -x  <rc script> one is sort of left out in the cold.  A lot of services that use daemon have the -f flag, which outputs to /dev/null which further complicates tracking down why some service didn't startup.

* Possible Solution

Have a service name debug command, that when run would set -x and redirect stderr/stdout from the service in question to the controlling tty.

This particular solution would likely require touching /usr/sbin/daemon and service.

Other/better thoughts and solutions are encouraged.

* Status

No patches or proof of concept(s) are created at this time.
Comment 1 Baptiste Daroussin freebsd_committer 2019-07-15 13:26:01 UTC
Add DEBUG_SCRIPT=yes to pkg.conf and you have exactly that.
Comment 2 Baptiste Daroussin freebsd_committer 2019-07-15 13:27:50 UTC
DEBUG_SCRIPTS=yes

I do mean