Bug 880371 - Add debian bootstrapping for mach. r=gps
authorKevin Everets <kevin@everets.org>
Thu, 06 Jun 2013 14:14:31 -0400
changeset 146474 37b52a498f434d9ac4a1867a0b577eeeadb62a64
parent 146473 b90fc95d1a5d8a1cc5059401ddce2650a59d002f
child 146475 762073f484eee6e96d0c1ed781fae57129b6f7ad
push id2697
push userbbajaj@mozilla.com
push dateMon, 05 Aug 2013 18:49:53 +0000
treeherdermozilla-beta@dfec938c7b63 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgps
bugs880371
milestone24.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 880371 - Add debian bootstrapping for mach. r=gps Nearly the same as Ubuntu bootstrap, but uses the build dependencies from Debian's "iceweasel" package instead.
python/mozboot/bin/bootstrap.py
python/mozboot/mozboot/bootstrap.py
python/mozboot/mozboot/debian.py
--- a/python/mozboot/bin/bootstrap.py
+++ b/python/mozboot/bin/bootstrap.py
@@ -30,16 +30,17 @@ from optparse import OptionParser
 # available locally.
 REPOSITORY_PATH_PREFIX = 'python/mozboot'
 
 REPOSITORY_PATHS = [
     'mozboot/__init__.py',
     'mozboot/base.py',
     'mozboot/bootstrap.py',
     'mozboot/centos.py',
+    'mozboot/debian.py',
     'mozboot/fedora.py',
     'mozboot/gentoo.py',
     'mozboot/mint.py',
     'mozboot/openbsd.py',
     'mozboot/osx.py',
     'mozboot/ubuntu.py',
 ]
 
--- a/python/mozboot/mozboot/bootstrap.py
+++ b/python/mozboot/mozboot/bootstrap.py
@@ -4,16 +4,17 @@
 
 # If we add unicode_literals, Python 2.6.1 (required for OS X 10.6) breaks.
 from __future__ import print_function
 
 import platform
 import sys
 
 from mozboot.centos import CentOSBootstrapper
+from mozboot.debian import DebianBootstrapper
 from mozboot.fedora import FedoraBootstrapper
 from mozboot.gentoo import GentooBootstrapper
 from mozboot.mint import MintBootstrapper
 from mozboot.osx import OSXBootstrapper
 from mozboot.openbsd import OpenBSDBootstrapper
 from mozboot.ubuntu import UbuntuBootstrapper
 
 
@@ -36,16 +37,18 @@ class Bootstrapper(object):
         cls = None
         args = {}
 
         if sys.platform.startswith('linux'):
             distro, version, dist_id = platform.linux_distribution()
 
             if distro == 'CentOS':
                 cls = CentOSBootstrapper
+            elif distro in ('Debian', 'debian'):
+                cls = DebianBootstrapper
             elif distro == 'Fedora':
                 cls = FedoraBootstrapper
             elif distro == 'Gentoo Base System':
                 cls = GentooBootstrapper
             elif distro in ('Mint', 'LinuxMint'):
                 cls = MintBootstrapper
             elif distro == 'Ubuntu':
                 cls = UbuntuBootstrapper
new file mode 100644
--- /dev/null
+++ b/python/mozboot/mozboot/debian.py
@@ -0,0 +1,29 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this file,
+# You can obtain one at http://mozilla.org/MPL/2.0/.
+
+import os
+
+from mozboot.base import BaseBootstrapper
+
+class DebianBootstrapper(BaseBootstrapper):
+    def __init__(self, version, dist_id):
+        BaseBootstrapper.__init__(self)
+
+        self.version = version
+        self.dist_id = dist_id
+
+    def install_system_packages(self):
+        self.run_as_root(['apt-get', 'build-dep', 'iceweasel'])
+
+        self.apt_install(
+            'autoconf2.13',
+            'libasound2-dev',
+            'libcurl4-openssl-dev',
+            'libiw-dev',
+            'libnotify-dev',
+            'libxt-dev',
+            'mercurial',
+            'mesa-common-dev',
+            'uuid',
+            'yasm')