Merge pull request #86027 from simonswine/fix-selinux-detection

Fix broken SELinux detection
This commit is contained in:
Kubernetes Prow Robot 2019-12-07 17:41:08 -08:00 committed by GitHub
commit af1baaa121
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 2 deletions

View File

@ -16,6 +16,9 @@ build --workspace_status_command hack/print-workspace-status.sh
# Make /tmp hermetic
build --sandbox_tmpfs_path=/tmp
# This tag is required to build github.com/opencontainers/selinux correctly
build --define gotags=selinux
# Ensure that Bazel never runs as root, which can cause unit tests to fail.
# This flag requires Bazel 0.5.0+
build --sandbox_fake_username

View File

@ -5,6 +5,9 @@
# gazelle:exclude _output
# gazelle:exclude _tmp
# This tag is required to build github.com/opencontainers/selinux correctly
# gazelle:build_tags selinux
# gazelle:prefix k8s.io/kubernetes
# Disable proto rules, since the Go sources are currently generated by

View File

@ -2,10 +2,22 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = ["selinux_stub.go"],
srcs = [
"selinux_linux.go",
"xattrs.go",
],
importmap = "k8s.io/kubernetes/vendor/github.com/opencontainers/selinux/go-selinux",
importpath = "github.com/opencontainers/selinux/go-selinux",
visibility = ["//visibility:public"],
deps = select({
"@io_bazel_rules_go//go/platform:android": [
"//vendor/golang.org/x/sys/unix:go_default_library",
],
"@io_bazel_rules_go//go/platform:linux": [
"//vendor/golang.org/x/sys/unix:go_default_library",
],
"//conditions:default": [],
}),
)
filegroup(

View File

@ -2,10 +2,22 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = ["label.go"],
srcs = [
"label.go",
"label_selinux.go",
],
importmap = "k8s.io/kubernetes/vendor/github.com/opencontainers/selinux/go-selinux/label",
importpath = "github.com/opencontainers/selinux/go-selinux/label",
visibility = ["//visibility:public"],
deps = select({
"@io_bazel_rules_go//go/platform:android": [
"//vendor/github.com/opencontainers/selinux/go-selinux:go_default_library",
],
"@io_bazel_rules_go//go/platform:linux": [
"//vendor/github.com/opencontainers/selinux/go-selinux:go_default_library",
],
"//conditions:default": [],
}),
)
filegroup(