rpm

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TarImageRef = "busybox:latest"

TarImageRef is the image used to create tarballs of sources This is purposefully exported so it can be overridden at compile time if needed. Currently this image needs /bin/sh and tar in $PATH

Functions

func Build

func Build(topDir, workerImg llb.State, specPath string, opts ...llb.ConstraintsOpt) llb.State

Builds an RPM and source RPM from a spec

`topDir` is the rpmbuild top directory which should contain the SOURCES and SPECS directories along with any other necessary files

`workerImg` is the image to use for the build It is expected to have rpmbuild and any other necessary build dependencies installed

`specPath` is the path to the spec file to build relative to `topDir`

func Dalec2SourcesLLB

func Dalec2SourcesLLB(worker llb.State, spec *dalec.Spec, sOpt dalec.SourceOpts, opts ...llb.ConstraintsOpt) ([]llb.State, error)

func Dalec2SpecLLB

func Dalec2SpecLLB(spec *dalec.Spec, in llb.State, targetKey, dir string, opts ...llb.ConstraintsOpt) (llb.State, error)

func HandleBuildroot added in v0.3.0

func HandleBuildroot(wf WorkerFunc) gwclient.BuildFunc

func HandleDebug added in v0.3.0

func HandleDebug(wf WorkerFunc) gwclient.BuildFunc

HandleDebug returns a build function that adds support for some debugging targets for RPM builds.

func HandleSources

func HandleSources(wf WorkerFunc) gwclient.BuildFunc

func HandleSpec added in v0.3.0

func HandleSpec() gwclient.BuildFunc

func SpecHandler

func SpecHandler(ctx context.Context, client gwclient.Client, spec *dalec.Spec, targetKey string) (*gwclient.Result, error)

func SpecToBuildrootLLB

func SpecToBuildrootLLB(worker llb.State, spec *dalec.Spec, sOpt dalec.SourceOpts, targetKey string, opts ...llb.ConstraintsOpt) (llb.State, error)

SpecToBuildrootLLB converts a dalec.Spec to an rpm buildroot

func ValidateSpec added in v0.2.0

func ValidateSpec(spec *dalec.Spec) (out error)

ValidateSpec makes sure all the necessary fields are present in the spec to make rpmbuild work This validation is specific to rpmbuild.

func WriteSpec

func WriteSpec(spec *dalec.Spec, target string, w io.Writer) error

WriteSpec generates an rpm spec from the provided dalec.Spec and distro target and writes it to the passed in writer

Types

type WorkerFunc added in v0.3.0

type WorkerFunc func(resolver llb.ImageMetaResolver, spec *dalec.Spec, targetKey string, opts ...llb.ConstraintsOpt) (llb.State, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL