package
2.0.1+incompatible
Repository: https://github.com/vanilla-os/abroot.git
Documentation: pkg.go.dev

# Functions

AtomicRsync executes the rsync command in an atomic-like manner.
atomicSwap allows swapping 2 files or directories in-place and atomically, using the renameat2 syscall.
BaseImagePackageDiff retrieves the added, removed, upgraded and downgraded base packages (the ones bundled with the image).
ConfEdit opens the configuration file in the default editor.
CopyFile copies a file from source to dest.
DeleteImageForRoot deletes the image created for the provided root.
DiffFiles returns the diff lines between source and dest files using the diff command (assuming it is installed).
FindImageWithLabel returns the name of the first image containinig the provided key-value pair or an empty string if none was found FindImageWithLabel returns the name of the first image containing the provided key-value pair or an empty string if none was found.
GetLogFile returns the log file handle.
No description provided by the author
GetRepoContentsForPkg retrieves package information from the repository API.
GetToken generates a token using the provided tokenURL and returns it.
IsVerbose checks if verbose mode is enabled.
KargsBackup makes a backup of the current kargs file.
KargsEdit copies the kargs file to a temporary file and opens it in the user's preferred editor by querying the $EDITOR environment variable.
KargsFormat formats the contents of the kargs file, ensuring that there are no duplicate entries, multiple spaces or trailing newline.
KargsRead reads the content of the kargs file.
KargsWrite makes a backup of the current kargs file and then writes the new content to it.
LogToFile writes messages to the log file.
MergeDiff merges the diff lines between the first and second files into the destination file.
NewABImage creates a new ABImage instance and returns a pointer to it, if the digest is empty, it returns an error.
NewABImageFromRoot returns the current ABImage by parsing /abimage.abr, if it fails, it returns an error (e.g.
NewABRootManager creates a new ABRootManager.
NewABSystem initializes a new ABSystem, which contains all the functions to perform system operations such as upgrades, package changes and rollback.
NewChecks returns a new Checks struct.
NewChroot creates a new chroot environment from the given root path and returns its Chroot instance or an error if something went wrong.
NewDiskManager creates and returns a pointer to a new DiskManager instance from which you can interact with the system's disks and partitions.
NewGrub creates a new Grub instance.
NewImageRecipe creates a new ImageRecipe instance and returns a pointer to it.
NewIntegrityCheck creates a new IntegrityCheck instance for the given root partition, and returns a pointer to it or an error if something went wrong.
NewPackageManager returns a new PackageManager struct.
NewRegistry returns a new Registry instance, exposing functions to interact with the configured Docker registry.
OciExportRootFs generates a rootfs from an image recipe file.
OverlayPackageDiff retrieves the added, removed, upgraded and downgraded overlay packages (the ones added manually via `abroot pkg add`).
PrintVerbose prints verbose messages and logs to the file if enabled.
PrintVerboseErr prints verbose error messages and logs to the file if enabled.
PrintVerboseErrNoLog prints verbose error messages without logging to the file.
PrintVerboseInfo prints verbose info messages and logs to the file if enabled.
PrintVerboseInfoNoLog prints verbose info messages without logging to the file.
PrintVerboseNoLog prints verbose messages without logging to the file.
PrintVerboseSimple prints simple verbose messages and logs to the file if enabled.
PrintVerboseSimpleNoLog prints simple verbose messages without logging to the file.
PrintVerboseWarn prints verbose warning messages and logs to the file if enabled.
PrintVerboseWarnNoLog prints verbose warning messages without logging to the file.
RetrieveImageForRoot retrieves the image created for the provided root based on the label.
No description provided by the author
WriteDiff applies the diff lines to the destination file using the patch command (assuming it is installed).

# Constants

Package manager operations.
Supported ABSystemOperation types.
Supported results for the ConfEditResult type.
Supported results for the ConfEditResult type.
Supported results for the ConfEditResult type.
No description provided by the author
Supported ABSystemOperation types.
Supported ABSystemOperation types.
Supported ABSystemOperation types.
Common Package manager paths.
Supported ABSystemOperation types.
Supported ABSystemOperation types.
No description provided by the author
Common Package manager paths.
Common Package manager paths.
Common Package manager paths.
Common Package manager paths.
Package manager statuses.
Package manager statuses.
Package manager statuses.
Common Package manager paths.
Package manager operations.
ABSystem rollback response.
can't rollback.
can rollback.
ABSystem rollback response.
ABSystem rollback response.
ABSystem operations.

# Variables

Errors.
No description provided by the author
No description provided by the author
ReservedMounts is a list of mount points from host which should be mounted inside the chroot environment to ensure it works properly in some cases, such as grub-mkconfig.

# Structs

The ABImage is the representation of an OCI image used by ABRoot, it contains the digest, the timestamp and the image name.
ABRootManager exposes methods to manage ABRoot partitions, this includes getting the present and future partitions, the boot partition, the init volume (when using LVM Thin-Provisioning), and the other partition.
ABRootPartition represents a partition managed by ABRoot.
An ABSystem allows to perform system operations such as upgrades, package changes and rollback on an ABRoot-compliant system.
Represents a Checks struct which contains all the checks which can be performed one by one or all at once using PerformAllChecks().
The children a block device or partition may have.
Chroot represents a chroot instance, which can be used to run commands inside a chroot environment.
DiskManager exposes functions to interact with the system's disks and partitions (e.g.
No description provided by the author
Grub represents a grub instance, it exposes methods to generate a new grub config compatible with ABRoot, and to check if the system is booted into the present root or the future root.
An ImageRecipe represents a Dockerfile/Containerfile-like recipe.
No description provided by the author
Manifest is the struct used to parse the manifest response from the registry it contains the manifest itself, the digest and the list of layers.
No description provided by the author
PackageManager struct.
Partition represents either a standard partition or a device-mapper partition, such as an LVM volume.
No description provided by the author
A Registry instance exposes functions to interact with the configured Docker registry.
An unstaged package is a package that is waiting to be applied to the next root.

# Type aliases

ABRollbackResponse represents the response of a rollback operation.
ABRootPkgManagerStatus represents the status of the package manager in the ABRoot configuration file.
ABSystemOperation represents a system operation to be performed by the ABSystem, must be given as a parameter to the RunOperation function.
ConfEditResult is the result of the ConfEdit function.