misc: avoid malformed MIME cache for catch-all glob - #672
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #672 +/- ##
=======================================
Coverage 71.71% 71.71%
=======================================
Files 3 3
Lines 502 502
=======================================
Hits 360 360
Misses 142 142 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
3300c75 to
1b8c603
Compare
update-mime-database stores suffix globs in the reverse suffix tree in mime.cache. The "*" catch-all has an empty suffix and triggers shared-mime-info#230, leaving a malformed node whose contents can vary across builds. Use "?*" instead. MIME glob syntax follows fnmatch(3), so it still matches every valid, non-empty filename, but is stored as a general glob and bypasses the broken suffix-tree path. Fixes QubesOS/qubes-issues#9159.
1b8c603 to
e92cb8b
Compare
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026082616-devel&flavor=pull-requests Test run included the following:
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2026050504-devel&flavor=update
Failed tests13 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/176874#dependencies 30 fixed
Unstable testsDetails
Performance TestsPerformance degradation:18 performance degradations
Remaining performance tests:93 tests
|
Summary
Replace the
*catch-all glob forapplication/qubes-untrusted-filewith?*to make the generated MIME cache reproducible.Background
update-mime-databasestores suffix globs in a reverse suffix tree insidemime.cache. The existing*pattern has an empty suffix and triggers shared-mime-info#230, producing a malformed, unlinked tree node whose contents can vary between builds. This causes otherwise identical packages to differ.Shared MIME glob patterns use
fnmatch(3)syntax.?*matches one or more characters, which is equivalent to*for valid, non-empty filenames. Because it is handled as a general glob instead of an empty suffix, it bypasses the broken suffix-tree path while preserving the weight-100 fallback behavior.Fixes QubesOS/qubes-issues#9159.