Merge pull request #3185 from kolyshkin/go117-build-tags

Add go:build tags
This commit is contained in:
Akihiro Suda
2021-09-02 13:35:33 +09:00
committed by GitHub
131 changed files with 36 additions and 281 deletions
+2 -3
View File
@@ -8,7 +8,7 @@
## Introduction
`runc` is a CLI tool for spawning and running containers according to the OCI specification.
`runc` is a CLI tool for spawning and running containers on Linux according to the OCI specification.
## Releases
@@ -23,8 +23,7 @@ A third party security audit was performed by Cure53, you can see the full repor
## Building
`runc` currently supports the Linux platform with various architecture support.
It must be built with Go version 1.15 or higher.
`runc` only supports Linux. It must be built with Go version 1.15 or higher.
In order to enable seccomp support you will need to install `libseccomp` on your platform.
> e.g. `libseccomp-devel` for CentOS, or `libseccomp-dev` for Ubuntu
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package main
import (
-2
View File
@@ -1,5 +1,3 @@
// +build !solaris
package main
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package main
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package main
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package main
import (
@@ -1,3 +1,4 @@
//go:build !linux
// +build !linux
package apparmor
@@ -1,3 +1,4 @@
//go:build linux
// +build linux
package capabilities
@@ -1,3 +1,4 @@
//go:build !linux
// +build !linux
package capabilities
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package cgroups
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package cgroups
import (
@@ -1,3 +0,0 @@
// +build !linux
package cgroups
@@ -1,5 +1,3 @@
// +build linux
// SPDX-License-Identifier: Apache-2.0
/*
* Copyright (C) 2020 Aleksa Sarai <cyphar@cyphar.com>
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package cgroups
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
@@ -1,5 +1,3 @@
// +build linux
package fs
import (
-3
View File
@@ -1,3 +0,0 @@
// +build !linux
package fs
-2
View File
@@ -1,5 +1,3 @@
// +build linux
/*
Utility for testing cgroup operations.
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs2
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs2
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs2
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs2
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs2
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs2
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs2
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs2
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fs2
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package fscommon
import (
@@ -1,5 +1,3 @@
// +build linux
package fscommon
import (
+2 -1
View File
@@ -1,4 +1,5 @@
// +build linux,go1.16
//go:build go1.16
// +build go1.16
package cgroups
+2 -1
View File
@@ -1,4 +1,5 @@
// +build linux,!go1.16
//go:build !go1.16
// +build !go1.16
package cgroups
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package cgroups
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package cgroups
type ThrottlingData struct {
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package systemd
import (
@@ -1,71 +0,0 @@
// +build !linux
package systemd
import (
"errors"
"github.com/opencontainers/runc/libcontainer/cgroups"
"github.com/opencontainers/runc/libcontainer/configs"
)
type Manager struct {
Cgroups *configs.Cgroup
Paths map[string]string
}
func IsRunningSystemd() bool {
return false
}
func NewSystemdCgroupsManager() (func(config *configs.Cgroup, paths map[string]string) cgroups.Manager, error) {
return nil, errors.New("Systemd not supported")
}
func (m *Manager) Apply(pid int) error {
return errors.New("Systemd not supported")
}
func (m *Manager) GetPids() ([]int, error) {
return nil, errors.New("Systemd not supported")
}
func (m *Manager) GetAllPids() ([]int, error) {
return nil, errors.New("Systemd not supported")
}
func (m *Manager) Destroy() error {
return errors.New("Systemd not supported")
}
func (m *Manager) GetPaths() map[string]string {
return nil
}
func (m *Manager) Path(_ string) string {
return ""
}
func (m *Manager) GetStats() (*cgroups.Stats, error) {
return nil, errors.New("Systemd not supported")
}
func (m *Manager) Set(container *configs.Config) error {
return errors.New("Systemd not supported")
}
func (m *Manager) Freeze(state configs.FreezerState) error {
return errors.New("Systemd not supported")
}
func Freeze(c *configs.Cgroup, state configs.FreezerState) error {
return errors.New("Systemd not supported")
}
func (m *Manager) GetCgroups() (*configs.Cgroup, error) {
return nil, errors.New("Systemd not supported")
}
func (m *Manager) Exists() bool {
return false
}
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package systemd
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package systemd
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package systemd
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package cgroups
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package cgroups
import (
@@ -1,3 +1,4 @@
//go:build !linux
// +build !linux
package configs
+1
View File
@@ -1,3 +1,4 @@
//go:build gofuzz
// +build gofuzz
package configs
@@ -1,3 +1,4 @@
//go:build linux
// +build linux
package configs
@@ -1,3 +1,4 @@
//go:build !linux && !windows
// +build !linux,!windows
package configs
@@ -1,3 +1,4 @@
//go:build !linux
// +build !linux
package configs
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package libcontainer
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package libcontainer
import (
+1
View File
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows
package devices
+1
View File
@@ -1,3 +1,4 @@
//go:build !windows
// +build !windows
package devices
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package libcontainer
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package libcontainer
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package libcontainer
import (
+1
View File
@@ -1,3 +1,4 @@
//go:build linux && cgo && seccomp
// +build linux,cgo,seccomp
package integration
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package intelrdt
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package intelrdt
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package intelrdt
// The flag to indicate if Intel RDT/MBM is enabled
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package intelrdt
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package intelrdt
type L3CacheInfo struct {
-2
View File
@@ -1,5 +1,3 @@
// +build linux
/*
* Utility for testing Intel RDT operations.
* Creates a mock of the Intel RDT "resource control" filesystem for the duration of the test.
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package keys
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package libcontainer
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package libcontainer
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package libcontainer
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package libcontainer
import (
@@ -1,5 +1,3 @@
// +build linux
package libcontainer
import (
+1
View File
@@ -1,3 +1,4 @@
//go:build linux && !gccgo
// +build linux,!gccgo
package nsenter
+1
View File
@@ -1,3 +1,4 @@
//go:build linux && gccgo
// +build linux,gccgo
package nsenter
@@ -1,3 +1,4 @@
//go:build !linux || !cgo
// +build !linux !cgo
package nsenter
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package libcontainer
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package libcontainer
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package libcontainer
import (
-2
View File
@@ -1,5 +1,3 @@
// +build linux
package libcontainer
import (
@@ -1,4 +1,5 @@
// +build linux,cgo,seccomp
//go:build cgo && seccomp
// +build cgo,seccomp
package patchbpf
@@ -1,4 +1,5 @@
// +build linux,cgo,seccomp
//go:build cgo && seccomp
// +build cgo,seccomp
package patchbpf
@@ -1,3 +1,4 @@
//go:build !linux || !cgo || !seccomp
// +build !linux !cgo !seccomp
package patchbpf

Some files were not shown because too many files have changed in this diff Show More