As part of a project, I need to rebuild source RPMs from the really convenient Remi Yum repo(Source RPMS).

The search for some way to efficiently get those packages was not a very successful venture(common keywords lead to very polluted results on Google). reposync can do this, but only as an add-on to cloning the RPM portion of the repo. What I need is something that does this just for the sources.

Any leads to doing this efficiently?

Note: Inefficient solution already applied:

extractXPathAttr.pl 'http://rpms.famillecollet.com/SRPMS/'  '//tr/td[2]/a[1]' 'href'  |\
    grep src.rpm |\
    xargs -I{} wget 'http://rpms.famillecollet.com/SRPMS/{}'

(extractXPathAttr.pl extracts the required attribute of the elements specified by the XPath from the given URL. I'll put it up on github once it's cleaned up and documented.)

  • I suggest you email remi, because nobody is mirroring his srpms, and you can't rsync them from him. Mar 30, 2015 at 8:24
  • @MichaelHampton I'm hoping for an answer to this class of problems, not just a specific solution to my problem (which I have solved, albeit inefficiently as compared to reposync)
    – Samveen
    Mar 30, 2015 at 8:43
  • 1
    The solution to the class of problems is rsync. Mar 30, 2015 at 8:54

2 Answers 2


reposync can be used for just the sources.

It does not matter if the source repo is enabled under /etc/yum.repos.d/ or not. Just as long as there is a source repo under there it will reposync with it enabled or not.

Make sure that you specify the name of the source repository along with the --source option:

reposync -n --source -r foobar-source

Versions used in this answer: rpm -q yum-utils yum-utils-1.1.31-42.el7.noarch cat /etc/redhat-release CentOS Linux release 7.4.1708 (Core)


You could try mirroring the contents of the repository:

wget --mirror http://rpms.famillecollet.com/SRPMS/

The mirror option already uses timestamping, so it's useful for updates of the local mirror as well.

Then use createrepo locally.

You must log in to answer this question.

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