Bug 218078 - [patch] net/ntp Use CONFIGURE_ENABLE instead of CONFIGURE_ON to handle refclock options
Summary: [patch] net/ntp Use CONFIGURE_ENABLE instead of CONFIGURE_ON to handle refclo...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Cy Schubert
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-03-24 17:41 UTC by Ian Lepore
Modified: 2017-05-21 18:49 UTC (History)
0 users

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


Attachments
Use CONFIGURE_ENABLE instead of CONFIGURE_ON (390 bytes, patch)
2017-03-24 17:41 UTC, Ian Lepore
no flags Details | Diff
Add a list of refclock drivers to enable by default; separate driver vs other options. (2.08 KB, patch)
2017-03-24 22:49 UTC, Ian Lepore
no flags Details | Diff
Add a list of refclock drivers to enable by default; separate driver vs other options. (1.53 KB, patch)
2017-03-24 22:51 UTC, Ian Lepore
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Lepore freebsd_committer 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 2017-03-24 21:27:16 UTC
Committed. Thanks Ian.
Comment 2 commit-hook freebsd_committer 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 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 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 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 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