Skip to content

Commit 50cffbe

Browse files
Merge pull request #625 from cert-manager/licenses
Add dependency licenses to repo and OCI image
2 parents 189422e + a8fbabb commit 50cffbe

File tree

3 files changed

+177
-0
lines changed

3 files changed

+177
-0
lines changed

LICENSES

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
cel.dev/expr,https://github.com/google/cel-spec/blob/v0.19.1/LICENSE,Apache-2.0
2+
github.com/Azure/go-ntlmssp,https://github.com/Azure/go-ntlmssp/blob/754e69321358/LICENSE,MIT
3+
github.com/antlr4-go/antlr/v4,https://github.com/antlr4-go/antlr/blob/v4.13.1/LICENSE,BSD-3-Clause
4+
github.com/beorn7/perks/quantile,https://github.com/beorn7/perks/blob/v1.0.1/LICENSE,MIT
5+
github.com/blang/semver/v4,https://github.com/blang/semver/blob/v4.0.0/v4/LICENSE,MIT
6+
github.com/cenkalti/backoff/v4,https://github.com/cenkalti/backoff/blob/v4.3.0/LICENSE,MIT
7+
github.com/cert-manager/approver-policy,https://github.com/cert-manager/approver-policy/blob/HEAD/LICENSE,Apache-2.0
8+
github.com/cert-manager/cert-manager,https://github.com/cert-manager/cert-manager/blob/v1.17.2/LICENSE,Apache-2.0
9+
github.com/cespare/xxhash/v2,https://github.com/cespare/xxhash/blob/v2.3.0/LICENSE.txt,MIT
10+
github.com/davecgh/go-spew/spew,https://github.com/davecgh/go-spew/blob/d8f796af33cc/LICENSE,ISC
11+
github.com/emicklei/go-restful/v3,https://github.com/emicklei/go-restful/blob/v3.12.1/LICENSE,MIT
12+
github.com/evanphx/json-patch/v5,https://github.com/evanphx/json-patch/blob/v5.9.11/v5/LICENSE,BSD-3-Clause
13+
github.com/felixge/httpsnoop,https://github.com/felixge/httpsnoop/blob/v1.0.4/LICENSE.txt,MIT
14+
github.com/fsnotify/fsnotify,https://github.com/fsnotify/fsnotify/blob/v1.8.0/LICENSE,BSD-3-Clause
15+
github.com/fxamacker/cbor/v2,https://github.com/fxamacker/cbor/blob/v2.7.0/LICENSE,MIT
16+
github.com/go-asn1-ber/asn1-ber,https://github.com/go-asn1-ber/asn1-ber/blob/v1.5.6/LICENSE,MIT
17+
github.com/go-errors/errors,https://github.com/go-errors/errors/blob/v1.4.2/LICENSE.MIT,MIT
18+
github.com/go-ldap/ldap/v3,https://github.com/go-ldap/ldap/blob/v3.4.8/v3/LICENSE,MIT
19+
github.com/go-logr/logr,https://github.com/go-logr/logr/blob/v1.4.2/LICENSE,Apache-2.0
20+
github.com/go-logr/stdr,https://github.com/go-logr/stdr/blob/v1.2.2/LICENSE,Apache-2.0
21+
github.com/go-logr/zapr,https://github.com/go-logr/zapr/blob/v1.3.0/LICENSE,Apache-2.0
22+
github.com/go-openapi/jsonpointer,https://github.com/go-openapi/jsonpointer/blob/v0.21.0/LICENSE,Apache-2.0
23+
github.com/go-openapi/jsonreference,https://github.com/go-openapi/jsonreference/blob/v0.21.0/LICENSE,Apache-2.0
24+
github.com/go-openapi/swag,https://github.com/go-openapi/swag/blob/v0.23.0/LICENSE,Apache-2.0
25+
github.com/gogo/protobuf,https://github.com/gogo/protobuf/blob/v1.3.2/LICENSE,BSD-3-Clause
26+
github.com/google/btree,https://github.com/google/btree/blob/v1.1.3/LICENSE,Apache-2.0
27+
github.com/google/cel-go,https://github.com/google/cel-go/blob/v0.23.2/LICENSE,Apache-2.0
28+
github.com/google/cel-go,https://github.com/google/cel-go/blob/v0.23.2/LICENSE,BSD-3-Clause
29+
github.com/google/gnostic-models,https://github.com/google/gnostic-models/blob/v0.6.9/LICENSE,Apache-2.0
30+
github.com/google/go-cmp/cmp,https://github.com/google/go-cmp/blob/v0.7.0/LICENSE,BSD-3-Clause
31+
github.com/google/shlex,https://github.com/google/shlex/blob/e7afc7fbc510/COPYING,Apache-2.0
32+
github.com/google/uuid,https://github.com/google/uuid/blob/v1.6.0/LICENSE,BSD-3-Clause
33+
github.com/gregjones/httpcache,https://github.com/gregjones/httpcache/blob/901d90724c79/LICENSE.txt,MIT
34+
github.com/grpc-ecosystem/grpc-gateway/v2,https://github.com/grpc-ecosystem/grpc-gateway/blob/v2.25.1/LICENSE,BSD-3-Clause
35+
github.com/josharian/intern,https://github.com/josharian/intern/blob/v1.0.0/license.md,MIT
36+
github.com/json-iterator/go,https://github.com/json-iterator/go/blob/v1.1.12/LICENSE,MIT
37+
github.com/liggitt/tabwriter,https://github.com/liggitt/tabwriter/blob/89fcab3d43de/LICENSE,BSD-3-Clause
38+
github.com/mailru/easyjson,https://github.com/mailru/easyjson/blob/v0.9.0/LICENSE,MIT
39+
github.com/moby/term,https://github.com/moby/term/blob/v0.5.0/LICENSE,Apache-2.0
40+
github.com/modern-go/concurrent,https://github.com/modern-go/concurrent/blob/bacd9c7ef1dd/LICENSE,Apache-2.0
41+
github.com/modern-go/reflect2,https://github.com/modern-go/reflect2/blob/v1.0.2/LICENSE,Apache-2.0
42+
github.com/monochromegane/go-gitignore,https://github.com/monochromegane/go-gitignore/blob/205db1a8cc00/LICENSE,MIT
43+
github.com/munnerz/goautoneg,https://github.com/munnerz/goautoneg/blob/a7dc8b61c822/LICENSE,BSD-3-Clause
44+
github.com/onsi/ginkgo/v2,https://github.com/onsi/ginkgo/blob/v2.23.4/LICENSE,MIT
45+
github.com/onsi/gomega,https://github.com/onsi/gomega/blob/v1.37.0/LICENSE,MIT
46+
github.com/peterbourgon/diskv,https://github.com/peterbourgon/diskv/blob/v2.0.1/LICENSE,MIT
47+
github.com/pkg/errors,https://github.com/pkg/errors/blob/v0.9.1/LICENSE,BSD-2-Clause
48+
github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil,https://github.com/prometheus/client_golang/blob/v1.22.0/internal/github.com/golang/gddo/LICENSE,BSD-3-Clause
49+
github.com/prometheus/client_golang/prometheus,https://github.com/prometheus/client_golang/blob/v1.22.0/LICENSE,Apache-2.0
50+
github.com/prometheus/client_model/go,https://github.com/prometheus/client_model/blob/v0.6.1/LICENSE,Apache-2.0
51+
github.com/prometheus/common,https://github.com/prometheus/common/blob/v0.62.0/LICENSE,Apache-2.0
52+
github.com/prometheus/procfs,https://github.com/prometheus/procfs/blob/v0.15.1/LICENSE,Apache-2.0
53+
github.com/spf13/cobra,https://github.com/spf13/cobra/blob/v1.9.1/LICENSE.txt,Apache-2.0
54+
github.com/spf13/pflag,https://github.com/spf13/pflag/blob/v1.0.6/LICENSE,BSD-3-Clause
55+
github.com/stoewer/go-strcase,https://github.com/stoewer/go-strcase/blob/v1.3.0/LICENSE,MIT
56+
github.com/x448/float16,https://github.com/x448/float16/blob/v0.8.4/LICENSE,MIT
57+
github.com/xlab/treeprint,https://github.com/xlab/treeprint/blob/v1.2.0/LICENSE,MIT
58+
go.opentelemetry.io/auto/sdk,https://github.com/open-telemetry/opentelemetry-go-instrumentation/blob/sdk/v1.1.0/sdk/LICENSE,Apache-2.0
59+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp,https://github.com/open-telemetry/opentelemetry-go-contrib/blob/instrumentation/net/http/otelhttp/v0.58.0/instrumentation/net/http/otelhttp/LICENSE,Apache-2.0
60+
go.opentelemetry.io/otel,https://github.com/open-telemetry/opentelemetry-go/blob/v1.33.0/LICENSE,Apache-2.0
61+
go.opentelemetry.io/otel/exporters/otlp/otlptrace,https://github.com/open-telemetry/opentelemetry-go/blob/exporters/otlp/otlptrace/v1.33.0/exporters/otlp/otlptrace/LICENSE,Apache-2.0
62+
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc,https://github.com/open-telemetry/opentelemetry-go/blob/exporters/otlp/otlptrace/otlptracegrpc/v1.33.0/exporters/otlp/otlptrace/otlptracegrpc/LICENSE,Apache-2.0
63+
go.opentelemetry.io/otel/metric,https://github.com/open-telemetry/opentelemetry-go/blob/metric/v1.33.0/metric/LICENSE,Apache-2.0
64+
go.opentelemetry.io/otel/sdk,https://github.com/open-telemetry/opentelemetry-go/blob/sdk/v1.33.0/sdk/LICENSE,Apache-2.0
65+
go.opentelemetry.io/otel/trace,https://github.com/open-telemetry/opentelemetry-go/blob/trace/v1.33.0/trace/LICENSE,Apache-2.0
66+
go.opentelemetry.io/proto/otlp,https://github.com/open-telemetry/opentelemetry-proto-go/blob/otlp/v1.4.0/otlp/LICENSE,Apache-2.0
67+
go.uber.org/multierr,https://github.com/uber-go/multierr/blob/v1.11.0/LICENSE.txt,MIT
68+
go.uber.org/zap,https://github.com/uber-go/zap/blob/v1.27.0/LICENSE,MIT
69+
golang.org/x/crypto,https://cs.opensource.google/go/x/crypto/+/v0.36.0:LICENSE,BSD-3-Clause
70+
golang.org/x/exp/slices,https://cs.opensource.google/go/x/exp/+/b2144cdd:LICENSE,BSD-3-Clause
71+
golang.org/x/net,https://cs.opensource.google/go/x/net/+/v0.38.0:LICENSE,BSD-3-Clause
72+
golang.org/x/oauth2,https://cs.opensource.google/go/x/oauth2/+/v0.28.0:LICENSE,BSD-3-Clause
73+
golang.org/x/sync,https://cs.opensource.google/go/x/sync/+/v0.12.0:LICENSE,BSD-3-Clause
74+
golang.org/x/sys/unix,https://cs.opensource.google/go/x/sys/+/v0.32.0:LICENSE,BSD-3-Clause
75+
golang.org/x/term,https://cs.opensource.google/go/x/term/+/v0.30.0:LICENSE,BSD-3-Clause
76+
golang.org/x/text,https://cs.opensource.google/go/x/text/+/v0.23.0:LICENSE,BSD-3-Clause
77+
golang.org/x/time/rate,https://cs.opensource.google/go/x/time/+/v0.9.0:LICENSE,BSD-3-Clause
78+
gomodules.xyz/jsonpatch/v2,https://github.com/gomodules/jsonpatch/blob/v2.4.0/v2/LICENSE,Apache-2.0
79+
google.golang.org/genproto/googleapis/api,https://github.com/googleapis/go-genproto/blob/6b3ec007d9bb/googleapis/api/LICENSE,Apache-2.0
80+
google.golang.org/genproto/googleapis/rpc,https://github.com/googleapis/go-genproto/blob/6b3ec007d9bb/googleapis/rpc/LICENSE,Apache-2.0
81+
google.golang.org/grpc,https://github.com/grpc/grpc-go/blob/v1.69.2/LICENSE,Apache-2.0
82+
google.golang.org/protobuf,https://github.com/protocolbuffers/protobuf-go/blob/v1.36.6/LICENSE,BSD-3-Clause
83+
gopkg.in/evanphx/json-patch.v4,https://github.com/evanphx/json-patch/blob/v4.12.0/LICENSE,BSD-3-Clause
84+
gopkg.in/inf.v0,https://github.com/go-inf/inf/blob/v0.9.1/LICENSE,BSD-3-Clause
85+
gopkg.in/yaml.v3,https://github.com/go-yaml/yaml/blob/v3.0.1/LICENSE,MIT
86+
k8s.io/api,https://github.com/kubernetes/api/blob/v0.33.0/LICENSE,Apache-2.0
87+
k8s.io/apiextensions-apiserver/pkg,https://github.com/kubernetes/apiextensions-apiserver/blob/v0.33.0/LICENSE,Apache-2.0
88+
k8s.io/apimachinery/pkg,https://github.com/kubernetes/apimachinery/blob/v0.33.0/LICENSE,Apache-2.0
89+
k8s.io/apimachinery/third_party/forked/golang,https://github.com/kubernetes/apimachinery/blob/v0.33.0/third_party/forked/golang/LICENSE,BSD-3-Clause
90+
k8s.io/apiserver,https://github.com/kubernetes/apiserver/blob/v0.33.0/LICENSE,Apache-2.0
91+
k8s.io/cli-runtime/pkg,https://github.com/kubernetes/cli-runtime/blob/v0.33.0/LICENSE,Apache-2.0
92+
k8s.io/client-go,https://github.com/kubernetes/client-go/blob/v0.33.0/LICENSE,Apache-2.0
93+
k8s.io/client-go/third_party/forked/golang/template,https://github.com/kubernetes/client-go/blob/v0.33.0/third_party/forked/golang/LICENSE,BSD-3-Clause
94+
k8s.io/component-base,https://github.com/kubernetes/component-base/blob/v0.33.0/LICENSE,Apache-2.0
95+
k8s.io/klog/v2,https://github.com/kubernetes/klog/blob/v2.130.1/LICENSE,Apache-2.0
96+
k8s.io/kube-openapi/pkg,https://github.com/kubernetes/kube-openapi/blob/c8a335a9a2ff/LICENSE,Apache-2.0
97+
k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json,https://github.com/kubernetes/kube-openapi/blob/c8a335a9a2ff/pkg/internal/third_party/go-json-experiment/json/LICENSE,BSD-3-Clause
98+
k8s.io/kube-openapi/pkg/internal/third_party/govalidator,https://github.com/kubernetes/kube-openapi/blob/c8a335a9a2ff/pkg/internal/third_party/govalidator/LICENSE,MIT
99+
k8s.io/kube-openapi/pkg/validation/errors,https://github.com/kubernetes/kube-openapi/blob/c8a335a9a2ff/pkg/validation/errors/LICENSE,Apache-2.0
100+
k8s.io/kube-openapi/pkg/validation/spec,https://github.com/kubernetes/kube-openapi/blob/c8a335a9a2ff/pkg/validation/spec/LICENSE,Apache-2.0
101+
k8s.io/kube-openapi/pkg/validation/strfmt,https://github.com/kubernetes/kube-openapi/blob/c8a335a9a2ff/pkg/validation/strfmt/LICENSE,Apache-2.0
102+
k8s.io/utils,https://github.com/kubernetes/utils/blob/24370beab758/LICENSE,Apache-2.0
103+
k8s.io/utils/internal/third_party/forked/golang,https://github.com/kubernetes/utils/blob/24370beab758/internal/third_party/forked/golang/LICENSE,BSD-3-Clause
104+
sigs.k8s.io/apiserver-network-proxy/konnectivity-client,https://github.com/kubernetes-sigs/apiserver-network-proxy/blob/konnectivity-client/v0.31.2/konnectivity-client/LICENSE,Apache-2.0
105+
sigs.k8s.io/controller-runtime,https://github.com/kubernetes-sigs/controller-runtime/blob/v0.20.4/LICENSE,Apache-2.0
106+
sigs.k8s.io/gateway-api/apis/v1,https://github.com/kubernetes-sigs/gateway-api/blob/v1.1.0/LICENSE,Apache-2.0
107+
sigs.k8s.io/json,https://github.com/kubernetes-sigs/json/blob/cfa47c3a1cc8/LICENSE,Apache-2.0
108+
sigs.k8s.io/json,https://github.com/kubernetes-sigs/json/blob/cfa47c3a1cc8/LICENSE,BSD-3-Clause
109+
sigs.k8s.io/kustomize/api,https://github.com/kubernetes-sigs/kustomize/blob/api/v0.19.0/api/LICENSE,Apache-2.0
110+
sigs.k8s.io/kustomize/kyaml,https://github.com/kubernetes-sigs/kustomize/blob/kyaml/v0.19.0/kyaml/LICENSE,Apache-2.0
111+
sigs.k8s.io/randfill,https://github.com/kubernetes-sigs/randfill/blob/v1.0.0/LICENSE,Apache-2.0
112+
sigs.k8s.io/structured-merge-diff/v4,https://github.com/kubernetes-sigs/structured-merge-diff/blob/v4.6.0/LICENSE,Apache-2.0
113+
sigs.k8s.io/yaml,https://github.com/kubernetes-sigs/yaml/blob/v1.4.0/LICENSE,MIT
114+
sigs.k8s.io/yaml,https://github.com/kubernetes-sigs/yaml/blob/v1.4.0/LICENSE,Apache-2.0
115+
sigs.k8s.io/yaml,https://github.com/kubernetes-sigs/yaml/blob/v1.4.0/LICENSE,BSD-3-Clause
116+
sigs.k8s.io/yaml/goyaml.v2,https://github.com/kubernetes-sigs/yaml/blob/v1.4.0/goyaml.v2/LICENSE,Apache-2.0
117+
sigs.k8s.io/yaml/goyaml.v3,https://github.com/kubernetes-sigs/yaml/blob/v1.4.0/goyaml.v3/LICENSE,MIT

