# Packages
No description provided by the author
# Functions
AddBuildUser will attempt to add the solbuild user & group if they've not previously been added Note this should be changed when Solus goes fully stateless for /etc/passwd.
CatGitBlob will return the contents of the given entry.
ChrootExec is a simple wrapper to return a correctly set up chroot command, so that we can store the PID, for long running tasks.
ChrootExecStdin is almost identical to ChrootExec, except it permits a stdin to be associated with the command.
ConfigureNamespace will unshare() context, entering a new namespace.
CopyAll will copy the source asset into the given destdir.
DropNetworking will unshare() the context networking capabilities.
EmitImageError emits the stock response to requesting an invalid image.
EmitProfileError emits a stock response for an invalid profile.
EnsureEopkgLayout will enforce changes to the filesystem to make sure that it works as expected.
FileSha256sum is a quick wrapper to grab the sha256sum for the given file.
GetAllProfiles will locate all available profiles for solbuild.
GetFileContents will attempt to read the entire object at path from the given tag, within that repo.
GetUserInfo will always succeed, as it will use a fallback policy until it finally comes up with a valid combination of name/email to use.
IsValidImage will check if the specified profile is a valid one.
MapFile will attempt to mmap() the input file.
MurderDeathKill will find all processes with a root matching the given root and set about killing them, to assist in clean closing.
NewBackingImage will return a correctly configured backing image for usage.
NewConfig will read all the system config files and then the vendor config files until it gets somewhere.
NewEopkgManager will return a new eopkg manager.
NewLockFile will return a new lockfile for the given path.
NewManager will return a newly initialised manager instance.
NewOverlay creates a new Overlay for us in builds, etc.
NewPackage will attempt to parse the given path, and return a new Package instance if this succeeds.
NewPackageHistory will attempt to analyze the git history at the given repository path, and return a usable instance of PackageHistory for writing to the container history.xml file.
NewPackageUpdate will attempt to parse the given commit and provide a usable entry for the PackageHistory.
NewPasswd will parse the given path and return a friendly representation of those files.
NewProfile will attempt to load the named profile from the system paths.
NewProfileFromPath will attempt to load a profile from the given file name.
NewTransitManifest will attempt to load the transit manifest from the named path and perform *basic* validation.
NewXMLPackage will attempt to parse the pspec.xml file @ path.
NewYmlPackage will attempt to parse the ypkg package.yml file @ path.
NewYmlPackageFromBytes will attempt to parse the ypkg package.yml in memory.
ParseGroups will attempt to parse a *NIX style group file.
ParseUsers will attempt to parse a *NIX style passwd file.
PathExists is a helper function to determine the existence of a file path.
SaneEnvironment will generate a clean environment for the chroot'd processes to use.
TouchFile will create the file if it doesn't exist, enabling use of bind mounts.
# Constants
BindRepoDir is where we make repos available from the host side.
BuildUser is the user that builds will run as inside the chroot.
BuildUserGecos is the build user's description.
BuildUserGID is the group to use.
BuildUserHome is the build user's home directory.
BuildUserID is the build user's numerical ID.
BuildUserShell is the system shell for the build user.
CcacheDirectory is the system wide ccache directory.
FallbackUserEmail is what we fallback to if everything else fails.
FallbackUserName is what we fallback to if everything else fails.
ImageBaseURI is the storage area for base images.
ImageCompressedSuffix is the common suffix for a fetched evobuild image.
ImageRootsDir is where updates are performed on base images.
ImagesDir is where we keep the rootfs images for build profiles.
ImageSuffix is the common suffix for all solbuild images.
LegacyCcacheDirectory is the root owned ccache directory for pspec.xml.
MaxChangelogEntries is the absolute maximum number of entries we'll parse and provide changelog entries for.
OverlayRootDir is the root in which we form all solbuild cache paths, these are the temp build roots that we happily throw away.
PackageCacheDirectory is where we share packages between all builders.
PackageTypeIndex is a faux type to enable indexing.
PackageTypeXML is the legacy package format, to be removed with sol introduction.
PackageTypeYpkg is the native build format of Solus, the package.yml format.
TransitManifestSuffix is the extension that a valid transit manifest must have.
UpdateDateFormat is the time format we emit in the history.xml, i.e.
# Variables
ChrootEnvironment is the env used by ChrootExec calls.
ConfigPaths is a set of locations for valid solbuild configuration files.
ConfigSuffix is the suffix a file must have to be glob loaded by solbuild.
CveRegex is used to identify security updates which mention a specific CVE ID.
DisableColors controls whether or not to use colours in the display.
ErrCannotContinue is a stock error return.
ErrDeadLockFile is returned when an dead lockfile was encountered.
ErrIllegalUpload is returned when someone is a spanner and tries uploading an unsupported file.
ErrInterrupted is returned when the build is interrupted.
ErrInvalidImage is returned when the backing image is unknown.
ErrInvalidProfile is returned when there is an invalid profile.
ErrManagerInitialised is returned when the library user attempts to set a core part of the Manager after it's already been initialised.
ErrNoPackage is returned when we've got no package.
ErrNotImplemented is returned as a placeholder when developing functionality.
ErrOwnedLockFile is returned when the lockfile is already owned by another active process.
ErrProfileNotInstalled is returned when a profile is not yet installed.
IndexBindTarget is where we always mount the repo.
IndexPackage is used by the index command to make use of the overlayfs system.
ProfileSuffix is the fixed extension for solbuild profile files.
ValidImages is a set of known, Solus-published, base profiles.
# Structs
A BackingImage is the core of any given profile.
Config defines the global defaults for solbuild.
EopkgManager is our own very shorted version of libosdev EopkgManager, to enable very very simple operations.
An EopkgRepo is a simplistic representation of a repo found in any given chroot.
A Group is an /etc/group defined user.
A LockFile encapsulates locking functionality.
A Manager is responsible for cleanly managing the entire session within solbuild, i.e.
An MmapFile is used to easily wrap the syscall mmap() functions to be readily usable from golang.
An Overlay is formed from a backing image & Package combination.
Package is the main item we deal with, avoiding the internals.
PackageHistory is an automatic changelog generated from the changes to the package.yml file during the history of the package.
A PackageUpdate is a point in history in the git changes, which is parsed from a git.Commit.
Passwd is a simple helper to parse passwd files from a chroot.
A Profile is a configuration defining what backing image to use, what repos to add, etc.
A Repo is a definition of a repository to add to the eopkg root during the build process.
A TransitManifest is provided by build servers to validate the upload of packages into the incoming directory.
TransitManifestFile provides simple verification data for each file in the uploaded payload.
A TransitManifestHeader is required in all .tram uploads to ensure that both the sender and recipient are talking in the same fashion.
A User is an /etc/passwd defined user.
UserInfo is required for ypkg builds, to set the .solus/package internally and propagate the author details.
XMLArchive is an <Archive> line in Source section.
XMLPackage contains all of the pspec.xml metadata.
XMLSource is the actual source info for each pspec.xml.
XMLUpdate represents an update in the package history.
YmlPackage is a parsed ypkg build file.
YPKG provides ypkg-gen-history history.xml compatibility.
YPKGUpdate represents an update in the package history.
# Interfaces
PidNotifier provides a simple way to set the PID on a blocking process.
# Type aliases
PackageType is simply the type of package we're building, i.e.
SortUpdatesByRelease is a simple wrapper to allowing sorting history.