Skip to main content

Posts

Showing posts with the label dh-make-perl

Test reports on Hudson in 30 seconds (well, let's say quickly)

There are so many articles on how to generate test reports on Hudson for perl modules or applications, that I thought it was somehow complicated. It's not. The underlying problem is that Hudson has support for test results in JUnit format. To solve this you need to convert from TAP to JUnit the test results. Of course there are some pre-requirement: Your perl code must have tests (duh) You must have Hudson set up to run those tests You need to install TAP::Harness::JUnit on the building box You need to install ' prove ' on the building box Then all you have to do is add this command in the shell script you execute to run the tests: prove --harness=TAP::Harness::JUnit and configure the "Publish JUnit Test Result Reports" section of your project to point to the resulting XML file. No mumbo jumbo . Since TAP::Harness::JUnit is not available as a debian package, if you need to install it properly, just follow the usual procedure to generate debian packages from CPA...

Building a debian package for a CPAN module, and a known issue

The good news is that building a debian package from the source of a CPAN module is easy, thanks to the dh-make-perl tool. The bad news is that the configuration of dh-make-perl can lead to the generation of a debian package containing unneeded files, and as a collateral effect preventing package installation as the files belong to more than one package. For example you can end up with something like: dpkg: error processing /var/cache/apt/archives/scnlibpoe-filter-stomp-perl_0.01_all.deb (--unpack): trying to overwrite `/usr/lib/perl/5.8/perllocal.pod', which is also in package scnlibpoe-component-client-stomp-perl Somebody suggests a change in the configuration file used by dh-make-perl . The same result can be achieved by applying this change to your debian/rules file: --- debian/rules (revision 32211) +++ debian/rules (working copy) @@ -51,8 +51,11 @@ - rmdir --ignore-fail-on-non-empty --parents $(TMP)/usr/lib/perl5 + rm -rfv $(TMP)/usr/lib

Debianize a Perl module

What a good day. Not only I've got a new laptop from the company, but I've found also an extremely useful tool to build a debian package from a perl module: dh-make-perl . You just need to do 2 things: - Run dh-make-perl on the untarred module directory (this creates the necessary debian dir and files). - Inside the module directory, run debuild . Very nice. Now I wonder why most of the CPAN and POE components don't come with a debian package...