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 or have that information:

% rpm -q --qf "%{DISTURL}\n" bash   obs://

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):

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 Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s