[OpenIndiana-discuss] pkg and local zones
Lou Picciano
loupicciano at comcast.net
Thu Feb 20 17:24:34 UTC 2014
----- Original Message -----
From: "Peter Tribble" <peter.tribble at gmail.com>
To: "Discussion list for OpenIndiana" <openindiana-discuss at openindiana.org>
Sent: Thursday, February 20, 2014 8:53:53 AM
Subject: Re: [OpenIndiana-discuss] pkg and local zones
On Thu, Feb 20, 2014 at 8:46 AM, Stefan Müller-Wilken <
stefan.mueller-wilken at acando.de> wrote:
> What speaks against Jim's original approach of using the '-R' option to
> pkg? I've used this with very reasonable success for quite a while now.
> That simply works for me.
>
I would expect it to mostly work most of the time, but it's not
quite equivalent, nor is it guaranteed to work correctly under
all circumstances, and it's not always safe.(Think, for example,
of a situation in which the file system layout in the zone is
constructed from mountpoints that don't have the same
layout as viewed from the global zone. There was a time
when the SVR4 packaging tools used to be able to work out
how to put things in the right place for diskless client systems,
but that just shows how fragile this could be.)
Gotta second Peter's caution here. This is precisely the kind of inconsistency we've run into when using the -R option to pkg. I'm quite sure I _still_ don't understand it (and wait patiently for one of you to write the 'Definitive Guide' !! ) Meanwhile: Magical incantations, glue and duct tape.
Lou Picciano
________________________________________
> Von: Jim Klimov [jimklimov at cos.ru]
> Gesendet: Mittwoch, 19. Februar 2014 13:41
> An: openindiana-discuss at openindiana.org
> Betreff: Re: [OpenIndiana-discuss] pkg and local zones
>
> On 2014-02-19 13:27, Peter Tribble wrote:
> >> However, every now and then I need to install some package into
> >> all zones. While I can parse the "zoneadm list" output and find
> >> zoneroots and ask pkg(5) to install into the altroots,
> > Would running pkg via zlogin be better?
>
> It would be roughly equivalent in terms of command-line scripting,
> and would only influence the zones running at the moment. Also,
> such installation would rely on the package servers configured and
> available in the local zone (if any). Although pkg via zlogin has
> the benefit of instantly launching some SMF wrappers that the new
> package might provide, etc. So these are quite different methods...
>
> By the way, I saw that SVR4 pkgadd done into a local zone from the GZ
> (as an altroot) sometimes fails with an error related to the content
> of $ZONEROOT/etc/zones/index: the zone path there (/) is invalid
> in the GZ context. I have to script up commenting away this entry
> (or renaming the file) before pkgadd and returning it after.
> Would this be considered a bug worthy of mentioning in the issue
> tracker? (Now that some people seem offensive about others suggesting
> what people should do, I guess I should ask about every one of my
> crazy-or-not ideas and RFEs ;) )
>
There's probably a good reason why the manpages for pkgadd
and pkgrm explicitly tell you not to do this!
--
-Peter Tribble
http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/
_______________________________________________
OpenIndiana-discuss mailing list
OpenIndiana-discuss at openindiana.org
http://openindiana.org/mailman/listinfo/openindiana-discuss
More information about the OpenIndiana-discuss
mailing list