Bug 277161
Summary: | Fault when querying against DSAHEADER | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Ignacio Vazquez-Abrams <ivazqueznet> | ||||||
Component: | rpm | Assignee: | Panu Matilainen <pmatilai> | ||||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
Severity: | low | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | rawhide | CC: | pnasrat, redhat-bugzilla | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | i386 | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | 4.4.2.2-2.fc7 | Doc Type: | Bug Fix | ||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2007-10-24 07:14:08 UTC | Type: | --- | ||||||
Regression: | --- | Mount Type: | --- | ||||||
Documentation: | --- | CRM: | |||||||
Verified Versions: | Category: | --- | |||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||
Embargoed: | |||||||||
Attachments: |
|
Description
Ignacio Vazquez-Abrams
2007-09-04 19:31:35 UTC
Created attachment 186491 [details]
rpmq fault
Created attachment 186501 [details]
rpmq trace
Easily reproduced. There are actually a number of bugs here, urgh... - matching against "binary blob" type (such as dsaheader) isn't handled at all - attempting matching against binary blobs segfaults - matching produces false results if the header to be matched against isn't present in package(s) Fixed in rpm.org HEAD, needs backporting to 4.4.2.2... Sure there are any number of bugs retrieving a header tag by regex retrieval applied against binary data, now converted to text. I will likely steal the patch soon, but implement rather differently. headerGetExtension is ther to to coerce data types onto tags. However, the functionality of the access itself makes no sense. Loading every header to retrieve RPMTAG_DSAHEADER which is converted to hex so that a pattern can be applied to find which packages were signed with the pubkey gpg(Fedora Project (Test Software) <rawhide>) should be done with a --queryformat, not a regex. You won't be happy with the false positives from the pattern match even if you are willing to live with the performance cost of loading every installed header. I.e. blocking regexes appled to binary data, rather than drilling the hex convert through mireFoo() is likely more useful. And if there is a need for retrieving packages signed with a specific pubkey fingerprint, then an index (for highest performance), or a popt alias to hide a complex --queryformat to be post filtered with --pipe needs doing. Yup, retrieving by signing key is somewhat different issue and wants queryformat, not hex dumps. Converting binary to hex and matching is mostly of academical interest, there's probably just one case where it might actually be useful (sourcepkgid to be exact) In that case go ahead and close the report if the fault is fixed. I'll worry about the actual querying part some other way. If Sourcepkgid: is the issue, its value in packages should be changed to a string. Querying by pkgid is already drilled with an index for performance. Querying by sourcepkgid is no harder than changing a tag. Since sourcepkgid is not currently included in Fedora packages, pattern matching against a non-existent tag is likely of academic interest only as well. Fixed in next rawhide push by rpm 4.4.2.2-rc2 rpm-4.4.2.2-2.fc7 has been pushed to the Fedora 7 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update rpm' rpm-4.4.2.2-2.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report. |