forked from mirrors/gecko-dev
Merge inbound to mozilla-central a=merge
This commit is contained in:
commit
7df3c5baab
39 changed files with 1403 additions and 1459 deletions
|
|
@ -307,7 +307,11 @@ HTMLTextFieldAccessible::NativeAttributes()
|
|||
// Expose type for text input elements as it gives some useful context,
|
||||
// especially for mobile.
|
||||
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);
|
||||
if (!ARIARoleMap() && type.EqualsLiteral("search")) {
|
||||
nsAccUtils::SetAccAttr(attributes, nsGkAtoms::xmlroles,
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=558036
|
|||
testAttrs("search", {"text-input-type": "search"}, true);
|
||||
testAttrs("tel", {"text-input-type": "tel"}, true);
|
||||
testAttrs("url", {"text-input-type": "url"}, true);
|
||||
testAttrs(getAccessible("number").firstChild, {"text-input-type": "number"}, true);
|
||||
|
||||
// ARIA
|
||||
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="tel" type="tel"/>
|
||||
<input id="url" type="url"/>
|
||||
<input id="number" type="number"/>
|
||||
<div id="searchbox" role="searchbox"></div>
|
||||
|
||||
<!-- html -->
|
||||
|
|
|
|||
|
|
@ -553,7 +553,8 @@
|
|||
for (let i = numPinned - 1; i >= 0; i--) {
|
||||
let tab = this.children[i];
|
||||
width += layoutData.pinnedTabWidth;
|
||||
tab.style.marginInlineStart = -(width + layoutData.scrollButtonWidth) + "px";
|
||||
tab.style.setProperty("margin-inline-start",
|
||||
-(width + layoutData.scrollButtonWidth) + "px", "important");
|
||||
tab._pinnedUnscrollable = true;
|
||||
}
|
||||
this.style.paddingInlineStart = width + "px";
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ const CustomizableWidgets = [
|
|||
if (!elementCount)
|
||||
return;
|
||||
|
||||
let body = document.createElement("vbox");
|
||||
let body = document.createXULElement("vbox");
|
||||
body.className = "panel-subview-body";
|
||||
body.appendChild(fragment);
|
||||
let footer;
|
||||
|
|
|
|||
|
|
@ -6,22 +6,11 @@
|
|||
|
||||
/* 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 {
|
||||
margin: 1px 0 0;
|
||||
margin-inline-end: 6px;
|
||||
}
|
||||
|
||||
|
||||
.search-box {
|
||||
-moz-appearance: textfield;
|
||||
cursor: text;
|
||||
|
|
|
|||
|
|
@ -11,10 +11,6 @@
|
|||
-moz-font-smoothing-background-color: -moz-mac-source-list;
|
||||
}
|
||||
|
||||
.item {
|
||||
color: -moz-DialogText;
|
||||
}
|
||||
|
||||
.item-title-container {
|
||||
box-sizing: border-box;
|
||||
align-items: center;
|
||||
|
|
@ -22,11 +18,6 @@
|
|||
font-size: 12px;
|
||||
}
|
||||
|
||||
.item.selected > .item-title-container {
|
||||
color: HighlightText;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.item.selected > .item-title-container {
|
||||
-moz-appearance: -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;
|
||||
}
|
||||
|
||||
@media (-moz-mac-yosemite-theme) {
|
||||
@media (-moz-mac-yosemite-theme: 0) {
|
||||
.item.selected > .item-title-container {
|
||||
color: -moz-dialogtext;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.item.selected:focus > .item-title-container {
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,13 +6,15 @@
|
|||
|
||||
html {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
font: message-box;
|
||||
color: #333333;
|
||||
background-color: -moz-Field;
|
||||
color: -moz-FieldText;
|
||||
-moz-user-select: none;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@
|
|||
background-color: transparent;
|
||||
border-radius: 0;
|
||||
border-width: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
margin: 0 !important /* override tabbox.css */;
|
||||
padding: 0 !important /* override tabbox.css */;
|
||||
-moz-box-align: stretch;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,15 +6,8 @@
|
|||
|
||||
/* These styles are intended to mimic XUL trees and the XUL search box. */
|
||||
|
||||
.item {
|
||||
padding-inline-end: 0;
|
||||
}
|
||||
|
||||
.item-title {
|
||||
margin: 1px 0 0;
|
||||
}
|
||||
|
||||
.item-title {
|
||||
margin-inline-end: 6px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include "mozilla/CheckedInt.h"
|
||||
#include "mozilla/EnumeratedRange.h"
|
||||
#include "mozilla/SHA1.h"
|
||||
#include "mozilla/Unused.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <thread>
|
||||
|
|
@ -39,6 +40,7 @@ using namespace js::wasm;
|
|||
|
||||
using mozilla::CheckedInt;
|
||||
using mozilla::MakeEnumeratedRange;
|
||||
using mozilla::Unused;
|
||||
|
||||
bool
|
||||
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
|
||||
// final reallocs. In particular, the MacroAssembler can be enormous, so be
|
||||
// extra conservative. Note, podResizeToFit calls at the end will trim off
|
||||
// unneeded capacity.
|
||||
// extra conservative. Since large over-reservations may fail when the
|
||||
// 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 estimatedCodeSize = 1.2 * EstimateCompiledCodeSize(tier(), codeSectionSize);
|
||||
if (!masm_.reserve(Min(estimatedCodeSize, MaxCodeBytesPerProcess)))
|
||||
return false;
|
||||
|
||||
if (!metadataTier_->codeRanges.reserve(2 * env_->numFuncDefs()))
|
||||
return false;
|
||||
size_t estimatedCodeSize = 1.2 * EstimateCompiledCodeSize(tier(), codeSectionSize);
|
||||
Unused << masm_.reserve(Min(estimatedCodeSize, MaxCodeBytesPerProcess));
|
||||
|
||||
Unused << metadataTier_->codeRanges.reserve(2 * env_->numFuncDefs());
|
||||
|
||||
const size_t ByteCodesPerCallSite = 50;
|
||||
if (!metadataTier_->callSites.reserve(codeSectionSize / ByteCodesPerCallSite))
|
||||
return false;
|
||||
Unused << metadataTier_->callSites.reserve(codeSectionSize / ByteCodesPerCallSite);
|
||||
|
||||
const size_t ByteCodesPerOOBTrap = 10;
|
||||
if (!metadataTier_->trapSites[Trap::OutOfBounds].reserve(codeSectionSize / ByteCodesPerOOBTrap))
|
||||
return false;
|
||||
Unused << metadataTier_->trapSites[Trap::OutOfBounds].reserve(codeSectionSize / ByteCodesPerOOBTrap);
|
||||
|
||||
// Allocate space in TlsData for declarations that need it.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<?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">
|
||||
<tabbox id="tab">
|
||||
<tabs>
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
<?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">
|
||||
<tabbox id="tab">
|
||||
<tabs>
|
||||
|
|
|
|||
|
|
@ -253,6 +253,9 @@ FilePicker.prototype = {
|
|||
QueryInterface: ChromeUtils.generateQI([Ci.nsISimpleEnumerator]),
|
||||
mFiles: files,
|
||||
mIndex: 0,
|
||||
[Symbol.iterator]() {
|
||||
return this.mFiles.values();
|
||||
},
|
||||
hasMoreElements: function() {
|
||||
return (this.mIndex < this.mFiles.length);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -873,6 +873,14 @@ FilePickerDelegate.prototype = {
|
|||
QueryInterface: ChromeUtils.generateQI([Ci.nsISimpleEnumerator]),
|
||||
_owner: this,
|
||||
_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() {
|
||||
return this._index < this._owner._files.length;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -74,8 +74,10 @@ mochitest-harness:
|
|||
fetches:
|
||||
build:
|
||||
- target.tar.bz2
|
||||
- target.common.tests.tar.gz>tests
|
||||
- target.mochitest.tests.tar.gz>tests
|
||||
- artifact: target.common.tests.tar.gz
|
||||
dest: tests
|
||||
- artifact: target.mochitest.tests.tar.gz
|
||||
dest: tests
|
||||
when:
|
||||
files-changed:
|
||||
- 'testing/mochitest/**'
|
||||
|
|
@ -187,8 +189,10 @@ reftest-harness:
|
|||
fetches:
|
||||
build:
|
||||
- target.tar.bz2
|
||||
- target.common.tests.tar.gz>tests
|
||||
- target.reftest.tests.tar.gz>tests
|
||||
- artifact: target.common.tests.tar.gz
|
||||
dest: tests
|
||||
- artifact: target.reftest.tests.tar.gz
|
||||
dest: tests
|
||||
when:
|
||||
files-changed:
|
||||
- 'layout/tools/reftest/**'
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import bz2
|
|||
import concurrent.futures
|
||||
import gzip
|
||||
import hashlib
|
||||
import json
|
||||
import lzma
|
||||
import multiprocessing
|
||||
import os
|
||||
|
|
@ -24,8 +25,10 @@ except ImportError:
|
|||
zstandard = None
|
||||
|
||||
|
||||
ARTIFACT_URL = ('https://queue.taskcluster.net/v1/task/{task}/artifacts/'
|
||||
'{artifact}')
|
||||
PUBLIC_ARTIFACT_URL = ('https://queue.taskcluster.net/v1/task/{task}/artifacts/'
|
||||
'{artifact}')
|
||||
PRIVATE_ARTIFACT_URL = ('https://taskcluster/queue/v1/task/{task}/artifacts/'
|
||||
'{artifact}')
|
||||
|
||||
CONCURRENCY = multiprocessing.cpu_count()
|
||||
|
||||
|
|
@ -59,6 +62,9 @@ def stream_download(url, sha256=None, size=None):
|
|||
|
||||
t0 = time.time()
|
||||
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:
|
||||
chunk = fh.read(65536)
|
||||
if not chunk:
|
||||
|
|
@ -217,7 +223,7 @@ def extract_archive(path, dest_dir, typ):
|
|||
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.
|
||||
|
||||
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)
|
||||
|
||||
if not extract:
|
||||
return
|
||||
|
||||
typ = archive_type(dest_path)
|
||||
if typ:
|
||||
extract_archive(dest_path, dest_dir, typ)
|
||||
|
|
@ -280,20 +289,20 @@ def command_static_url(args):
|
|||
|
||||
|
||||
def command_task_artifacts(args):
|
||||
fetches = json.loads(os.environ['MOZ_FETCHES'])
|
||||
downloads = []
|
||||
for word in args.artifacts:
|
||||
# Format is name[>dest]@task
|
||||
artifact, task_id = word.split('@', 1)
|
||||
for fetch in fetches:
|
||||
extdir = pathlib.Path(args.dest)
|
||||
|
||||
if '>' in artifact:
|
||||
artifact, subdir = artifact.rsplit('>', 1)
|
||||
extdir = extdir.joinpath(subdir)
|
||||
|
||||
if 'dest' in fetch:
|
||||
extdir = extdir.joinpath(fetch['dest'])
|
||||
extdir.mkdir(parents=True, exist_ok=True)
|
||||
url = ARTIFACT_URL.format(task=task_id,
|
||||
artifact=artifact)
|
||||
downloads.append((url, extdir))
|
||||
if fetch['artifact'].startswith('public/'):
|
||||
url = PUBLIC_ARTIFACT_URL.format(task=fetch['task'],
|
||||
artifact=fetch['artifact'])
|
||||
else:
|
||||
url = PRIVATE_ARTIFACT_URL.format(task=fetch['task'],
|
||||
artifact=fetch['artifact'])
|
||||
downloads.append((url, extdir, fetch['extract']))
|
||||
|
||||
fetch_urls(downloads)
|
||||
|
||||
|
|
@ -322,8 +331,6 @@ def main():
|
|||
artifacts.add_argument('-d', '--dest', default=os.environ.get('MOZ_FETCHES_DIR'),
|
||||
help='Destination directory which will contain all '
|
||||
'artifacts (defaults to $MOZ_FETCHES_DIR)')
|
||||
artifacts.add_argument('artifacts', nargs='+',
|
||||
help='Artifacts to fetch. Of form path@task_id')
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
|
|
|
|||
|
|
@ -480,7 +480,7 @@ def vcs_checkout(source_repo, dest, store_path,
|
|||
return revision
|
||||
|
||||
|
||||
def fetch_artifacts(fetches):
|
||||
def fetch_artifacts():
|
||||
print_line(b'fetches', b'fetching artifacts\n')
|
||||
|
||||
fetch_content = shutil.which('fetch-content')
|
||||
|
|
@ -492,7 +492,7 @@ def fetch_artifacts(fetches):
|
|||
print(FETCH_CONTENT_NOT_FOUND)
|
||||
sys.exit(1)
|
||||
|
||||
cmd = [fetch_content, 'task-artifacts'] + fetches.split()
|
||||
cmd = [fetch_content, 'task-artifacts']
|
||||
subprocess.run(cmd, check=True, env=os.environ)
|
||||
print_line(b'fetches', b'finished fetching artifacts\n')
|
||||
|
||||
|
|
@ -738,9 +738,8 @@ def main(args):
|
|||
return 1
|
||||
|
||||
try:
|
||||
fetches = os.environ.get('MOZ_FETCHES')
|
||||
if fetches:
|
||||
fetch_artifacts(fetches)
|
||||
if 'MOZ_FETCHES' in os.environ:
|
||||
fetch_artifacts()
|
||||
|
||||
return run_and_prefix_output(b'task', task_args)
|
||||
finally:
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ from __future__ import absolute_import, print_function, unicode_literals
|
|||
|
||||
import copy
|
||||
import logging
|
||||
import json
|
||||
import os
|
||||
|
||||
from taskgraph.transforms.base import TransformSequence
|
||||
|
|
@ -80,7 +81,11 @@ job_description_schema = Schema({
|
|||
|
||||
# A list of artifacts to install from 'fetch' tasks.
|
||||
Optional('fetches'): {
|
||||
basestring: [basestring],
|
||||
basestring: [basestring, {
|
||||
Required('artifact'): basestring,
|
||||
Optional('dest'): basestring,
|
||||
Optional('extract'): bool,
|
||||
}],
|
||||
},
|
||||
|
||||
# A description of how to run this job.
|
||||
|
|
@ -182,22 +187,46 @@ def use_fetches(config, jobs):
|
|||
|
||||
dep = 'fetch-{}'.format(fetch)
|
||||
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:
|
||||
if kind not in dependencies:
|
||||
raise Exception("{name} can't fetch {kind} artifacts because "
|
||||
"it has no {kind} dependencies!".format(name=name, kind=kind))
|
||||
|
||||
for path in artifacts:
|
||||
job_fetches.append('{prefix}/{path}@<{dep}>'.format(
|
||||
prefix=prefix, path=path, dep=kind))
|
||||
for artifact in artifacts:
|
||||
if isinstance(artifact, basestring):
|
||||
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['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
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -312,6 +312,16 @@ def mozharness_on_generic_worker(config, job, taskdesc):
|
|||
head_rev=env['COMM_HEAD_REV'],
|
||||
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'] = []
|
||||
if taskdesc.get('needs-sccache'):
|
||||
worker['command'].extend([
|
||||
|
|
@ -329,6 +339,7 @@ def mozharness_on_generic_worker(config, job, taskdesc):
|
|||
])
|
||||
|
||||
worker['command'].extend(hg_commands)
|
||||
worker['command'].extend(fetch_commands)
|
||||
worker['command'].extend([
|
||||
' '.join(mh_command)
|
||||
])
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ from taskgraph.util.schema import (
|
|||
resolve_keyed_by,
|
||||
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 voluptuous import Any, Required, Optional
|
||||
|
||||
|
|
@ -165,8 +165,6 @@ def make_job_description(config, jobs):
|
|||
dependencies['build'] = "build-{}/opt".format(
|
||||
dependencies[build_task][13:dependencies[build_task].rfind('-')])
|
||||
build_task = 'build'
|
||||
signing_task_ref = "<{}>".format(signing_task)
|
||||
build_task_ref = "<{}>".format(build_task)
|
||||
|
||||
attributes = copy_attributes_from_dependent_job(dep_job)
|
||||
attributes['repackage_type'] = 'repackage'
|
||||
|
|
@ -184,24 +182,27 @@ def make_job_description(config, jobs):
|
|||
'using': 'mozharness',
|
||||
'script': 'mozharness/scripts/repackage.py',
|
||||
'job-script': 'taskcluster/scripts/builder/repackage.sh',
|
||||
'actions': ['download_input', 'setup', 'repackage'],
|
||||
'actions': ['setup', 'repackage'],
|
||||
'extra-workspace-cache-key': 'repackage',
|
||||
})
|
||||
|
||||
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,
|
||||
locale=locale,
|
||||
project=config.params["project"]),
|
||||
'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['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'):
|
||||
worker_type = 'aws-provisioner-v1/gecko-%s-b-win2012' % level
|
||||
|
|
@ -238,6 +239,9 @@ def make_job_description(config, jobs):
|
|||
'extra': job.get('extra', {}),
|
||||
'worker': worker,
|
||||
'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'):
|
||||
|
|
@ -249,38 +253,42 @@ def make_job_description(config, jobs):
|
|||
yield task
|
||||
|
||||
|
||||
def _generate_task_env(task, build_platform, build_task_ref, signing_task_ref, locale=None,
|
||||
project=None):
|
||||
mar_prefix = get_taskcluster_artifact_prefix(
|
||||
task, build_task_ref, postfix='host/bin/', locale=None
|
||||
)
|
||||
signed_prefix = get_taskcluster_artifact_prefix(task, signing_task_ref, locale=locale)
|
||||
def _generate_download_config(task, build_platform, build_task, signing_task, locale=None,
|
||||
project=None):
|
||||
locale_path = '{}/'.format(locale) if locale else ''
|
||||
|
||||
if build_platform.startswith('linux') or build_platform.startswith('macosx'):
|
||||
tarball_extension = 'bz2' if build_platform.startswith('linux') else 'gz'
|
||||
return {
|
||||
'SIGNED_INPUT': {'task-reference': '{}target.tar.{}'.format(
|
||||
signed_prefix, tarball_extension
|
||||
)},
|
||||
'UNSIGNED_MAR': {'task-reference': '{}mar'.format(mar_prefix)},
|
||||
signing_task: [
|
||||
{
|
||||
'artifact': '{}target.tar.{}'.format(locale_path, tarball_extension),
|
||||
'extract': False,
|
||||
},
|
||||
],
|
||||
build_task: [
|
||||
'host/bin/mar',
|
||||
],
|
||||
}
|
||||
elif build_platform.startswith('win'):
|
||||
task_env = {
|
||||
'SIGNED_ZIP': {'task-reference': '{}target.zip'.format(signed_prefix)},
|
||||
'SIGNED_SETUP': {'task-reference': '{}setup.exe'.format(signed_prefix)},
|
||||
'UNSIGNED_MAR': {'task-reference': '{}mar.exe'.format(mar_prefix)},
|
||||
fetch_config = {
|
||||
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:
|
||||
task_env['SIGNED_SETUP_STUB'] = {
|
||||
'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'
|
||||
fetch_config[signing_task].append('{}setup-stub.exe'.format(locale_path))
|
||||
|
||||
return task_env
|
||||
return fetch_config
|
||||
|
||||
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'):
|
||||
output_files = [{
|
||||
'type': 'file',
|
||||
'path': '/builds/worker/workspace/build/artifacts/{}target.complete.mar'
|
||||
'path': '/builds/worker/workspace/build/outputs/{}target.complete.mar'
|
||||
.format(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'):
|
||||
output_files.append({
|
||||
'type': 'file',
|
||||
'path': '/builds/worker/workspace/build/artifacts/{}target.dmg'
|
||||
'path': '/builds/worker/workspace/build/outputs/{}target.dmg'
|
||||
.format(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'):
|
||||
output_files = [{
|
||||
'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),
|
||||
}, {
|
||||
'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),
|
||||
}]
|
||||
|
||||
|
|
@ -320,8 +328,8 @@ def _generate_task_output_files(task, build_platform, locale=None, project=None)
|
|||
if use_stub:
|
||||
output_files.append({
|
||||
'type': 'file',
|
||||
'path': '{}/{}target.stub-installer.exe'.format(
|
||||
artifact_prefix, locale_output_path
|
||||
'path': 'build/outputs/{}target.stub-installer.exe'.format(
|
||||
locale_output_path
|
||||
),
|
||||
'name': '{}/{}target.stub-installer.exe'.format(
|
||||
artifact_prefix, locale_output_path
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ from taskgraph.util.schema import (
|
|||
resolve_keyed_by,
|
||||
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.transforms.task import task_description_schema
|
||||
from voluptuous import Any, Required, Optional
|
||||
|
|
@ -142,7 +142,6 @@ def make_job_description(config, jobs):
|
|||
signing_task = dependency
|
||||
elif build_platform.startswith('win') and dependency.endswith('repack'):
|
||||
signing_task = dependency
|
||||
signing_task_ref = "<{}>".format(signing_task)
|
||||
|
||||
attributes['repackage_type'] = 'repackage'
|
||||
|
||||
|
|
@ -159,12 +158,13 @@ def make_job_description(config, jobs):
|
|||
})
|
||||
|
||||
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),
|
||||
'chain-of-trust': True,
|
||||
'max-run-time': 7200 if build_platform.startswith('win') else 3600,
|
||||
'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)
|
||||
|
|
@ -204,6 +204,9 @@ def make_job_description(config, jobs):
|
|||
'extra': job.get('extra', {}),
|
||||
'worker': worker,
|
||||
'run': run,
|
||||
'fetches': _generate_download_config(dep_job, build_platform,
|
||||
signing_task, partner=repack_id,
|
||||
project=config.params["project"]),
|
||||
}
|
||||
|
||||
if build_platform.startswith('macosx'):
|
||||
|
|
@ -215,28 +218,30 @@ def make_job_description(config, jobs):
|
|||
yield task
|
||||
|
||||
|
||||
def _generate_task_env(build_platform, signing_task, signing_task_ref, partner):
|
||||
# Force private artifacts here, until we can populate our dependency map
|
||||
# with actual task definitions rather than labels.
|
||||
# (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')
|
||||
def _generate_download_config(task, build_platform, signing_task, partner=None,
|
||||
project=None):
|
||||
locale_path = '{}/'.format(partner) if partner else ''
|
||||
|
||||
if build_platform.startswith('macosx'):
|
||||
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'):
|
||||
task_env = {
|
||||
'SIGNED_ZIP': {'task-reference': '{}target.zip'.format(signed_prefix)},
|
||||
'SIGNED_SETUP': {'task-reference': '{}setup.exe'.format(signed_prefix)},
|
||||
return {
|
||||
signing_task: [
|
||||
{
|
||||
'artifact': '{}target.zip'.format(locale_path),
|
||||
'extract': False,
|
||||
},
|
||||
'{}setup.exe'.format(locale_path),
|
||||
],
|
||||
}
|
||||
|
||||
return task_env
|
||||
|
||||
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'):
|
||||
output_files = [{
|
||||
'type': 'file',
|
||||
'path': '/builds/worker/workspace/build/artifacts/{}target.dmg'
|
||||
'path': '/builds/worker/workspace/build/outputs/{}target.dmg'
|
||||
.format(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'):
|
||||
output_files = [{
|
||||
'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),
|
||||
}]
|
||||
|
||||
|
|
|
|||
|
|
@ -3,21 +3,13 @@ import os
|
|||
platform = "linux32"
|
||||
|
||||
config = {
|
||||
"input_home": "{abs_work_dir}/inputs",
|
||||
"output_home": "{abs_work_dir}/artifacts{locale}",
|
||||
|
||||
"locale": os.environ.get("LOCALE"),
|
||||
|
||||
"download_config": {
|
||||
"target.tar.gz": os.environ.get("SIGNED_INPUT"),
|
||||
"mar": os.environ.get("UNSIGNED_MAR"),
|
||||
},
|
||||
|
||||
"repackage_config": [[
|
||||
"mar",
|
||||
"-i", "{abs_work_dir}/inputs/target.tar.gz",
|
||||
"--mar", "{abs_work_dir}/inputs/mar",
|
||||
"-o", "{output_home}/target.complete.mar"
|
||||
"-i", "{abs_input_dir}/target.tar.bz2",
|
||||
"--mar", "{abs_input_dir}/mar",
|
||||
"-o", "{abs_output_dir}/target.complete.mar"
|
||||
]],
|
||||
|
||||
# ToolTool
|
||||
|
|
|
|||
|
|
@ -3,21 +3,13 @@ import os
|
|||
platform = "linux64"
|
||||
|
||||
config = {
|
||||
"input_home": "{abs_work_dir}/inputs",
|
||||
"output_home": "{abs_work_dir}/artifacts{locale}",
|
||||
|
||||
"locale": os.environ.get("LOCALE"),
|
||||
|
||||
"download_config": {
|
||||
"target.tar.gz": os.environ.get("SIGNED_INPUT"),
|
||||
"mar": os.environ.get("UNSIGNED_MAR"),
|
||||
},
|
||||
|
||||
"repackage_config": [[
|
||||
"mar",
|
||||
"-i", "{abs_work_dir}/inputs/target.tar.gz",
|
||||
"--mar", "{abs_work_dir}/inputs/mar",
|
||||
"-o", "{output_home}/target.complete.mar"
|
||||
"-i", "{abs_input_dir}/target.tar.bz2",
|
||||
"--mar", "{abs_input_dir}/mar",
|
||||
"-o", "{abs_output_dir}/target.complete.mar"
|
||||
]],
|
||||
|
||||
# ToolTool
|
||||
|
|
|
|||
|
|
@ -1,20 +1,14 @@
|
|||
import os
|
||||
|
||||
config = {
|
||||
"input_home": "{abs_work_dir}/inputs",
|
||||
"output_home": "{abs_work_dir}/artifacts{repack_id}",
|
||||
"src_mozconfig": "browser/config/mozconfigs/macosx64/repack",
|
||||
|
||||
"repack_id": os.environ.get("REPACK_ID"),
|
||||
|
||||
"download_config": {
|
||||
"target.tar.gz": os.environ.get("SIGNED_INPUT"),
|
||||
},
|
||||
|
||||
"repackage_config": [[
|
||||
"dmg",
|
||||
"-i", "{abs_work_dir}/inputs/target.tar.gz",
|
||||
"-o", "{output_home}/target.dmg"
|
||||
"-i", "{abs_input_dir}/target.tar.gz",
|
||||
"-o", "{abs_output_dir}/target.dmg"
|
||||
]],
|
||||
|
||||
# ToolTool
|
||||
|
|
|
|||
|
|
@ -1,26 +1,19 @@
|
|||
import os
|
||||
|
||||
config = {
|
||||
"input_home": "{abs_work_dir}/inputs",
|
||||
"output_home": "{abs_work_dir}/artifacts{locale}",
|
||||
"src_mozconfig": "browser/config/mozconfigs/macosx64/repack",
|
||||
|
||||
"locale": os.environ.get("LOCALE"),
|
||||
|
||||
"download_config": {
|
||||
"target.tar.gz": os.environ.get("SIGNED_INPUT"),
|
||||
"mar": os.environ.get("UNSIGNED_MAR"),
|
||||
},
|
||||
|
||||
"repackage_config": [[
|
||||
"dmg",
|
||||
"-i", "{abs_work_dir}/inputs/target.tar.gz",
|
||||
"-o", "{output_home}/target.dmg"
|
||||
"-i", "{abs_input_dir}/target.tar.gz",
|
||||
"-o", "{abs_output_dir}/target.dmg"
|
||||
], [
|
||||
"mar",
|
||||
"-i", "{abs_work_dir}/inputs/target.tar.gz",
|
||||
"--mar", "{abs_work_dir}/inputs/mar",
|
||||
"-o", "{output_home}/target.complete.mar"
|
||||
"-i", "{abs_input_dir}/target.tar.gz",
|
||||
"--mar", "{abs_input_dir}/mar",
|
||||
"-o", "{abs_output_dir}/target.complete.mar"
|
||||
]],
|
||||
|
||||
# ToolTool
|
||||
|
|
|
|||
|
|
@ -2,29 +2,19 @@ import os
|
|||
|
||||
platform = "win32"
|
||||
|
||||
download_config = {
|
||||
"target.zip": os.environ.get("SIGNED_ZIP"),
|
||||
"setup.exe": os.environ.get("SIGNED_SETUP"),
|
||||
}
|
||||
|
||||
repackage_config = [[
|
||||
"installer",
|
||||
"--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",
|
||||
"--setupexe", "{abs_work_dir}\\inputs\\setup.exe",
|
||||
"-o", "{output_home}\\target.installer.exe",
|
||||
"--setupexe", "{abs_input_dir}\\setup.exe",
|
||||
"-o", "{abs_output_dir}\\target.installer.exe",
|
||||
"--sfx-stub", "other-licenses/7zstub/firefox/7zSD.sfx",
|
||||
]]
|
||||
|
||||
config = {
|
||||
"input_home": "{abs_work_dir}\\inputs",
|
||||
"output_home": "{base_work_dir}\\releng\\partner\\{repack_id}",
|
||||
|
||||
"repack_id": os.environ.get("REPACK_ID"),
|
||||
|
||||
"download_config": download_config,
|
||||
|
||||
"repackage_config": repackage_config,
|
||||
|
||||
# ToolTool
|
||||
|
|
|
|||
|
|
@ -2,32 +2,19 @@ import os
|
|||
|
||||
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 = [[
|
||||
"installer",
|
||||
"--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",
|
||||
"--setupexe", "{abs_work_dir}\\inputs\\setup.exe",
|
||||
"-o", "{output_home}\\target.installer.exe",
|
||||
"--setupexe", "{abs_input_dir}\\setup.exe",
|
||||
"-o", "{abs_output_dir}\\target.installer.exe",
|
||||
"--sfx-stub", "other-licenses/7zstub/firefox/7zSD.sfx",
|
||||
], [
|
||||
"mar",
|
||||
"-i", "{abs_work_dir}\\inputs\\target.zip",
|
||||
"--mar", "{abs_work_dir}\\inputs\\mar.exe",
|
||||
"-o", "{output_home}\\target.complete.mar",
|
||||
"-i", "{abs_input_dir}\\target.zip",
|
||||
"--mar", "{abs_input_dir}\\mar.exe",
|
||||
"-o", "{abs_output_dir}\\target.complete.mar",
|
||||
]]
|
||||
|
||||
if not os.environ.get("NO_STUB_INSTALLER"):
|
||||
|
|
@ -35,19 +22,14 @@ if not os.environ.get("NO_STUB_INSTALLER"):
|
|||
repackage_config.append([
|
||||
"installer",
|
||||
"--tag", "{abs_mozilla_dir}\\browser\\installer\\windows\\stub.tag",
|
||||
"--setupexe", "{abs_work_dir}\\inputs\\setup-stub.exe",
|
||||
"-o", "{output_home}\\target.stub-installer.exe",
|
||||
"--setupexe", "{abs_input_dir}\\setup-stub.exe",
|
||||
"-o", "{abs_output_dir}\\target.stub-installer.exe",
|
||||
"--sfx-stub", "other-licenses/7zstub/firefox/7zSD.sfx",
|
||||
])
|
||||
|
||||
config = {
|
||||
"input_home": "{abs_work_dir}\\inputs",
|
||||
"output_home": "{base_work_dir}\\public\\build{locale}",
|
||||
|
||||
"locale": os.environ.get("LOCALE"),
|
||||
|
||||
"download_config": download_config,
|
||||
|
||||
"repackage_config": repackage_config,
|
||||
|
||||
# ToolTool
|
||||
|
|
|
|||
|
|
@ -2,29 +2,19 @@ import os
|
|||
|
||||
platform = "win64"
|
||||
|
||||
download_config = {
|
||||
"target.zip": os.environ.get("SIGNED_ZIP"),
|
||||
"setup.exe": os.environ.get("SIGNED_SETUP"),
|
||||
}
|
||||
|
||||
repackage_config = [[
|
||||
"installer",
|
||||
"--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",
|
||||
"--setupexe", "{abs_work_dir}\\inputs\\setup.exe",
|
||||
"-o", "{output_home}\\target.installer.exe",
|
||||
"--setupexe", "{abs_input_dir}\\setup.exe",
|
||||
"-o", "{abs_output_dir}\\target.installer.exe",
|
||||
"--sfx-stub", "other-licenses/7zstub/firefox/7zSD.sfx",
|
||||
]]
|
||||
|
||||
config = {
|
||||
"input_home": "{abs_work_dir}\\inputs",
|
||||
"output_home": "{base_work_dir}\\releng\\partner\\{repack_id}",
|
||||
|
||||
"repack_id": os.environ.get("REPACK_ID"),
|
||||
|
||||
"download_config": download_config,
|
||||
|
||||
"repackage_config": repackage_config,
|
||||
|
||||
# ToolTool
|
||||
|
|
|
|||
|
|
@ -2,35 +2,24 @@ import os
|
|||
|
||||
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 = [[
|
||||
"installer",
|
||||
"--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",
|
||||
"--setupexe", "{abs_work_dir}\\inputs\\setup.exe",
|
||||
"-o", "{output_home}\\target.installer.exe",
|
||||
"--setupexe", "{abs_input_dir}\\setup.exe",
|
||||
"-o", "{abs_output_dir}\\target.installer.exe",
|
||||
"--sfx-stub", "other-licenses/7zstub/firefox/7zSD.sfx",
|
||||
], [
|
||||
"mar",
|
||||
"-i", "{abs_work_dir}\\inputs\\target.zip",
|
||||
"--mar", "{abs_work_dir}\\inputs\\mar.exe",
|
||||
"-o", "{output_home}\\target.complete.mar",
|
||||
"-i", "{abs_input_dir}\\target.zip",
|
||||
"--mar", "{abs_input_dir}\\mar.exe",
|
||||
"-o", "{abs_output_dir}\\target.complete.mar",
|
||||
]]
|
||||
|
||||
config = {
|
||||
"input_home": "{abs_work_dir}\\inputs",
|
||||
"output_home": "{base_work_dir}\\public\\build{locale}",
|
||||
|
||||
"locale": os.environ.get("LOCALE"),
|
||||
|
||||
"download_config": download_config,
|
||||
|
||||
"repackage_config": repackage_config,
|
||||
|
||||
# ToolTool
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
import os
|
||||
from distutils.spawn import find_executable
|
||||
import json
|
||||
|
||||
import mozfile
|
||||
|
||||
|
|
@ -30,30 +31,31 @@ class FetchesMixin(object):
|
|||
self.warning('no fetches to download')
|
||||
return
|
||||
|
||||
fetches = os.environ['MOZ_FETCHES'].split()
|
||||
|
||||
if not self.fetch_script or not os.path.isfile(self.fetch_script):
|
||||
self.warning("fetch-content script not found, downloading manually")
|
||||
self._download_fetches(fetches)
|
||||
self._download_fetches()
|
||||
return
|
||||
|
||||
cmd = [self.fetch_script, 'task-artifacts'] + fetches
|
||||
cmd = [self.fetch_script, 'task-artifacts']
|
||||
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
|
||||
# so this isn't needed
|
||||
for word in fetches:
|
||||
artifact, task = word.split('@', 1)
|
||||
extdir = os.environ['MOZ_FETCHES_DIR']
|
||||
fetches_dir = os.environ['MOZ_FETCHES_DIR']
|
||||
|
||||
if '>' in artifact:
|
||||
artifact, subdir = artifact.rsplit('>', 1)
|
||||
extdir = os.path.join(extdir, subdir)
|
||||
fetches = json.loads(os.environ.get('MOZ_FETCHES', '{}'))
|
||||
for fetch in fetches:
|
||||
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)
|
||||
self.download_file(url)
|
||||
path = self.download_file(url, parent_dir=extdir)
|
||||
|
||||
filename = os.path.basename(artifact)
|
||||
mozfile.extract(filename, extdir)
|
||||
os.remove(filename)
|
||||
if fetch['extract']:
|
||||
mozfile.extract(path, extdir)
|
||||
os.remove(path)
|
||||
|
|
|
|||
|
|
@ -23,25 +23,17 @@ class Repackage(BaseScript):
|
|||
**script_kwargs
|
||||
)
|
||||
|
||||
def download_input(self):
|
||||
config = self.config
|
||||
def setup(self):
|
||||
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()
|
||||
|
||||
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):
|
||||
self._get_mozconfig()
|
||||
self._run_configure()
|
||||
|
|
@ -55,17 +47,17 @@ class Repackage(BaseScript):
|
|||
dirs = {}
|
||||
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')
|
||||
locale_dir = ''
|
||||
if config.get('locale'):
|
||||
locale_dir = "{}{}".format(os.path.sep, config['locale'])
|
||||
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
|
||||
dirs['abs_input_dir'] = os.path.join(
|
||||
abs_dirs['base_work_dir'],
|
||||
os.environ.get('MOZ_FETCHES_DIR', 'fetches'),
|
||||
)
|
||||
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():
|
||||
if key not in abs_dirs:
|
||||
abs_dirs[key] = dirs[key]
|
||||
|
|
@ -77,7 +69,7 @@ class Repackage(BaseScript):
|
|||
dirs = self.query_abs_dirs()
|
||||
|
||||
# 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"]:
|
||||
command = [sys.executable, 'mach', '--log-no-times', 'repackage'] + \
|
||||
|
|
|
|||
|
|
@ -18,5 +18,6 @@
|
|||
@import url("chrome://global/skin/progressmeter.css");
|
||||
@import url("chrome://global/skin/richlistbox.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/wizard.css");
|
||||
|
|
|
|||
|
|
@ -8,12 +8,7 @@
|
|||
xmlns="http://www.mozilla.org/xbl"
|
||||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="tabbox">
|
||||
<resources>
|
||||
<stylesheet src="chrome://global/skin/tabbox.css"/>
|
||||
</resources>
|
||||
|
||||
<implementation>
|
||||
<property name="handleCtrlTab">
|
||||
<setter>
|
||||
|
|
@ -217,10 +212,6 @@
|
|||
|
||||
<binding id="tabs"
|
||||
extends="chrome://global/content/bindings/general.xml#basecontrol">
|
||||
<resources>
|
||||
<stylesheet src="chrome://global/skin/tabbox.css"/>
|
||||
</resources>
|
||||
|
||||
<content>
|
||||
<xul:spacer class="tabs-left"/>
|
||||
<children/>
|
||||
|
|
@ -533,10 +524,6 @@
|
|||
</binding>
|
||||
|
||||
<binding id="tabpanels">
|
||||
<resources>
|
||||
<stylesheet src="chrome://global/skin/tabbox.css"/>
|
||||
</resources>
|
||||
|
||||
<implementation implements="nsIDOMXULRelatedElement">
|
||||
<!-- nsIDOMXULRelatedElement -->
|
||||
<method name="getRelatedElement">
|
||||
|
|
@ -649,10 +636,6 @@
|
|||
|
||||
<binding id="tab" display="xul:button"
|
||||
extends="chrome://global/content/bindings/general.xml#basetext">
|
||||
<resources>
|
||||
<stylesheet src="chrome://global/skin/tabbox.css"/>
|
||||
</resources>
|
||||
|
||||
<content>
|
||||
<xul:hbox class="tab-middle box-inherit" xbl:inherits="align,dir,pack,orient,selected,visuallyselected" flex="1">
|
||||
<xul:image class="tab-icon"
|
||||
|
|
|
|||
|
|
@ -829,6 +829,10 @@ ArrayEnumerator.prototype = {
|
|||
_index: 0,
|
||||
_contents: [],
|
||||
|
||||
[Symbol.iterator]() {
|
||||
return this._contents.values();
|
||||
},
|
||||
|
||||
hasMoreElements: function ArrayEnumerator_hasMoreElements() {
|
||||
return this._index < this._contents.length;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -563,9 +563,7 @@ protected:
|
|||
virtual already_AddRefed<nsIWidget>
|
||||
AllocateChildPopupWidget() override
|
||||
{
|
||||
static NS_DEFINE_IID(kCPopUpCID, NS_POPUP_CID);
|
||||
nsCOMPtr<nsIWidget> widget = do_CreateInstance(kCPopUpCID);
|
||||
return widget.forget();
|
||||
return nsIWidget::CreateTopLevelWindow();
|
||||
}
|
||||
|
||||
void ConfigureAPZCTreeManager() override;
|
||||
|
|
|
|||
|
|
@ -362,9 +362,7 @@ protected:
|
|||
virtual already_AddRefed<nsIWidget>
|
||||
AllocateChildPopupWidget() override
|
||||
{
|
||||
static NS_DEFINE_IID(kCPopUpCID, NS_POPUP_CID);
|
||||
nsCOMPtr<nsIWidget> widget = do_CreateInstance(kCPopUpCID);
|
||||
return widget.forget();
|
||||
return nsIWidget::CreateTopLevelWindow();
|
||||
}
|
||||
|
||||
nsIWidget* mParent; // if we're a popup, this is our parent [WEAK]
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
#include "nsWidgetsCID.h"
|
||||
|
||||
#include "nsChildView.h"
|
||||
#include "nsCocoaWindow.h"
|
||||
#include "nsAppShell.h"
|
||||
#include "nsAppShellSingleton.h"
|
||||
#include "nsFilePicker.h"
|
||||
|
|
@ -65,7 +64,6 @@ nsClipboardConstructor(nsISupports *aOuter, REFNSIID aIID,
|
|||
return inst->QueryInterface(aIID, aResult);
|
||||
}
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsCocoaWindow)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFilePicker)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsColorPicker)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsSound)
|
||||
|
|
@ -113,7 +111,6 @@ NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(GfxInfo, Init)
|
|||
} // namespace widget
|
||||
} // namespace mozilla
|
||||
|
||||
NS_DEFINE_NAMED_CID(NS_POPUP_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_FILEPICKER_CID);
|
||||
NS_DEFINE_NAMED_CID(NS_COLORPICKER_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);
|
||||
|
||||
static const mozilla::Module::CIDEntry kWidgetCIDs[] = {
|
||||
{ &kNS_POPUP_CID, false, NULL, nsCocoaWindowConstructor },
|
||||
{ &kNS_FILEPICKER_CID, false, NULL, nsFilePickerConstructor,
|
||||
mozilla::Module::MAIN_PROCESS_ONLY },
|
||||
{ &kNS_COLORPICKER_CID, false, NULL, nsColorPickerConstructor,
|
||||
|
|
@ -178,7 +174,6 @@ static const mozilla::Module::CIDEntry kWidgetCIDs[] = {
|
|||
};
|
||||
|
||||
static const mozilla::Module::ContractIDEntry kWidgetContracts[] = {
|
||||
{ "@mozilla.org/widgets/popup/mac;1", &kNS_POPUP_CID },
|
||||
{ "@mozilla.org/filepicker;1", &kNS_FILEPICKER_CID,
|
||||
mozilla::Module::MAIN_PROCESS_ONLY },
|
||||
{ "@mozilla.org/colorpicker;1", &kNS_COLORPICKER_CID,
|
||||
|
|
|
|||
|
|
@ -3,11 +3,6 @@
|
|||
* 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/. */
|
||||
|
||||
/* 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 */
|
||||
#define NS_FILEPICKER_CID \
|
||||
{ 0xbd57cee8, 0x1dd1, 0x11b2, \
|
||||
|
|
|
|||
Loading…
Reference in a new issue