[OpenIndiana-discuss] pkg and local zones

Peter Tribble peter.tribble at gmail.com
Thu Feb 20 13:53:53 UTC 2014


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.)

________________________________________
> 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/


More information about the OpenIndiana-discuss mailing list