<?xml version="1.0" encoding="iso-8859-1"?>
<!-- generator="Movable Type/4.01rc1" -->
<rss version="0.91">
  <channel>
    <title>Kevin Rosenberg</title>
    <link>http://www.b9.com/blog/</link>
    <description>Noted Activities</description>
    <language>en-us</language>
    <webMaster></webMaster>
    <lastBuildDate>2007-09-05T13:17:46-07:00</lastBuildDate>
    <pubDate>2007-10-18T18:27:36-07:00</pubDate>

    <item>
      <title>Distributing Repositories</title>
      <description><![CDATA[<p>I've been using source control management (SCM) systems going back to the the very limited RCS back in the early 1990's. Over the years, I've migrated my SCM to take advantage of improved functionality. Recently, I migrated from subversion to git.</p>

<p>While I keep my home directory in SCM (initially CVS, then SVN, now GIT) and that directory is replicated across Linux, Windows, and Mac OS X systems, a big reason for changing from svn to git is to give people more access to my open-source projects.</p>

<p>Periodically, I'd have my CVS and SVN repositories available on a public web server. But, that typically required some effort of mine to mirror a public copy from my private repository. Using a distributed SCM like git, there is no additional effort needed to make a public copy of my respository. But, a bigger win over just making a public respository available is allow users to have their own local respository. While I appreciate the patches (bug fixes and improvments) users email to me, there are some cases where I feel the patch has limited value and don't incorporate it into my upstream respository. With a distributed SCM, users can maintain their own local patches while being able to merge changes that I make to the project's canonical repository. Though, I do hope users to continue to send patches that would be useful to a project's user base. As an added benefit, git has much improvement mechanisms for users to do so.</p>

<p>For my private use, the distributed repository system is not a big win. However, git has much improved branching over subversion which will help when I want to make a local branch for experimental changes.</p>

<p>To convert from my single private respository to a useful public git repository, I've separated my open-source projects into discrete git repositories. The histories of the git repositories on some projects go back to 2002. Unfortunately, I was not able to migrate my tags from subversion to git because git-svnimport got confused about the odd tagging/commits from the cvs2svn tool I used when I migrated from CVS to SVN. If checking out a particular old version is important, one can refer to the dates in the project's <tt>debian/changelog</tt> file to find the commit matching that release. At some point, I may write an automatic tool to retag the version numbers on the projects.</p>

<p>The public git repositories can be browsed at <a href="http://git.b9.com/gitweb">http://git.b9.com/gitweb</a>. I'm modifing my Lisp web site creation tool so it will automatically add the git repository to each project's website. For now, the typical URI to clone a git repository would in the form of <tt>git://git.b9.com/&lt;project&gt;.git</tt>. I expect users of my projects will find the new, much deeper access to my open-source projects empowering.</p>

<p>The set of commands to clone the current set of open-source repositories are:<tt><br />
git clone git://git.b9.com/cl-base64.git<br />
git clone git://git.b9.com/cl-modlisp.git<br />
git clone git://git.b9.com/cl-photo.git<br />
git clone git://git.b9.com/cl-readline.git<br />
git clone git://git.b9.com/cl-rss.git<br />
git clone git://git.b9.com/clsql.git<br />
git clone git://git.b9.com/cluck.git<br />
git clone git://git.b9.com/ctsim.git<br />
git clone git://git.b9.com/getopt.git<br />
git clone git://git.b9.com/hyperobject.git<br />
git clone git://git.b9.com/irc-logger.git<br />
git clone git://git.b9.com/kmrcl.git<br />
git clone git://git.b9.com/lml.git<br />
git clone git://git.b9.com/lml2.git<br />
git clone git://git.b9.com/md5.git<br />
git clone git://git.b9.com/pipes.git<br />
git clone git://git.b9.com/postoffice.git<br />
git clone git://git.b9.com/ptester.git<br />
git clone git://git.b9.com/pubmed.git<br />
git clone git://git.b9.com/puri.git<br />
git clone git://git.b9.com/reversi.git<br />
git clone git://git.b9.com/rlc.git<br />
git clone git://git.b9.com/rt.git<br />
git clone git://git.b9.com/uffi.git<br />
git clone git://git.b9.com/umlisp.git<br />
git clone git://git.b9.com/umlisp-orf.git<br />
git clone git://git.b9.com/vcs-tree.git<br />
git clone git://git.b9.com/wdq2wav.git<br />
git clone git://git.b9.com/wol.git<br />
git clone git://git.b9.com/xlunit.git<br />
git clone git://git.b9.com/xmlutils.git<br />
git clone git://git.b9.com/xptest.git<br />
</tt><br />
</p>]]></description>
      <link>http://www.b9.com/blog/archives/000089.html</link>
    </item>

    <item>
      <title>Cluck - New Common Lisp Library</title>
      <description><![CDATA[<p>I've been working on several new microcontroller designs and found that I was using a calculator too often to compute optimal parameters for the microcontroller timers. So, I built a small library to automate the computations and now it's quite quick to pick a optimal master clock speed, timer prescalar, timer compare value, and UART divisors.
</p><p>
The library is called cluck (Common Lisp &mu;controller ClocK calculator) and is
available at <a href="http://files.b9.com/cluck/">http://files.b9.com/cluck</a>. Its initial functions include:
</p>
<ul>
<li>displaying range of frequencies and periods for 8, 16, and 32-bit timers values for a given clock speed</li>
<li>displaying prescaler, compare values, and error percentage for a desired millisecond interrupt period</li>
<li>displaying UART divisors and error percentage for common serial port speeds</li>
</ul>
]]></description>
      <link>http://www.b9.com/blog/archives/000087.html</link>
    </item>

    <item>
      <title>New CLSQL version</title>
      <description><![CDATA[<p>I released CLSQL 3.7.7 which contains a submission Andrew Golding - a nice improvement to PostgreSQL error recording. Of note, Andrew is employed by Onshored, a company whose code in the (long orphaned) UncommonSQL package helped move CLSQL from 2.x versions to v3.0 which featured full CommonSQL spec compliance.<br />
</p>]]></description>
      <link>http://www.b9.com/blog/archives/000086.html</link>
    </item>

    <item>
      <title>Carlsbad Caverns</title>
      <description><![CDATA[<p>Last week the kids were on autumn school break so we took a quick trip to Carlsbad Caverns in New Mexico. Of all the caves we've visited, Carlsbad is certainly the most impressive. Fortunately, it wasn't a busy time of year, so I could pause and do some cave photography. I used the D2X and 17-35/2.8 with one strobe on the camera and sometimes another SB-800 hand-held and manually fired. Average exposure was ISO 100, f/8 at 20 seconds.</p>

<p>The gallery is at <a href="http://kevin.hypershots.com/gallery/000190ss">http://kevin.hypershots.com/gallery/000190ss</a></p>

<p><img src="http://kevin.hypershots.com/image/0007s42y-M.jpg" /></p>

<p><br />
</p>]]></description>
      <link>http://www.b9.com/blog/archives/000085.html</link>
    </item>

    <item>
      <title>CLSQL Version 3.7.1 Released</title>
      <description><![CDATA[<p>Provides a minor bug fix for AllegroCL's lowercase lisp reader, mlisp. </p>

<p>Also, special thanks to <a href="http://www.advogato.org/person/crhodes/">Christophe Rhodes</a>, frequent contributor to SBCL's MOP, for his excellent suggestion in response to a question for improving CLSQL's MOP internals: CLSQL object definitions use custom slot types. For example, a CLSQL slot may have <tt>:type (varchar 10)</tt> specified which gets translated to a lisp type of <tt>(or null string)</tt>. Rather than parsing and then re-storing the type atrribute of a slot in <tt>compute-effective-slot-definiton</tt>, Christophe suggested performing the type parsing in <tt>initialize-instance :around</tt> of the CLSQL direct-slot-definition object. Then, the real type attribute is stored in the both the direct and effective slot definition from the beginning.This is more AMOP complaint since AMOP doesn't specify that one may change the type attribute of a slot. This is clearly seen since CLSQL no longer needs to modify <a href="http://clozure.com/openmcl/">OpenMCL's</a> <tt>ccl:type-predicate</tt> slot attribute after the type was changed in <tt>compute-effective-slot-definition</tt>.</p>]]></description>
      <link>http://www.b9.com/blog/archives/000084.html</link>
    </item>

    <item>
      <title>New UFFI Version</title>
      <description><![CDATA[<p>I've released <a href="http://uffi.b9.com/">UFFI</a> version 1.5.16. It adds support for the shared library file type on Cygwin.</p>]]></description>
      <link>http://www.b9.com/blog/archives/000083.html</link>
    </item>

    <item>
      <title>New Hyperobject Version</title>
      <description><![CDATA[<p>I've released version 2.10.0 of <a href="http://hyperobject.b9.com/">hyperobject</a>. This version improves AMOP compatibility and the test suite. The release also adds <a href="http://www.sourceforge.net/projects/clisp/">CLISP</a> support . Since Hyperobject requires <a href="http://clsql.b9.com/">CLSQL</a> and now that CLSQL <a href="http://b9.com/archives/000081.html">supports</a> CLISP, I was able to add support for CLISP in this release.</p>]]></description>
      <link>http://www.b9.com/blog/archives/000082.html</link>
    </item>

    <item>
      <title>New CLSQL Platforms</title>
      <description><![CDATA[<p>I've released version <a href="http://clsql.b9.com/">CLSQL</a> 3.7.0 with support for more platforms. All tests pass on these platforms now.</p>
<ul>
<li>SBCL Win32</li>
<li>OpenMCL AMD64</li>
<li>CLISP Win32, Cygwin, Linux i386, Linux AMD64</li>
</ul>

<p>Special thanks for the CLISP support to CMUCL for its LOOP's packge to allow the CLSQL loop extensions and to CFFI-UFFI-COMPAT for its CLISP support.</p>]]></description>
      <link>http://www.b9.com/blog/archives/000081.html</link>
    </item>

    <item>
      <title>More tests of the 105VR</title>
      <description><![CDATA[<p>I decied to test the nano crystal coating to test colors and contrast shooting into the light.</p>

<p><a href="http://kevin.hypershots.com/imgsizes/0003zc9x/m?gal=0000xykx"><br />
<img src="http://kevin.hypershots.com/image/0003zc9x-sl.jpg" /><br />
</a></p>]]></description>
      <link>http://www.b9.com/blog/archives/000080.html</link>
    </item>

    <item>
      <title>Ant Eye</title>
      <description><![CDATA[<p>I took some test shots today with the 105mm f/2.8 VR micro lens. One thing I like about macro photography is that is show information that is unnoticible to naked eyes.</p>

<p><a href=""http://kevin.hypershots.com/image/0003w740/"><br />
<img src="http://kevin.hypershots.com/image/0003w740-sh.jpg" /><br />
</a></p>]]></description>
      <link>http://www.b9.com/blog/archives/000079.html</link>
    </item>

    <item>
      <title>Console Password Manager</title>
      <description><![CDATA[<p>I'd been looking for a fairly secure way to store an increasing number of passwords. There's a large number of methods one can use. While the most secure might be an encrypted file on a system that has no network access, I do want to have access to the information over a network while I'm traveling. Remote access makes using a graphical client a poor choice.</p>

<p>After a moderate search and trying a number of candidates, I settled on <a href="http://www.harry-b.de/dokuwiki/doku.php?id=harry:cpm">Console Password Manger</a> (CPM) written by Harry  Brueckner. It's close to an ideal match to my needs: it's console-based, had an emphasis on <a href="http://www.harry-b.de/dokuwiki/doku.php?id=harry:cpm#security_issues">security</a> and uses my existing GPG key for encryption. The program is maintained and I've had no issues while using the last three beta versions of the program. Thanks, Harry for the very good tool. Recommended.</p>]]></description>
      <link>http://www.b9.com/blog/archives/000077.html</link>
    </item>

    <item>
      <title>Diverging From Upstream</title>
      <description><![CDATA[<p>I have written and currently maintain <a href="http://puri.b9.com/">PURI</a>, a ported version of Franz's open-source <a href="http://opensource.franz.com/uri/">URI</a> (Uniform Resource Identifier) library. The Franz library uses a number of Allegro specific optimizations. I've tried to remain true to their optimizations by using similar optimizations on other Lisp implementations where possible.</p>

<p>However, the is one non-Allegro specific optimization that has caused a number of people some trouble: that the library expects input strings to be <em>simple strings</em> rather than generalized lisp strings. That has caused at least 3 people to mention the issue to me. I pondered the best solution for a bit. Likely, the optimum result would be to write a macro that emits generic functions specialized to both simple and generalized strings. However, I took a simpler route: I removed the simple-string specific optimiztions (such as using <tt>schar</tt> rather than <tt>char</tt>). I expect the reduction of trouble for library users outweighs the run-time overhead.</p>

<p>A few bug fixes including accomodating a change in the function of SBCL's <tt>shink-vector</tt>, and PURI <a href="http://puri.b9.com/download.html">1.4</a> is now available.</p>]]></description>
      <link>http://www.b9.com/blog/archives/000078.html</link>
    </item>

    <item>
      <title>Encrypted Root Filesystem Revisited</title>
      <description><![CDATA[<p>The hard disk on my notebook computer developed a number of bad
sectors so I replaced it with a new 7200rpm 100GB drive. I've <a
href="http://b9.com/archives/000071.html">discussed</a> my experience
and gave <a href="http://b9.com/archives/000072.html">details</a>
about using an encrypted root and LVM filesystem using the Linux 2.6 <a href="http://www.saout.de/misc/dm-crypt/">device
mapper</a>.</p>

<p>While I found the disk speed acceptable using the encrypted
filesystem, I did note that it was subjectively slower than using an
unencrypted filesystem. This time, I used the <a
href=""http://www.coker.com.au/bonnie++/">bonnie++</a> disk benchmark
to test the new disk.</p>

<p><b>Raw disk benchmark</b>
<pre>
       ------Sequential Output------ --Sequential Input- --Random-
        -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
  Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
    4G 30299  98 47348  13 20552   6 29947  91 44758   5 137.3   0
       ------Sequential Create------ --------Random Create--------
        -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
  files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
     16  3545  21 +++++ +++  3863  42  3350  20 +++++ +++   867   6
</pre>
</p>

<p><b>Encrypted disk benchmark</b>
<pre>
       ------Sequential Output------ --Sequential Input- --Random-
        -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
   Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
     4G 18861  60 40812   9 10534   2 18530  58 30641   4 143.6   0
       ------Sequential Create------ --------Random Create--------
        -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
  files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
     16  3150  87 +++++ +++  3510  92  2919  86 +++++ +++   900  35
</pre>
</p>

<p>While there is an overhead using the encrypted file system (which
is likely magnified by using a 4-year old CPU, a 2GHz Pentium 4-M), the
overall speed with the 7200rpm drive is acceptable and will be a boost
compared to the old 5400rpm drive.</p>

<p>While my notebook previously ran Debian Sarge, I thought I'd try
something slightly different, the Debian offshoot Ubuntu Breezy. I
found a few issues that had to be resolved to use the encrypted
filesystems.</p>

<ul>
<li><b>Patching /usr/sbin/mkinitrd</b><br>
<tt>mkinitrd</tt> had the wrong devmapper library version. I had to change line 385 from <tt>/lib/libdevmapper.so.1.00</tt> to <tt>/lib/libdevmapper.so.1.01</tt>.
</li>

<li><b>Add modules to /etc/mkinitrd/modules</b><br>
I added <tt>aes_i586</tt>, <tt>dm_crypt</tt>, and <tt>dm_mod</tt> to <tt>/etc/mkinitrd/modules</tt>.
</li>

<li><b>Modifying /etc/lvm/lvm.conf</b><br>I use an encrypted physicial LVM
partition to host my logical volumes. That way, I only have to
encrypt the LVM physical partition. Subsequently when booting and decrypting the filesystem, I only have to give once the key to the physical volume and all of the logical volumes 
created in that partition will be decrypted. This requires some editing
of <tt>lvm.conf</tt> to recognize the encrypted physical volume. I named the LVM physicial volume
<tt>pv</tt> and then added <tt>/dev/mapper/pv</tt> to the <tt>filter</tt>
specification in the <tt>devices</tt> section. Also, LVM has to be
notified of the device mapper type, so the line
<tt>types=["device-mapper",16]</tt> must be added to the
<tt>devices</tt> section.
</li>

<li><b>Change the startup script order</b><br> The script order in
<tt>/etc/rcS.d/</tt> needs to be changed so that <tt>cryptdisks</tt>
is executed before <tt>lvm</tt>. This is required so that the lvm
script will have access to the unencrypted physicial volume. This is simply done by renaming <tt>S28cryptdisks</tt>  to <tt>S25cryptdisks</tt> which places it before the lvm script <tt>S26lvm</tt>.
</li>
</ul>

<p>After those bits of additional configuration, the encrypted root
filesystem and encrypted LVM physical volume is working very
well. Additionally, I'm using an encrypted swap partition, but there
was no additional configuration required beyond what I <a
href="http://b9.com/archives/000072.html">previously</a>
described.</p>]]></description>
      <link>http://www.b9.com/blog/archives/000076.html</link>
    </item>

    <item>
      <title>Back to the Bosque</title>
      <description><![CDATA[<p><a href="http://kevin.hypershots.com/image/0002b0cx.jpg?gal=0000r5b7"><br />
<img src="http://kevin.hypershots.com/image/0002b0cx-sl.jpg?gal=0000r5b7" /></a><br />
I'm glad to have had a chance to go back to the Bosque del Apache this week, this time with a 500mm f/4 AFSII lens that Santa kindly delivered.</p>]]></description>
      <link>http://www.b9.com/blog/archives/000075.html</link>
    </item>

    <item>
      <title>Return of the backup MX host</title>
      <description><![CDATA[<p>Last year I wrote about the <a href="http://b9.com/archives/000061.html">death of the backup mx host</a> for my domains. In the arms race against spam, I've found a very helpful tool allowing the return of my backup MX hosts.</p>

<p>Recapping the history, one of my domains has been under a persistant SMTP <a href="">dictionary attack</a> for over a year. I get 3-10 emails a second with guessed destination email address. Sendmail on the primary MX host is rather efficient at rejecting these so the only real effect is my 200MB of email logs a day. However, spammers often target the backup MX host since they usually have less spam filtering. Last year, the attack took down my backup MX host. The backup host will kindly accept a message for any username in the appropriate domain. Then, it will try to deliver them to the primary MX host. If the primary MX host rejects the username as invalid, the backup MX host tries to send a reject message back to the sender. The breaks down when the sender is a spam zombie that is not running a SMTP server. The backup MX host queues the reject message while it attemps redelivery for a number of days. My backup MX host has 500,000 reject messages in its queue before the load average become too great.</p>

<p>A great piece of software fixes this problem. SnertSoft's no-cost <a href="http://www.milter.info/sendmail/milter-ahead/">milter-ahead</a> sendmail filter handles this sort of attack very well. The author is very responsive. I found only one issue with the software: it wouldn't compile or run on AMD64 platforms [typical issue of the C <em>long</em> type varying between 32 and 64-bit platforms]. In just a few hours, the author updated his code and milter-ahead is now running very well on my Debian AMD64 servers.</p>

<p>milter-ahead runs on a gateway or backup mail server and checks the RCPT during the SMTP connection with the a designated MX host. If that "look-ahead" host is down, milter-ahead will accept any email, which is the right thing to due. If the designated host is up, then milter-ahead can do one of several things. But, it's primary use is to query the designated host and verify that the receipient address is valid. If it is not, then the milter rejects the RCPT and avoids queueing the message. If the receipient is valid, then milter-ahead allows the backup MX host to accept the message for forwarding.</p>

<p>Now that my backup MX host won't be queueing email for invalid email addresses, I've brought that system back online. If you're running a gateway or backup mail server, you'll likely find milter-ahead a useful tool.</p>]]></description>
      <link>http://www.b9.com/blog/archives/000073.html</link>
    </item>

  </channel>
</rss>