Bug 192401 - dns/powerdns: fails on plist-check
Summary: dns/powerdns: fails on plist-check
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: John Marino
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-05 12:02 UTC by Michelle Sullivan
Modified: 2014-08-28 11:16 UTC (History)
2 users (show)

See Also:


Attachments
pkg-plist fix (493 bytes, patch)
2014-08-22 09:51 UTC, Ralf van der Enden
no flags Details | Diff
Fix pkg-plist for dns/powerdns-devel (391 bytes, patch)
2014-08-27 07:30 UTC, Ralf van der Enden
no flags Details | Diff
Additional patch to disable creation of .a files (464 bytes, patch)
2014-08-28 09:55 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 Michelle Sullivan 2014-08-05 12:02:49 UTC
(-devel also fails)

====> Compressing man pages (compress-man)
===> Staging rc.d startup script(s)
===========================================================================
====> Running Q/A tests (stage-qa)
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: %%LUA_LIBDIR%%/%%LUA_LIBDIR%%mydnsbackend.so
Error: Orphaned: %%LUA_LIBDIR%%/%%LUA_LIBDIR%%remotebackend.so
===> Checking for directories owned by MTREEs
===> Checking for directories handled by dependencies
===> Checking for items in pkg-plist which are not in STAGEDIR
===> Error: Plist issues found.
*** Error code 1

Stop in /usr/ports/dns/powerdns.
====>> Error: check-plist failures detected
===>  Cleaning for powerdns-3.3.1_4
Comment 1 John Marino freebsd_committer 2014-08-05 12:49:31 UTC
maintainer already notified in CC
Comment 2 Michelle Sullivan 2014-08-05 15:25:56 UTC
Patch for this: http://flashback.sorbs.net/packages/powerdns.patch

As follows:

diff -Nru powerdns.orig/pkg-plist powerdns/pkg-plist
--- powerdns.orig/pkg-plist	2014-07-24 13:34:16.000000000 -0500
+++ powerdns/pkg-plist	2014-08-05 10:06:13.000000000 -0500
@@ -34,3 +34,5 @@
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/pdns.conf
 %%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
 @dirrmtry etc/pdns
+%%LUA%%%%LUA_LIBDIR%%/%%LUA_LIBDIR%%mydnsbackend.so
+%%LUA%%%%LUA_LIBDIR%%/%%LUA_LIBDIR%%remotebackend.so


You should note that other options should have similar changes.

Regards,

Michelle
Comment 3 John Marino freebsd_committer 2014-08-07 13:45:22 UTC
now that patch exists, change state to "approval needed"
Comment 4 Ralf van der Enden 2014-08-22 09:51:28 UTC
Created attachment 146149 [details]
pkg-plist fix

This patch adds the missing experimental backends to the pkg-plist. Since staging they wont be installed if missing from pkg-plist anymore, which is probably why I missed it.
Comment 5 John Marino freebsd_committer 2014-08-22 10:20:51 UTC
moving to patch-ready for validation
Comment 6 John Marino freebsd_committer 2014-08-23 15:48:24 UTC
When non-default options are the cause of the error, it *really* helps the everyone evaluating the PR to know this information.  I ran it through poudriere without patching and it passed.  I had to read the comments to guess that the lua backend option was selected.
Comment 7 John Marino freebsd_committer 2014-08-23 15:54:54 UTC
This patch doesn't work on dns/powerdns (see below).  Can you guys check and make sure it works for each backend option set?



====> Running Q/A tests (stage-qa)
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: %%LUA_LIBDIR%%/%%LUA_LIBDIR%%luabackend.so
===> Checking for directories owned by MTREEs
===> Checking for directories handled by dependencies
===> Checking for items in pkg-plist which are not in STAGEDIR
===> Error: Plist issues found.
*** Error code 1

---Begin OPTIONS List---
===> The following configuration options are available for powerdns-3.3.1_4:
     GEO=off: Geo backend
     MYSQL=off: MySQL backend
     MYSQL_LOCAL=off: RUN_DEPEND on MySQL server
     OPENDBX=off: OpenDBX backend
     OPENLDAP=off: OpenLDAP backend
     OPENLDAP_LOCAL=off: RUN_DEPEND on OpenLDAP server
     PGSQL=on: PostgreSQL backend
     PGSQL_LOCAL=off: RUN_DEPEND on PostgreSQL server
     POLARSSL=on: Use embedded PolarSSL
     SQLITE3=off: SQLite 3 backend
     TOOLS=off: Build extra tools
====> Extra DNSSEC options
     BOTAN110=on: Faster signing + ECDSA & GOST algorithms
     CRYPTOPP=off: ECDSA algorithms
====> Options available for the group EXPERIMENTAL
     LUA=on: Lua backend
     MYDNS=off: MyDNS backend
     REMOTE=off: Remote backend
     REMOTE_HTTP=off: Enable HTTP for the Remote backed
     TINYDNS=off: TinyDNS backend
===> Use 'make config' to modify these settings
Comment 8 John Marino freebsd_committer 2014-08-23 16:11:39 UTC
wait, hold on.  I tested this wrong; it may be okay.
Comment 9 commit-hook freebsd_committer 2014-08-23 16:23:16 UTC
A commit references this bug:

Author: marino
Date: Sat Aug 23 16:23:13 UTC 2014
New revision: 365753
URL: http://svnweb.freebsd.org/changeset/ports/365753

Log:
  dns/powerdns: Fix pkg-plist when backend options are selected

  PR:		192401
  Reported by:	michelle
  Fixed by:	maintainer (Ralf van der Enden)

