From 332f13e938f4b41e72c9320e431e3a936cf7d776 Mon Sep 17 00:00:00 2001 From: "ccooper%deadsquid.com" Date: Wed, 15 Apr 2009 00:24:35 +0000 Subject: [PATCH] b=483232 r=nthomas - Add partner repack logic to Bootstrap git-svn-id: svn://10.0.0.236/trunk@256917 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/tools/release/Bootstrap/Step.pm | 14 +++++++ mozilla/tools/release/MozBuild/Util.pm | 41 +++++++++++++++++++ .../release/configs/fx-moz19-bootstrap.cfg | 5 +++ .../configs/fx-moz19-staging-bootstrap.cfg | 29 +++++++------ mozilla/tools/release/release | 2 + 5 files changed, 79 insertions(+), 12 deletions(-) diff --git a/mozilla/tools/release/Bootstrap/Step.pm b/mozilla/tools/release/Bootstrap/Step.pm index 53ce8b70177..4cd8d6fa1b2 100644 --- a/mozilla/tools/release/Bootstrap/Step.pm +++ b/mozilla/tools/release/Bootstrap/Step.pm @@ -64,6 +64,14 @@ sub Shell { $runShellCommandArgs{'dir'} = $dir; } + if ($args{'prependToPath'}) { + $runShellCommandArgs{'prependToPath'} = $args{'prependToPath'}; + } + + if ($args{'appendToPath'}) { + $runShellCommandArgs{'appendToPath'} = $args{'appendToPath'}; + } + $this->Log(msg => 'Running shell command' . (defined($dir) ? " in $dir" : '') . ':'); $this->Log(msg => ' arg0: ' . $cmd); @@ -187,6 +195,12 @@ sub SendAnnouncement { $config->Get(var => 'cc')) : (); my $hostname = $config->SystemInfo(var => 'hostname'); + # This allows for per-step CC, since some consumers only care about + # certain steps, e.g. partner repacks + if ($args{'cc'}) { + push @ccList, split(/[,\s]+/,$args{'cc'}); + } + my $subject = $hostname . ' - ' . $args{'subject'}; my $message = $hostname . ' - ' . $args{'message'}; diff --git a/mozilla/tools/release/MozBuild/Util.pm b/mozilla/tools/release/MozBuild/Util.pm index 8730b6596d2..065bdd3aee3 100644 --- a/mozilla/tools/release/MozBuild/Util.pm +++ b/mozilla/tools/release/MozBuild/Util.pm @@ -111,6 +111,11 @@ sub RunShellCommand { my $prevStdoutBufferingSetting = 0; local *LOGFILE; + my $original_path = $ENV{'PATH'}; + if ($args{'prependToPath'} or $args{'appendToPath'}) { + $ENV{'PATH'} = AugmentPath(%args); + } + if ($printOutputImmediately) { # We Only end up doing this if it's requested that we're going to print # output immediately. Additionally, we can't call autoflush() on STDOUT @@ -265,6 +270,11 @@ sub RunShellCommand { } } + # Restore path (if necessary) + if ($ENV{'PATH'} ne $original_path) { + $ENV{'PATH'} = $original_path; + } + # Restore external state chdir($cwd) if (defined($changeToDir)); if ($printOutputImmediately) { @@ -283,6 +293,37 @@ sub RunShellCommand { }; } +## Allows the path to be (temporarily) augmented on either end. It's expected +## that the caller will keep track of the original path if it needs to be +## reverted. +## +## NOTE: we don't actually set the path here, just return the augmented path +## string for use by the caller. + +sub AugmentPath { + my %args = @_; + + my $prependToPath = $args{'prependToPath'}; + my $appendToPath = $args{'appendToPath'}; + + my $current_path = $ENV{'PATH'}; + if ($prependToPath and $prependToPath ne '') { + if ($current_path and $current_path ne '') { + $current_path = $prependToPath . ":" . $current_path; + } else { + $current_path = $prependToPath; + } + } + if ($appendToPath and $appendToPath ne '') { + if ($current_path and $current_path ne '') { + $current_path .= ":" . $appendToPath; + } else { + $current_path = $appendToPath; + } + } + return $current_path; +} + ## This is a wrapper function to get easy true/false return values from a ## mkpath()-like function. mkpath() *actually* returns the list of directories ## it created in the pursuit of your request, and keeps its actual success diff --git a/mozilla/tools/release/configs/fx-moz19-bootstrap.cfg b/mozilla/tools/release/configs/fx-moz19-bootstrap.cfg index 8ab5d275f3e..4f8b508c000 100644 --- a/mozilla/tools/release/configs/fx-moz19-bootstrap.cfg +++ b/mozilla/tools/release/configs/fx-moz19-bootstrap.cfg @@ -91,3 +91,8 @@ win32_hgSshKey = /c/Documents and Settings/cltbld/.ssh/ffxbld_dsa linux_hgSshKey = /home/cltbld/.ssh/ffxbld_dsa macosx_hgSshKey = /Users/cltbld/.ssh/ffxbld_dsa bumpMilestoneTxt = 1 +hgPartnersRepo = https://hg.mozilla.org/build/partner-repacks +hgPartnersTag = default +partnerRepackDir = /builds/partners +remoteRepackDir = /home/ftp/pub/mozilla.org/firefox/nightly/latest-mozilla1.9.0-partner-repacks +partnerRepackCC = kev@mozilla.com,cbook@mozilla.com diff --git a/mozilla/tools/release/configs/fx-moz19-staging-bootstrap.cfg b/mozilla/tools/release/configs/fx-moz19-staging-bootstrap.cfg index 1c70a70aaa5..e77e4d670fd 100644 --- a/mozilla/tools/release/configs/fx-moz19-staging-bootstrap.cfg +++ b/mozilla/tools/release/configs/fx-moz19-staging-bootstrap.cfg @@ -1,18 +1,18 @@ -version = 3.0.6 -appVersion = 3.0.6 -milestone = 1.9.0.6 +version = 3.0.9 +appVersion = 3.0.9 +milestone = 1.9.0.9 # _BUILDn and _RELEASE will be appended as-needed -productTag = FIREFOX_3_0_6 +productTag = FIREFOX_3_0_9 # Branch name and pull dates to use for base tag branchTag = HEAD -#RelbranchOverride = GECKO190_20071207_RELBRANCH -pullDate = 2009-01-16 06:00 PDT -l10n_pullDate = 2009-01-16 06:00 PDT -build = 1 -# oldVersion and oldRc refer to the previous release -oldVersion = 3.0.5 -oldAppVersion = 3.0.5 -oldBuild = 1 +#RelbranchOverride = GECKO190_20090217_RELBRANCH +pullDate = 2009-03-31 12:23 PDT +l10n_pullDate = 2009-03-18 11:00 PDT +build = 2 +# oldVersion and oldBuild refer to the previous release +oldVersion = 3.0.8 +oldAppVersion = 3.0.8 +oldBuild = 2 appName = browser product = firefox # Absolute path to tinderbox build directory @@ -91,3 +91,8 @@ win32_hgSshKey = /c/Documents and Settings/cltbld/.ssh/ffxbld_dsa linux_hgSshKey = /home/cltbld/.ssh/ffxbld_dsa macosx_hgSshKey = /Users/cltbld/.ssh/ffxbld_dsa bumpMilestoneTxt = 1 +hgPartnersRepo = https://hg.mozilla.org/build/partner-repacks +hgPartnersTag = default +partnerRepackDir = /builds/partners +remoteRepackDir = /home/ftp/pub/mozilla.org/firefox/nightly/latest-mozilla1.9.0-partner-repacks +partnerRepackCC = ccooper@deadsquid.com diff --git a/mozilla/tools/release/release b/mozilla/tools/release/release index e26bfa42e42..8bdb3f4f728 100755 --- a/mozilla/tools/release/release +++ b/mozilla/tools/release/release @@ -14,6 +14,7 @@ use Bootstrap::Step::PatcherConfig; use Bootstrap::Step::Updates; use Bootstrap::Step::Stage; use Bootstrap::Step::Sign; +use Bootstrap::Step::PartnerRepack; my @allSteps = ( 'Tag', @@ -25,6 +26,7 @@ my @allSteps = ( 'PatcherConfig', 'Updates', 'Stage', + 'PartnerRepack' ); my %config;