Bug 211147 - dns/powerdns: Update to 4.0.1
Summary: dns/powerdns: Update to 4.0.1
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Jason Unovitch
URL:
Keywords: needs-patch
Depends on: 214408
Blocks:
  Show dependency treegraph
 
Reported: 2016-07-15 19:54 UTC by Ralf van der Enden
Modified: 2017-01-18 00:03 UTC (History)
5 users (show)

See Also:
koobs: maintainer-feedback? (tremere)
junovitch: merge-quarterly-


Attachments
Update to 4.0.0 (73.30 KB, patch)
2016-07-15 19:54 UTC, Ralf van der Enden
no flags Details | Diff
buildlog (79.59 KB, text/plain)
2016-07-15 19:56 UTC, Ralf van der Enden
no flags Details
update to 4.0.0 with pkg-plist fix (73.40 KB, patch)
2016-07-16 11:10 UTC, Ralf van der Enden
tremere: maintainer-approval+
Details | Diff
update to 4.0.1 (71.10 KB, patch)
2016-08-10 07:32 UTC, Ralf van der Enden
tremere: maintainer-approval+
Details | Diff
update to 4.0.1 (corrected patch) (71.12 KB, patch)
2016-08-10 11:07 UTC, Ralf van der Enden
tremere: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf van der Enden 2016-07-15 19:54:21 UTC
Created attachment 172561 [details]
Update to 4.0.0

Update to PowerDNS Authoritive Server 4.0.0

Massive changelog can be found here: https://doc.powerdns.com/md/changelog/#powerdns-authoritative-server-400

This new version introduces several config changes, which will make powerdns fail if not taken care of after upgrading. This warrants an entry in UPDATING IMO.

Other notable changes:
- Backends Geo and LMDB have been dropped
- The internally used Lua engine can now either be regular Lua or Luajit (also used for the Luabackend if enabled)
- Protobuf support, which builds an additional tool (dnspcap2protobuf)
- OpenSSL (base or port; LibreSSL is also supported) is used for DNSSEC support. PowerDNS no longer requires Botan or PolarSSL.
- New backend godbc which uses unixODBC.
Comment 1 Ralf van der Enden 2016-07-15 19:56:46 UTC
Created attachment 172562 [details]
buildlog
Comment 2 Ralf van der Enden 2016-07-16 11:10:50 UTC
Created attachment 172576 [details]
update to 4.0.0 with pkg-plist fix

Found a problem with pkg-plist when TOOLS is disabled. This patch remedies that.
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2016-07-16 11:20:00 UTC
@Ralf, can you split the patch into one that provides the plist fix and the other which does the update, so that the former can be MFH'd (merged) to the quarterly branch.

If you could also provide text for the UPDATING entry, that would be great.

Also:

* Dont forget to set maintainer-approval to + on attachments for ports you are maintainer of
* QA/build logs as attachments are no longer needed. Just confirm them in your description/comment like:

portlint: OK (looks fine.)
porttest: OK (poudriere: <versions>, <archs> tested)
Comment 4 Ralf van der Enden 2016-07-16 12:27:32 UTC
The --with-protobuf is new since 4.0.0, so it's part of the 4.0.0 upgrade, but I only noticed it when I disabled TOOLS myself.

Splitting the patch in two separate ones will be something I wont have time for at the moment. I wont have access to a PC for the next couple of weeks.
Comment 5 Pawel Pekala freebsd_committer 2016-07-29 16:26:38 UTC
Fails to build on FreeBSD 9.x:
http://people.freebsd.org/~pawel/buildlogs/powerdns-4.0.0-9amd64.log

Where builds, there is problem with plist:

====> Running Q/A tests (stage-qa)
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: %%LUA_LIBDIR%%/pdns/%%LUA_LIBDIR%%luabackend.so
===> Error: Plist issues found.
*** Error code 1
Comment 6 Ralf van der Enden 2016-08-05 08:03:37 UTC
I could really use some advice. FreeBSD 9.3 doesn't support C++11 out-of-the-box, but this is exactly what is required for powerdns 4.0.0+ and powerdns-recursor 4.0.0+.

Adding USES+=compiler:c++11-lib to both ports doesn't work and causes linking errors, but also adding USE_GCC=4.9 remedies that. Unfortunately it still causes issues on 9.3 i386 (probably due to mixing of libstdc++ from base and gcc).

