Repository navigation
fix: silence expected net-snmp legacy provider warning - #1265
Closed
crazywhalecc wants to merge 1 commit into
Closed
crazywhalecc wants to merge 1 commit into
crazywhalecc wants to merge 1 commit into
Conversation
net-snmp 5.10 logs "Failed to load OpenSSL legacy provider" from snmplib/scapi.c during library init. static-php builds OpenSSL with no-legacy, so the provider is intentionally absent; the warning lands on stderr and breaks the PHP CLI smoke test in CI. Drop the warning while keeping the provider load fallback.
|
StaticPHP Test Bot Detected: Extensions: none | Libraries: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Linux
snmpextension test fails in the CLI smoke test:This is not an actual failure: net-snmp 5.10 (
snmplib/scapi.c) logs a warning at library init whenOSSL_PROVIDER_load(NULL, "legacy")returns NULL. static-php builds OpenSSL withno-legacy, so the provider is intentionally absent.The warning goes to stderr and the smoke test treats any extra output as a failure, which also makes unrelated PRs (e.g. #1263) red on Linux.
Fix
Patch
snmplib/scapi.cto skip that expected warning while keeping the provider load fallback. The patch is a no-op on net-snmp versions without the legacy-provider code.Validation
snmp+ CLI build:BUILD SUCCESSFUL; patchedscapi.cconfirmed.composer test(468),composer analyse,composer cs-fix: clean.snmpext test will verify the stderr output is gone.