未验证 提交 c97bd454 编写于 作者: C Chinmay Garde 提交者: GitHub

Download the Fuchsia SDK and toolchain in a gclient hook. (#8794)

Downloads into `//fuchsia/sdk/platform` and `//fuchsia/toolchain/platform`. `//fuchsia` is in the buildroot gitignore.
上级 39a950e5
......@@ -445,6 +445,50 @@ deps = {
'condition': 'download_android_deps',
'dep_type': 'cipd',
},
# Get the SDK from https://chrome-infra-packages.appspot.com/p/fuchsia/sdk/core at the 'latest' tag
# Get the toolchain from https://chrome-infra-packages.appspot.com/p/fuchsia/clang at the 'goma' tag
'src/fuchsia/sdk/mac': {
'packages': [
{
'package': 'fuchsia/sdk/core/mac-amd64',
'version': 'jlQvNeRMq6X81_VYiFI_Ol311YCXak0xACebeb8f6TcC'
}
],
'condition': 'host_os == "mac"',
'dep_type': 'cipd',
},
'src/fuchsia/toolchain/mac': {
'packages': [
{
'package': 'fuchsia/clang/mac-amd64',
'version': '4OfgjQg8g3Ztj2OYJ4Zlz9Q6DGYjOTuHh3G8MSMhxg4C'
}
],
'condition': 'host_os == "mac"',
'dep_type': 'cipd',
},
'src/fuchsia/sdk/linux': {
'packages': [
{
'package': 'fuchsia/sdk/core/linux-amd64',
'version': '9-zyx3CzWylM-x9RYdL5UTT9uU-sl_0ysOCcEGCtot0C'
}
],
'condition': 'host_os == "linux"',
'dep_type': 'cipd',
},
'src/fuchsia/toolchain/linux': {
'packages': [
{
'package': 'fuchsia/clang/linux-amd64',
'version': 'WPg0zzXLyTjFNrOrz4uA5vPaXUuEYvTJ5DPyYdiaN3MC'
}
],
'condition': 'host_os == "linux"',
'dep_type': 'cipd',
},
}
hooks = [
......
此差异已折叠。
Signature: f2113ac67466eb24d34e9f41c3c59e17
Signature: c7cd915ea6867222fc2d444c9c692fdc
......@@ -221,6 +221,12 @@ FileType identifyFile(String name, Reader reader) {
case '.tar': return FileType.tar; // Tar
case '.gz': return FileType.gz; // GZip
case '.bzip2': return FileType.bzip2; // BZip2
// Image file types from the Fuchsia SDK.
case '.blk':
case '.vboot':
case '.snapshot':
case '.zbi':
return FileType.binary;
// Special cases
case '.patch':
case '.diff':
......
......@@ -278,6 +278,7 @@ abstract class License implements Comparable<License> {
type = LicenseType.mpl;
break;
case 'http://opensource.org/licenses/MIT':
case 'https://opensource.org/licenses/MIT':
case 'http://opensource->org/licenses/MIT': // i don't even
body = system.File('data/mit').readAsStringSync();
type = LicenseType.mit;
......
......@@ -2048,6 +2048,22 @@ class _RepositoryFlutterDirectory extends _RepositoryDirectory {
}
}
class _RepositoryFuchsiaDirectory extends _RepositoryDirectory {
_RepositoryFuchsiaDirectory(_RepositoryDirectory parent, fs.Directory io) : super(parent, io);
@override
String get libraryName => 'fuchsia_sdk';
@override
bool get isLicenseRoot => true;
@override
bool shouldRecurse(fs.IoNode entry) {
return entry.name != 'toolchain'
&& super.shouldRecurse(entry);
}
}
class _RepositoryFlutterThirdPartyDirectory extends _RepositoryDirectory {
_RepositoryFlutterThirdPartyDirectory(_RepositoryDirectory parent, fs.Directory io) : super(parent, io);
......@@ -2133,6 +2149,8 @@ class _RepositoryRoot extends _RepositoryDirectory {
return _RepositoryRootThirdPartyDirectory(this, entry);
if (entry.name == 'flutter')
return _RepositoryFlutterDirectory(this, entry);
if (entry.name == 'fuchsia')
return _RepositoryFuchsiaDirectory(this, entry);
return super.createSubdirectory(entry);
}
......
......@@ -510,6 +510,42 @@ final List<LicenseFileReferencePattern> csReferencesByFilename = <LicenseFileRef
)
),
// Seen in Fuchsia SDK files
LicenseFileReferencePattern(
firstPrefixIndex: 1,
indentPrefixIndex: 2,
fileIndex: 3,
needsCopyright: false,
pattern: RegExp(
kIndent +
r'Copyright .+\. All rights reserved\. '
r'This is a GENERATED file, see //zircon/system/host/abigen\. '
r'The license governing this file can be found in the (LICENSE) file\.'
.replaceAll(' ', _linebreak),
multiLine: true,
caseSensitive: false,
)
),
// Seen in Fuchsia SDK files.
// TODO(chinmaygarde): This is a broken license file that is being patched
// upstream. Remove this once DX-1477 is patched.
LicenseFileReferencePattern(
firstPrefixIndex: 1,
indentPrefixIndex: 2,
fileIndex: 3,
needsCopyright: false,
pattern: RegExp(
kIndent +
r'Use of this source code is governed by a BSD-style license that can be '
r'Copyright .+\. All rights reserved\. '
r'found in the (LICENSE) file\.'
.replaceAll(' ', _linebreak),
multiLine: true,
caseSensitive: false,
)
),
];
......@@ -679,6 +715,25 @@ final List<MultipleVersionedLicenseReferencePattern> csReferencesByUrl = <Multip
)
),
// MIT
MultipleVersionedLicenseReferencePattern(
firstPrefixIndex: 1,
indentPrefixIndex: 2,
licenseIndices: const <int>[3],
checkLocalFirst: false,
pattern: RegExp(
kIndent +
(
r'Use of this source code is governed by a MIT-style '
r'license that can be found in the LICENSE file or at '
r'(https://opensource.org/licenses/MIT)'
.replaceAll(' ', _linebreak)
),
multiLine: true,
caseSensitive: false,
)
),
// MIT
// the crazy s/./->/ thing is someone being over-eager with search-and-replace in rapidjson
MultipleVersionedLicenseReferencePattern(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册