RPM

Add "abi-check" target to the makefile

Bug #915287 reported by Andrey Ponomarenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
RPM
Incomplete
Undecided
Andrey Ponomarenko

Bug Description

I suggest to add "abi-check" and "abi-dump" targets to the makefile to be able to check API/ABI compatibility of librpm. The "abi-dump" target is for creating of reference ABI dump of a stable RPM version, which will be saved in CVS. The "abi-check" target is for checking of the latest version for compatibility with an old one.

Makefiles to be changed:

    lib/auto/Makefile.am
    rpmio/auto/Makefile.am
    rpmdb/auto/Makefile.am
    build/auto/Makefile.am

The following XML-descriptors should be used as input for basic abi-compliance-checker tool:

    lib/auto/desc
    rpmio/auto/desc
    rpmdb/auto/desc
    build/auto/desc

description: updated
Jeff Johnson (n3npq)
Changed in rpm:
milestone: 5.4.6 → 5.4.7
Revision history for this message
Jeff Johnson (n3npq) wrote :

The "abi-check" target is essentially already wired into RPM
because of
   SUBDIRS = auto
in the rpmio/rpmdb/lib/build directories. So
   make check
recurses into each auto sub-directory. Its easy enough to add

   abi-check: check

rules if there is a need to have an explicit "make abi-check". I typically
do
    cd rpmio/auto
    make check
instead.

Lemme look at the "abi-dump: target. I've never actually tried the ABI compliance
checker because of the statefulness of the data between versions.

Changed in rpm:
status: New → In Progress
Revision history for this message
Jeff Johnson (n3npq) wrote :

OK, installed and actually looked at what would be entailed
adding an "abi-dump" target.

The immediate purpose (that I can see) would be to maintain detailed info
regarding rpm library ABI info persistently in, say, an abi-dumps directory
used as the -dump-path argument with abi-compliance-checker.

That can be arranged by adding a new top-level cvs module that is
pulled in with the
    ./devtool checkout
command and a new ABI dump *.abi.tar.gz could be checked in and
maintained as part of an RPM build.

I can drill all that into RPM if that is what you are asking for.

I do point pout that there are almost no programs that link RPM libraries.
E.g.

[jbj@wareham ~]$ readelf -a /usr/lib/librpm-5.4.so | grep SONAME
 0x0000000e (SONAME) Library soname: [librpm-5.4.so]
[jbj@wareham ~]$ rpm -q --whatrequires librpm-5.4.so
perl-URPM-4.38-5-mdv2012.0.i586
abrt-2.0.2-2-mdv2012.0.i586
rpmstats-0.7-4-mdv2012.0.i586
rpm-5.4.4-36-mdv2012.0.i586
rpm-build-5.4.4-36-mdv2012.0.i586
python-rpm-5.4.4-36-mdv2012.0.i586

So basically rpmstats and abrt. I would bundle rpmstats into RPM itself except
    GPLv2 is incompatible with LGPL

abrt is from Fedora, and the usage case is accessing an rpmdb in order
to map a library file name -> package name to find the associated detached debug info.
This COULD and SHOULD be done without linking any rpm libraries, either in a standalone
executable maintained in RPM itself to do the mapping. or (if you simply must) writing
the 100-200 lines of code necessary to do the specific lookup using Berkeley DB
routines, and a simple extraction of the NEVRA information used to create the
prefix of the path where the detached ELF symbols reside.

There's also multiple RPM libraries, each with rather different ABI restrictions.

So there really isn't much of a usage case for maintaining *.abi.tar.gz blobs in @rpm5.org
cvs. But I can/will drill in a "abi-dump" target if you wish.

Revision history for this message
Per Øyvind Karlsen (proyvind) wrote :

I'm quite sure Mandriva wouldn't mind you merging rpmstats into rpm under LGPL.. :)

Revision history for this message
Jeff Johnson (n3npq) wrote :

Show me a GPLv2 -> LGPL in rpmstats and I can/will maintain
@rpm5.org.

And its _INSANE_ for abrt to link RPM libraries (and Berkeley DB!)
for the library -> NEVRA -> symbols mapping that needs to be performed.

Revision history for this message
Per Øyvind Karlsen (proyvind) wrote :

done, see svn revision 273843 ;)

Revision history for this message
Jeff Johnson (n3npq) wrote :

I meed just a tad more, like a 1-line note from jmcrosat
posted publicly stating GPLv2 -> LGPLv2 is being
done. Alternatively dual Licensing suffices if that
makes the task easier.

Jeff Johnson (n3npq)
Changed in rpm:
milestone: 5.4.7 → 5.4.8
status: In Progress → Incomplete
Jeff Johnson (n3npq)
Changed in rpm:
importance: Low → Wishlist
Jeff Johnson (n3npq)
Changed in rpm:
importance: Wishlist → Undecided
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.