<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Joe McMahon</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/joe_mcmahon/" />
    <link rel="self" type="application/atom+xml" href="http://blogs.perl.org/users/joe_mcmahon/atom.xml" />
    <id>tag:blogs.perl.org,2009-11-03:/users/joe_mcmahon//225</id>
    <updated>2010-02-10T21:06:46Z</updated>
    <subtitle>A blog about the Perl programming language</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Pro 4.38</generator>

<entry>
    <title>Today&apos;s task - RPMs!</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/joe_mcmahon/2010/02/today.html" />
    <id>tag:blogs.perl.org,2010:/users/joe_mcmahon//225.269</id>

    <published>2010-02-10T20:47:04Z</published>
    <updated>2010-02-10T21:06:46Z</updated>

    <summary>Haven&apos;t messed with RPMs for a long while (at Yahoo! we had folks whose job it was to provide the prebuilt system tools in the Y! format - among them, Mike Schilli of Log4perl fame who was our Perl packager),...</summary>
    <author>
        <name>Joe McMahon</name>
        <uri>http://pemungkah.com</uri>
    </author>
    
    <category term="510" label="5.10" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="build" label="build" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="centos" label="CentOS" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="ioxs" label="IO.xs" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="rpm" label="RPM" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="structpollfd" label="struct pollfd" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/joe_mcmahon/">
        <![CDATA[<p>Haven't messed with RPMs for a long while (at Yahoo! we had folks whose job it was to provide the prebuilt system tools in the Y! format - among them, Mike Schilli of Log4perl fame who was our Perl packager), but today I'm building Perl 5.10.1 RPMS for our CentOS 5 systems.</p>

<p>I was able to take a 5.10.0 and adapt it pretty easily, with a few tweaks. First, because of the way CentOS lays out its include files, you need to patch IO.xs:<br />
<p><br />
<pre><br />
--- perl-5.10.1/ext/IO/IO.xs.0  2010-02-08 17:27:16.000000000 -0800<br />
+++ perl-5.10.1/ext/IO/IO.xs    2010-02-08 17:28:11.000000000 -0800<br />
@@ -12,6 +12,7 @@<br />
 #include "perl.h"<br />
 #include "XSUB.h"<br />
 #include "poll.h"<br />
+#include &lt;sys/poll.h&gt;<br />
 #ifdef I_UNISTD<br />
 #  include &lt;unistd.h&gt;<br />
#endif<br />
</pre><br />
<br><br />
Otherwise the build fails with multiple complaints about 'incomplete struct pollfd'. It's also necessary to make sure that <tt>libperl.so</tt> is available in <tt>/usr/lib64</tt>, otherwise things like <tt>vim</tt> die because they can't find it for their embedded Perl. (I'm not sure I've done this exactly "right", as in "adhering to good packaging standards" - but the current version of the RPM works, so I'm not going to waste more time on it.) Now all I have to do is go through the list of 170 packages that we use that need to be rebuilt to match Perl 5.10, but that's not as big a deal - at least <tt>vim</tt> is working again. (Emacs'ers: yeah, yeah, it didn't break.)</p>]]>
        
    </content>
</entry>

<entry>
    <title>Hudson and Perl - the flyover version</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/joe_mcmahon/2010/02/hudson-and-perl---the-flyover-version.html" />
    <id>tag:blogs.perl.org,2010:/users/joe_mcmahon//225.228</id>

    <published>2010-02-01T20:07:00Z</published>
    <updated>2010-02-01T20:40:59Z</updated>

    <summary>This subject really requires a whole series of posts, but for the moment I&apos;d just like to lay out the basics of what&apos;s needed to integrate your Perl development process and Hudson. First and foremost, you must be using some...</summary>
    <author>
        <name>Joe McMahon</name>
        <uri>http://pemungkah.com</uri>
    </author>
    
    <category term="build" label="build" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="continuousintegration" label="continuous integration" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="hudson" label="Hudson" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="junit" label="JUnit" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/joe_mcmahon/">
        <![CDATA[<p>This subject really requires a whole series of posts, but for the moment I'd just like to lay out the basics of what's needed to integrate your Perl development process and Hudson.</p>

<p>First and foremost, you must be using some source control system. Doesn't matter if it's CVS, Subversion, Git, Mercurial, or Bazaar (Hudson supports all these), but you need to have this set up so that Hudson can both consistently check out your software and so that it can notice when to do another build.</p>

<p>Second, you need a test suite. It doesn't have to be perfect, or have 100% test coverage, but you need <em>something</em> that Hudson can run to verify your builds.</p>

<p>Since Hudson sees the world through Java-colored glasses, you'll also need to set some things up to impedance match its idea of how things get done with Perl's. Fortunately, Hudson has the concept of a "free-style" project. A free-style project can use arbitrary shell commands as parts of it build steps, which means that your 'make' and 'make test' can still be used.</p>

<p>Your 'make test', however, will need to be filtered through something that will transform TAP into JUnit XML. Graham TerMarsch's <a href="http://search.cpan.org/dist/TAP-Formatter-JUnit/">TAP::Formatter::JUnit </a>can do this for you - use the newest version, as it has a lot of fixes and extensions to project Hudson's XML parser from the vagaries of TAP output. (TAP doesn't worry much about character sets, or entities, or any of that other stuff, while Hudson's XML parser falls over at the merest hint of something that isn't straight ASCII or one of the very few entities it understands natively.)</p>

<p>There are options for Hudson to simply point at a file in a subdirectory in the build and display it as part of the build status page. This can be used to show Devel::Cover coverage reports. Both perlcritic and jslint can be persuaded (with a little output filtering) to display data in a format that can be transformed into JUnit as well.</p>

<p>I'm hoping that the talk I submitted to OSCON on this will be accepted, which will give me an excuse to write all this up in detail - but this is the general outline. Keep your source in source control, use makefiles to build and test, and use JUnit to integrate your testing results. There's a lot more to talk about, like strategies for speeding up the build by making things as parallel as possible, but I'll save that for the talk or a later blog entry.</p>]]>
        
    </content>
</entry>

<entry>
    <title>Automating builds</title>
    <link rel="alternate" type="text/html" href="http://blogs.perl.org/users/joe_mcmahon/2010/01/automating-builds.html" />
    <id>tag:blogs.perl.org,2010:/users/joe_mcmahon//225.210</id>

    <published>2010-01-25T21:57:54Z</published>
    <updated>2010-01-25T22:04:51Z</updated>

    <summary>I&apos;m currently working at Blekko, Inc.; we&apos;re still in stealth mode, so I can&apos;t really say anything about what we&apos;re doing, except that it&apos;s really cool, and it&apos;s all in Perl. Working for a startup is wildly different from anything...</summary>
    <author>
        <name>Joe McMahon</name>
        <uri>http://pemungkah.com</uri>
    </author>
    
    <category term="build" label="build" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="hudson" label="Hudson" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="en" xml:base="http://blogs.perl.org/users/joe_mcmahon/">
        <![CDATA[<p>I'm currently working at <a href="http://blekko.com">Blekko</a>, Inc.; we're still in stealth mode, so I can't really say anything about what we're doing, except that it's really cool, and it's all in Perl.</p>

<p>Working for a startup is wildly different from anything that I've done before; there's an incredible amount of freedom, coupled with an equal amount of responsibility. I love working here.</p>

<p>I'm currently doing a lot of work on our build process, streamlining it and automating it. I'm running things under Hudson with a lot of support stuff to get Perl integrated into Hudson's very Java-y workflow. I'm holding back on details for the moment until I've submitted my proposal to OSCON, but once I've done that I'll talk more about what I've been doing.</p>]]>
        
    </content>
</entry>

</feed>
