Page MenuHomeFreeBSD

www/mod_security: make YAJL support optional
Needs ReviewPublic

Authored by ngie on Fri, Jun 26, 8:29 PM.

Details

Reviewers
joneum
Summary

Add YAJL OPTION to the port to allow users to explicitly enable/disable
the respective support for the port.

This change allows the end-user to ship a version of the port
with/without YAJL support, and thus allow the port to build without
introducing those dependencies.

While here, garbage collect the gdbm dependency. This particular
dependency is handled by libapr1* and doesn't need to be handled here.

Submitted by: Paras Kumar <Paras.Kumar@dell.com>
Sponsored by: Dell, Inc

Test Plan

Built with:

  • OPTIONS_SET+= YAJL [1]
  • OPTIONS_UNSET+= YAJL [2]
  1. Output:
% ldd /usr/local/libexec/apache24/mod_security2.so | grep libyajl || echo "no libyajl support"
        libyajl.so.2 => /usr/local/lib/libyajl.so.2 (0x251f9a9dd000)
%
  1. Output:
% ldd /usr/local/libexec/apache24/mod_security2.so | grep libyajl || echo "no libyajl support"
no libyajl support
%

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 74315
Build 71198: arc lint + arc unit

Event Timeline

ngie requested review of this revision.Fri, Jun 26, 8:29 PM
ngie created this revision.

Thanks for working on this!

I have one question regarding the YAJL option. I’m not entirely sure if I understand this correctly.

The change introduces:

YAJL_CONFIGURE_ON= --with-yajl
YAJL_CONFIGURE_OFF= --without-yajl

However, CONFIGURE_ARGS still appears to unconditionally pass:

--with-yajl=${LOCALBASE}

Could you clarify how these interact? I wasn’t sure whether this is intentional, or whether the unconditional --with-yajl=${LOCALBASE} should also become conditional now that YAJL support is optional.

Thanks!

  • Remove gdbm option as it's not actually required [directly] by the package [1].
  • Correct logic to truly make YAJL support conditional.

Revision update (description) coming soon.

ngie retitled this revision from www/mod_security: make GDBM/YAJL support optional to www/mod_security: make YAJL support optional.Fri, Jun 26, 10:01 PM
ngie edited the summary of this revision. (Show Details)
ngie edited the test plan for this revision. (Show Details)
ngie edited the summary of this revision. (Show Details)
ngie edited the summary of this revision. (Show Details)

Thanks for working on this!

I have one question regarding the YAJL option. I’m not entirely sure if I understand this correctly.

The change introduces:

YAJL_CONFIGURE_ON= --with-yajl
YAJL_CONFIGURE_OFF= --without-yajl

However, CONFIGURE_ARGS still appears to unconditionally pass:

--with-yajl=${LOCALBASE}

Could you clarify how these interact? I wasn’t sure whether this is intentional, or whether the unconditional --with-yajl=${LOCALBASE} should also become conditional now that YAJL support is optional.

Thanks!

That was definitely a bug -- thanks for spotting that (it's fixed in the latest diff)!

I checked the code and the version that we're working with either silently permits --with*-gdbm, or support was removed from the latest version of this package, so I updated the dependencies to remove the explicit gdbm support. This syncs the port with the upstream build documentation: https://github.com/owasp-modsecurity/ModSecurity#dependencies .