<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"> Hello all – I recently ran into an issue using pca(8) with zones and $TMPDIR. Have you seen this before?</font></div>
<div><font color="#1F497D"> </font></div>
<div><font color="#1F497D"> Background: I used pca v20101221-01 to patch S10U3 (metacluster SUNWCXall) with alternate locations for backdir, patchdir, and xrefdir set in pca.conf. That seems to work fine with native containers. Beyond that, setting $TMPDIR
seems to break something (possibly pkgadd as invoked by patchadd) in the NGZ phase. </font></div>
<div><font color="#1F497D"> </font></div>
<div><font color="#1F497D"> All noreboot patches (including 119254-78) went on fine in multi-user mode (zone was in “running” state). I rebooted directly to runlevel S for this phase. Pre-patch validation goes fine, and the GZ applies successfully; but
then I see errors, and patchadd fails Every patch failed with these same errors:</font></div>
<div><font color="#1F497D"> </font></div>
<div><font color="#1F497D"> </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"> </font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;"># <b>TMPDIR=/apps/patch/tmp pca </b><b>–</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;"> </span></font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;">Patch IR 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 < 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;"> </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;"> </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"> </font></div>
<div><font face="Courier New" size="2" color="#002060"><span style="font-size:9pt;"><snip></span></font></div>
<div><font color="#002060"> </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 "/apps/patch/tmp/patchadd-251911498"; 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: 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;"><snip></span></font></div>
<div><font color="#1F497D"> </font></div>
<div><font color="#002060"> </font></div>
<div><font color="#1F497D"> My specified directories do exist in the NGZ. When I boot myzone into runlevel S (or place it in the “ready” state), then <zonepath>/apps/patch/* can be traversed. I verified this when I successfully re-ran the same pca command
without $TMPDIR, and everything worked as expected – my alternate directories are honored in the NGZ, and patchadd succeeds every time.</font></div>
<div><font color="#1F497D"> </font></div>
<div><font color="#1F497D"> I’m not sure if I’m simply doing it wrong, or if this is some sort of limitation of $TMPDIR with the SysV package tools and containers. Any ideas?</font></div>
<div><font color="#1F497D"> </font></div>
<div><font color="#1F497D"> Alternate theory: I recall years ago (probably on 5.8) that patchadd invoked certain sub-commands as EUID “nobody”, and occasionally I would see the odd failure when my current working directory was only accessible by root. Maybe
this is something similar to that. Could it be that my <zonepath>/apps/patch/tmp directory needs permissions 1777, like /var/tmp uses?</font></div>
<div><font color="#1F497D"> </font></div>
<div><font color="#1F497D"> Let me know if you have any ideas, maybe I just missed something simple. Thanks everyone! -cheers, CSB</font></div>
<div> </div>
</span></font>
</body>
</html>