Skip to content

Commit 8f9e063

Browse files
Merge pull request #282 from inteon/licenses
Add dependency licenses to repo and OCI image
2 parents db81aff + 02db3a2 commit 8f9e063

File tree

3 files changed

+172
-0
lines changed

3 files changed

+172
-0
lines changed

LICENSES

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
github.com/Azure/go-ntlmssp,https://github.com/Azure/go-ntlmssp/blob/754e69321358/LICENSE,MIT
2+
github.com/beorn7/perks/quantile,https://github.com/beorn7/perks/blob/v1.0.1/LICENSE,MIT
3+
github.com/blang/semver/v4,https://github.com/blang/semver/blob/v4.0.0/v4/LICENSE,MIT
4+
github.com/cert-manager/cert-manager,https://github.com/cert-manager/cert-manager/blob/v1.17.1/LICENSE,Apache-2.0
5+
github.com/cert-manager/csi-driver-spiffe,https://github.com/cert-manager/csi-driver-spiffe/blob/HEAD/LICENSE,Apache-2.0
6+
github.com/cert-manager/csi-lib,https://github.com/cert-manager/csi-lib/blob/v0.8.1/LICENSE,Apache-2.0
7+
github.com/cespare/xxhash/v2,https://github.com/cespare/xxhash/blob/v2.3.0/LICENSE.txt,MIT
8+
github.com/container-storage-interface/spec/lib/go/csi,https://github.com/container-storage-interface/spec/blob/v1.10.0/LICENSE,Apache-2.0
9+
github.com/coreos/go-systemd/v22/dbus,https://github.com/coreos/go-systemd/blob/v22.5.0/LICENSE,Apache-2.0
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/fsnotify/fsnotify,https://github.com/fsnotify/fsnotify/blob/v1.9.0/LICENSE,BSD-3-Clause
14+
github.com/fxamacker/cbor/v2,https://github.com/fxamacker/cbor/blob/v2.7.0/LICENSE,MIT
15+
github.com/go-asn1-ber/asn1-ber,https://github.com/go-asn1-ber/asn1-ber/blob/v1.5.7/LICENSE,MIT
16+
github.com/go-errors/errors,https://github.com/go-errors/errors/blob/v1.4.2/LICENSE.MIT,MIT
17+
github.com/go-jose/go-jose/v4,https://github.com/go-jose/go-jose/blob/v4.1.0/LICENSE,Apache-2.0
18+
github.com/go-jose/go-jose/v4/json,https://github.com/go-jose/go-jose/blob/v4.1.0/json/LICENSE,BSD-3-Clause
19+
github.com/go-ldap/ldap/v3,https://github.com/go-ldap/ldap/blob/v3.4.8/v3/LICENSE,MIT
20+
github.com/go-logr/logr,https://github.com/go-logr/logr/blob/v1.4.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/godbus/dbus/v5,https://github.com/godbus/dbus/blob/v5.1.0/LICENSE,BSD-2-Clause
26+
github.com/gogo/protobuf,https://github.com/gogo/protobuf/blob/v1.3.2/LICENSE,BSD-3-Clause
27+
github.com/golang/protobuf,https://github.com/golang/protobuf/blob/v1.5.4/LICENSE,BSD-3-Clause
28+
github.com/google/btree,https://github.com/google/btree/blob/v1.1.3/LICENSE,Apache-2.0
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/gofuzz,https://github.com/google/gofuzz/blob/v1.2.0/LICENSE,Apache-2.0
32+
github.com/google/shlex,https://github.com/google/shlex/blob/e7afc7fbc510/COPYING,Apache-2.0
33+
github.com/google/uuid,https://github.com/google/uuid/blob/v1.6.0/LICENSE,BSD-3-Clause
34+
github.com/gregjones/httpcache,https://github.com/gregjones/httpcache/blob/901d90724c79/LICENSE.txt,MIT
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/klauspost/compress,https://github.com/klauspost/compress/blob/v1.17.11/LICENSE,MIT
38+
github.com/klauspost/compress,https://github.com/klauspost/compress/blob/v1.17.11/LICENSE,Apache-2.0
39+
github.com/klauspost/compress,https://github.com/klauspost/compress/blob/v1.17.11/LICENSE,BSD-3-Clause
40+
github.com/klauspost/compress/internal/snapref,https://github.com/klauspost/compress/blob/v1.17.11/internal/snapref/LICENSE,BSD-3-Clause
41+
github.com/klauspost/compress/zstd/internal/xxhash,https://github.com/klauspost/compress/blob/v1.17.11/zstd/internal/xxhash/LICENSE.txt,MIT
42+
github.com/kubernetes-csi/csi-lib-utils/protosanitizer,https://github.com/kubernetes-csi/csi-lib-utils/blob/v0.19.0/LICENSE,Apache-2.0
43+
github.com/liggitt/tabwriter,https://github.com/liggitt/tabwriter/blob/89fcab3d43de/LICENSE,BSD-3-Clause
44+
github.com/mailru/easyjson,https://github.com/mailru/easyjson/blob/v0.9.0/LICENSE,MIT
45+
github.com/moby/sys/mountinfo,https://github.com/moby/sys/blob/mountinfo/v0.7.2/mountinfo/LICENSE,Apache-2.0
46+
github.com/moby/term,https://github.com/moby/term/blob/v0.5.0/LICENSE,Apache-2.0
47+
github.com/modern-go/concurrent,https://github.com/modern-go/concurrent/blob/bacd9c7ef1dd/LICENSE,Apache-2.0
48+
github.com/modern-go/reflect2,https://github.com/modern-go/reflect2/blob/v1.0.2/LICENSE,Apache-2.0
49+
github.com/monochromegane/go-gitignore,https://github.com/monochromegane/go-gitignore/blob/205db1a8cc00/LICENSE,MIT
50+
github.com/munnerz/goautoneg,https://github.com/munnerz/goautoneg/blob/a7dc8b61c822/LICENSE,BSD-3-Clause
51+
github.com/onsi/ginkgo/v2,https://github.com/onsi/ginkgo/blob/v2.23.4/LICENSE,MIT
52+
github.com/onsi/gomega,https://github.com/onsi/gomega/blob/v1.37.0/LICENSE,MIT
53+
github.com/opencontainers/runc/libcontainer,https://github.com/opencontainers/runc/blob/v1.1.14/LICENSE,Apache-2.0
54+
github.com/opencontainers/runtime-spec/specs-go,https://github.com/opencontainers/runtime-spec/blob/v1.2.0/LICENSE,Apache-2.0
55+
github.com/peterbourgon/diskv,https://github.com/peterbourgon/diskv/blob/v2.0.1/LICENSE,MIT
56+
github.com/pkg/errors,https://github.com/pkg/errors/blob/v0.9.1/LICENSE,BSD-2-Clause
57+
github.com/prometheus/client_golang/internal/github.com/golang/gddo/httputil,https://github.com/prometheus/client_golang/blob/v1.20.5/internal/github.com/golang/gddo/LICENSE,BSD-3-Clause
58+
github.com/prometheus/client_golang/prometheus,https://github.com/prometheus/client_golang/blob/v1.20.5/LICENSE,Apache-2.0
59+
github.com/prometheus/client_model/go,https://github.com/prometheus/client_model/blob/v0.6.1/LICENSE,Apache-2.0
60+
github.com/prometheus/common,https://github.com/prometheus/common/blob/v0.61.0/LICENSE,Apache-2.0
61+
github.com/prometheus/procfs,https://github.com/prometheus/procfs/blob/v0.15.1/LICENSE,Apache-2.0
62+
github.com/sirupsen/logrus,https://github.com/sirupsen/logrus/blob/v1.9.3/LICENSE,MIT
63+
github.com/spf13/cobra,https://github.com/spf13/cobra/blob/v1.9.1/LICENSE.txt,Apache-2.0
64+
github.com/spf13/pflag,https://github.com/spf13/pflag/blob/v1.0.6/LICENSE,BSD-3-Clause
65+
github.com/x448/float16,https://github.com/x448/float16/blob/v0.8.4/LICENSE,MIT
66+
github.com/xlab/treeprint,https://github.com/xlab/treeprint/blob/v1.2.0/LICENSE,MIT
67+
go.opentelemetry.io/otel,https://github.com/open-telemetry/opentelemetry-go/blob/v1.33.0/LICENSE,Apache-2.0
68+
go.opentelemetry.io/otel/trace,https://github.com/open-telemetry/opentelemetry-go/blob/trace/v1.33.0/trace/LICENSE,Apache-2.0
69+
go.uber.org/multierr,https://github.com/uber-go/multierr/blob/v1.11.0/LICENSE.txt,MIT
70+
go.uber.org/zap,https://github.com/uber-go/zap/blob/v1.27.0/LICENSE,MIT
71+
golang.org/x/crypto,https://cs.opensource.google/go/x/crypto/+/v0.37.0:LICENSE,BSD-3-Clause
72+
golang.org/x/net,https://cs.opensource.google/go/x/net/+/v0.39.0:LICENSE,BSD-3-Clause
73+
golang.org/x/oauth2,https://cs.opensource.google/go/x/oauth2/+/v0.24.0:LICENSE,BSD-3-Clause
74+
golang.org/x/sync/errgroup,https://cs.opensource.google/go/x/sync/+/v0.13.0:LICENSE,BSD-3-Clause
75+
golang.org/x/sys/unix,https://cs.opensource.google/go/x/sys/+/v0.32.0:LICENSE,BSD-3-Clause
76+
golang.org/x/term,https://cs.opensource.google/go/x/term/+/v0.31.0:LICENSE,BSD-3-Clause
77+
golang.org/x/text,https://cs.opensource.google/go/x/text/+/v0.24.0:LICENSE,BSD-3-Clause
78+
golang.org/x/time/rate,https://cs.opensource.google/go/x/time/+/v0.8.0:LICENSE,BSD-3-Clause
79+
gomodules.xyz/jsonpatch/v2,https://github.com/gomodules/jsonpatch/blob/v2.4.0/v2/LICENSE,Apache-2.0
80+
google.golang.org/genproto/googleapis/rpc/status,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.70.0/LICENSE,Apache-2.0
82+
google.golang.org/protobuf,https://github.com/protocolbuffers/protobuf-go/blob/v1.36.5/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.32.3/LICENSE,Apache-2.0
87+
k8s.io/apiextensions-apiserver/pkg,https://github.com/kubernetes/apiextensions-apiserver/blob/v0.32.1/LICENSE,Apache-2.0
88+
k8s.io/apimachinery/pkg,https://github.com/kubernetes/apimachinery/blob/v0.32.3/LICENSE,Apache-2.0
89+
k8s.io/apimachinery/third_party/forked/golang,https://github.com/kubernetes/apimachinery/blob/v0.32.3/third_party/forked/golang/LICENSE,BSD-3-Clause
90+
k8s.io/cli-runtime/pkg,https://github.com/kubernetes/cli-runtime/blob/v0.32.3/LICENSE,Apache-2.0
91+
k8s.io/client-go,https://github.com/kubernetes/client-go/blob/v0.32.3/LICENSE,Apache-2.0
92+
k8s.io/client-go/third_party/forked/golang/template,https://github.com/kubernetes/client-go/blob/v0.32.3/third_party/forked/golang/LICENSE,BSD-3-Clause
93+
k8s.io/component-base,https://github.com/kubernetes/component-base/blob/v0.32.3/LICENSE,Apache-2.0
94+
k8s.io/klog/v2,https://github.com/kubernetes/klog/blob/v2.130.1/LICENSE,Apache-2.0
95+
k8s.io/kube-openapi/pkg,https://github.com/kubernetes/kube-openapi/blob/2c72e554b1e7/LICENSE,Apache-2.0
96+
k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json,https://github.com/kubernetes/kube-openapi/blob/2c72e554b1e7/pkg/internal/third_party/go-json-experiment/json/LICENSE,BSD-3-Clause
97+
k8s.io/kube-openapi/pkg/validation/spec,https://github.com/kubernetes/kube-openapi/blob/2c72e554b1e7/pkg/validation/spec/LICENSE,Apache-2.0
98+
k8s.io/mount-utils,https://github.com/kubernetes/mount-utils/blob/v0.31.1/LICENSE,Apache-2.0
99+
k8s.io/utils,https://github.com/kubernetes/utils/blob/24370beab758/LICENSE,Apache-2.0
100+
k8s.io/utils/internal/third_party/forked/golang,https://github.com/kubernetes/utils/blob/24370beab758/internal/third_party/forked/golang/LICENSE,BSD-3-Clause
101+
sigs.k8s.io/controller-runtime,https://github.com/kubernetes-sigs/controller-runtime/blob/v0.20.4/LICENSE,Apache-2.0
102+
sigs.k8s.io/gateway-api/apis/v1,https://github.com/kubernetes-sigs/gateway-api/blob/v1.1.0/LICENSE,Apache-2.0
103+
sigs.k8s.io/json,https://github.com/kubernetes-sigs/json/blob/cfa47c3a1cc8/LICENSE,Apache-2.0
104+
sigs.k8s.io/json,https://github.com/kubernetes-sigs/json/blob/cfa47c3a1cc8/LICENSE,BSD-3-Clause
105+
sigs.k8s.io/kustomize/api,https://github.com/kubernetes-sigs/kustomize/blob/api/v0.18.0/api/LICENSE,Apache-2.0
106+
sigs.k8s.io/kustomize/kyaml,https://github.com/kubernetes-sigs/kustomize/blob/kyaml/v0.18.1/kyaml/LICENSE,Apache-2.0
107+
sigs.k8s.io/structured-merge-diff/v4,https://github.com/kubernetes-sigs/structured-merge-diff/blob/v4.5.0/LICENSE,Apache-2.0
108+
sigs.k8s.io/yaml,https://github.com/kubernetes-sigs/yaml/blob/v1.4.0/LICENSE,MIT
109+
sigs.k8s.io/yaml,https://github.com/kubernetes-sigs/yaml/blob/v1.4.0/LICENSE,Apache-2.0
110+
sigs.k8s.io/yaml,https://github.com/kubernetes-sigs/yaml/blob/v1.4.0/LICENSE,BSD-3-Clause
111+
sigs.k8s.io/yaml/goyaml.v2,https://github.com/kubernetes-sigs/yaml/blob/v1.4.0/goyaml.v2/LICENSE,Apache-2.0
112+
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)