mirror of
git://sourceware.org/git/libabigail.git
synced 2025-02-22 16:56:57 +00:00
abipkgdiff: Extract devel and main packages in the same directory
abipkgdiff extracts the two devel packages in directories named "devel_package{1,2}, whereas the main packages are extracted in directories named package{1,2}. This is wrong because a devel package should be extracted into the same directory tree as the main package. For instance, there can be a foo.so symbolic link (coming from the devel package) that points to the foo-1.0.0.so (coming from the main package) below usr/lib64/ in the extracted directory. If the devel and main packages are extracted in different directories then the symbolic link is going to be broken and some binaries won't be ABI-compared. This patch fixes the issue by extracting devel packages into the same directory as the main one. Then, it makes sure the devel package and the main one are extracted sequentially, not in parallel since they are not being extracted into the same directory. By fixing this, a number of previously hidden issues or even change output are now exposed. The patch updates these. * tests/data/test-diff-pkg/gcc-debuginfo-14.2.1-1.fc40.x86_64.rpm: Add missing debug info package. * tests/data/Makefile.am: Add it to source distribution. * tests/test-diff-pkg.cc (in_out_specs): Add the debuginfo package to the libgm2 test. * tools/abipkgdiff.cc (main): Extract the devel packages into the "package1" and "package2" directories. (extract_package_and_map_its_content): Extract the main and devel packages sequentially, not in parallel. (self_compare_prepared_userspace_package): Add more logs. * tests/data/test-fedabipkgdiff/test0-from-fc20-to-fc23-dbus-glib-report-0.txt: Adjust. * tests/data/test-fedabipkgdiff/test1-from-fc20-to-dbus-glib-0.106-1.fc23.x86_64-report-0.txt: Likewise * tests/data/test-fedabipkgdiff/test2-dbus-glib-0.100.2-2.fc20--dbus-glib-0.106-1.fc23-report-0.txt: Likewise * tests/data/test-fedabipkgdiff/test3-dbus-glib-0.100.2-2.fc20.i686--dbus-glib-0.106-1.fc23.i686-report-0.txt: Likewise * tests/data/test-fedabipkgdiff/test4-glib-0.100.2-2.fc20.x86_64.rpm-glib-0.106-1.fc23.x86_64.rpm-report-0.txt: Likewise * tests/data/test-fedabipkgdiff/test7-self-compare-from-fc23-dbus-glib-report-0.txt: Likewise * tests/data/test-fedabipkgdiff/vte291-0.39.1-1.fc22.x86_64--vte291-0.39.90-1.fc22.x86_64-report-0.txt: Likewise Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
00d8507648
commit
5be5809f7c
@ -2411,6 +2411,7 @@ test-diff-pkg/PR29610/guestfs-tools-debuginfo-1.51.6-2.el9.s390x.rpm \
|
||||
test-diff-pkg/libgm2-14.2.1-1.fc40.x86_64-self-check-report.txt \
|
||||
test-diff-pkg/libgm2-14.2.1-1.fc40.x86_64.rpm \
|
||||
test-diff-pkg/libgm2-debuginfo-14.2.1-1.fc40.x86_64.rpm \
|
||||
test-diff-pkg/gcc-debuginfo-14.2.1-1.fc40.x86_64.rpm \
|
||||
\
|
||||
test-diff-pkg-ctf/tarpkg-0-dir1.tar \
|
||||
test-diff-pkg-ctf/dirpkg-0-report-0.txt \
|
||||
|
BIN
tests/data/test-diff-pkg/gcc-debuginfo-14.2.1-1.fc40.x86_64.rpm
Normal file
BIN
tests/data/test-diff-pkg/gcc-debuginfo-14.2.1-1.fc40.x86_64.rpm
Normal file
Binary file not shown.
@ -26,6 +26,21 @@ Comparing the ABI of binaries between dbus-glib-0.100.2-2.fc20.i686.rpm and dbus
|
||||
|
||||
================ end of changes of 'dbus-binding-tool'===============
|
||||
|
||||
================ changes of 'dbus-bash-completion-helper'===============
|
||||
Functions changes summary: 2 Removed, 0 Changed, 1 Added functions
|
||||
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
|
||||
|
||||
2 Removed functions:
|
||||
|
||||
[D] 'function BaseInfo* base_info_ref(BaseInfo*)' {base_info_ref}
|
||||
[D] 'function void base_info_unref(BaseInfo*)' {base_info_unref}
|
||||
|
||||
1 Added function:
|
||||
|
||||
[A] 'function int main(int, char**)' {main}
|
||||
|
||||
================ end of changes of 'dbus-bash-completion-helper'===============
|
||||
|
||||
Comparing the ABI of binaries between dbus-glib-0.100.2-2.fc20.x86_64.rpm and dbus-glib-0.106-1.fc23.x86_64.rpm:
|
||||
|
||||
================ changes of 'libdbus-glib-1.so.2.2.2'===============
|
||||
@ -50,3 +65,14 @@ Comparing the ABI of binaries between dbus-glib-0.100.2-2.fc20.x86_64.rpm and db
|
||||
|
||||
================ end of changes of 'dbus-binding-tool'===============
|
||||
|
||||
================ changes of 'dbus-bash-completion-helper'===============
|
||||
Functions changes summary: 2 Removed, 0 Changed, 0 Added functions
|
||||
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
|
||||
|
||||
2 Removed functions:
|
||||
|
||||
[D] 'function BaseInfo* base_info_ref(BaseInfo*)' {base_info_ref}
|
||||
[D] 'function void base_info_unref(BaseInfo*)' {base_info_unref}
|
||||
|
||||
================ end of changes of 'dbus-bash-completion-helper'===============
|
||||
|
||||
|
@ -22,3 +22,14 @@ Comparing the ABI of binaries between dbus-glib-0.100.2-2.fc20.x86_64.rpm and db
|
||||
|
||||
================ end of changes of 'dbus-binding-tool'===============
|
||||
|
||||
================ changes of 'dbus-bash-completion-helper'===============
|
||||
Functions changes summary: 2 Removed, 0 Changed, 0 Added functions
|
||||
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
|
||||
|
||||
2 Removed functions:
|
||||
|
||||
[D] 'function BaseInfo* base_info_ref(BaseInfo*)' {base_info_ref}
|
||||
[D] 'function void base_info_unref(BaseInfo*)' {base_info_unref}
|
||||
|
||||
================ end of changes of 'dbus-bash-completion-helper'===============
|
||||
|
||||
|
@ -26,6 +26,21 @@ Comparing the ABI of binaries between dbus-glib-0.100.2-2.fc20.i686.rpm and dbus
|
||||
|
||||
================ end of changes of 'dbus-binding-tool'===============
|
||||
|
||||
================ changes of 'dbus-bash-completion-helper'===============
|
||||
Functions changes summary: 2 Removed, 0 Changed, 1 Added functions
|
||||
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
|
||||
|
||||
2 Removed functions:
|
||||
|
||||
[D] 'function BaseInfo* base_info_ref(BaseInfo*)' {base_info_ref}
|
||||
[D] 'function void base_info_unref(BaseInfo*)' {base_info_unref}
|
||||
|
||||
1 Added function:
|
||||
|
||||
[A] 'function int main(int, char**)' {main}
|
||||
|
||||
================ end of changes of 'dbus-bash-completion-helper'===============
|
||||
|
||||
Comparing the ABI of binaries between dbus-glib-0.100.2-2.fc20.x86_64.rpm and dbus-glib-0.106-1.fc23.x86_64.rpm:
|
||||
|
||||
================ changes of 'libdbus-glib-1.so.2.2.2'===============
|
||||
@ -50,3 +65,14 @@ Comparing the ABI of binaries between dbus-glib-0.100.2-2.fc20.x86_64.rpm and db
|
||||
|
||||
================ end of changes of 'dbus-binding-tool'===============
|
||||
|
||||
================ changes of 'dbus-bash-completion-helper'===============
|
||||
Functions changes summary: 2 Removed, 0 Changed, 0 Added functions
|
||||
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
|
||||
|
||||
2 Removed functions:
|
||||
|
||||
[D] 'function BaseInfo* base_info_ref(BaseInfo*)' {base_info_ref}
|
||||
[D] 'function void base_info_unref(BaseInfo*)' {base_info_unref}
|
||||
|
||||
================ end of changes of 'dbus-bash-completion-helper'===============
|
||||
|
||||
|
@ -26,3 +26,18 @@ Comparing the ABI of binaries between dbus-glib-0.100.2-2.fc20.i686.rpm and dbus
|
||||
|
||||
================ end of changes of 'dbus-binding-tool'===============
|
||||
|
||||
================ changes of 'dbus-bash-completion-helper'===============
|
||||
Functions changes summary: 2 Removed, 0 Changed, 1 Added functions
|
||||
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
|
||||
|
||||
2 Removed functions:
|
||||
|
||||
[D] 'function BaseInfo* base_info_ref(BaseInfo*)' {base_info_ref}
|
||||
[D] 'function void base_info_unref(BaseInfo*)' {base_info_unref}
|
||||
|
||||
1 Added function:
|
||||
|
||||
[A] 'function int main(int, char**)' {main}
|
||||
|
||||
================ end of changes of 'dbus-bash-completion-helper'===============
|
||||
|
||||
|
@ -22,3 +22,14 @@ Comparing the ABI of binaries between dbus-glib-0.100.2-2.fc20.x86_64.rpm and db
|
||||
|
||||
================ end of changes of 'dbus-binding-tool'===============
|
||||
|
||||
================ changes of 'dbus-bash-completion-helper'===============
|
||||
Functions changes summary: 2 Removed, 0 Changed, 0 Added functions
|
||||
Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
|
||||
|
||||
2 Removed functions:
|
||||
|
||||
[D] 'function BaseInfo* base_info_ref(BaseInfo*)' {base_info_ref}
|
||||
[D] 'function void base_info_unref(BaseInfo*)' {base_info_unref}
|
||||
|
||||
================ end of changes of 'dbus-bash-completion-helper'===============
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
Comparing the ABI of binaries between dbus-glib-0.106-1.fc23.i686.rpm and dbus-glib-0.106-1.fc23.i686.rpm:
|
||||
==== SELF CHECK SUCCEEDED for 'libdbus-glib-1.so.2.3.3' ====
|
||||
==== SELF CHECK SUCCEEDED for 'dbus-binding-tool' ====
|
||||
==== SELF CHECK SUCCEEDED for 'dbus-bash-completion-helper' ====
|
||||
No ABI change between dbus-glib-0.106-1.fc23.i686.rpm and dbus-glib-0.106-1.fc23.i686.rpm
|
||||
|
||||
Comparing the ABI of binaries between dbus-glib-devel-0.106-1.fc23.i686.rpm and dbus-glib-devel-0.106-1.fc23.i686.rpm:
|
||||
@ -10,6 +11,7 @@ No ABI change between dbus-glib-devel-0.106-1.fc23.i686.rpm and dbus-glib-devel-
|
||||
Comparing the ABI of binaries between dbus-glib-0.106-1.fc23.x86_64.rpm and dbus-glib-0.106-1.fc23.x86_64.rpm:
|
||||
==== SELF CHECK SUCCEEDED for 'libdbus-glib-1.so.2.3.3' ====
|
||||
==== SELF CHECK SUCCEEDED for 'dbus-binding-tool' ====
|
||||
==== SELF CHECK SUCCEEDED for 'dbus-bash-completion-helper' ====
|
||||
No ABI change between dbus-glib-0.106-1.fc23.x86_64.rpm and dbus-glib-0.106-1.fc23.x86_64.rpm
|
||||
|
||||
Comparing the ABI of binaries between dbus-glib-devel-0.106-1.fc23.x86_64.rpm and dbus-glib-devel-0.106-1.fc23.x86_64.rpm:
|
||||
|
@ -13,4 +13,5 @@ Comparing the ABI of binaries between vte291-0.39.1-1.fc22.x86_64.rpm and vte291
|
||||
================ end of changes of 'libvte-2.91.so.0.3901.0'===============
|
||||
|
||||
No ABI change detected
|
||||
No ABI change detected
|
||||
|
||||
|
@ -777,7 +777,8 @@ static InOutSpec in_out_specs[] =
|
||||
"data/test-diff-pkg/libgm2-14.2.1-1.fc40.x86_64.rpm",
|
||||
"--self-check",
|
||||
"",
|
||||
"data/test-diff-pkg/libgm2-debuginfo-14.2.1-1.fc40.x86_64.rpm",
|
||||
"data/test-diff-pkg/libgm2-debuginfo-14.2.1-1.fc40.x86_64.rpm, "
|
||||
"data/test-diff-pkg/gcc-debuginfo-14.2.1-1.fc40.x86_64.rpm",
|
||||
"data/test-diff-pkg/libgm2-debuginfo-14.2.1-1.fc40.x86_64.rpm",
|
||||
"",
|
||||
"",
|
||||
|
@ -2670,14 +2670,27 @@ extract_package_and_map_its_content(const package_sptr &pkg, options &opts)
|
||||
{
|
||||
assert(pkg);
|
||||
|
||||
pkg_extraction_task_sptr main_pkg_extraction;
|
||||
// We are going to extract the the main package and the devel
|
||||
// package sequentially because both cannot be extracted in
|
||||
// parallel, as they are being extracted into the same directory.
|
||||
vector<package_sptr> main_and_devel_pkgs_extraction;
|
||||
|
||||
// But then, the main-and-devel, debug package and kabi-whitelist
|
||||
// packages are going to be extracted in parallel.
|
||||
pkg_extraction_task_sptr main_and_devel_pkg_extraction;
|
||||
pkg_extraction_task_sptr dbg_extraction;
|
||||
pkg_extraction_task_sptr devel_extraction;
|
||||
pkg_extraction_task_sptr kabi_whitelist_extraction;
|
||||
|
||||
size_t NUM_EXTRACTIONS = 1;
|
||||
|
||||
main_pkg_extraction.reset(new pkg_extraction_task(pkg, opts));
|
||||
main_and_devel_pkgs_extraction.push_back(pkg);
|
||||
if (pkg->devel_package())
|
||||
main_and_devel_pkgs_extraction.push_back(pkg->devel_package());
|
||||
|
||||
main_and_devel_pkg_extraction.reset(new pkg_extraction_task
|
||||
(main_and_devel_pkgs_extraction,
|
||||
opts));
|
||||
++NUM_EXTRACTIONS;
|
||||
|
||||
if (!pkg->debug_info_packages().empty())
|
||||
{
|
||||
@ -2686,12 +2699,6 @@ extract_package_and_map_its_content(const package_sptr &pkg, options &opts)
|
||||
++NUM_EXTRACTIONS;
|
||||
}
|
||||
|
||||
if (package_sptr devel_pkg = pkg->devel_package())
|
||||
{
|
||||
devel_extraction.reset(new pkg_extraction_task(devel_pkg, opts));
|
||||
++NUM_EXTRACTIONS;
|
||||
}
|
||||
|
||||
if (package_sptr kabi_wl_pkg = pkg->kabi_whitelist_package())
|
||||
{
|
||||
kabi_whitelist_extraction.reset(new pkg_extraction_task(kabi_wl_pkg,
|
||||
@ -2705,9 +2712,8 @@ extract_package_and_map_its_content(const package_sptr &pkg, options &opts)
|
||||
abigail::workers::queue extraction_queue(num_workers);
|
||||
|
||||
// Perform the extraction of the NUM_WORKERS packages in parallel.
|
||||
extraction_queue.schedule_task(main_and_devel_pkg_extraction);
|
||||
extraction_queue.schedule_task(dbg_extraction);
|
||||
extraction_queue.schedule_task(main_pkg_extraction);
|
||||
extraction_queue.schedule_task(devel_extraction);
|
||||
extraction_queue.schedule_task(kabi_whitelist_extraction);
|
||||
|
||||
// Wait for the extraction to be done.
|
||||
@ -2715,7 +2721,7 @@ extract_package_and_map_its_content(const package_sptr &pkg, options &opts)
|
||||
|
||||
// Analyze and map the content of the extracted package.
|
||||
bool is_ok = false;
|
||||
if (main_pkg_extraction->is_ok)
|
||||
if (main_and_devel_pkg_extraction->is_ok)
|
||||
is_ok = create_maps_of_package_content(*pkg, opts);
|
||||
|
||||
if (is_ok)
|
||||
@ -3097,6 +3103,10 @@ self_compare_prepared_userspace_package(package& pkg,
|
||||
{
|
||||
if (it->second->type != abigail::elf::ELF_TYPE_RELOCATABLE)
|
||||
{
|
||||
if (opts.verbose)
|
||||
emit_prefix("abipkgdiff", cerr)
|
||||
<< "Going to self-compare file '"
|
||||
<< it->first << "'\n";
|
||||
compare_args_sptr args
|
||||
(new compare_args(*it->second,
|
||||
debug_dir,
|
||||
@ -3794,14 +3804,14 @@ main(int argc, char* argv[])
|
||||
if (!opts.devel_package1.empty())
|
||||
first_package->devel_package
|
||||
(package_sptr(new package(opts.devel_package1,
|
||||
"devel_package1",
|
||||
"package1",
|
||||
/*pkg_kind=*/package::KIND_DEVEL)));
|
||||
;
|
||||
|
||||
if (!opts.devel_package2.empty())
|
||||
second_package->devel_package
|
||||
(package_sptr(new package(opts.devel_package2,
|
||||
"devel_package2",
|
||||
"package2",
|
||||
/*pkg_kind=*/package::KIND_DEVEL)));
|
||||
|
||||
if (!opts.kabi_whitelist_packages.empty())
|
||||
|
Loading…
Reference in New Issue
Block a user