up vote 0 down vote favorite
share [g+] share [fb]

How would I unpack and rebuild an RPM package on Fedora?

link|improve this question
feedback

1 Answer

You probably want to ask this on serverfault, but to answer it quickly:

  1. Download the source rpm (.SRPM), not the normal rpm.

  2. Create an .rpmmacros file in your home directory and put this in it:

    _topdir /home/${USER}/rpmbuild
    %_signature gpg
    %packager Your Name <<your.name@mail.com>>
    %_gpg_name Your Name <<your.name@mail.com>>
    %_tmppath /tmp
    
  3. Create an rpmbuild directory structure in your home directory:

    mkdir -p ~/rpmbuild/{SPECS,SOURCES,RPMS,SRPMS,BUILD}
    
  4. Install the source rpm.

  5. Edit the specfile in ~/rpmbuid/SPECS.

  6. Run rpmbuild -bb ${your_specfile} to build a binary rpm from the contents of the source rpm.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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