<div class="gmail_quote">On Thu, Jan 13, 2011 at 2:19 AM, Grail Dane <span dir="ltr"><<a href="mailto:grail69@hotmail.com">grail69@hotmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">




<div>
<font face="Tahoma" size="2">Hi All</font><div style="font-family: Tahoma; font-size: 10pt;"><br></div><div style="font-family: Tahoma; font-size: 10pt;">Wasn't sure if this was a dev thing or not, but I see we have recently started to host our own copy of iana-etc as the original site seems</div>
<div style="font-family: Tahoma; font-size: 10pt;">to not be responding.  After searching for a bit I found a thread on LFS talking about it and the fact that not only could</div><div style="font-family: Tahoma; font-size: 10pt;">
the source not been downloaded but once it is that the files being used, ie services and protocols, are out of date (circa 2008).</div><div style="font-family: Tahoma; font-size: 10pt;"><br></div><div style="font-family: Tahoma; font-size: 10pt;">
The hot debate about how to update them never really seemed to get resolved except to say to get them from iana directly.</div><div style="font-family: Tahoma; font-size: 10pt;"><br></div><div style="font-family: Tahoma; font-size: 10pt;">
What I thought I would add here is that with one simple change and an addition to make this can be done:</div><div style="font-family: Tahoma; font-size: 10pt;"><br></div><div style="font-family: Tahoma; font-size: 10pt;">
1. The following sed update the now out of date link to where the protocol files are stored:</div><div style="font-family: Tahoma; font-size: 10pt;"><br></div><div style="font-family: Tahoma; font-size: 10pt;">sed -i '/file=/s@pro[^ *]@&/&.txt@' Makefile</div>
<div style="font-family: Tahoma; font-size: 10pt;"><br></div><div style="font-family: Tahoma; font-size: 10pt;">2. There is already a built in get call that can retrieve the latest copies, so simply do the following:</div>
<div style="font-family: Tahoma; font-size: 10pt;"><br></div><div style="font-family: Tahoma; font-size: 10pt;">make get && make</div><div style="font-family: Tahoma; font-size: 10pt;"><br></div><div style="font-family: Tahoma; font-size: 10pt;">
And viola, if you ran this today the files would be as up to date as:</div><div style="font-family: Tahoma; font-size: 10pt;"><br></div><div style="font-family: Tahoma; font-size: 10pt;">services    <span style="font-family: monospace; font-size: 16px; white-space: pre-wrap;">2011-01-11</span></div>
<div style="font-family: Tahoma; font-size: 10pt;">protocols   <span style="font-family: monospace; font-size: 16px; white-space: pre-wrap;">2010-11-23</span></div><div style="font-family: Tahoma; font-size: 10pt;"><span style="font-family: monospace; font-size: 16px; white-space: pre-wrap;"><br>
</span></div><div><span style="white-space: pre-wrap;"><font face="Tahoma" size="2">Just thought you might all like to know :)</font></span></div><div><span style="white-space: pre-wrap;"><font face="Tahoma" size="2"><br>
</font></span></div><div><span style="white-space: pre-wrap;"><font face="Tahoma" size="2">Cheers </font></span></div><div><span style="white-space: pre-wrap;"><font face="Tahoma" size="2">Grail</font></span></div></div></blockquote>
<div><br>Grail,<br><br>Thanks for pointing this out!  I didn't know the package had a built in updater script, that's neat.<br><br>I did find that your sed line doesn't work well for me on amd64 Debian 5, it ends up garbling the protocol-numbers.iana line in Makefile to look like this:<br>
<br>protocol-numbers.iana:<br>        $(AWK) -f get.gawk -v file=prot/prot.txtocol-numbers >protocol-numbers.i<br>ana<br></div></div><br>Which isn't the desired output.  A less complex sed line that works for me, achieves your desired intent, and is a little easier for the regex impaired (myself included :) would be:<br>
<br>sed -i '/file=/s@protocol-numbers@&/&.txt@' Makefile<br><br>I'll craft a patch and submit it to the list.<br><br>Regards,<br>Andrew<br>