Creating a local RPM repository

Bill Davidsen davidsen at tmr.com
Tue Nov 10 20:02:56 UTC 2009


Timothy Murphy wrote:
> Patrick O'Callaghan wrote:
> 
>>>>> Concretely, I want yum to look first in /var/cache/yum/updates on my
>>>>> laptop, then in alfred:/var/cache/yum/updates on a local machine,
>>>>> and then in the remote repository.
>>>>>
>>>>> What exactly can I put in /etc/yum.repos.d/fedora-updates.repo
>>>>> to implement this?
>>>> yum install yum-plugin-priorities
>>> Thanks.
>>> I've installed that, but haven't worked out
>>> how to use it to make yum look on my local network ...
>> yum doesn't know anything about "looking on your local network". You
>> still have to set up a repo and point to it.
> 
> In that case, I'm not clear how yum-plugin-priorities would help.
> 
> I see that there is a yum-downloadonly package,
> which I just installed.
> This adds an option --downloadonly.
> 
> I assume that you can then later run "yum update",
> and it will install or update the packages that were downloaded,
> as well as any other new ones.
> 
> If that is so, then it seems to imply that yum looks first
> in /var/cache/yum/ to see if required packages are already downloaded.
> If it finds them there then it uses them;
> otherwise it downloads them from a remote repository.
> 
> That being so, my question is: why not allow yum to look at
> what yum has saved on another computer?
> 
> I notice that after installing the yum-downloadonly package,
> there is another new option --downloaddir=DLDIR
> which seems to allow RPMs (and other files in /var/cache/yum/ ?)
> to be installed in a specified directory.
> 
> It's not clear to me if yum will remember this new directory
> if I use both these options --downloadonly and --downloaddir=OLDIR ?
> Or will I have to specify --downloaddir again when updating?
> 
> Is all this a possible way of saving RPMs on a /common directory
> served by NFS?
> 
Perhaps you missed my reply to this, <hd26d3$rpl$1 at ger.gmane.org>, indicating 
that I have been doing this and it works very well for me on FC11 and 
CentOS-5.[34] /var/cache/yum directories.

> I suspect I may have misunderstood the basics of yum ...
> 
If the post on shared cache isn't clear and you want to try it, I'll try to 
clarify. But it's really simple, just create a directory on a server, mount it 
rw on /var/cache/yum, and run update on one machine at a time. Any prm used on 
one machine is there for the others, and you never download a byte of data you 
don't need on *some* machine, so bandwidth is minimized.

-- 
Bill Davidsen <davidsen at tmr.com>
   "We have more to fear from the bungling of the incompetent than from
the machinations of the wicked."  - from Slashdot




More information about the fedora-list mailing list