Skip to main content
Redhat Developers  Logo
  • Products

    Platforms

    • Red Hat Enterprise Linux
      Red Hat Enterprise Linux Icon
    • Red Hat AI
      Red Hat AI
    • Red Hat OpenShift
      Openshift icon
    • Red Hat Ansible Automation Platform
      Ansible icon
    • View All Red Hat Products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat Developer Hub
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat OpenShift Local
    • Red Hat Developer Sandbox

      Try Red Hat products and technologies without setup or configuration fees for 30 days with this shared Openshift and Kubernetes cluster.
    • Try at no cost
  • Technologies

    Featured

    • AI/ML
      AI/ML Icon
    • Linux
      Linux Icon
    • Kubernetes
      Cloud icon
    • Automation
      Automation Icon showing arrows moving in a circle around a gear
    • View All Technologies
    • Programming Languages & Frameworks

      • Java
      • Python
      • JavaScript
    • System Design & Architecture

      • Red Hat architecture and design patterns
      • Microservices
      • Event-Driven Architecture
      • Databases
    • Developer Productivity

      • Developer productivity
      • Developer Tools
      • GitOps
    • Automated Data Processing

      • AI/ML
      • Data Science
      • Apache Kafka on Kubernetes
    • Platform Engineering

      • DevOps
      • DevSecOps
      • Ansible automation for applications and services
    • Secure Development & Architectures

      • Security
      • Secure coding
  • Learn

    Featured

    • Kubernetes & Cloud Native
      Openshift icon
    • Linux
      Rhel icon
    • Automation
      Ansible cloud icon
    • AI/ML
      AI/ML Icon
    • View All Learning Resources

    E-Books

    • GitOps Cookbook
    • Podman in Action
    • Kubernetes Operators
    • The Path to GitOps
    • View All E-books

    Cheat Sheets

    • Linux Commands
    • Bash Commands
    • Git
    • systemd Commands
    • View All Cheat Sheets

    Documentation

    • Product Documentation
    • API Catalog
    • Legacy Documentation
  • Developer Sandbox

    Developer Sandbox

    • Access Red Hat’s products and technologies without setup or configuration, and start developing quicker than ever before with our new, no-cost sandbox environments.
    • Explore Developer Sandbox

    Featured Developer Sandbox activities

    • Get started with your Developer Sandbox
    • OpenShift virtualization and application modernization using the Developer Sandbox
    • Explore all Developer Sandbox activities

    Ready to start developing apps?

    • Try at no cost
  • Blog
  • Events
  • Videos

ABI change analysis of Fedora packages

February 28, 2017
Dodji Seketeli
Related topics:
Developer ToolsLinuxSecurity
Related products:
Red Hat Enterprise Linux

