Documentation
¶
Index ¶
- Constants
- func AppendConstraints(deps dalec.PackageDependencyList) []string
- func BuildDeb(worker llb.State, spec *dalec.Spec, srcPkg llb.State, distroVersionID string, ...) llb.State
- func BuildDebBinaryOnly(worker llb.State, spec *dalec.Spec, debroot llb.State, distroVersionID string, ...) llb.State
- func Changelog(spec *dalec.Spec, in llb.State, target, dir, distroVersionID string) (llb.State, error)
- func Debroot(ctx context.Context, sOpt dalec.SourceOpts, spec *dalec.Spec, ...) llb.State
- func ReadDistroVersionID(ctx context.Context, client gwclient.Client, st llb.State) (string, error)
- func Rules(spec *dalec.Spec, in llb.State, dir, target string) (llb.State, error)
- func SourcePackage(ctx context.Context, sOpt dalec.SourceOpts, worker llb.State, spec *dalec.Spec, ...) llb.State
- func TarDebSources(work llb.State, spec *dalec.Spec, srcStates map[string]llb.State, dest string, ...) llb.State
- func WriteChangelog(w io.Writer, spec *dalec.Spec, target, distroID string) error
- func WriteControl(spec *dalec.Spec, target string, w io.Writer) error
- func WriteRules(spec *dalec.Spec, w io.Writer, target string) error
- type SourcePkgConfig
Constants ¶
const ( DebHelperCompat = "11" BinariesPath = "/usr/bin" ConfigFilesPath = "/etc" ManpagesPath = "/usr/share/doc/manpages" HeadersPath = "/usr/include" LicensesPath = "/usr/share/doc" DocsPath = "/usr/share/doc" LibsPath = "/usr/lib" LibexecPath = "/usr/libexec" DataDirsPath = "/usr/share" )
Variables ¶
This section is empty.
Functions ¶
func AppendConstraints ¶
func AppendConstraints(deps dalec.PackageDependencyList) []string
AppendConstraints takes an input list of packages and returns a new list of packages with the constraints appended for use in a debian/control file. The output list is sorted lexicographically.
func BuildDebBinaryOnly ¶
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
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 ¶
ReadDistroVersionID returns a string concatenating the values of ID and VERSION_ID from /etc/os-release from the provided state.
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
func TarDebSources ¶
func WriteChangelog ¶
Types ¶
type SourcePkgConfig ¶
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 ¶
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]