<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from rtf -->
<style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<font face="Calibri" size="2"><span style="font-size:11pt;">
<div><font color="#1F497D">&nbsp; Hello all &#8211; I recently ran into an issue using pca(8) with zones and $TMPDIR.&nbsp; Have you seen this before?</font></div>
<div><font color="#1F497D">&nbsp;</font></div>
<div><font color="#1F497D">&nbsp; Background:&nbsp; I used pca v20101221-01 to patch S10U3 (metacluster SUNWCXall) with alternate locations for backdir, patchdir, and xrefdir set in pca.conf.&nbsp; That seems to work fine with native containers.&nbsp; Beyond that, setting $TMPDIR
seems to break something (possibly pkgadd as invoked by patchadd) in the NGZ phase. </font></div>
<div><font color="#1F497D">&nbsp;</font></div>
<div><font color="#1F497D">&nbsp; All noreboot patches (including 119254-78) went on fine in multi-user mode (zone was in &#8220;running&#8221; state).&nbsp; I rebooted directly to runlevel S for this phase. &nbsp; Pre-patch validation goes fine, and the GZ applies successfully; but
then I see errors, and patchadd fails&nbsp;  Every patch failed with these same errors:</font></div>
<div><font color="#1F497D">&nbsp;</font></div>
<div><font color="#1F497D">&nbsp;</font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;"># <b>grep dir /usr/local/etc/pca.conf</b></span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">xrefdir=/apps/patch</span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">patchdir=/apps/patch/tmp</span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">backdir=/apps/patch/backout</span></font></div>
<div><font color="#002060">&nbsp;</font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;"># <b>TMPDIR=/apps/patch/tmp pca </b><b>&#8211;</b><b>i missingrs</b></span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">List: missingrs (32/4376)</span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">&nbsp;</span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">Patch&nbsp; IR&nbsp;&nbsp; CR RSB Age Synopsis</span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">------ -- - -- --- --- -------------------------------------------------------</span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">118712 23 &lt; 24 R-- 173 SunOS 5.10: Sun XVR-100 Graphics Accelerator Patch</span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">&nbsp;</span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">Looking for 118712-24 (1/32)</span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">Found patch file</span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">&nbsp;</span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">Installing 118712-24 (1/32)</span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">Unzipping patch</span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">Running patchadd</span></font></div>
<div><font color="#002060">&nbsp;</font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">&lt;snip&gt;</span></font></div>
<div><font color="#002060">&nbsp;</font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">Patching non-global zones...</span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">Patching zone myzone</span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">Booting non-global zone myzone for patching...</span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">Adding patches...</span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;"><b>mkdir: Failed to make directory &quot;/apps/patch/tmp/patchadd-251911498&quot;; No such file or directory</b></span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;"><b>ERROR: Unable to make temporary directory /apps/patch/tmp/patchadd-251911498</b></span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;"><b>Patchadd is terminating.</b></span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;"><b>/usr/lib/patch/patchadd[18]: /apps/patch/tmp:&nbsp; not found</b></span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">Done!</span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">Restoring state for non-global zone myzone...</span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">Patch 118712-24 failed in non-global zone myzone.</span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">Failed (exit code 36)</span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">Failed (11:30:38/00:00:32/00:00:46, 1/32, 0/0/1)</span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">&lt;snip&gt;</span></font></div>
<div><font color="#1F497D">&nbsp;</font></div>
<div><font color="#002060">&nbsp;</font></div>
<div><font color="#1F497D">&nbsp; My specified directories do exist in the NGZ.&nbsp; When I boot myzone into runlevel S (or place it in the &#8220;ready&#8221; state), then &lt;zonepath&gt;/apps/patch/* can be traversed.&nbsp; I verified this when I successfully re-ran the same pca command
without $TMPDIR, and everything worked as expected &#8211; my alternate directories are honored in the NGZ, and patchadd succeeds every time.</font></div>
<div><font color="#1F497D">&nbsp;</font></div>
<div><font color="#1F497D">&nbsp; I&#8217;m not sure if I&#8217;m simply doing it wrong, or if this is some sort of limitation of $TMPDIR with the SysV package tools and containers. &nbsp;&nbsp; Any ideas?</font></div>
<div><font color="#1F497D">&nbsp;</font></div>
<div><font color="#1F497D">&nbsp; Alternate theory:&nbsp; I recall years ago (probably on 5.8) that patchadd invoked certain sub-commands as EUID &#8220;nobody&#8221;, and occasionally I would see the odd failure when my current working directory was only accessible by root.&nbsp; Maybe
this is something similar to that.&nbsp;&nbsp; Could it be that my &lt;zonepath&gt;/apps/patch/tmp directory needs permissions 1777, like /var/tmp uses?</font></div>
<div><font color="#1F497D">&nbsp;</font></div>
<div><font color="#1F497D">&nbsp; Let me know if you have any ideas, maybe I just missed something simple.&nbsp;&nbsp; Thanks everyone!&nbsp;&nbsp; -cheers, CSB</font></div>
<div>&nbsp;</div>
</span></font>
</body>
</html>