Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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