Downloading Fedora and CentOS source code with yumdownloader


One of the things I really like about Linux is the availability of source code for the kernel and userland applications. If I encounter an issue where a program is misbehaving for some given reason, I can grab a source RPM from a network repository and start poking around to see what is going on. Fedora and CentOS provide the yumdownloader utility to download binary RPMs, and source RPMs when the “–source” option is specified:

$ yumdownloader --source kernel

Loaded plugins: refresh-packagekit
Enabling updates-source repository
Enabling fedora-source repository
kernel-2.6.31-0.17.rc0.git15.fc12.src.rpm | 67 MB 05:28

Once a source RPM is downloaded, you can install it and begin looking through the source. Sweet!

This article was posted by Matty on 2009-06-22 10:36:00 -0400 -0400