Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

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 <<>>
    %_gpg_name Your Name <<>>
    %_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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .