in short: sbbdep
sbbdep is a program that reads the elf header of dynamic linked files found in the given argument.
argument can be
a package file from /var/adm/packages/...
a DESTDIR destination path of make install
a single given binaries/dynamic libraries
as result it prints out, or into a file, the package names the given argument require.
sbbdep scans installed packages, extract some information about dynamic linked binaries and libraries and dumps these infos into a sqlite database
usually sbbdep works fast.
time consuming is only the first where the cache becomes created
this takes about ~? (1 - 2) minutes, of cause, duration depends on the number of cpus and speed of disk io
on other runs than the first sbbdep syncs the cache, this is usually a fast operation (~1sec), even if some packages where undated/removed/installed
using the cache with a sqlite client some custom queries can be done like what is required by pkg or file, what are the dependencies of file xy,....
current state of sbbdep is 0.0.1, the first public release.
of cause I wanted to make some things better, prettier, more documented and so on ...
but before going on holiday, than waiting until Christmas cause work stresses and than an other year comes ..
I place the code now to a public repo.
for me it looks stable enough to release it without stress people that will test/use sbbdep to much with problems.
but there may be some bugs I did not noticed, or better say there will be some bugs like it is always the case in software.
but since sbbdep does not anything critical an can/shall be run as normal user it will not do anything bad
getting and building sbbdep
sbbdep uses 2 other components I have written
the direct URLs for all components are
https://bitbucket.org/a4z/a4z
https://bitbucket.org/a4z/a4sqlt3
https://bitbucket.org/a4z/sbbdep
but these are only of interest for c++ developers
to simplify download and build I have created a 'meta' project that reduce download and build to the following steps:
Code:
hg clone https://bitbucket.org/a4z/sbbdep_slk
cd sbbdep_slk
cmake .
make
this will produce a bin directory containing sbbdep.
the slk repo also has some sample sql statements.
Note, the hg command may/will print some key warnings, to get rid of these create a .hgrc file and add
Code:
[hostfingerprints]
bitbucket.org = 81:2b:08:90:dc:d3:71:ee:e0:7c:b4:75:ce:9b:6c:48:94:56:a1:fe
(don't know why I need this on slackware/salix, on other machines I do not need to ad this)
dependencies:
for building, sbbdep requires boost (headers) and cmake
the binary itself has very little dependencies
on Salix
Code:
./sbbdep -s --nosync sbbdep
cxxlibs | gcc-g++, file, gcc, glibc, libelf,
on Slackware
Code:
./sbbdep --nosync sbbdep
aaa_elflibs >= 13.37 | gcc >= 4.5.2
aaa_elflibs >= 13.37 | libelf >= 0.8.13
cxxlibs >= 6.0.14 | gcc-g++ >= 4.5.2
file >= 5.05
gcc >= 4.5.2
glibc >= 2.13 | glibc-solibs >= 2.13
so nothing that would not exist on a default slackware/salix installation
to explain the command above:
Code:
./sbbdep --help
usage: sbbdep [OPTION]... [QUERY]
QUERY can be a single binary/library file
a file from /var/adm/packages
a package DESTDIR of a slackbuild
if QUERY is omitted runs only cache synchronise
if OPTION -c/--cache is omitted, ~/sbbdep.cache will be used
available options:
-c, --cache cache file to use
if this option is omitted
$HOME/sbbdep.cache is used
cache must be read/writable
-f, --file=[FILENAME] write output to file FILENAME
if this option is omitted
output will go to stdout
-s, --short suppress version information
produce a comma separated list of required package names
--nosync skips synchronise the cache
only usefully if cache is up to date
after install/update/remove packages, this option should not be used
if cache is up to date, QUERY will be a bit faster with this option
-h, --help display this text
Note: I have no multilib setup, so I don'T know how sbbdep will resolve dependencies with 32bit binaries on a 64bit installation.
this is still on my todo list.
future plans:
adding some documentation to sbbdep and the other components
review/work the code
waiting for bug reports to fix them
waiting for feature request to implement them
implement some additional features I have in mind