Bug 238011

Summary: dns/bind914: mount/copy plugin libraries in chroot [PATCH]
Product: Ports & Packages Reporter: Ryan <ryan>
Component: Individual Port(s)Assignee: Mathieu Arnold <mat>
Status: Closed FIXED    
Severity: Affects Some People Flags: bugzilla: maintainer-feedback? (mat)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch for the init script to handle the plugin libraries none

Description Ryan 2019-05-21 03:20:08 UTC
Created attachment 204498 [details]
Patch for the init script to handle the plugin libraries

BIND 9.14 introduced a plugin mechanism which allows some functionality to be moved to external libraries.  The first example of this is the filter-aaaa.so plugin.  When running BIND in a chroot, these plugins do not get mounted/copied into the chroot, which can lead to problems.  I've attached a simple patch for the init script which is modeled off of how the OpenSSL engines get mounted.
Comment 1 Mathieu Arnold freebsd_committer 2019-05-27 08:36:16 UTC
If you could rework the patch to extract the mounting/copying and the umounting in separate functions, it would be great, so I will not have to do it :-p

If you cannot, do not worry, I will do it ;-)
Comment 2 commit-hook freebsd_committer 2019-06-11 12:19:12 UTC
A commit references this bug:

Author: mat
Date: Tue Jun 11 12:18:37 UTC 2019
New revision: 503955
URL: https://svnweb.freebsd.org/changeset/ports/503955

Log:
  Fix named when using plugins and chroot.

  BIND9 introduced plugins and migrated the filter-aaaa feature to a
  plugin.
  As it loads its plugins late in the startup process (read after chroot),
  the plugins need to be available in the chroot.

  Also, refactor the code now that a second directory need to be handled.

  PR:		238011
  Reported by:	ryan@timewasted.me
  MFH:		2019Q2

Changes:
  head/dns/bind9-devel/Makefile
  head/dns/bind9-devel/files/named.in
  head/dns/bind914/Makefile
  head/dns/bind914/files/named.in
Comment 3 commit-hook freebsd_committer 2019-06-11 12:20:15 UTC
A commit references this bug:

Author: mat
Date: Tue Jun 11 12:19:41 UTC 2019
New revision: 503956
URL: https://svnweb.freebsd.org/changeset/ports/503956

Log:
  MFH: r503955

  Fix named when using plugins and chroot.

  BIND9 introduced plugins and migrated the filter-aaaa feature to a
  plugin.
  As it loads its plugins late in the startup process (read after chroot),
  the plugins need to be available in the chroot.

  Also, refactor the code now that a second directory need to be handled.

  PR:		238011
  Reported by:	ryan@timewasted.me

Changes:
_U  branches/2019Q2/
  branches/2019Q2/dns/bind9-devel/Makefile
  branches/2019Q2/dns/bind9-devel/files/named.in
  branches/2019Q2/dns/bind914/Makefile
  branches/2019Q2/dns/bind914/files/named.in