install.sh etc.: tighter "perl" specification

David Lee t.d.lee at DURHAM.AC.UK
Mon Jul 5 15:48:03 IST 2004


On Fri, 2 Jul 2004, David Lee wrote:

> [...]
> I'm also working on some of the annoying little wrinkles that beset the
> installation of perl modules on Solaris (and other?) systems.  But more on
> that later.

Further to my earlier message (above).

I had hit a problem with Solaris 8.  This comes with version 5.00503 of
perl installed.  In building MakeMaker 6.05 and others, it failed because
of no file "opnames.h".  I then noticed that this had also afflicted this
Sun/Linux RaQ systems, and that the MS installation procedure addresses
this in "install.rpm-fns.sh".

This left me with two possible ways forward:
1. Try a more recent MakeMaker.
2. Rework MS's install procedure arounding existing MakeMaker.

I first tried using a more recent MakeMaker.  The Good News is that this,
indeed, fixes that problem.  The Bad News is that it introduces a new one.
The MM folk seem to know about this and have fixed in CVS, but have not
yet released it.  (I emailed their list last week about this, but have not
yet heard back from them.)

The more recent MM would also introduce further dependencies (including a
required re-ordering in MS's "install.sh" list).

So for the time being I have tried reworking MS's install procedure
(staying with the old MM 6.05) to generalise the existing RaQ-inspired
fudge.  Basically, this simply moves the relevant "touch" commands from
"install.rpm-fns.sh" into "install.sh", But I have also tried to make it
more portable, and also to tidy up after itself (i.e. to remove the
touched files, if those files had been installed by MS).

Patch attached.

Julian: Can you sanity check it, check it, check it again, and then apply
it, please?  Thanks.



--

:  David Lee                                I.T. Service          :
:  Systems Programmer                       Computer Centre       :
:                                           University of Durham  :
:  http://www.dur.ac.uk/t.d.lee/            South Road            :
:                                           Durham                :
:  Phone: +44 191 334 2752                  U.K.                  :

-------------------------- MailScanner list ----------------------
To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
Before posting, please see the Most Asked Questions at
http://www.mailscanner.biz/maq/     and the archives at
http://www.jiscmail.ac.uk/lists/mailscanner.html
-------------- next part --------------
--- install.sh.orig	Sun Jul  4 13:53:16 2004
+++ install.sh	Mon Jul  5 15:46:12 2004
@@ -159,6 +159,38 @@
 #
 . ./install.${DISTTYPE}-fns.sh
 
+###################
+# Problems with perl 5.00503, typically on RaQ3 and Solaris 8:
+# often lacks "opnames.h" and similar.
+# Temporarily patch up.  Remove later.
+
+perlfudgelist="opnames.h perlapi.h utf8.h warnings.h"
+perlcoredir=""
+for perldir in \
+	/usr/lib/perl5/5.00503/i386-linux /usr/perl5/5.00503/sun4-solaris
+do
+  if [ -d ${perldir}/CORE ]; then
+    echo
+    echo I think you are running Perl 5.00503.
+    echo Ensuring that you have all the header files in ${perldir}/CORE
+    echo that are needed to build HTML-Parser which is used by
+    echo both MailScanner and SpamAssassin.
+  
+    perlcoredir=${perldir}/CORE
+    for perlfudgefile in $perlfudgelist
+    do
+      if [ \! -f ${perlcoredir}/${perlfudgefile} ] ; then
+        echo installing perl fudge file ${perlcoredir}/${perlfudgefile}
+        touch ${perlcoredir}/${perlfudgefile}.MS
+        ln ${perlcoredir}/${perlfudgefile}.MS ${perlcoredir}/${perlfudgefile}
+      fi
+    done
+    sleep 2
+
+    break
+  fi
+done
+
 # JKF This needs to be a lot cleverer to correctly check
 # JKF /usr/perl5/bin and /usr/lib/perl5/*/bin and /usr/lib/perl5/bin as well.
 # JKF Also check /usr/local/bin.
@@ -237,6 +269,22 @@
 Archive::Zip	Archive-Zip	1.09	3	yes	noarch
 Convert::BinHex	Convert-BinHex	1.119	2	no	noarch
 EOF
+
+###################
+# Did we fudge perl 5.00503?  If so, tidy up.
+
+if [ "x${perlcoredir}" != "x" ] ; then
+  echo
+  for perlfudgefile in $perlfudgelist
+  do
+    echo removing perl fudge files for ${perlcoredir}/${perlfudgefile}
+    if [ -f ${perlcoredir}/${perlfudgefile}.MS ] ; then
+      rm ${perlcoredir}/${perlfudgefile}.MS ${perlcoredir}/${perlfudgefile}
+    fi
+  done
+  echo
+  sleep 2
+fi
 
 afterperlmodules
 
--- install.rpm-fns.sh.orig	Sun Jul  4 13:53:16 2004
+++ install.rpm-fns.sh	Mon Jul  5 15:09:23 2004
@@ -73,20 +73,6 @@
   sleep 10
 fi
 
-# Check that they aren't on a RaQ3 with a broken copy of Perl 5.005003.
-if [ -d /usr/lib/perl5/5.00503/i386-linux/CORE ]; then
-  echo
-  echo I think you are running Perl 5.00503.
-  echo Ensuring that you have all the header files that are needed
-  echo to build HTML-Parser which is used by both MailScanner and
-  echo SpamAssassin.
-
-  touch /usr/lib/perl5/5.00503/i386-linux/CORE/opnames.h
-  touch /usr/lib/perl5/5.00503/i386-linux/CORE/perlapi.h
-  touch /usr/lib/perl5/5.00503/i386-linux/CORE/utf8.h
-  touch /usr/lib/perl5/5.00503/i386-linux/CORE/warnings.h
-fi
-
 # Check they have the development tools installed on SuSE
 if [ -f /etc/SuSE-release -o -f /etc/redhat-release ]; then
   echo


More information about the MailScanner mailing list