| Summary: | rpm2cpio: Segmentation fault | ||
|---|---|---|---|
| Product: | [Runtime] Package Management Issues | Reporter: | Yi Zhao <yi.zhao> |
| Component: | RPM | Assignee: | Mark Hatle <mark.hatle> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Low | CC: | bluelightning, hongxu.jia, jeff.polk, kai.kang, liang.li2, mark.hatle, meta.mr.watcher, meta.watcher, n3npq, Qi.Chen, richard.purdie, ross.burton, sgw |
| Version: | 1.4 | ||
| Target Milestone: | Future | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | No (bug/feature does not impact docs) | |
|
Description
Yi Zhao
2012-12-28 09:12:02 UTC
rpm config files are not parsed, so no "_db_path" defined. When query "_db_path", it returns nothing and causes segmentation fault. Patch v2 has been sent to oe-core, and postpone it to 1.5 The simplest fix of all is to use rpm2cpio.sh, an ~38 line shell script. Mark asked me to move this to future. The script works correctly but he'd like to keep the reminder to check whether it's fixed in future versions. Using rpm2cpio.sh is still the best fix for Yocto imho. The segfault comes from attempting to locate the pubkey needed to verify the header signature in the rpmdb Pubkeys index. The path to the rpmdb is stored in in the %_dbpath macro. The rpmdb pubkey lookup is now (rpm-5.4.15) skipped if %_dbpath isn't set (which fixes the segfault). Implicitly disabling package signature verification depending on macro (mis-)configuration may not be supportable when rpmlib needs to always verify signatures. http://patchwork.openembedded.org/patch/59135/ is the patch that Kai sent, and Mark rejected it. Mark/Kai - presumably this is still a problem - can someone revisit this and prepare a correct patch? This is still a bug, but we moved to using the script version of rpm2cpio on the rpm-native side. Thus this is very low priority. It might be fixed at some point in the future, but it's really an issue on how the recent binary versions of rpm2cpio inteface w/ the rpmlib and rpmlib interfaces with external files. (None of that is actually needed for our usage case, thus the scripted version works fine.) The bug was left open, because well.. it is a bug. (very low priority) We're just going to continue to monitor the situation, and we'll fix it if/when the upstream design changes. Again, this only affects rpm-native, not the target rpm. --Mark There's a modest improvement to rpm2cpio.sh for Cygwin
available here:
http://stackoverflow.com/questions/18787375/how-do-i-extract-the-contents-of-an-rpm/25986787#25986787
rpm2cpio works fine with rpm v4 so closing this a resolved. |