OpenSSL: under resumption open ticket DB writable, for record delete
[exim.git] / test / patchexim
CommitLineData
e3ad39bd
HSHR
1#! /usr/bin/env perl
2
3use strict;
4use warnings;
151b83f8 5
151b83f8
PH
6###############################################################################
7# This is an auxiliary script that is part of the Exim test suite. It must be #
8# run as root, and is normally called from the main controlling script. Its #
9# job is to make a copy of Exim, suitably patched so that it can run in the #
10# test harness. See further comments in the main script. #
11# #
12# The only argument to this script is the name of the Exim binary that is to #
13# be copied. The script must be run in the correct current directory. #
14###############################################################################
15
e3ad39bd
HSHR
16open(IN, $ARGV[0]) || die "** Failed to open $ARGV[0]: $!\n";
17open(OUT, '>eximdir/exim') || die "** Failed to open eximdir/exim: $!\n";
151b83f8
PH
18
19while(<IN>)
20 {
21 s/>>>running<<</<<<testing>>>/;
505162ed
HSHR
22 s{
23 (\d+\.\d+ # major.minor
f8f40a64 24 (?:[_.]\d+)? # optional security-patchlevel
505162ed
HSHR
25 (?:[_.]\d+)? # optional patchlevel
26 (?:[_-]RC\d+|[_-]?dev(?:start)?)? # optional RC or dev(start)
27 (?:(?:[_-]\d+)? # git tag distance
28 [-_][[:xdigit:]]+)? # git id
29 (?:[-_]XX)?\0 # git dirty bit
30 <<eximversion>> # marker
31 )
32 }
33 {"x.yz\0" . ("*" x (length($1) - 5))}xe;
151b83f8
PH
34 print OUT;
35 }
36
37close(IN);
38close(OUT);
39
e3ad39bd 40chmod 04755, 'eximdir/exim';
151b83f8
PH
41
42# End of patchexim script