rpm

package
v0.18.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(topDir, workerImg llb.State, specPath string, caches CacheInfo, 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 FormatVersionConstraint

func FormatVersionConstraint(v string) string

NOTE: This is very basic and does not handle things like grouped constraints Given this is just trying to shim things to allow either the rpm format or the deb format in its basic form, this is sufficient for now.

func SpecToBuildrootLLB

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

func ToSourcesLLB

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

func ToSpecLLB

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

func ValidateSpec

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 CacheInfo

type CacheInfo struct {
	TargetKey string
	Caches    []dalec.CacheConfig
}

Jump to

Keyboard shortcuts

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