webrtc_m130/tools_webrtc/libs/generate_licenses.py

266 lines
10 KiB
Python
Raw Normal View History

#!/usr/bin/env vpython3
# Copyright 2016 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
"""Generates license markdown for a prebuilt version of WebRTC.
Licenses are taken from dependent libraries which are determined by
GN desc command `gn desc` on all targets specified via `--target` argument.
One can see all dependencies by invoking this command:
$ gn.py desc --all --format=json <out_directory> <target> | \
vpython3 -m json.tool
(see "deps" subarray)
Libraries are mapped to licenses via LIB_TO_LICENSES_DICT dictionary.
"""
import sys
import argparse
import json
import logging
import os
import re
import subprocess
from html import escape
# Third_party library to licences mapping. Keys are names of the libraries
# (right after the `third_party/` prefix)
LIB_TO_LICENSES_DICT = {
'abseil-cpp': ['third_party/abseil-cpp/LICENSE'],
'android_ndk': ['third_party/android_ndk/NOTICE'],
'android_sdk': ['third_party/android_sdk/LICENSE'],
'auto': [
'third_party/android_deps/libs/'
'com_google_auto_service_auto_service/LICENSE'
],
'boringssl': ['third_party/boringssl/src/LICENSE'],
'crc32c': ['third_party/crc32c/src/LICENSE'],
'cpu_features': ['third_party/cpu_features/src/LICENSE'],
'dav1d': ['third_party/dav1d/LICENSE'],
'errorprone': [
'third_party/android_deps/libs/'
'com_google_errorprone_error_prone_core/LICENSE'
],
'fiat': ['third_party/boringssl/src/third_party/fiat/LICENSE'],
'guava': ['third_party/android_deps/libs/com_google_guava_guava/LICENSE'],
'ijar': ['third_party/ijar/LICENSE'],
'jsoncpp': ['third_party/jsoncpp/LICENSE'],
'libaom': ['third_party/libaom/source/libaom/LICENSE'],
'libc++': ['buildtools/third_party/libc++/trunk/LICENSE.TXT'],
'libc++abi': ['buildtools/third_party/libc++abi/trunk/LICENSE.TXT'],
'libevent': ['third_party/libevent/LICENSE'],
'libjpeg_turbo': ['third_party/libjpeg_turbo/LICENSE.md'],
'libsrtp': ['third_party/libsrtp/LICENSE'],
Roll chromium_revision 867b87eb29..b56d8868f3 (933713:941610) Change log: https://chromium.googlesource.com/chromium/src/+log/867b87eb29..b56d8868f3 Full diff: https://chromium.googlesource.com/chromium/src/+/867b87eb29..b56d8868f3 Changed dependencies * src/base: https://chromium.googlesource.com/chromium/src/base/+log/14c89123e6..b367343820 * src/build: https://chromium.googlesource.com/chromium/src/build/+log/a0368daa25..d134d68f00 * src/buildtools: https://chromium.googlesource.com/chromium/src/buildtools/+log/aa2fb0187c..b138e6ce86 * src/buildtools/linux64: git_revision:693f9fb87e4febdd4299db9f73d8d2c958e63148..git_revision:90294ccdcf9334ed25a76ac9b67689468e506342 * src/buildtools/mac: git_revision:693f9fb87e4febdd4299db9f73d8d2c958e63148..git_revision:90294ccdcf9334ed25a76ac9b67689468e506342 * src/buildtools/third_party/libc++abi/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git/+log/4c834abe6f..707d75f53e * src/buildtools/third_party/libunwind/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind.git/+log/10f4e4a5b5..51ffc5ed5c * src/buildtools/win: git_revision:693f9fb87e4febdd4299db9f73d8d2c958e63148..git_revision:90294ccdcf9334ed25a76ac9b67689468e506342 * src/ios: https://chromium.googlesource.com/chromium/src/ios/+log/eb1001b206..af72ede971 * src/testing: https://chromium.googlesource.com/chromium/src/testing/+log/650a2f9467..619bca0ef9 * src/third_party: https://chromium.googlesource.com/chromium/src/third_party/+log/bc52b47596..5f94f37f8c * src/third_party/android_build_tools/aapt2: oJ_fhfmT6sLorimH6Eo6hwWS2R2gU0c4ZUQfXvzae1UC..GlCdqxHxlg-8YkDGgj5cie-6COsEAZga9jyq-LAYxY4C * src/third_party/android_build_tools/bundletool: OZ4is33usuZy-deP3FpWCtbKXaIY0qBLsElWte7556YC..2ZcLVDxyRwp8FzpeYLtLT0TfSRweZxvwh1-Kx1jZ_FoC * src/third_party/android_deps/libs/com_google_android_material_material: version:2@1.5.0-alpha02.cr0..version:2@1.5.0-alpha05.cr0 * src/third_party/android_deps/libs/com_google_errorprone_error_prone_annotation: version:2@2.9.0.cr0..version:2@2.10.0.cr0 * src/third_party/android_deps/libs/com_google_errorprone_error_prone_annotations: version:2@2.9.0.cr0..version:2@2.10.0.cr0 * src/third_party/android_deps/libs/com_google_errorprone_error_prone_check_api: version:2@2.9.0.cr0..version:2@2.10.0.cr0 * src/third_party/android_deps/libs/com_google_errorprone_error_prone_core: version:2@2.9.0.cr0..version:2@2.10.0.cr0 * src/third_party/android_deps/libs/com_google_errorprone_error_prone_type_annotations: version:2@2.9.0.cr0..version:2@2.10.0.cr0 * src/third_party/androidx: Dewv4glpYqPtnvaOzHgVF6074yDsYzzDFiv0dO1ijwgC..nCX115noKlFOaRMhmFKd1v01hnVpUAaKg2SyLFZaYZgC * src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/45c8be91f3..69030a0cea * src/third_party/breakpad/breakpad: https://chromium.googlesource.com/breakpad/breakpad.git/+log/ff5892c5da..ee2ad61263 * src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/2d036344bd..a7ad5b5c96 * src/third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/5cffc195c9..9fcfde2499 * src/third_party/freetype/src: https://chromium.googlesource.com/chromium/src/third_party/freetype2.git/+log/fde91ab8f1..d31bafcb9c * src/third_party/googletest/src: https://chromium.googlesource.com/external/github.com/google/googletest.git/+log/16f637fbf4..1b18723e87 * src/third_party/icu: https://chromium.googlesource.com/chromium/deps/icu.git/+log/eedbaf76e4..3e05d9daa9 * src/third_party/libvpx/source/libvpx: https://chromium.googlesource.com/webm/libvpx.git/+log/7aabd69682..e259e6951d * src/third_party/perfetto: https://android.googlesource.com/platform/external/perfetto.git/+log/844b8662e9..5ed467a290 * src/third_party/r8: EU82Aqeu2B1PZzAmebHXfyOgeL2UZifcIJ1LPyoThw0C..nqWomZTwNDoogX26WeCSoFGg6aQN1FrwzoU4hCS0duEC * src/third_party/turbine: 6QYCyqU5yXkAT7T-_K3sCPvfISI8ACXF_cW4OM5v9BgC..KbLQUR_KFiUEzVt1lMTORY96bz_PbMwC3GwIb1oGJmAC * src/tools: https://chromium.googlesource.com/chromium/src/tools/+log/f4333a2a39..a182115705 * src/tools/luci-go: git_revision:d1c03082ecda0148d8096f1fd8bf5491eafc7323..git_revision:0e76392e6557cc3ff8d95c3bc012540e0dbc128a * src/tools/luci-go: git_revision:d1c03082ecda0148d8096f1fd8bf5491eafc7323..git_revision:0e76392e6557cc3ff8d95c3bc012540e0dbc128a Added dependency * src/third_party/android_deps/libs/com_google_flatbuffers_flatbuffers_java DEPS diff: https://chromium.googlesource.com/chromium/src/+/867b87eb29..b56d8868f3/DEPS Clang version changed llvmorg-14-init-6722-g0fbd3aad:llvmorg-14-init-8564-g34b903d8 Details: https://chromium.googlesource.com/chromium/src/+/867b87eb29..b56d8868f3/tools/clang/scripts/update.py TBR=chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com,marpan@webrtc.org, jianj@chromium.org, BUG=None No-Presubmit: True Change-Id: I721d681c6c0a687c782fa1f34ea6cea3fba6ce02 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237761 Reviewed-by: Xavier Lepaul‎ <xalep@webrtc.org> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com> Reviewed-by: Artem Titov <titovartem@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#35347}
2021-11-15 15:41:28 +01:00
'libunwind': ['buildtools/third_party/libunwind/trunk/LICENSE.TXT'],
'libvpx': ['third_party/libvpx/source/libvpx/LICENSE'],
'libyuv': ['third_party/libyuv/LICENSE'],
'nasm': ['third_party/nasm/LICENSE'],
'opus': ['third_party/opus/src/COPYING'],
'pffft': ['third_party/pffft/LICENSE'],
'protobuf': ['third_party/protobuf/LICENSE'],
Reland "Reland "AGC2 RNN VAD: Recurrent Neural Network impl"" This reverts commit 3c9f47434f0af3b16f1b8f43cd4500be6fd2ac17. Reason for revert: downstream projects fixed Original change's description: > Revert "Reland "AGC2 RNN VAD: Recurrent Neural Network impl"" > > This reverts commit e0bba68edea74ca33f4c492eba290c089f233f6b. > > Reason for revert: <INSERT REASONING HERE> > > Original change's description: > > Reland "AGC2 RNN VAD: Recurrent Neural Network impl" > > > > This reverts commit 97e349ace7a3fd64fff270f0d780e02bb708f503. > > > > Reason for revert: downstream projects fixed > > > > Original change's description: > > > Revert "AGC2 RNN VAD: Recurrent Neural Network impl" > > > > > > This reverts commit 2491cb73820fe82923b848dfcab6772b4b0addb0. > > > > > > Reason for revert: broke internal build > > > > > > Original change's description: > > > > AGC2 RNN VAD: Recurrent Neural Network impl > > > > > > > > RNN implementation for the AGC2 VAD that includes a fully connected > > > > layer and a gated recurrent unit layer. > > > > > > > > Bug: webrtc:9076 > > > > Change-Id: Ibb8b0b4e9213f09eb9dbe118bbdc94d7e8e4f91b > > > > Reviewed-on: https://webrtc-review.googlesource.com/72060 > > > > Reviewed-by: Patrik Höglund <phoglund@webrtc.org> > > > > Reviewed-by: Alex Loiko <aleloi@webrtc.org> > > > > Reviewed-by: Ivo Creusen <ivoc@webrtc.org> > > > > Commit-Queue: Alessio Bazzica <alessiob@webrtc.org> > > > > Cr-Commit-Position: refs/heads/master@{#23101} > > > > > > TBR=phoglund@webrtc.org,alessiob@webrtc.org,aleloi@webrtc.org,ivoc@webrtc.org > > > > > > Change-Id: Ic311c4b7d79094e959d3a2c4a53c398f34c954e2 > > > No-Presubmit: true > > > No-Tree-Checks: true > > > No-Try: true > > > Bug: webrtc:9076 > > > Reviewed-on: https://webrtc-review.googlesource.com/74200 > > > Reviewed-by: Sam Zackrisson <saza@webrtc.org> > > > Commit-Queue: Sam Zackrisson <saza@webrtc.org> > > > Cr-Commit-Position: refs/heads/master@{#23103} > > > > TBR=phoglund@webrtc.org,saza@webrtc.org,alessiob@webrtc.org,aleloi@webrtc.org,ivoc@webrtc.org > > > > Change-Id: I0c7f8e0f59be926322d05b1da1d4d19c0777dab2 > > No-Presubmit: true > > No-Tree-Checks: true > > No-Try: true > > Bug: webrtc:9076 > > Reviewed-on: https://webrtc-review.googlesource.com/74460 > > Reviewed-by: Alessio Bazzica <alessiob@webrtc.org> > > Commit-Queue: Alessio Bazzica <alessiob@webrtc.org> > > Cr-Commit-Position: refs/heads/master@{#23113} > > TBR=phoglund@webrtc.org,saza@webrtc.org,alessiob@webrtc.org,aleloi@webrtc.org,ivoc@webrtc.org > > Change-Id: I3985a6d38df1d4438a50d031bc9f6cf41eb83121 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: webrtc:9076 > Reviewed-on: https://webrtc-review.googlesource.com/74560 > Reviewed-by: Sam Zackrisson <saza@webrtc.org> > Commit-Queue: Sam Zackrisson <saza@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#23117} TBR=phoglund@webrtc.org,saza@webrtc.org,alessiob@webrtc.org,aleloi@webrtc.org,ivoc@webrtc.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: webrtc:9076 Change-Id: I4d81786837017d4daf0dbb1218306795b977ade5 Reviewed-on: https://webrtc-review.googlesource.com/74760 Reviewed-by: Alessio Bazzica <alessiob@webrtc.org> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org> Cr-Commit-Position: refs/heads/master@{#23138}
2018-05-07 09:29:54 +00:00
'rnnoise': ['third_party/rnnoise/COPYING'],
'webrtc': ['LICENSE'],
'zlib': ['third_party/zlib/LICENSE'],
'base64': ['rtc_base/third_party/base64/LICENSE'],
'sigslot': ['rtc_base/third_party/sigslot/LICENSE'],
'portaudio': ['modules/third_party/portaudio/LICENSE'],
'fft': ['modules/third_party/fft/LICENSE'],
'g711': ['modules/third_party/g711/LICENSE'],
'g722': ['modules/third_party/g722/LICENSE'],
'ooura': ['common_audio/third_party/ooura/LICENSE'],
'spl_sqrt_floor': ['common_audio/third_party/spl_sqrt_floor/LICENSE'],
Roll chromium_revision e182675fbb..2e99d26f79 (1098562:1102579) Change log: https://chromium.googlesource.com/chromium/src/+log/e182675fbb..2e99d26f79 Full diff: https://chromium.googlesource.com/chromium/src/+/e182675fbb..2e99d26f79 Changed dependencies * src/base: https://chromium.googlesource.com/chromium/src/base/+log/5f5494ca68..ff1fad290c * src/build: https://chromium.googlesource.com/chromium/src/build/+log/882a4eaafa..1927b9f65b * src/buildtools: https://chromium.googlesource.com/chromium/src/buildtools/+log/3c7e3f1b8b..8d801d3675 * src/buildtools/linux64: git_revision:5e19d2fb166fbd4f6f32147fbb2f497091a54ad8..git_revision:edf6ef4b06b42c58292faea78498aff76bdf68ed * src/buildtools/mac: git_revision:5e19d2fb166fbd4f6f32147fbb2f497091a54ad8..git_revision:edf6ef4b06b42c58292faea78498aff76bdf68ed * src/buildtools/third_party/libc++/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxx.git/+log/1127c78cf9..6569774a33 * src/buildtools/third_party/libc++abi/trunk: https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git/+log/d520d582aa..b74d771611 * src/buildtools/win: git_revision:5e19d2fb166fbd4f6f32147fbb2f497091a54ad8..git_revision:edf6ef4b06b42c58292faea78498aff76bdf68ed * src/ios: https://chromium.googlesource.com/chromium/src/ios/+log/6a6fc13416..aa6029a62f * src/testing: https://chromium.googlesource.com/chromium/src/testing/+log/fb8aa9ad33..c8fdd94c0f * src/third_party: https://chromium.googlesource.com/chromium/src/third_party/+log/adbb0963bd..1f4e92205f * src/third_party/android_build_tools/bundletool: XIPSJgFHEHN1ogOJqWVktlbl8PTfLZdNf_G2h4GcnrYC..TpDdbF-PPgwL0iOVsdLM07L-DUp2DV3hgzCMmPd2_GUC * src/third_party/android_build_tools/manifest_merger: 5Zw4RYBL86koJro2O-jjcZYxOOdEW-hJDYykae8efQAC..gzy9U2HI42hR8r1zspR-mPI3BQ6I3zTmJ3GojAQrvgcC * src/third_party/android_deps/libs/net_bytebuddy_byte_buddy: version:2@1.12.13.cr1..version:2@1.12.22.cr1 * src/third_party/android_deps/libs/net_bytebuddy_byte_buddy_agent: version:2@1.12.13.cr1..version:2@1.12.22.cr1 * src/third_party/android_deps/libs/org_mockito_mockito_core: version:2@4.7.0.cr1..version:2@5.1.1.cr1 * src/third_party/android_deps/libs/org_objenesis_objenesis: version:2@3.2.cr1..version:2@3.3.cr1 * src/third_party/androidx: Hdb7ZPqGV3lLyY7geGwmoelVab7mxM0oA0jtglEVp2MC..DmFWfKTs5X8UZayNJFuL3kDaONOVDU9NarTxeqLoyRYC * src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/45b8d7bbd7..0586618453 * src/third_party/breakpad/breakpad: https://chromium.googlesource.com/breakpad/breakpad.git/+log/79326ebe94..5687ac51ca * src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/35d06490ad..bf85e76dc3 * src/third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/9d77ca716f..9d4c379aeb * src/third_party/ffmpeg: https://chromium.googlesource.com/chromium/third_party/ffmpeg.git/+log/dcb9e9003f..f2459ece25 * src/third_party/freetype/src: https://chromium.googlesource.com/chromium/src/third_party/freetype2.git/+log/bea675cde6..d3582e3f8d * src/third_party/icu: https://chromium.googlesource.com/chromium/deps/icu.git/+log/2c51e5cc7e..266a46937f * src/third_party/libaom/source/libaom: https://aomedia.googlesource.com/aom.git/+log/706ee36dcc..70b12695e1 * src/third_party/libjpeg_turbo: https://chromium.googlesource.com/chromium/deps/libjpeg_turbo.git/+log/ed683925e4..0b6e6a1522 * src/third_party/perfetto: https://android.googlesource.com/platform/external/perfetto.git/+log/81c39bac7b..79b41912cc * src/third_party/r8: kTwoRbYJ0cNEX_B1XARsNkSFKf4bOHgQCEiP4afsmBUC..7NX1KWQ3KHKbmaaxraYpk3oE7zBzlk8IcJ4_srR86PAC * src/tools: https://chromium.googlesource.com/chromium/src/tools/+log/ff1e059133..0b98659319 * src/tools/luci-go: git_revision:221383f749a2c5b8587449d3d2e4982857daa9e7..git_revision:a8b84fba102daff5bf5e65975dcc0887da7ab62a * src/tools/luci-go: git_revision:221383f749a2c5b8587449d3d2e4982857daa9e7..git_revision:a8b84fba102daff5bf5e65975dcc0887da7ab62a Removed dependencies * src/third_party/android_deps/libs/org_jetbrains_annotations * src/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib * src/third_party/android_deps/libs/org_jetbrains_kotlin_kotlin_stdlib_common DEPS diff: https://chromium.googlesource.com/chromium/src/+/e182675fbb..2e99d26f79/DEPS No update to Clang. BUG=None Change-Id: Ie1922d8814728fe1773c46c7a1de5a8956b359ce Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292608 Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Jeremy Leconte <jleconte@webrtc.org> Reviewed-by: Jeremy Leconte <jleconte@google.com> Cr-Commit-Position: refs/heads/main@{#39269}
2023-02-08 09:43:13 +00:00
'kotlin_stdlib': ['third_party/kotlin_stdlib/LICENSE'],
# TODO(bugs.webrtc.org/1110): Remove this hack. This is not a lib.
# For some reason it is listed as so in _GetThirdPartyLibraries.
'android_deps': [],
Roll chromium_revision 4231e93dbb..b86bc4feb4 (850549:852112) Change log: https://chromium.googlesource.com/chromium/src/+log/4231e93dbb..b86bc4feb4 Full diff: https://chromium.googlesource.com/chromium/src/+/4231e93dbb..b86bc4feb4 Changed dependencies * src/base: https://chromium.googlesource.com/chromium/src/base/+log/459d6e0ed6..632b766e09 * src/build: https://chromium.googlesource.com/chromium/src/build/+log/923bed7ac7..44961f39c0 * src/ios: https://chromium.googlesource.com/chromium/src/ios/+log/fe5fb848f5..4a8f8b624f * src/testing: https://chromium.googlesource.com/chromium/src/testing/+log/967a8819da..dfd112748a * src/third_party: https://chromium.googlesource.com/chromium/src/third_party/+log/381d9c2c68..b80167f37a * src/third_party/android_deps/libs/com_google_android_gms_play_services_base: version:17.1.0-cr0..version:17.5.0-cr0 * src/third_party/android_deps/libs/com_google_android_gms_play_services_basement: version:17.1.0-cr0..version:17.5.0-cr0 * src/third_party/android_deps/libs/com_google_android_gms_play_services_fido: version:18.1.0-cr0..version:19.0.0-beta-cr0 * src/third_party/android_deps/libs/com_google_android_gms_play_services_tasks: version:17.0.0-cr0..version:17.2.0-cr0 * src/third_party/androidx: zGdAyNdySwhTXOWTtAushFRKlDwCWGcYSWiaS2R5m8YC..W-1EHWPYZ8HdH_e2dRy2kb3kD-vOHJ1996OkW7qs9LIC * src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/5c5a2976d5..cf4c59a332 * src/third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/680a6c37a0..79f916afab * src/third_party/freetype/src: https://chromium.googlesource.com/chromium/src/third_party/freetype2.git/+log/fd7f92b6f0..947e475283 * src/third_party/icu: https://chromium.googlesource.com/chromium/deps/icu.git/+log/70dd9a65bf..12825ed8aa * src/third_party/libaom/source/libaom: https://aomedia.googlesource.com/aom.git/+log/61c6fda0fd..648c6507f1 * src/third_party/perfetto: https://android.googlesource.com/platform/external/perfetto.git/+log/7cb370fb0a..b05d9d92a0 * src/third_party/usrsctp/usrsctplib: https://chromium.googlesource.com/external/github.com/sctplab/usrsctp/+log/37a9dc3e18..a6647318b5 * src/tools: https://chromium.googlesource.com/chromium/src/tools/+log/e1bc2e94ff..916b66ee11 Removed dependencies * src/third_party/android_deps/libs/androidx_test_espresso_espresso_contrib * src/third_party/android_deps/libs/androidx_test_runner * src/third_party/android_deps/libs/androidx_print_print * src/third_party/android_deps/libs/androidx_slice_slice_core * src/third_party/android_deps/libs/androidx_test_ext_junit * src/third_party/android_deps/libs/androidx_cardview_cardview * src/third_party/android_deps/libs/androidx_test_monitor * src/third_party/android_deps/libs/androidx_exifinterface_exifinterface * src/third_party/android_deps/libs/androidx_legacy_legacy_support_core_ui * src/third_party/android_deps/libs/androidx_media_media * src/third_party/android_deps/libs/androidx_test_core * src/third_party/android_deps/libs/androidx_customview_customview * src/third_party/android_deps/libs/androidx_vectordrawable_vectordrawable * src/third_party/android_deps/libs/androidx_test_espresso_espresso_idling_resource * src/third_party/android_deps/libs/androidx_core_core * src/third_party/android_deps/libs/androidx_annotation_annotation * src/third_party/android_deps/libs/androidx_collection_collection * src/third_party/android_deps/libs/androidx_lifecycle_lifecycle_livedata * src/third_party/android_deps/libs/androidx_asynclayoutinflater_asynclayoutinflater * src/third_party/android_deps/libs/androidx_test_espresso_espresso_web * src/third_party/android_deps/libs/androidx_viewpager_viewpager * src/third_party/android_deps/libs/androidx_vectordrawable_vectordrawable_animated * src/third_party/android_deps/libs/androidx_multidex_multidex * src/third_party/android_deps/libs/androidx_arch_core_core_common * src/third_party/android_deps/libs/androidx_activity_activity * src/third_party/android_deps/libs/androidx_lifecycle_lifecycle_viewmodel_savedstate * src/third_party/android_deps/libs/androidx_gridlayout_gridlayout * src/third_party/android_deps/libs/androidx_test_rules * src/third_party/android_deps/libs/androidx_concurrent_concurrent_futures * src/third_party/android_deps/libs/androidx_lifecycle_lifecycle_common_java8 * src/third_party/android_deps/libs/androidx_test_uiautomator_uiautomator * src/third_party/android_deps/libs/androidx_transition_transition * src/third_party/android_deps/libs/androidx_fragment_fragment * src/third_party/android_deps/libs/androidx_slice_slice_builders * src/third_party/android_deps/libs/androidx_localbroadcastmanager_localbroadcastmanager * src/third_party/android_deps/libs/androidx_cursoradapter_cursoradapter * src/third_party/android_deps/libs/androidx_core_core_animation * src/third_party/android_deps/libs/androidx_annotation_annotation_experimental * src/third_party/android_deps/libs/androidx_loader_loader * src/third_party/android_deps/libs/androidx_appcompat_appcompat_resources * src/third_party/android_deps/libs/androidx_lifecycle_lifecycle_common * src/third_party/android_deps/libs/androidx_palette_palette * src/third_party/android_deps/libs/androidx_lifecycle_lifecycle_viewmodel * src/third_party/android_deps/libs/androidx_appcompat_appcompat * src/third_party/android_deps/libs/androidx_remotecallback_remotecallback * src/third_party/android_deps/libs/androidx_slidingpanelayout_slidingpanelayout * src/third_party/android_deps/libs/androidx_arch_core_core_runtime * src/third_party/android_deps/libs/androidx_swiperefreshlayout_swiperefreshlayout * src/third_party/android_deps/libs/androidx_legacy_legacy_support_v4 * src/third_party/android_deps/libs/androidx_versionedparcelable_versionedparcelable * src/third_party/android_deps/libs/androidx_viewpager2_viewpager2 * src/third_party/android_deps/libs/androidx_legacy_legacy_support_core_utils * src/third_party/android_deps/libs/androidx_test_espresso_espresso_intents * src/third_party/android_deps/libs/androidx_recyclerview_recyclerview * src/third_party/android_deps/libs/androidx_savedstate_savedstate * src/third_party/android_deps/libs/androidx_test_espresso_espresso_core * src/third_party/android_deps/libs/androidx_leanback_leanback * src/third_party/android_deps/libs/androidx_tracing_tracing * src/third_party/android_deps/libs/androidx_interpolator_interpolator * src/third_party/android_deps/libs/androidx_coordinatorlayout_coordinatorlayout * src/third_party/android_deps/libs/androidx_documentfile_documentfile * src/third_party/android_deps/libs/androidx_leanback_leanback_preference * src/third_party/android_deps/libs/androidx_drawerlayout_drawerlayout * src/third_party/android_deps/libs/androidx_tvprovider_tvprovider * src/third_party/android_deps/libs/androidx_lifecycle_lifecycle_runtime * src/third_party/android_deps/libs/androidx_mediarouter_mediarouter * src/third_party/android_deps/libs/androidx_webkit_webkit * src/third_party/android_deps/libs/androidx_lifecycle_lifecycle_livedata_core * src/third_party/android_deps/libs/androidx_preference_preference DEPS diff: https://chromium.googlesource.com/chromium/src/+/4231e93dbb..b86bc4feb4/DEPS Clang version changed llvmorg-12-init-17251-g6de48655:llvmorg-13-init-794-g83e2710e Details: https://chromium.googlesource.com/chromium/src/+/4231e93dbb..b86bc4feb4/tools/clang/scripts/update.py TBR=chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com, BUG=None Change-Id: I7e9dd36721b938e5980d04df62c46758270ffa04 No-Presubmit: True No-Try: True Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206449 Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Autoroller <chromium-webrtc-autoroll@webrtc-ci.iam.gserviceaccount.com> Cr-Commit-Position: refs/heads/master@{#33200}
2021-02-09 10:37:52 +01:00
# This is not a library but a collection of libraries.
'androidx': [],
# Compile time dependencies, no license needed:
'ow2_asm': [],
Roll chromium_revision 0cd53b97fa..e728aee5f1 (770251:774589) Change log: https://chromium.googlesource.com/chromium/src/+log/0cd53b97fa..e728aee5f1 Full diff: https://chromium.googlesource.com/chromium/src/+/0cd53b97fa..e728aee5f1 Changed dependencies * src/base: https://chromium.googlesource.com/chromium/src/base/+log/234742ffa0..e2680ca915 * src/build: https://chromium.googlesource.com/chromium/src/build/+log/814cd0c441..3706c78319 * src/buildtools: https://chromium.googlesource.com/chromium/src/buildtools/+log/64ebbe62e1..7a0ebcc840 * src/buildtools/linux64: git_revision:ab32747ae7a399c57b04280f38e49b8fdf237a8a..git_revision:d0a6f072070988e7b038496c4e7d6c562b649732 * src/buildtools/mac: git_revision:ab32747ae7a399c57b04280f38e49b8fdf237a8a..git_revision:d0a6f072070988e7b038496c4e7d6c562b649732 * src/buildtools/win: git_revision:ab32747ae7a399c57b04280f38e49b8fdf237a8a..git_revision:d0a6f072070988e7b038496c4e7d6c562b649732 * src/ios: https://chromium.googlesource.com/chromium/src/ios/+log/c3b92e2864..9cb0749680 * src/testing: https://chromium.googlesource.com/chromium/src/testing/+log/6bd825eb6a..f5f2b604a8 * src/third_party: https://chromium.googlesource.com/chromium/src/third_party/+log/52a7c4e5e0..b9df2cbf82 * src/third_party/android_deps/libs/androidx_coordinatorlayout_coordinatorlayout: version:1.0.0-cr0..version:1.1.0-cr0 * src/third_party/android_deps/libs/androidx_recyclerview_recyclerview: version:1.0.0-cr0..version:1.1.0-cr0 * src/third_party/android_deps/libs/androidx_test_espresso_espresso_core: version:3.1.0-cr0..version:3.2.0-cr0 * src/third_party/android_deps/libs/androidx_test_espresso_espresso_idling_resource: version:3.1.0-cr0..version:3.2.0-cr0 * src/third_party/android_deps/libs/androidx_transition_transition: version:1.0.0-rc02-cr0..version:1.2.0-cr0 * src/third_party/android_deps/libs/com_google_android_material_material: version:1.0.0-rc02-cr0..version:1.2.0-alpha06-cr0 * src/third_party/boringssl/src: https://boringssl.googlesource.com/boringssl.git/+log/78b3337a10..2309f645e5 * src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/503f81b8fe..15d5f65efa * src/third_party/depot_tools: https://chromium.googlesource.com/chromium/tools/depot_tools.git/+log/5a7be3da21..cf77d6e387 * src/third_party/googletest/src: https://chromium.googlesource.com/external/github.com/google/googletest.git/+log/a09ea700d3..cb44c86c1a * src/third_party/harfbuzz-ng/src: https://chromium.googlesource.com/external/github.com/harfbuzz/harfbuzz.git/+log/100d40c827..e3af529e51 * src/third_party/icu: https://chromium.googlesource.com/chromium/deps/icu.git/+log/f222396170..630b884f84 * src/third_party/libaom/source/libaom: https://aomedia.googlesource.com/aom.git/+log/c810066815..2aa13c436e * src/third_party/libunwindstack: https://chromium.googlesource.com/chromium/src/third_party/libunwindstack.git/+log/dfd3f3d84c..046920fc49 * src/third_party/libvpx/source/libvpx: https://chromium.googlesource.com/webm/libvpx.git/+log/1243d2fc27..f80e888723 * src/third_party/r8: UAycWqc5QfELtJhhnoU4jQHjsyxPjRNyZ0EfvlojaY4C..gobCh01BNwJNyLHHNFUmLWSMaAbe4x3izuzBFzxQpDoC * src/tools: https://chromium.googlesource.com/chromium/src/tools/+log/5a602c7ac7..ea65b4f041 * src/tools/swarming_client: https://chromium.googlesource.com/infra/luci/client-py.git/+log/7e8636295f..90c5e17a82 Added dependencies * src/third_party/android_deps/libs/androidx_test_espresso_espresso_contrib * src/third_party/android_deps/libs/androidx_annotation_annotation_experimental * src/third_party/android_deps/libs/org_robolectric_shadows_multidex * src/third_party/android_deps/libs/androidx_test_espresso_espresso_web * src/third_party/android_deps/libs/androidx_test_espresso_espresso_intents * src/third_party/android_deps/libs/androidx_viewpager2_viewpager2 * src/third_party/android_deps/libs/org_ccil_cowan_tagsoup_tagsoup * src/third_party/android_deps/libs/org_robolectric_shadows_playservices DEPS diff: https://chromium.googlesource.com/chromium/src/+/0cd53b97fa..e728aee5f1/DEPS Clang version changed 99ac9ce7016d701b43b8f0c308dc3463da57d983:a6ae333a0c23fc9b0783ca45e2676abac00c6723 Details: https://chromium.googlesource.com/chromium/src/+/0cd53b97fa..e728aee5f1/tools/clang/scripts/update.py TBR=titovartem@webrtc.org,marpan@webrtc.org, jianj@chromium.org, BUG=None Remove src/third_party/robolectric/robolectric Change-Id: Id6d50ce671fd4f0f2b23e3a06829846f2cbeeb6f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176417 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Artem Titov <titovartem@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31432}
2020-06-03 21:53:28 +02:00
'jdk': [],
}
# Third_party library _regex_ to licences mapping. Keys are regular expression
# with names of the libraries (right after the `third_party/` prefix)
LIB_REGEX_TO_LICENSES_DICT = {
'android_deps:android_support_annotations.*': [
'third_party/android_deps/libs/' +
'com_android_support_support_annotations/LICENSE'
],
# Internal dependencies, licenses are already included by other dependencies
'android_deps:com_android_support_support_annotations.*': [],
}
SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
WEBRTC_ROOT = os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir, os.pardir))
SRC_DIR = os.path.dirname(os.path.dirname(SCRIPT_DIR))
# Chromium, and potentially other repositories, embed us in the location
# "//third_party/webrtc". When this is the case, we expect that some of the
# tools we need are *actually* in their build folder, thus we need to move up
# to the *true* source root, when we're embedded like this.
if SRC_DIR.endswith(os.path.join('third_party', 'webrtc')):
SRC_DIR = os.path.abspath(os.path.join(SRC_DIR, os.pardir, os.pardir))
sys.path.append(os.path.join(SRC_DIR, 'build'))
import find_depot_tools
THIRD_PARTY_LIB_SIMPLE_NAME_REGEX = r'^.*/third_party/([\w\-+]+).*$'
THIRD_PARTY_LIB_REGEX_TEMPLATE = r'^.*/third_party/%s$'
class LicenseBuilder:
def __init__(self,
buildfile_dirs,
targets,
lib_to_licenses_dict=None,
lib_regex_to_licenses_dict=None):
if lib_to_licenses_dict is None:
lib_to_licenses_dict = LIB_TO_LICENSES_DICT
if lib_regex_to_licenses_dict is None:
lib_regex_to_licenses_dict = LIB_REGEX_TO_LICENSES_DICT
self.buildfile_dirs = buildfile_dirs
self.targets = targets
self.lib_to_licenses_dict = lib_to_licenses_dict
self.lib_regex_to_licenses_dict = lib_regex_to_licenses_dict
self.common_licenses_dict = self.lib_to_licenses_dict.copy()
self.common_licenses_dict.update(self.lib_regex_to_licenses_dict)
@staticmethod
def _ParseLibraryName(dep):
"""Returns library name after third_party
Input one of:
//a/b/third_party/libname:c
//a/b/third_party/libname:c(//d/e/f:g)
//a/b/third_party/libname/c:d(//e/f/g:h)
Outputs libname or None if this is not a third_party dependency.
"""
groups = re.match(THIRD_PARTY_LIB_SIMPLE_NAME_REGEX, dep)
return groups.group(1) if groups else None
def _ParseLibrary(self, dep):
"""Returns library simple or regex name that matches `dep` after third_party
This method matches `dep` dependency against simple names in
LIB_TO_LICENSES_DICT and regular expression names in
LIB_REGEX_TO_LICENSES_DICT keys
Outputs matched dict key or None if this is not a third_party dependency.
"""
libname = LicenseBuilder._ParseLibraryName(dep)
for lib_regex in self.lib_regex_to_licenses_dict:
if re.match(THIRD_PARTY_LIB_REGEX_TEMPLATE % lib_regex, dep):
return lib_regex
return libname
@staticmethod
def _RunGN(buildfile_dir, target):
cmd = [
sys.executable,
os.path.join(find_depot_tools.DEPOT_TOOLS_PATH, 'gn.py'),
'desc',
'--all',
'--format=json',
os.path.abspath(buildfile_dir),
target,
]
logging.debug('Running: %r', cmd)
output_json = subprocess.check_output(cmd, cwd=WEBRTC_ROOT).decode('UTF-8')
logging.debug('Output: %s', output_json)
return output_json
def _GetThirdPartyLibraries(self, buildfile_dir, target):
output = json.loads(LicenseBuilder._RunGN(buildfile_dir, target))
libraries = set()
for described_target in list(output.values()):
third_party_libs = (self._ParseLibrary(dep)
for dep in described_target['deps'])
libraries |= set(lib for lib in third_party_libs if lib)
return libraries
def GenerateLicenseText(self, output_dir):
# Get a list of third_party libs from gn. For fat libraries we must consider
# all architectures, hence the multiple buildfile directories.
third_party_libs = set()
for buildfile in self.buildfile_dirs:
for target in self.targets:
third_party_libs |= self._GetThirdPartyLibraries(buildfile, target)
assert len(third_party_libs) > 0
missing_licenses = third_party_libs - set(self.common_licenses_dict.keys())
if missing_licenses:
error_msg = 'Missing licenses for following third_party targets: %s' % \
', '.join(sorted(missing_licenses))
logging.error(error_msg)
raise Exception(error_msg)
# Put webrtc at the front of the list.
license_libs = sorted(third_party_libs)
license_libs.insert(0, 'webrtc')
logging.info('List of licenses: %s', ', '.join(license_libs))
# Generate markdown.
output_license_file = open(os.path.join(output_dir, 'LICENSE.md'), 'w+')
for license_lib in license_libs:
if len(self.common_licenses_dict[license_lib]) == 0:
logging.info('Skipping compile time or internal dependency: %s',
license_lib)
continue # Compile time dependency
output_license_file.write('# %s\n' % license_lib)
output_license_file.write('```\n')
for path in self.common_licenses_dict[license_lib]:
license_path = os.path.join(WEBRTC_ROOT, path)
with open(license_path, 'r') as license_file:
license_text = escape(license_file.read(), quote=True)
output_license_file.write(license_text)
output_license_file.write('\n')
output_license_file.write('```\n\n')
output_license_file.close()
def main():
parser = argparse.ArgumentParser(description='Generate WebRTC LICENSE.md')
parser.add_argument('--verbose',
action='store_true',
default=False,
help='Debug logging.')
parser.add_argument('--target',
required=True,
action='append',
default=[],
help='Name of the GN target to generate a license for')
parser.add_argument('output_dir', help='Directory to output LICENSE.md to.')
parser.add_argument('buildfile_dirs',
nargs='+',
help='Directories containing gn generated ninja files')
args = parser.parse_args()
logging.basicConfig(level=logging.DEBUG if args.verbose else logging.INFO)
builder = LicenseBuilder(args.buildfile_dirs, args.target)
builder.GenerateLicenseText(args.output_dir)
if __name__ == '__main__':
sys.exit(main())