I have an RPM that I built. And I am looking to figure out how to extract the Spec file out of it. I have tried:
rpm --scripts -qp sampleBuild.rpm
That didn't work. Does anyone know the proper command?
Usually, only source rpms have a spec file. You can extract it with
rpm2cpio myrpm.src.rpm | cpio -civ '*.spec'
or you can install the src rpm, as a user, with
rpm -i myrpm.src.rpm, when
rpmbuild/SPECS/ will get the spec file.
I did some more digging around and while I cannot extract the SPEC file into another file such as text, I can use
rpmrebuild to view the SPEC file and edit it. So, with that being said, here is the command I used:
rpmrebuild -e -p sampleBuild.rpm