<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Oct 10, 2014 at 10:07 AM, Barrie Stott <span dir="ltr"><<a href="mailto:zen146410@zen.co.uk" target="_blank">zen146410@zen.co.uk</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5"><span style="color:rgb(34,34,34)">Where is this Debian/FreeBSD patch? What is it patching? Are there instructions for its use?</span></div></div></blockquote><div><br></div><div><a href="https://svnweb.freebsd.org/ports/head/shells/bash/files/extrapatch-import-functions?revision=369467&view=markup">https://svnweb.freebsd.org/ports/head/shells/bash/files/extrapatch-import-functions?revision=369467&view=markup</a><br></div><div>It's a patch to bash to only import functions in interactive shells or when explicitly enabled. (The previous version disabled it unconditionally; the current one enables in interactive shells.)</div><div>I personally would prefer we adopt this patch.</div><div><br></div><div>Unfortunately it appears to have been revised; the original version didn't automatically enable it in interactive shells, and doing so pretty much brings back the same incompatibility with unpatched bash. Worse, the older revision won't apply to an up to date bash, as the prefix and suffix code added afterward is not present in the patch's context. That said, a simple edit after patching would fix it:</div><div><br></div><div> <span style="color:rgb(0,0,0);font-family:monospace;font-size:medium;white-space:pre">if (!import_functions && !interactive_shell) {</span></div><div><br></div><div>should become</div><div><br></div><div><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium;white-space:pre"> if (!import_functions) {</span><br></div><div><br></div><div># # #</div><div><br></div><div>That said, 10.6 being unsupported by Apple, it is possible that your best bet is to copy /bin/bash to /bin/bash.apple and then copy MacPorts' bash to /bin/bash. (But beware, if you remove MacPorts in the future your /bin/bash will break; copy the saved one back first.)</div><div><br></div></div>-- <br><div dir="ltr"><div>brandon s allbery kf8nh sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a> <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div>
</div></div>