Re: [zones-discuss] Postinstall script in a future zone

2006-09-08 Thread Enda o'Connor - Sun Microsystems Ireland - Software Engineer




Hi
Does the package touch any inherited file ssytems, ie /usr or /lib as well?

The one reason I can think of for the behaviour you describe is if the package
is installings bits into /usr for instance and /usr is inherited , then zoneadm
install will not run the postinstall script for the package as there were
no files actually installed ( as /usr is inherited ).
I use /usr as an example but the same applies to any inherited filesystem.


If that is that case  ( installing into /usr with postinstall modifying /etc/services
), then the package would be in violation of packaging standards.
Such a package would need to be split into two seperate packages, root and
usr. The following table lists the values for BASEDIR and SUNW_PKG_TYPE that
is acceptable.




  

  SUNW_PKG_TYPE

BASEDIR

Prototype Package Object path allowed

  
  
root

/

No usr or opt/ paths

  
  
usr

/

Only usr/ paths

  
  
usr

/usr

relocatable under /usr/

  
  
kvm

/

only usr/platform

  
  
ow

/usr

 only openwin/ paths

  
  


/opt

 only paths under /opt

  
   


 


So I'm guessing that in your case, you need to have one package that has

SUNW_PKG_TYPE=root  and BASEDIR=/  which delivers the /etc/services bit
and another that has
SUNW_PKG_TYPE=usr  and BASEDIR=/   which delivers into  /usr perhaps.

If the above is not the case, then we will need further info, perhaps the
pkginfo and pkgmap of the failing package.

Enda

Joseph Balenzano wrote:
I have a package
with the follow variables set ... 
 
SUNW_PKG_ALLZONES=true 
SUNW_PKG_HOLLOW=false 
SUNW_PKG_THISZONE=false 
 
The package also runs a postinstall script which modifies /etc/services 
 
 
The package installs fine in the GZ and all current zones.  The issue is
 with future zones.  It appears that the postinstall script does not run
 in the namespace of the future zone that is, when the postinstall script
 runs, it modifies the /etc/services.  I then tried prefixing the  /etc/services
references in the postinstall script  with  PKG_INSTALL_ROOT variable, but
that appears not to be set when  postinstall runs. 
 
I don't really have a package like this but I have seen a number of  packages
from ISVs that does stuff like this.  Is this suppose to work  like this? 
  
 
thxs 
Joe 
 
 




___
zones-discuss mailing list
zones-discuss@opensolaris.org

[zones-discuss] Postinstall script in a future zone

2006-09-07 Thread Joseph Balenzano

I have a package with the follow variables set ...

SUNW_PKG_ALLZONES=true
SUNW_PKG_HOLLOW=false
SUNW_PKG_THISZONE=false

The package also runs a postinstall script which modifies /etc/services


The package installs fine in the GZ and all current zones.  The issue is 
with future zones.  It appears that the postinstall script does not run 
in the namespace of the future zone that is, when the postinstall script 
runs, it modifies the /etc/services.  I then tried prefixing the 
/etc/services references in the postinstall script  with 
PKG_INSTALL_ROOT variable, but that appears not to be set when 
postinstall runs.


I don't really have a package like this but I have seen a number of 
packages from ISVs that does stuff like this.  Is this suppose to work 
like this?


thxs
Joe


--
---
   __ Joseph Balenzano
   /_/\   Market Development Engineering
  / \\ \  Sun Microsystems Inc.
 /_\ \\ / 2 Stamford Plaza, 12th Floor
/_/ \/ / /281 Tresser Blvd
   /_/ /   \//\   Stamford, CT  06901
   \_\//\   / /
\_/ / /\ /[EMAIL PROTECTED]
 \_/ \\ \ Phone/Fax: (203) 653-4186
  \_\ \\
   \_\/
--
___
zones-discuss mailing list
zones-discuss@opensolaris.org