<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Copperplate Gothic Bold";
        panose-1:2 14 7 5 2 2 6 2 4 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:1442067747;
        mso-list-type:hybrid;
        mso-list-template-ids:-1625278680 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal>Hi all,<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>In trying to track down what was ultimately a typing problem
in front of the keyboard, I&#8217;ve developed a set of steps to include the
expect patch in Ubuntu 8.04 LTS (Server Ed)&#8217;s expect package.&nbsp; I&#8217;ve
also tried to submit this to the maintainer of the package, so we shall see
what happens. <o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>A handy page I referred to for compiling packages:<o:p></o:p></p>

<p class=MsoNormal>http://www.cyberciti.biz/faq/rebuilding-ubuntu-debian-linux-binary-package/<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Here are the steps:<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='mso-list:Ignore'>1)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]>paco@test:~$ <b>sudo apt-get install build-essential
fakeroot dpkg-dev</b><o:p></o:p></p>

<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='mso-list:Ignore'>2)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]>paco@test:~$ <b>cd /usr/src/</b><o:p></o:p></p>

<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='mso-list:Ignore'>3)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]>paco@test:/usr/src$ <b>sudo apt-get source expect</b><o:p></o:p></p>

<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='mso-list:Ignore'>4)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]>paco@test:/usr/src$ <b>cd expect-5.43.0/</b><o:p></o:p></p>

<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='mso-list:Ignore'>5)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]>paco@test:/usr/src/expect-5.43.0$ <b>sudo patch &lt; ~/expect-rancid-ubuntu804lts.patch</b><o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in;text-indent:-.25in;
mso-list:l0 level2 lfo1'><![if !supportLists]><span style='mso-list:Ignore'>a.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]>Patch
contents:<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in'>---
exp_chan.c.bak&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2008-08-29 11:46:51.000000000
-0700<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in'>+++ exp_chan.c&nbsp;
2008-08-29 12:14:28.000000000 -0700<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in'>@@ -200,6 +200,11 @@<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* nonblocking, the read will never block.<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
*/<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in'><o:p>&nbsp;</o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in'>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
/* Added next line as a patch to make rancid work. There is a know bug<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in'>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* with expect and rancid.<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in'>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* See http://www.shrubbery.net/rancid/EXPECTBUG for details.<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in'>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
*/<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in'>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
fcntl(esPtr-&gt;fdin, F_SETFL, O_NONBLOCK); /* patched line for rancid */<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in'>&nbsp;&nbsp;&nbsp;&nbsp;
bytesRead = read(esPtr-&gt;fdin, buf, (size_t) toRead);<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in'>&nbsp;&nbsp;&nbsp;&nbsp;
/*printf(&quot;ExpInputProc: read(%d,,) =
%d\r\n&quot;,esPtr-&gt;fdin,bytesRead);*/<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in'>&nbsp;&nbsp;&nbsp;&nbsp; if
(bytesRead &gt; -1) {<o:p></o:p></p>

<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='mso-list:Ignore'>6)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]>paco@test:/usr/src/expect-5.43.0$ <b>cd ..</b><o:p></o:p></p>

<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='mso-list:Ignore'>7)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]>paco@test:/usr/src$ <b>sudo apt-get build-dep expect</b><o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in;text-indent:-.25in;
mso-list:l0 level2 lfo1'><![if !supportLists]><span style='mso-list:Ignore'>a.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]>Just
say &#8220;yes&#8221; when it wants to install a ton of dependencies. You need
this for compiling.<o:p></o:p></p>

<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='mso-list:Ignore'>8)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]>paco@test$ <b>sudo dpkg-buildpackage -rfakeroot &#8211;b</b><o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in;text-indent:-.25in;
mso-list:l0 level2 lfo1'><![if !supportLists]><span style='mso-list:Ignore'>a.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]>This
step could take a while, depending on your processor speed and memory for
compiling.<o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in;text-indent:-.25in;
mso-list:l0 level2 lfo1'><![if !supportLists]><span style='mso-list:Ignore'>b.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]>Don&#8217;t
worry about the package signature errors at the end.&nbsp; You&#8217;re not the
maintainer anyway. ;-)<o:p></o:p></p>

<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><span
style='mso-list:Ignore'>9)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><![endif]>paco@test:/usr/src$ <b>sudo /usr/bin/dpkg -i
expect_5.43.0-14_amd64.deb</b><o:p></o:p></p>

<p class=MsoListParagraph style='margin-left:1.0in;text-indent:-.25in;
mso-list:l0 level2 lfo1'><![if !supportLists]><span style='mso-list:Ignore'>a.<span
style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span><![endif]>Your
actual filename may differ, depending on architecture.&nbsp; Adapt and move on.<o:p></o:p></p>

<p class=MsoListParagraph>(Reading database ... 46139 files and directories currently
installed.)<o:p></o:p></p>

<p class=MsoListParagraph>Preparing to replace expect 5.43.0-14 (using
expect_5.43.0-14_amd64.deb) ...<o:p></o:p></p>

<p class=MsoListParagraph>Unpacking replacement expect ...<o:p></o:p></p>

<p class=MsoListParagraph>Setting up expect (5.43.0-14) ...<o:p></o:p></p>

<p class=MsoListParagraph><o:p>&nbsp;</o:p></p>

<p class=MsoListParagraph>Processing triggers for libc6 ...<o:p></o:p></p>

<p class=MsoListParagraph>ldconfig deferred processing now taking place<o:p></o:p></p>

<p class=MsoListParagraph style='text-indent:-.25in;mso-list:l0 level1 lfo1'><![if !supportLists]><b><span
style='mso-list:Ignore'>10)<span style='font:7.0pt "Times New Roman"'>&nbsp;&nbsp;
</span></span></b><![endif]><b>That&#8217;s it!&nbsp; You&#8217;re package is
installed with a patched version of Expect.<o:p></o:p></b></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><span style='font-family:"Copperplate Gothic Bold","sans-serif"'>Chris
Gauthier, CCNA<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Courier New"'>Network
Administrator<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-family:"Courier New"'>Marion and Polks
Schools Credit Union<o:p></o:p></span></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

</body>

</html>