From 4fb384b08baf7f07f0ba4003fca7887b5300682a Mon Sep 17 00:00:00 2001 From: "bhearsum@mozilla.com" Date: Thu, 6 Dec 2007 07:31:31 -0800 Subject: [PATCH] bug 379278: bootstrap should support trunk releases. r=preed,rhelmer patch=me --- tools/release/Bootstrap/Config.pm | 2 +- tools/release/Bootstrap/Step.pm | 56 +++++++++++++ tools/release/Bootstrap/Step/Build.pm | 4 +- tools/release/Bootstrap/Step/PatcherConfig.pm | 11 ++- tools/release/Bootstrap/Step/Repack.pm | 29 +++---- tools/release/Bootstrap/Step/Source.pm | 15 ++-- tools/release/Bootstrap/Step/Stage.pm | 9 ++- tools/release/Bootstrap/Step/Tag.pm | 79 ++++++++++--------- tools/release/Bootstrap/Step/Tag/Bump.pm | 23 +++--- tools/release/Bootstrap/Step/Tag/Talkback.pm | 13 +-- tools/release/Bootstrap/Step/Tag/l10n.pm | 24 ++---- tools/release/Bootstrap/Step/TinderConfig.pm | 45 ++++++++--- tools/release/Bootstrap/Step/Updates.pm | 66 +++++++++------- tools/release/Bootstrap/Util.pm | 3 +- tools/release/configs/fx-moz18-bootstrap.cfg | 3 + .../configs/fx-moz18-staging-bootstrap.cfg | 3 + tools/release/configs/fx-moz180-bootstrap.cfg | 4 +- tools/release/configs/tb-moz18-bootstrap.cfg | 3 + tools/release/configs/tb-moz180-bootstrap.cfg | 3 + 19 files changed, 248 insertions(+), 147 deletions(-) diff --git a/tools/release/Bootstrap/Config.pm b/tools/release/Bootstrap/Config.pm index 905ab93f1dd8..58ce07422618 100644 --- a/tools/release/Bootstrap/Config.pm +++ b/tools/release/Bootstrap/Config.pm @@ -224,7 +224,7 @@ sub SystemInfo { } elsif ($var eq 'machine') { return $machine; } elsif ($var eq 'osname') { - if ($sysname =~ /cygwin/i) { + if ($sysname =~ /cygwin/i || $sysname =~ /mingw32/i) { return 'win32'; } elsif ($sysname =~ /darwin/i) { return 'macosx'; diff --git a/tools/release/Bootstrap/Step.pm b/tools/release/Bootstrap/Step.pm index 8a38ae36f809..11b51691abe8 100644 --- a/tools/release/Bootstrap/Step.pm +++ b/tools/release/Bootstrap/Step.pm @@ -251,4 +251,60 @@ sub GetBuildIDFromFTP() { return $buildID; } +sub CvsCo { + my $this = shift; + my %args = @_; + + # Required arguments + die "ASSERT: Bootstrap::Util::CvsCo(): null cvsroot" if + (!exists($args{'cvsroot'})); + my $cvsroot = $args{'cvsroot'}; + + die "ASSERT: Bootstrap::Util::CvsCo(): null modules" if + (!exists($args{'modules'})); + my $modules = $args{'modules'}; + + die "ASSERT: Bootstrap::Util::CvsCo(): bad modules data" if + (ref($modules) ne 'ARRAY'); + + # Optional arguments + my $logFile = $args{'logFile'}; + my $tag = exists($args{'tag'}) ? $args{'tag'} : 0; + my $date = exists($args{'date'}) ? $args{'date'} : 0; + my $checkoutDir = exists($args{'checkoutDir'}) ? $args{'checkoutDir'} : 0; + my $workDir = exists($args{'workDir'}) ? $args{'workDir'} : 0; + my $ignoreExitValue = exists($args{'ignoreExitValue'}) ? + $args{'ignoreExitValue'} : 0; + my $timeout = exists($args{'timeout'}) ? $args{'timeout'} : + $Bootstrap::Util::DEFAULT_SHELL_TIMEOUT; + + my $config = new Bootstrap::Config(); + + my $useCvsCompression = 0; + if ($config->Exists(var => 'useCvsCompression')) { + $useCvsCompression = $config->Get(var => 'useCvsCompression'); + } + + my @cmdArgs; + push(@cmdArgs, '-z3') if ($useCvsCompression); + push(@cmdArgs, ('-d', $cvsroot)); + push(@cmdArgs, 'co'); + # Don't use a tag/branch if pulling from HEAD + push(@cmdArgs, ('-r', $tag)) if ($tag && $tag ne 'HEAD'); + push(@cmdArgs, ('-D', $date)) if ($date); + push(@cmdArgs, ('-d', $checkoutDir)) if ($checkoutDir); + push(@cmdArgs, @{$modules}); + + my %cvsCoArgs = (cmd => 'cvs', + cmdArgs => \@cmdArgs, + dir => $workDir, + timeout => $timeout, + ignoreExitValue => $ignoreExitValue, + ); + if ($logFile) { + $cvsCoArgs{'logFile'} = $logFile; + } + + $this->Shell(%cvsCoArgs); +} 1; diff --git a/tools/release/Bootstrap/Step/Build.pm b/tools/release/Bootstrap/Step/Build.pm index 70a0d8ee5090..7e9e0819caac 100644 --- a/tools/release/Bootstrap/Step/Build.pm +++ b/tools/release/Bootstrap/Step/Build.pm @@ -19,7 +19,7 @@ sub Execute { my $rc = $config->Get(var => 'rc'); my $buildPlatform = $config->Get(sysvar => 'buildPlatform'); my $logDir = $config->Get(sysvar => 'logDir'); - my $osname = $config->SystemInfo(var => 'osname'); + my $sysname = $config->SystemInfo(var => 'sysname'); my $rcTag = $productTag . '_RC' . $rc; my $lastBuilt = catfile($buildDir, $buildPlatform, 'last-built'); @@ -33,7 +33,7 @@ sub Execute { # For Cygwin only, ensure that the system mount point is binmode # This forces CVS to use Unix-style linefeed EOL characters. - if ($osname eq 'win32') { + if ($sysname =~ /cygwin/i) { $this->Shell( cmd => 'mount', cmdArgs => ['-b', '-sc', '/cygdrive'], diff --git a/tools/release/Bootstrap/Step/PatcherConfig.pm b/tools/release/Bootstrap/Step/PatcherConfig.pm index 98c57f7c9c74..8a0b5d3f65e4 100644 --- a/tools/release/Bootstrap/Step/PatcherConfig.pm +++ b/tools/release/Bootstrap/Step/PatcherConfig.pm @@ -40,12 +40,11 @@ sub Execute { } # checkout config to bump - $this->Shell( - cmd => 'cvs', - cmdArgs => ['-d', $mofoCvsroot, 'co', '-d', 'patcher', - CvsCatfile('release', 'patcher', $patcherConfig)], - logFile => catfile($logDir, 'patcherconfig-checkout.log'), - dir => $configBumpDir, + $this->CvsCo(cvsroot => $mofoCvsroot, + checkoutDir => 'patcher', + modules => [CvsCatfile('release', 'patcher', $patcherConfig)], + logFile => catfile($logDir, 'patcherconfig-checkout.log'), + workDir => $configBumpDir ); # Do all the work... diff --git a/tools/release/Bootstrap/Step/Repack.pm b/tools/release/Bootstrap/Step/Repack.pm index 8ba7a299733c..2c0f6ce53848 100644 --- a/tools/release/Bootstrap/Step/Repack.pm +++ b/tools/release/Bootstrap/Step/Repack.pm @@ -18,7 +18,7 @@ sub Execute { my $rc = $config->Get(var => 'rc'); my $logDir = $config->Get(sysvar => 'logDir'); my $l10n_buildPlatform = $config->Get(sysvar => 'l10n_buildPlatform'); - my $osname = $config->SystemInfo(var => 'osname'); + my $sysname = $config->SystemInfo(var => 'sysname'); my $rcTag = $productTag . '_RC' . $rc; my $buildLog = catfile($logDir, 'repack_' . $rcTag . '-build-l10n.log'); @@ -29,7 +29,7 @@ sub Execute { # For Cygwin only, ensure that the system mount point is textmode # This forces CVS to use DOS-style carriage-return EOL characters. - if ($osname eq 'win32') { + if ($sysname =~ /cygwin/i) { $this->Shell( cmd => 'mount', cmdArgs => ['-t', '-sc', '/cygdrive'], @@ -49,7 +49,7 @@ sub Execute { # For Cygwin only, set the system mount point back to binmode # This forces CVS to use Unix-style linefeed EOL characters. - if ($osname eq 'win32') { + if ($sysname =~ /cygwin/i) { $this->Shell( cmd => 'mount', cmdArgs => ['-b', '-sc', '/cygdrive'], @@ -72,9 +72,11 @@ sub Verify { my $mozillaCvsroot = $config->Get(var => 'mozillaCvsroot'); my $verifyDir = $config->Get(var => 'verifyDir'); my $stagingServer = $config->Get(var => 'stagingServer'); - + my $useTarGz = $config->Exists(var => 'useTarGz') ? + $config->Get(var => 'useTarGz') : 0; my $rcTag = $productTag.'_RC'.$rc; + my $linuxExtension = ($useTarGz) ? '.gz' : '.bz2'; # l10n metadiff test my $verifyDirVersion = catfile($verifyDir, $product . '-' . $version); @@ -84,14 +86,13 @@ sub Verify { # check out l10n verification scripts foreach my $dir ('common', 'l10n') { - $this->Shell( - cmd => 'cvs', - cmdArgs => ['-d', $mozillaCvsroot, - 'co', '-d', $dir, - CvsCatfile('mozilla', 'testing', 'release', $dir)], - dir => $verifyDirVersion, - logFile => catfile($logDir, - 'repack_checkout-l10n_verification.log'), + $this->CvsCo(cvsroot => $mozillaCvsroot, + checkoutDir => $dir, + modules => [CvsCatfile('mozilla', 'testing', 'release', + $dir)], + workDir => $verifyDirVersion, + logFile => catfile($logDir, + 'repack_checkout-l10n_verification.log') ); } @@ -102,7 +103,7 @@ sub Verify { '-e', 'ssh', '--include=*.dmg', '--include=*.exe', - '--include=*.tar.gz', + '--include=*.tar'.$linuxExtension, '--exclude=*', $stagingServer . ':/home/ftp/pub/' . $product . '/nightly/' . $version . '-candidates/rc' . $rc . '/*', @@ -121,7 +122,7 @@ sub Verify { '-e', 'ssh', '--include=*.dmg', '--include=*.exe', - '--include=*.tar.gz', + '--include=*.tar'.$linuxExtension, '--exclude=*', $stagingServer . ':/home/ftp/pub/' . $product . '/nightly/' . $oldVersion . '-candidates/rc' diff --git a/tools/release/Bootstrap/Step/Source.pm b/tools/release/Bootstrap/Step/Source.pm index 01bcbe5255f3..a3dc42a9c13c 100644 --- a/tools/release/Bootstrap/Step/Source.pm +++ b/tools/release/Bootstrap/Step/Source.pm @@ -33,15 +33,14 @@ sub Execute { or die("Cannot create $stageDir: $!"); } - $this->Shell( - cmd => 'cvs', - cmdArgs => ['-d', $mozillaCvsroot, - 'co', '-r', $productTag . '_RELEASE', - 'mozilla/client.mk', catfile('mozilla', $appName, 'config')], - dir => $stageDir, - logFile => catfile($logDir, 'source.log'), + $this->CvsCo(cvsroot => $mozillaCvsroot, + tag => $productTag . '_RELEASE', + modules => ['mozilla/client.mk', + catfile('mozilla', $appName, 'config')], + workDir => $stageDir, + logFile => catfile($logDir, 'source.log') ); - + $this->Shell( cmd => 'make', cmdArgs => ['-f', 'client.mk', 'checkout', diff --git a/tools/release/Bootstrap/Step/Stage.pm b/tools/release/Bootstrap/Step/Stage.pm index 0f5ef8003558..257601b501e7 100644 --- a/tools/release/Bootstrap/Step/Stage.pm +++ b/tools/release/Bootstrap/Step/Stage.pm @@ -366,10 +366,15 @@ sub Execute { foreach my $xpiDir (keys(%xpiDirs)) { my $fromDir = catfile($batch1Dir, 'stage-unsigned', $xpiDir); - my $toDir = catfile($batch1Dir, 'stage-unsigned', - $xpiDirs{$xpiDir}, 'xpi'); + my $parentToDir = catfile($batch1Dir, 'stage-unsigned', + $xpiDirs{$xpiDir}); + my $toDir = catfile($parentToDir, 'xpi'); if (-e $fromDir) { + if (! -e $parentToDir) { + MkdirWithPath(dir => $parentToDir) or + die("Cannot create $parentToDir"); + } move($fromDir, $toDir) or die(msg => "Cannot rename $fromDir $toDir: $!"); $this->Log(msg => "Moved $fromDir -> $toDir"); diff --git a/tools/release/Bootstrap/Step/Tag.pm b/tools/release/Bootstrap/Step/Tag.pm index a6e638de3532..d2e06fdb8768 100644 --- a/tools/release/Bootstrap/Step/Tag.pm +++ b/tools/release/Bootstrap/Step/Tag.pm @@ -21,10 +21,10 @@ use strict; our @ISA = qw(Bootstrap::Step); +# Talkback will be appended in Execute() if it is to be used my @TAG_SUB_STEPS = qw( Bump Mozilla l10n - Talkback ); sub Execute { @@ -39,12 +39,19 @@ sub Execute { my $branchTag = $config->Get(var => 'branchTag'); my $pullDate = $config->Get(var => 'pullDate'); my $logDir = $config->Get(sysvar => 'logDir'); + my $useTalkback = $config->Exists(var => 'useTalkback') ? + $config->Get(var => 'useTalkback') : 0; my $releaseTag = $productTag . '_RELEASE'; my $rcTag = $productTag . '_RC' . $rc; my $releaseTagDir = catfile($tagDir, $releaseTag); my $rcTagDir = catfile($tagDir, $rcTag); + # If specified, tag Talkback + if ($useTalkback) { + push(@TAG_SUB_STEPS, 'Talkback'); + } + # create the main tag directory if (not -d $rcTagDir) { MkdirWithPath(dir => $rcTagDir) @@ -66,16 +73,13 @@ sub Execute { my $geckoTag = undef; if (1 == $rc) { - $this->Shell(cmd => 'cvs', - cmdArgs => ['-d', $mozillaCvsroot, - 'co', - '-r', $branchTag, - '-D', $pullDate, - CvsCatfile('mozilla', 'client.mk'), - ], - dir => $cvsrootTagDir, - logFile => catfile($logDir, 'tag_checkout_client_mk.log'), - ); + $this->CvsCo(cvsroot => $mozillaCvsroot, + tag => $branchTag, + date => $pullDate, + modules => [CvsCatfile('mozilla', 'client.mk')], + workDir => $cvsrootTagDir, + logFile => catfile($logDir, 'tag_checkout_client_mk.log') + ); $this->CheckLog(log => catfile($logDir, 'tag_checkout_client_mk.log'), checkForOnly => '^U mozilla/client.mk'); @@ -126,16 +130,13 @@ sub Execute { my $rcOneTag = $productTag . '_RC1'; my $checkoutLog = "tag_rc${rc}_checkout_client_ck.log"; - $this->Shell(cmd => 'cvs', - cmdArgs => ['-d', $mozillaCvsroot, - 'co', - '-r', $branchTag, - '-D', $pullDate, - CvsCatfile('mozilla', 'client.mk')], - dir => $cvsrootTagDir, - logFile => catfile($logDir, $checkoutLog), - ); - + $this->CvsCo(cvsroot => $mozillaCvsroot, + tag => $branchTag, + date => $pullDate, + modules => [CvsCatfile('mozilla', 'client.mk')], + workDir => $cvsrootTagDir, + logFile => catfile($logDir, $checkoutLog) + ); $this->CheckLog(log => catfile($logDir, $checkoutLog), checkForOnly => '^U mozilla/client.mk'); @@ -194,15 +195,12 @@ sub Execute { $geckoTag = $this->GenerateRelbranchName(milestone => $milestone, datespec => $relBranchDateSpec); - $this->Shell(cmd => 'cvs', - cmdArgs => ['-d', $mozillaCvsroot, - 'co', - '-r', $geckoTag, - 'mozilla'], - dir => $cvsrootTagDir, - logFile => catfile($logDir, 'tag_checkout_client_mk.log'), - ); - + $this->CvsCo(cvsroot => $mozillaCvsroot, + tag => $geckoTag, + modules => ['mozilla'], + workDir => $cvsrootTagDir, + logFile => catfile($logDir, 'tag_checkout_client_mk.log') + ); } $config->Set(var => 'geckoBranchTag', value => $geckoTag); @@ -301,15 +299,24 @@ sub GenerateRelbranchName { return $config->Get(var => 'RelbranchOverride'); } - # Convert milestone (1.8.1.x) into "181"; we assume we should always have - # three digits for now (180, 181, 190, etc.) + # Convert milestone (1.8.1.x => 181 or 1.9b1 => 19b1) my $geckoVersion = $args{'milestone'}; - $geckoVersion =~ s/\.//g; - $geckoVersion =~ s/^(\d{3}).*$/$1/; - die "ASSERT: GenerateRelbranchName(): Gecko version should be only " . - "numbers by now" if ($geckoVersion !~ /^\d{3}$/); + # 1.9.0.10 style version numbers (for releases, generally) + if ($geckoVersion =~ m/(\d\.){3,4}/) { + $geckoVersion =~ s/\.//g; + $geckoVersion =~ s/^(\d{3}).*$/$1/; + die "ASSERT: GenerateRelbranchName(): Gecko version should be only " . + "numbers by now" if ($geckoVersion !~ /^\d{3}$/); + } + # 1.9b1 style version numbers (for alpha/betas, generally) + elsif ($geckoVersion =~ m/\d\.\d[ab]\d+/i) { + $geckoVersion =~ s/\.//g; + } + else { + die "ASSERT: GenerateRelbranchName(): Unknown Gecko version format"; + } my $geckoDateSpec = exists($args{'datespec'}) ? $args{'datespec'} : strftime('%Y%m%d', localtime()); diff --git a/tools/release/Bootstrap/Step/Tag/Bump.pm b/tools/release/Bootstrap/Step/Tag/Bump.pm index 0c109f9bcc10..1451c0fa3da2 100644 --- a/tools/release/Bootstrap/Step/Tag/Bump.pm +++ b/tools/release/Bootstrap/Step/Tag/Bump.pm @@ -65,18 +65,15 @@ sub Execute { # Check out Mozilla from the branch you want to tag. # TODO this should support running without branch tag or pull date. - $this->Shell( - cmd => 'cvs', - cmdArgs => ['-d', $mozillaCvsroot, - 'co', - '-r', $geckoBranchTag, - CvsCatfile('mozilla', 'client.mk'), + $this->CvsCo( + cvsroot => $mozillaCvsroot, + tag => $geckoBranchTag, + modules => [CvsCatfile('mozilla', 'client.mk'), CvsCatfile('mozilla', $appName, 'app', 'module.ver'), CvsCatfile('mozilla', $appName, 'config', 'version.txt'), - CvsCatfile('mozilla', 'config', 'milestone.txt'), - ], - dir => $cvsrootTagDir, - logFile => catfile($logDir, 'tag-bump_checkout.log'), + CvsCatfile('mozilla', 'config', 'milestone.txt')], + workDir => $cvsrootTagDir, + logFile => catfile($logDir, 'tag-bump_checkout.log') ); ### Perform version bump @@ -95,7 +92,9 @@ sub Execute { # sure that the order replacement happens does not matter. if ($fileName eq 'client.mk') { %searchReplace = ( - '^MOZ_CO_TAG\s+=\s+' . $branchTag . '$' => + # MOZ_CO_TAG is commented out on some branches, make sure to + # accommodate that + '^#?MOZ_CO_TAG\s+=.+$' => 'MOZ_CO_TAG = ' . $releaseTag, '^NSPR_CO_TAG\s+=\s+\w*' => 'NSPR_CO_TAG = ' . $releaseTag, @@ -142,7 +141,7 @@ sub Execute { close INFILE or die("Could not close $file: $!"); close OUTFILE or die("Coule not close $file.tmp: $!"); if (not $found) { - die("None of " . join(keys(%searchReplace)) . + die("None of " . join(' ', keys(%searchReplace)) . " found in file $file: $!"); } diff --git a/tools/release/Bootstrap/Step/Tag/Talkback.pm b/tools/release/Bootstrap/Step/Tag/Talkback.pm index 6c33baf9ffdb..e4399dcdaca4 100644 --- a/tools/release/Bootstrap/Step/Tag/Talkback.pm +++ b/tools/release/Bootstrap/Step/Tag/Talkback.pm @@ -47,12 +47,13 @@ sub Execute { } # Check out the talkback files from the branch you want to tag. - $this->Shell( - cmd => 'cvs', - cmdArgs => ['-d', $mofoCvsroot, 'co', '-r', $branchTag, '-D', - $pullDate, CvsCatfile('talkback', 'fullsoft')], - dir => catfile($releaseTagDir, 'mofo'), - logFile => catfile($logDir, 'tag-talkback_mofo-checkout.log'), + $this->CvsCo( + cvsroot => $mofoCvsroot, + tag => $branchTag, + date => $pullDate, + modules => [CvsCatfile('talkback', 'fullsoft')], + workDir => catfile($releaseTagDir, 'mofo'), + logFile => catfile($logDir, 'tag-talkback_mofo-checkout.log') ); # Create the talkback RELEASE tag. diff --git a/tools/release/Bootstrap/Step/Tag/l10n.pm b/tools/release/Bootstrap/Step/Tag/l10n.pm index 434cc5d25f64..229a05f17d85 100644 --- a/tools/release/Bootstrap/Step/Tag/l10n.pm +++ b/tools/release/Bootstrap/Step/Tag/l10n.pm @@ -54,30 +54,22 @@ sub Execute { # Config::Set() for us by Step::Tag::Execute() my $geckoTag = $config->Get(var => 'geckoBranchTag'); - # Check out the l10n files from the branch you want to tag. - - my @l10nCheckoutArgs = (1 == $rc) ? - # For rc1, pull by date on the branch - ('-r', $branchTag, '-D', $l10n_pullDate) : - # For rc(N > 1), pull the _RELBRANCH tag and tag that - ('-r', $geckoTag); - for my $locale (sort(keys(%{$localeInfo}))) { # skip en-US; it's kept in the main repo next if ($locale eq 'en-US'); - $this->Shell( - cmd => 'cvs', - cmdArgs => ['-d', $l10nCvsroot, 'co', @l10nCheckoutArgs, - CvsCatfile('l10n', $locale)], - dir => $l10nTagDir, - logFile => catfile($logDir, 'tag-l10n_checkout.log'), - ); + # Make sure to pull from the right tag and/or date for rcN. + $this->CvsCo(cvsroot => $l10nCvsroot, + tag => (1 == $rc) ? $branchTag : $geckoTag, + date => (1 == $rc) ? $l10n_pullDate : 0, + modules => [CvsCatfile('l10n', $locale)], + workDir => $l10nTagDir, + logFile => catfile($logDir, 'tag-l10n_checkout.log')); } my $cwd = getcwd(); chdir(catfile($l10nTagDir, 'l10n')) or - die "chdir() to $releaseTagDir/l10n failed: $!\n"; + die "chdir() to $l10nTagDir/l10n failed: $!\n"; my @topLevelFiles = grep(!/^CVS$/, glob('*')); chdir($cwd) or die "Couldn't chdir() home: $!\n"; diff --git a/tools/release/Bootstrap/Step/TinderConfig.pm b/tools/release/Bootstrap/Step/TinderConfig.pm index 57c0c900bb8c..51c87ad417db 100644 --- a/tools/release/Bootstrap/Step/TinderConfig.pm +++ b/tools/release/Bootstrap/Step/TinderConfig.pm @@ -40,17 +40,26 @@ sub Execute { MkdirWithPath(dir => $productConfigBumpDir) or die("Cannot mkdir $productConfigBumpDir: $!"); - foreach my $branch ($branchTag . '_release', $branchTag . '_l10n_release') { - $this->Shell( - cmd => 'cvs', - cmdArgs => ['-d', $mozillaCvsroot, - 'co', '-d', $branch, - '-r', $branch, - CvsCatfile('mozilla', 'tools', 'tinderbox-configs', - $product, $osname)], - logFile => catfile($logDir, - 'build_config-checkout-' . $branch . '.log'), - dir => $productConfigBumpDir, + my @branches = (); + # tinderbox-configs tags are different on branches vs trunk + # Do the right thing in both cases + if ($branchTag eq 'HEAD') { + push(@branches, ('release', 'l10n_release')); + } + else { + push(@branches, $branchTag . '_release'); + push(@branches, $branchTag . '_l10n_release'); + } + + foreach my $branch (@branches) { + $this->CvsCo(cvsroot => $mozillaCvsroot, + checkoutDir => $branch, + tag => $branch, + modules => [CvsCatfile('mozilla', 'tools', + 'tinderbox-configs', $product, $osname)], + logFile => catfile($logDir, + 'build_config-checkout-' . $branch . '.log'), + workDir => $productConfigBumpDir ); my @bumpConfigFiles = qw(tinder-config.pl mozconfig); @@ -114,9 +123,19 @@ sub Verify { my $config = new Bootstrap::Config(); my $branchTag = $config->Get(var => 'branchTag'); my $logDir = $config->Get(sysvar => 'logDir'); + + my @branches = (); + # tinderbox-configs tags are different on branches vs trunk + # Do the right thing in both cases + if ($branchTag eq 'HEAD') { + push(@branches, ('release', 'l10n_release')); + } + else { + push(@branches, $branchTag . '_release'); + push(@branches, $branchTag . '_l10n_release'); + } - foreach my $branch ($branchTag . '_release', $branchTag . '_l10n_release') { - + foreach my $branch (@branches) { $this->CheckLog( log => catfile($logDir, 'build_config-checkout-' . $branch . '.log'), diff --git a/tools/release/Bootstrap/Step/Updates.pm b/tools/release/Bootstrap/Step/Updates.pm index 3479424a754c..d108a658b8b5 100644 --- a/tools/release/Bootstrap/Step/Updates.pm +++ b/tools/release/Bootstrap/Step/Updates.pm @@ -38,30 +38,30 @@ sub Execute { } # check out patcher - $this->Shell( - cmd => 'cvs', - cmdArgs => ['-d', $mozillaCvsroot, 'co', '-d', 'patcher', - CvsCatfile('mozilla', 'tools', 'patcher')], - logFile => catfile($logDir, 'updates_patcher-checkout.log'), - dir => $versionedUpdateDir, + $this->CvsCo(cvsroot => $mozillaCvsroot, + checkoutDir => 'patcher', + modules => [CvsCatfile('mozilla', 'tools', 'patcher')], + logFile => catfile($logDir, 'updates_patcher-checkout.log'), + workDir => $versionedUpdateDir ); - + # check out utilities - $this->Shell( - cmd => 'cvs', - cmdArgs => ['-d', $mozillaCvsroot, 'co', '-d', 'MozBuild', - CvsCatfile('mozilla', 'tools', 'release', 'MozBuild')], - logFile => catfile($logDir, 'updates_patcher-utils-checkout.log'), - dir => catfile($versionedUpdateDir, 'patcher'), + $this->CvsCo(cvsroot => $mozillaCvsroot, + checkoutDir => 'MozBuild', + modules => [CvsCatfile('mozilla', 'tools', 'release', + 'MozBuild')], + logFile => catfile($logDir, + 'updates_patcher-utils-checkout.log'), + workDir => catfile($versionedUpdateDir, 'patcher') ); - + # config lives in private repo - $this->Shell( - cmd => 'cvs', - cmdArgs => ['-d', $mofoCvsroot, 'co', '-d', 'config', - CvsCatfile('release', 'patcher', $patcherConfig)], - logFile => catfile($logDir, 'updates_patcher-config-checkout.log'), - dir => $versionedUpdateDir, + $this->CvsCo(cvsroot => $mofoCvsroot, + checkoutDir => 'config', + modules => [CvsCatfile('release', 'patcher', $patcherConfig)], + logFile => catfile($logDir, + 'updates_patcher-config-checkout.log'), + workDir => $versionedUpdateDir ); # build tools @@ -139,13 +139,13 @@ sub Verify { or die("Could not mkdir $verifyDirVersion: $!"); foreach my $dir ('updates', 'common') { - $this->Shell( - cmd => 'cvs', - cmdArgs => ['-d', $mozillaCvsroot, 'co', '-d', $dir, - CvsCatfile('mozilla', 'testing', 'release', $dir)], - logFile => catfile($logDir, - 'updates_verify_checkout-' . $dir . '.log'), - dir => $verifyDirVersion, + $this->CvsCo(cvsroot => $mozillaCvsroot, + checkoutDir => $dir, + modules => [CvsCatfile('mozilla', 'testing', 'release', + $dir)], + logFile => catfile($logDir, + 'updates_verify_checkout-' . $dir . '.log'), + workDir => $verifyDirVersion ); } @@ -232,6 +232,13 @@ sub BumpVerifyConfig { my $externalStagingServer = $config->Get(var => 'externalStagingServer'); my $verifyConfig = $config->Get(sysvar => 'verifyConfig'); my $logDir = $config->Get(sysvar => 'logDir'); + # We are assuming tar.bz2 to help minimize bootstrap.cfg variables in + # the future. tar.gz support can probably be removed once we stop + # building/releasing products that use it. + my $useTarGz = $config->Exists(var => 'useTarGz') ? + $config->Get(var => 'useTarGz') : 0; + my $linuxExtension = ($useTarGz) ? '.gz' : '.bz2'; + my $verifyDirVersion = catfile($verifyDir, $product . '-' . $version); my $configFile = catfile($verifyDirVersion, 'updates', $verifyConfig); @@ -253,8 +260,9 @@ sub BumpVerifyConfig { $buildTarget = 'Linux_x86-gcc3'; $platform = 'linux'; $ftpOsname = 'linux-i686'; - $releaseFile = $product.'-'.$oldVersion.'.tar.gz'; - $nightlyFile = $product.'-'.$version.'.%locale%.linux-i686.tar.gz'; + $releaseFile = $product.'-'.$oldVersion.'.tar'.$linuxExtension; + $nightlyFile = $product.'-'.$version.'.%locale%.linux-i686.tar'. + $linuxExtension; } elsif ($osname eq 'macosx') { $buildTarget = 'Darwin_Universal-gcc3'; $platform = 'osx'; diff --git a/tools/release/Bootstrap/Util.pm b/tools/release/Bootstrap/Util.pm index 3bb6c7ab0b50..787edd16545c 100644 --- a/tools/release/Bootstrap/Util.pm +++ b/tools/release/Bootstrap/Util.pm @@ -104,7 +104,8 @@ sub LoadLocaleManifest { my @manifestLines = ; close(MANIFEST); - my @bouncerPlatforms = sort(GetBouncerPlatforms()); + my @bouncerPlatforms = GetBouncerPlatforms(); + @bouncerPlatforms = sort(@bouncerPlatforms); foreach my $line (@manifestLines) { # We create an instance variable so if the caller munges the reference diff --git a/tools/release/configs/fx-moz18-bootstrap.cfg b/tools/release/configs/fx-moz18-bootstrap.cfg index 5a2fb2236522..6f488a2e0090 100644 --- a/tools/release/configs/fx-moz18-bootstrap.cfg +++ b/tools/release/configs/fx-moz18-bootstrap.cfg @@ -72,3 +72,6 @@ bouncerServer = download.mozilla.org # username and server to push builds sshUser = cltbld sshServer = build-console.build.mozilla.org +# force 1.8 specific behavior +useTalkback = 1 +useTarGz = 1 diff --git a/tools/release/configs/fx-moz18-staging-bootstrap.cfg b/tools/release/configs/fx-moz18-staging-bootstrap.cfg index c38a9c292d36..9f5535672077 100644 --- a/tools/release/configs/fx-moz18-staging-bootstrap.cfg +++ b/tools/release/configs/fx-moz18-staging-bootstrap.cfg @@ -71,3 +71,6 @@ bouncerServer = staging-build-console.build..mozilla.org # username and server to push builds sshUser = cltbld sshServer = staging-build-console.build.mozilla.org +# force 1.8 specific behavior +useTalkback = 1 +useTarGz = 1 diff --git a/tools/release/configs/fx-moz180-bootstrap.cfg b/tools/release/configs/fx-moz180-bootstrap.cfg index 933f28411a94..6a13832a21f6 100644 --- a/tools/release/configs/fx-moz180-bootstrap.cfg +++ b/tools/release/configs/fx-moz180-bootstrap.cfg @@ -59,4 +59,6 @@ sshServer = stage.mozilla.org ausUser = cltbld ausServer = aus2-staging.mozilla.org externalAusServer = aus2.mozilla.org - +# force 1.8 specific behavior +useTalkback = 1 +useTarGz = 1 diff --git a/tools/release/configs/tb-moz18-bootstrap.cfg b/tools/release/configs/tb-moz18-bootstrap.cfg index 1a8bbf26ff2a..c95b89efccf3 100644 --- a/tools/release/configs/tb-moz18-bootstrap.cfg +++ b/tools/release/configs/tb-moz18-bootstrap.cfg @@ -66,3 +66,6 @@ bouncerServer = download.mozilla.org # username and server to push builds sshUser = cltbld sshServer = build-console.build.mozilla.org +# force 1.8 specific behavior +useTalkback = 1 +useTarGz = 1 diff --git a/tools/release/configs/tb-moz180-bootstrap.cfg b/tools/release/configs/tb-moz180-bootstrap.cfg index 8031e0b9a23b..0958481c32ed 100644 --- a/tools/release/configs/tb-moz180-bootstrap.cfg +++ b/tools/release/configs/tb-moz180-bootstrap.cfg @@ -58,3 +58,6 @@ sshServer = stage.mozilla.org ausUser = cltbld ausServer = aus2-staging.mozilla.org externalAusServer = aus2.mozilla.org +# force 1.8 specific behavior +useTalkback = 1 +useTarGz = 1