Share:

    In 2016, many improvements happened in the ABI static analysis framework that is Libabigail. In this article we'll present how fedabipkgdiff, a new Libabigail tool can help Fedora users, developers and others to analyze ABI changes of libraries carried by packages of the distribution.

    Introduction

    As many of you already know, the engine used to build RPM packages in the Fedora build system is named Koji. Thus, one can get Fedora RPMs from Koji using a web browser. In that case, it's easy enough to go to https://koji.fedoraproject.org/koji/ and use the search text box on that page to look for a given package that carries libraries we want to analyze ABI changes for.

    For instance, let's say that throughout this article, we want to analyze the ABI changes that happened to the libraries of the latest stable spice-server package between Fedora 23 and Fedora 25.

    If we were to do this without fedabipkgdiff, I guess we'd have to use the abipkgdiff tool. That tool needs the two packages to compare (the spice-server from fedora 23 and the one from Fedora 25) and their associated debug information packages. That makes 4 packages to download from Koji, by hand.

    We could even add the development packages that contain the header files of the shared libraries carried by the spice-server packages. abipkgdiff might need these development packages to filter out ABI changes coming from changes to types that are not defined in the public headers of the library. In other words, filter out changes to types that are private to the library.

    So with these two additional development packages, that makes 6 packages to download from Koji, by hand.

    Once we have downloaded those six packages, the invocation of abipkgdiff would look like:

    abipkgdiff --debug-info-pkg1 spice-server-debuginfo-<from-fedora23>.rpm \
     --debug-info-pkg2 spice-server-debuginfo-<from-fedora25>.rpm \
     --devel-pkg1 spice-server-devel-<from-fedora23>.rpm \
     --devel-pkg2 spice-server-devel-<from-fedora25>.rpm \
     spice-server-<from-fedora23>.rpm \
     spice-server-<from-fedora25>.rpm

    One still has to figure out what the exact names of the latest "stable" RPMs are for Fedora 23 and Fedora 25. And that is for just one architecture.

    In all fairness, as the old saying goes, there's gotta be a better way.

    fedabipkgdiff: a friendly broker to Koji

    It turns out that Koji does have a programmatic interface. So one can use the Koji API to discover the exact full name of the latest stable package, the associated development package or the associated debug info package. And that, for each architecture.

    And this is where fedabipkgdiff kicks in. It acts as a proxy between the user who asks questions like "what are the ABI changes between Fedora 23 and 25 for the spice-server" and the Koji server. It thus downloads the packages to compare along with all their necessary ancillary packages, for all the available architectures. It then uses the abipkgdiff tool under the hood to perform the comparisons of the packages.

    Invocation

    "What are the ABI changes between Fedora 23 and 25 for the spice-server package?".

    The command line equivalent to that question, using fedabipkgdiff, is exactly:

    fedabipkgdiff --from fc23 --to fc25 spice-server

    Interested readers will hopefully appreciate the compactness of this approach compared to the previous approach of downloading all the necessary packages by hand and using abipkgdiff directly.

    Analyzing the results

    Here is what fedabipkgdiff actually says:

    $ fedabipkgdiff --from fc23 --to fc25 spice-server
    
    Comparing the ABI of binaries between spice-server-0.12.8-1.fc23.armv7hl.rpm and spice-server-0.13.3-2.fc25.armv7hl.rpm:
    
    ================ changes of 'libspice-server.so.1.10.1'===============
     Functions changes summary: 0 Removed, 0 Changed (85 filtered out), 3 Added functions
     Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
    
    3 Added functions:
    
    'function void spice_qxl_gl_draw_async(QXLInstance*, uint32_t, uint32_t, uint32_t, uint32_t, uint64_t)' {spice_qxl_gl_draw_async@@SPICE_SERVER_0.13.1}
     'function void spice_qxl_gl_scanout(QXLInstance*, int, uint32_t, uint32_t, uint32_t, uint32_t, int)' {spice_qxl_gl_scanout@@SPICE_SERVER_0.13.1}
     'function int spice_server_set_video_codecs(SpiceServer*, const char*)' {spice_server_set_video_codecs@@SPICE_SERVER_0.13.2}
    
    ================ end of changes of 'libspice-server.so.1.10.1'===============
    
    Comparing the ABI of binaries between spice-server-0.12.8-1.fc23.i686.rpm and spice-server-0.13.3-2.fc25.i686.rpm:
    
    ================ changes of 'libspice-server.so.1.10.1'===============
     Functions changes summary: 0 Removed, 0 Changed (85 filtered out), 3 Added functions
     Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
    
    3 Added functions:
    
    'function void spice_qxl_gl_draw_async(QXLInstance*, uint32_t, uint32_t, uint32_t, uint32_t, uint64_t)' {spice_qxl_gl_draw_async@@SPICE_SERVER_0.13.1}
     'function void spice_qxl_gl_scanout(QXLInstance*, int, uint32_t, uint32_t, uint32_t, uint32_t, int)' {spice_qxl_gl_scanout@@SPICE_SERVER_0.13.1}
     'function int spice_server_set_video_codecs(SpiceServer*, const char*)' {spice_server_set_video_codecs@@SPICE_SERVER_0.13.2}
    
    ================ end of changes of 'libspice-server.so.1.10.1'===============
    
    Comparing the ABI of binaries between spice-server-0.12.8-1.fc23.x86_64.rpm and spice-server-0.13.3-2.fc25.x86_64.rpm:
    
    ================ changes of 'libspice-server.so.1.10.1'===============
     Functions changes summary: 0 Removed, 0 Changed (85 filtered out), 3 Added functions
     Variables changes summary: 0 Removed, 0 Changed, 0 Added variable
    
    3 Added functions:
    
    'function void spice_qxl_gl_draw_async(QXLInstance*, uint32_t, uint32_t, uint32_t, uint32_t, uint64_t)' {spice_qxl_gl_draw_async@@SPICE_SERVER_0.13.1}
     'function void spice_qxl_gl_scanout(QXLInstance*, int, uint32_t, uint32_t, uint32_t, uint32_t, int)' {spice_qxl_gl_scanout@@SPICE_SERVER_0.13.1}
     'function int spice_server_set_video_codecs(SpiceServer*, const char*)' {spice_server_set_video_codecs@@SPICE_SERVER_0.13.2}
    
    ================ end of changes of 'libspice-server.so.1.10.1'===============
    
    $

    As you can see in the report above, the name of the spice-server package in Fedora 23 is actually spice-server-0.12.8-1.fc23. In Fedora 25, the package is spice-server-0.13.3-2.fc25.

    These packages are available for 3 architectures: i686, x86_64 and armv7hl.

    There is one shared library library in the spice-server package which has ABI changes; it's libspice-server.so.1.10.1.

    We see that the ABI changes are all the same for all the 3 architectures. So we can just focus on one of the architectures. Let's look at the ARM architecture then.

    The summary of the changes says:

    Comparing the ABI of binaries between spice-server-0.12.8-1.fc23.armv7hl.rpm and spice-server-0.13.3-2.fc25.armv7hl.rpm:
    
    ================ changes of 'libspice-server.so.1.10.1'===============
     Functions changes summary: 0 Removed, 0 Changed (85 filtered out), 3 Added functions
     Variables changes summary: 0 Removed, 0 Changed, 0 Added variable

     

    In other words, 3 functions were added to the Fedora 25 version of the libspice-server.so.1.10.1 shared library.

    An interesting piece of information from that report is this one:

    Functions changes summary: [...] 0 Changed (85 filtered out) [...].

     

    This means some types used by the signature of 85 functions exported by the shared library changed. But the tool figured out that the changes are to be filtered out because they are harmless. There are ways to see and analyze these changes nevertheless. More on this in a subsequent blog post. For now, we shall rejoice that we have 85 less functions to analyze :-)

    So let's focus on the other changes that the tool is reporting:

    3 Added functions:
    
    'function void spice_qxl_gl_draw_async(QXLInstance*, uint32_t, uint32_t, uint32_t, uint32_t, uint64_t)' {spice_qxl_gl_draw_async@@SPICE_SERVER_0.13.1}
     'function void spice_qxl_gl_scanout(QXLInstance*, int, uint32_t, uint32_t, uint32_t, uint32_t, int)' {spice_qxl_gl_scanout@@SPICE_SERVER_0.13.1}
     'function int spice_server_set_video_codecs(SpiceServer*, const char*)' {spice_server_set_video_codecs@@SPICE_SERVER_0.13.2}

     

    In the report above we see that 3 new functions were added:

    spice_qxl_gl_draw_async
    spice_qxl_gl_scanout
    spice_server_set_video_codecs

     

    The ELF symbol of these functions are shown in curly brackets in the report:

    spice_qxl_gl_draw_async@@SPICE_SERVER_0.13.1
    spice_qxl_gl_scanout@@SPICE_SERVER_0.13.1
    spice_server_set_video_codecs@@SPICE_SERVER_0.13.2

     

    We see that maintainers of the spice-server library carefully version the ELF symbols of these newly added functions and that the version of these new functions is the string 'SPICE_SERVER_0.13.1'.

    Beyond Fedora

    Interested readers might have figured out that anyone can install the Koji build system software to build her own RPMs. There actually are many examples of Koji systems being used all over the internet.

    So users can tell fedabipkgdiff to use any Koji instance of their choice, not necessarily the one running at https://koji.fedoraproject.org.

    To do so, they can use the --server option of fedabipkgdiff to point to their Koji installation of choice.

    For other build systems of other distributions, I hope this article shows that it's possible to write an equivalent tool tailored for their needs, reusing the foundations laid out with the Libabigail framework.

    Getting fedabipkgdiff

    On Fedora, at least 23, please type:

    dnf install libabigail

     

    On RHEL, CentOS 6 or 7, with the EPEL repository configured, please type:

    yum install libabigail

     

    And you should be all set.

    Credits

    I would like to thank Chenxiong Qi who actually wrote the fedabipkgdiff tool on his own free time. He demonstrated the feasibility of using Libabigail and its associated tools to write ABI change analysis systems tailored, in this case, for a particular software distribution.

    Last updated: February 24, 2024

    Recent Posts

    • The secure way to handle secrets in OpenShift

    • How to deploy MCP servers on OpenShift using ToolHive

    • How to change the meaning of python and python3 on RHEL

    • vLLM or llama.cpp: Choosing the right LLM inference engine for your use case

    • How to implement and monitor circuit breakers in OpenShift Service Mesh 3

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer Tools
    • Interactive Tutorials
    • API Catalog

    Quicklinks

    • Learning Resources
    • E-books
    • Cheat Sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site Status Dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2025 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Report a website issue