Bernhard R. Link: symbol files: With great power comes great responsibility
Symbol files are a nice little feature to reduce dependencies of packages.
Before there were symbol files libraries in Debian just had shlibs files
(both to be found in /var/lib/dpkg/info/.
A shlibs file says for each library which packages to depend on when using this
library. When a package is created, the build scripts will usually call
dpkg-shlibdeps, which then looks which libraries the programs in the library use
and then calculate the needed dependencies.
This means the maintainers of most packages do not have to care what libraries
to depend on, as it is automatically calculated.
And as compiling and linking against a newer version of a library can cause
the program to no longer work with an older library, it also means those dependencies
are correct regardless of which version of a library is compiled against.
As shlibs files only have one dependency information per soname, that also means they
are quite strict: If there is any possible program that would not work with an older
version of a library, then the shlibs file must pull in a dependency for the newer version,
so everything needing that library ends up depending on the newer version.
As most libraries added new stuff most of the time, most library packages
(except some notable extremely API stable packages like for example some X libs)
just chose to automatically put the latest package version in the shlibs file.
This of course caused library packages to be quite strict: Almost every package
depended on the latest version of all libraries, including libc, so practically no
package from unstable or testing could be used in stable.
To fix this problems, symbols files were introduced.
A symbols file is a file (also finally installed in /var/lib/dpkg/info/ alongside
the shlibs file) to give a minimum version for each symbol found in the library.
The idea is that different programs use different parts of a library.
Thus if new functionality is introduced, it would be nice to differentiate
which functionality is used and give dependencies depending on that.
As the only thing programmatically extractable from a binary file is the list of dynamic
symbols used, this is the information used for that.
But this only means the maintainer of the library package has now not only one
question to answer ("What is the minimal version of this library a program compiled
against the current version will need?"), but many questions:
"What is the minimal version of this library a program compiled
against the current version and referencing this symbol name will need?".
Given a symbols file of the last version of a library package and the libraries in the
new version of the package, there is one way to catch obvious mistakes: If a symbol was
not in the old list but is not in the current library, one needs at least the current version
of the library.
So if dpkg-gensymbols finds a missing symbol, it will add it with the current version.
While this will never create dependencies too strict, it sadly can have the opposite
effect of producing dependencies that are not strict enough:
Consider for example some library exporting the following header file:
enum foo_action foo_START, foo_STOP ; void do_foo_action(enum foo_action);Which in the next version looks like that:
enum foo_action foo_START, foo_STOP, foo_RESTART ; void do_foo_action(enum foo_action);As the new enum value was added at the end, the numbers of the old constants did not change, so the API and ABI did not change incompatibly, so a program compiled against the old version still works with the new one. (that means: upstream did their job properly). But the maintainer of the Debian package faces a challenge: There was no new symbol added, dpkg-gensymbols will not see that anything changed (as the symbols are the same). So if the maintainer forgets to manually increase the version required by the do_foo_action symbol, it will still be recorded in the symbols file as needing the old version. Thus dpkg will not complain if one tries to install the package containing the program together with the old version of the library. But if that program is called and calls do_foo_action with argument 2 (foo_RESTART), it will not behave properly. To recap:
- Symbols files are a way to minimize dependencies by looking at which symbols of a library a program uses.
- A symbol file lists for each symbol the minimal version of the library a program referencing that symbol needs
- dpkg-gensymbols can detect added functionality if it adds new symbol names
- it's the duty of the maintainer to ensure added functionality not visible by symbol references is properly recorded in the symbols file
Release 0.9.9 of
PostgreSQL's libpq5 package got its symbols file somewhere around version 8.4,
so the symbols in there were all marked with version "8.4~" or greater. As I'm
working on
The great thing about git and other distributed version control systems is
that once you clone (or fork) a repository, you have all the data. You
don't have to trust that Github will preserve it; everyone who develops
the project is a backup.
Github carries this principle quite far amoung the features they provide.
But not all the way. Today I have surveyed their features, and where the
data for each is stored.
It took me a while to find this, so I'm just blogging it so other people
will be able to find it.
I wanted to send a
Summary: It is important that we (the Debian community that relies on OpenPGP through
GNU Privacy Guard) stop using short key IDs. There is no vulnerability in OpenPGP and GPG.
However, using short key IDs (like 0x70096AD1) is
fundementally insecure; it is easy to generate collisions for short key IDs.
We should always use 64-bit (or longer) key IDs, like: 0x37E1C17570096AD1
or 0xEC4B033C70096AD1.
TL;DR: This now gives two results: gpg --recv-key 70096AD1
Over the Christmas period I've not been doing too much.
December was a month that started out pretty well, in the first 10 days I had five models/friends/random-folk come to pose for me. (I have a few folk lined up for mid-January, but things tailed off quickly this month due to people having little free time).
I spent a while mulling over what I was doing with images, as I've recently been doing a fair number of more NSFW images - In December
2012 will be the year where we release wheezy. So, it's time to start
fighting for one of my pet projects: bringing as many languages to 100%
completeness for debconf templates translation.
The reference for this is
Do you believe that there will come a major inflation in the next months or years? If not, you can stop reading this article. Otherwise lets think what would be the right thing to do now.
I used to recommend the GNOME desktop for simple users for two main
advantages over Windows:


"Static program analysis" is a technique whereby a program is
verified for errors without actually running it. Finding bugs manually
with a debugger and one's brain is tedious, so every shortcut that can
help you avoid having to do so is great.
There are some commercial tools available to do such analysis, some
of which are rather expensive; but there are also some open source tools
available to do similar things. One of these is built into
Calypso CalDAV/CardDAV/WebDAV for Android and Evolution
Ever since I bought my first Palm Pilot in 1997, I ve relied upon a
pocket-able device to carry a copy of my calendar and contacts, and for
that same database to be present on my laptop. I went through a long
list of Palm-compatible devices, including both the Palm Treo and Palm
Centro telephones. I even wrote a number of my own
When attacking a process, one interesting target on the heap is the
In the face of 
