From d50e0e84ed4ae380a89616da21382771a6211b29 Mon Sep 17 00:00:00 2001 From: Andreas Bucksteeg Date: Thu, 2 Jan 2025 15:59:59 +0100 Subject: [PATCH 1/7] chore: add additional allowed licenses and exceptions for cloud repo --- licenses/license-engine.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/licenses/license-engine.sh b/licenses/license-engine.sh index 42a5951..162c115 100755 --- a/licenses/license-engine.sh +++ b/licenses/license-engine.sh @@ -24,6 +24,7 @@ ALLOWED_LICENSES=( 'BSD-3-Clause' '(BSD-3-Clause OR GPL-2.0)' 'BSD-3-Clause OR MIT' + '(BSD-3-Clause AND Apache-2.0)' 'CC0-1.0' 'CC-BY-3.0' 'CC-BY-4.0' @@ -73,6 +74,10 @@ APPROVED_MODULES=( 'github.com/jmespath/go-jmespath' # Apache-2.0 https://github.com/jmespath/go-jmespath/blob/master/LICENSE 'github.com/ory/keto/proto/ory/keto/opl/v1alpha1' # Apache-2.0 - submodule of keto 'github.com/ory/keto/proto/ory/keto/relation_tuples/v1alpha2' # Apache-2.0 - submodule of keto + '@ory-corp/.*' # Ory IP + 'github.com/apache/arrow/.*' # Apache-2.0 https://github.com/apache/arrow/blob/main/LICENSE.txt + 'github.com/ory-corp/webhook-target' # Ory IP + '@ory/keto-grpc-client.*' # Apache-2.0 - submodule of keto ) # These lines in the output should be ignored (plain text, no regex). From d1f2f47890b380666fb5e8d16a365dca1163e101 Mon Sep 17 00:00:00 2001 From: Andreas Bucksteeg Date: Fri, 3 Jan 2025 09:59:01 +0100 Subject: [PATCH 2/7] chore: fixed formatting --- licenses/license-engine.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/licenses/license-engine.sh b/licenses/license-engine.sh index d5f61cb..13e7a80 100755 --- a/licenses/license-engine.sh +++ b/licenses/license-engine.sh @@ -78,7 +78,7 @@ APPROVED_MODULES=( 'github.com/apache/arrow/.*' # Apache-2.0 https://github.com/apache/arrow/blob/main/LICENSE.txt 'github.com/ory-corp/webhook-target' # Ory IP '@ory/keto-grpc-client.*' # Apache-2.0 - submodule of keto - "golden-fleece@1.0.9" # MIT: https://github.com/Rich-Harris/golden-fleece/blob/master/LICENSE + 'golden-fleece@1.0.9' # MIT: https://github.com/Rich-Harris/golden-fleece/blob/master/LICENSE ) # These lines in the output should be ignored (plain text, no regex). From 6a3e9283b182bbccb56c37cb613e3e31990cfb89 Mon Sep 17 00:00:00 2001 From: Andreas Bucksteeg Date: Fri, 3 Jan 2025 11:08:00 +0100 Subject: [PATCH 3/7] chore: added --full-install override to enable full install in mono repos --- licenses/install | 59 ++++++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 20 deletions(-) diff --git a/licenses/install b/licenses/install index 4feda35..fcdaf98 100755 --- a/licenses/install +++ b/licenses/install @@ -1,14 +1,33 @@ #!/bin/sh set -e +# Default mono-install to false +MONO_INSTALL=false + +# Parse command line arguments +while [ "$#" -gt 0 ]; do + case "$1" in + --mono-install) + MONO_INSTALL=true + shift + ;; + *) + echo "Unknown parameter: $1" + exit 1 + ;; + esac +done + { - echo - echo "Installing license checker engine ..." - echo + echo + echo "Installing license checker engine ..." + echo } 2>/dev/null + if [ ! -d .bin ]; then - mkdir .bin + mkdir .bin fi + curl https://raw.githubusercontent.com/ory/ci/master/licenses/license-engine.sh -o .bin/license-engine.sh chmod +x .bin/license-engine.sh curl https://raw.githubusercontent.com/ory/ci/master/licenses/licenses -o .bin/licenses @@ -16,21 +35,21 @@ chmod +x .bin/licenses curl https://raw.githubusercontent.com/ory/ci/master/licenses/list-licenses -o .bin/list-licenses chmod +x .bin/list-licenses -if [ -f go.mod ]; then - { - echo - echo "Installing the Go license checker ..." - echo - } 2>/dev/null - GOBIN=$(pwd)/.bin go install github.com/google/go-licenses@master - curl https://raw.githubusercontent.com/ory/ci/master/licenses/license-template-go.tpl -o .bin/license-template-go.tpl +if [ "$MONO_INSTALL" = true ] || [ -f go.mod ]; then + { + echo + echo "Installing the Go license checker ..." + echo + } 2>/dev/null + GOBIN=$(pwd)/.bin go install github.com/google/go-licenses@master + curl https://raw.githubusercontent.com/ory/ci/master/licenses/license-template-go.tpl -o .bin/license-template-go.tpl fi -if [ -f package.json ]; then - { - echo - echo "Installing the Node license checker ..." - echo - } 2>/dev/null - curl https://raw.githubusercontent.com/ory/ci/master/licenses/license-template-node.json -o .bin/license-template-node.json -fi +if [ "$MONO_INSTALL" = true ] || [ -f package.json ]; then + { + echo + echo "Installing the Node license checker ..." + echo + } 2>/dev/null + curl https://raw.githubusercontent.com/ory/ci/master/licenses/license-template-node.json -o .bin/license-template-node.json +fi \ No newline at end of file From c1cd092ecf456633b5c890953495426dfa779e20 Mon Sep 17 00:00:00 2001 From: Andreas Bucksteeg Date: Fri, 3 Jan 2025 11:09:46 +0100 Subject: [PATCH 4/7] chore: added --full-install override to enable full install in mono repos --- licenses/install | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/licenses/install b/licenses/install index fcdaf98..fbcbb74 100755 --- a/licenses/install +++ b/licenses/install @@ -2,13 +2,13 @@ set -e # Default mono-install to false -MONO_INSTALL=false +FULL_INSTALL=false # Parse command line arguments while [ "$#" -gt 0 ]; do case "$1" in - --mono-install) - MONO_INSTALL=true + --full-install) + FULL_INSTALL=true shift ;; *) @@ -35,7 +35,7 @@ chmod +x .bin/licenses curl https://raw.githubusercontent.com/ory/ci/master/licenses/list-licenses -o .bin/list-licenses chmod +x .bin/list-licenses -if [ "$MONO_INSTALL" = true ] || [ -f go.mod ]; then +if [ "$FULL_INSTALL" = true ] || [ -f go.mod ]; then { echo echo "Installing the Go license checker ..." @@ -45,7 +45,7 @@ if [ "$MONO_INSTALL" = true ] || [ -f go.mod ]; then curl https://raw.githubusercontent.com/ory/ci/master/licenses/license-template-go.tpl -o .bin/license-template-go.tpl fi -if [ "$MONO_INSTALL" = true ] || [ -f package.json ]; then +if [ "$FULL_INSTALL" = true ] || [ -f package.json ]; then { echo echo "Installing the Node license checker ..." From e30a165d308bb4f6d787e2a6b6ab4a7623d9101f Mon Sep 17 00:00:00 2001 From: Andreas Bucksteeg Date: Fri, 3 Jan 2025 15:08:55 +0100 Subject: [PATCH 5/7] chore: add missing license for keto --- licenses/license-engine.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/licenses/license-engine.sh b/licenses/license-engine.sh index 13e7a80..7d6ec1c 100755 --- a/licenses/license-engine.sh +++ b/licenses/license-engine.sh @@ -79,6 +79,7 @@ APPROVED_MODULES=( 'github.com/ory-corp/webhook-target' # Ory IP '@ory/keto-grpc-client.*' # Apache-2.0 - submodule of keto 'golden-fleece@1.0.9' # MIT: https://github.com/Rich-Harris/golden-fleece/blob/master/LICENSE + 'github.com/gogo/googleapis/.*' # Apache-2.0 https://github.com/gogo/googleapis/blob/master/LICENSE ) # These lines in the output should be ignored (plain text, no regex). From 94f718ee092d5dde28117fc4269baf87f19923ff Mon Sep 17 00:00:00 2001 From: Andreas Bucksteeg Date: Fri, 3 Jan 2025 15:11:07 +0100 Subject: [PATCH 6/7] chore: format --- licenses/install | 56 ++++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/licenses/install b/licenses/install index fbcbb74..290f056 100755 --- a/licenses/install +++ b/licenses/install @@ -6,26 +6,26 @@ FULL_INSTALL=false # Parse command line arguments while [ "$#" -gt 0 ]; do - case "$1" in - --full-install) - FULL_INSTALL=true - shift - ;; - *) - echo "Unknown parameter: $1" - exit 1 - ;; - esac + case "$1" in + --full-install) + FULL_INSTALL=true + shift + ;; + *) + echo "Unknown parameter: $1" + exit 1 + ;; + esac done { - echo - echo "Installing license checker engine ..." - echo + echo + echo "Installing license checker engine ..." + echo } 2>/dev/null if [ ! -d .bin ]; then - mkdir .bin + mkdir .bin fi curl https://raw.githubusercontent.com/ory/ci/master/licenses/license-engine.sh -o .bin/license-engine.sh @@ -36,20 +36,20 @@ curl https://raw.githubusercontent.com/ory/ci/master/licenses/list-licenses -o . chmod +x .bin/list-licenses if [ "$FULL_INSTALL" = true ] || [ -f go.mod ]; then - { - echo - echo "Installing the Go license checker ..." - echo - } 2>/dev/null - GOBIN=$(pwd)/.bin go install github.com/google/go-licenses@master - curl https://raw.githubusercontent.com/ory/ci/master/licenses/license-template-go.tpl -o .bin/license-template-go.tpl + { + echo + echo "Installing the Go license checker ..." + echo + } 2>/dev/null + GOBIN=$(pwd)/.bin go install github.com/google/go-licenses@master + curl https://raw.githubusercontent.com/ory/ci/master/licenses/license-template-go.tpl -o .bin/license-template-go.tpl fi if [ "$FULL_INSTALL" = true ] || [ -f package.json ]; then - { - echo - echo "Installing the Node license checker ..." - echo - } 2>/dev/null - curl https://raw.githubusercontent.com/ory/ci/master/licenses/license-template-node.json -o .bin/license-template-node.json -fi \ No newline at end of file + { + echo + echo "Installing the Node license checker ..." + echo + } 2>/dev/null + curl https://raw.githubusercontent.com/ory/ci/master/licenses/license-template-node.json -o .bin/license-template-node.json +fi From 0c1db198933f68caa23f7ac5b923be38fe90af46 Mon Sep 17 00:00:00 2001 From: Andreas Bucksteeg Date: Fri, 3 Jan 2025 20:57:57 +0100 Subject: [PATCH 7/7] fix: swtich to use bin_dir again --- licenses/list-licenses | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/licenses/list-licenses b/licenses/list-licenses index 8a238d9..5824059 100755 --- a/licenses/list-licenses +++ b/licenses/list-licenses @@ -30,9 +30,9 @@ if [ -f go.mod ]; then echo "No Go modules found" >&2 else # Workaround until https://github.com/google/go-licenses/issues/307 is fixed - # .bin/go-licenses report "$module_name" --template .bin/license-template-go.tpl 2>/dev/null + # "${bin_dir}"/go-licenses report "$module_name" --template "${bin_dir}"/license-template-go.tpl 2>/dev/null # - echo "$go_modules" | xargs -I {} sh -c '.bin/go-licenses report --template .bin/license-template-go.tpl {}' | grep -v '^$' + echo "$go_modules" | xargs -I {} sh -c '"${bin_dir}"/go-licenses report --template "${bin_dir}"/license-template-go.tpl {}' | grep -v '^$' echo fi fi