Ask Your Question

Revision history [back]

As @hello said, you can loop mount the iso file to access its contents. Then, to see the source code of package X (e.g. gedit), you should locate its corresponding .src.rpm package (e.g. gedit-3.10.4-1.fc20.src.rpm).

To see the source code, you should extract it from the .src.rpm package. You can either use rpmdev-extract (or an application like Gnome's Archive Manager (file-roller)), or you can "install" the .src.rpm package using rpm -ivh command (you don't need to do it as root). "Installing" an .src.rpm package actually extracts its contents including it's source code archive into rpm related directories (if you install as a regular user, the contents will be extracted into ~/rpmbuild/ directory). You should be able to find the source code and any patches inside SOURCES/ sub-directory.

To compile the .src.rpm package as is, you can use rpmbuild --rebuild SRC_RPM_FILE.src.rpm. It might need some dependencies you don't have, which you can install manually or using yum-builddep command. To build the source code after modifying it, you can use the .spec file extracted from .src.rpm with the updated source archive (or new patch files) using rpmbuild command. For more information, I'd suggest you to inspect rpmbuild man page.

You might also try to build the package manually using the manual inside the source archive (usually a README or INSTALL file contains instructions for building the source code). This can vary for different packages.