Bug 218078

Summary: [patch] net/ntp Use CONFIGURE_ENABLE instead of CONFIGURE_ON to handle refclock options
Product: Ports & Packages Reporter: Ian Lepore <ian>
Component: Individual Port(s)Assignee: Cy Schubert <cy>
Status: Closed FIXED    
Severity: Affects Some People Keywords: patch
Priority: --- Flags: bugzilla: maintainer-feedback? (cy)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Use CONFIGURE_ENABLE instead of CONFIGURE_ON
none
Add a list of refclock drivers to enable by default; separate driver vs other options.
none
Add a list of refclock drivers to enable by default; separate driver vs other options. none

Description Ian Lepore freebsd_committer freebsd_triage 2017-03-24 17:41:51 UTC
Created attachment 181152 [details]
Use CONFIGURE_ENABLE instead of CONFIGURE_ON

The current use of CONFIGURE_ON to handle refclock options allows adding a refclock that is off by default, but doesn't allow a user to eliminate refclocks that ntpd includes by default.

Using CONFIGURE_ENABLE instead of CONFIGURE_ON will add the proper --disable-REFCLOCKNAME to the args when the user disables default-on options.
Comment 1 Cy Schubert freebsd_committer freebsd_triage 2017-03-24 21:27:16 UTC
Committed. Thanks Ian.
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-03-24 21:27:40 UTC
A commit references this bug:

Author: cy
Date: Fri Mar 24 21:26:52 UTC 2017
New revision: 436859
URL: https://svnweb.freebsd.org/changeset/ports/436859

Log:
  Use CONFIGURE_ENABLE instead of CONFIGURE_ON.

  The current use of CONFIGURE_ON to handle refclock options allows
  adding a refclock that is off by default, but doesn't allow a user
  to eliminate refclocks that ntpd includes by default.

  Using CONFIGURE_ENABLE instead of CONFIGURE_ON will add the proper
  --disable-REFCLOCKNAME to the args when the user disables default-on
  options.

  PR:		218078
  Submitted by:	ian@

Changes:
  head/net/ntp/Makefile
  head/net/ntp-devel/Makefile
Comment 3 Ian Lepore freebsd_committer freebsd_triage 2017-03-24 22:49:23 UTC
Created attachment 181171 [details]
Add a list of refclock drivers to enable by default; separate driver vs other options.

I'm sorry, I just realized that submitting that diff in isolation from related diffs causes a change in behavior for the port:  most of the refclock drivers that were compiled in by default before and not now; because they're not in the port's default options list they get configured off.

So the new attached diff amounts to a bugfix for that problem, plus it also separates the driver name options from the other options.

This time I diffed the config.h before my previous change and after this patch, and now they're identical again. (I should have done that last time; my bad.)
Comment 4 Ian Lepore freebsd_committer freebsd_triage 2017-03-24 22:51:30 UTC
Created attachment 181172 [details]
Add a list of refclock drivers to enable by default; separate driver vs other options.

This time the diff doesn't inappropriately contain unrelated changes to Makefile.
Comment 5 Ian Lepore freebsd_committer freebsd_triage 2017-03-25 01:50:30 UTC
Reopening due to my original patch causing most refclocks drivers to be eliminated from ntpd, and now there is a new patch that corrects it.
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-03-25 07:51:20 UTC
A commit references this bug:

Author: cy
Date: Sat Mar 25 07:50:54 UTC 2017
New revision: 436887
URL: https://svnweb.freebsd.org/changeset/ports/436887

Log:
  r436859 removed a bunch of refclock drivers that were enabled by
  default. (New patch from ian@.)

  While here ian@ and I discussed the www/libwww libmd5 dependency. It
  turns out that if the sntp configure script finds libmd5, it uses it.
  This is now an option to include the dependency.

  While working on the libmd5 dependency it was discovered that the
  sntp build requires SSL only if it finds libmd5. This is now an
  IMPLIES.

  Thanks to ian@ for the additional patch and for discovering the
  libmd5 check, pointing me in the right direction to solve the without
  SSL breakage.

  PR:		218078
  Submitted by:	ian@ (default driver options)
  Discussed with:	ian@ (libmd5 dependency)

Changes:
  head/net/ntp/Makefile
  head/net/ntp/Makefile.inc