You can extract the spec file from a source rpm file (some times a binary rpm file), using command: rpm2cpio {FullNameOfRPM} | cpio -iumd {NameOfRPM.spec}