package relocation question
I build most of my /usr/local and make packages out of everything. With my discovery of Solaris 10 zones (whee), I've gone through my packages that have scripts and prefixed paths with ${PKG_INSTALL_ROOT}.
Some of my packages need to generate userids/groupids (i.e. ssh) and have a checkinstall script that looks for assignment of the expected uid. I was actually debugging something else and stumbled upon this issue:
checkinstall:
UIDNAME="`nawk -F: '$3 == \"16\" {print $1}' ${PKG_INSTALL_ROOT}/etc/passwd`"
GROUPNAME="`nawk -F: '$3 == \"16\" {print $1}' ${PKG_INSTALL_ROOT}/etc/group`"
When I execute pkgadd -v -R /foo/zones/myzone/root -d MYopenssh-4.3p2.pkg MYopenssh:
[...]
+ nawk -F: $3 == "16" {print $1} /foo/zones/myzone/root/etc/passwd
nawk: can't open file /foo/zones/myzone/root/etc/passwd
source line number 1
To ensure that I did not fatfinger the path, I cut'n'paste that error directly into another window with root shell:
: (r) mybox; ls -l /foo/zones/myzone/root/etc/passwd
-rw-r--r--1 rootroot 752 Sep 13 16:42 /foo/zones/myzone/root/etc/passwd
All of my package documentation say that checkinstall is "executed in-place", which I take to mean "not chrooted".
I know this is not the "proper" way to add a package to a zone, but it was an easy chroot target for me to use for debugging. For this situation, that shouldn't matter.
Comments?
Message was edited by:
WRWindsor

