My current way of building packages from srpm:

  • cd ~/rpmbuild/SRPMS
  • yumdownloader --source $p
  • sudo yum-builddep *.src.rpm
  • if some build deps not found, repeat the above steps for each of them
  • rpmbuild --rebuild *.src.rpm
  • sudo yum --nogpgcheck install ../RPMS/*/*.rpm
  • if some install deps not found, repeat the above steps for each of them

There is still too much manual work. I need some better tool, which can:

  • resolve srpm name more reliably. yumdownloader can't always guess it:

    [git@dioptase SRPMS]$ yumdownloader --source pdf-tools
    Enabling rhel-source repository
    Enabling epel-source repository
    No Match for argument pdf-tools
    Nothing to download

    ( In this case pdf-tools-0.29a-2.1.el6.noarch.rpm is built along with perl-Text-PDF )

  • Automatically build and install from source the dependencies missing in the repos (both build and install deps).

  • Maybe create repodata/ in RPMS/*/ , so I won't need to deal with rpm filenames.


While I think you are tying to solve a human problem programmatically, which is not yet ready to be solved so, you may want to look into the mock builder tool. I'm told it can assess dependencies and install those as required.

  • yes, switched to mock as soon as I learned about its existence – basin Aug 18 '15 at 21:06
  • FYI, we switched from using mock to using docker and our builds are enormously faster. – Andrew Sep 15 '16 at 0:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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