Merge inbound to mozilla-central a=merge

This commit is contained in:
arthur.iakab 2018-08-25 06:35:21 +03:00
commit 7df3c5baab
39 changed files with 1403 additions and 1459 deletions

View file

@ -307,7 +307,11 @@ HTMLTextFieldAccessible::NativeAttributes()
// Expose type for text input elements as it gives some useful context, // Expose type for text input elements as it gives some useful context,
// especially for mobile. // especially for mobile.
nsAutoString type; nsAutoString type;
if (mContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::type, type)) { // In the case of input[type=number], mContent is anonymous and is an
// input[type=text]. Getting the root not-anonymous content will give
// us the right type. In case of other input types, this returns the same node.
nsIContent* content = mContent->FindFirstNonChromeOnlyAccessContent();
if (content->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::type, type)) {
nsAccUtils::SetAccAttr(attributes, nsGkAtoms::textInputType, type); nsAccUtils::SetAccAttr(attributes, nsGkAtoms::textInputType, type);
if (!ARIARoleMap() && type.EqualsLiteral("search")) { if (!ARIARoleMap() && type.EqualsLiteral("search")) {
nsAccUtils::SetAccAttr(attributes, nsGkAtoms::xmlroles, nsAccUtils::SetAccAttr(attributes, nsGkAtoms::xmlroles,

View file

@ -114,6 +114,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=558036
testAttrs("search", {"text-input-type": "search"}, true); testAttrs("search", {"text-input-type": "search"}, true);
testAttrs("tel", {"text-input-type": "tel"}, true); testAttrs("tel", {"text-input-type": "tel"}, true);
testAttrs("url", {"text-input-type": "url"}, true); testAttrs("url", {"text-input-type": "url"}, true);
testAttrs(getAccessible("number").firstChild, {"text-input-type": "number"}, true);
// ARIA // ARIA
testAttrs("searchbox", {"text-input-type": "search"}, true); testAttrs("searchbox", {"text-input-type": "search"}, true);
@ -220,6 +221,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=558036
<input id="search" type="search"/> <input id="search" type="search"/>
<input id="tel" type="tel"/> <input id="tel" type="tel"/>
<input id="url" type="url"/> <input id="url" type="url"/>
<input id="number" type="number"/>
<div id="searchbox" role="searchbox"></div> <div id="searchbox" role="searchbox"></div>
<!-- html --> <!-- html -->

View file

@ -553,7 +553,8 @@
for (let i = numPinned - 1; i >= 0; i--) { for (let i = numPinned - 1; i >= 0; i--) {
let tab = this.children[i]; let tab = this.children[i];
width += layoutData.pinnedTabWidth; width += layoutData.pinnedTabWidth;
tab.style.marginInlineStart = -(width + layoutData.scrollButtonWidth) + "px"; tab.style.setProperty("margin-inline-start",
-(width + layoutData.scrollButtonWidth) + "px", "important");
tab._pinnedUnscrollable = true; tab._pinnedUnscrollable = true;
} }
this.style.paddingInlineStart = width + "px"; this.style.paddingInlineStart = width + "px";

View file

@ -141,7 +141,7 @@ const CustomizableWidgets = [
if (!elementCount) if (!elementCount)
return; return;
let body = document.createElement("vbox"); let body = document.createXULElement("vbox");
body.className = "panel-subview-body"; body.className = "panel-subview-body";
body.appendChild(fragment); body.appendChild(fragment);
let footer; let footer;

File diff suppressed because it is too large Load diff

View file

@ -6,22 +6,11 @@
/* These styles are intended to mimic XUL trees and the XUL search box. */ /* These styles are intended to mimic XUL trees and the XUL search box. */
html {
background-color: -moz-Field;
color: -moz-FieldText;
box-sizing: border-box;
}
.item {
padding-inline-end: 0;
}
.item-title { .item-title {
margin: 1px 0 0; margin: 1px 0 0;
margin-inline-end: 6px; margin-inline-end: 6px;
} }
.search-box { .search-box {
-moz-appearance: textfield; -moz-appearance: textfield;
cursor: text; cursor: text;

View file

@ -11,10 +11,6 @@
-moz-font-smoothing-background-color: -moz-mac-source-list; -moz-font-smoothing-background-color: -moz-mac-source-list;
} }
.item {
color: -moz-DialogText;
}
.item-title-container { .item-title-container {
box-sizing: border-box; box-sizing: border-box;
align-items: center; align-items: center;
@ -22,11 +18,6 @@
font-size: 12px; font-size: 12px;
} }
.item.selected > .item-title-container {
color: HighlightText;
font-weight: bold;
}
.item.selected > .item-title-container { .item.selected > .item-title-container {
-moz-appearance: -moz-mac-source-list-selection; -moz-appearance: -moz-mac-source-list-selection;
-moz-font-smoothing-background-color: -moz-mac-source-list-selection; -moz-font-smoothing-background-color: -moz-mac-source-list-selection;
@ -37,14 +28,10 @@
-moz-font-smoothing-background-color: -moz-mac-active-source-list-selection; -moz-font-smoothing-background-color: -moz-mac-active-source-list-selection;
} }
@media (-moz-mac-yosemite-theme) { @media (-moz-mac-yosemite-theme: 0) {
.item.selected > .item-title-container { .item.selected > .item-title-container {
color: -moz-dialogtext;
font-weight: 500;
}
.item.selected:focus > .item-title-container {
color: #fff; color: #fff;
font-weight: bold;
} }
} }

View file

@ -6,13 +6,15 @@
html { html {
height: 100%; height: 100%;
box-sizing: border-box;
} }
body { body {
height: 100%; height: 100%;
margin: 0; margin: 0;
font: message-box; font: message-box;
color: #333333; background-color: -moz-Field;
color: -moz-FieldText;
-moz-user-select: none; -moz-user-select: none;
} }

View file

@ -70,8 +70,8 @@
background-color: transparent; background-color: transparent;
border-radius: 0; border-radius: 0;
border-width: 0; border-width: 0;
margin: 0; margin: 0 !important /* override tabbox.css */;
padding: 0; padding: 0 !important /* override tabbox.css */;
-moz-box-align: stretch; -moz-box-align: stretch;
} }

View file

@ -6,15 +6,8 @@
/* These styles are intended to mimic XUL trees and the XUL search box. */ /* These styles are intended to mimic XUL trees and the XUL search box. */
.item {
padding-inline-end: 0;
}
.item-title { .item-title {
margin: 1px 0 0; margin: 1px 0 0;
}
.item-title {
margin-inline-end: 6px; margin-inline-end: 6px;
} }

View file

@ -21,6 +21,7 @@
#include "mozilla/CheckedInt.h" #include "mozilla/CheckedInt.h"
#include "mozilla/EnumeratedRange.h" #include "mozilla/EnumeratedRange.h"
#include "mozilla/SHA1.h" #include "mozilla/SHA1.h"
#include "mozilla/Unused.h"
#include <algorithm> #include <algorithm>
#include <thread> #include <thread>
@ -39,6 +40,7 @@ using namespace js::wasm;
using mozilla::CheckedInt; using mozilla::CheckedInt;
using mozilla::MakeEnumeratedRange; using mozilla::MakeEnumeratedRange;
using mozilla::Unused;
bool bool
CompiledCode::swap(MacroAssembler& masm) CompiledCode::swap(MacroAssembler& masm)
@ -200,24 +202,22 @@ ModuleGenerator::init(Metadata* maybeAsmJSMetadata)
// Pre-reserve space for large Vectors to avoid the significant cost of the // Pre-reserve space for large Vectors to avoid the significant cost of the
// final reallocs. In particular, the MacroAssembler can be enormous, so be // final reallocs. In particular, the MacroAssembler can be enormous, so be
// extra conservative. Note, podResizeToFit calls at the end will trim off // extra conservative. Since large over-reservations may fail when the
// unneeded capacity. // actual allocations will succeed, ignore OOM failures. Note,
// podResizeToFit calls at the end will trim off unneeded capacity.
size_t codeSectionSize = env_->codeSection ? env_->codeSection->size : 0; size_t codeSectionSize = env_->codeSection ? env_->codeSection->size : 0;
size_t estimatedCodeSize = 1.2 * EstimateCompiledCodeSize(tier(), codeSectionSize);
if (!masm_.reserve(Min(estimatedCodeSize, MaxCodeBytesPerProcess)))
return false;
if (!metadataTier_->codeRanges.reserve(2 * env_->numFuncDefs())) size_t estimatedCodeSize = 1.2 * EstimateCompiledCodeSize(tier(), codeSectionSize);
return false; Unused << masm_.reserve(Min(estimatedCodeSize, MaxCodeBytesPerProcess));
Unused << metadataTier_->codeRanges.reserve(2 * env_->numFuncDefs());
const size_t ByteCodesPerCallSite = 50; const size_t ByteCodesPerCallSite = 50;
if (!metadataTier_->callSites.reserve(codeSectionSize / ByteCodesPerCallSite)) Unused << metadataTier_->callSites.reserve(codeSectionSize / ByteCodesPerCallSite);
return false;
const size_t ByteCodesPerOOBTrap = 10; const size_t ByteCodesPerOOBTrap = 10;
if (!metadataTier_->trapSites[Trap::OutOfBounds].reserve(codeSectionSize / ByteCodesPerOOBTrap)) Unused << metadataTier_->trapSites[Trap::OutOfBounds].reserve(codeSectionSize / ByteCodesPerOOBTrap);
return false;
// Allocate space in TlsData for declarations that need it. // Allocate space in TlsData for declarations that need it.

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<tabbox id="tab"> <tabbox id="tab">
<tabs> <tabs>

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" class="reftest-wait"> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" class="reftest-wait">
<tabbox id="tab"> <tabbox id="tab">
<tabs> <tabs>

View file

@ -253,6 +253,9 @@ FilePicker.prototype = {
QueryInterface: ChromeUtils.generateQI([Ci.nsISimpleEnumerator]), QueryInterface: ChromeUtils.generateQI([Ci.nsISimpleEnumerator]),
mFiles: files, mFiles: files,
mIndex: 0, mIndex: 0,
[Symbol.iterator]() {
return this.mFiles.values();
},
hasMoreElements: function() { hasMoreElements: function() {
return (this.mIndex < this.mFiles.length); return (this.mIndex < this.mFiles.length);
}, },

View file

@ -873,6 +873,14 @@ FilePickerDelegate.prototype = {
QueryInterface: ChromeUtils.generateQI([Ci.nsISimpleEnumerator]), QueryInterface: ChromeUtils.generateQI([Ci.nsISimpleEnumerator]),
_owner: this, _owner: this,
_index: 0, _index: 0,
* [Symbol.iterator]() {
for (let file of this._owner._files) {
if (aDOMFile) {
yield this._owner._getDOMFile(file);
}
yield new FileUtils.File(file);
}
},
hasMoreElements: function() { hasMoreElements: function() {
return this._index < this._owner._files.length; return this._index < this._owner._files.length;
}, },

View file

@ -74,8 +74,10 @@ mochitest-harness:
fetches: fetches:
build: build:
- target.tar.bz2 - target.tar.bz2
- target.common.tests.tar.gz>tests - artifact: target.common.tests.tar.gz
- target.mochitest.tests.tar.gz>tests dest: tests
- artifact: target.mochitest.tests.tar.gz
dest: tests
when: when:
files-changed: files-changed:
- 'testing/mochitest/**' - 'testing/mochitest/**'
@ -187,8 +189,10 @@ reftest-harness:
fetches: fetches:
build: build:
- target.tar.bz2 - target.tar.bz2
- target.common.tests.tar.gz>tests - artifact: target.common.tests.tar.gz
- target.reftest.tests.tar.gz>tests dest: tests
- artifact: target.reftest.tests.tar.gz
dest: tests
when: when:
files-changed: files-changed:
- 'layout/tools/reftest/**' - 'layout/tools/reftest/**'

View file

@ -8,6 +8,7 @@ import bz2
import concurrent.futures import concurrent.futures
import gzip import gzip
import hashlib import hashlib
import json
import lzma import lzma
import multiprocessing import multiprocessing
import os import os
@ -24,8 +25,10 @@ except ImportError:
zstandard = None zstandard = None
ARTIFACT_URL = ('https://queue.taskcluster.net/v1/task/{task}/artifacts/' PUBLIC_ARTIFACT_URL = ('https://queue.taskcluster.net/v1/task/{task}/artifacts/'
'{artifact}') '{artifact}')
PRIVATE_ARTIFACT_URL = ('https://taskcluster/queue/v1/task/{task}/artifacts/'
'{artifact}')
CONCURRENCY = multiprocessing.cpu_count() CONCURRENCY = multiprocessing.cpu_count()
@ -59,6 +62,9 @@ def stream_download(url, sha256=None, size=None):
t0 = time.time() t0 = time.time()
with urllib.request.urlopen(url) as fh: with urllib.request.urlopen(url) as fh:
if not url.endswith('.gz') and fh.info().get('Content-Encoding') == 'gzip':
fh = gzip.GzipFile(fileobj=fh)
while True: while True:
chunk = fh.read(65536) chunk = fh.read(65536)
if not chunk: if not chunk:
@ -217,7 +223,7 @@ def extract_archive(path, dest_dir, typ):
log('%s extracted in %.3fs' % (path, time.time() - t0)) log('%s extracted in %.3fs' % (path, time.time() - t0))
def fetch_and_extract(url, dest_dir, sha256=None, size=None): def fetch_and_extract(url, dest_dir, extract=True, sha256=None, size=None):
"""Fetch a URL and extract it to a destination path. """Fetch a URL and extract it to a destination path.
If the downloaded URL is an archive, it is extracted automatically If the downloaded URL is an archive, it is extracted automatically
@ -230,6 +236,9 @@ def fetch_and_extract(url, dest_dir, sha256=None, size=None):
download_to_path(url, dest_path, sha256=sha256, size=size) download_to_path(url, dest_path, sha256=sha256, size=size)
if not extract:
return
typ = archive_type(dest_path) typ = archive_type(dest_path)
if typ: if typ:
extract_archive(dest_path, dest_dir, typ) extract_archive(dest_path, dest_dir, typ)
@ -280,20 +289,20 @@ def command_static_url(args):
def command_task_artifacts(args): def command_task_artifacts(args):
fetches = json.loads(os.environ['MOZ_FETCHES'])
downloads = [] downloads = []
for word in args.artifacts: for fetch in fetches:
# Format is name[>dest]@task
artifact, task_id = word.split('@', 1)
extdir = pathlib.Path(args.dest) extdir = pathlib.Path(args.dest)
if 'dest' in fetch:
if '>' in artifact: extdir = extdir.joinpath(fetch['dest'])
artifact, subdir = artifact.rsplit('>', 1)
extdir = extdir.joinpath(subdir)
extdir.mkdir(parents=True, exist_ok=True) extdir.mkdir(parents=True, exist_ok=True)
url = ARTIFACT_URL.format(task=task_id, if fetch['artifact'].startswith('public/'):
artifact=artifact) url = PUBLIC_ARTIFACT_URL.format(task=fetch['task'],
downloads.append((url, extdir)) artifact=fetch['artifact'])
else:
url = PRIVATE_ARTIFACT_URL.format(task=fetch['task'],
artifact=fetch['artifact'])
downloads.append((url, extdir, fetch['extract']))
fetch_urls(downloads) fetch_urls(downloads)
@ -322,8 +331,6 @@ def main():
artifacts.add_argument('-d', '--dest', default=os.environ.get('MOZ_FETCHES_DIR'), artifacts.add_argument('-d', '--dest', default=os.environ.get('MOZ_FETCHES_DIR'),
help='Destination directory which will contain all ' help='Destination directory which will contain all '
'artifacts (defaults to $MOZ_FETCHES_DIR)') 'artifacts (defaults to $MOZ_FETCHES_DIR)')
artifacts.add_argument('artifacts', nargs='+',
help='Artifacts to fetch. Of form path@task_id')
args = parser.parse_args() args = parser.parse_args()

View file

@ -480,7 +480,7 @@ def vcs_checkout(source_repo, dest, store_path,
return revision return revision
def fetch_artifacts(fetches): def fetch_artifacts():
print_line(b'fetches', b'fetching artifacts\n') print_line(b'fetches', b'fetching artifacts\n')
fetch_content = shutil.which('fetch-content') fetch_content = shutil.which('fetch-content')
@ -492,7 +492,7 @@ def fetch_artifacts(fetches):
print(FETCH_CONTENT_NOT_FOUND) print(FETCH_CONTENT_NOT_FOUND)
sys.exit(1) sys.exit(1)
cmd = [fetch_content, 'task-artifacts'] + fetches.split() cmd = [fetch_content, 'task-artifacts']
subprocess.run(cmd, check=True, env=os.environ) subprocess.run(cmd, check=True, env=os.environ)
print_line(b'fetches', b'finished fetching artifacts\n') print_line(b'fetches', b'finished fetching artifacts\n')
@ -738,9 +738,8 @@ def main(args):
return 1 return 1
try: try:
fetches = os.environ.get('MOZ_FETCHES') if 'MOZ_FETCHES' in os.environ:
if fetches: fetch_artifacts()
fetch_artifacts(fetches)
return run_and_prefix_output(b'task', task_args) return run_and_prefix_output(b'task', task_args)
finally: finally:

View file

@ -13,6 +13,7 @@ from __future__ import absolute_import, print_function, unicode_literals
import copy import copy
import logging import logging
import json
import os import os
from taskgraph.transforms.base import TransformSequence from taskgraph.transforms.base import TransformSequence
@ -80,7 +81,11 @@ job_description_schema = Schema({
# A list of artifacts to install from 'fetch' tasks. # A list of artifacts to install from 'fetch' tasks.
Optional('fetches'): { Optional('fetches'): {
basestring: [basestring], basestring: [basestring, {
Required('artifact'): basestring,
Optional('dest'): basestring,
Optional('extract'): bool,
}],
}, },
# A description of how to run this job. # A description of how to run this job.
@ -182,22 +187,46 @@ def use_fetches(config, jobs):
dep = 'fetch-{}'.format(fetch) dep = 'fetch-{}'.format(fetch)
dependencies[dep] = dep dependencies[dep] = dep
job_fetches.append('{path}@<{dep}>'.format(path=path, dep=dep)) job_fetches.append({
'artifact': path,
'task': '<{dep}>'.format(dep=dep),
'extract': True,
})
else: else:
if kind not in dependencies: if kind not in dependencies:
raise Exception("{name} can't fetch {kind} artifacts because " raise Exception("{name} can't fetch {kind} artifacts because "
"it has no {kind} dependencies!".format(name=name, kind=kind)) "it has no {kind} dependencies!".format(name=name, kind=kind))
for path in artifacts: for artifact in artifacts:
job_fetches.append('{prefix}/{path}@<{dep}>'.format( if isinstance(artifact, basestring):
prefix=prefix, path=path, dep=kind)) path = artifact
dest = None
extract = True
else:
path = artifact['artifact']
dest = artifact.get('dest')
extract = artifact.get('extract', True)
fetch = {
'artifact': '{prefix}/{path}'.format(prefix=prefix, path=path),
'task': '<{dep}>'.format(dep=kind),
'extract': extract,
}
if dest is not None:
fetch['dest'] = dest
job_fetches.append(fetch)
env = job.setdefault('worker', {}).setdefault('env', {}) env = job.setdefault('worker', {}).setdefault('env', {})
env['MOZ_FETCHES'] = {'task-reference': ' '.join(job_fetches)} env['MOZ_FETCHES'] = {'task-reference': json.dumps(job_fetches, sort_keys=True)}
impl, os = worker_type_implementation(job['worker-type'])
if os == 'windows':
env.setdefault('MOZ_FETCHES_DIR', 'fetches')
else:
workdir = job['run'].get('workdir', '/builds/worker')
env.setdefault('MOZ_FETCHES_DIR', '{}/fetches'.format(workdir))
workdir = job['run'].get('workdir', '/builds/worker')
env.setdefault('MOZ_FETCHES_DIR', '{}/fetches'.format(workdir))
yield job yield job

View file

@ -312,6 +312,16 @@ def mozharness_on_generic_worker(config, job, taskdesc):
head_rev=env['COMM_HEAD_REV'], head_rev=env['COMM_HEAD_REV'],
path=r'.\build\src\comm')) path=r'.\build\src\comm'))
fetch_commands = []
if 'MOZ_FETCHES' in env:
# When Bug 1436037 is fixed, run-task can be used for this task,
# and this call can go away
fetch_commands.append(' '.join([
r'c:\mozilla-build\python3\python3.exe',
r'build\src\taskcluster\scripts\misc\fetch-content',
'task-artifacts',
]))
worker['command'] = [] worker['command'] = []
if taskdesc.get('needs-sccache'): if taskdesc.get('needs-sccache'):
worker['command'].extend([ worker['command'].extend([
@ -329,6 +339,7 @@ def mozharness_on_generic_worker(config, job, taskdesc):
]) ])
worker['command'].extend(hg_commands) worker['command'].extend(hg_commands)
worker['command'].extend(fetch_commands)
worker['command'].extend([ worker['command'].extend([
' '.join(mh_command) ' '.join(mh_command)
]) ])

View file

@ -17,7 +17,7 @@ from taskgraph.util.schema import (
resolve_keyed_by, resolve_keyed_by,
Schema, Schema,
) )
from taskgraph.util.taskcluster import get_taskcluster_artifact_prefix, get_artifact_prefix from taskgraph.util.taskcluster import get_artifact_prefix
from taskgraph.transforms.task import task_description_schema from taskgraph.transforms.task import task_description_schema
from voluptuous import Any, Required, Optional from voluptuous import Any, Required, Optional
@ -165,8 +165,6 @@ def make_job_description(config, jobs):
dependencies['build'] = "build-{}/opt".format( dependencies['build'] = "build-{}/opt".format(
dependencies[build_task][13:dependencies[build_task].rfind('-')]) dependencies[build_task][13:dependencies[build_task].rfind('-')])
build_task = 'build' build_task = 'build'
signing_task_ref = "<{}>".format(signing_task)
build_task_ref = "<{}>".format(build_task)
attributes = copy_attributes_from_dependent_job(dep_job) attributes = copy_attributes_from_dependent_job(dep_job)
attributes['repackage_type'] = 'repackage' attributes['repackage_type'] = 'repackage'
@ -184,24 +182,27 @@ def make_job_description(config, jobs):
'using': 'mozharness', 'using': 'mozharness',
'script': 'mozharness/scripts/repackage.py', 'script': 'mozharness/scripts/repackage.py',
'job-script': 'taskcluster/scripts/builder/repackage.sh', 'job-script': 'taskcluster/scripts/builder/repackage.sh',
'actions': ['download_input', 'setup', 'repackage'], 'actions': ['setup', 'repackage'],
'extra-workspace-cache-key': 'repackage', 'extra-workspace-cache-key': 'repackage',
}) })
worker = { worker = {
'env': _generate_task_env(dep_job, build_platform, build_task_ref,
signing_task_ref, locale=locale,
project=config.params["project"]),
'artifacts': _generate_task_output_files(dep_job, build_platform, 'artifacts': _generate_task_output_files(dep_job, build_platform,
locale=locale, locale=locale,
project=config.params["project"]), project=config.params["project"]),
'chain-of-trust': True, 'chain-of-trust': True,
'max-run-time': 7200 if build_platform.startswith('win') else 3600, 'max-run-time': 7200 if build_platform.startswith('win') else 3600,
# Don't add generic artifact directory.
'skip-artifacts': True,
} }
if locale: if locale:
# Make sure we specify the locale-specific upload dir # Make sure we specify the locale-specific upload dir
worker['env'].update(LOCALE=locale) worker.setdefault('env', {}).update(LOCALE=locale)
use_stub = attributes.get('stub-installer')
if not use_stub:
worker.setdefault('env', {})['NO_STUB_INSTALLER'] = '1'
if build_platform.startswith('win'): if build_platform.startswith('win'):
worker_type = 'aws-provisioner-v1/gecko-%s-b-win2012' % level worker_type = 'aws-provisioner-v1/gecko-%s-b-win2012' % level
@ -238,6 +239,9 @@ def make_job_description(config, jobs):
'extra': job.get('extra', {}), 'extra': job.get('extra', {}),
'worker': worker, 'worker': worker,
'run': run, 'run': run,
'fetches': _generate_download_config(dep_job, build_platform, build_task,
signing_task, locale=locale,
project=config.params["project"]),
} }
if build_platform.startswith('macosx'): if build_platform.startswith('macosx'):
@ -249,38 +253,42 @@ def make_job_description(config, jobs):
yield task yield task
def _generate_task_env(task, build_platform, build_task_ref, signing_task_ref, locale=None, def _generate_download_config(task, build_platform, build_task, signing_task, locale=None,
project=None): project=None):
mar_prefix = get_taskcluster_artifact_prefix( locale_path = '{}/'.format(locale) if locale else ''
task, build_task_ref, postfix='host/bin/', locale=None
)
signed_prefix = get_taskcluster_artifact_prefix(task, signing_task_ref, locale=locale)
if build_platform.startswith('linux') or build_platform.startswith('macosx'): if build_platform.startswith('linux') or build_platform.startswith('macosx'):
tarball_extension = 'bz2' if build_platform.startswith('linux') else 'gz' tarball_extension = 'bz2' if build_platform.startswith('linux') else 'gz'
return { return {
'SIGNED_INPUT': {'task-reference': '{}target.tar.{}'.format( signing_task: [
signed_prefix, tarball_extension {
)}, 'artifact': '{}target.tar.{}'.format(locale_path, tarball_extension),
'UNSIGNED_MAR': {'task-reference': '{}mar'.format(mar_prefix)}, 'extract': False,
},
],
build_task: [
'host/bin/mar',
],
} }
elif build_platform.startswith('win'): elif build_platform.startswith('win'):
task_env = { fetch_config = {
'SIGNED_ZIP': {'task-reference': '{}target.zip'.format(signed_prefix)}, signing_task: [
'SIGNED_SETUP': {'task-reference': '{}setup.exe'.format(signed_prefix)}, {
'UNSIGNED_MAR': {'task-reference': '{}mar.exe'.format(mar_prefix)}, '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') use_stub = task.attributes.get('stub-installer')
if use_stub: if use_stub:
task_env['SIGNED_SETUP_STUB'] = { fetch_config[signing_task].append('{}setup-stub.exe'.format(locale_path))
'task-reference': '{}setup-stub.exe'.format(signed_prefix),
}
elif '32' in build_platform:
# Stub installer is only attempted on win32
task_env['NO_STUB_INSTALLER'] = '1'
return task_env return fetch_config
raise NotImplementedError('Unsupported build_platform: "{}"'.format(build_platform)) raise NotImplementedError('Unsupported build_platform: "{}"'.format(build_platform))
@ -292,7 +300,7 @@ def _generate_task_output_files(task, build_platform, locale=None, project=None)
if build_platform.startswith('linux') or build_platform.startswith('macosx'): if build_platform.startswith('linux') or build_platform.startswith('macosx'):
output_files = [{ output_files = [{
'type': 'file', 'type': 'file',
'path': '/builds/worker/workspace/build/artifacts/{}target.complete.mar' 'path': '/builds/worker/workspace/build/outputs/{}target.complete.mar'
.format(locale_output_path), .format(locale_output_path),
'name': '{}/{}target.complete.mar'.format(artifact_prefix, locale_output_path), 'name': '{}/{}target.complete.mar'.format(artifact_prefix, locale_output_path),
}] }]
@ -300,7 +308,7 @@ def _generate_task_output_files(task, build_platform, locale=None, project=None)
if build_platform.startswith('macosx'): if build_platform.startswith('macosx'):
output_files.append({ output_files.append({
'type': 'file', 'type': 'file',
'path': '/builds/worker/workspace/build/artifacts/{}target.dmg' 'path': '/builds/worker/workspace/build/outputs/{}target.dmg'
.format(locale_output_path), .format(locale_output_path),
'name': '{}/{}target.dmg'.format(artifact_prefix, locale_output_path), 'name': '{}/{}target.dmg'.format(artifact_prefix, locale_output_path),
}) })
@ -308,11 +316,11 @@ def _generate_task_output_files(task, build_platform, locale=None, project=None)
elif build_platform.startswith('win'): elif build_platform.startswith('win'):
output_files = [{ output_files = [{
'type': 'file', 'type': 'file',
'path': '{}/{}target.installer.exe'.format(artifact_prefix, locale_output_path), 'path': 'build/outputs/{}target.installer.exe'.format(locale_output_path),
'name': '{}/{}target.installer.exe'.format(artifact_prefix, locale_output_path), 'name': '{}/{}target.installer.exe'.format(artifact_prefix, locale_output_path),
}, { }, {
'type': 'file', 'type': 'file',
'path': '{}/{}target.complete.mar'.format(artifact_prefix, locale_output_path), 'path': 'build/outputs/{}target.complete.mar'.format(locale_output_path),
'name': '{}/{}target.complete.mar'.format(artifact_prefix, locale_output_path), 'name': '{}/{}target.complete.mar'.format(artifact_prefix, locale_output_path),
}] }]
@ -320,8 +328,8 @@ def _generate_task_output_files(task, build_platform, locale=None, project=None)
if use_stub: if use_stub:
output_files.append({ output_files.append({
'type': 'file', 'type': 'file',
'path': '{}/{}target.stub-installer.exe'.format( 'path': 'build/outputs/{}target.stub-installer.exe'.format(
artifact_prefix, locale_output_path locale_output_path
), ),
'name': '{}/{}target.stub-installer.exe'.format( 'name': '{}/{}target.stub-installer.exe'.format(
artifact_prefix, locale_output_path artifact_prefix, locale_output_path

View file

@ -17,7 +17,7 @@ from taskgraph.util.schema import (
resolve_keyed_by, resolve_keyed_by,
Schema, Schema,
) )
from taskgraph.util.taskcluster import get_taskcluster_artifact_prefix, get_artifact_prefix from taskgraph.util.taskcluster import get_artifact_prefix
from taskgraph.util.partners import check_if_partners_enabled from taskgraph.util.partners import check_if_partners_enabled
from taskgraph.transforms.task import task_description_schema from taskgraph.transforms.task import task_description_schema
from voluptuous import Any, Required, Optional from voluptuous import Any, Required, Optional
@ -142,7 +142,6 @@ def make_job_description(config, jobs):
signing_task = dependency signing_task = dependency
elif build_platform.startswith('win') and dependency.endswith('repack'): elif build_platform.startswith('win') and dependency.endswith('repack'):
signing_task = dependency signing_task = dependency
signing_task_ref = "<{}>".format(signing_task)
attributes['repackage_type'] = 'repackage' attributes['repackage_type'] = 'repackage'
@ -159,12 +158,13 @@ def make_job_description(config, jobs):
}) })
worker = { worker = {
'env': _generate_task_env(build_platform, signing_task, signing_task_ref,
partner=repack_id),
'artifacts': _generate_task_output_files(dep_job, build_platform, partner=repack_id), 'artifacts': _generate_task_output_files(dep_job, build_platform, partner=repack_id),
'chain-of-trust': True, 'chain-of-trust': True,
'max-run-time': 7200 if build_platform.startswith('win') else 3600, 'max-run-time': 7200 if build_platform.startswith('win') else 3600,
'taskcluster-proxy': True if get_artifact_prefix(dep_job) else False, 'taskcluster-proxy': True if get_artifact_prefix(dep_job) else False,
'env': {},
# Don't add generic artifact directory.
'skip-artifacts': True,
} }
worker['env'].update(REPACK_ID=repack_id) worker['env'].update(REPACK_ID=repack_id)
@ -204,6 +204,9 @@ def make_job_description(config, jobs):
'extra': job.get('extra', {}), 'extra': job.get('extra', {}),
'worker': worker, 'worker': worker,
'run': run, 'run': run,
'fetches': _generate_download_config(dep_job, build_platform,
signing_task, partner=repack_id,
project=config.params["project"]),
} }
if build_platform.startswith('macosx'): if build_platform.startswith('macosx'):
@ -215,28 +218,30 @@ def make_job_description(config, jobs):
yield task yield task
def _generate_task_env(build_platform, signing_task, signing_task_ref, partner): def _generate_download_config(task, build_platform, signing_task, partner=None,
# Force private artifacts here, until we can populate our dependency map project=None):
# with actual task definitions rather than labels. locale_path = '{}/'.format(partner) if partner else ''
# (get_taskcluster_artifact_prefix requires the task definition to find
# the artifact_prefix attribute).
signed_prefix = get_taskcluster_artifact_prefix(
signing_task, signing_task_ref, locale=partner, force_private=True
)
signed_prefix = signed_prefix.replace('public/build', 'releng/partner')
if build_platform.startswith('macosx'): if build_platform.startswith('macosx'):
return { return {
'SIGNED_INPUT': {'task-reference': '{}target.tar.gz'.format(signed_prefix)}, signing_task: [
{
'artifact': '{}target.tar.gz'.format(locale_path),
'extract': False,
},
],
} }
elif build_platform.startswith('win'): elif build_platform.startswith('win'):
task_env = { return {
'SIGNED_ZIP': {'task-reference': '{}target.zip'.format(signed_prefix)}, signing_task: [
'SIGNED_SETUP': {'task-reference': '{}setup.exe'.format(signed_prefix)}, {
'artifact': '{}target.zip'.format(locale_path),
'extract': False,
},
'{}setup.exe'.format(locale_path),
],
} }
return task_env
raise NotImplementedError('Unsupported build_platform: "{}"'.format(build_platform)) raise NotImplementedError('Unsupported build_platform: "{}"'.format(build_platform))
@ -251,7 +256,7 @@ def _generate_task_output_files(task, build_platform, partner):
if build_platform.startswith('macosx'): if build_platform.startswith('macosx'):
output_files = [{ output_files = [{
'type': 'file', 'type': 'file',
'path': '/builds/worker/workspace/build/artifacts/{}target.dmg' 'path': '/builds/worker/workspace/build/outputs/{}target.dmg'
.format(partner_output_path), .format(partner_output_path),
'name': '{}/{}target.dmg'.format(artifact_prefix, partner_output_path), 'name': '{}/{}target.dmg'.format(artifact_prefix, partner_output_path),
}] }]
@ -259,7 +264,7 @@ def _generate_task_output_files(task, build_platform, partner):
elif build_platform.startswith('win'): elif build_platform.startswith('win'):
output_files = [{ output_files = [{
'type': 'file', 'type': 'file',
'path': '{}/{}target.installer.exe'.format(artifact_prefix, partner_output_path), 'path': 'build/outputs/{}target.installer.exe'.format(partner_output_path),
'name': '{}/{}target.installer.exe'.format(artifact_prefix, partner_output_path), 'name': '{}/{}target.installer.exe'.format(artifact_prefix, partner_output_path),
}] }]

View file

@ -3,21 +3,13 @@ import os
platform = "linux32" platform = "linux32"
config = { config = {
"input_home": "{abs_work_dir}/inputs",
"output_home": "{abs_work_dir}/artifacts{locale}",
"locale": os.environ.get("LOCALE"), "locale": os.environ.get("LOCALE"),
"download_config": {
"target.tar.gz": os.environ.get("SIGNED_INPUT"),
"mar": os.environ.get("UNSIGNED_MAR"),
},
"repackage_config": [[ "repackage_config": [[
"mar", "mar",
"-i", "{abs_work_dir}/inputs/target.tar.gz", "-i", "{abs_input_dir}/target.tar.bz2",
"--mar", "{abs_work_dir}/inputs/mar", "--mar", "{abs_input_dir}/mar",
"-o", "{output_home}/target.complete.mar" "-o", "{abs_output_dir}/target.complete.mar"
]], ]],
# ToolTool # ToolTool

View file

@ -3,21 +3,13 @@ import os
platform = "linux64" platform = "linux64"
config = { config = {
"input_home": "{abs_work_dir}/inputs",
"output_home": "{abs_work_dir}/artifacts{locale}",
"locale": os.environ.get("LOCALE"), "locale": os.environ.get("LOCALE"),
"download_config": {
"target.tar.gz": os.environ.get("SIGNED_INPUT"),
"mar": os.environ.get("UNSIGNED_MAR"),
},
"repackage_config": [[ "repackage_config": [[
"mar", "mar",
"-i", "{abs_work_dir}/inputs/target.tar.gz", "-i", "{abs_input_dir}/target.tar.bz2",
"--mar", "{abs_work_dir}/inputs/mar", "--mar", "{abs_input_dir}/mar",
"-o", "{output_home}/target.complete.mar" "-o", "{abs_output_dir}/target.complete.mar"
]], ]],
# ToolTool # ToolTool

View file

@ -1,20 +1,14 @@
import os import os
config = { config = {
"input_home": "{abs_work_dir}/inputs",
"output_home": "{abs_work_dir}/artifacts{repack_id}",
"src_mozconfig": "browser/config/mozconfigs/macosx64/repack", "src_mozconfig": "browser/config/mozconfigs/macosx64/repack",
"repack_id": os.environ.get("REPACK_ID"), "repack_id": os.environ.get("REPACK_ID"),
"download_config": {
"target.tar.gz": os.environ.get("SIGNED_INPUT"),
},
"repackage_config": [[ "repackage_config": [[
"dmg", "dmg",
"-i", "{abs_work_dir}/inputs/target.tar.gz", "-i", "{abs_input_dir}/target.tar.gz",
"-o", "{output_home}/target.dmg" "-o", "{abs_output_dir}/target.dmg"
]], ]],
# ToolTool # ToolTool

View file

@ -1,26 +1,19 @@
import os import os
config = { config = {
"input_home": "{abs_work_dir}/inputs",
"output_home": "{abs_work_dir}/artifacts{locale}",
"src_mozconfig": "browser/config/mozconfigs/macosx64/repack", "src_mozconfig": "browser/config/mozconfigs/macosx64/repack",
"locale": os.environ.get("LOCALE"), "locale": os.environ.get("LOCALE"),
"download_config": {
"target.tar.gz": os.environ.get("SIGNED_INPUT"),
"mar": os.environ.get("UNSIGNED_MAR"),
},
"repackage_config": [[ "repackage_config": [[
"dmg", "dmg",
"-i", "{abs_work_dir}/inputs/target.tar.gz", "-i", "{abs_input_dir}/target.tar.gz",
"-o", "{output_home}/target.dmg" "-o", "{abs_output_dir}/target.dmg"
], [ ], [
"mar", "mar",
"-i", "{abs_work_dir}/inputs/target.tar.gz", "-i", "{abs_input_dir}/target.tar.gz",
"--mar", "{abs_work_dir}/inputs/mar", "--mar", "{abs_input_dir}/mar",
"-o", "{output_home}/target.complete.mar" "-o", "{abs_output_dir}/target.complete.mar"
]], ]],
# ToolTool # ToolTool

View file

@ -2,29 +2,19 @@ import os
platform = "win32" platform = "win32"
download_config = {
"target.zip": os.environ.get("SIGNED_ZIP"),
"setup.exe": os.environ.get("SIGNED_SETUP"),
}
repackage_config = [[ repackage_config = [[
"installer", "installer",
"--package-name", "firefox", "--package-name", "firefox",
"--package", "{abs_work_dir}\\inputs\\target.zip", "--package", "{abs_input_dir}\\target.zip",
"--tag", "{abs_mozilla_dir}\\browser\\installer\\windows\\app.tag", "--tag", "{abs_mozilla_dir}\\browser\\installer\\windows\\app.tag",
"--setupexe", "{abs_work_dir}\\inputs\\setup.exe", "--setupexe", "{abs_input_dir}\\setup.exe",
"-o", "{output_home}\\target.installer.exe", "-o", "{abs_output_dir}\\target.installer.exe",
"--sfx-stub", "other-licenses/7zstub/firefox/7zSD.sfx", "--sfx-stub", "other-licenses/7zstub/firefox/7zSD.sfx",
]] ]]
config = { config = {
"input_home": "{abs_work_dir}\\inputs",
"output_home": "{base_work_dir}\\releng\\partner\\{repack_id}",
"repack_id": os.environ.get("REPACK_ID"), "repack_id": os.environ.get("REPACK_ID"),
"download_config": download_config,
"repackage_config": repackage_config, "repackage_config": repackage_config,
# ToolTool # ToolTool

View file

@ -2,32 +2,19 @@ import os
platform = "win32" platform = "win32"
download_config = {
"target.zip": os.environ.get("SIGNED_ZIP"),
"setup.exe": os.environ.get("SIGNED_SETUP"),
"mar.exe": os.environ.get("UNSIGNED_MAR"),
}
if not os.environ.get("NO_STUB_INSTALLER"):
# Some channels, like esr don't build a stub installer
download_config.update({
# stub installer is only built on win32
"setup-stub.exe": os.environ.get("SIGNED_SETUP_STUB"),
})
repackage_config = [[ repackage_config = [[
"installer", "installer",
"--package-name", "firefox", "--package-name", "firefox",
"--package", "{abs_work_dir}\\inputs\\target.zip", "--package", "{abs_input_dir}\\target.zip",
"--tag", "{abs_mozilla_dir}\\browser\\installer\\windows\\app.tag", "--tag", "{abs_mozilla_dir}\\browser\\installer\\windows\\app.tag",
"--setupexe", "{abs_work_dir}\\inputs\\setup.exe", "--setupexe", "{abs_input_dir}\\setup.exe",
"-o", "{output_home}\\target.installer.exe", "-o", "{abs_output_dir}\\target.installer.exe",
"--sfx-stub", "other-licenses/7zstub/firefox/7zSD.sfx", "--sfx-stub", "other-licenses/7zstub/firefox/7zSD.sfx",
], [ ], [
"mar", "mar",
"-i", "{abs_work_dir}\\inputs\\target.zip", "-i", "{abs_input_dir}\\target.zip",
"--mar", "{abs_work_dir}\\inputs\\mar.exe", "--mar", "{abs_input_dir}\\mar.exe",
"-o", "{output_home}\\target.complete.mar", "-o", "{abs_output_dir}\\target.complete.mar",
]] ]]
if not os.environ.get("NO_STUB_INSTALLER"): if not os.environ.get("NO_STUB_INSTALLER"):
@ -35,19 +22,14 @@ if not os.environ.get("NO_STUB_INSTALLER"):
repackage_config.append([ repackage_config.append([
"installer", "installer",
"--tag", "{abs_mozilla_dir}\\browser\\installer\\windows\\stub.tag", "--tag", "{abs_mozilla_dir}\\browser\\installer\\windows\\stub.tag",
"--setupexe", "{abs_work_dir}\\inputs\\setup-stub.exe", "--setupexe", "{abs_input_dir}\\setup-stub.exe",
"-o", "{output_home}\\target.stub-installer.exe", "-o", "{abs_output_dir}\\target.stub-installer.exe",
"--sfx-stub", "other-licenses/7zstub/firefox/7zSD.sfx", "--sfx-stub", "other-licenses/7zstub/firefox/7zSD.sfx",
]) ])
config = { config = {
"input_home": "{abs_work_dir}\\inputs",
"output_home": "{base_work_dir}\\public\\build{locale}",
"locale": os.environ.get("LOCALE"), "locale": os.environ.get("LOCALE"),
"download_config": download_config,
"repackage_config": repackage_config, "repackage_config": repackage_config,
# ToolTool # ToolTool

View file

@ -2,29 +2,19 @@ import os
platform = "win64" platform = "win64"
download_config = {
"target.zip": os.environ.get("SIGNED_ZIP"),
"setup.exe": os.environ.get("SIGNED_SETUP"),
}
repackage_config = [[ repackage_config = [[
"installer", "installer",
"--package-name", "firefox", "--package-name", "firefox",
"--package", "{abs_work_dir}\\inputs\\target.zip", "--package", "{abs_input_dir}\\target.zip",
"--tag", "{abs_mozilla_dir}\\browser\\installer\\windows\\app.tag", "--tag", "{abs_mozilla_dir}\\browser\\installer\\windows\\app.tag",
"--setupexe", "{abs_work_dir}\\inputs\\setup.exe", "--setupexe", "{abs_input_dir}\\setup.exe",
"-o", "{output_home}\\target.installer.exe", "-o", "{abs_output_dir}\\target.installer.exe",
"--sfx-stub", "other-licenses/7zstub/firefox/7zSD.sfx", "--sfx-stub", "other-licenses/7zstub/firefox/7zSD.sfx",
]] ]]
config = { config = {
"input_home": "{abs_work_dir}\\inputs",
"output_home": "{base_work_dir}\\releng\\partner\\{repack_id}",
"repack_id": os.environ.get("REPACK_ID"), "repack_id": os.environ.get("REPACK_ID"),
"download_config": download_config,
"repackage_config": repackage_config, "repackage_config": repackage_config,
# ToolTool # ToolTool

View file

@ -2,35 +2,24 @@ import os
platform = "win64" platform = "win64"
download_config = {
"target.zip": os.environ.get("SIGNED_ZIP"),
"setup.exe": os.environ.get("SIGNED_SETUP"),
"mar.exe": os.environ.get("UNSIGNED_MAR"),
}
repackage_config = [[ repackage_config = [[
"installer", "installer",
"--package-name", "firefox", "--package-name", "firefox",
"--package", "{abs_work_dir}\\inputs\\target.zip", "--package", "{abs_input_dir}\\target.zip",
"--tag", "{abs_mozilla_dir}\\browser\\installer\\windows\\app.tag", "--tag", "{abs_mozilla_dir}\\browser\\installer\\windows\\app.tag",
"--setupexe", "{abs_work_dir}\\inputs\\setup.exe", "--setupexe", "{abs_input_dir}\\setup.exe",
"-o", "{output_home}\\target.installer.exe", "-o", "{abs_output_dir}\\target.installer.exe",
"--sfx-stub", "other-licenses/7zstub/firefox/7zSD.sfx", "--sfx-stub", "other-licenses/7zstub/firefox/7zSD.sfx",
], [ ], [
"mar", "mar",
"-i", "{abs_work_dir}\\inputs\\target.zip", "-i", "{abs_input_dir}\\target.zip",
"--mar", "{abs_work_dir}\\inputs\\mar.exe", "--mar", "{abs_input_dir}\\mar.exe",
"-o", "{output_home}\\target.complete.mar", "-o", "{abs_output_dir}\\target.complete.mar",
]] ]]
config = { config = {
"input_home": "{abs_work_dir}\\inputs",
"output_home": "{base_work_dir}\\public\\build{locale}",
"locale": os.environ.get("LOCALE"), "locale": os.environ.get("LOCALE"),
"download_config": download_config,
"repackage_config": repackage_config, "repackage_config": repackage_config,
# ToolTool # ToolTool

View file

@ -4,6 +4,7 @@
import os import os
from distutils.spawn import find_executable from distutils.spawn import find_executable
import json
import mozfile import mozfile
@ -30,30 +31,31 @@ class FetchesMixin(object):
self.warning('no fetches to download') self.warning('no fetches to download')
return return
fetches = os.environ['MOZ_FETCHES'].split()
if not self.fetch_script or not os.path.isfile(self.fetch_script): if not self.fetch_script or not os.path.isfile(self.fetch_script):
self.warning("fetch-content script not found, downloading manually") self.warning("fetch-content script not found, downloading manually")
self._download_fetches(fetches) self._download_fetches()
return return
cmd = [self.fetch_script, 'task-artifacts'] + fetches cmd = [self.fetch_script, 'task-artifacts']
self.run_command(cmd, env=os.environ, throw_exception=True) self.run_command(cmd, env=os.environ, throw_exception=True)
def _download_fetches(self, fetches): def _download_fetches(self):
# TODO: make sure fetch-content script is available everywhere # TODO: make sure fetch-content script is available everywhere
# so this isn't needed # so this isn't needed
for word in fetches: fetches_dir = os.environ['MOZ_FETCHES_DIR']
artifact, task = word.split('@', 1)
extdir = os.environ['MOZ_FETCHES_DIR']
if '>' in artifact: fetches = json.loads(os.environ.get('MOZ_FETCHES', '{}'))
artifact, subdir = artifact.rsplit('>', 1) for fetch in fetches:
extdir = os.path.join(extdir, subdir) extdir = fetches_dir
if 'dest' in 'fetch':
extdir = os.path.join(extdir, fetch['dest'])
artifact = fetch['artifact']
if not artifact.startswith('public/'):
raise Exception('Private artifacts in `MOZ_FETCHES` not supported.')
url = ARTIFACT_URL.format(artifact=artifact, task=fetch['task'])
url = ARTIFACT_URL.format(artifact=artifact, task=task) path = self.download_file(url, parent_dir=extdir)
self.download_file(url)
filename = os.path.basename(artifact) if fetch['extract']:
mozfile.extract(filename, extdir) mozfile.extract(path, extdir)
os.remove(filename) os.remove(path)

View file

@ -23,25 +23,17 @@ class Repackage(BaseScript):
**script_kwargs **script_kwargs
) )
def download_input(self): def setup(self):
config = self.config
dirs = self.query_abs_dirs() dirs = self.query_abs_dirs()
input_home = config['input_home'].format(**dirs)
for path, url in config["download_config"].items():
status = self.download_file(url=url,
file_name=path,
parent_dir=input_home)
if not status:
self.fatal("Unable to fetch signed input from %s" % url)
if 'mar' in path:
# Ensure mar is executable
self.chmod(os.path.join(input_home, path), 0755)
def setup(self):
self._run_tooltool() self._run_tooltool()
mar_path = os.path.join(dirs['abs_input_dir'], 'mar')
if self._is_windows():
mar_path += '.exe'
if mar_path:
self.chmod(mar_path, 0755)
if self.config.get("run_configure", True): if self.config.get("run_configure", True):
self._get_mozconfig() self._get_mozconfig()
self._run_configure() self._run_configure()
@ -55,17 +47,17 @@ class Repackage(BaseScript):
dirs = {} dirs = {}
dirs['abs_tools_dir'] = os.path.join(abs_dirs['abs_work_dir'], 'tools') dirs['abs_tools_dir'] = os.path.join(abs_dirs['abs_work_dir'], 'tools')
dirs['abs_mozilla_dir'] = os.path.join(abs_dirs['abs_work_dir'], 'src') dirs['abs_mozilla_dir'] = os.path.join(abs_dirs['abs_work_dir'], 'src')
locale_dir = '' dirs['abs_input_dir'] = os.path.join(
if config.get('locale'): abs_dirs['base_work_dir'],
locale_dir = "{}{}".format(os.path.sep, config['locale']) os.environ.get('MOZ_FETCHES_DIR', 'fetches'),
repack_id_dir = ''
if config.get('repack_id'):
repack_id_dir = "{}{}".format(os.path.sep, config['repack_id'])
dirs['output_home'] = config['output_home'].format(
locale=locale_dir,
repack_id=repack_id_dir,
**abs_dirs
) )
output_dir_suffix = []
if config.get('locale'):
output_dir_suffix.append(config['locale'])
if config.get('repack_id'):
output_dir_suffix.append(config['repack_id'])
dirs['abs_output_dir'] = os.path.join(
abs_dirs['abs_work_dir'], 'outputs', *output_dir_suffix)
for key in dirs.keys(): for key in dirs.keys():
if key not in abs_dirs: if key not in abs_dirs:
abs_dirs[key] = dirs[key] abs_dirs[key] = dirs[key]
@ -77,7 +69,7 @@ class Repackage(BaseScript):
dirs = self.query_abs_dirs() dirs = self.query_abs_dirs()
# Make sure the upload dir is around. # Make sure the upload dir is around.
self.mkdir_p(dirs['output_home']) self.mkdir_p(dirs['abs_output_dir'])
for repack_config in config["repackage_config"]: for repack_config in config["repackage_config"]:
command = [sys.executable, 'mach', '--log-no-times', 'repackage'] + \ command = [sys.executable, 'mach', '--log-no-times', 'repackage'] + \

View file

@ -18,5 +18,6 @@
@import url("chrome://global/skin/progressmeter.css"); @import url("chrome://global/skin/progressmeter.css");
@import url("chrome://global/skin/richlistbox.css"); @import url("chrome://global/skin/richlistbox.css");
@import url("chrome://global/skin/splitter.css"); @import url("chrome://global/skin/splitter.css");
@import url("chrome://global/skin/tabbox.css");
@import url("chrome://global/skin/toolbar.css"); @import url("chrome://global/skin/toolbar.css");
@import url("chrome://global/skin/wizard.css"); @import url("chrome://global/skin/wizard.css");

View file

@ -8,12 +8,7 @@
xmlns="http://www.mozilla.org/xbl" xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl"> xmlns:xbl="http://www.mozilla.org/xbl">
<binding id="tabbox"> <binding id="tabbox">
<resources>
<stylesheet src="chrome://global/skin/tabbox.css"/>
</resources>
<implementation> <implementation>
<property name="handleCtrlTab"> <property name="handleCtrlTab">
<setter> <setter>
@ -217,10 +212,6 @@
<binding id="tabs" <binding id="tabs"
extends="chrome://global/content/bindings/general.xml#basecontrol"> extends="chrome://global/content/bindings/general.xml#basecontrol">
<resources>
<stylesheet src="chrome://global/skin/tabbox.css"/>
</resources>
<content> <content>
<xul:spacer class="tabs-left"/> <xul:spacer class="tabs-left"/>
<children/> <children/>
@ -533,10 +524,6 @@
</binding> </binding>
<binding id="tabpanels"> <binding id="tabpanels">
<resources>
<stylesheet src="chrome://global/skin/tabbox.css"/>
</resources>
<implementation implements="nsIDOMXULRelatedElement"> <implementation implements="nsIDOMXULRelatedElement">
<!-- nsIDOMXULRelatedElement --> <!-- nsIDOMXULRelatedElement -->
<method name="getRelatedElement"> <method name="getRelatedElement">
@ -649,10 +636,6 @@
<binding id="tab" display="xul:button" <binding id="tab" display="xul:button"
extends="chrome://global/content/bindings/general.xml#basetext"> extends="chrome://global/content/bindings/general.xml#basetext">
<resources>
<stylesheet src="chrome://global/skin/tabbox.css"/>
</resources>
<content> <content>
<xul:hbox class="tab-middle box-inherit" xbl:inherits="align,dir,pack,orient,selected,visuallyselected" flex="1"> <xul:hbox class="tab-middle box-inherit" xbl:inherits="align,dir,pack,orient,selected,visuallyselected" flex="1">
<xul:image class="tab-icon" <xul:image class="tab-icon"

View file

@ -829,6 +829,10 @@ ArrayEnumerator.prototype = {
_index: 0, _index: 0,
_contents: [], _contents: [],
[Symbol.iterator]() {
return this._contents.values();
},
hasMoreElements: function ArrayEnumerator_hasMoreElements() { hasMoreElements: function ArrayEnumerator_hasMoreElements() {
return this._index < this._contents.length; return this._index < this._contents.length;
}, },

View file

@ -563,9 +563,7 @@ protected:
virtual already_AddRefed<nsIWidget> virtual already_AddRefed<nsIWidget>
AllocateChildPopupWidget() override AllocateChildPopupWidget() override
{ {
static NS_DEFINE_IID(kCPopUpCID, NS_POPUP_CID); return nsIWidget::CreateTopLevelWindow();
nsCOMPtr<nsIWidget> widget = do_CreateInstance(kCPopUpCID);
return widget.forget();
} }
void ConfigureAPZCTreeManager() override; void ConfigureAPZCTreeManager() override;

View file

@ -362,9 +362,7 @@ protected:
virtual already_AddRefed<nsIWidget> virtual already_AddRefed<nsIWidget>
AllocateChildPopupWidget() override AllocateChildPopupWidget() override
{ {
static NS_DEFINE_IID(kCPopUpCID, NS_POPUP_CID); return nsIWidget::CreateTopLevelWindow();
nsCOMPtr<nsIWidget> widget = do_CreateInstance(kCPopUpCID);
return widget.forget();
} }
nsIWidget* mParent; // if we're a popup, this is our parent [WEAK] nsIWidget* mParent; // if we're a popup, this is our parent [WEAK]

View file

@ -12,7 +12,6 @@
#include "nsWidgetsCID.h" #include "nsWidgetsCID.h"
#include "nsChildView.h" #include "nsChildView.h"
#include "nsCocoaWindow.h"
#include "nsAppShell.h" #include "nsAppShell.h"
#include "nsAppShellSingleton.h" #include "nsAppShellSingleton.h"
#include "nsFilePicker.h" #include "nsFilePicker.h"
@ -65,7 +64,6 @@ nsClipboardConstructor(nsISupports *aOuter, REFNSIID aIID,
return inst->QueryInterface(aIID, aResult); return inst->QueryInterface(aIID, aResult);
} }
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCocoaWindow)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFilePicker) NS_GENERIC_FACTORY_CONSTRUCTOR(nsFilePicker)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsColorPicker) NS_GENERIC_FACTORY_CONSTRUCTOR(nsColorPicker)
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSound) NS_GENERIC_FACTORY_CONSTRUCTOR(nsSound)
@ -113,7 +111,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(GfxInfo, Init)
} // namespace widget } // namespace widget
} // namespace mozilla } // namespace mozilla
NS_DEFINE_NAMED_CID(NS_POPUP_CID);
NS_DEFINE_NAMED_CID(NS_FILEPICKER_CID); NS_DEFINE_NAMED_CID(NS_FILEPICKER_CID);
NS_DEFINE_NAMED_CID(NS_COLORPICKER_CID); NS_DEFINE_NAMED_CID(NS_COLORPICKER_CID);
NS_DEFINE_NAMED_CID(NS_APPSHELL_CID); NS_DEFINE_NAMED_CID(NS_APPSHELL_CID);
@ -141,7 +138,6 @@ NS_DEFINE_NAMED_CID(NS_MACSYSTEMSTATUSBAR_CID);
NS_DEFINE_NAMED_CID(NS_GFXINFO_CID); NS_DEFINE_NAMED_CID(NS_GFXINFO_CID);
static const mozilla::Module::CIDEntry kWidgetCIDs[] = { static const mozilla::Module::CIDEntry kWidgetCIDs[] = {
{ &kNS_POPUP_CID, false, NULL, nsCocoaWindowConstructor },
{ &kNS_FILEPICKER_CID, false, NULL, nsFilePickerConstructor, { &kNS_FILEPICKER_CID, false, NULL, nsFilePickerConstructor,
mozilla::Module::MAIN_PROCESS_ONLY }, mozilla::Module::MAIN_PROCESS_ONLY },
{ &kNS_COLORPICKER_CID, false, NULL, nsColorPickerConstructor, { &kNS_COLORPICKER_CID, false, NULL, nsColorPickerConstructor,
@ -178,7 +174,6 @@ static const mozilla::Module::CIDEntry kWidgetCIDs[] = {
}; };
static const mozilla::Module::ContractIDEntry kWidgetContracts[] = { static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
{ "@mozilla.org/widgets/popup/mac;1", &kNS_POPUP_CID },
{ "@mozilla.org/filepicker;1", &kNS_FILEPICKER_CID, { "@mozilla.org/filepicker;1", &kNS_FILEPICKER_CID,
mozilla::Module::MAIN_PROCESS_ONLY }, mozilla::Module::MAIN_PROCESS_ONLY },
{ "@mozilla.org/colorpicker;1", &kNS_COLORPICKER_CID, { "@mozilla.org/colorpicker;1", &kNS_COLORPICKER_CID,

View file

@ -3,11 +3,6 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * 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/. */ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/* BA7DE611-6088-11d3-A83E-00105A183419 */
#define NS_POPUP_CID \
{ 0xba7de611, 0x6088, 0x11d3, \
{ 0xa8, 0x3e, 0x0, 0x10, 0x5a, 0x18, 0x34, 0x19 } }
/* bd57cee8-1dd1-11b2-9fe7-95cf4709aea3 */ /* bd57cee8-1dd1-11b2-9fe7-95cf4709aea3 */
#define NS_FILEPICKER_CID \ #define NS_FILEPICKER_CID \
{ 0xbd57cee8, 0x1dd1, 0x11b2, \ { 0xbd57cee8, 0x1dd1, 0x11b2, \