Bug 211303

Summary: dns/nsd: Build fails when IPV6 option is disabled
Product: Ports & Packages Reporter: vfx9as
Component: Individual Port(s)Assignee: Kubilay Kocak <koobs>
Status: Closed FIXED    
Severity: Affects Only Me CC: jaap, w.schwarzenfeld
Priority: --- Keywords: easy
Version: LatestFlags: koobs: maintainer-feedback+
koobs: merge-quarterly+
Hardware: Any   
OS: Any   
Attachments:
Description Flags
proposed-patch-query_c none

Comment 1 Walter Schwarzenfeld freebsd_triage 2016-07-24 21:42:04 UTC
the linked file has also an error:
/query.c:1213:54: error: too many arguments to function call, expected single argument 'zone', have 2 arguments
                zone_type *zone = domain_find_parent_zone(nsd->db, q->zone);
                                  ~~~~~~~~~~~~~~~~~~~~~~~          ^~~~~~~
./namedb.h:235:1: note: 'domain_find_parent_zone' declared here
zone_type* domain_find_parent_zone(zone_type* zone);
^
1 error generated.
--- tsig.o ---
/usr/local/libexec/ccache/world/cc -I/usr/local/include -I. -I/usr/local/include -O2 -pipe  -fstack-protector -fno-strict-aliasing -c ./tsig.c
--- query.o ---
*** [query.o] Error code 1
Comment 2 Walter Schwarzenfeld freebsd_triage 2016-07-24 21:43:06 UTC
Created attachment 172949 [details]
proposed-patch-query_c
Comment 3 vfx9as 2016-07-25 02:32:22 UTC
Did not confirm, I'm sorry

Error has disappeared in the proposed-patch-query_c-patch-query_c
Comment 4 Walter Schwarzenfeld freebsd_triage 2016-07-25 02:46:13 UTC
I patched not against the linked file, but against the original file in the port.
Comment 5 Jaap Akkerhuis 2016-07-25 08:49:45 UTC
(In reply to vfx9as from comment #0)

This is not a a bug towards the port. The port has no way to be build with IPv6 disabled. The OPTION IPV6 is a no-op and a holdover from a vary old version and should have been removed eons ago.

One can only build nsd with ipv6 disabled if one is NOT using the port. The upstream has already provided a patch for that.

At best you should reissue a bug report (or feature request) that you want an option to build the port with IPv6 disabled.

I propose this bug report to be closed.

Regards,

        jaap
Comment 6 Jaap Akkerhuis 2016-07-25 09:19:18 UTC
Oops, forgot to set the maintainer feedback flag with Comment #5
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-25 09:27:33 UTC
@Jaap, can you please submit a patch removing the IPV6 option given it is a noop and can't be built without it as per comment 5, OR alternatively, provide a backport of the upstream patch to allow for building without IPV6, leaving the option in.
Comment 8 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-25 09:30:24 UTC
Note: there's no need to create a separate issue when the issue summary describes the problem, but there exists multiple ways to resolve it. We can do that here
Comment 9 Jaap Akkerhuis 2016-07-25 10:19:39 UTC
(In reply to Kubilay Kocak from comment #7)

Given that the IPv6 Option is a no-op (the port will always build with IPv6 support, independent whether the option is set of not) and removing it doesn't solve the problem (building nsd outside the ports system with disabled IPv6) the most elegant solution is to wait at the next release and then replace the IPv6 option with an option to disable IPv6.

It will save to create a patch file which needs to be removed at the next version.

For people who want to disable IPv6 and use the port version, the proper method is to use one of the multiple ways to configure nsd not to use IPv6. (Command line option; configure file options).

(Side remark: I'm left wondering why one wants to cripple nsd by compile time disabling IPv6).
Comment 10 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-28 10:31:42 UTC
(In reply to jaap from comment #9)

The problem is the IPV6 option will remain a no-op for quarterly branch ports  users, because the quarterly branch will not receive the future versions update unless its also security or bugfix related.

Currently, the presence of an OPTION that is a noop is a ports bugs that should be fixed, doesn't require maintainer approval (blanket), and the only two ways to fix it is:

a) backport the fix from upstream, then merge it to stable.
b) remove the option

Given you don't want the port to carry a patch that will be removed in the next update (many many ports do this to fix bugs locally while waiting for the next release), I propose we:

- Remove the IPV6 option in the port (head)
- Merge that commit to stable

This fixes the POLA violation (OPTION no-op bug) in both branches, closing this issue.

Then the future update to nsd can restore the IPV6 option in head, as it will actually support being built without IPv6.

The change to remove the IPV6 option is trivial, and I can take care of it now
Comment 11 Jaap Akkerhuis 2016-07-28 10:49:41 UTC
(In reply to Kubilay Kocak from comment #10)
There is an nsd release pretty soon, so that is why I'm reluctant. to make the patch.

So, for now, just remove the IPv6 option. Thanks!
Comment 12 commit-hook freebsd_committer 2016-07-28 11:24:15 UTC
A commit references this bug:

Author: koobs
Date: Thu Jul 28 11:24:00 UTC 2016
New revision: 419211
URL: https://svnweb.freebsd.org/changeset/ports/419211

Log:
  dns/nsd: Remove IPv6 option, fixes build

  Remove the IPv6 option that is causing builds to fail when it is
  disabled. The issue does not affect package users, as it was a default
  option.

  The issue has been fixed upstream [1] and will be included/renabled
  in the next version update.

  While I'm here:

  * Switch to USES=ssl
  * Add --enable-ipv6 in CONNFIGURE_ARGS to ensure it's explicitly enabled

  [1] https://www.nlnetlabs.nl/bugs-script/show_bug.cgi?id=800

  PR:		211303
  Reported by:	<vfx9as gmail com>
  Approved by:	maintainer <jaap NLnetLabs nl>
  MFH:		2016Q3

Changes:
  head/dns/nsd/Makefile
Comment 13 commit-hook freebsd_committer 2016-07-28 11:30:19 UTC
A commit references this bug:

Author: koobs
Date: Thu Jul 28 11:30:10 UTC 2016
New revision: 419212
URL: https://svnweb.freebsd.org/changeset/ports/419212

Log:
  MFH: r419211 - dns/nsd: Remove IPv6 option, fixes build

  Remove the IPv6 option that is causing builds to fail when it is
  disabled. The issue does not affect package users, as it was a default
  option.

  The issue has been fixed upstream [1] and will be included/renabled
  in the next version update.

  While I'm here:

  * Switch to USES=ssl
  * Add --enable-ipv6 in CONFIGURE_ARGS to ensure it's explicitly enabled

  [1] https://www.nlnetlabs.nl/bugs-script/show_bug.cgi?id=800

  PR:		211303
  Reported by:	<vfx9as gmail com>
  Approved by:	maintainer <jaap NLnetLabs nl>

  Approved by:	ports-secteam (blanket)

Changes:
_U  branches/2016Q3/
  branches/2016Q3/dns/nsd/Makefile
Comment 14 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-28 11:32:22 UTC
Committed, with minor infrastructure/compliance changes

Thank you!