summaryrefslogtreecommitdiff
path: root/buildscripts/packager.py
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2016-01-12 11:52:40 -0500
committerMark Benvenuto <mark.benvenuto@mongodb.com>2016-01-13 17:00:15 -0500
commit5d3eaacef4f0d019799be993713affcea5e309c0 (patch)
tree70ee9c65bcdc36413b749b9f40f8a4aca892980e /buildscripts/packager.py
parentaf4466d4dd612a7df3e093c9618ce74b59bd75dd (diff)
downloadmongo-5d3eaacef4f0d019799be993713affcea5e309c0.tar.gz
SERVER-22111 packager.py - Add support for ubuntu1504 on ppc64le
Diffstat (limited to 'buildscripts/packager.py')
-rwxr-xr-xbuildscripts/packager.py20
1 files changed, 15 insertions, 5 deletions
diff --git a/buildscripts/packager.py b/buildscripts/packager.py
index d601e8e85ce..27e55f5b8e7 100755
--- a/buildscripts/packager.py
+++ b/buildscripts/packager.py
@@ -42,7 +42,7 @@ import time
import urlparse
# The MongoDB names for the architectures we support.
-DEFAULT_ARCHES=["x86_64"]
+ARCH_CHOICES=["x86_64", "ppc64le"]
# Made up names for the flavors of distribution we package for.
DISTROS=["suse", "debian","redhat","ubuntu", "amazon"]
@@ -133,8 +133,12 @@ class Distro(object):
def archname(self, arch):
if re.search("^(debian|ubuntu)", self.n):
+ if arch == "ppc64le":
+ return "ppc64el"
return "i386" if arch.endswith("86") else "amd64"
elif re.search("^(suse|centos|redhat|fedora|amazon)", self.n):
+ if arch == "ppc64le":
+ return "ppc64le"
return "i686" if arch.endswith("86") else "x86_64"
else:
raise Exception("BUG: unsupported platform?")
@@ -205,6 +209,8 @@ class Distro(object):
return "precise"
elif build_os == 'ubuntu1404':
return "trusty"
+ elif build_os == 'ubuntu1504':
+ return "vivid"
else:
raise Exception("unsupported build_os: %s" % build_os)
elif self.n == 'debian':
@@ -223,10 +229,13 @@ class Distro(object):
else:
raise Exception("BUG: unsupported platform?")
- def build_os(self):
+ def build_os(self, arch):
"""Return the build os label in the binary package to download ("rhel55", "rhel62" and "rhel70"
for redhat, "ubuntu1204" and "ubuntu1404" for Ubuntu, "debian71" for Debian), and "suse11"
for SUSE)"""
+ # Community builds only support amd64
+ if not arch == "x86_64":
+ raise Exception("BUG: unsupported architecture")
if re.search("(suse)", self.n):
return [ "suse11", "suse12" ]
@@ -254,7 +263,8 @@ def get_args(distros):
DISTRO_CHOICES=[]
for distro in distros:
- DISTRO_CHOICES.extend(distro.build_os())
+ for arch in ARCH_CHOICES:
+ DISTRO_CHOICES.extend(distro.build_os(arch))
parser = argparse.ArgumentParser(description='Build MongoDB Packages')
parser.add_argument("-s", "--server-version", help="Server version to build (e.g. 2.7.8-rc0)", required=True)
@@ -262,7 +272,7 @@ def get_args(distros):
parser.add_argument("-r", "--release-number", help="RPM release number base", type=int, required=False)
parser.add_argument("-d", "--distros", help="Distros to build for", choices=DISTRO_CHOICES, required=False, default=[], action='append')
parser.add_argument("-p", "--prefix", help="Directory to build into", required=False)
- parser.add_argument("-a", "--arches", help="Architecture to build", choices=DEFAULT_ARCHES, default=DEFAULT_ARCHES, required=False, action='append')
+ parser.add_argument("-a", "--arches", help="Architecture to build", choices=ARCH_CHOICES, default=[], required=False, action='append')
parser.add_argument("-t", "--tarball", help="Local tarball to package instead of downloading (only valid with one distro/arch combination)", required=False, type=lambda x: is_valid_file(parser, x))
args = parser.parse_args()
@@ -299,7 +309,7 @@ def main(argv):
# accumulate the repository-layout directories.
for (distro, arch) in crossproduct(distros, args.arches):
- for build_os in distro.build_os():
+ for build_os in distro.build_os(arch):
if build_os in args.distros or not args.distros:
if args.tarball: