postfix/postfix.patch.pfls

Tue, 29 Mar 2011 20:04:34 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 29 Mar 2011 20:04:34 +0200
changeset 334
4a34d7a82eab
child 495
01294b31a79e
permissions
-rw-r--r--

Rework package yet again, correcting and introducing new buildconf logic:
Conditionally disable bootstrap stage comparison correctly, correct
english grammar, better find system as(1) and ld(1), indotruce detailed
optimization option messages, more completely guess cpu types, allow
profiled bootstrapping without a preinstalled GCC because many other
compilers have long since implemented 64-bit arithmetic, instruct make
to build sequentially (not in sparallel) when building a profiled
bootstrap as GCC online documents recommend, and generally improve
comment blocks.

The single most important correction in this changeset relates to the
GCC changed optimization policy since at least GCC 4.5, in which -march
is always passed and not always correctly guessed. In the case of this
package, allowing GCC to guess the architecture leads to wild build
errors at various subcomponents (zlib, libgcc, libiberty...) and
bootstrap stages. It seems quite platform specific, and the safest
approach to correcting this seems to be explicitly always specifying the
-march argument when bootstrapping GCC. Because the best choice 'native'
is not available when bootstrapping using a foreign (non GCC) compiler,
a guess is made according to rpmmacros l_platform in that case.

It is questionable as to whether these recent optimization changes
on the part of GCC or this package are compatible with each other,
or if either are complete or correct at all. At least applying these
corrections allows this package to build again in most cases test.

michael@146 1 This patch makes Pflogsumm working with the particular format
michael@146 2 of the OSSP fsl based Postfix logfile and additionally allows
michael@146 3 one to specify a more flexible data format.
michael@146 4
michael@146 5 Index: pflogsumm.1
michael@146 6 --- pflogsumm.1.orig 2007-04-06 16:11:28 +0200
michael@146 7 +++ pflogsumm.1 2007-04-06 17:35:12 +0200
michael@146 8 @@ -172,6 +172,8 @@
michael@146 9 .Vb 2
michael@146 10 \& -d today generate report for just today
michael@146 11 \& -d yesterday generate report for just "yesterday"
michael@146 12 +\& -d YYYY-MM-DD generate report for just "YYYY-MM-DD"
michael@146 13 +\& (Really takes string Date::Parse will handle)
michael@146 14 .Ve
michael@146 15 .PP
michael@146 16 .Vb 1
michael@146 17 Index: pflogsumm.pl
michael@146 18 --- pflogsumm.pl.orig 2008-06-29 15:46:01 +0200
michael@146 19 +++ pflogsumm.pl 2008-06-29 19:39:07 +0200
michael@146 20 @@ -10,7 +10,7 @@
michael@146 21
michael@146 22 =head1 SYNOPSIS
michael@146 23
michael@146 24 - pflogsumm.pl -[eq] [-d <today|yesterday>] [-h <cnt>] [-u <cnt>]
michael@146 25 + pflogsumm.pl -[eq] [-d <today|yesterday|YYYY-MM-DD>] [-h <cnt>] [-u <cnt>]
michael@146 26 [--verp_mung[=<n>]] [--verbose_msg_detail] [--iso_date_time]
michael@146 27 [-m|--uucp_mung] [-i|--ignore_case] [--smtpd_stats] [--mailq]
michael@146 28 [--problems_first] [--rej_add_from] [--no_bounce_detail]
michael@146 29 @@ -37,6 +37,9 @@
michael@146 30
michael@146 31 -d today generate report for just today
michael@146 32 -d yesterday generate report for just "yesterday"
michael@146 33 + -d YYYY-MM-DD generate report for just "YYYY-MM-DD"
michael@146 34 + (Actually this will take any date string
michael@146 35 + parsable by the perl Date::Parse module)
michael@146 36
michael@146 37 -e extended (extreme? excessive?) detail
michael@146 38
michael@146 39 @@ -359,6 +362,7 @@
michael@146 40 use strict;
michael@146 41 use locale;
michael@146 42 use Getopt::Long;
michael@146 43 +use Date::Parse;
michael@146 44 eval { require Date::Calc };
michael@146 45 my $hasDateCalc = $@ ? 0 : 1;
michael@146 46
michael@146 47 @@ -542,8 +546,8 @@
michael@146 48 my $logRmdr;
michael@146 49 next unless((($msgMonStr, $msgDay, $msgHr, $msgMin, $msgSec, $logRmdr) =
michael@146 50 /^(...) +(\d+) (..):(..):(..) \S+ (.+)$/o) == 6);
michael@146 51 - unless((($cmd, $qid) = $logRmdr =~ m#^(?:postfix|$syslogName)/([^\[:]*).*?: ([^:\s]+)#o) == 2 ||
michael@146 52 - (($cmd, $qid) = $logRmdr =~ m#^((?:postfix)(?:-script)?)(?:\[\d+\])?: ([^:\s]+)#o) == 2)
michael@146 53 + unless((($cmd, $qid) = $logRmdr =~ m#^<[a-z]+>\s+(?:postfix|$syslogName)/([^\[:]*).*?: ([^:\s]+)#o) == 2 ||
michael@146 54 + (($cmd, $qid) = $logRmdr =~ m#^<[a-z]+>\s+((?:postfix)(?:-script)?)(?:\[\d+\])?: ([^:\s]+)#o) == 2)
michael@146 55 {
michael@146 56 #print UNPROCD "$_";
michael@146 57 next;
michael@146 58 @@ -1406,11 +1410,11 @@
michael@146 59 # Back up to yesterday
michael@146 60 $time -= ((localtime($time))[2] + 2) * 3600;
michael@146 61 } elsif($dateOpt ne "today") {
michael@146 62 - die "$usageMsg\n";
michael@146 63 + $time = str2time($dateOpt);
michael@146 64 }
michael@146 65 my ($t_mday, $t_mon) = (localtime($time))[3,4];
michael@146 66
michael@146 67 - return sprintf("%s %2d", $monthNames[$t_mon], $t_mday);
michael@146 68 + return sprintf("%s %02d", $monthNames[$t_mon], $t_mday);
michael@146 69 }
michael@146 70
michael@146 71 # if there's a real domain: uses that. Otherwise uses the IP addr.

mercurial