Skip to main content

abi-compliance-checker & dh / cdbs integration

dh-autoreconf is an amazing addon for running autoreconf, I just love it.
abi-compliance-checker is an amazing tool for tracking API/ABI.
Wouldn't it be great to glue abi-compliance-checker into dh / cdbs packaging?!
 abi-compliance-checker (1.98.8-1~exp1) experimental; urgency=low
 .
   * New upstream release
   * Add dh_acc to generate and compare library dumps at build time,
     together with addons for dh(7) and cdbs.

   * Bump standards version, bump debhelper to 9, use 3.0 (quilt) format,
     update Vcs-Svn field to canonical form, remove obsolete
     DM-Upload-Allowed.
   * Apply a patch to allow suffixes on a-c-c abi dumps.
Horay! So how does one use it?

  • build-depend on dh-acc
  • In your debian/rules
    • call dh_acc somewhere appropriate
    • dh $@ --with acc
    • include /usr/share/cdbs/1/rules/acc.mk
  • In your debian/libpackage-dev.acc
    • Write a abi-compliance-checker descriptor (no need to include version)
  • Build your package
  • Copy the generated /usr/lib/$(multiarch)/dh-acc/*.abi.tar.gz as ./debian/lib-package-dev.abi.tar.gz.ARCH
  • Now at each build ABI/API checks will be executed and compat reports will be generated
An example xml descriptor for libapt-pkg-dev is:
<?xml version="1.0" encoding="utf-8"?>
<descriptor>
<headers>
  ./build/include/apt-pkg/
</headers>
<libs>
  ./build/bin/
</libs>
<skip_types>
  SubstVar
</skip_types>
</descriptor>
I wonder if things can be improved, for example:
  • For trivial packages, don't require .acc at all & simply point abi-compiance-checker at ./debian/tmp/
  • I think logs currently pollute the unpacked source package
  • Multiple "base" ABI need checking. E.g. given versions A, B, C one can introduce a new symbol in B and drop it in C. Both B & C are compatible with A, but C is not compatible with B, thus an API/ABI break got introduced into the distribution if all A,B,C were ever published in the archive.
  • Maybe run these as DEP-8 autopkgtests as well?
On a wider scope of things abi-compliance-checker allows to create "system" abi dumps & also check applications for ABI/API compliance. For example, one could scan deb packages to see if they are still compatible between major Debian Releases for some known install type (e.g. a default full Gnome Desktop), or we could scan proprietary packages to see if they are compatible (e.g. games delivered via Steam by Valve to multiple Ubuntu releases), and we can continuously monitor OS ABI to make sure we don't unknowingly break it with security and bugfix updates.

Please, play around with dh-acc and let me know what you think =)

Comments

Popular posts from this blog

How to disable TLS 1.0 and TLS 1.1 on Ubuntu

Example of website that only supports TLS v1.0, which is rejected by the client Overivew TLS v1.3 is the latest standard for secure communication over the internet. It is widely supported by desktops, servers and mobile phones. Recently Ubuntu 18.04 LTS received OpenSSL 1.1.1 update bringing the ability to potentially establish TLS v1.3 connections on the latest Ubuntu LTS release. Qualys SSL Labs Pulse report shows more than 15% adoption of TLS v1.3. It really is time to migrate from TLS v1.0 and TLS v1.1. As announced on the 15th of October 2018 Apple , Google , and Microsoft will disable TLS v1.0 and TLS v1.1 support by default and thus require TLS v1.2 to be supported by all clients and servers. Similarly, Ubuntu 20.04 LTS will also require TLS v1.2 as the minimum TLS version as well. To prepare for the move to TLS v1.2, it is a good idea to disable TLS v1.0 and TLS v1.1 on your local systems and start observing and reporting any websites, systems and applications that...

Ubuntu Livepatch service now supports over 60 different kernels

Linux kernel getting a livepatch whilst running a marathon. Generated with AI. Livepatch service eliminates the need for unplanned maintenance windows for high and critical severity kernel vulnerabilities by patching the Linux kernel while the system runs. Originally the service launched in 2016 with just a single kernel flavour supported. Over the years, additional kernels were added: new LTS releases, ESM kernels, Public Cloud kernels, and most recently HWE kernels too. Recently livepatch support was expanded for FIPS compliant kernels, Public cloud FIPS compliant kernels, and as well IBM Z (mainframe) kernels. Bringing the total of kernel flavours support to over 60 distinct kernel flavours supported in parallel. The table of supported kernels in the documentation lists the supported kernel flavours ABIs, the duration of individual build's support window, supported architectures, and the Ubuntu release. This work was only possible thanks to the collaboration with the Ubuntu C...

Swapfiles by default in Ubuntu

4MB RAM card By default, in Ubuntu, we usually create a swap partition. Back in the day of 4MB RAM cards this made total sense, as the ration of RAM to disk space, was still very low. Things have changed since. Server, desktop, embedded systems have migrated to newer generations of both RAM and persistent storage. On the high performance side of things we see machines with faster storage in the form of NVMe and SSD drives. Reserving space for swap on such storage, can be seen as expensive and wasteful. This is also true for recent enough laptops and desktops too. Mobile phones have substantial amounts of RAM these days, and at times, coupled with eMMC storage - it is flash storage of lower performance, which have limited number of write cycles, hence should not be overused for volatile swap data. And there are also unicorns in a form of high performance computing of high memory (shared memory) systems with little or no disk space. Today, carving a partition and reserving twice...