Does it make sense to create new ports (or copy the existing ones to .ie dns/powerdns3 and dns/powerdns-recursor3) for the 4.x branch or just mark it BROKEN for 9.3 ?
Comment 7 Pawel Pekala freebsd_committer 2016-08-05 18:24:11 UTC
(In reply to Ralf van der Enden from comment #6)

If build issues on 9.x can't be fixed by USES=compiler or simple patching
it's ok to mark port as BROKEN.
Comment 8 Jason Unovitch freebsd_committer 2016-08-10 02:19:37 UTC
Take for follow on.

Can you look at bumping this to 4.0.1? See https://blog.powerdns.com/2016/07/29/powerdns-authoritative-server-4-0-1-released/. There's a bug I just addressed in http://www.vuxml.org/freebsd/7d08e608-5e95-11e6-b334-002590263bf5.html and I'd like to get this port bumped soon.

Additionally, given the scope of this 3.x -> 4.x update I think it would be prudent to leave quarterly on 3.x.x and just backport the CVE-2016-6172 fix  from https://github.com/PowerDNS/pdns/pull/4134/commits/a014f4c224a7b21f1c648257d1fd1128413129aa.  Do you agree with that approach?
Comment 9 Ralf van der Enden 2016-08-10 07:32:29 UTC
Created attachment 173486 [details]
update to 4.0.1

Recently 4.0.1 was released. I also (hopefully) fixed compilation on FreeBSD 9.3 which lacks a C++11 compiler in base.
Comment 10 Ralf van der Enden 2016-08-10 07:42:02 UTC
Suggested text for /usr/ports/UPDATING:

201608xx:
  AFFECTS: users of dns/powerdns-*
  AUTHOR: tremere@cainites.net

  PowerDNS Authoritive Server and Recursor 4.0.0+ introduce significant
  changes to the configuration files, which need to be handled before restarting
  the services. As from the Recursor changelog, "The Lua hook infrastructure
  was redone using LuaWrapper; old scripts will no longer work, but new scripts
  are easier to write under the new interface."
Comment 11 Ralf van der Enden 2016-08-10 11:07:40 UTC
Created attachment 173493 [details]
update to 4.0.1 (corrected patch)

Forgot to add the USE_GCC=4.9+ like I did for dns/powerdns-recursor
Comment 12 commit-hook freebsd_committer 2016-08-15 01:39:51 UTC
A commit references this bug:

Author: junovitch
Date: Mon Aug 15 01:39:16 UTC 2016
New revision: 420208
URL: https://svnweb.freebsd.org/changeset/ports/420208

Log:
  dns/powerdns: update 3.4.9 -> 4.0.1

  - Mark BROKEN on FreeBSD 9
  - Option changes:
    - Add USE=ssl, PowerDNS no longer requires embedded PolarSSL or Botan
    - Remove GEO and LMDB backends
    - Add UNIXODBC option for the GODBC backend
    - The internal Lua engine can be regular Lua or Luajit
    - Add PROTOBUF option which builds an extra tool (dnspcap2protobuf)

  Changes:	https://doc.powerdns.com/md/changelog/#powerdns-authoritative-server-400
  		https://doc.powerdns.com/md/changelog/#powerdns-authoritative-server-401

  PR:		211147
  Submitted by:	Ralf van der Enden <tremere@cainites.net> (maintainer)
  Security:	CVE-2016-6172
  Security:	https://vuxml.FreeBSD.org/freebsd/7d08e608-5e95-11e6-b334-002590263bf5.html

Changes:
  head/dns/powerdns/Makefile
  head/dns/powerdns/distinfo
  head/dns/powerdns/files/patch-pdns_dnspacket.cc
  head/dns/powerdns/files/pdns.conf
  head/dns/powerdns/pkg-plist
Comment 13 commit-hook freebsd_committer 2016-08-15 01:41:55 UTC
A commit references this bug:

Author: junovitch
Date: Mon Aug 15 01:40:52 UTC 2016
New revision: 420210
URL: https://svnweb.freebsd.org/changeset/ports/420210

Log:
  UPDATING: document PowerDNS changes in the 3.x -> 4.x update

  PR:		211147 211148
  Submitted by:	Ralf van der Enden <tremere@cainites.net> (PowerDNS maintainer)

Changes:
  head/UPDATING
Comment 14 Jason Unovitch freebsd_committer 2016-08-15 01:47:29 UTC
The attached patch didn't compile on 9.x either for amd64 or i386.  I temporarily removed the conditional check for less than FreeBSD 10 and just marked it broken.  Can you double check the C++11 options you had originally for 9.x?
Comment 15 Ralf van der Enden 2016-08-20 21:10:30 UTC
I'm at a loss why it doesn't work. The only thing I can come up with is the fact that I'm building against LibreSSL (which needs a patch; I'll submit that soon in a separate PR). I previously had DEFAULT_VERSION=gcc=4.9 in my make.conf, but after removing that it automagically worked for me using poudriere.

Work is hectic at the moment, so I'm not sure when I have time to dig into the 9.3 issue again.
Comment 16 Ralf van der Enden 2016-11-25 08:18:22 UTC
Created PR 214408 to fix compilation on FreeBSD 9.3 and fix a memleak when using the pgsql backend.
Comment 17 Jason Unovitch freebsd_committer 2016-11-29 23:26:59 UTC
PR #214408 was closed. 
Set merge-quarterly- as we never updated 3.x -> 4.x on 2016Q3.
Comment 18 Jason Unovitch freebsd_committer 2016-11-29 23:29:03 UTC
Oops. Reopen and set appropriate "depends on". That was powerdns-recursor that was fixed on 9.3.
Comment 19 Ralf van der Enden 2017-01-18 00:03:40 UTC
PR 216236 replaces this one.