stager

package
v0.0.0-...-28ebc5c Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2021 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package stager reads config to pick units to run during install.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UnitsFromConfig

func UnitsFromConfig(dir string, opts Options) ([]units.Unit, error)

UnitsFromConfig returns a set of units that represent the configuration in the directory provided.

Types

type DebootstrapConf

type DebootstrapConf struct {
	Track string `toml:"track"`
	URL   string `toml:"url"`
}

DebootstrapConf describes what to tell debootstrap.

type GraphicsConf

type GraphicsConf struct {
	Packages []string               `toml:"packages"`
	Steps    map[string]InstallConf `toml:"steps"`
}

GraphicsConf describes how a graphical environment should be installed.

type InstallAction

type InstallAction struct {
	Action string `toml:"action"`

	URL   string      `toml:"url"`
	From  string      `toml:"from"`
	To    string      `toml:"to"`
	Data  string      `toml:"data"`
	Dir   string      `toml:"dir"`
	Perms os.FileMode `toml:"perms"`

	Expected string `toml:"expected"`

	Bin  string            `toml:"bin"`
	Args []string          `toml:"args"`
	Env  map[string]string `toml:"env"`
}

InstallAction describes a step during installation.

type InstallConf

type InstallConf struct {
	Order    int             `toml:"order_priority"`
	If       *StepCondition  `toml:"if"`
	Packages []string        `toml:"packages"`
	Actions  []InstallAction `toml:"do"`
}

InstallConf desribes a set of packages to be installed.

type LinuxConf

type LinuxConf struct {
	Version      string   `toml:"version"`
	URL          string   `toml:"url"`
	SHA256       string   `toml:"sha256"`
	BuildDepPkgs []string `toml:"build_packages"`
}

LinuxConf describes what Linux kernel to install

type LocaleConf

type LocaleConf struct {
	Area     string   `toml:"area"`
	Zone     string   `toml:"zone"`
	Generate []string `toml:"generate_locales"`
	Default  string   `toml:"default"`
}

LocaleConf describes the locale of the system.

type MainUserConf

type MainUserConf struct {
	Name            string   `toml:"name"`
	DefaultPassword string   `toml:"default_password"`
	Groups          []string `toml:"groups"`
}

type Options

type Options struct {
	// Overrides specifies the value for a given config key. If the key is
	// already set in the config file, this value will take precedence.
	Overrides map[string]interface{}
}

Options describes settings which change how stages are selected and generated.

type ReleaseConf

type ReleaseConf struct {
	Name       string `toml:"name"`
	PrettyName string `toml:"pretty_name"`
	ID         string `toml:"id"`
	URL        string `toml:"url"`
	Issue      string `toml:"issue"`
}

ReleaseConf describes how the system should self-describe.

type ShellConf

type ShellConf struct {
	Skel     string         `toml:"skel"`
	Profiles []ShellProfile `toml:"profile"`
}

ShellConf describes the customization of the shell.

type ShellProfile

type ShellProfile struct {
	Name   string `toml:"name"`
	Script string `toml:"script"`
}

ShellProfile describes a profile to be installed in /etc/profile.d.

type StepCondition

type StepCondition struct {
	All []string `toml:"all"`
	Not []string `toml:"not"`
	Any []string `toml:"any"`
}

StepCondition constrains a step based on conditionals.

func (*StepCondition) ShouldSkip

func (c *StepCondition) ShouldSkip(tree *toml.Tree, opts Options) (bool, error)

ShouldSkip returns true if evaluation of the conditionals indicates that this block should be skipped.

type UdevAction

type UdevAction struct {
	Action string `toml:"action"`
	Val    string `toml:"value"`
	Key    string `toml:"key"`
	Op     string `toml:"op" default:"="`
}

UdevAction describes an action to undertake if a udev rule matches.

type UdevMatch

type UdevMatch struct {
	Key string `toml:"key"`
	Val string `toml:"value"`
	Op  string `toml:"op" default:"=="`
}

UdevMatch describes a condition applied to a udev rule.

type UdevRule

type UdevRule struct {
	Comment string       `toml:"comment"`
	If      []UdevMatch  `toml:"if"`
	Then    []UdevAction `toml:"then"`
}

UdevRule describes a udev rule.

type UdevRules

type UdevRules struct {
	Name  string         `toml:"name"`
	If    *StepCondition `toml:"if"`
	Rules []UdevRule     `toml:"rules"`
}

UdevRules describes a collection of udev rules.

Jump to

Keyboard shortcuts

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