add !remote tag to pkg/specgen/generate

These files should never be included on the remote client. There only
there to finalize the spec on the server side.

This makes sure it will not get reimported by accident and bloat the
remote client again.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger
2023-09-13 11:30:33 +02:00
parent 3acee29cf4
commit c1b6effac5
36 changed files with 92 additions and 87 deletions

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package checkpoint
import (

View File

@ -1,5 +1,5 @@
//go:build linux || ignore || freebsd
// +build linux ignore freebsd
//go:build !remote
// +build !remote
package generate

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (

View File

@ -1,16 +0,0 @@
//go:build linux && !cgo
// +build linux,!cgo
package generate
import (
"errors"
"github.com/containers/common/libimage"
"github.com/containers/podman/v4/pkg/specgen"
spec "github.com/opencontainers/runtime-spec/specs-go"
)
func getSeccompConfig(s *specgen.SpecGenerator, configSpec *spec.Spec, img *libimage.Image) (*spec.LinuxSeccomp, error) {
return nil, errors.New("not implemented")
}

View File

@ -1,5 +1,5 @@
//go:build linux && cgo
// +build linux,cgo
//go:build linux && !remote
// +build linux,!remote
package generate

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package kube
import (

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package kube
import (

View File

@ -1,5 +1,5 @@
//go:build linux
// +build linux
//go:build linux && !remote
// +build linux,!remote
package kube

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package kube
import (

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package kube
import (

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (

View File

@ -1,16 +0,0 @@
//go:build !linux && !freebsd
// +build !linux,!freebsd
package generate
import (
"errors"
"github.com/containers/podman/v4/libpod"
"github.com/containers/podman/v4/pkg/specgen"
"github.com/opencontainers/runtime-tools/generate"
)
func specConfigureNamespaces(s *specgen.SpecGenerator, g *generate.Generator, rt *libpod.Runtime, pod *libpod.Pod) error {
return errors.New("unsupported specConfigureNamespaces")
}

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (

View File

@ -1,4 +1,5 @@
//go:build freebsd
//go:build !remote
// +build !remote
package generate

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (

View File

@ -1,24 +0,0 @@
//go:build !linux && !freebsd
// +build !linux,!freebsd
package generate
import (
"context"
"errors"
"github.com/containers/common/libimage"
"github.com/containers/common/pkg/config"
"github.com/containers/podman/v4/libpod"
"github.com/containers/podman/v4/pkg/specgen"
spec "github.com/opencontainers/runtime-spec/specs-go"
)
// SpecGenToOCI returns the base configuration for the container.
func SpecGenToOCI(ctx context.Context, s *specgen.SpecGenerator, rt *libpod.Runtime, rtc *config.Config, newImage *libimage.Image, mounts []spec.Mount, pod *libpod.Pod, finalCmd []string, compatibleOptions *libpod.InfraInherit) (*spec.Spec, error) {
return nil, errors.New("unsupported SpecGenToOCI")
}
func WeightDevices(wtDevices map[string]spec.LinuxWeightDevice) ([]spec.LinuxWeightDevice, error) {
return []spec.LinuxWeightDevice{}, errors.New("unsupported WeightDevices")
}

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (

View File

@ -1,24 +0,0 @@
//go:build !linux && !freebsd
// +build !linux,!freebsd
package generate
import (
"errors"
"github.com/containers/common/libimage"
"github.com/containers/common/pkg/config"
"github.com/containers/podman/v4/libpod"
"github.com/containers/podman/v4/pkg/specgen"
"github.com/opencontainers/runtime-tools/generate"
)
// setLabelOpts sets the label options of the SecurityConfig according to the
// input.
func setLabelOpts(s *specgen.SpecGenerator, runtime *libpod.Runtime, pidConfig specgen.Namespace, ipcConfig specgen.Namespace) error {
return errors.New("unsupported setLabelOpts")
}
func securityConfigureGenerator(s *specgen.SpecGenerator, g *generate.Generator, newImage *libimage.Image, rtc *config.Config) error {
return errors.New("unsupported securityConfigureGenerator")
}

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (

View File

@ -1,3 +1,6 @@
//go:build !remote
// +build !remote
package generate
import (