mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-10-31 18:28:13 +00:00 
			
		
		
		
	Fix broken SELinux detection
The upgrade of dependencies in #78187 introduced a regression in detecting if SELinux is enabled or not. As the library requires the golang build tag `selinux` to be enabled after that version update. Fixes bug report #83679
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
| @@ -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 | ||||
|   | ||||
							
								
								
									
										14
									
								
								vendor/github.com/opencontainers/selinux/go-selinux/BUILD
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								vendor/github.com/opencontainers/selinux/go-selinux/BUILD
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -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( | ||||
|   | ||||
							
								
								
									
										14
									
								
								vendor/github.com/opencontainers/selinux/go-selinux/label/BUILD
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										14
									
								
								vendor/github.com/opencontainers/selinux/go-selinux/label/BUILD
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -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( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Christian Simon
					Christian Simon