Skip to content

lvc/pkg-abidiff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pkg-abidiff 0.97

Package ABI Diff (Pkg-ABIdiff) — a tool to verify API/ABI compatibility of Linux packages (RPM or DEB).

Contents

  1. About
  2. Install
  3. Usage

About

The tool searches for shared objects in packages and checks their ABIs for backward binary-compatibility (BC) and backward source-compatibility (SC).

The tool does the following:

  1. Extracts input packages
  2. Searches for *.debuginfo, *.so and header files
  3. Creates ABI dumps of all found shared objects
  4. Filters out private part of the ABI using info from header files
  5. Matches shared objects in old and new packages
  6. Compares ABI dumps of corresponding objects
  7. Creates the BC and SC reports

The tool is intended for Linux maintainers who are interested in ensuring backward compatibility, i.e. allow old applications to run (BC) or to be recompiled (SC) with newer versions of RPM/DEB packages.

Sample report: https://abi-laboratory.pro/examples/compat_report/x86_64/libssh/0.6.3-3.fc21/0.7.3-1.fc24/

The tool is developed by Andrey Ponomarenko.

Install

sudo make install prefix=/usr
Requires

Usage

pkg-abidiff -old [OLD PACKAGES] -new [NEW PACKAGES] [OPTIONS]

e.g.:

pkg-abidiff -old P1 P1-debug P1-dev -new P2 P2-debug P2-dev

P1 — RPM or DEB package to analyze (with *.so object files), P1-debug — corresponding debug-info package (*.debug files with DWARF info), P1-dev — corresponding development package (with header files).

You can omit passing of devel packages but the tool will not be able to filter out private part of the ABI from the analysis in this case. You can specify multiple devel packages at a time (to analyze all related header files distributed in separate packages).

Generated ABI dumps will be saved to ./abi_dump directory and will be reused next times. Use -rebuild additional option to regenerate ABI dumps.

Generated report will be saved to ./compat_report directory. Use -rebuild-report additional option to regenerate report without regenerating of ABI dumps. The report is generated in visual HTML and machine-readable JSON formats.

Example

Having old packages:

OLD/libssh-0.6.3-3.fc21.x86_64.rpm
OLD/libssh-debuginfo-0.6.3-3.fc21.x86_64.rpm
OLD/libssh-devel-0.6.3-3.fc21.x86_64.rpm

and new ones:

NEW/libssh-0.7.3-1.fc24.x86_64.rpm
NEW/libssh-debuginfo-0.7.3-1.fc24.x86_64.rpm
NEW/libssh-devel-0.7.3-1.fc24.x86_64.rpm

we can compare them by this command:

pkg-abidiff -old OLD/libssh-*.rpm -new NEW/libssh-*.rpm
Adv. usage

For advanced usage, see output of -h option.

About

Verify backward compatibility of Linux packages (RPM or DEB)

Resources

License

Stars

Watchers

Forks