diff --git a/DEPS b/DEPS index c1a64ef1f9..d5f1c96110 100644 --- a/DEPS +++ b/DEPS @@ -99,7 +99,7 @@ allowed_hosts = [ ] deps = { - 'src': 'https://github.com/flutter/buildroot.git' + '@' + '3dc3ec56b3dc76ba60c8348053a9f6ef3446b0f2', + 'src': 'https://github.com/flutter/buildroot.git' + '@' + '0b267aac6794712a6d9d0f31dda3f844325d0258', # Fuchsia compatibility # @@ -364,7 +364,7 @@ deps = { Var('chromium_git') + '/external/colorama.git' + '@' + '799604a1041e9b3bc5d2789ecbd7e8db2e18e6b8', 'src/third_party/expat': - Var('flutter_git') + '/third_party/expat' + '@' + '1441fc5252746e53b285d15be7e65e4cd74d97eb', + Var('chromium_git') + '/external/github.com/libexpat/libexpat.git' + '@' + 'a28238bdeebc087071777001245df1876a11f5ee', 'src/third_party/freetype2': Var('flutter_git') + '/third_party/freetype2' + '@' + '1f03c1b2d7f2ae832a4fbe9d12bd96c3c15bbece', diff --git a/engine/src/flutter/ci/licenses_golden/tool_signature b/engine/src/flutter/ci/licenses_golden/tool_signature index 3b73ebc09a..72e195691e 100644 --- a/engine/src/flutter/ci/licenses_golden/tool_signature +++ b/engine/src/flutter/ci/licenses_golden/tool_signature @@ -1,2 +1,2 @@ -Signature: b868c0ccb9fa443bfee873dcaa5a0fc6 +Signature: cfae70279279e1439f8c121bf3795393 diff --git a/engine/src/flutter/tools/licenses/lib/main.dart b/engine/src/flutter/tools/licenses/lib/main.dart index 42f7efe15c..fed0e066f6 100644 --- a/engine/src/flutter/tools/licenses/lib/main.dart +++ b/engine/src/flutter/tools/licenses/lib/main.dart @@ -52,9 +52,9 @@ abstract class _RepositoryLicensedFile extends _RepositoryFile { // file names that we are confident won't be included in the final build product static final RegExp _readmeNamePattern = RegExp(r'\b_*(?:readme|contributing|patents)_*\b', caseSensitive: false); - static final RegExp _buildTimePattern = RegExp(r'^(?!.*gen$)(?:CMakeLists\.txt|(?:pkgdata)?Makefile(?:\.inc)?(?:\.am|\.in|)|configure(?:\.ac|\.in)?|config\.(?:sub|guess)|.+\.m4|install-sh|.+\.sh|.+\.bat|.+\.pyc?|.+\.pl|icu-configure|.+\.gypi?|.*\.gni?|.+\.mk|.+\.cmake|.+\.gradle|.+\.yaml|pubspec\.lock|\.packages|vms_make\.com|pom\.xml|\.project|source\.properties|.+\.obj|.+\.autopkg)$', caseSensitive: false); + static final RegExp _buildTimePattern = RegExp(r'^(?!.*gen$)(?:CMakeLists\.txt|(?:pkgdata)?Makefile(?:\.inc)?(?:\.am|\.in|)|configure(?:\.ac|\.in)?|config\.(?:sub|guess)|.+\.m4|install-sh|.+\.sh|.+\.bat|.+\.pyc?|.+\.pl|icu-configure|.+\.gypi?|.*\.gni?|.+\.mk|.+\.cmake|.+\.gradle|.+\.yaml|pubspec\.lock|\.packages|vms_make\.com|pom\.xml|\.project|source\.properties|.+\.obj|.+\.autopkg|Brewfile)$', caseSensitive: false); static final RegExp _docsPattern = RegExp(r'^(?:INSTALL|NEWS|OWNERS|AUTHORS|ChangeLog(?:\.rst|\.[0-9]+)?|.+\.txt|.+\.md|.+\.log|.+\.css|.+\.1|doxygen\.config|Doxyfile|.+\.spec(?:\.in)?)$', caseSensitive: false); - static final RegExp _devPattern = RegExp(r'^(?:codereview\.settings|.+\.~|.+\.~[0-9]+~|\.clang-format|\.gitattributes|\.landmines|\.DS_Store|\.travis\.yml|\.cirrus\.yml|\.cache)$', caseSensitive: false); + static final RegExp _devPattern = RegExp(r'^(?:codereview\.settings|.+\.~|.+\.~[0-9]+~|\.clang-format|\.gitattributes|\.landmines|\.DS_Store|\.travis\.yml|\.cirrus\.yml|\.cache|\.mailmap)$', caseSensitive: false); static final RegExp _testsPattern = RegExp(r'^(?:tj(?:bench|example)test\.(?:java\.)?in|example\.c)$', caseSensitive: false); // The ICU library has sample code that will never get linked. static final RegExp _icuSamplesPattern = RegExp(r'.*(?:icu\/source\/samples).*$', caseSensitive: false); @@ -1362,6 +1362,23 @@ class _RepositoryExpatDirectory extends _RepositoryDirectory { @override bool get subdirectoriesAreLicenseRoots => true; + + @override + _RepositoryDirectory createSubdirectory(fs.Directory entry) { + if (entry.name == 'expat') + return _RepositoryExpatExpatDirectory(this, entry); + return super.createSubdirectory(entry); + } +} + +class _RepositoryExpatExpatDirectory extends _RepositoryDirectory { + _RepositoryExpatExpatDirectory(_RepositoryDirectory parent, fs.Directory io) : super(parent, io); + + @override + bool shouldRecurse(fs.IoNode entry) { + return entry.name != 'doc' // we don't ship the documentation + && super.shouldRecurse(entry); + } } class _RepositoryFreetypeDocsDirectory extends _RepositoryDirectory { diff --git a/engine/src/flutter/tools/licenses/lib/patterns.dart b/engine/src/flutter/tools/licenses/lib/patterns.dart index d7711d34b8..27980a6757 100644 --- a/engine/src/flutter/tools/licenses/lib/patterns.dart +++ b/engine/src/flutter/tools/licenses/lib/patterns.dart @@ -189,13 +189,6 @@ final List csNoCopyrights = [ // used with _tryNone // groups are ignored - // Seen in Expat files - RegExp( - r'^// No copyright notice; this file based on autogenerated header', - multiLine: true, - caseSensitive: false - ), - // Seen in Android NDK RegExp( r'^[/* ]*This header was automatically generated from a Linux kernel header\n' @@ -403,33 +396,6 @@ final List csReferencesByFilename = csLicenses = [ // MIT-DERIVED LICENSES // Seen in Mesa, among others. - // A version with "// -------" between sections seen in ffx_spd. RegExp( kIndent + + ( + r'(?:' // this bit is optional + r'Licensed under the MIT license:\r?\n' // seen in expat + r'\1\2? *\r?\n' // blank line + r'\1\2' // this is the prefix for the next block (handled by kIndent if this optional bit is skipped) + r')?' // end of optional bit + ) + + ( r'Permission is hereby granted, free of charge, to any person obtaining ' r'a copy of this software and(?: /or)? associated documentation files \(the "(?:Software|Materials) "\), ' @@ -1593,7 +1566,7 @@ final List csLicenses = [ r'(?:' + ( - r'(?:(?:\1\2?(?: *| -*))? *\r?\n)*' + r'(?:(?:\1\2?(?: *| -*))? *\r?\n)*' // A version with "// -------" between sections was seen in ffx_spd, hence the -*. +