Documentation
¶
Index ¶
- Variables
- func HasArchSuffix(pkg string) (archIdentifier string, ok bool)
- func InterruptibleContext() (context.Context, context.CancelFunc)
- func LikelyFullySpecified(pkg string) bool
- func PackageRevisionLess(filenameA, filenameB string) bool
- func RegisterAtExit(fn func() error)
- func RunAtExit() error
- type PackageVersion
- type Repo
Constants ¶
This section is empty.
Variables ¶
Architectures contains one entry for each known architecture identifier.
Functions ¶
func HasArchSuffix ¶
HasArchSuffix reports whether pkg ends in an architecture identifier (e.g. emacs-amd64) and returns the identifier.
func InterruptibleContext ¶
func InterruptibleContext() (context.Context, context.CancelFunc)
InterruptibleContext returns a context which is canceled when the program is interrupted (i.e. receiving SIGINT or SIGTERM).
func LikelyFullySpecified ¶
LikelyFullySpecified returns true if the provided pkg contains an architecture suffix in the middle, e.g. systemd-amd64-239.
func PackageRevisionLess ¶
PackageRevisionLess returns true if the distri package revision extracted from filenameA is less than those extracted from filenameB. This can be used with sort.Sort.
func RegisterAtExit ¶
func RegisterAtExit(fn func() error)
Types ¶
type PackageVersion ¶
type PackageVersion struct { Pkg string Arch string // Upstream is the upstream version number. It is never parsed or compared, // and is meant for human consumption only. Upstream string // DistriRevision is an incrementing integer starting at 1. Every time the // package is changed, it must be increased by 1 so that e.g. distri update // will see the package. Even if upstream versions change, the revision does // not reset. E.g., 8.2.0-3 could be followed by 8.3.0-4. // // If the version could not be parsed, DistriRevision is 0. DistriRevision int64 }
PackageVersion describes one released version of a package. It is assumed that files never change in the archive, but may become unavailable.
func ParseVersion ¶
func ParseVersion(filename string) PackageVersion
ParseVersion constructs a PackageVersion from filename, e.g. glibc-amd64-2.31-4, which parses into PackageVersion{Upstream: "2.31", DistriRevision: 4}.
func (PackageVersion) String ¶
func (pv PackageVersion) String() string
type Repo ¶
type Repo struct { // Path is a file system path (e.g. /home/michael/distri/build/distri) or // HTTP URL (e.g. http://repo.distr1.org/). Path string // PkgPath is Path/pkg (e.g. /home/michael/distri/build/distri/pkg). PkgPath string }
Directories
¶
Path | Synopsis |
---|---|
cmd
|
|
distri-installer
Program distri-installer installs distri on a block device, i.e.
|
Program distri-installer installs distri on a block device, i.e. |
minitrd
Program minitrd is a minimal init program to be used in a Linux initramfs.
|
Program minitrd is a minimal init program to be used in a Linux initramfs. |
internal
|
|
env
Package env captures details about the distri environment.
|
Package env captures details about the distri environment. |
squashfs
Package squashfs implements writing SquashFS file system images using zlib compression for data blocks (inodes and directory entries are written uncompressed for simplicity).
|
Package squashfs implements writing SquashFS file system images using zlib compression for data blocks (inodes and directory entries are written uncompressed for simplicity). |
builder
Package builder defines a gRPC protocol to leverage remote compute resources in a distri build.
|
Package builder defines a gRPC protocol to leverage remote compute resources in a distri build. |