From 4925775d6f8262a6c1f50bde6848ce6eb664d789 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 13 Nov 2023 15:13:55 +0900 Subject: [PATCH] doc: the GN files should use Node's license --- LICENSE | 33 +++++++++++++++++++++++++++++++-- deps/ada/unofficial.gni | 4 ---- deps/base64/unofficial.gni | 6 ------ deps/brotli/unofficial.gni | 6 ------ deps/cares/unofficial.gni | 6 ------ deps/googletest/unofficial.gni | 4 ---- deps/histogram/unofficial.gni | 6 ------ deps/llhttp/unofficial.gni | 5 ----- deps/nghttp2/unofficial.gni | 5 ----- deps/ngtcp2/unofficial.gni | 5 ----- deps/openssl/unofficial.gni | 5 ----- deps/postject/unofficial.gni | 4 ---- deps/simdutf/unofficial.gni | 5 ----- deps/uv/unofficial.gni | 6 ------ deps/uvwasi/unofficial.gni | 6 ------ src/inspector/unofficial.gni | 6 ------ tools/gypi_to_gn.py | 29 +++++++++++++++++++++++++++-- tools/license-builder.sh | 2 ++ unofficial.gni | 6 ------ 19 files changed, 60 insertions(+), 89 deletions(-) diff --git a/LICENSE b/LICENSE index 511343a8dfd4bb..b469b745ced4db 100644 --- a/LICENSE +++ b/LICENSE @@ -1774,6 +1774,35 @@ The externally maintained libraries used by Node.js are: OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """ +- gypi_to_gn.py, located at tools/gypi_to_gn.py, is licensed as follows: + """ + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following disclaimer + in the documentation and/or other materials provided with the + distribution. + * Neither the name of Google LLC nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + """ + - ESLint, located at tools/node_modules/eslint, is licensed as follows: """ Copyright OpenJS Foundation and other contributors, @@ -2153,9 +2182,9 @@ The externally maintained libraries used by Node.js are: - base64, located at deps/base64/base64/, is licensed as follows: """ Copyright (c) 2005-2007, Nick Galbreath - Copyright (c) 2013-2019, Alfred Klomp - Copyright (c) 2015-2017, Wojciech Mula + Copyright (c) 2015-2018, Wojciech Muła Copyright (c) 2016-2017, Matthieu Darbois + Copyright (c) 2013-2022, Alfred Klomp All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/deps/ada/unofficial.gni b/deps/ada/unofficial.gni index d3d14193c5a154..ab7dc27de3e304 100644 --- a/deps/ada/unofficial.gni +++ b/deps/ada/unofficial.gni @@ -1,7 +1,3 @@ -# Copyright 2023 Microsoft Inc. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - # This file is used by GN for building, which is NOT the build system used for # building official binaries. # Please edit the gyp files if you are making changes to build system. diff --git a/deps/base64/unofficial.gni b/deps/base64/unofficial.gni index 8138d88798e1df..030f866d7138ab 100644 --- a/deps/base64/unofficial.gni +++ b/deps/base64/unofficial.gni @@ -1,9 +1,3 @@ -# Copyright (c) 2013-2022 GitHub Inc. -# Copyright 2022 the V8 project authors. All rights reserved. -# Copyright 2023 Microsoft Inc. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - # This file is used by GN for building, which is NOT the build system used for # building official binaries. # Please edit the gyp files if you are making changes to build system. diff --git a/deps/brotli/unofficial.gni b/deps/brotli/unofficial.gni index ce1df0d14cc01b..5e07e106672a04 100644 --- a/deps/brotli/unofficial.gni +++ b/deps/brotli/unofficial.gni @@ -1,9 +1,3 @@ -# Copyright 2014 The Chromium Authors. All rights reserved. -# Copyright 2019 the V8 project authors. All rights reserved. -# Copyright 2023 Microsoft Inc. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - # This file is used by GN for building, which is NOT the build system used for # building official binaries. # Please edit the gyp files if you are making changes to build system. diff --git a/deps/cares/unofficial.gni b/deps/cares/unofficial.gni index 07e2ed65b36deb..a925eb14f33361 100644 --- a/deps/cares/unofficial.gni +++ b/deps/cares/unofficial.gni @@ -1,9 +1,3 @@ -# Copyright (c) 2013-2019 GitHub Inc. -# Copyright 2019 the V8 project authors. All rights reserved. -# Copyright 2023 Microsoft Inc. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - # This file is used by GN for building, which is NOT the build system used for # building official binaries. # Please edit the gyp files if you are making changes to build system. diff --git a/deps/googletest/unofficial.gni b/deps/googletest/unofficial.gni index e262d1bc1829a1..1bf78f1adfed60 100644 --- a/deps/googletest/unofficial.gni +++ b/deps/googletest/unofficial.gni @@ -1,7 +1,3 @@ -# Copyright 2021 the V8 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. - # This file is used by GN for building, which is NOT the build system used for # building official binaries. # Please edit the gyp files if you are making changes to build system. diff --git a/deps/histogram/unofficial.gni b/deps/histogram/unofficial.gni index eedb62049097d7..1173ab298ae73b 100644 --- a/deps/histogram/unofficial.gni +++ b/deps/histogram/unofficial.gni @@ -1,9 +1,3 @@ -# Copyright (c) 2013-2019 GitHub Inc. -# Copyright 2019 the V8 project authors. All rights reserved. -# Copyright 2023 Microsoft Inc. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - # This file is used by GN for building, which is NOT the build system used for # building official binaries. # Please edit the gyp files if you are making changes to build system. diff --git a/deps/llhttp/unofficial.gni b/deps/llhttp/unofficial.gni index 80e360d472610c..fdce32e59764a0 100644 --- a/deps/llhttp/unofficial.gni +++ b/deps/llhttp/unofficial.gni @@ -1,8 +1,3 @@ -# Copyright (c) 2013-2019 GitHub Inc. -# Copyright 2019 the V8 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. - # This file is used by GN for building, which is NOT the build system used for # building official binaries. # Please edit the gyp files if you are making changes to build system. diff --git a/deps/nghttp2/unofficial.gni b/deps/nghttp2/unofficial.gni index 0d84500a66f249..6b3f23a7b0b662 100644 --- a/deps/nghttp2/unofficial.gni +++ b/deps/nghttp2/unofficial.gni @@ -1,8 +1,3 @@ -# Copyright (c) 2013-2019 GitHub Inc. -# Copyright 2019 the V8 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. - # This file is used by GN for building, which is NOT the build system used for # building official binaries. # Please edit the gyp files if you are making changes to build system. diff --git a/deps/ngtcp2/unofficial.gni b/deps/ngtcp2/unofficial.gni index a304cf4aded42d..7665b5b0d1dce3 100644 --- a/deps/ngtcp2/unofficial.gni +++ b/deps/ngtcp2/unofficial.gni @@ -1,8 +1,3 @@ -# Copyright (c) 2013-2021 GitHub Inc. -# Copyright 2021 the V8 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. - # This file is used by GN for building, which is NOT the build system used for # building official binaries. # Please edit the gyp files if you are making changes to build system. diff --git a/deps/openssl/unofficial.gni b/deps/openssl/unofficial.gni index 9b94ccb275e7bc..31f31043812427 100644 --- a/deps/openssl/unofficial.gni +++ b/deps/openssl/unofficial.gni @@ -1,8 +1,3 @@ -# Copyright 2019 the V8 project authors. All rights reserved. -# Copyright 2023 Microsoft Inc. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - # This file is used by GN for building, which is NOT the build system used for # building official binaries. # Please edit the gyp files if you are making changes to build system. diff --git a/deps/postject/unofficial.gni b/deps/postject/unofficial.gni index 6a4d2ddb36e782..cbd5e841582100 100644 --- a/deps/postject/unofficial.gni +++ b/deps/postject/unofficial.gni @@ -1,7 +1,3 @@ -# Copyright 2023 Microsoft Inc. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - # This file is used by GN for building, which is NOT the build system used for # building official binaries. # Please edit the gyp files if you are making changes to build system. diff --git a/deps/simdutf/unofficial.gni b/deps/simdutf/unofficial.gni index d623de36312e3e..544466c5344fa8 100644 --- a/deps/simdutf/unofficial.gni +++ b/deps/simdutf/unofficial.gni @@ -1,8 +1,3 @@ -# Copyright (c) 2013-2019 GitHub Inc. -# Copyright 2019 the V8 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. - # This file is used by GN for building, which is NOT the build system used for # building official binaries. # Please edit the gyp files if you are making changes to build system. diff --git a/deps/uv/unofficial.gni b/deps/uv/unofficial.gni index 64d6bcbc5c13da..eb5779995eb2b4 100644 --- a/deps/uv/unofficial.gni +++ b/deps/uv/unofficial.gni @@ -1,9 +1,3 @@ -# Copyright (c) 2013-2019 GitHub Inc. -# Copyright 2019 the V8 project authors. All rights reserved. -# Copyright 2023 Microsoft Inc. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - # This file is used by GN for building, which is NOT the build system used for # building official binaries. # Please edit the gyp files if you are making changes to build system. diff --git a/deps/uvwasi/unofficial.gni b/deps/uvwasi/unofficial.gni index 17f4c8e6eed0b3..b7f30c448626ad 100644 --- a/deps/uvwasi/unofficial.gni +++ b/deps/uvwasi/unofficial.gni @@ -1,9 +1,3 @@ -# Copyright (c) 2013-2019 GitHub Inc. -# Copyright 2019 the V8 project authors. All rights reserved. -# Copyright 2023 Microsoft Inc. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - # This file is used by GN for building, which is NOT the build system used for # building official binaries. # Please edit the gyp files if you are making changes to build system. diff --git a/src/inspector/unofficial.gni b/src/inspector/unofficial.gni index b562109e94c17d..5d87f3c901ab50 100644 --- a/src/inspector/unofficial.gni +++ b/src/inspector/unofficial.gni @@ -1,9 +1,3 @@ -# Copyright (c) 2013-2019 GitHub Inc. -# Copyright 2019 the V8 project authors. All rights reserved. -# Copyright 2023 Microsoft Inc. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - import("../../node.gni") import("$node_v8_path/gni/v8.gni") diff --git a/tools/gypi_to_gn.py b/tools/gypi_to_gn.py index 47182d8017bfc2..77a68ff07ed4eb 100755 --- a/tools/gypi_to_gn.py +++ b/tools/gypi_to_gn.py @@ -1,7 +1,32 @@ #!/usr/bin/env python3 # Copyright 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google LLC nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # Deleted from Chromium in https://crrev.com/097f64c631. """Converts a given gypi file to a python scope and writes the result to stdout. diff --git a/tools/license-builder.sh b/tools/license-builder.sh index 10b894262946ea..67769511294e5b 100755 --- a/tools/license-builder.sh +++ b/tools/license-builder.sh @@ -103,6 +103,8 @@ addlicense "markupsafe" "tools/inspector_protocol/markupsafe" "$licenseText" # Testing tools licenseText="$(sed -e '/^$/,$d' -e 's/^#$//' -e 's/^# //' "${rootdir}/tools/cpplint.py" | tail -n +3)" addlicense "cpplint.py" "tools/cpplint.py" "$licenseText" +licenseText="$(sed -e '/^$/,$d' -e 's/^#$//' -e 's/^# //' "${rootdir}/tools/gypi_to_gn.py" | tail -n +3)" +addlicense "gypi_to_gn.py" "tools/gypi_to_gn.py" "$licenseText" licenseText="$(cat "${rootdir}/tools/node_modules/eslint/LICENSE")" addlicense "ESLint" "tools/node_modules/eslint" "$licenseText" licenseText="$(cat "${rootdir}/deps/googletest/LICENSE")" diff --git a/unofficial.gni b/unofficial.gni index 29685d4ade559f..ba0ba266b76302 100644 --- a/unofficial.gni +++ b/unofficial.gni @@ -1,9 +1,3 @@ -# Copyright (c) 2013-2019 GitHub Inc. -# Copyright 2019 the V8 project authors. All rights reserved. -# Copyright 2023 Microsoft Inc. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - # This file is used by GN for building, which is NOT the build system used for # building official binaries. # Please take a look at node.gyp if you are making changes to build system.