Testsuite: keep noqualify testcase from using external DNS
[exim.git] / release-process / scripts / mk_exim_release
1 #!/usr/bin/env perl
2 # Copyright (c) The Exim Maintainers 2016-2018
3
4 use strict;
5 use warnings;
6 use Carp;
7 use Cwd qw'abs_path';
8 use File::Basename;
9 use File::Path qw(make_path remove_tree);
10 use File::Temp;
11 use Getopt::Long;
12 use IO::File;
13 use Pod::Usage;
14 use Digest::SHA;
15 use if $ENV{DEBUG} => 'Smart::Comments';
16
17 my $ME = basename $0;
18
19
20 my $debug = undef;
21 my $verbose = 0;
22
23 # MAJOR.MINOR[.SECURITY[.FIXES]][-RCX]
24 # 4 .90 .0 .22 -RC1
25 my $version_pattern = qr/
26 (?<release>
27 (?<target_release>
28 (?<major>\d) # 4
29 \.(?<minor>\d\d) # .90
30 (?:\.(?<security>\d+) # .0
31 (?:\.(?<fixes>)\d+)?)? # .22
32 ) # target-release ->|
33 (?:-(?<rc>RC\d+)?)? # -RC1
34 )
35 /x;
36
37 my $quick_version_pattern = qr/
38 (?<release>
39 (?<last_tag>
40 (?<major>\d) # 4
41 \.(?<minor>\d\d) # .90
42 (?:\.(?<security>\d+) # .0
43 (?:\.(?<fixes>)\d+)?)? # .22
44 ) # last-tag ->|
45 (?:-(?<quick>\d+-g[[:xdigit:]]+))? # -3-gdeadbef
46 )
47 /x;
48
49 # ------------------------------------------------------------------
50
51 package Context {
52 use strict; # not strictly necessary yet, until in an own package
53 use warnings; # not strictly necessary yet, ...
54 use File::Spec::Functions qw'splitpath catfile catdir splitdir';
55 use File::Path qw'make_path remove_tree';
56 use File::Copy;
57 use Cwd qw'abs_path';
58 use Carp;
59
60 package PWD {
61 use Cwd;
62 sub TIESCALAR { bless do {\my $x} }
63 sub FETCH { cwd }
64 }
65
66 tie my $cwd => 'PWD' or die; # this returns the current dir now, dynamically
67
68 sub new {
69 my $class = shift;
70 return bless { @_ } => $class;
71 }
72
73 sub check_version {
74 my $context = shift;
75 my $version = shift // 'HEAD';
76
77 #
78 # v => {
79 # release => 4.92-RC4 | 4.92-27-gabcdef
80 # target_release|last_tag => 4.92 | 4.92
81 #
82 # major => 4
83 # minor => 92
84 # security =>
85 # fixes =>
86 #
87 # rc|quick => RC4 | 27-gabcdef
88 # }
89
90 #
91 # v => {
92 # release => 4.92-RC4 | 4.92-27-gabcdef-dirty
93 # target_release|last_tag => 4.92 | 4.92
94 #
95 # major => 4
96 # minor => 92
97 # security =>
98 # fixes =>
99 #
100 # rc|quick => RC4 | 27-gabcdef-dirty
101 # }
102
103 if ($context->{quick}) {
104 # Try to find suitable version description
105 chomp(my $describe = do { # we wrap it into a open() to avoid hassle with
106 open(my $fh, '-|', # strange version descriptions
107 'git', describe => $version) or die;
108 <$fh>
109 } // exit 1);
110 $describe =~ /$quick_version_pattern/;
111
112 %{$context->{v}} = %+;
113 ($context->{commit}) = $version // ($context->{v}{quick} =~ /g([[:xdigit:]]+)/);
114 }
115 else {
116 croak "The given version number does not look right - $version"
117 if not $version =~ /$version_pattern/;
118 %{$context->{v}} = %+;
119
120 # find a valid vcs tag matching the version
121 my $pattern = "$context->{pkgname}-$context->{v}{release}" =~ s/[-_.]/[-_.]/gr;
122 chomp(my @tags = qx{git tag --list '$pattern'});
123
124 croak "The given version is ambigous, tags: @tags\n" if @tags > 1;
125 croak "The given version does not exist (no such tag: exim-$version)\n" if @tags == 0;
126
127 $context->{commit} = $tags[0];
128 # target_release: the release we aim to reach with release candidates
129 # FIXME: re-construct from the parsed version number
130 }
131
132 die "$ME: This script doesn't work for versions prior 4.92-RCx. "
133 ."Please checkout an older version.\n"
134 if $context->{v}{major} < 4
135 or $context->{v}{major} == 4 && $context->{v}{minor} < 92;
136
137 ### v: $context->{v}
138
139 }
140
141
142 # We prefer gtar to tar if gtar exists in $PATH
143 sub override_tar_cmd {
144 my $context = shift;
145 my $tar = $context->{tar_cmd};
146
147 return unless $tar eq 'tar';
148
149 foreach my $d (File::Spec->path()) {
150 my $p = catfile($d, 'gtar');
151 if (-x $p) {
152 $context->{tar_cmd} = $p;
153 print "Switched tar command to: $p\n" if $verbose;
154 return;
155 }
156 }
157 }
158
159 sub prepare_working_directory {
160 my $context = shift;
161 my $workspace = $context->{workspace};
162
163 if (not defined $workspace) {
164 $workspace = $context->{workspace} = File::Temp->newdir(File::Spec->tmpdir . '/exim-packaging-XXXX');
165 }
166 else {
167 # ensure the working directory is not in place
168 if (-e $workspace) {
169 if ($context->{delete}) {
170 print "Deleting existing $workspace\n" if $verbose;
171 remove_tree $workspace, { verbose => $verbose || $debug };
172 }
173 else {
174 croak "Working directory $workspace exists" if -e $workspace;
175 }
176 }
177
178 # create base directory
179 make_path( $context->{directory}, { verbose => $verbose || $debug } );
180 }
181
182 # Set(!) and create subdirectories
183 foreach (qw(vcs_export pkg_tars pkg_trees tmp)) { # {dookbook}
184 make_path(
185 $context->{d}{$_} = catdir($workspace, $_),
186 { verbose => $verbose || $debug });
187 }
188 }
189
190 sub export_git_tree {
191 my $context = shift;
192
193 # build git command
194 my $archive_file = $context->{tmp_archive_file} = sprintf'%s/%s-%s.tar', $context->{d}{tmp}, $context->{pkgname}, $context->{v}{release};
195 ### $archive_file
196 my @cmd = ( 'git', 'archive', '--format=tar', "--output=$archive_file", $context->{commit} );
197 ### @cmd
198 # run git command
199 print "[$cwd] Running: @cmd\n" if $verbose;
200 0 == system @cmd or croak "Export failed";
201 }
202
203 sub unpack_tree {
204 # TODO: Why can't we combine the export_git_tree with the
205 # unpack_tree function?
206 my $context = shift;
207
208 ### $context
209 die "Cannot see archive file\n" unless -f $context->{tmp_archive_file};
210 my @cmd = ('tar',
211 xf => $context->{tmp_archive_file},
212 -C => $context->{d}{vcs_export} );
213
214 # run command
215 print "[$cwd] Running: @cmd\n" if $verbose;
216 system @cmd and croak "Unpack failed\n";
217
218 }
219
220 sub make_version_script {
221 my $context = shift;
222
223 #my $variant = substr( $context->{v}{release}, length($context->{v}{target_release}) );
224 #if ( $context->{v}{release} ne $context->{v}{target_release} . $variant ) {
225 # die "Broken version numbering, I'm buggy";
226 #}
227
228
229 # Work
230 if (not my $pid = fork // die "$ME: Cannot fork: $!\n") {
231
232 my $source_tree = catdir($context->{d}{vcs_export}, 'src', 'src');
233 ### $source_tree
234
235 chdir $source_tree or die "chdir $source_tree: $!\n";
236
237 croak "WARNING: version.sh already exists - leaving it in place\n"
238 if -f 'version.sh';
239
240 # Currently (25. Feb. 2016) the mk_exim_release.pl up to now can't
241 # deal with security releases.!? So we need a current
242 # mk_exim_release.pl. But if we use a current (master), the
243 # reversion script returns wrong version info (it's running inside
244 # the Git tree and uses git --describe, which always returns the
245 # current version of master.) I do not want to change the old
246 # reversion scripts (in 4.86.1, 4.85.1).
247 #
248 # Thus we've to provide the version.sh, based on the info we have
249 # about the release. If reversion finds this, it doesn't try to find
250 # it's own way to get a valid version number from the git.
251 #
252 # 4.89 series: the logic here did not handle _RC<N> thus breaking RC
253 # status in versions. nb: rc in context should be same as $variant
254 # in local context.
255
256 #my $stamp = $context->{minor} ? '_'.$context->{minor} : '';
257 #$stamp .= $context->{rc} if $context->{rc};
258 my $release = $context->{v}{rc} ? $context->{v}{target_release}
259 : $context->{v}{last_tag};
260
261 my $variant =
262 $context->{v}{rc} ? $context->{v}{rc}
263 : $context->{v}{quick} ? $context->{v}{quick}
264 : '';
265
266 print "[$cwd] create version.sh\n" if $verbose;
267 open(my $v, '>', 'version.sh') or die "Can't open version.sh for writing: $!\n";
268 print {$v} <<__;
269 # initial version automatically generated by $0
270 EXIM_RELEASE_VERSION=$release
271 EXIM_VARIANT_VERSION=$variant
272 EXIM_COMPILE_NUMBER=0
273 # echo "[[[ \$EXIM_RELEASE_VERSION | \$EXIM_VARIANT_VERSION | \$EXIM_COMPILE_NUMBER ]]]"
274 __
275 close $v or die "$0: Can not close $source_tree/version.h: $!\n";
276 unlink 'version.h' or die "$ME: Can not unlink $source_tree/version.h: $!\n"
277 if -f 'version.h';
278
279 # Later, if we get the reversion script fixed, we can call it again.
280 # For now (25. Feb. 2016) we'll leave it unused.
281 #my @cmd = ('../scripts/reversion', 'release', $context->{commit});
282
283 my @cmd = ('../scripts/reversion', 'release');
284 print "[$cwd] Running: @cmd\n" if $verbose;
285 system(@cmd) and croak "reversion failed";
286
287 die "$ME: failed to create version.sh"
288 unless -f 'version.sh';
289
290 exit 0;
291 }
292 else {
293 $pid == waitpid($pid, 0) or die "$0: waidpid: $!\n";
294 exit $? >> 8 if $?;
295 }
296 }
297
298 sub build_documentation {
299 my $context = shift;
300 my $docdir = catdir $context->{d}{vcs_export}, 'doc', 'doc-docbook';
301
302 # documentation building does a chdir, so we'll do it in a
303 # subprocess
304 if (not my $pid = fork // die "$ME: Can't fork: $!\n") {
305 chdir $docdir or die "$ME: Can't chdir to $docdir: $!\n";
306 system('./OS-Fixups') == 0 or exit $?;
307 exec $context->{make_cmd},
308 "EXIM_VER=$context->{v}{release}", 'everything'
309 or die "$ME: [$cwd] Cannot exec $context->{make_cmd}: $!\n";
310 }
311 else {
312 waitpid($pid, 0);
313 exit $? >> 8 if $?;
314 }
315
316 $context->copy_docbook_files;
317 }
318
319 sub copy_docbook_files {
320 my $context = shift;
321
322 # where the generated docbook files can be found
323 my $docdir = catdir $context->{d}{vcs_export}, 'doc', 'doc-docbook';
324
325 foreach ('spec.xml', 'filter.xml') {
326 my $from = catfile $docdir, $_;
327 my $to = catdir $context->{d}{tmp}; # {dookbook}
328 copy $from => $to or die $@;
329 }
330 }
331
332 sub build_html_documentation {
333 my $context = shift;
334
335 # where the website docbook source dir is - push the generated
336 # files there
337 {
338 my $webdir = catdir $context->{website_base}, 'docbook', $context->{v}{target_release};
339 make_path $webdir, { verbose => $verbose || $debug };
340 copy catfile($context->{d}{vcs_export}, 'doc', 'doc-docbook', $_)
341 => $webdir or die $@
342 for 'spec.xml', 'filter.xml';
343 }
344
345 my $gen = catfile $context->{website_base}, 'script/gen';
346 my $outdir = catdir $context->{d}{pkg_trees}, "exim-html-$context->{v}{release}";
347
348 make_path $outdir, { verbose => $verbose || $debug };
349
350 my @cmd = (
351 $gen,
352 '--spec' => catfile($context->{d}{tmp}, 'spec.xml'), # {dookbook}
353 '--filter' => catfile($context->{d}{tmp}, 'filter.xml'), # {dookbok}
354 '--latest' => $context->{v}{target_release},
355 '--docroot' => $outdir,
356 '--localstatic',
357 ($verbose || $debug ? '--verbose' : ()),
358 );
359
360 print "[$cwd] Executing @cmd\n";
361 0 == system @cmd or exit $? >> 8;
362
363 }
364
365 sub sign {
366 my $context = shift;
367 foreach my $tar (glob "$context->{d}{pkg_tars}/*") {
368 system gpg =>
369 '--quiet', '--batch',
370 defined $context->{gpg}{key}
371 ? ('--local-user' => $context->{gpg}{key})
372 : (),
373 '--detach-sig', '--armor', $tar;
374 }
375 }
376
377 sub move_to_outdir {
378 my $context = shift;
379 make_path $context->{OUTDIR}, { verbose => $verbose || $debug };
380 move $_ => $context->{OUTDIR} or die $@
381 for glob "$context->{d}{pkg_tars}/*";
382 }
383
384 sub build_src_package_directory {
385 my $context = shift;
386
387 # build the exim package directory path
388 $context->{d}{src} = catdir $context->{d}{pkg_trees}, "exim-$context->{v}{release}";
389
390 # initially we move the exim-src directory to the new directory name
391 move
392 catdir( $context->{d}{vcs_export}, 'src')
393 => $context->{d}{src}
394 or croak "Move of src dir failed - $!";
395
396 # add Local subdirectory
397 make_path( catdir( $context->{d}{src}, 'Local' ), { verbose => $verbose || $debug } );
398
399 # now add the text docs
400 $context->move_text_docs_into_pkg;
401 }
402
403 sub build_doc_packages_directory {
404 my $context = shift;
405
406 ##foreach my $format (qw/pdf postscript texinfo info/) {
407 foreach my $format (qw/pdf postscript/) {
408 my $target = catdir $context->{d}{pkg_trees}, "exim-$format-$context->{v}{release}", 'doc';
409 make_path( $target, { verbose => $verbose || $debug } );
410
411 # move documents across
412 foreach my $file (
413 glob(
414 catfile(
415 $context->{d}{vcs_export},
416 'doc',
417 'doc-docbook',
418 (
419 ( $format eq 'postscript' )
420 ? '*.ps'
421 : ( '*.' . $format )
422 )
423 )
424 )
425 )
426 {
427 move( $file, catfile( $target, ( splitpath($file) )[2] ) );
428 }
429 }
430 }
431
432 sub move_text_docs_into_pkg {
433 my $context = shift;
434
435 my $old_docdir = catdir( $context->{d}{vcs_export}, 'doc', 'doc-docbook' );
436 my $old_txtdir = catdir( $context->{d}{vcs_export}, 'doc', 'doc-txt' );
437 my $new_docdir = catdir( $context->{d}{src}, 'doc' );
438 make_path( $new_docdir, { verbose => $verbose || $debug } );
439
440 # move generated documents from docbook stuff
441 foreach my $file (qw/exim.8 spec.txt filter.txt/) {
442 die "Empty file \"$file\"\n" if -z catfile( $old_docdir, $file );
443 move( catfile( $old_docdir, $file ), catfile( $new_docdir, $file ) );
444 }
445
446 # move text documents across
447 foreach my $file ( glob( catfile( $old_txtdir, '*' ) ) ) {
448
449 # skip a few we dont want
450 my $fn = ( splitpath($file) )[2];
451 next
452 if ( ( $fn eq 'ABOUT' )
453 || ( $fn eq 'ChangeLog.0' )
454 || ( $fn eq 'test-harness.txt' )
455 # Debian issue re licensing of RFCs
456 || ( $fn =~ /^draft-ietf-.*/ )
457 || ( $fn =~ /^rfc.*/ )
458 );
459 move( $file, catfile( $new_docdir, $fn ) );
460 }
461 }
462
463 sub create_tar_files {
464 my $context = shift;
465
466 my $pkg_tars = $context->{d}{pkg_tars};
467 my $pkg_trees = $context->{d}{pkg_trees};
468 my $tar = $context->{tar_cmd};
469 if ($verbose) {
470 foreach my $c (keys %{ $context->{compressors} }) {
471 print "Compression: $c\t$context->{compressors}{$c}\n";
472 }
473 }
474
475 # We ideally do not want local system user information in release tarballs;
476 # those are artifacts of use of tar for backups and have no place in
477 # software release packaging; if someone extracts as root, then they should
478 # get sane file ownerships.
479 my @ownership = (
480 '--owner' => $context->{tar_perms}{user},
481 '--group' => $context->{tar_perms}{group},
482 # on this GNU tar, --numeric-owner works during creation too
483 '--numeric-owner'
484 ) if qx/tar --help 2>&1/ =~ /^\s*--owner=/m;
485
486 # See also environment variables set in main, tuning compression levels
487
488 my (%size, %sha256);
489
490 foreach my $dir ( glob( catdir( $pkg_trees, ( 'exim*-' . $context->{v}{release} ) ) ) ) {
491 my $dirname = ( splitdir($dir) )[-1];
492 foreach my $comp (keys %{$context->{compressors}}) {
493 my %compressor = %{$context->{compressors}{$comp}};
494 next unless $compressor{use};
495
496 my $basename = "$dirname.tar.$compressor{extension}";
497 my $outfile = catfile $pkg_tars, $basename;
498
499 print "Creating: $outfile\n" if $verbose || $debug;
500 0 == system($tar,
501 cf => $outfile,
502 $compressor{flags},
503 @ownership, -C => $pkg_trees, $dirname)
504 or exit $? >> 8;
505
506 # calculate size and md5sum
507 $size{$basename} = -s $outfile;
508 $sha256{$basename} = do {
509 my $sha = Digest::SHA->new(256);
510 $sha->addfile($outfile);
511 $sha->hexdigest;
512 };
513 }
514 }
515
516 # write the sizes file
517 if ($context->{sizes}) {
518 open my $sizes, '>', $_ = catfile $pkg_tars, 'sizes.txt'
519 or die "$ME: Can't open `$_': $!\n";
520
521 print $sizes join "\n",
522 (map { "SIZE($_) = $size{$_}" } sort keys %size),
523 (map { "SHA256($_) = $sha256{$_}" } sort keys %sha256);
524
525 close($sizes) or die "$ME: Can't close $_: $!\n";
526 }
527 }
528
529 sub do_cleanup {
530 my $context = shift;
531
532 print "Cleaning up\n" if $verbose;
533 remove_tree $context->{d}{tmp}, { verbose => $verbose || $debug };
534 }
535
536 }
537
538 MAIN: {
539
540 # some of these settings are useful only if we're in the
541 # exim-projekt-root, but the check, if we're, is deferred
542 my $context = Context->new(
543 pkgname => 'exim',
544 website_base => abs_path('../exim-website'),
545 tar_cmd => 'tar',
546 tar_perms => {
547 user => '0',
548 group => '0',
549 },
550 make_cmd => 'make', # for 'make'ing the docs
551 sizes => 1,
552 compressors => {
553 gzip => { use => 1, extension => 'gz', flags => '--gzip' },
554 bzip2 => { use => 1, extension => 'bz2', flags => '--bzip2' },
555 xz => { use => 1, extension => 'xz', flags => '--xz' },
556 lzip => { use => 0, extension => 'lz', flags => '--lzip' },
557 },
558 docs => 1,
559 web => 1,
560 delete => 0,
561 cleanup => 1,
562 gpg => {
563 sign => 1,
564 key => undef,
565 },
566 quick => 0,
567 );
568
569 ##$ENV{'PATH'} = '/opt/local/bin:' . $ENV{'PATH'};
570 # We are creating files for mass distribution, so work harder to make smaller files.
571 $ENV{GZIP} = -9;
572 $ENV{BZIP2} = -9;
573 # xz documents minimum file sizes for levels higher than -6 to be useful and each
574 # requires more RAM on the decompressing system. Exim tarball currently 24MiB so
575 # using -8.
576 $ENV{XZ_DEFAULTS} = -8;
577
578 GetOptions(
579 $context,
580 qw(workspace|tmp=s website_base|webgen_base=s tar_cmd|tar-cmd=s make_cmd|make-cmd=s
581 docs|build-docs! web|build-web! sizes!
582 delete! cleanup! quick|quick-release! minimal),
583 'sign!' => \$context->{gpg}{sign},
584 'key=s' => \$context->{gpg}{key},
585 'verbose!' => \$verbose,
586 'compressors=s@' => sub {
587 die "$0: can't parse compressors string `$_[1]'\n" unless $_[1] =~ /^[+=-]?\w+(?:[+=-]\w+)*$/;
588 while ($_[1] =~ /(?<act>[+=-])?(?<name>\w+)\b/g) {
589 die "$0: Unknown compressor $+{name}"
590 unless $context->{compressors}{$+{name}};
591 if (not defined $+{act} or $+{act} eq '=') {
592 $_->{use} = 0
593 for values %{$context->{compressors}};
594 $context->{compressors}{$+{name}}{use}++;
595 }
596 elsif ($+{act} eq '+') { $context->{compressors}{$+{name}}{use}++; }
597 elsif ($+{act} eq '-') { $context->{compressors}{$+{name}}{use}--; }
598 }
599 },
600 'debug:s' => \$debug,
601 'quick' => sub { $context->{web}--; $context->{quick} = 1 },
602 'help|?' => sub { pod2usage(-verbose => 1, -exit => 0) },
603 'man!' => sub { pod2usage(-verbose => 2, -exit => 0, -noperldoc => system('perldoc -V >/dev/null 2>&1')) },
604 ) and (@ARGV == 2 or ($context->{quick} and @ARGV >= 1))
605 or pod2usage;
606
607 -f '.exim-project-root'
608 or die "$ME: please call this script from the root of the Exim project sources\n";
609
610 $context->{OUTDIR} = pop @ARGV;
611
612 if ($context->{gpg}{sign}) {
613 $context->{gpg}{key} //= do { chomp($_ = qx/git config user.signingkey/); $_ }
614 || $ENV{EXIM_KEY}
615 || do {
616 warn "$ME: No GPG key, using default\n";
617 undef;
618 }
619 }
620
621
622 warn "$ME: changed umask to 022\n" if umask(022) != 022;
623
624 $context->check_version(shift); # may be undef for a quick release
625
626 if ($debug//'' eq 'version') {
627 for (sort keys %{$context->{v}}) {
628 print "version $_: $context->{v}{$_}\n";
629 }
630 print "git commit: $context->{commit}\n";
631 exit 0;
632 }
633 $context->override_tar_cmd;
634 $context->prepare_working_directory;
635 $context->export_git_tree;
636 $context->unpack_tree;
637 $context->make_version_script;
638
639 $context->build_documentation if $context->{docs};
640 $context->build_html_documentation if $context->{docs} && $context->{web};
641
642 $context->build_src_package_directory;
643 $context->build_doc_packages_directory if $context->{docs};
644
645 $context->create_tar_files;
646 $context->sign if $context->{gpg}{sign};
647 $context->move_to_outdir;
648 $context->do_cleanup if $context->{cleanup};
649
650 ### $context
651 }
652
653 1;
654
655 __END__
656
657 =head1 NAME
658
659 mk_exim_release - Build an exim release
660
661 =head1 SYNOPSIS
662
663 mk_exim_release [options] version PKG-DIRECTORY
664 mk_exim_release [options] --quick [version] PKG-DIRECTORY
665
666 =head1 DESCRIPTION
667
668 B<mk_exim_release> builds an exim release.
669
670 Starting in a populated git repo that has already been tagged for
671 release it builds docs, packages etc. Parameter is the version number
672 to build as - ie 4.72 4.72-RC1, 4.86.1, etc, without any prefix.
673
674 This scripts expects to find a tag "exim-<version>".
675
676 After creating the release files, they should be signed. There is another
677 helper for creating the signatures:
678 F<release-process/scripts/sign_exim_packages>.
679
680 Call B<mk_exim_release> about like this:
681
682 release-process/scripts/mk_exim_release 4.99 OUT-DIR
683
684
685 =head1 OPTIONS
686
687 =over 4
688
689 =item B<--[no]cleanup>
690
691 Do (or do not) cleanup the tmp directory at exit (default: do cleanup)
692
693 =item B<--compressors> [I<action>]I<compressor[I<action>$<compressor>]...
694
695 A list of compressors to use. Currently the default list is
696 B<gzip>, B<xz>, and B<bzip2>, with B<lzip> optionally to be enabled.
697
698 I<action> can be "+" (add), "-" (remove), and "=" (set).
699
700 =item B<--debug[=I<item>]>
701
702 Forces debug mode. If (default: no debug info)
703
704 =over 4
705
706 =item item: B<version>
707
708 Output the parsed/found version number and exit.
709
710 =back
711
712 =item B<--[no]delete>
713
714 Delete a pre-existing tmp- and package-directory at start. (default: don't delete)
715
716 =item B<--[no]doc>
717
718 Do (not) build the documentation. This needs C<gnu-make> (default: build the docs)
719
720 =item B<--[no]help>
721
722 Display short help and exit cleanly. (default: don't do that)
723
724 =item B<--key> I<GPG key>
725
726 Use this GPG key for signing. If nothing is specified the first one of this list
727 is used:
728
729 =over 8
730
731 =item - git config user.signingkey
732
733 =item - environment C<EXIM_KEY>
734
735 =item - default GPG key
736
737 =back
738
739 =item B<--make-cmd> I<cmd>
740
741 Force the use of a specific C<make> command. This may be necessary if C<make> is not
742 C<gmake>. This is necessary to build the docs. (default: C<make>)
743
744 =item B<--[no]man>
745
746 Display man page and exit cleanly. (default: don't do that)
747
748 =item B<--quick>
749
750 Create a quick release. The I<version> mandatory argument needs to be a git commit-ish.
751 (try I<master> or I<HEAD> or similar). This mode switches off the
752 website creation (which can be enabled by B<--web> again).
753
754 =item B<--[no]sign>
755
756 Sign the created archive files (and the sizes.txt). (default: sign)
757
758 =item B<--[no]sizes>
759
760 Write the sizes information to F<sizes.txt>. (default: write sizes)
761
762 =item B<--tar-cmd> I<cmd>
763
764 Use to override the path to the C<tar> command. Need GNU tar in case
765 I<lzip> is selected. (default: C<gtar>, if not found, use C<tar>)
766
767 =item B<--tmpdir> I<dir>
768
769 Change the name of the tmp directory (default: temporary directory)
770
771 =item B<--verbose>
772
773 Force verbose mode. (default: no verbosity)
774
775 =item B<--[no]web>
776
777 Control the creation of the website. For creation of the website, the F<../exim-website>
778 (but see the B<website-base> option) directory must exist. (default: create the website, except when
779 in B<quick> mode)
780
781 =item B<--website-base> I<dir>
782
783 Base directory for the web site generation (default: F<../exim-website>)
784
785 =item B<-workspace>|B<--tmp> I<directory>
786
787 During release gerneration temporary storage is necessary. (default: F<exim-packaging-XXXX>
788 under your system's default temporary directory (typically this is F</tmp>)).
789
790 =back
791
792 =head1 AUTHOR
793
794 Nigel Metheringham <Nigel.Metheringham@dev.intechnology.co.uk>,
795 some changes by Heiko Schlittermann <hs@schlittermann.de>
796
797 =head1 COPYRIGHT
798
799 Copyright 2010-2016 Exim Maintainers. All rights reserved.
800
801 =cut
802 # vim: set sw=4 et :