Today's task - RPMs!

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.

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:



--- perl-5.10.1/ext/IO/IO.xs.0 2010-02-08 17:27:16.000000000 -0800
+++ perl-5.10.1/ext/IO/IO.xs 2010-02-08 17:28:11.000000000 -0800
@@ -12,6 +12,7 @@
#include "perl.h"
#include "XSUB.h"
#include "poll.h"
+#include <sys/poll.h>
#ifdef I_UNISTD
# include <unistd.h>
#endif



Otherwise the build fails with multiple complaints about 'incomplete struct pollfd'. It's also necessary to make sure that libperl.so is available in /usr/lib64, otherwise things like vim 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 vim is working again. (Emacs'ers: yeah, yeah, it didn't break.)

Leave a comment

About Joe McMahon

user-pic Perl testing, automated builds, and side trips into whatever else is interesting.