X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/91bde4a0253d38118dc227e184b793d476a013ce..bf54eb2deeec9a0c362a9559b43a62434a3fc2a5:/release-process/scripts/mk_exim_release diff --git a/release-process/scripts/mk_exim_release b/release-process/scripts/mk_exim_release index b07f088c8..95f9f9050 100755 --- a/release-process/scripts/mk_exim_release +++ b/release-process/scripts/mk_exim_release @@ -235,6 +235,7 @@ sub move_text_docs_into_pkg { # move generated documents from docbook stuff foreach my $file (qw/exim.8 spec.txt filter.txt/) { + die "Empty file \"$file\"\n" if -z File::Spec->catfile( $old_docdir, $file ); move( File::Spec->catfile( $old_docdir, $file ), File::Spec->catfile( $new_docdir, $file ) ); } @@ -374,6 +375,10 @@ sub create_tar_files { print "Creating: ${pkgs}/${dirname}.tar.lz\n" if ($verbose || $debug); system("$tar cf ${pkgs}/${dirname}.tar.lz --lzip -C ${pkgdirs} ${dirname}") } + if ($context->{compressors}{xz}) { + print "Creating: ${pkgs}/${dirname}.tar.xz\n" if ($verbose || $debug); + system("$tar cf ${pkgs}/${dirname}.tar.xz --xz -C ${pkgdirs} ${dirname}") + } } } @@ -393,6 +398,7 @@ MAIN: { compressors => { gzip => 1, bzip2 => 1, + xz => 1, lzip => 0, }, build_docs => 1, @@ -401,6 +407,13 @@ MAIN: { my $delete; my $cleanup = 1; ##$ENV{'PATH'} = '/opt/local/bin:' . $ENV{'PATH'}; + # We are creating files for mass distribution, so work harder to make smaller files. + $ENV{'GZIP'} = '-9'; + $ENV{'BZIP2'} = '-9'; + # xz documents minimum file sizes for levels higher than -6 to be useful and each + # requires more RAM on the decompressing system. Exim tarball currently 24MiB so + # using -8. + $ENV{'XZ_DEFAULTS'} = '-8'; GetOptions( 'directory=s' => \$context->{directory}, @@ -418,6 +431,7 @@ MAIN: { 'web!' => \$context->{web}, ) and @ARGV == 1 or pod2usage; + umask(022); get_and_check_version( shift, $context ); fix_paths_tar($context); $context->{tag} = build_tag($context);