Hi how to unpacks and rebuild rpm package on fedora? Could any one help me on this!

link|improve this question

feedback

1 Answer

up vote 2 down vote accepted

you could unpack rpm using command

rpm2cpio package.rpm | cpio -i --make-directories

If you want to modify package, the better way is to download package.src.rpm file, install it using rpm -i package.src.rpm. This would place sources to /usr/src/redhat/SOURCES. You could patch sources and modify spec file located in /usr/src/redhat/SPECS/ and then rebuild package using

rpmbuild -bb /usr/src/redhat/SPECS/package.spec
link|improve this answer
I don't file /usr/src/redhat – M.Rezaei Oct 28 '09 at 9:48
yumdownloader (in yum-utils package) is handy for snagging srpms. – Chad Huneycutt Oct 28 '09 at 14:19
the directory /usr/src/redhat should be created, when you install your first source rpm. – sumar Oct 30 '09 at 10:04
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.