Bug 218720 - dns/bind911, security/trousers: rcorder: Circular dependency
Summary: dns/bind911, security/trousers: rcorder: Circular dependency
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Hiroki Sato
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-04-18 03:03 UTC by Tatsuki Makino
Modified: 2018-01-25 21:51 UTC (History)
6 users (show)

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


Attachments
[patch] fix rc ordering for tpmd & tcsd (1.10 KB, patch)
2018-01-16 01:00 UTC, John Hein
no flags Details | Diff
[patch] fix rc ordering for tpmd & tcsd [v2] (790 bytes, patch)
2018-01-16 01:51 UTC, John Hein
jcfyecrayz: maintainer-approval? (hrs)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tatsuki Makino 2017-04-18 03:03:22 UTC
rc.d/tcsd requires SERVERS and asks to activate before named.
rc.d/named asks to activate before SERVERS.
Comment 1 Walter Schwarzenfeld freebsd_triage 2018-01-15 22:09:18 UTC
tcsd.in shows

# PROVIDE: tcsd
# REQUIRE: SERVERS tpmd
# BEFORE:  named hastd kerberos
# KEYWORD: shutdown

this seems solved. I think we could close.
Comment 2 Tatsuki Makino 2018-01-16 00:01:39 UTC
(In reply to w.schwarzenfeld from comment #1)

dns/bind911 has START_LATE option. I installed the option off.
When executing rcorder /etc/rc.d/* /usr/local/etc/rc.d/* under that condition, I get a message "rcorder: Circular dependency on provision `SERVERS' in file `/usr/local/etc/rc.d/tcsd'.".

There are more "rcorder: Circular dependency ..." messages now, so I don't know anymore :)
Comment 3 Walter Schwarzenfeld freebsd_triage 2018-01-16 00:18:55 UTC
You are right:
usr/local/etc/rc.d/915resolution
rcorder: Circular dependency on provision `SERVERS' in file `/usr/local/etc/rc.d/tpmd'.
/usr/local/etc/rc.d/tpmd
rcorder: Circular dependency on provision `SERVERS' in file `/usr/local/etc/rc.d/tcsd'.
Comment 4 John Hein 2018-01-16 01:00:17 UTC
Created attachment 189778 [details]
[patch] fix rc ordering for tpmd & tcsd

Here's a patch to fix ordering problems in the rc.d scripts for security/trousers (tcsd) and emulators/tpm-emulator (tpmd).  It also replaces the rc.d dependency on kerberos to be kdc instead (rc.d/kerberos was renamed to rc.d/kdc in FreeBSD 10.1).
Comment 5 John Hein 2018-01-16 01:51:42 UTC
Created attachment 189780 [details]
[patch] fix rc ordering for tpmd & tcsd [v2]

v2: Remove accidental cruft from patch.  No substantial change vs. v1.
Comment 6 John Hein 2018-01-16 02:52:58 UTC
(In reply to John Hein from comment #5)
Before this fix (attachment 189780 [details]), rcorder shows:

% rcorder /usr/local/etc/rc.d/tcsd /usr/local/etc/rc.d/tpmd /usr/local/etc/rc.d/named /etc/rc.d/* | & grep rcorder
rcorder: file `/usr/local/etc/rc.d/tcsd' is before unknown provision `kerberos'
rcorder: Circular dependency on provision `SERVERS' in file `/usr/local/etc/rc.d/tpmd'.
rcorder: Circular dependency on provision `SERVERS' in file `/usr/local/etc/rc.d/tcsd'.
Comment 7 Alfred Perlstein freebsd_committer 2018-01-16 05:29:34 UTC
Should there be a post-install or some other step during portlint or such to detect this?
Comment 8 Mathieu Arnold freebsd_committer 2018-01-16 09:59:53 UTC
They are two different ports, that have absolutely no relation, there cannot be any automatic way to detect this.

The trousers probably need to loose the SERVERS requirement.
Comment 9 Ben Woods freebsd_committer 2018-01-16 10:03:44 UTC
Awaiting Hiroki's approval of patch as maintainer.
Comment 10 Walter Schwarzenfeld freebsd_triage 2018-01-16 10:08:34 UTC
hrs (Hiroki) seems inactive, should move it back to the pool? (I see same PR belonging to him are long time open, some since 2014).
Comment 11 Walter Schwarzenfeld freebsd_triage 2018-01-16 10:27:13 UTC
similar problem here bug #216673 .
Comment 12 John Hein 2018-01-25 21:51:06 UTC
(In reply to Alfred Perlstein from comment #7)
Re: detecting this at port install time.  I think you could do something like:

rcorder /etc/rc.d/* /usr/local/etc/rc.d/* > rcorder-before-install
install rc.d script
rcorder /etc/rc.d/* /usr/local/etc/rc.d/* > rcorder-after-install

Compare before & after, and warn about any new rcorder errors.

I don't have a patch, but it doesn't seem too hard to be able to add something to QA to help with this.