From 4a5d3bda72a61313793273bf37a5c3e93e26f3ec Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Fri, 29 Dec 2023 05:27:05 +0900 Subject: [PATCH] doc: the GN files should use Node's license PR-URL: https://github.com/nodejs/node/pull/50694 Reviewed-By: Luigi Pinca Reviewed-By: Tierney Cyren --- LICENSE | 29 +++++++++++++++++++++++++++++ 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, 58 insertions(+), 87 deletions(-) diff --git a/LICENSE b/LICENSE index db21f17598f98b..fb7c9d3abe9215 100644 --- a/LICENSE +++ b/LICENSE @@ -1972,6 +1972,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, 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 269c62d976d6ad..5c46dea5d90d90 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 0789d2eaccb573..bc29bb04f64958 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 00babe6006ce00..0a3f8fbe636b55 100755 --- a/tools/license-builder.sh +++ b/tools/license-builder.sh @@ -105,6 +105,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 ee0a5f3c32dbcc..5199d84fa46268 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.