klone.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ targets:
5252
repo_ref: main
5353
repo_hash: 17f1b472676a6d4e5a8d3b05367cd42a520b4b04
5454
repo_path: modules/klone
55+
- folder_name: licenses
56+
repo_url: https://github.com/cert-manager/makefile-modules.git
57+
repo_ref: main
58+
repo_hash: c50107e376014fcc18cc2d1805adf06c649b069c
59+
repo_path: modules/licenses
5560
- folder_name: oci-build
5661
repo_url: https://github.com/cert-manager/makefile-modules.git
5762
repo_ref: main

make/_shared/licenses/00_mod.mk

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Copyright 2024 The cert-manager Authors.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# Utility variables
16+
current_makefile := $(lastword $(MAKEFILE_LIST))
17+
current_makefile_directory := $(dir $(current_makefile))
18+
19+
# Define default config for generating licenses
20+
license_ignore ?=
21+
license_template_file ?=
22+
23+
define license_defaults
24+
license_layer_path_$1 := $(abspath $(bin_dir)/scratch/licenses-$(VERSION))
25+
endef
26+
27+
$(foreach build_name,$(build_names),$(eval $(call license_defaults,$(build_name))))
28+
29+
# Calculate all the go.mod directories, build targets may share go.mod dirs so
30+
# we use $(sort) to de-duplicate.
31+
go_mod_dirs := $(sort $(foreach build_name,$(build_names),$(go_$(build_name)_mod_dir)))
32+
generate_go_licenses_targets := $(addsuffix /LICENSES,$(go_mod_dirs:/=))
33+
34+
.PHONY: $(generate_go_licenses_targets)
35+
$(generate_go_licenses_targets): | $$(NEEDS_GO-LICENSES)
36+
cd $(dir $@) && GOOS=linux GOARCH=amd64 $(GO-LICENSES) report --ignore "$(license_ignore)" ./... > LICENSES
37+
38+
## Generate licenses for the golang dependencies
39+
## @category [shared] Generate/Verify
40+
generate-go-licences: $(generate_go_licenses_targets)
41+
shared_generate_targets += generate-go-licences
42+
43+
# Target to generate image layer containing license information
44+
.PHONY: oci-license-layer-%
45+
oci-license-layer-%: | $(bin_dir)/scratch $$(NEEDS_GO-LICENSES)
46+
rm -rf $(license_layer_path_$*)
47+
mkdir -p $(license_layer_path_$*)/licenses
48+
cd $(go_$*_mod_dir) && GOOS=linux GOARCH=amd64 $(GO-LICENSES) report --ignore "$(license_ignore)" $(addprefix --template=,$(license_template_file)) $(go_$*_main_dir) > $(license_layer_path_$*)/licenses/LICENCES
49+
50+
# Add the license layer to every image
51+
define licences_layer_dependencies
52+
oci-build-$1: oci-license-layer-$1
53+
oci_$1_additional_layers += $(license_layer_path_$1)
54+
endef
55+
$(foreach build_name,$(build_names),$(eval $(call licences_layer_dependencies,$(build_name))))

0 commit comments

Comments
 (0)