Centos 5.x under Parallels Desktop 7 for Mac

 Posted by at 8:53 pm  Parellels Desktop of Mac  Comments Off on Centos 5.x under Parallels Desktop 7 for Mac
Feb 202012
 

Here are my latest Xmodap settings that I use with my iMac and Wireless Apple (UK) Wireless keyboard for running Centos 5.x under Parallels Desktop 7 (on OS X Lion):

keycode 11 = 2 at twosuperior oneeighth twosuperior oneeighth
keycode 94 = 0x60 0x7e
keycode 48 = apostrophe quotedbl dead_circumflex dead_caron dead_circumflex dead_caron
keycode 49 = numbersign plusminus

You can place these in your home directory, e.g. $HOME/.xmodmap, or you could place them in something like /etc/X11/Xmodmap and add the following line to /etc/X11/xinitrc/Xsession

[ -f /etc/X11/Xmodmap ] && xmodmap /etc/X11/Xmodmap

The key mappings have been tested on Centos 5.7 and 6.1, although making it global, as in the line above, on seems to work on Centos 5.7.

Recent CentOS 5.7 perl update broke sa-update

 Posted by at 12:27 am  Fix, Programming  Comments Off on Recent CentOS 5.7 perl update broke sa-update
Feb 092012
 

I recently noticed that a Perl update on my CentOS 5.7 servers broke the sa-update script for Spamassassin 3.3.1 2.el5.  The error trace given was:

"name2labels" is not exported by the Net::DNS module
Can't continue after import errors at /usr/lib/perl5/vendor_perl/5.8.8/Net/DNS/RR/NSEC3.pm line 24
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/Net/DNS/RR/NSEC3.pm line 24.
Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/Net/DNS/RR.pm line 172.
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/Net/DNS/RR.pm line 185.
Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/Net/DNS/Packet.pm line 16.
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/Net/DNS/Packet.pm line 16.
Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/Net/DNS/Resolver/Base.pm line 26.
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/Net/DNS/Resolver/Base.pm line 26.
Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/Net/DNS/Resolver/UNIX.pm line 9.
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/Net/DNS/Resolver/UNIX.pm line 9.
Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/Net/DNS/Resolver.pm line 19.
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/Net/DNS/Resolver.pm line 22.
Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/Net/DNS.pm line 67.
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi/Net/DNS.pm line 67.
Compilation failed in require at /usr/bin/sa-update line 80.
BEGIN failed--compilation aborted at /usr/bin/sa-update line 80.

Searching Google seems to suggest that this is caused by a security update by RedHat to the perl-Net-DNS that ships as part of RedHat EL 5.7, which CentOS 5.7 is derived from.  I did try updating the Perl Net::DNS module via cpan but this did not fix the issue.

Though I’m not a big Perl programmer I decided to have a look at the sa-update script to see if I could fix it myself.  So what I decided to do was replace line 24 in NSEC3.pm.

Old line:

use Net::DNS qw( name2labels );

New line:

use Net::DNS;

So now sa-update -v displays:

Update available for channel updates.spamassassin.org
Update was available, and was downloaded and installed successfully

I know this is probably not the best fix to apply for the given problem, but it does fix my problem for now.  Hopefully others will find this useful.