libxerces-c: fix CI build/test failures for apk + samples#29514
Open
commodo wants to merge 1 commit into
Open
Conversation
Two unrelated issues both fixed here so the package + its samples
sub-package land in CI green:
1. PKG_CPE_ID escaping.
apk's ADB binary package format rejects both the backslash-escape
and the percent-encoding variants of the previous CPE id:
cpe:/a:apache:xerces-c\+\+ ERROR: info field 'tags' has invalid value
cpe:/a:apache:xerces-c%2B%2B ERROR: info field 'tags' has invalid value
apk's tag value parser only accepts a restricted alphabet for ADB
package format and neither '\' nor '%' make the cut. With xerces-c
unable to build, downstream consumers (notably sumo) also fail at
cmake configure time with "Failed to find XercesC".
Drop the '++' suffix entirely and use cpe:/a:apache:xerces-c, which
matches the higher-level Apache Xerces-C CPE entry. cve scanners
that walked the more specific xerces-c++ entry will fall back to
this one.
2. Generic version-check override for libxerces-c-samples.
The samples sub-package ships upstream demo programs
(CreateDOMDocument, DOMCount, DOMPrint, SAX2Count, ...) which do
not accept --version / -v / -V and therefore fail the framework's
"executable prints PKG_VERSION" probe, making the package overall
report "Generic tests failed". Add a minimal test-version.sh that
exits 0 so the version-probe is skipped and the remaining generic
checks (executable, no hardcoded paths, stripped, linked libs)
still run for every binary.
Signed-off-by: Alexandru Ardelean <alex@shruggie.ro>
Comment on lines
+3
to
+4
| pkg=$1 | ||
| ver=$2 |
Member
There was a problem hiding this comment.
More of an observation, but the test harness exports PKG_NAME and PKG_VERSION so you don't really need to reassign these for readability.
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.
📦 Package Details
Maintainer: @Noltari
Description:
Two unrelated issues both fixed here so the package + its samples sub-package land in CI green:
PKG_CPE_ID escaping. apk's ADB binary package format rejects both the backslash-escape and the percent-encoding variants of the previous CPE id:
cpe:/a:apache:xerces-c++ ERROR: info field 'tags' has invalid value
cpe:/a:apache:xerces-c%2B%2B ERROR: info field 'tags' has invalid value
apk's tag value parser only accepts a restricted alphabet for ADB package format and neither '' nor '%' make the cut. With xerces-c unable to build, downstream consumers (notably sumo) also fail at cmake configure time with "Failed to find XercesC".
Drop the '++' suffix entirely and use cpe:/a:apache:xerces-c, which matches the higher-level Apache Xerces-C CPE entry. cve scanners that walked the more specific xerces-c++ entry will fall back to this one.
Generic version-check override for libxerces-c-samples. The samples sub-package ships upstream demo programs (CreateDOMDocument, DOMCount, DOMPrint, SAX2Count, ...) which do not accept --version / -v / -V and therefore fail the framework's "executable prints PKG_VERSION" probe, making the package overall report "Generic tests failed". Add a minimal test-version.sh that exits 0 so the version-probe is skipped and the remaining generic checks (executable, no hardcoded paths, stripped, linked libs) still run for every binary.
🧪 Run Testing Details
✅ Formalities