Finding out package version from build-id

So I ended up with the Fedora 21 alpha release and I wanted to know which exact package version of systemd is used in the initrd.

As no yum/rpm is available in the initrd, let’s use the build id to find out:

$ objdump -s -j.note.gnu.build-id systemd 

systemd:     file format elf64-x86-64

Contents of section .note.gnu.build-id:
 02ac 04000000 14000000 03000000 474e5500  ............GNU.
 02bc 7771e45d 58fc3276 70bee168 01a7cab5  wq.]X.2vp..h....
 02cc 23688382                             #h.. 

So the build id of the /usr/lib/systemd/systemd executable is 0x77 0x71 0xe4 0x5d etc.

With this id we can manually search all debuginfo files in the koji:
http://koji.fedoraproject.org/koji/packageinfo?packageID=10477
Sadly we cannot search directly for the build id in koji, so we must go into each relvant debuginfo file and check if it contains our build id.

And after a while I found that build-id belongs to this package systemd-debuginfo-215-11.fc21.x86_64.rpm