[mpich2-commits] r5548 - mpich2/trunk/maint
balaji at mcs.anl.gov
balaji at mcs.anl.gov
Sat Oct 24 17:04:19 CDT 2009
Author: balaji
Date: 2009-10-24 17:04:19 -0500 (Sat, 24 Oct 2009)
New Revision: 5548
Modified:
mpich2/trunk/maint/release.pl
Log:
Updates to the release script to remove unnecessary code. Also added
an extra option to append the svn revision number to the version
string.
Modified: mpich2/trunk/maint/release.pl
===================================================================
--- mpich2/trunk/maint/release.pl 2009-10-23 22:09:31 UTC (rev 5547)
+++ mpich2/trunk/maint/release.pl 2009-10-24 22:04:19 UTC (rev 5548)
@@ -1,4 +1,19 @@
#!/usr/bin/env perl
+#
+# (C) 2008 by Argonne National Laboratory.
+# See COPYRIGHT in top-level directory.
+#
+#
+# Known limitations:
+#
+# 1. This script assumes that it is the only client accessing the
+# svn server. Version number verifications, diffs for ABI
+# mismatches and other checks are run assuming atomicity.
+#
+# 2. ABI mismatch checks are run using an svn diff in mpi.h.in and
+# the binding directory. This can come up with false positives, and
+# is only meant to be a worst-case guess.
+#
use strict;
use warnings;
@@ -10,15 +25,14 @@
my $source = "";
my $psource = "";
my $version = "";
-my $pack = "";
+my $append_svnrev;
my $root = $ENV{PWD};
-
-# This path is the default for the MCS home directory mounts. Pass
-# --with-autoconf='' and --with-automake='' options to this script to
-# use whatever is in your path.
my $with_autoconf = "";
my $with_automake = "";
+# Default to MPICH2
+my $pack = "mpich2";
+
my $logfile = "release.log";
sub usage
@@ -27,17 +41,20 @@
print "OPTIONS:\n";
# Source svn repository from where the package needs to be downloaded from
- print "\t--source source svn repository (required)\n";
+ print "\t--source source svn repository (required)\n";
# svn repository for the previous source in this series to ensure ABI compliance
print "\t--psource source repo for the previous version for ABI compliance (required)\n";
- # what package we are creating (mpich2, romio, mpe)
- print "\t--package package to create (optional)\n";
+ # what package we are creating
+ print "\t--package package to create (optional)\n";
- # version number associated with the tarball
- print "\t--version tarball version (required)\n";
+ # version string associated with the tarball
+ print "\t--version tarball version (required)\n";
+ # append svn revision
+ print "\t--append-svnrev append svn revision number (optional)\n";
+
print "\n";
exit;
@@ -82,181 +99,12 @@
}
}
-sub debug
-{
- my $line = shift;
-
- print "$line";
-}
-
-sub create_docs
-{
- my $pack = shift;
-
- if ($pack eq "romio") {
- chdir("romio/doc");
- run_cmd("make");
- run_cmd("rm -f users-guide.blg users-guide.toc users-guide.aux users-guide.bbl users-guide.log users-guide.dvi");
- }
- elsif ($pack eq "mpe") {
- chdir("mpe2/maint");
- run_cmd("make -f Makefile4man");
- }
-}
-
-sub create_mpich2
-{
- # Check out the appropriate source
- debug("===> Checking out mpich2 SVN source... ");
- run_cmd("rm -rf mpich2-${version}");
- run_cmd("svn export -q ${source} mpich2-${version}");
- debug("done\n");
-
- # Remove packages that are not being released
- debug("===> Removing packages that are not being released... ");
- chdir("${root}/mpich2-${version}");
- run_cmd("rm -rf src/mpid/globus doc/notes src/pm/mpd/Zeroconf.py");
-
- chdir("${root}/mpich2-${version}/src/mpid/ch3/channels/nemesis/nemesis/netmod");
- my @nem_modules = qw(elan ib psm);
- run_cmd("rm -rf ".join(' ', map({$_ . "/*"} @nem_modules)));
- for my $module (@nem_modules) {
- # system to avoid problems with shell redirect in run_cmd
- system(qq(echo "# Stub Makefile" > ${module}/Makefile.sm));
- }
- debug("done\n");
-
- # Create configure
- debug("===> Creating configure in the main package... ");
- chdir("${root}/mpich2-${version}");
- {
- my $cmd = "./maint/updatefiles";
- $cmd .= " --with-autoconf=$with_autoconf" if $with_autoconf;
- $cmd .= " --with-automake=$with_automake" if $with_automake;
- run_cmd($cmd);
- }
- debug("done\n");
-
- # Remove unnecessary files
- debug("===> Removing unnecessary files in the main package... ");
- chdir("${root}/mpich2-${version}");
- run_cmd("rm -rf README.vin maint/config.log maint/config.status unusederr.txt src/mpe2/src/slog2sdk/doc/jumpshot-4/tex");
- run_cmd("find . -name autom4te.cache | xargs rm -rf");
- debug("done\n");
-
- # Get docs
- debug("===> Creating secondary package for the docs... ");
- chdir("${root}");
- run_cmd("cp -a mpich2-${version} mpich2-${version}-tmp");
- debug("done\n");
-
- debug("===> Configuring and making the secondary package... ");
- chdir("${root}/mpich2-${version}-tmp");
- {
- my $cmd = "./maint/updatefiles";
- $cmd .= " --with-autoconf=$with_autoconf" if $with_autoconf;
- $cmd .= " --with-automake=$with_automake" if $with_automake;
- run_cmd($cmd);
- }
- run_cmd("./configure --without-mpe --disable-f90 --disable-f77 --disable-cxx");
- run_cmd("(make mandoc && make htmldoc && make latexdoc)");
- debug("done\n");
-
- debug("===> Copying docs over... ");
- chdir("${root}/mpich2-${version}-tmp");
- run_cmd("cp -a man ${root}/mpich2-${version}");
- run_cmd("cp -a www ${root}/mpich2-${version}");
- run_cmd("cp -a doc/userguide/user.pdf ${root}/mpich2-${version}/doc/userguide");
- run_cmd("cp -a doc/installguide/install.pdf ${root}/mpich2-${version}/doc/installguide");
- run_cmd("cp -a doc/smpd/smpd_pmi.pdf ${root}/mpich2-${version}/doc/smpd");
- run_cmd("cp -a doc/logging/logging.pdf ${root}/mpich2-${version}/doc/logging");
- run_cmd("cp -a doc/windev/windev.pdf ${root}/mpich2-${version}/doc/windev");
- chdir("${root}");
- run_cmd("rm -rf mpich2-${version}-tmp");
- debug("done\n");
-
- debug("===> Creating ROMIO docs... ");
- chdir("${root}/mpich2-${version}/src/mpi");
- create_docs("romio");
- debug("done\n");
-
- debug( "===> Creating MPE docs... ");
- chdir("${root}/mpich2-${version}/src");
- create_docs("mpe");
- debug("done\n");
-
- # Create the tarball
- debug("===> Creating the final mpich2 tarball... ");
- chdir("${root}");
- run_cmd("tar -czvf mpich2-${version}.tar.gz mpich2-${version}");
- run_cmd("rm -rf mpich2-${version}");
- debug("done\n\n");
-}
-
-sub create_romio
-{
- # Check out the appropriate source
- debug("===> Checking out romio SVN source... ");
- run_cmd("rm -rf romio-${version} romio");
- run_cmd("svn export -q ${source}/src/mpi/romio");
- debug("done\n");
-
- debug("===> Creating configure... ");
- chdir("${root}/romio");
- run_cmd("autoreconf");
- debug("done\n");
-
- debug("===> Creating ROMIO docs... ");
- chdir("${root}");
- create_docs("romio");
- debug("done\n");
-
- # Create the tarball
- debug("===> Creating the final romio tarball... ");
- chdir("${root}");
- run_cmd("mv romio romio-${version}");
- run_cmd("tar -czvf romio-${version}.tar.gz romio-${version}");
- run_cmd("rm -rf romio-${version}");
- debug("done\n\n");
-}
-
-sub create_mpe
-{
- # Check out the appropriate source
- debug("===> Checking out mpe2 SVN source... ");
- run_cmd("rm -rf mpe2-${version} mpe2");
- run_cmd("svn export -q ${source}/src/mpe2");
- debug("done\n");
-
- debug("===> Creating configure... ");
- chdir("${root}/mpe2");
- {
- my $cmd = "./maint/updatefiles";
- $cmd .= " --with-autoconf=$with_autoconf" if $with_autoconf;
- $cmd .= " --with-automake=$with_automake" if $with_automake;
- run_cmd($cmd);
- }
- debug("done\n");
-
- debug("===> Creating MPE docs... ");
- chdir("${root}");
- create_docs("mpe");
- debug("done\n");
-
- # Create the tarball
- debug("===> Creating the final mpe2 tarball... ");
- chdir("${root}");
- run_cmd("mv mpe2 mpe2-${version}");
- run_cmd("tar -czvf mpe2-${version}.tar.gz mpe2-${version}");
- run_cmd("rm -rf mpe2-${version}");
- debug("done\n\n");
-}
-
GetOptions(
"source=s" => \$source,
"psource=s" => \$psource,
"package:s" => \$pack,
"version=s" => \$version,
+ "append-svnrev!" => \$append_svnrev,
"with-autoconf" => \$with_autoconf,
"with-automake" => \$with_automake,
"help" => \&usage,
@@ -266,10 +114,6 @@
usage();
}
-if (!$pack) {
- $pack = "mpich2";
-}
-
if (!$source || !$version || !$psource) {
usage();
}
@@ -279,12 +123,11 @@
check_package("latex");
check_package("autoconf");
check_package("automake");
-debug "\n";
+print("\n");
my $current_ver = `svn cat ${source}/maint/Version`;
-
if ("$current_ver" ne "$version\n") {
- debug("\n\tWARNING: Version mismatch\n\n");
+ print("\tWARNING: Version mismatch\n\n");
}
if ($psource) {
@@ -292,26 +135,103 @@
my $d = `svn diff ${psource}/src/include/mpi.h.in ${source}/src/include/mpi.h.in`;
$d .= `svn diff ${psource}/src/binding ${source}/src/binding`;
if ("$d" ne "") {
- debug("\n\tWARNING: ABI mismatch\n\n");
+ print("\tWARNING: ABI mismatch\n\n");
}
}
+if ($append_svnrev) {
+ $version .= "-r";
+ $version .= `svn info ${source} | grep ^Revision: | cut -f2 -d' ' | xargs echo -n`;
+}
+
+# Clean up the log file
system("rm -f ${root}/$logfile");
-if ($pack eq "mpich2") {
- create_mpich2();
+# Check out the appropriate source
+print("===> Checking out $pack SVN source... ");
+run_cmd("rm -rf ${pack}-${version}");
+run_cmd("svn export -q ${source} ${pack}-${version}");
+print("done\n");
+
+# Remove packages that are not being released
+print("===> Removing packages that are not being released... ");
+chdir("${root}/${pack}-${version}");
+run_cmd("rm -rf src/mpid/globus doc/notes src/pm/mpd/Zeroconf.py");
+
+chdir("${root}/${pack}-${version}/src/mpid/ch3/channels/nemesis/nemesis/netmod");
+my @nem_modules = qw(elan ib psm);
+run_cmd("rm -rf ".join(' ', map({$_ . "/*"} @nem_modules)));
+for my $module (@nem_modules) {
+ # system to avoid problems with shell redirect in run_cmd
+ system(qq(echo "# Stub Makefile" > ${module}/Makefile.sm));
}
-elsif ($pack eq "romio") {
- create_romio();
+print("done\n");
+
+# Create configure
+print("===> Creating configure in the main package... ");
+chdir("${root}/${pack}-${version}");
+{
+ my $cmd = "./maint/updatefiles";
+ $cmd .= " --with-autoconf=$with_autoconf" if $with_autoconf;
+ $cmd .= " --with-automake=$with_automake" if $with_automake;
+ run_cmd($cmd);
}
-elsif ($pack eq "mpe") {
- create_mpe();
+print("done\n");
+
+# Remove unnecessary files
+print("===> Removing unnecessary files in the main package... ");
+chdir("${root}/${pack}-${version}");
+run_cmd("rm -rf README.vin maint/config.log maint/config.status unusederr.txt src/mpe2/src/slog2sdk/doc/jumpshot-4/tex");
+run_cmd("find . -name autom4te.cache | xargs rm -rf");
+print("done\n");
+
+# Get docs
+print("===> Creating secondary package for the docs... ");
+chdir("${root}");
+run_cmd("cp -a ${pack}-${version} ${pack}-${version}-tmp");
+print("done\n");
+
+print("===> Configuring and making the secondary package... ");
+chdir("${root}/${pack}-${version}-tmp");
+{
+ my $cmd = "./maint/updatefiles";
+ $cmd .= " --with-autoconf=$with_autoconf" if $with_autoconf;
+ $cmd .= " --with-automake=$with_automake" if $with_automake;
+ run_cmd($cmd);
}
-elsif ($pack eq "all") {
- create_mpich2();
- create_romio();
-# create_mpe();
-}
-else {
- die "Unknown package: $pack";
-}
+run_cmd("./configure --disable-mpe --disable-romio --disable-f90 --disable-f77 --disable-cxx");
+run_cmd("(make mandoc && make htmldoc && make latexdoc)");
+print("done\n");
+
+print("===> Copying docs over... ");
+chdir("${root}/${pack}-${version}-tmp");
+run_cmd("cp -a man ${root}/${pack}-${version}");
+run_cmd("cp -a www ${root}/${pack}-${version}");
+run_cmd("cp -a doc/userguide/user.pdf ${root}/${pack}-${version}/doc/userguide");
+run_cmd("cp -a doc/installguide/install.pdf ${root}/${pack}-${version}/doc/installguide");
+run_cmd("cp -a doc/smpd/smpd_pmi.pdf ${root}/${pack}-${version}/doc/smpd");
+run_cmd("cp -a doc/logging/logging.pdf ${root}/${pack}-${version}/doc/logging");
+run_cmd("cp -a doc/windev/windev.pdf ${root}/${pack}-${version}/doc/windev");
+chdir("${root}");
+run_cmd("rm -rf ${pack}-${version}-tmp");
+print("done\n");
+
+print("===> Creating ROMIO docs... ");
+chdir("${root}/${pack}-${version}/src/mpi");
+chdir("romio/doc");
+run_cmd("make");
+run_cmd("rm -f users-guide.blg users-guide.toc users-guide.aux users-guide.bbl users-guide.log users-guide.dvi");
+print("done\n");
+
+print( "===> Creating MPE docs... ");
+chdir("${root}/${pack}-${version}/src");
+chdir("mpe2/maint");
+run_cmd("make -f Makefile4man");
+print("done\n");
+
+# Create the tarball
+print("===> Creating the final ${pack} tarball... ");
+chdir("${root}");
+run_cmd("tar -czvf ${pack}-${version}.tar.gz ${pack}-${version}");
+run_cmd("rm -rf ${pack}-${version}");
+print("done\n\n");
More information about the mpich2-commits
mailing list