Bug 203931 - [PATCH] dns/knot2 enable multiple instances in rc.d script
Summary: [PATCH] dns/knot2 enable multiple instances in rc.d script
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: Alexey Dokuchaev
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2015-10-21 15:10 UTC by Chad Jacob Milios
Modified: 2016-02-11 02:41 UTC (History)
4 users (show)

See Also:
freebsd: maintainer-feedback+


Attachments
svn diff of dns/knot2 (4.35 KB, patch)
2015-10-21 15:10 UTC, Chad Jacob Milios
no flags Details | Diff
svn diff of dns/knot2 (3.82 KB, patch)
2015-10-23 00:37 UTC, Chad Jacob Milios
no flags Details | Diff
svn diff of dns/knot2 (3.72 KB, patch)
2015-12-11 02:46 UTC, Chad Jacob Milios
freebsd: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chad Jacob Milios 2015-10-21 15:10:50 UTC
Created attachment 162293 [details]
svn diff of dns/knot2

Activation of non-default option DNSTAP leads to build failure on 9.3-RELEASE/amd64 (as far as I know, perhaps other hardware archs too). Added a conditional USE_GCC=4.8+ if DNSTAP is set and COMPILER_TYPE is gcc.

Replaced rc.d script with one allowing multiple instances to be started and managed. This necessitated a bump to PORTREVISION.
Comment 1 commit-hook freebsd_committer freebsd_triage 2015-10-22 14:58:17 UTC
A commit references this bug:

Author: danfe
Date: Thu Oct 22 14:57:42 UTC 2015
New revision: 399986
URL: https://svnweb.freebsd.org/changeset/ports/399986

Log:
  Unbreak the build with (non-default) DNSTAP option set.  The root cause
  here is that `kdig_CPPFLAGS += $(DNSTAP_CFLAGS)' line is missing from the
  `src/Makefile.am' file (and thus pre-generated `src/Makefile.in') which
  should contain "$libfstrm_CFLAGS $libprotobuf_c_CFLAGS" set by configure
  script.

  As I'd rather avoid patching `src/Makefile.in' and don't want to request
  regeneration thereof, provide DNSTAP_CPPFLAGS explicitly for the moment,
  while ideally this bug should be fixed upstream.  Add an accompanying XXX
  comment about it.

  PR:	203931 (partially)

Changes:
  head/dns/knot2/Makefile
Comment 2 Alexey Dokuchaev freebsd_committer freebsd_triage 2015-10-22 15:02:34 UTC
Hmm, activation of non-default option DNSTAP does indeed lead to a build failures (and not just on 9.3, it happens on 10.X as well), but AFAICT it is because `kdig_CPPFLAGS += $(DNSTAP_CFLAGS)' line is missing from `src/Makefile.am' file (and thus pre-generated `src/Makefile.in') which should contain "$libfstrm_CFLAGS $libprotobuf_c_CFLAGS" set by configure script.

I've provided it explicitly in ports r399986 for the time being, as patching those files would result in higher line count.  Ideally this bug should be fixed upstream.
Comment 3 Chad Jacob Milios 2015-10-23 00:31:39 UTC
I apologize for putting two totally unrelated changes into this one PR. Thanks for finding the root cause of the dnstap breakage and fixing it so quickly, Alexey.

So, my quick fix just masked the problem because USE_GCC with a gcc not in base ends up adding -I${LOCALBASE}/include (the value of DNSTAP_CPPFLAGS). Glad this doesn't actually require the GPL3 gcc to be used on 9.x.

While I may be the only one interested in running multiple instances of Knot on the same FreeBSD system without relying on jails to do it, this improved rc.d script should allow use of Knot in many split-horizon scenarios and requires no configuration changes to work with the common single-use case.
Comment 4 Chad Jacob Milios 2015-10-23 00:37:14 UTC
Created attachment 162371 [details]
svn diff of dns/knot2

this enhances the rc.d script with multi-instance support. removed the part of my earlier patch for which a fix has been already committed to port.
Comment 5 Kubilay Kocak freebsd_committer freebsd_triage 2015-10-23 11:54:30 UTC
Assign to committer taking care of issue
Comment 6 Chad Jacob Milios 2015-12-11 02:46:49 UTC
Created attachment 164100 [details]
svn diff of dns/knot2

same output. rebased patch after update to port in HEAD
Comment 7 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-11 08:32:32 UTC
Attachment 164100 [details] pending maintainer approval (timeout timer starting 2015-12-11)
Comment 8 Leo Vandewoestijne 2015-12-19 20:20:19 UTC
Comment on attachment 164100 [details]
svn diff of dns/knot2

Personally I'm not a fan of this, but after testing, it -so far- all works fine.
So thank you for your contribution.
Comment 9 Leo Vandewoestijne 2015-12-19 20:22:57 UTC
Comment on attachment 164100 [details]
svn diff of dns/knot2

I don't see the given approval, so (hopefully) by these.
Comment 10 Kurt Jaeger freebsd_committer freebsd_triage 2016-02-11 02:41:20 UTC
Committed, thanks.
Comment 11 commit-hook freebsd_committer freebsd_triage 2016-02-11 02:41:27 UTC
A commit references this bug:

Author: pi
Date: Thu Feb 11 02:40:57 UTC 2016
New revision: 408674
URL: https://svnweb.freebsd.org/changeset/ports/408674

Log:
  dns/knot2: enable multiple instances in rc.d script

  PR:		203931
  Submitted by:	Chad J. Milios <milios@ccsys.com>
  Approved by:	Leo Vandewoestijne <freebsd@dns-lab.com> (maintainer)

Changes:
  head/dns/knot2/Makefile
  head/dns/knot2/files/knot.in