Backed out 4 changesets (bug 1458385) for nightly updates fail. a=backout
authorDaniel Varga <dvarga@mozilla.com>
Wed, 10 Apr 2019 21:09:46 +0300
changeset 468722 127b6975eb0dfd7b308900c9736c5da4b96b76d0
parent 468721 c67c3014b6c891959a12834a471b8e7f7e5db882
child 468809 9d3dbe3fef2671cf9cad2383415d412ddc6a2aa2
push id35849
push userdvarga@mozilla.com
push dateWed, 10 Apr 2019 18:10:43 +0000
treeherdermozilla-central@127b6975eb0d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1458385
milestone68.0a1
backs out09338587b68ec81fce358678fd79c558bc8f5ea8
f7791b680d462524e8b8c7b640ca2f5a4a727c38
cc06a7beb3d14069f406f7846b55d8e2f38e39ed
3b10487587c399057f13465266e1130c609332a9
first release with
nightly linux32
127b6975eb0d / 68.0a1 / 20190410181043 / files
nightly linux64
127b6975eb0d / 68.0a1 / 20190410181043 / files
nightly mac
127b6975eb0d / 68.0a1 / 20190410181043 / files
nightly win32
127b6975eb0d / 68.0a1 / 20190410181043 / files
nightly win64
127b6975eb0d / 68.0a1 / 20190410181043 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out 4 changesets (bug 1458385) for nightly updates fail. a=backout Backed out changeset 09338587b68e (bug 1458385) Backed out changeset f7791b680d46 (bug 1458385) Backed out changeset cc06a7beb3d1 (bug 1458385) Backed out changeset 3b10487587c3 (bug 1458385)
build/sparse-profiles/taskgraph
mfbt/moz.build
other-licenses/bsdiff/moz.build
taskcluster/ci/repackage-l10n/kind.yml
taskcluster/ci/repackage-msi/kind.yml
taskcluster/ci/repackage/kind.yml
taskcluster/ci/toolchain/mingw.yml
taskcluster/ci/toolchain/misc.yml
taskcluster/docker/debian-build/Dockerfile
taskcluster/docker/mingw32-build/Dockerfile
taskcluster/docker/toolchain-build/Dockerfile
taskcluster/scripts/misc/build-mar-tools.sh
taskcluster/scripts/misc/build-upx.sh
taskcluster/taskgraph/transforms/repackage.py
taskcluster/taskgraph/transforms/repackage_partner.py
testing/mozharness/configs/repackage/win32_partner.py
testing/mozharness/configs/repackage/win32_signed.py
testing/mozharness/configs/repackage/win64_partner.py
testing/mozharness/configs/repackage/win64_signed.py
testing/mozharness/scripts/repackage.py
tools/update-packaging/app.mozbuild
tools/update-packaging/moz.configure
--- a/build/sparse-profiles/taskgraph
+++ b/build/sparse-profiles/taskgraph
@@ -51,15 +51,8 @@ path:mobile/android/config/
 glob:**/*.gradle
 
 # for action-task building
 path:.taskcluster.yml
 path:.cron.yml
 
 # for the wrench-deps toolchain task
 path:gfx/wr/Cargo.lock
-
-# for the mar-tools toolchain task
-path:mfbt/
-path:modules/libmar/
-path:other-licenses/bsdiff/
-path:other-licenses/nsis/Contrib/CityHash/cityhash/
-path:toolkit/mozapps/update/updater
--- a/mfbt/moz.build
+++ b/mfbt/moz.build
@@ -150,17 +150,17 @@ UNIFIED_SOURCES += [
     'Poison.cpp',
     'RandomNum.cpp',
     'SHA1.cpp',
     'TaggedAnonymousMemory.cpp',
     'Unused.cpp',
     'Utf8.cpp',
 ]
 
-if CONFIG['MOZ_BUILD_APP'] not in ('memory', 'tools/crashreporter', 'tools/update-packaging'):
+if CONFIG['MOZ_BUILD_APP'] not in ('memory', 'tools/crashreporter'):
     # RecordReplay.cpp uses files from js/
     UNIFIED_SOURCES += [
         'RecordReplay.cpp',
     ]
 
     # Building MFBT tests adds a large overhead when building
     # tools/crashreporter.
     TEST_DIRS += ['tests']
--- a/other-licenses/bsdiff/moz.build
+++ b/other-licenses/bsdiff/moz.build
@@ -13,10 +13,9 @@ HostProgram('mbsdiff')
 if CONFIG['HOST_OS_ARCH'] == 'WINNT':
     HOST_OS_LIBS += [
         'ws2_32',
     ]
     USE_STATIC_LIBS = True
 
 LOCAL_INCLUDES += [
     '/toolkit/mozapps/update/updater',
-    '/toolkit/mozapps/update/updater/bspatch',
 ]
--- a/taskcluster/ci/repackage-l10n/kind.yml
+++ b/taskcluster/ci/repackage-l10n/kind.yml
@@ -32,19 +32,16 @@ only-for-build-platforms:
     - linux-devedition-nightly/opt
     - linux64-devedition-nightly/opt
     - macosx64-devedition-nightly/opt
     - win32-devedition-nightly/opt
     - win64-devedition-nightly/opt
     - win64-aarch64-devedition-nightly/opt
 
 job-template:
-    worker-type: 'aws-provisioner-v1/gecko-{level}-b-linux'
-    worker:
-        docker-image: {"in-tree": "debian7-amd64-build"}
     mozharness:
         config:
             by-build-platform:
                 linux-.*:
                     - repackage/base.py
                     - repackage/linux32_signed.py
                 linux64-.*:
                     - repackage/base.py
@@ -75,12 +72,8 @@ job-template:
                     win64\b.*: [mar, mar-bz2, installer]
             default:
                 by-build-platform:
                     linux.*: [mar]
                     linux4\b.*: [mar]
                     macosx64\b.*: [mar, dmg]
                     win32\b.*: [mar, installer]
                     win64\b.*: [mar, installer]
-    fetches:
-        toolchain:
-            - linux64-mar-tools
-            - linux64-upx
--- a/taskcluster/ci/repackage-msi/kind.yml
+++ b/taskcluster/ci/repackage-msi/kind.yml
@@ -20,20 +20,17 @@ only-for-build-platforms:
     - win32-shippable/opt
     - win32-nightly/opt
     - win64-shippable/opt
     - win64-nightly/opt
     - win32-devedition-nightly/opt
     - win64-devedition-nightly/opt
 
 job-template:
-    worker-type: 'aws-provisioner-v1/gecko-{level}-b-win2012'
     mozharness:
-        use-magic-mh-args: false
-        use-caches: false
         config:
             by-build-platform:
                 win32\b.*:
                     - repackage/base.py
                     - repackage/win32_sfx_stub.py
                     - repackage/win32_signed.py
                 win64(?!-aarch64)\b.*:
                     - repackage/base.py
--- a/taskcluster/ci/repackage/kind.yml
+++ b/taskcluster/ci/repackage/kind.yml
@@ -42,19 +42,16 @@ only-for-build-platforms:
     - win64-aarch64-shippable/opt
     - win64-aarch64-nightly/opt
     - win64-aarch64-devedition-nightly/opt
     - win64/opt
     - win64-pgo/opt
     - win64-asan-reporter-nightly/opt
 
 job-template:
-    worker-type: 'aws-provisioner-v1/gecko-{level}-b-linux'
-    worker:
-        docker-image: {"in-tree": "debian7-amd64-build"}
     mozharness:
         config:
             by-build-platform:
                 linux\b.*:
                     - repackage/base.py
                     - repackage/linux32_signed.py
                 linux64\b.*:
                     - repackage/base.py
@@ -85,12 +82,8 @@ job-template:
                     win64\b.*: [mar, mar-bz2, installer]
             default:
                 by-build-platform:
                     linux.*: [mar]
                     linux4\b.*: [mar]
                     macosx64\b.*: [mar, dmg]
                     win32\b.*: [mar, installer]
                     win64\b.*: [mar, installer]
-    fetches:
-        toolchain:
-            - linux64-mar-tools
-            - linux64-upx
--- a/taskcluster/ci/toolchain/mingw.yml
+++ b/taskcluster/ci/toolchain/mingw.yml
@@ -5,16 +5,24 @@
 job-defaults:
     treeherder:
         tier: 2
     worker-type: aws-provisioner-v1/gecko-{level}-b-linux
     worker:
         docker-image: {in-tree: mingw32-build}
         max-run-time: 3600
 
+linux64-upx:
+    description: "UPX build for MinGW32 Cross Compile"
+    treeherder:
+        symbol: TMW(upx)
+    run:
+        script: build-upx.sh
+        toolchain-artifact: public/build/upx.tar.xz
+
 linux64-wine:
     description: "Wine build for MinGW32 Cross Compile"
     treeherder:
         symbol: TMW(wine)
     worker:
         max-run-time: 10800
     run:
         script: build-wine.sh
--- a/taskcluster/ci/toolchain/misc.yml
+++ b/taskcluster/ci/toolchain/misc.yml
@@ -65,33 +65,16 @@ linux64-hfsplus:
 linux64-libdmg:
     description: "libdmg-hfsplus toolchain build"
     treeherder:
         symbol: TL(libdmg-hfs+)
     run:
         script: build-libdmg-hfsplus.sh
         toolchain-artifact: public/build/dmg.tar.xz
 
-linux64-mar-tools:
-    description: "mar-tools toolchain build"
-    treeherder:
-        symbol: TL(mar-tools)
-    toolchains:
-        - linux64-clang-7
-        - linux64-binutils
-    run:
-        script: build-mar-tools.sh
-        sparse-profile: null
-        toolchain-artifact: public/build/mar-tools.tar.xz
-        resources:
-            - modules/libmar/
-            - other-licenses/nsis/Contrib/CityHash/cityhash/
-            - other-licenses/bsdiff/
-            - toolkit/mozapps/update/updater/bspatch/
-
 linux64-tup:
     description: "tup toolchain build"
     treeherder:
         symbol: TL(tup)
     worker:
         max-run-time: 3600
     run:
         script: build-tup-linux.sh
@@ -99,25 +82,16 @@ linux64-tup:
             - 'taskcluster/scripts/misc/tooltool-download.sh'
         toolchain-artifact: public/build/tup.tar.xz
     run-on-projects:
         - trunk
         - try
     toolchains:
         - linux64-gcc-6
 
-linux64-upx:
-    description: "UPX build"
-    treeherder:
-        symbol: TL(upx)
-        tier: 1
-    run:
-        script: build-upx.sh
-        toolchain-artifact: public/build/upx.tar.xz
-
 linux64-custom-v8:
     description: "Custom v8 build"
     treeherder:
         symbol: TL(custom-v8)
     worker:
         docker-image: {in-tree: custom-v8}
         max-run-time: 3600
     run:
--- a/taskcluster/docker/debian-build/Dockerfile
+++ b/taskcluster/docker/debian-build/Dockerfile
@@ -39,17 +39,16 @@ RUN apt-get update && \
       autoconf2.13 \
       automake \
       bzip2 \
       curl \
       file \
       gawk \
       gcc-multilib \
       gnupg \
-      libucl1 \
       p7zip-full \
       procps \
       python-pip \
       python-setuptools \
       python-virtualenv \
       rsync \
       screen \
       tar \
--- a/taskcluster/docker/mingw32-build/Dockerfile
+++ b/taskcluster/docker/mingw32-build/Dockerfile
@@ -19,17 +19,17 @@ RUN apt-get update && \
       bison \
       bzip2 \
       flex \
       curl \
       file \
       gawk \
       g++-multilib \
       gnupg \
-      libucl1 \
+      libucl-dev \
       patch \
       p7zip-full \
       scons \
       tar \
       unzip \
       uuid \
       wget \
       x11-utils \
--- a/taskcluster/docker/toolchain-build/Dockerfile
+++ b/taskcluster/docker/toolchain-build/Dockerfile
@@ -24,17 +24,16 @@ RUN apt-get update && \
       flex \
       gawk \
       gcc-multilib \
       gnupg \
       libbz2-dev \
       libcurl4-openssl-dev \
       libssl-dev \
       libtool \
-      libucl-dev \
       ninja-build \
       p7zip-full \
       procps \
       python-pip \
       python-setuptools \
       python-virtualenv \
       subversion \
       tar \
deleted file mode 100755
--- a/taskcluster/scripts/misc/build-mar-tools.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-set -x -e -v
-
-# This script is for building mar and mbsdiff
-
-WORKSPACE=$HOME/workspace
-UPLOAD_DIR=$HOME/artifacts
-COMPRESS_EXT=xz
-
-cd $WORKSPACE/build/src
-
-. taskcluster/scripts/misc/tooltool-download.sh
-
-export MOZ_OBJDIR=obj-mar
-
-echo ac_add_options --enable-project=tools/update-packaging > .mozconfig
-
-TOOLCHAINS="binutils clang"
-
-for t in $TOOLCHAINS; do
-    PATH="$WORKSPACE/build/src/$t/bin:$PATH"
-done
-
-./mach build -v
-
-mkdir mar-tools
-cp $MOZ_OBJDIR/dist/host/bin/{mar,mbsdiff} mar-tools/
-
-tar -acf mar-tools.tar.$COMPRESS_EXT mar-tools/
-mkdir -p $UPLOAD_DIR
-cp mar-tools.tar.$COMPRESS_EXT $UPLOAD_DIR
--- a/taskcluster/scripts/misc/build-upx.sh
+++ b/taskcluster/scripts/misc/build-upx.sh
@@ -7,18 +7,17 @@ INSTALL_DIR=$WORKSPACE/upx
 UPLOAD_DIR=$HOME/artifacts
 
 mkdir -p $INSTALL_DIR/bin
 
 cd $WORKSPACE
 
 git clone -n https://github.com/upx/upx.git upx-clone
 cd upx-clone
-# https://github.com/upx/upx/releases/tag/v3.95
-git checkout 7a3637ff5a800b8bcbad20ae7f668d8c8449b014 # Asserts integrity of the clone (right?)
+git checkout d31947e1f016e87f24f88b944439bbee892f0429 # Asserts integrity of the clone (right?)
 git submodule update --init --recursive
 cd src
 make -j$(nproc)
 cp upx.out $INSTALL_DIR/bin/upx
 
 # --------------
 
 cd $WORKSPACE
--- a/taskcluster/taskgraph/transforms/repackage.py
+++ b/taskcluster/taskgraph/transforms/repackage.py
@@ -12,32 +12,29 @@ import copy
 from taskgraph.loader.single_dep import schema
 from taskgraph.transforms.base import TransformSequence
 from taskgraph.util.attributes import copy_attributes_from_dependent_job
 from taskgraph.util.schema import (
     optionally_keyed_by,
     resolve_keyed_by,
 )
 from taskgraph.util.taskcluster import get_artifact_prefix
-from taskgraph.util.platforms import archive_format, architecture
+from taskgraph.util.platforms import archive_format, executable_extension, architecture
 from taskgraph.util.workertypes import worker_type_implementation
 from taskgraph.transforms.job import job_description_schema
-from voluptuous import Required, Optional, Extra
+from voluptuous import Required, Optional
 
 
 packaging_description_schema = schema.extend({
     # depname is used in taskref's to identify the taskID of the signed things
     Required('depname', default='build'): basestring,
 
     # unique label to describe this repackaging task
     Optional('label'): basestring,
 
-    Optional('worker-type'): basestring,
-    Optional('worker'): object,
-
     # treeherder is allowed here to override any defaults we use for repackaging.  See
     # taskcluster/taskgraph/transforms/task.py for the schema details, and the
     # below transforms for defaults of various values.
     Optional('treeherder'): job_description_schema['treeherder'],
 
     # If a l10n task, the corresponding locale
     Optional('locale'): basestring,
 
@@ -54,17 +51,16 @@ packaging_description_schema = schema.ex
     Optional('shipping-product'): job_description_schema['shipping-product'],
     Optional('shipping-phase'): job_description_schema['shipping-phase'],
 
     Required('package-formats'): optionally_keyed_by(
         'build-platform', 'release-type', [basestring]),
 
     # All l10n jobs use mozharness
     Required('mozharness'): {
-        Extra: object,
         # Config files passed to the mozharness script
         Required('config'): optionally_keyed_by('build-platform', [basestring]),
 
         # Additional paths to look for mozharness configs in. These should be
         # relative to the base of the source checkout
         Optional('config-paths'): [basestring],
 
         # if true, perform a checkout of a comm-central based branch inside the
@@ -75,39 +71,39 @@ packaging_description_schema = schema.ex
 
 # The configuration passed to the mozharness repackage script. This defines the
 # arguments passed to `mach repackage`
 # - `args` is interpolated by mozharness (`{package-name}`, `{installer-tag}`,
 #   `{stub-installer-tag}`, `{sfx-stub}`, `{wsx-stub}`, `{fetch-dir}`), with values
 #    from mozharness.
 # - `inputs` are passed as long-options, with the filename prefixed by
 #   `MOZ_FETCH_DIR`. The filename is interpolated by taskgraph
-#   (`{archive_format}`).
+#   (`{archive_format}`, `{executable_extension}`).
 # - `output` is passed to `--output`, with the filename prefixed by the output
 #   directory.
 PACKAGE_FORMATS = {
     'mar': {
         'args': [
             'mar',
             '--arch', '{architecture}',
         ],
         'inputs': {
             'input': 'target{archive_format}',
-            'mar': 'mar-tools/mar',
+            'mar': 'mar{executable_extension}',
         },
         'output': "target.complete.mar",
     },
     'mar-bz2': {
         'args': [
             'mar', "--format", "bz2",
             '--arch', '{architecture}',
         ],
         'inputs': {
             'input': 'target{archive_format}',
-            'mar': 'mar',
+            'mar': 'mar{executable_extension}',
         },
         'output': "target.bz2.complete.mar",
     },
     'msi': {
         'args': ['msi', '--wsx', '{wsx-stub}',
                  '--version', '{version_display}',
                  '--locale', '{_locale}',
                  '--arch', '{architecture}',
@@ -204,16 +200,20 @@ def make_repackage_description(config, j
 def make_job_description(config, jobs):
     for job in jobs:
         dep_job = job['primary-dependency']
         dependencies = {dep_job.attributes.get('kind'): dep_job.label}
         if len(dep_job.dependencies) > 1 and not config.kind == 'repackage-msi':
             # repackage-signing can end up with multiple deps...
             raise NotImplementedError(
                 "Can't repackage a signing task with multiple dependencies")
+        signing_dependencies = dep_job.dependencies
+        # This is so we get the build task in our dependencies to
+        # have better beetmover support.
+        dependencies.update(signing_dependencies)
 
         attributes = copy_attributes_from_dependent_job(dep_job)
         attributes['repackage_type'] = 'repackage'
 
         locale = attributes.get('locale', job.get('locale'))
         if locale:
             attributes['locale'] = locale
 
@@ -225,42 +225,53 @@ def make_job_description(config, jobs):
         dep_th_platform = dep_job.task.get('extra', {}).get('treeherder-platform')
         treeherder.setdefault('platform', dep_th_platform)
         treeherder.setdefault('tier', 1)
         treeherder.setdefault('kind', 'build')
 
         if config.kind == 'repackage-msi':
             treeherder['symbol'] = 'MSI({})'.format(locale or 'N')
 
+        build_task = None
         signing_task = None
         repackage_signing_task = None
         for dependency in dependencies.keys():
             if 'repackage-signing' in dependency:
                 repackage_signing_task = dependency
             elif 'signing' in dependency:
                 signing_task = dependency
+            else:
+                build_task = dependency
 
         _fetch_subst_locale = 'en-US'
         if locale:
+            # XXXCallek: todo: rewrite dependency finding
+            # Use string splice to strip out 'nightly-l10n-' .. '-<chunk>/opt'
+            # We need this additional dependency to support finding the mar binary
+            # Which is needed in order to generate a new complete.mar
+            dependencies['build'] = "build-{}/opt".format(
+                dependencies[build_task][13:dependencies[build_task].rfind('-')])
+            build_task = 'build'
             _fetch_subst_locale = locale
 
-        worker_type = job['worker-type']
+        level = config.params['level']
         build_platform = attributes['build_platform']
 
         use_stub = attributes.get('stub-installer')
 
         repackage_config = []
         package_formats = job.get('package-formats')
         if use_stub and not repackage_signing_task:
             # if repackage_signing_task doesn't exists, generate the stub installer
             package_formats += ['installer-stub']
         for format in package_formats:
             command = copy.deepcopy(PACKAGE_FORMATS[format])
             substs = {
                 'archive_format': archive_format(build_platform),
+                'executable_extension': executable_extension(build_platform),
                 '_locale': _fetch_subst_locale,
                 'architecture': architecture(build_platform),
                 'version_display': config.params['version'],
             }
             # Allow us to replace args a well, but specifying things expanded in mozharness
             # Without breaking .format and without allowing unknown through
             substs.update({name: '{{{}}}'.format(name)
                            for name in MOZHARNESS_EXPANSIONS})
@@ -282,28 +293,42 @@ def make_job_description(config, jobs):
             'job-script': 'taskcluster/scripts/builder/repackage.sh',
             'actions': ['setup', 'repackage'],
             'extra-workspace-cache-key': 'repackage',
             'extra-config': {
                 'repackage_config': repackage_config,
             },
         })
 
-        worker = job.get('worker', {})
-        worker.update({
+        worker = {
             'chain-of-trust': True,
             'max-run-time': 7200 if build_platform.startswith('win') else 3600,
             # Don't add generic artifact directory.
             'skip-artifacts': True,
-        })
+        }
 
         if locale:
             # Make sure we specify the locale-specific upload dir
             worker.setdefault('env', {}).update(LOCALE=locale)
 
+        if build_platform.startswith('win'):
+            worker_type = 'aws-provisioner-v1/gecko-%s-b-win2012' % level
+            run['use-magic-mh-args'] = False
+            run['use-caches'] = False
+        else:
+            if build_platform.startswith(('linux', 'macosx')):
+                worker_type = 'aws-provisioner-v1/gecko-%s-b-linux' % level
+            else:
+                raise NotImplementedError(
+                    'Unsupported build_platform: "{}"'.format(build_platform)
+                )
+
+            run['tooltool-downloads'] = 'internal'
+            worker['docker-image'] = {"in-tree": "debian7-amd64-build"}
+
         worker['artifacts'] = _generate_task_output_files(
             dep_job, worker_type_implementation(config.graph_config, worker_type),
             repackage_config=repackage_config,
             locale=locale,
         )
 
         description = (
             "Repackaging for locale '{locale}' for build '"
@@ -321,34 +346,34 @@ def make_job_description(config, jobs):
             'dependencies': dependencies,
             'attributes': attributes,
             'run-on-projects': dep_job.attributes.get('run_on_projects'),
             'treeherder': treeherder,
             'routes': job.get('routes', []),
             'extra': job.get('extra', {}),
             'worker': worker,
             'run': run,
-            'fetches': _generate_download_config(dep_job, build_platform,
+            'fetches': _generate_download_config(dep_job, build_platform, build_task,
                                                  signing_task, repackage_signing_task,
                                                  locale=locale,
                                                  project=config.params["project"],
                                                  existing_fetch=job.get('fetches')),
             'release-artifacts': [artifact['name'] for artifact in worker['artifacts']]
         }
 
         if build_platform.startswith('macosx'):
             task['toolchains'] = [
                 'linux64-libdmg',
                 'linux64-hfsplus',
                 'linux64-node',
             ]
         yield task
 
 
-def _generate_download_config(task, build_platform, signing_task,
+def _generate_download_config(task, build_platform, build_task, signing_task,
                               repackage_signing_task, locale=None, project=None,
                               existing_fetch=None):
     locale_path = '{}/'.format(locale) if locale else ''
     fetch = {}
     if existing_fetch:
         fetch.update(existing_fetch)
 
     if repackage_signing_task and build_platform.startswith('win'):
@@ -360,26 +385,32 @@ def _generate_download_config(task, buil
     elif build_platform.startswith('linux') or build_platform.startswith('macosx'):
         fetch.update({
             signing_task: [
                 {
                     'artifact': '{}target{}'.format(locale_path, archive_format(build_platform)),
                     'extract': False,
                 },
             ],
+            build_task: [
+                'host/bin/mar',
+            ],
         })
     elif build_platform.startswith('win'):
         fetch.update({
             signing_task: [
                 {
                     'artifact': '{}target.zip'.format(locale_path),
                     'extract': False,
                 },
                 '{}setup.exe'.format(locale_path),
             ],
+            build_task: [
+                'host/bin/mar.exe',
+            ],
         })
 
         use_stub = task.attributes.get('stub-installer')
         if use_stub:
             fetch[signing_task].append('{}setup-stub.exe'.format(locale_path))
 
     if fetch:
         return fetch
--- a/taskcluster/taskgraph/transforms/repackage_partner.py
+++ b/taskcluster/taskgraph/transforms/repackage_partner.py
@@ -162,18 +162,29 @@ def make_job_description(config, jobs):
             'taskcluster-proxy': True if get_artifact_prefix(dep_job) else False,
             'env': {
                 'REPACK_ID': repack_id,
             },
             # Don't add generic artifact directory.
             'skip-artifacts': True,
         }
 
-        worker_type = 'aws-provisioner-v1/gecko-%s-b-linux' % level
-        worker['docker-image'] = {"in-tree": "debian7-amd64-build"}
+        if build_platform.startswith('win'):
+            worker_type = 'aws-provisioner-v1/gecko-%s-b-win2012' % level
+            run['use-magic-mh-args'] = False
+        else:
+            if build_platform.startswith('macosx'):
+                worker_type = 'aws-provisioner-v1/gecko-%s-b-linux' % level
+            else:
+                raise NotImplementedError(
+                    'Unsupported build_platform: "{}"'.format(build_platform)
+                )
+
+            run['tooltool-downloads'] = 'internal'
+            worker['docker-image'] = {"in-tree": "debian7-amd64-build"}
 
         worker['artifacts'] = _generate_task_output_files(
             dep_job, worker_type_implementation(config.graph_config, worker_type),
             repackage_config, partner=repack_id,
         )
 
         description = (
             "Repackaging for repack_id '{repack_id}' for build '"
--- a/testing/mozharness/configs/repackage/win32_partner.py
+++ b/testing/mozharness/configs/repackage/win32_partner.py
@@ -1,14 +1,14 @@
 import os
 
 platform = "win32"
 
 config = {
     "repack_id": os.environ.get("REPACK_ID"),
 
+    # ToolTool
+    "tooltool_manifest_src": 'browser\\config\\tooltool-manifests\\{}\\releng.manifest'.format(platform),
     'tooltool_url': 'https://tooltool.mozilla-releng.net/',
-    'run_configure': False,
+    'tooltool_cache': os.environ.get('TOOLTOOL_CACHE'),
 
-    'env': {
-        'PATH': "%(abs_input_dir)s/upx/bin:%(PATH)s",
-    }
+    'run_configure': False,
 }
--- a/testing/mozharness/configs/repackage/win32_signed.py
+++ b/testing/mozharness/configs/repackage/win32_signed.py
@@ -1,13 +1,14 @@
 import os
 
 platform = "win32"
 
 config = {
     "locale": os.environ.get("LOCALE"),
 
-    'run_configure': False,
+    # ToolTool
+    "tooltool_manifest_src": 'browser\\config\\tooltool-manifests\\{}\\releng.manifest'.format(platform),
+    'tooltool_url': 'https://tooltool.mozilla-releng.net/',
+    'tooltool_cache': os.environ.get('TOOLTOOL_CACHE'),
 
-    'env': {
-        'PATH': "%(abs_input_dir)s/upx/bin:%(PATH)s",
-    }
+    'run_configure': False,
 }
--- a/testing/mozharness/configs/repackage/win64_partner.py
+++ b/testing/mozharness/configs/repackage/win64_partner.py
@@ -1,14 +1,14 @@
 import os
 
 platform = "win64"
 
 config = {
     "repack_id": os.environ.get("REPACK_ID"),
 
+    # ToolTool
+    "tooltool_manifest_src": 'browser\\config\\tooltool-manifests\\{}\\releng.manifest'.format(platform),
     'tooltool_url': 'https://tooltool.mozilla-releng.net/',
-    'run_configure': False,
+    'tooltool_cache': os.environ.get('TOOLTOOL_CACHE'),
 
-    'env': {
-        'PATH': "%(abs_input_dir)s/upx/bin:%(PATH)s",
-    }
+    'run_configure': False,
 }
--- a/testing/mozharness/configs/repackage/win64_signed.py
+++ b/testing/mozharness/configs/repackage/win64_signed.py
@@ -1,13 +1,14 @@
 import os
 
 platform = "win64"
 
 config = {
     "locale": os.environ.get("LOCALE"),
 
-    'run_configure': False,
+    # ToolTool
+    "tooltool_manifest_src": 'browser\\config\\tooltool-manifests\\{}\\releng.manifest'.format(platform),
+    'tooltool_url': 'https://tooltool.mozilla-releng.net/',
+    'tooltool_cache': os.environ.get('TOOLTOOL_CACHE'),
 
-    'env': {
-        'PATH': "%(abs_input_dir)s/upx/bin:%(PATH)s",
-    }
+    'run_configure': False,
 }
--- a/testing/mozharness/scripts/repackage.py
+++ b/testing/mozharness/scripts/repackage.py
@@ -88,17 +88,16 @@ class Repackage(BaseScript):
                 ])
             command.extend([
                 '--output', os.path.join(dirs['abs_output_dir'], repack_config['output']),
             ])
             self.run_command(
                 command=command,
                 cwd=dirs['abs_mozilla_dir'],
                 halt_on_failure=True,
-                env=self.query_env(),
             )
 
     def _run_tooltool(self):
         config = self.config
         dirs = self.query_abs_dirs()
         toolchains = os.environ.get('MOZ_TOOLCHAINS')
         manifest_src = os.environ.get('TOOLTOOL_MANIFEST')
         if not manifest_src:
deleted file mode 100644
--- a/tools/update-packaging/app.mozbuild
+++ /dev/null
@@ -1,9 +0,0 @@
-# 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/.
-
-DIRS += [
-    '/modules/libmar/src',
-    '/modules/libmar/tool',
-    '/other-licenses/bsdiff',
-]
deleted file mode 100644