Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add go:build tags #3185

Merged
merged 5 commits into from
Sep 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
2 changes: 0 additions & 2 deletions checkpoint.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package main

import (
Expand Down
2 changes: 0 additions & 2 deletions delete.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build !solaris

package main

import (
Expand Down
2 changes: 0 additions & 2 deletions events.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package main

import (
Expand Down
2 changes: 0 additions & 2 deletions exec.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package main

import (
Expand Down
2 changes: 0 additions & 2 deletions kill.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package main

import (
Expand Down
1 change: 1 addition & 0 deletions libcontainer/apparmor/apparmor_unsupported.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !linux
// +build !linux

package apparmor
Expand Down
1 change: 1 addition & 0 deletions libcontainer/capabilities/capabilities.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build linux
// +build linux

package capabilities
Expand Down
1 change: 1 addition & 0 deletions libcontainer/capabilities/capabilities_unsupported.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//go:build !linux
// +build !linux

package capabilities
2 changes: 0 additions & 2 deletions libcontainer/cgroups/cgroups.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package cgroups

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/cgroups_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package cgroups

import (
Expand Down
3 changes: 0 additions & 3 deletions libcontainer/cgroups/cgroups_unsupported.go

This file was deleted.

2 changes: 0 additions & 2 deletions libcontainer/cgroups/devices/devices_emulator.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

// SPDX-License-Identifier: Apache-2.0
/*
* Copyright (C) 2020 Aleksa Sarai <cyphar@cyphar.com>
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/file_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package cgroups

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/blkio.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/blkio_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/cpu.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/cpu_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/cpuacct.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/cpuacct_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/cpuset.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/cpuset_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/devices.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/devices_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/freezer.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/freezer_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/fs.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/fs_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/hugetlb.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/hugetlb_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/memory.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/memory_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/name.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/net_cls.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/net_cls_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/net_prio.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/net_prio_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/perf_event.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/pids.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/pids_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/stats_util_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs

import (
Expand Down
3 changes: 0 additions & 3 deletions libcontainer/cgroups/fs/unsupported.go

This file was deleted.

2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs/util_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

/*
Utility for testing cgroup operations.

Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs2/cpu.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs2

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs2/cpuset.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs2

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs2/devices.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs2

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs2/freezer.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs2

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs2/fs2.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs2

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs2/hugetlb.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs2

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs2/io.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs2

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs2/memory.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs2

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fs2/pids.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fs2

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fscommon/utils.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fscommon

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/fscommon/utils_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package fscommon

import (
Expand Down
3 changes: 2 additions & 1 deletion libcontainer/cgroups/getallpids.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// +build linux,go1.16
//go:build go1.16
// +build go1.16

package cgroups

Expand Down
3 changes: 2 additions & 1 deletion libcontainer/cgroups/getallpids_go115.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// +build linux,!go1.16
//go:build !go1.16
// +build !go1.16

package cgroups

Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/getallpids_test.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package cgroups

import (
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/stats.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package cgroups

type ThrottlingData struct {
Expand Down
2 changes: 0 additions & 2 deletions libcontainer/cgroups/systemd/dbus.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// +build linux

package systemd

import (
Expand Down
Loading