[csw-maintainers] mirroring a subset of pkgs
Daniel Pocock
daniel at opencsw.org
Mon Dec 19 18:44:42 CET 2011
On 17/12/11 10:32, Sebastian Kayser wrote:
> * 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.
I wasn't aware of that - when reading the docs, I just zoomed in on the
Linux downloading info:
http://pkgutil.wikidot.com/use-with-examples#toc8
and the stuff about stream mode (which is just above the Linux stuff)
didn't really stand out. Maybe it should be repeated in the Linux
section (or an extra example)
>> 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.
I attach another copy of the script, slightly improved
Before making a document, should this become part of the pkgutil SVN, or
should I start another repo for it?
For those wanting to have a quick go at it, just play with the settings
at the beginning
>> 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.
Thanks for that tip - in the example, I was just running pkgutil on a
Linux box, with no pkgutil.conf present
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pkgutil-mkmirror
URL: <http://lists.opencsw.org/pipermail/maintainers/attachments/20111219/28d94b23/attachment.ksh>
More information about the maintainers
mailing list