Documentation
¶
Index ¶
- func DnfInstall(cfg *dnfInstallConfig, releaseVer string, pkgs []string) llb.RunOption
- func DnfNoGPGCheck(cfg *dnfInstallConfig)
- func TdnfInstall(cfg *dnfInstallConfig, releaseVer string, pkgs []string) llb.RunOption
- type Config
- func (cfg *Config) BuildContainer(ctx context.Context, client gwclient.Client, worker llb.State, ...) (llb.State, error)
- func (c *Config) BuildPkg(ctx context.Context, client gwclient.Client, worker llb.State, ...) (llb.State, error)
- func (c *Config) DebugWorker(ctx context.Context, client gwclient.Client, spec *dalec.Spec, ...) (llb.State, error)
- func (cfg *Config) Handle(ctx context.Context, client gwclient.Client) (*gwclient.Result, error)
- func (c *Config) HandleBuildroot(ctx context.Context, client gwclient.Client) (*gwclient.Result, error)
- func (c *Config) HandleDebug() gwclient.BuildFunc
- func (cfg *Config) HandleDepsOnly(ctx context.Context, client gwclient.Client) (*gwclient.Result, error)
- func (c *Config) HandleSources(ctx context.Context, client gwclient.Client) (*gwclient.Result, error)
- func (c *Config) HandleSpec(ctx context.Context, client gwclient.Client) (*gwclient.Result, error)
- func (cfg *Config) HandleWorker(ctx context.Context, client gwclient.Client) (*gwclient.Result, error)
- func (c *Config) Install(pkgs []string, opts ...DnfInstallOpt) llb.RunOption
- func (cfg *Config) InstallBuildDeps(ctx context.Context, client gwclient.Client, spec *dalec.Spec, ...) llb.StateOption
- func (cfg *Config) InstallTestDeps(worker llb.State, sOpt dalec.SourceOpts, targetKey string, spec *dalec.Spec, ...) llb.StateOption
- func (cfg *Config) PackageCacheMount(root string) llb.RunOption
- func (cfg *Config) RepoMounts(repos []dalec.PackageRepositoryConfig, sOpt dalec.SourceOpts, ...) (llb.RunOption, []string, error)
- func (cfg *Config) RunTests(ctx context.Context, client gwclient.Client, worker llb.State, ...) (gwclient.Reference, error)
- func (c *Config) Validate(spec *dalec.Spec) error
- func (cfg *Config) Worker(sOpt dalec.SourceOpts, opts ...llb.ConstraintsOpt) (llb.State, error)
- type DnfInstallOpt
- type PackageInstaller
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DnfInstall ¶
func DnfNoGPGCheck ¶
func DnfNoGPGCheck(cfg *dnfInstallConfig)
Types ¶
type Config ¶
type Config struct {
FullName string
ImageRef string
ContextRef string
// The release version of the distro
ReleaseVer string
// Build dependencies needed
BuilderPackages []string
// Dependencies to install in base image
BasePackages []dalec.Spec
RepoPlatformConfig *dalec.RepoPlatformConfig
DefaultOutputImage string
InstallFunc PackageInstaller
// Unique identifier for the package cache for this particular distro,
// e.g., azlinux3-tdnf-cache
CacheName string
// Whether to namespace the cache key by platform
// Not all distros need this, hence why it is configurable.
// The cache key is only added when the build platform and target platform differ.
CacheAddPlatform bool
// e.g. /var/cache/tdnf or /var/cache/dnf
CacheDir string
}
func (*Config) BuildContainer ¶
func (*Config) DebugWorker ¶
func (c *Config) DebugWorker(ctx context.Context, client gwclient.Client, spec *dalec.Spec, targetKey string, sOpt dalec.SourceOpts, opts ...llb.ConstraintsOpt) (llb.State, error)
DebugWorker returns a worker image with the build dependencies specified in `spec` installed, if needed. It is most useful for `HandleSources` handler in which we aren't building a full worker image with build dependencies because we aren't executing build steps, but we may still have source generators which depend on `build` dependencies in the spec in order to run.
func (*Config) HandleBuildroot ¶
func (*Config) HandleDebug ¶
HandleDebug returns a build function that adds support for some debugging targets for RPM builds.
func (*Config) HandleDepsOnly ¶
func (*Config) HandleSources ¶
func (*Config) HandleSpec ¶
func (*Config) HandleWorker ¶
func (cfg *Config) HandleWorker(ctx context.Context, client gwclient.Client) (*gwclient.Result, error)
The implementation here is identical to that for the deb distro. TODO: can this be refactored to share code?
func (*Config) Install ¶
func (c *Config) Install(pkgs []string, opts ...DnfInstallOpt) llb.RunOption
func (*Config) InstallBuildDeps ¶
func (cfg *Config) InstallBuildDeps(ctx context.Context, client gwclient.Client, spec *dalec.Spec, sOpt dalec.SourceOpts, targetKey string, opts ...llb.ConstraintsOpt) llb.StateOption
func (*Config) InstallTestDeps ¶
func (cfg *Config) InstallTestDeps(worker llb.State, sOpt dalec.SourceOpts, targetKey string, spec *dalec.Spec, opts ...llb.ConstraintsOpt) llb.StateOption
func (*Config) RepoMounts ¶
func (cfg *Config) RepoMounts(repos []dalec.PackageRepositoryConfig, sOpt dalec.SourceOpts, opts ...llb.ConstraintsOpt) (llb.RunOption, []string, error)
func (*Config) RunTests ¶
func (cfg *Config) RunTests(ctx context.Context, client gwclient.Client, worker llb.State, spec *dalec.Spec, sOpt dalec.SourceOpts, ctr llb.State, targetKey string, opts ...llb.ConstraintsOpt) (gwclient.Reference, error)
runTests runs the package tests The returned reference is the solved container state
func (*Config) Worker ¶
func (cfg *Config) Worker(sOpt dalec.SourceOpts, opts ...llb.ConstraintsOpt) (llb.State, error)
type DnfInstallOpt ¶
type DnfInstallOpt func(*dnfInstallConfig)
func DnfAtRoot ¶
func DnfAtRoot(root string) DnfInstallOpt
func DnfDownloadAllDeps ¶
func DnfDownloadAllDeps(dest string) DnfInstallOpt
func DnfImportKeys ¶
func DnfImportKeys(keys []string) DnfInstallOpt
see comment in tdnfInstall for why this additional option is needed
func DnfWithMounts ¶
func DnfWithMounts(opts ...llb.RunOption) DnfInstallOpt
func IncludeDocs ¶ added in v0.16.2
func IncludeDocs(v bool) DnfInstallOpt