Bug 204220 - [PATCH] net-mgmt/collectd5: change options support
Summary: [PATCH] net-mgmt/collectd5: change options support
Status: Closed FIXED
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
Keywords: patch, patch-ready
Depends on: 204708
  Show dependency treegraph
Reported: 2015-11-02 10:52 UTC by Krzysztof
Modified: 2015-12-29 18:51 UTC (History)
2 users (show)

See Also:

collectd5.patch to add options framework (21.10 KB, patch)
2015-11-02 10:52 UTC, Krzysztof
ports: maintainer-approval+
Details | Diff
collectd5.patch to add options framework (v2) (18.61 KB, patch)
2015-11-09 04:27 UTC, Jason Unovitch
no flags Details | Diff
WIP: Switch PERL/PYTHON over to option helpers (v3) (1.50 KB, patch)
2015-11-16 03:54 UTC, Jason Unovitch
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysztof 2015-11-02 10:52:59 UTC
Created attachment 162696 [details]
collectd5.patch to add options framework

I've rewrite Makefile (with support of Jason Unovich) to support new options framework. It seems that works corrctly. I've made some tests with this new Makefile as you can see at https://rtm.bsdserwis.com/poudriere/data/a1amd64-testing/2015-11-02_11h42m36s/logs/collectd5-5.5.0_4.log
Comment 1 Krzysztof 2015-11-02 10:54:01 UTC
Comment on attachment 162696 [details]
collectd5.patch to add options framework

correct patch name
Comment 2 Jason Unovitch freebsd_committer 2015-11-09 04:27:19 UTC
Created attachment 162914 [details]
collectd5.patch to add options framework (v2)

Status Update:
At this point I need to look into what is going on with the variable expansion not working for PERL_CONFIGURE_WITH and PYTHON_CONFIGURE_WITH.

Both MONGODB and VARNISH options appear to be broken.  I suspect the www/varnish4 4.0.x -> 4.1.x version bump 2 weeks ago broke this option.  I haven't got to the bottom of the MONGODB option issues just yet.

If you can look at the MONGODB and VARNISH that would be helpful.  I'll look into what is going on with the options framework that is preventing this from properly expanding variables.

Patch changes:
- No need to bump PORTREVISION since we aren't changing the end user package
- Remove USERS mention all together since we just have '--enable-users' in the global section
- Comment out PERL/PYTHON for now and use the old PORT_OPTIONS variants until I can troubleshoot what's going on behind the scenes
- Fix whitespace changes accidentally introduces on all the '--without-*' lines
Comment 3 Krzysztof 2015-11-13 00:35:04 UTC
OK, I've made some tests with mongodb and varnish. You can caheck them at https://rtm.bsdserwis.com/poudriere/data/a1amd64-testing/2015-11-13_01h10m32s/logs/collectd5-5.5.0_3.log and https://rtm.bsdserwis.com/poudriere/data/a1amd64-testing/2015-11-13_01h30m42s/logs/collectd5-5.5.0_3.log There is no errors :-/

And also beasuse tou removed USERS option pkg-plist should be modified to remove %%USERS%%. But this I will add when we finish these tests and solve problems with options framework :-))
Comment 4 Jason Unovitch freebsd_committer 2015-11-15 15:40:05 UTC
(In reply to Krzysztof from comment #3)
The version in the test there was varnish4-4.0.3_7 and the version in ports varnish4-4.1.0_2.  I suspect code changes in the 4.0 -> 4.1 bump caused the issues.
Comment 5 commit-hook freebsd_committer 2015-11-16 03:51:12 UTC
A commit references this bug:

Author: junovitch
Date: Mon Nov 16 03:50:24 UTC 2015
New revision: 401750
URL: https://svnweb.freebsd.org/changeset/ports/401750

  net-mgmt/collectd5: partially convert to option helpers [1]

  - Add explicit CURL_JSON and CURL_XML options.  Previously these options
    would be automatically enabled when CURL and JSON or CURL and XML were
    selected together.  Change them to an _IMPLIES variable as an explicit
  - Convert all options except PERL and PYTHON, for the time being, to the
    new framework.  The option helper variant is not expanding ${PYTHON_CMD}
    and is currently passing it as "--with-python= " which fails to build.
  - No PORTREVISION change given no change to package
  - While here, tag VARNISH as BROKEN, fails to compile with varnish4-4.1 [2]

  PR:		204220 [1]
  PR:		204583 [2]
  Submitted by:	Krzysztof <ports@bsdserwis.com> (maintainer) [1]

Comment 6 Jason Unovitch freebsd_committer 2015-11-16 03:54:26 UTC
Created attachment 163174 [details]
WIP: Switch PERL/PYTHON over to option helpers (v3)

Obsolete original patch.  Committed the work so far.

This should be correct there just appears to be something in the framework for option helpers that is not expanding the variables.  Time to dig in further on the specific portion with the VARNISH option marked BROKEN and the rest committed.
Comment 7 Henrik Hudson 2015-11-16 19:43:48 UTC
The XML_LIB_DEPENDS line needs fixing. See bug #204608
Comment 8 Jason Unovitch freebsd_committer 2015-11-20 03:10:13 UTC
I sent a mail to ports@ with the following to explain issue I am seeing with the PERL and PYTHON options.

I've been using the following Makefile entries.

PERL_USES=                      perl5
PERL_CONFIGURE_WITH=            perl=${PERL} perl-bindings
PYTHON_USES=                    python:2

Everything looks good for the _WITH variables.  The correct variable
expansion appears to be taking place:

% make -VPERL_CONFIGURE_WITH                                                             
perl=/usr/local/bin/perl perl-bindings
% make -VPYTHON_CONFIGURE_WITH                                                           

However, for CONFIGURE_ARGS the ${PERL} and ${PYTHON_CMD} variables are
getting swallowed up.  The port will fail to compile because of this.

"--enable-python --with-python= "
"--enable-perl --with-perl= --with-perl-bindings"
Comment 9 Jason Unovitch freebsd_committer 2015-11-21 03:06:57 UTC

Both a workaround that does work as well as an incomplete ports framework patch may cause other issues was pointed out.  Discussion on the way ahead is ongoing.

When the mailing list thread comes to a conclusion I'll update the PR as needed.
Comment 10 commit-hook freebsd_committer 2015-12-29 18:49:02 UTC
A commit references this bug:

Author: junovitch
Date: Tue Dec 29 18:48:04 UTC 2015
New revision: 404774
URL: https://svnweb.freebsd.org/changeset/ports/404774

  net-mgmt/collectd5: finish option helpers conversion

  - Switch PERL and PYTHON options over and drop the bsd.port.options.mk
    include following r404759's update to bsd.options.mk

  PR:		204220
  Submitted by:	Krzysztof <ports@bsdserwis.com> (maintainer)

Comment 11 Jason Unovitch freebsd_committer 2015-12-29 18:51:46 UTC
The commit in https://svnweb.FreeBSD.org/changeset/ports/404759 resolves the unexpected blank ${PERL} and ${PYTHON_CMD} variables when doing a `make -VCONFIGURE_ARGS`.  I've validated the port builds properly now with those two options so we can finally close this PR.

Krzysztof, thank you for your initial efforts and your patience.