Changes:
  head/dns/powerdns/Makefile
  head/dns/powerdns/pkg-plist
Comment 10 John Marino freebsd_committer 2014-08-23 16:28:33 UTC
Ralf, can you provide another patch for powerdns-devel?  It looks like that one has more backends so I can't use the same patch.
Comment 11 John Marino freebsd_committer 2014-08-26 21:08:12 UTC
hi Ralf, any idea on the ETA of that powerdns-devel patch?  I'd like to close out this PR.
Comment 12 Ralf van der Enden 2014-08-27 07:30:32 UTC
Created attachment 146360 [details]
Fix pkg-plist for dns/powerdns-devel
Comment 13 Ralf van der Enden 2014-08-27 07:32:47 UTC
Sorry for the delay with the second patch. Was trying to attach the patch using py-bugz, but it doesn't work well with FreeBSD's bugzilla implementation.

Most py-bugz commands result in a long list of errors.

Besides that I was extremely busy at work.
Comment 14 John Marino freebsd_committer 2014-08-27 19:52:36 UTC
(In reply to Ralf van der Enden from comment #12)
> Created attachment 146360 [details]
> Fix pkg-plist for dns/powerdns-devel


It's not passing stage checks:

====> Running Q/A tests (stage-qa)
====> Checking for pkg-plist issues (check-plist)
===> Parsing plist
===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: %%LUA_LIBDIR%%/%%LUA_LIBDIR%%gpgsqlbackend.a
Error: Orphaned: %%LUA_LIBDIR%%/%%LUA_LIBDIR%%luabackend.a
Error: Orphaned: %%LUA_LIBDIR%%/%%LUA_LIBDIR%%pipebackend.a
===> Checking for directories owned by MTREEs
===> Checking for directories handled by dependencies
===> Checking for items in pkg-plist which are not in STAGEDIR
===> Error: Plist issues found.
*** Error code 1

Stop.
make: stopped in /usr/ports/dns/powerdns-devel



It looks like the static versions of the backends are undocumented.
Comment 15 Ralf van der Enden 2014-08-28 07:25:40 UTC
I don't know where the %%LUA_LIBDIR%% comes from in the error lines, but that's not my patch nor pkg-plist.
Comment 16 John Marino freebsd_committer 2014-08-28 07:30:31 UTC
(In reply to Ralf van der Enden from comment #15)
> I don't know where the %%LUA_LIBDIR%% comes from in the error lines, but
> that's not my patch nor pkg-plist.

Errors are not copied from pkg-plist.
They are generated.
The errors replace paths with PLIST_SUBs


What this error is saying is that you are missing 3 entries from the pkg-plist.


"Checking for items in STAGEDIR missing from pkg-plist"

That means there are 3 files in stagedir unaccounted for.

The solution is normally add them to the pkg-plist.

However, since options dictates what is installed, there could be other problems with pkg-plist not yet detected.  

Did I explain this clearly enough?
Comment 17 Michelle Sullivan 2014-08-28 08:32:15 UTC
Need to use 'Dynamic Plist' so you can add the files when the option for that file is switched on and so they won't be in the plist when the option is switched off...  Can you post the patch so far so I could take a look in about 12 hours?

Michelle
Comment 18 John Marino freebsd_committer 2014-08-28 08:44:58 UTC
(In reply to Michelle Sullivan from comment #17)
> Need to use 'Dynamic Plist' so you can add the files when the option for
> that file is switched on and so they won't be in the plist when the option
> is switched off...  Can you post the patch so far so I could take a look in
> about 12 hours?


I disagree with that.  I see absolutely no reason for a dynamic plist here.  Option substitutions are fine.  He already posted the patch (1-line).  It's missing at least 3 more lines.
Comment 19 Michelle Sullivan 2014-08-28 08:48:10 UTC
Was thinking about adding lines dynamiccally - however, I had forgotten with this patch (I started the original) that it's just add it if the option is on - inside the plist (different from how I normally do it ;-) )


Sorry..
Comment 20 John Marino freebsd_committer 2014-08-28 08:52:14 UTC
The perferred method is use static pkg-plist with option substitions.

Using PLIST_FILES+= inside the makefile is definitely not preferred.  This was part of the revolt against www/squid* ports because that port used that technique to abusive levels and the whole thing had to be converted to static pkg-plist.
Comment 21 Ralf van der Enden 2014-08-28 09:55:19 UTC
Created attachment 146438 [details]
Additional patch to disable creation of .a files

dns/powerdns has a switch in CONFIGURE_ARGS (--disable-static), which disables building of .a files for the backends. Since PowerDNS doesn't need those I added the switch (via an extra patch) to dns/powerdns-devel as well, which should remedy the pkg-plist issues.
Comment 22 commit-hook freebsd_committer 2014-08-28 10:58:23 UTC
A commit references this bug:

Author: marino
Date: Thu Aug 28 10:58:05 UTC 2014
New revision: 366392
URL: http://svnweb.freebsd.org/changeset/ports/366392

Log:
  dns/powerdns-devel: Fix stage-qa / plist-issues

  PR:		192401
  Fix by:		maintainer (Ralf van der Enden)

Changes:
  head/dns/powerdns-devel/Makefile
  head/dns/powerdns-devel/pkg-plist
Comment 23 John Marino freebsd_committer 2014-08-28 11:16:38 UTC
I also tested this with all backend options set to "ON" and it passed stage-qa checks just fine.  Thanks!