Page MenuHomeFreeBSD

Mk/bsd.sanity.mk: Prevent false positive DEV_ERROR with USES=ssl and SSL_DEFAULT!=base after rP499267
ClosedPublic

Authored by tobik on May 16 2019, 10:02 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 15, 4:38 AM
Unknown Object (File)
Mon, Apr 15, 4:32 AM
Unknown Object (File)
Mon, Apr 15, 4:32 AM
Unknown Object (File)
Mon, Apr 15, 4:32 AM
Unknown Object (File)
Mon, Apr 15, 4:30 AM
Unknown Object (File)
Mon, Apr 15, 4:30 AM
Unknown Object (File)
Feb 11 2024, 11:00 AM
Unknown Object (File)
Feb 7 2024, 9:21 AM
Subscribers
None

Details

Summary

With DEFAULT_VERSIONS+=ssl=libressl or similar, USES=ssl sets a OPENSSL_LDFLAGS. The sanity check we introduced in rP499267 reports this as false positive on any port with has an OPENSSL option like net/haproxy:

/!\ haproxy-1.9.8: Makefile errors /!\

The following options helpers are incorrectly set after bsd.port.options.mk
and are ineffective: OPENSSL_LDFLAGS

*** Error code 1

Since OPENSSL_LDFLAGS is still added to LDFLAGS by USES=ssl afterwards it has the desired effect anyway. We should not report this and add it to _OPTIONS_HELPERS_SEEN too.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I think it would probably be best to ignore it in bsd.sanity.mk, rather than patch it here.

  • Do it in bsd.sanity.mk instead
Mk/bsd.sanity.mk
172 ↗(On Diff #57441)

No, hold on. This is broken.

  • Fix it when ports have not set USES
Mk/bsd.sanity.mk
177 ↗(On Diff #57442)
. for helper in ${_ALL_OPTIONS_HELPERS:NOPENSSL_LDFLAGS}

would probably be way easier.

Wait, no, this does not work.

I don't think adding all these tests to make sure you only add it in the specific case where it will happen is a great idea.

I did not want the thing in ssl.mk because it was adding some implementation details of options in the ssl code. Now, the implementation detail of the ssl code gets added to the sanity checks. Adding a "whitelist" of variables that are never reported should be enough.

Sure, let's see how that goes.

  • Just blanket whitelist OPENSSL_LDFLAGS

Looks good.

I am sure there are other variables set by the framework that could end up triggering this. But I think we can safely ignore them for now, we will add them whenever an error occur.

This revision was not accepted when it landed; it landed in state Needs Review.May 16 2019, 1:30 PM
This revision was automatically updated to reflect the committed changes.