[applied] fedabipkgdiff: Add a new --private-dso option

Message ID 87ed3f6ueg.fsf@redhat.com
State New
Headers
Series [applied] fedabipkgdiff: Add a new --private-dso option |

Commit Message

Dodji Seketeli Nov. 13, 2024, 3:11 p.m. UTC
  Hello,

This patch adds an option to make fedabipkgdiff compare shared
libraries that are private to the packages being considered.

It allows us to compare the private libxul.so shared library when
considering the firefox package, for instance.

	* doc/manuals/fedabipkgdiff.rst: Add documentation for the new
	--private-dso option.
	* tools/fedabipkgdiff (abipkgdiff): Pass the --private-dso option
	to abipkgdiff when asked by the user.
	(build_commandline_args_parser): Support the new --private-dso
	option.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applied to the mainline.
---
 doc/manuals/fedabipkgdiff.rst | 8 ++++++++
 tools/fedabipkgdiff           | 8 ++++++++
 2 files changed, 16 insertions(+)
  

Patch

diff --git a/doc/manuals/fedabipkgdiff.rst b/doc/manuals/fedabipkgdiff.rst
index 6ea33ff0..47225416 100644
--- a/doc/manuals/fedabipkgdiff.rst
+++ b/doc/manuals/fedabipkgdiff.rst
@@ -137,6 +137,14 @@  Options
     defined in public header files available from the packages being
     compared.
 
+
+  * ``--private-dso``
+
+    Compare the ABI of shared libraries that are private to the
+    packages.  If this option is not provided, shared libraries that
+    are private to the packages being considered are not compared.
+
+
   * ``--server`` <URL>
 
     Specifies the URL of the `Koji`_ XMLRPC service the tool talks to.
diff --git a/tools/fedabipkgdiff b/tools/fedabipkgdiff
index 49254c7d..932d8542 100755
--- a/tools/fedabipkgdiff
+++ b/tools/fedabipkgdiff
@@ -1154,6 +1154,7 @@  def abipkgdiff(cmp_half1, cmp_half2):
         cmd = [
             abipkgdiff_tool,
             '--dso-only' if global_config.dso_only else '',
+            '--private-dso' if global_config.private_dso else '',
             '--self-check',
             suppressions,
             debuginfo_pkg1,
@@ -1167,6 +1168,7 @@  def abipkgdiff(cmp_half1, cmp_half2):
             '--show-identical-binaries' if global_config.show_identical_binaries else '',
             '--no-default-suppression' if global_config.no_default_suppr else '',
             '--dso-only' if global_config.dso_only else '',
+            '--private-dso' if global_config.private_dso else '',
             debuginfo_pkg1,
             debuginfo_pkg2,
             devel_pkg1,
@@ -1457,6 +1459,12 @@  def build_commandline_args_parser():
         dest='dso_only',
         help='Compare the ABI of shared libraries only. If this option is not '
              'provided, the tool compares the ABI of all ELF binaries.')
+    parser.add_argument(
+        '--private-dso',
+        required=False,
+        action='store_true',
+        dest='private_dso',
+        help='Compare the ABI of shared libraries that are private to the package')
     parser.add_argument(
         '--debug',
         required=False,