Skip to content

Commit

Permalink
Add default_applicable_licenses rules to packages.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 513581243
  • Loading branch information
amscanne authored and gvisor-bot committed Mar 2, 2023
1 parent 8b92c91 commit 1ceb814
Show file tree
Hide file tree
Showing 390 changed files with 1,372 additions and 307 deletions.
11 changes: 10 additions & 1 deletion BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,17 @@ load("//tools:defs.bzl", "build_test", "gazelle", "go_path")
load("//tools/nogo:defs.bzl", "nogo_config")
load("//tools/yamltest:defs.bzl", "yaml_test")
load("//website:defs.bzl", "doc")
load("@rules_license//rules:license.bzl", "license")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

license(
name = "license",
package_name = "gvisor",
)

exports_files(["LICENSE"])

Expand Down
10 changes: 10 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")

bazel_skylib_workspace()

# Load license rules.
http_archive(
name = "rules_license",
urls = [
"https://github.com/bazelbuild/rules_license/releases/download/0.0.4/rules_license-0.0.4.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/rules_license/releases/download/0.0.4/rules_license-0.0.4.tar.gz",
],
sha256 = "6157e1e68378532d0241ecd15d3c45f6e5cfd98fc10846045509fb2a7cc9e381",
)

# Load go bazel rules and gazelle.
#
# Note that this repository actually patches some other Go repositories as it
Expand Down
5 changes: 4 additions & 1 deletion debian/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
load("//tools:arch.bzl", "select_arch")
load("//tools:defs.bzl", "pkg_deb", "pkg_tar", "version")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

