[csw-maintainers] mirroring a subset of pkgs

Sebastian Kayser skayser at opencsw.org
Sat Dec 17 10:32:57 CET 2011


* Daniel Pocock <daniel at opencsw.org> wrote:
> On 16/12/11 18:25, Dagobert Michelsen wrote:
> >
> > Am 16.12.2011 um 10:41 schrieb Peter Bonivart:
> >   
> >> On Fri, Dec 16, 2011 at 8:11 AM, Daniel Pocock <daniel at opencsw.org> wrote:
> >>     
> >>> pkgutil has the ability to run in download-only mode and collect
> >>> packages for installation later/on other machines
> >>>
> >>> However, it then becomes necessary to manually pkgadd each pkg.gz on the
> >>> target machine - potentially a painful process
> >>>       
> >> But it does output all the commands necessary to pkgadd the packages
> >> in the correct order. You shouldn't have to do more than copy'n'paste
> >> that.
> >>     
> > The resulting thing to be transfered could include a generated install
> > script and an admin file together with the packages bundles up as tar
> > or self-installing .sh or something to make things easier.
> 
> I ran pkgutil for coreutils in download only mode to test this
> 
> The output (see below) appears to have the package list in the right
> order, but it doesn't give the commands to run

What Peter was talking about is the -s/--stream mode. It'll put all
requested packages in one file and afterwards tell you the pkgadd
commands necessary to install them on the target box.

> Even so, the approach I have provided for building a mirror is still
> quite valid for a subset of the catalog, because after I have built my
> `mini-mirror', I may not want to install every downloaded package on
> every target machine - I may still want pkgutil to just pick some of the
> packages and their dependencies when I am on each target host.

Yes, building an internal mirror based on a subset of packages is
something that's likely a common use case. Do we have a tutorial, FAQ
entry, or wiki page for how to do that? If not, we should get one.

> E.g. on some hosts, I want gangliaweb (which depends on rrdtool and
> gangliaagent and it's dependencies), but on other hosts I just want
> gangliaagent (and not rrdtool, apache, etc)
> 
> 
> daniel at lt2:~/csw/pkgutil-trunk$ ./pkgutil -d -y -t
> http://mirror.opencsw.org/opencsw/unstable -T i386:5.10 -P /tmp/pkgs
> coreutils
> You're not root and didn't set -W, using home dir.
> => Fetching new catalog and descriptions
> (http://mirror.opencsw.org/opencsw/unstable/i386/5.10) if available ...
> --2011-12-17 12:00:55-- 
> http://mirror.opencsw.org/opencsw/unstable/i386/5.10/catalog
> Resolving mirror.opencsw.org... 131.188.40.82, 2001:638:a00:28::52
> Connecting to mirror.opencsw.org|131.188.40.82|:80... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 677820 (662K) [text/plain]
> Saving to:
> `/home/daniel/.pkgutil/catalog.mirror.opencsw.org_opencsw_unstable_i386_5.10.tmp'
> 
> 100%[======================================>] 677,820      238K/s   in
> 2.8s   

Not relevant to the thread, but for general pkgutil usage. Are you aware
of the wgetopts=-q in pkgutil.conf? Makes for a much terser and IMHO
nicer output.

Sebastian


More information about the maintainers mailing list