On Tue, Jan 28, 2003, Michael van Elst wrote:

> On Tue, Jan 28, 2003, Andrews, Martin wrote:
>
> > I love the new openpkg tool for updating RPM's, but I would like to hold
> > onto the source RPM's that it downloads - to avoid multiple downloads for
> > each platform I maintain and to keep an archive of the source for all
> > software I install. I am writing a script that reads output of "openpkg
> > build -s" and does the download and build itself - but I wonder if there is
> > an easier way? Is there some configuration option to the openpkg tool or rpm
> > itself that will cause it to hold onto the source RPM's?
>
> We discussed this topic some time ago. The conclusion was that
> this can be done easiest with a simple WebCache like squid or
> apache with mod_proxy and didn't need to be built into the
> build script.
>
> Another possibility is to create a mirror of the FTP server
> (internally we use rsync) and use the -f/-r options to direct
> the build script to the copy.

Exactly, that's why I use my personal server here at home:

I've a ~/.openpkg/build with:

| -r /e/openpkg/SRC
| -f /e/openpkg/SRC/00INDEX.rdf.bz2
| -P sudo
| -N sudo

Plus a .bashrc with:

| openpkg-sync () {
|     rsync --rsh=ssh -ravP --delete \
|         rsync://rsync.openpkg.org/openpkg-ftp/current/SRC/ \
|         /e/openpkg/SRC/
| }
| openpkg-update () {
|     /usr/opkg/bin/openpkg build -Uaq | sh -
| }

Then for updating my /usr/opkg instance, I just run

| $ openpkg-sync
| $ openpkg-update

And because of the local mirror of the FTP server's CURRENT area, I
can easly add/remove packages without always having to consult the FTP
server.

You can even go one step further: instead of using the 00INDEX.rdf from
the FTP server you can assemble an individual set of .src.rpm files
locally and use "openpkg index" (see "man openpkg") for generating an
individual local index. And then use this with "openpkg build".

                                       Ralf S. Engelschall
                                       [EMAIL PROTECTED]
                                       www.engelschall.com

______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
User Communication List                      [EMAIL PROTECTED]

Reply via email to