Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,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 = [
Expand Down
1,686 changes: 1,686 additions & 0 deletions ci/licenses_golden/licenses_fuchsia

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ci/licenses_golden/tool_signature
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Signature: f2113ac67466eb24d34e9f41c3c59e17
Signature: c7cd915ea6867222fc2d444c9c692fdc

6 changes: 6 additions & 0 deletions tools/licenses/lib/filesystem.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down
1 change: 1 addition & 0 deletions tools/licenses/lib/licenses.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
18 changes: 18 additions & 0 deletions tools/licenses/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
}

Expand Down
55 changes: 55 additions & 0 deletions tools/licenses/lib/patterns.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
),

];


Expand Down Expand Up @@ -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(
Expand Down