MailScanner at ecs.soton.ac.uk
Wed Apr 22 11:24:17 IST 2009
On 22/4/09 10:56, David Lee wrote:
> On Mon, 13 Apr 2009, Julian Field wrote:
>> Right, I have just finished a good weekend's work on the installer,
>> and all the Perl modules it installs.
>> Most of the Perl modules have been upgraded for starters.
>> The installer no longer "forces" the install of any Perl module. So
>> you can upgrade Perl independently at any time without it clashing
>> with any of MailScanner's Perl modules. Hopefully this will make
>> quite a few of you happier :-)
>> All modules install cleanly on RedHat Enterprise 4 and 5, CentOS 4
>> and 5, and Fedora Core 9 and 10. Those are what I have tested it on
>> and ironed out all the problems on.
>> There are several command-line options to the installer that you
>> should know about. "./install.sh --help" will print these.
> Julian: This is a great improvement. Many, many thanks.
Glad to hear you like it. You were quite right that it needed some work,
I hadn't done anything to it in too long. It was just a rather big job
and I needed a long uninterrupted stretch of time to work on it. Which I
finally found by taking 6 days off work and going and seeing my folks in
I wasn't supposed to be working, but MailScanner doesn't really count,
does it? ;-)
> I've just been trying it on a CentOS 5.3 (actually 5.2 upgraded to
> 5.3) with MS 4.76.14 (yesterday) and 4.76.15 (today).
> It seems to be working almost flawlessly. That is, on a repeated MS
> "./install.sh fast" almost all modules give:
> Oh good, module File-Spec version 0.82 is already installed.
> Almost. But TimeDate is being recalcitrant. It is consistently
> Attempting to build and install perl-TimeDate-1.16-4
> Installing perl-TimeDate-1.16-4.src.rpm
> [... lots of build info ...]
> package perl-TimeDate-1.16-5.el5.noarch (which is newer
> than perl-TimeDate-1.16-4.noarch) is already installed
> The OS already has "perl-TimeDate-1.16-5.el5" (note the "-5"), but MS
> seems to want to try to install its own (and earlier) "-4".
The snag is that the TimeDate is a "bundle" and not a single module. So
there aren't any version numbers you can check, so it has to retry it.
And the RPM version check won't work because it is someone else's
version numbering system. If you can find a way of automatically
determining that "1.16-5.el5.noarch" is higher than "1.16-4.noarch" then
I would be all ears, unfortunately I can't find one. The version
checking code in RPM is too complex to reproduce in a simple fashion in
a shell script. You can't do a simple alphabetical check as "10" must be
greater than "9" which it isn't if you sort alphabetically.
So unfortunately, TimeDate is the one case I was unable to resolve
perfectly. I effectively need to be able to ask RPM "if I were to build
1.16-5, would you install it?" and there doesn't appear to be any way of
asking it that. I have to build it and try it. Simply upping the "-4" to
"-6" is cheating, and doesn't solve the general problem which will
surely rear its head again in the future.
> If I remove that OS-derived module, and re-run MS "install.sh" twice,
> it behaves nicely: the first run installs it (perl-TimeDate-1.16-4),
> and the second run finds it and skips it (with "Oh good, ...").
If you re-ran it once with "reinstall" on the command-line, or else just
ran it once from a pre-4.76 version of MailScanner, it will remove the
perl-TimeDate module that is installed and install its own. It does do a
version number check to see whether you have a pre-Easter system
installed or not, and it uninstalls all the Perl modules if it's a
pre-Easter system, before installing them again.
So normal users of MailScanner with earlier versions installed won't see
this, only people installing for the first time. I guess I could just
remove the perl-TimeDate rpm if there isn't a version of MailScanner
already installed? That would be a quick hack that would solve the
problem. What do you think of me doing that?
> The "quick fix for now" might simply be to upgrade ths MS version to
> TimeDate to "-5". But I suspect there is a deeper structural issue at
> play, in that your re-working of the installer seems to have missed a
> detail somewhere that is affecting the TimeDate module.
> Just to re-iterate: this re-working is a massive improvement! All I'm
> reporting here is a small, suboptimal detail.
Understood, and thanks.
> Is there something here I can assist debugging?
If you can get RPM to answer the question, it would sure help. Otherwise
I can't find a solution. The general version number is made up of
<version>-<version>[-<version> ...] where <version> consists of
number.number[.number...]. I don't want to have to write the general
parser and comparator for that little problem :-(
Julian Field MEng CITP CEng
Buy the MailScanner book at www.MailScanner.info/store
MailScanner customisation, or any advanced system administration help?
Contact me at Jules at Jules.FM
PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
PGP public key: http://www.jules.fm/julesfm.asc
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
More information about the MailScanner