creating a repo of arbitrary pkgs at arbitrary urls
August 4, 2009
I thought of this from a suggestion that came out of this weeks fedora community brainstorming meeting. Then I thought about implementing it. Then after looking a bit I realized I already implemented it – but I may not have ever talked about it.
Let’s say you want to make your own repo of a number of pkgs but you don’t want to locally host the pkgs. They exist ‘out there’ somewhere and you want to make a repo of them but not provide the pkgs themselves. Here’s what you can do:
create a file and on each line paste the complete url (http://…..) to an rpm you want included in the repo. Save the file.
If you have createrepo 0.9.6 or 0.9.7 run:
createrepo -d -i thatfile /directory/where/you/want/repodata/dir/made
It should download those pkgs to a tmpdir, get their metadata out of them, put the metadata in the repo format and put the location of the pkgs as the urls you specified.
You can then put that ‘repodata’ dir it creates wherever you want and point yum to that path and yum will access it like a normal repo, but when the time comes to download the pkgs, yum will download them from the url you originally specified, not from a path relative to the location where the repodata is hosted.
It’s a pretty simple feature, actually. I wonder if it is easy enough to use for something like kopers.