deb

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DebHelperCompat = "11"
)

Variables

This section is empty.

Functions

func BuildDeb

func BuildDeb(worker llb.State, spec *dalec.Spec, srcPkg llb.State, distroVersionID string, opts ...llb.ConstraintsOpt) (llb.State, error)

func Changelog

func Changelog(spec *dalec.Spec, in llb.State, target, dir, distroVersionID string) (llb.State, error)

func Debroot

func Debroot(ctx context.Context, sOpt dalec.SourceOpts, spec *dalec.Spec, worker, in llb.State, target, dir, distroVersionID string, cfg SourcePkgConfig, opts ...llb.ConstraintsOpt) (llb.State, error)

Debroot creates a debian root directory suitable for use with debbuild. This does not include sources in case you want to mount sources (instead of copying them) later.

Set the `distroVersionID` argument to a value suitable for including in the .deb for storing the targeted distro+version in the deb. This is generally needed so that if a distro user upgrades from, for instance, debian 11 to debian 12, that the package built for debian 12 will be considered an upgrade even if it is technically the same underlying source. It may be left blank but is highly recommended to set this. Use ReadDistroVersionID to get a suitable value.

func ReadDistroVersionID

func ReadDistroVersionID(ctx context.Context, client gwclient.Client, st llb.State) (string, error)

ReadDistroVersionID returns a string concatenating the values of ID and VERSION_ID from /etc/os-release from the provided state.

func Rules

func Rules(spec *dalec.Spec, in llb.State, dir string) (llb.State, error)

func SourcePackage

func SourcePackage(ctx context.Context, sOpt dalec.SourceOpts, worker llb.State, spec *dalec.Spec, targetKey, distroVersionID string, cfg SourcePkgConfig, opts ...llb.ConstraintsOpt) (llb.State, error)

func WriteChangelog

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

func WriteControl

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

func WriteRules

func WriteRules(spec *dalec.Spec, w io.Writer) error

Types

type SourcePkgConfig added in v0.11.0

type SourcePkgConfig struct {
	// PrependPath is a list of paths to be prepended to the $PATH var in build
	// scripts.
	PrependPath []string
	// AppendPath is a list of paths to be appended to the $PATH var in build
	// scripts.
	AppendPath []string
}

func AddPath added in v0.11.0

func AddPath(pre, post []string) SourcePkgConfig

Addpath creates a SourcePkgConfig where the first argument is sets [SourcePkgConfig.PrependPath] and the 2nd argument sets [SourcePkgConfig.AppendPath]

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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