[lsb-discuss] Multi-version libchk implementation

Denis Silakov dsilakov at gmail.com
Tue Sep 3 14:11:42 UTC 2013


Hi all,

As many of you know, most LSB tools (SDK, different command-line 
checkers) support multiple LSB versions by means of "--lsb-version" 
option. So e.g. "appchk --lsb-version=4.1 your_app" checks your_app 
against LSB 4.1, while "appchk --lsb-version=3.1 your_app" checks it 
against 3.1. The only big exception from this set is libchk - we have to 
support a separate libchk build for every LSB version.

This year we have a GSoC project whose aim is to add multi-version 
support to libchk (and maybe some other minor tools), and I am glad to 
present its first results.

I haven't merged the changes to LSB bazaar yet; they are quite 
significant and it would be nice if more people take a look and test 
them. A tarball with bzr tree with all necessary changes merged is 
available here:

http://cdn.2safe.com/7814033758/misc-test.tar.gz

As for technical details, they are like the following:
* internal representation of data in elfchk has been changed - 
previously we had a separate array of symbols for every LSB version, now 
we have a single array with version bounds (LSB versions are just used 
as "double" numbers; if a symbol has been never excluded, its 
'withdrawn' bound is set to some value higher that the latest LSB 
version); note that new implementation of elfchk internal structures 
also allows to significantly reduce the size of resulting binaries;
* since elfchk is used by both libchk and appchk, the code of both of 
these tools has been updated;
* libchk now provides several dummy_link* files- one per LSB version 
(dummy_link is a binary file that should depend on all libraries 
included in LSB; we can't make a 'multi-LSB' dummy link)

Feel free to build, test and provide feedback.


-- 
Regards,
Denis.



More information about the lsb-discuss mailing list