Re: Advice on configuring a (partial) local mirror
Andre Costa <[email protected]> Thu, 30 Sep 2004 09:03:48 -0300
| Newsgroups | gmane.linux.conectiva.apt-rpm |
|---|---|
| Organization | TecGraf |
| Message-ID | <[email protected]> |
On Wed, 29 Sep 2004 12:57:07 -0300 Andre Costa <[email protected]> wrote: [...] > Replying to myself: I just looked into package contents, and it all > goes to pretty standard places, so I guess there would be no problems > with using it here on Fedora. Still, any good/bad experiences would be > welcome. > > I'll keep you posted. > > Best, > > Andre Ok, here's what I did: apt-netcache looks great, but it is probably overkill for our specific situation. It allows two-way updates, meaning "client" machines can populate the central cache as well as the "master" does. We don't want/need to do this. So, I avoided all the NFS stuff and apt-netcache with the simple script below: ============================= #!/bin/ash # Andre Costa [[email protected]] Thu Sep 30 08:59:29 BRST 2004 # script to automate the maintenance of a "local partial apt mirror" # (one that only provides all updates as 'updates'). echo "INFO: synchronizing with repositories\n==========" apt-get update echo "INFO: downloading upgrades\n==========" apt-get -y -d dist-upgrade echo "INFO: removing old stuff\n==========" apt-get autoclean echo "INFO: updating package links\n==========" cd /var/apt/redhat/FC1/i386/RPMS.updates find . -name \*.rpm | xargs rm -f find /var/cache/apt/archives -name \*.rpm | xargs -iRPM ln -s RPM . find . -name \*.rpm | xargs rename \%3a \: echo "INFO: updating RPM list\n==========" genbasedir --flat --bloat --bz2only /var/apt/redhat/FC1/i386 updates ============================= With a simple apache configuration, now all our local machines can update from this "master" locally by putting a single file on /etc/apt/sources.list.d with this: rpm http://master-server/apt redhat/FC1/i386 updates As usual, feedback/suggestions/rants are welcome. Thks for the help and ideas, Andre -- Andre Oliveira da Costa ([email protected])