Documentation
¶
Overview ¶
Package capture snapshots an installed prefix into a signed squashfs layer.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotSupported = errors.New("capture: strata capture requires Linux")
ErrNotSupported is returned on non-Linux platforms where capture is unavailable.
Functions ¶
func NormalizePaths ¶
func NormalizePaths(_ context.Context, dir, originalPrefix, newPrefix string) (modified int, warnings []string, err error)
NormalizePaths rewrites originalPrefix → newPrefix in dir (in-place). Handles: ELF RPATH/interpreter (via patchelf), shebangs, .pc, .la, .cmake files. Never errors on individual files — puts failures in warnings slice.
Types ¶
type Config ¶
type Config struct {
Name, Version, Prefix string // all required
ABI, Arch string // auto-detected if empty
Normalize bool // rewrite paths (default: preserve-prefix)
CaptureSource string // "lmod", "conda", "filesystem", ""
OriginalPrefix string // = Prefix unless Normalize applied
Signer trust.Signer // nil = no signing
Registry PushRegistry // required unless DryRun
DryRun bool
TempDir string
Provides []spec.Capability
Requires []spec.Requirement
}
Config holds the configuration for a capture operation.
type PushRegistry ¶
type PushRegistry interface {
PushLayer(ctx context.Context, manifest *spec.LayerManifest,
sqfsPath string, bundleJSON []byte) error
}
PushRegistry is the narrow interface capture needs from the registry. Satisfied by *registry.S3Client and *registry.LocalClient.
Click to show internal directories.
Click to hide internal directories.