mirror of
git://sourceware.org/git/libabigail.git
synced 2025-01-18 15:20:45 +00:00
ca4f4d894c
Using abipkgdiff to analyze kABIs from Oracle Linux packages with CTF debug format, abipkgdiff is not able to identify kernel packages because the naming of OL kernel packages differs from the naming used on other RPM-based distributions. As abipkgdiff fails to see that it's looking at a Linux kernel package, the binaries are analyzed as user space binaries and that is not what we want. This patch addresses the issue by looking for the "vmlinuz" binary inside the package to determine that it's a kernel package. In other words, tools_utils::file_is_kernel_package is changed to look for "vmlinuz" inside the package, rather than look for a particular pattern in the package name of the package. Additionally, when the kernel package contains CTF debug information, the `vmlinux.ctfa' file is not necessarily shipped the debuginfo package. This patch thus adjusts the search path of that file in that case. * include/abg-tools-utils.h (rpm_contains_file): Declare new function. * src/abg-ctf-reader.cc (ctf::reader::find_ctfa_file): Use `find_file_under_dir' utility function to locate `vmlinux.ctfa' file. (ctf::reader::process_ctf_archive): Adjust dictionary name according to module name, removing characters after dot. * src/abg-tools-utils.cc (file_has_ctf_debug_info): Use `find_file_under_dir' utility function to locate `vmlinux.ctfa' file. (rpm_contains_file): Define new function. (file_is_kernel_package): Use the new `rpm_contains_file' to look for the `vmlinuz' file inside the RPM package. For Debian packages however, we don't keep looking at the naming pattern as we don't yet have a deb_contains_file function. Also, this function now takes the full path to the RPM. (build_corpus_group_from_kernel_dist_under): for CTF, add the `root' directory of the extracted package to the set of directories under which we should look for debug info. * tools/abipkgdiff.cc (maybe_handle_kabi_whitelist_pkg) (create_maps_of_package_content, compare_prepared_package, main): Adjust call to file_is_kernel_package as it now takes the full path to the package. Signed-off-by: Guillermo E. Martinez <guillermo.e.martinez@oracle.com> Signed-off-by: Dodji Seketeli <dodji@redhat.com> |
||
---|---|---|
.. | ||
abg-btf-reader.h | ||
abg-comp-filter.h | ||
abg-comparison.h | ||
abg-config.h | ||
abg-corpus.h | ||
abg-ctf-reader.h | ||
abg-cxx-compat.h | ||
abg-diff-utils.h | ||
abg-dwarf-reader.h | ||
abg-elf-based-reader.h | ||
abg-elf-reader.h | ||
abg-fe-iface.h | ||
abg-fwd.h | ||
abg-hash.h | ||
abg-ini.h | ||
abg-interned-str.h | ||
abg-ir.h | ||
abg-libxml-utils.h | ||
abg-reader.h | ||
abg-regex.h | ||
abg-reporter.h | ||
abg-sptr-utils.h | ||
abg-suppression.h | ||
abg-tools-utils.h | ||
abg-traverse.h | ||
abg-version.h.in | ||
abg-viz-common.h | ||
abg-viz-dot.h | ||
abg-viz-svg.h | ||
abg-workers.h | ||
abg-writer.h | ||
Makefile.am |