Skip to content

Commit

Permalink
Bug 1458385: Package mar and mbsdiff as a toolchain; r=glandium
Browse files Browse the repository at this point in the history
Differential Revision: https://phabricator.services.mozilla.com/D24229

--HG--
extra : moz-landing-system : lando
  • Loading branch information
tomprince committed Jul 11, 2019
1 parent b39a761 commit 0cd3337
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 5 deletions.
7 changes: 7 additions & 0 deletions build/sparse-profiles/taskgraph
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,10 @@ 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
2 changes: 1 addition & 1 deletion mfbt/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ UNIFIED_SOURCES += [
'Utf8.cpp',
]

if CONFIG['MOZ_BUILD_APP'] not in ('memory', 'tools/crashreporter'):
if CONFIG['MOZ_BUILD_APP'] not in ('memory', 'tools/crashreporter', 'tools/update-packaging'):
# RecordReplay.cpp uses files from js/
UNIFIED_SOURCES += [
'RecordReplay.cpp',
Expand Down
1 change: 1 addition & 0 deletions other-licenses/bsdiff/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ if CONFIG['HOST_OS_ARCH'] == 'WINNT':

LOCAL_INCLUDES += [
'/toolkit/mozapps/update/updater',
'/toolkit/mozapps/update/updater/bspatch',
]
17 changes: 17 additions & 0 deletions taskcluster/ci/toolchain/misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,23 @@ linux64-libdmg:
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:
Expand Down
31 changes: 31 additions & 0 deletions taskcluster/scripts/misc/build-mar-tools.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/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
6 changes: 2 additions & 4 deletions taskcluster/taskgraph/transforms/repackage.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
],
'inputs': {
'input': 'target{archive_format}',
'mar': 'mar{executable_extension}',
'mar': 'mar-tools/mar{executable_extension}',
},
'output': "target.complete.mar",
},
Expand Down Expand Up @@ -392,9 +392,7 @@ def _generate_download_config(task, build_platform, build_task, signing_task,
'extract': False,
},
],
build_task: [
'host/bin/mar',
],
"toolchain": ["linux64-mar-tools"],
})
elif build_platform.startswith('win'):
fetch.update({
Expand Down
9 changes: 9 additions & 0 deletions tools/update-packaging/app.mozbuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 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',
]
Empty file.

0 comments on commit 0cd3337

Please sign in to comment.