Getting the sources of your RPMs

According to the GPL, you have to provide the source code of any (GPL-licensed) software you distribute (i.e. package and publish). Traditionally, this is satified by Linux distributions in several ways. Like any other package management system, RPM metadata contains the URL of the upstream project that created the software. This is where the (unmodified) source code can be retrieved.

But, packaging almost always means modifying the original sources. This could be in order to add patches or to make it conform better to certain (distro-specific) conventions. Therefore, distros offer a download repository where you can fetch source RPMs, i.e. packages which distribute the modified sources (containing the spec file, patches and additional files).

However, out of curiosity or to contribute back, you may want to know where exactly your package is maintained and developed. Luckily, packages that originate from one of the many Build Service instances (like build.opensuse.orgpackman.links2linux.com or build.meego.com) have that information:

% rpm -q --qf "%{DISTURL}\n" bash   obs://build.opensuse.org/openSUSE:Factory/standard/fd6e76cd402226c76e65438a5e3df693-bash

Now you can copy this URL into your browser, replace ‘obs:’ with ‘http:’ and you should see something interesting 🙂 Well, this is gonna be part of the next OBS release, for now you have to modify the URL slightly further to use the OBS test instance (stage):

https://build.opensuse.org/stage/openSUSE:Factory/standard/fd6e76cd402226c76e65438a5e3df693-bash

Additionally, you could simply put the disturl into the Build Service search and it will come up with the same results. Now you can inspect the development history (revisions) of the package, see who did it and become a part of it! The only thing that is left would be a RPM patch allowing a saner syntax, like:

% rpm -q --disturl bash

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.