pkg_tar(
name = "debian-bin",
Expand Down
5 changes: 4 additions & 1 deletion examples/seccheck/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
load("//tools:defs.bzl", "cc_binary")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

cc_binary(
name = "server_cc",
Expand Down
1 change: 1 addition & 0 deletions g3doc/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
load("//website:defs.bzl", "doc")

package(
default_applicable_licenses = ["//:license"],
default_visibility = ["//website:__pkg__"],
licenses = ["notice"],
)
Expand Down
1 change: 1 addition & 0 deletions g3doc/architecture_guide/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
load("//website:defs.bzl", "doc")

package(
default_applicable_licenses = ["//:license"],
default_visibility = ["//website:__pkg__"],
licenses = ["notice"],
)
Expand Down
1 change: 1 addition & 0 deletions g3doc/proposals/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
load("//website:defs.bzl", "doc")

package(
default_applicable_licenses = ["//:license"],
default_visibility = ["//website:__pkg__"],
licenses = ["notice"],
)
Expand Down
1 change: 1 addition & 0 deletions g3doc/user_guide/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
load("//website:defs.bzl", "doc")

package(
default_applicable_licenses = ["//:license"],
default_visibility = ["//website:__pkg__"],
licenses = ["notice"],
)
Expand Down
1 change: 1 addition & 0 deletions g3doc/user_guide/containerd/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
load("//website:defs.bzl", "doc")

package(
default_applicable_licenses = ["//:license"],
default_visibility = ["//website:__pkg__"],
licenses = ["notice"],
)
Expand Down
1 change: 1 addition & 0 deletions g3doc/user_guide/quick_start/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
load("//website:defs.bzl", "doc")

package(
default_applicable_licenses = ["//:license"],
default_visibility = ["//website:__pkg__"],
licenses = ["notice"],
)
Expand Down
1 change: 1 addition & 0 deletions g3doc/user_guide/tutorials/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
load("//website:defs.bzl", "doc")

package(
default_applicable_licenses = ["//:license"],
default_visibility = ["//website:__pkg__"],
licenses = ["notice"],
)
Expand Down
5 changes: 4 additions & 1 deletion images/BUILD
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)
5 changes: 4 additions & 1 deletion pkg/abi/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
load("//tools:defs.bzl", "go_library")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "abi",
Expand Down
5 changes: 4 additions & 1 deletion pkg/abi/attestation/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
load("//tools:defs.bzl", "go_library")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "attestation",
Expand Down
5 changes: 4 additions & 1 deletion pkg/abi/linux/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ load("//tools:defs.bzl", "go_library", "go_test")
# Linux kernel. It should be used instead of syscall or golang.org/x/sys/unix
# when the host OS may not be Linux.

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "linux",
Expand Down
5 changes: 4 additions & 1 deletion pkg/abi/linux/errno/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
load("//tools:defs.bzl", "go_library")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "errno",
Expand Down
5 changes: 4 additions & 1 deletion pkg/atomicbitops/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
load("//tools:defs.bzl", "go_library", "go_test")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "atomicbitops",
Expand Down
5 changes: 4 additions & 1 deletion pkg/binary/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
load("//tools:defs.bzl", "go_library", "go_test")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "binary",
Expand Down
5 changes: 4 additions & 1 deletion pkg/bitmap/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
load("//tools:defs.bzl", "go_library", "go_test")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "bitmap",
Expand Down
5 changes: 4 additions & 1 deletion pkg/bits/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
load("//tools:defs.bzl", "go_library", "go_test")
load("//tools/go_generics:defs.bzl", "go_template", "go_template_instance")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "bits",
Expand Down
5 changes: 4 additions & 1 deletion pkg/bpf/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
load("//tools:defs.bzl", "go_library", "go_test")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "bpf",
Expand Down
5 changes: 4 additions & 1 deletion pkg/bufferv2/BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
load("//tools:defs.bzl", "go_library", "go_test")
load("//tools/go_generics:defs.bzl", "go_template_instance")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_template_instance(
name = "chunk_refs",
Expand Down
5 changes: 4 additions & 1 deletion pkg/cleanup/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
load("//tools:defs.bzl", "go_library", "go_test")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "cleanup",
Expand Down
5 changes: 4 additions & 1 deletion pkg/compressio/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
load("//tools:defs.bzl", "go_library", "go_test")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "compressio",
Expand Down
5 changes: 4 additions & 1 deletion pkg/context/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
load("//tools:defs.bzl", "go_library")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "context",
Expand Down
5 changes: 4 additions & 1 deletion pkg/control/client/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
load("//tools:defs.bzl", "go_library")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "client",
Expand Down
5 changes: 4 additions & 1 deletion pkg/control/server/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
load("//tools:defs.bzl", "go_library")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "server",
Expand Down
5 changes: 4 additions & 1 deletion pkg/coretag/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
load("//tools:defs.bzl", "go_library", "go_test")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "coretag",
Expand Down
5 changes: 4 additions & 1 deletion pkg/coverage/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
load("//tools:defs.bzl", "go_library")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "coverage",
Expand Down
5 changes: 4 additions & 1 deletion pkg/cpuid/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
load("//tools:defs.bzl", "go_library", "go_test")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "cpuid",
Expand Down
5 changes: 4 additions & 1 deletion pkg/crypto/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
load("//tools:defs.bzl", "go_library")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "crypto",
Expand Down
5 changes: 4 additions & 1 deletion pkg/errors/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
load("//tools:defs.bzl", "go_library")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "errors",
Expand Down
5 changes: 4 additions & 1 deletion pkg/errors/linuxerr/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
load("//tools:defs.bzl", "go_library", "go_test")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "linuxerr",
Expand Down
5 changes: 4 additions & 1 deletion pkg/eventchannel/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
load("//tools:defs.bzl", "go_library", "go_test", "proto_library")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "eventchannel",
Expand Down
5 changes: 4 additions & 1 deletion pkg/eventfd/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
load("//tools:defs.bzl", "go_library", "go_test")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "eventfd",
Expand Down
5 changes: 4 additions & 1 deletion pkg/fd/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
load("//tools:defs.bzl", "go_library", "go_test")

package(licenses = ["notice"])
package(
default_applicable_licenses = ["//:license"],
licenses = ["notice"],
)

go_library(
name = "fd",
Expand Down
2 changes: 2 additions & 0 deletions pkg/fdchannel/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
load("//tools:defs.bzl", "go_library", "go_test")

package(default_applicable_licenses = ["//:license"])

licenses(["notice"])

go_library(
Expand Down
Loading

0 comments on commit 1ceb814

Please sign in to comment.