<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14867">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  Kevin Harwell: Looks good to me, approved
  Friendly Automation: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">ast_coredumper: Fix issues with naming<br><br>If you run ast_coredumper --tarball-coredumps in the same directory<br>as the actual coredump, tar can fail because the link to the<br>actual coredump becomes recursive.  The resulting tarball will<br>have everything _except_ the coredump (which is usually what<br>you need)<br><br>There's also an issue that the directory name in the tarball<br>is the same as the coredump so if you extract the tarball the<br>directory it creates will overwrite the coredump.<br><br>So:<br><br> * Made the link to the coredump use the absolute path to the<br>   file instead of a relative one.  This prevents the recursive<br>   link and allows tar to add the coredump.<br><br> * The tarballed directory is now named <coredump>.output instead<br>   of just <coredump> so if you expand the tarball it won't<br>   overwrite the coredump.<br><br>Change-Id: I8b3eeb26e09a577c702ff966924bb0a2f9a759ea<br>---<br>M contrib/scripts/ast_coredumper<br>1 file changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/contrib/scripts/ast_coredumper b/contrib/scripts/ast_coredumper</span><br><span>index ee62ab8..9d9f8bc 100755</span><br><span>--- a/contrib/scripts/ast_coredumper</span><br><span>+++ b/contrib/scripts/ast_coredumper</span><br><span>@@ -478,7 +478,7 @@</span><br><span> </span><br><span> # Now iterate over the coredumps and dump the debugging info</span><br><span> for i in ${!COREDUMPS[@]} ; do</span><br><span style="color: hsl(0, 100%, 40%);">-        cf=${COREDUMPS[$i]}</span><br><span style="color: hsl(120, 100%, 40%);">+   cf=$(readlink -ne ${COREDUMPS[$i]})</span><br><span>  echo "Processing $cf"</span><br><span> </span><br><span>  cfdir=`dirname ${cf}`</span><br><span>@@ -520,7 +520,7 @@</span><br><span>          cp -a /${libdir}/asterisk/* ${dest}/${libdir}/asterisk/</span><br><span>              cp -a /usr/sbin/asterisk ${dest}/usr/sbin</span><br><span>            rm -rf ${tf}</span><br><span style="color: hsl(0, 100%, 40%);">-            tar -chzf ${tf} --transform="s/^[.]/${cfname}/" -C ${dest} .</span><br><span style="color: hsl(120, 100%, 40%);">+                tar -chzf ${tf} --transform="s/^[.]/${cfname}.output/" -C ${dest} .</span><br><span>                sleep 3</span><br><span>              rm -rf ${dest}</span><br><span>               echo "Created $tf"</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14867">change 14867</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/14867"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I8b3eeb26e09a577c702ff966924bb0a2f9a759ea </div>
<div style="display:none"> Gerrit-Change-Number: 14867 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>