osbuild

package
v0.62.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2024 License: Apache-2.0 Imports: 26 Imported by: 8

Documentation

Overview

Package osbuild provides primitives for representing and (un)marshalling OSBuild (schema v2) types.

Index

Constants

View Source
const (
	InputOriginSource   string = "org.osbuild.source"
	InputOriginPipeline string = "org.osbuild.pipeline"
)

TODO: define these using type aliases

View Source
const (
	KickstartPathInteractiveDefaults = "/usr/share/anaconda/interactive-defaults.ks"
	KickstartPathOSBuild             = "/osbuild.ks"
)
View Source
const (
	OscapVerbosityLevelDevel   = "DEVEL"
	OscapVerbosityLevelInfo    = "INFO"
	OscapVerbosityLevelError   = "ERROR"
	OscapVerbosityLevelWarning = "WARNING"
)
View Source
const (
	QEMUFormatQCOW2 QEMUFormat = "qcow2"
	QEMUFormatVDI   QEMUFormat = "vdi"
	QEMUFormatVMDK  QEMUFormat = "vmdk"
	QEMUFormatVPC   QEMUFormat = "vpc"
	QEMUFormatVHDX  QEMUFormat = "vhdx"

	VMDKSubformatMonolithicSparse     VMDKSubformat = "monolithicSparse"
	VMDKSubformatMonolithicFlat       VMDKSubformat = "monolithicFlat"
	VMDKSubformatTwoGbMaxExtentSparse VMDKSubformat = "twoGbMaxExtentSparse"
	VMDKSubformatTwoGbMaxExtentFlat   VMDKSubformat = "twoGbMaxExtentFlat"
	VMDKSubformatStreamOptimized      VMDKSubformat = "streamOptimized"
)
View Source
const (
	PermitRootLoginValueYes PermitRootLoginValueBool = true
	PermitRootLoginValueNo  PermitRootLoginValueBool = false

	PermitRootLoginValueProhibitPassword   PermitRootLoginValueStr = "prohibit-password"
	PermitRootLoginValueForcedCommandsOnly PermitRootLoginValueStr = "forced-commands-only"
)

Valid values which can be used for the 'PermitRootLogin' item in the SshdConfigConfig structure.

View Source
const (
	Simple              serviceType = "simple"
	Exec                serviceType = "exec"
	Forking             serviceType = "forking"
	Oneshot             serviceType = "oneshot"
	Dbus                serviceType = "dbus"
	Notify              serviceType = "notify"
	NotifyReloadservice serviceType = "notify-reload"
	Idle                serviceType = "idle"
	Etc                 unitPath    = "etc"
	Usr                 unitPath    = "usr"
)
View Source
const (
	System unitType = "system"
	Global unitType = "global"
)
View Source
const ContainersStorageTransport = "containers-storage"
View Source
const DockerTransport = "docker"
View Source
const InputTypeFiles string = "org.osbuild.files"

Variables

View Source
var (
	FIPSDracutConfStageOptions = &DracutConfStageOptions{
		Filename: "40-fips.conf",
		Config: DracutConfigFile{
			AddModules: []string{"fips"},
		},
	}
)

Functions

func BCJOption

func BCJOption(arch string) string

BCJOption returns the appropriate xz branch/call/jump (BCJ) filter for the given architecture

func GenCopyFSTreeOptions

func GenCopyFSTreeOptions(inputName, inputPipeline, filename string, pt *disk.PartitionTable) (
	*CopyStageOptions,
	map[string]Device,
	[]Mount,
)

GenCopyFSTreeOptions creates the options, inputs, devices, and mounts properties for an org.osbuild.copy stage for a given source tree using a partition table description to define the mounts

TODO: the `inputPipeline` parameter is not used. We should instead split out the part that creates Devices and Mounts into a separate functions such as `GenFSMounts()` and `GenFSMountsDevices()` and take their output as parameters. Also we should be returning the final stage from this function, not just the options, devices, and mounts.

func GenFIPSFiles added in v0.18.0

func GenFIPSFiles() (files []*fsnode.File)

func GenFIPSKernelOptions added in v0.18.0

func GenFIPSKernelOptions(pt *disk.PartitionTable) []string

func GenImageKernelOptions

func GenImageKernelOptions(pt *disk.PartitionTable) []string

func OSBuildMetadataToRPMs

func OSBuildMetadataToRPMs(stagesMetadata map[string]StageMetadata) []rpmmd.RPM

func OSBuildVersion added in v0.5.0

func OSBuildVersion() (string, error)

OSBuildVersion returns the version of osbuild.

func RPMPackageMetadataToSignature

func RPMPackageMetadataToSignature(pkg RPMPackageMetadata) *string

Types

type AnacondaStageOptions

type AnacondaStageOptions struct {
	// Kickstart modules to enable
	KickstartModules []string `json:"kickstart-modules"`
}

func NewAnacondaStageOptions

func NewAnacondaStageOptions(additionalModules []string) *AnacondaStageOptions

type Argon2id

type Argon2id struct {
	// Method must be Argin2id
	Method      string `json:"method"`
	Iterations  uint   `json:"iterations"`
	Memory      uint   `json:"memory,omitempty"`
	Parallelism uint   `json:"parallelism,omitempty"`
}

type AuthconfigStageOptions

type AuthconfigStageOptions struct {
}

type AuthselectStageOptions

type AuthselectStageOptions struct {
	Profile  string   `json:"profile"`
	Features []string `json:"features,omitempty"`
}

type AutoPartOptions added in v0.37.0

type AutoPartOptions struct {
	Type             string `json:"type,omitempty"`
	FSType           string `json:"fstype,omitempty"`
	NoLVM            bool   `json:"nolvm,omitempty"`
	Encrypted        bool   `json:"encrypted,omitempty"`
	PassPhrase       string `json:"passphrase,omitempty"`
	EscrowCert       string `json:"escrowcert,omitempty"`
	BackupPassPhrase bool   `json:"backuppassphrase,omitempty"`
	Cipher           string `json:"cipher,omitempty"`
	LuksVersion      string `json:"luks-version,omitempty"`
	PBKdf            string `json:"pbkdf,omitempty"`
	PBKdfMemory      int    `json:"pbkdf-memory,omitempty"`
	PBKdfTime        int    `json:"pbkdf-time,omitempty"`
	PBKdfIterations  int    `json:"pbkdf-iterations,omitempty"`
	NoHome           bool   `json:"nohome,omitempty"`
}

type BindMountOptions added in v0.56.0

type BindMountOptions struct {
	Source string `json:"source,omitempty"`
}

type BootISOMonoStageInputs

type BootISOMonoStageInputs struct {
	RootFS *TreeInput `json:"rootfs"`
	Kernel *TreeInput `json:"kernel,omitempty"`
}

func NewBootISOMonoStagePipelineTreeInputs

func NewBootISOMonoStagePipelineTreeInputs(pipeline string) *BootISOMonoStageInputs

type BootISOMonoStageOptions

type BootISOMonoStageOptions struct {
	Product Product `json:"product"`

	Kernel string `json:"kernel"`

	ISOLabel string `json:"isolabel"`

	EFI EFI `json:"efi,omitempty"`

	ISOLinux ISOLinux `json:"isolinux,omitempty"`

	// Additional kernel boot options
	KernelOpts string `json:"kernel_opts,omitempty"`

	Templates string `json:"templates,omitempty"`

	RootFS RootFS `json:"rootfs,omitempty"`
}

type BootcInstallConfig added in v0.61.0

type BootcInstallConfig struct {
	Install    *BootcInstallConfigInstall `json:"install,omitempty"`
	KernelArgs []string                   `json:"kargs,omitempty"`
	Block      []string                   `json:"block,omitempty"`
}

type BootcInstallConfigFilesystem added in v0.61.0

type BootcInstallConfigFilesystem struct {
	Root BootcInstallConfigFilesystemRoot `json:"root"`
}

type BootcInstallConfigFilesystemRoot added in v0.61.0

type BootcInstallConfigFilesystemRoot struct {
	Type string `json:"type"`
}

type BootcInstallConfigInstall added in v0.61.0

type BootcInstallConfigInstall struct {
	Filesystem BootcInstallConfigFilesystem `json:"filesystem"`
}

type BootcInstallConfigStageOptions added in v0.61.0

type BootcInstallConfigStageOptions struct {
	Filename string             `json:"filename"`
	Config   BootcInstallConfig `json:"config"`
}

func GenBootcInstallOptions added in v0.61.0

func GenBootcInstallOptions(filename, rootType string) *BootcInstallConfigStageOptions

GenBootcInstallOptions is a helper function for creating stage options for org.osbuild.bootc.install.config with just the filename and root filesystem type set.

type BootcInstallToFilesystemOptions added in v0.52.0

type BootcInstallToFilesystemOptions struct {
	// options for --root-ssh-authorized-keys
	RootSSHAuthorizedKeys []string `json:"root-ssh-authorized-keys,omitempty"`
	// options for --karg
	Kargs []string `json:"kernel-args,omitempty"`

	// option for --target-imgref
	TargetImgref string `json:"target-imgref"`
}

type BootloaderOptions added in v0.56.0

type BootloaderOptions struct {
	Append string `json:"append"`
}

type BootupdStageOptions added in v0.31.0

type BootupdStageOptions struct {
	Deployment    *OSTreeDeployment        `json:"deployment,omitempty"`
	StaticConfigs bool                     `json:"static-configs"`
	Bios          *BootupdStageOptionsBios `json:"bios,omitempty"`
}

type BootupdStageOptionsBios added in v0.31.0

type BootupdStageOptionsBios struct {
	Device    string `json:"device"`
	Partition int    `json:"partition,omitempty"`
}

type BuildstampStageOptions

type BuildstampStageOptions struct {
	// Build architecture
	Arch string `json:"arch"`

	// The product name
	Product string `json:"product"`

	// The version
	Version string `json:"version"`

	Final bool `json:"final"`

	// The variant of the product
	Variant string `json:"variant"`

	// The bugurl of the product
	BugURL string `json:"bugurl"`
}

type CSCStorage

type CSCStorage struct {
	Options *CSCStorageOptions `json:"options,omitempty"`
}

CSCStorage is short for ContainersStorageConfigStorage

type CSCStorageOptions

type CSCStorageOptions struct {
	AdditionalImageStores []string `json:"additionalimagestores,omitempty"`
}

type ChmodStageOptions

type ChmodStageOptions struct {
	Items map[string]ChmodStagePathOptions `json:"items"`
}

type ChmodStagePathOptions

type ChmodStagePathOptions struct {
	Mode      string `json:"mode"`
	Recursive bool   `json:"recursive,omitempty"`
}

type ChownStageOptions

type ChownStageOptions struct {
	Items map[string]ChownStagePathOptions `json:"items"`
}

type ChownStagePathOptions

type ChownStagePathOptions struct {
	// User can be either a string (user name), an int64 (UID) or nil
	User interface{} `json:"user,omitempty"`
	// Group can be either a string (grou pname), an int64 (GID) or nil
	Group interface{} `json:"group,omitempty"`

	Recursive bool `json:"recursive,omitempty"`
}

type ChronyConfigServer

type ChronyConfigServer struct {
	Hostname string `json:"hostname"`
	Minpoll  *int   `json:"minpoll,omitempty"`
	Maxpoll  *int   `json:"maxpoll,omitempty"`
	Iburst   *bool  `json:"iburst,omitempty"`
	Prefer   *bool  `json:"prefer,omitempty"`
}

Use '*ToPtr()' functions from the internal/common package to set the pointer values in literals

type ChronyStageOptions

type ChronyStageOptions struct {
	Servers   []ChronyConfigServer `json:"servers,omitempty"`
	LeapsecTz *string              `json:"leapsectz,omitempty"`
}

type ClearPartOptions added in v0.37.0

type ClearPartOptions struct {
	All       bool     `json:"all,omitempty"`
	InitLabel bool     `json:"initlabel,omitempty"`
	Drives    []string `json:"drives,omitempty"`
	List      []string `json:"list,omitempty"`
	Linux     bool     `json:"linux,omitempty"`
}

type ClevisLuksBindStageOptions

type ClevisLuksBindStageOptions struct {
	Passphrase string `json:"passphrase"`
	Pin        string `json:"pin"`
	Policy     string `json:"policy"`
}

type CloudInitConfigDatasource

type CloudInitConfigDatasource struct {
	Azure *CloudInitConfigDatasourceAzure `json:"Azure,omitempty"`
}

Represents the 'datasource' configuration section

type CloudInitConfigDatasourceAzure

type CloudInitConfigDatasourceAzure struct {
	ApplyNetworkConfig bool `json:"apply_network_config"`
}

type CloudInitConfigDefaultUser

type CloudInitConfigDefaultUser struct {
	Name string `json:"name,omitempty"`
}

Configuration of the 'default' user created by cloud-init.

type CloudInitConfigFile

type CloudInitConfigFile struct {
	SystemInfo     *CloudInitConfigSystemInfo `json:"system_info,omitempty"`
	Reporting      *CloudInitConfigReporting  `json:"reporting,omitempty"`
	Datasource     *CloudInitConfigDatasource `json:"datasource,omitempty"`
	DatasourceList []string                   `json:"datasource_list,omitempty"`
	Output         *CloudInitConfigOutput     `json:"output,omitempty"`
}

Represents a cloud-init configuration file

type CloudInitConfigOutput

type CloudInitConfigOutput struct {
	Init   *string `json:"init,omitempty"`
	Config *string `json:"config,omitempty"`
	Final  *string `json:"final,omitempty"`
	All    *string `json:"all,omitempty"`
}

Represents the 'output' configuration section

type CloudInitConfigReporting

type CloudInitConfigReporting struct {
	Logging   *CloudInitConfigReportingHandlers `json:"logging,omitempty"`
	Telemetry *CloudInitConfigReportingHandlers `json:"telemetry,omitempty"`
}

Represents the 'reporting' configuration section

type CloudInitConfigReportingHandlers

type CloudInitConfigReportingHandlers struct {
	Type string `json:"type"`
}

type CloudInitConfigSystemInfo

type CloudInitConfigSystemInfo struct {
	DefaultUser *CloudInitConfigDefaultUser `json:"default_user,omitempty"`
}

Represents the 'system_info' configuration section

type CloudInitStageOptions

type CloudInitStageOptions struct {
	Filename string              `json:"filename"`
	Config   CloudInitConfigFile `json:"config"`
}

type ConfigAudit

type ConfigAudit string
const (
	AuditYes ConfigAudit = "yes"
	AuditNo  ConfigAudit = "no"
)

type ConfigSplitMode

type ConfigSplitMode string
const (
	SplitUuid ConfigSplitMode = "uuid"
	SplitNone ConfigSplitMode = "none"
)

type ConfigStorage

type ConfigStorage string
const (
	StorageVolatile   ConfigStorage = "volatile"
	StoragePresistent ConfigStorage = "persistent"
	StorageAuto       ConfigStorage = "auto"
	StorageNone       ConfigStorage = "none"
)

type ContainerDeployInputs added in v0.29.0

type ContainerDeployInputs struct {
	Images ContainersInput `json:"images"`
}

type ContainerDeployOptions added in v0.33.0

type ContainerDeployOptions struct {
	Exclude []string `json:"exclude,omitempty"`
}

type ContainersInput

type ContainersInput struct {
	References map[string]ContainersInputSourceRef `json:"references"`
	// contains filtered or unexported fields
}

func NewContainersInputForSingleSource added in v0.41.0

func NewContainersInputForSingleSource(spec container.Spec) ContainersInput

NewContainersInputForSingleSource will return a containers input for a single container spec. It will automatically select the right local or remote input.

func NewContainersInputForSources

func NewContainersInputForSources(containers []container.Spec) ContainersInput

func NewLocalContainersInputForSources added in v0.41.0

func NewLocalContainersInputForSources(containers []container.Spec) ContainersInput

type ContainersInputSourceRef

type ContainersInputSourceRef struct {
	Name string `json:"name"`
}

type ContainersStorageConfStageOptions

type ContainersStorageConfStageOptions struct {
	Filename string                  `json:"filename,omitempty"`
	Config   ContainersStorageConfig `json:"config"`
	Comment  []string                `json:"comment,omitempty"`
}

func NewContainerStorageOptions

func NewContainerStorageOptions(filename string, additionalImageStores ...string) *ContainersStorageConfStageOptions

type ContainersStorageConfig

type ContainersStorageConfig struct {
	Storage CSCStorage `json:"storage,omitempty"`
}

type ContainersStorageSource added in v0.41.0

type ContainersStorageSource struct {
	Items map[string]struct{} `json:"items"`
}

func NewContainersStorageSource added in v0.41.0

func NewContainersStorageSource() *ContainersStorageSource

func (*ContainersStorageSource) AddItem added in v0.41.0

func (source *ContainersStorageSource) AddItem(id string)

type CopyStageFilesInputs

type CopyStageFilesInputs map[string]*FilesInput

type CopyStageOptions

type CopyStageOptions struct {
	Paths []CopyStagePath `json:"paths"`
}

type CopyStagePath

type CopyStagePath struct {
	From string `json:"from"`
	To   string `json:"to"`

	// Remove the destination before copying. Works only for files, not directories.
	// Default: false
	RemoveDestination bool `json:"remove_destination,omitempty"`
}

type CoreMkImage

type CoreMkImage struct {
	Type string `json:"type"`

	PartLabel string `json:"partlabel"`

	Filesystem string `json:"filesystem"`
}

Generate the core image via grub-mkimage

type CurlSource

type CurlSource struct {
	Items map[string]CurlSourceItem `json:"items"`
}

func NewCurlSource added in v0.6.0

func NewCurlSource() *CurlSource

func (*CurlSource) AddPackage added in v0.6.0

func (source *CurlSource) AddPackage(pkg rpmmd.PackageSpec) error

AddPackage adds a pkg to the curl source to download. Will return an error if any of the supplied options are invalid or missing.

func (*CurlSource) UnmarshalJSON

func (cs *CurlSource) UnmarshalJSON(data []byte) (err error)

Unmarshal method for CurlSource for handling the CurlSourceItem interface: Tries each of the implementations until it finds the one that works.

type CurlSourceItem

type CurlSourceItem interface {
	// contains filtered or unexported methods
}

CurlSourceItem can be either a URL string or a URL paired with a secrets provider

func NewCurlPackageItem added in v0.6.0

func NewCurlPackageItem(pkg rpmmd.PackageSpec) (CurlSourceItem, error)

type CurlSourceOptions

type CurlSourceOptions struct {
	URL      string      `json:"url"`
	Secrets  *URLSecrets `json:"secrets,omitempty"`
	Insecure bool        `json:"insecure,omitempty"`
}

type DNFAutomaticConfig

type DNFAutomaticConfig struct {
	Commands *DNFAutomaticConfigCommands `json:"commands,omitempty"`
}

DNFAutomaticConfig represents DNF Automatic configuration.

type DNFAutomaticConfigCommands

type DNFAutomaticConfigCommands struct {
	// Whether packages comprising the available updates should be installed
	ApplyUpdates *bool `json:"apply_updates,omitempty"`
	// What kind of upgrades to look at
	UpgradeType DNFAutomaticUpgradeTypeValue `json:"upgrade_type,omitempty"`
}

DNFAutomaticConfigCommands represents the 'commands' configuration section.

type DNFAutomaticConfigStageOptions

type DNFAutomaticConfigStageOptions struct {
	Config *DNFAutomaticConfig `json:"config,omitempty"`
}

func NewDNFAutomaticConfigStageOptions

func NewDNFAutomaticConfigStageOptions(config *DNFAutomaticConfig) *DNFAutomaticConfigStageOptions

NewDNFAutomaticConfigStageOptions creates a new DNFAutomaticConfig Stage options object.

type DNFAutomaticUpgradeTypeValue

type DNFAutomaticUpgradeTypeValue string
const (
	DNFAutomaticUpgradeTypeDefault  DNFAutomaticUpgradeTypeValue = "default"
	DNFAutomaticUpgradeTypeSecurity DNFAutomaticUpgradeTypeValue = "security"
)

Valid values of the 'upgrade_type' option

type DNFConfig

type DNFConfig struct {
	Main *DNFConfigMain `json:"main,omitempty"`
}

type DNFConfigMain

type DNFConfigMain struct {
	IPResolve string `json:"ip_resolve,omitempty"`
}

type DNFConfigStageOptions

type DNFConfigStageOptions struct {
	// List of DNF variables.
	Variables []DNFVariable `json:"variables,omitempty"`
	Config    *DNFConfig    `json:"config,omitempty"`
}

DNFConfigStageOptions represents persistent DNF configuration.

func NewDNFConfigStageOptions

func NewDNFConfigStageOptions(variables []DNFVariable, config *DNFConfig) *DNFConfigStageOptions

NewDNFConfigStageOptions creates a new DNFConfig Stage options object.

type DNFVariable

type DNFVariable struct {
	// Name of the variable.
	Name string `json:"name"`
	// Value of the variable.
	Value string `json:"value"`
}

DNFVariable represents a single DNF variable.

type Device

type Device struct {
	Type    string        `json:"type"`
	Parent  string        `json:"parent,omitempty"`
	Options DeviceOptions `json:"options,omitempty"`
}

func NewLUKS2Device

func NewLUKS2Device(parent string, options *LUKS2DeviceOptions) *Device

func NewLVM2LVDevice

func NewLVM2LVDevice(parent string, options *LVM2LVDeviceOptions) *Device

func NewLoopbackDevice

func NewLoopbackDevice(options *LoopbackDeviceOptions) *Device

type DeviceOptions

type DeviceOptions interface {
	// contains filtered or unexported methods
}

type DiscinfoStageOptions

type DiscinfoStageOptions struct {
	// Build architecture
	BaseArch string `json:"basearch"`

	// The product name
	Release string `json:"release"`
}

type DracutConfStageOptions

type DracutConfStageOptions struct {
	Filename string           `json:"filename"`
	Config   DracutConfigFile `json:"config"`
}

type DracutConfigFile

type DracutConfigFile struct {
	// Compression method for the initramfs
	Compress string `json:"compress,omitempty"`

	// Exact list of dracut modules to use
	Modules []string `json:"dracutmodules,omitempty"`

	// Additional dracut modules to include
	AddModules []string `json:"add_dracutmodules,omitempty"`

	// Dracut modules to not include
	OmitModules []string `json:"omit_dracutmodules,omitempty"`

	// Kernel modules to exclusively include
	Drivers []string `json:"drivers,omitempty"`

	// Add a specific kernel module
	AddDrivers []string `json:"add_drivers,omitempty"`

	// Add driver and ensure that they are tried to be loaded
	ForceDrivers []string `json:"force_drivers,omitempty"`

	// Kernel filesystem modules to exclusively include
	Filesystems []string `json:"filesystems,omitempty"`

	// Install the specified files
	Install []string `json:"install_items,omitempty"`

	// Combine early microcode with the initramfs
	EarlyMicrocode *bool `json:"early_microcode,omitempty"`

	// Create reproducible images
	Reproducible *bool `json:"reproducible,omitempty"`
}

func (DracutConfigFile) MarshalJSON

func (c DracutConfigFile) MarshalJSON() ([]byte, error)

type DracutStageOptions

type DracutStageOptions struct {
	// List of target kernel versions
	Kernel []string `json:"kernel"`

	// Compression method for the initramfs
	Compress string `json:"compress,omitempty"`

	// Exact list of dracut modules to use
	Modules []string `json:"modules,omitempty"`

	// Additional dracut modules to include
	AddModules []string `json:"add_modules,omitempty"`

	// Dracut modules to not include
	OmitModules []string `json:"omit_modules,omitempty"`

	// Kernel modules to exclusively include
	Drivers []string `json:"drivers,omitempty"`

	// Add a specific kernel module
	AddDrivers []string `json:"add_drivers,omitempty"`

	// Add driver and ensure that they are tried to be loaded
	ForceDrivers []string `json:"force_drivers,omitempty"`

	// Kernel filesystem modules to exclusively include
	Filesystems []string `json:"filesystems,omitempty"`

	// Add custom files to the initramfs
	// What (keys) to include where (values)
	Include map[string]string `json:"include,omitempty"`

	// Install the specified files
	Install []string `json:"install,omitempty"`

	// Combine early microcode with the initramfs
	EarlyMicrocode bool `json:"early_microcode,omitempty"`

	// Create reproducible images
	Reproducible bool `json:"reproducible,omitempty"`

	// Extra arguments to directly pass to dracut
	Extra []string `json:"extra,omitempty"`
}

type EFI

type EFI struct {
	Architectures []string `json:"architectures"`
	Vendor        string   `json:"vendor"`
}

type EnvironmentVariable

type EnvironmentVariable struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Exclude

type Exclude struct {
	// Do not install documentation.
	Docs bool `json:"docs,omitempty"`
}

type FDOStageInputs

type FDOStageInputs struct {
	RootCerts *FilesInput `json:"rootcerts"`
}

type FSCompression

type FSCompression struct {
	Method  string                `json:"method"`
	Options *FSCompressionOptions `json:"options,omitempty"`
}

type FSCompressionOptions

type FSCompressionOptions struct {
	BCJ string `json:"bcj"`
}

type FSTabEntry

type FSTabEntry struct {
	UUID    string `json:"uuid,omitempty"`
	Label   string `json:"label,omitempty"`
	VFSType string `json:"vfs_type"`
	Path    string `json:"path,omitempty"`
	Options string `json:"options,omitempty"`
	Freq    uint64 `json:"freq,omitempty"`
	PassNo  uint64 `json:"passno,omitempty"`
}

An FSTabEntry represents one line in /etc/fstab. With the one exception that the the spec field must be represented as an UUID.

type FSTabStageOptions

type FSTabStageOptions struct {
	FileSystems []*FSTabEntry `json:"filesystems"`

	OSTree *OSTreeFstab `json:"ostree,omitempty"`
}

The FSTabStageOptions describe the content of the /etc/fstab file.

The structure of the options follows the format of /etc/fstab, except that filesystem must be identified by their UUID and ommitted fields are set to their defaults (if possible).

func NewFSTabStageOptions

func NewFSTabStageOptions(pt *disk.PartitionTable) *FSTabStageOptions

func (*FSTabStageOptions) AddFilesystem

func (options *FSTabStageOptions) AddFilesystem(id string, vfsType string, path string, opts string, freq uint64, passNo uint64)

AddFilesystem adds one entry to and FSTabStageOptions object.

type FilesInput

type FilesInput struct {
	References FilesInputRef `json:"references"`
	// contains filtered or unexported fields
}

func NewFilesInput

func NewFilesInput(references FilesInputRef) *FilesInput

func NewFilesInputForManifestLists

func NewFilesInputForManifestLists(containers []container.Spec) *FilesInput

NewFilesInputForManifestLists creates a FilesInput for container manifest lists. If there are no list digests in the container specs, it returns nil.

func (*FilesInput) UnmarshalJSON

func (f *FilesInput) UnmarshalJSON(data []byte) error

type FilesInputPipelineArrayRef

type FilesInputPipelineArrayRef []FilesInputPipelineArrayRefEntry

Pipeline Array Reference The expected JSON structure is:

`[
	{
		"id": "name:<pipeline_name>",
		"options": {
			"metadata": {
				"<metadata.str1>": <anything_but_object_with_additional_properties>,
				"<metadata.str2>": <anything_but_object_with_additional_properties>,
				...
			},
			"file": "<filename>"
		}
	},
	...
]`

type FilesInputPipelineArrayRefEntry

type FilesInputPipelineArrayRefEntry struct {
	ID      string                    `json:"id"`
	Options FilesInputPipelineOptions `json:"options,omitempty"`
}

type FilesInputPipelineObjectRef

type FilesInputPipelineObjectRef map[string]FilesInputPipelineOptions

Pipeline Object Reference The expected JSON structure is:

`{
	"name:<pipeline_name>": {
		"metadata": {
			"<metadata.str1>": <anything_but_object_with_additional_properties>,
			"<metadata.str2>": <anything_but_object_with_additional_properties>,
			...
		},
		"file": "<filename>"
	},
	...
}`

type FilesInputPipelineOptions

type FilesInputPipelineOptions struct {
	// File to access with in a pipeline
	File string `json:"file,omitempty"`
	// Additional metadata to forward to the stage
	Metadata FilesInputRefMetadata `json:"metadata,omitempty"`
}

type FilesInputRef

type FilesInputRef interface {
	// contains filtered or unexported methods
}

FilesInputRef is an interface that is implemented by all types that can be used as a reference in the files input.

func NewFilesInputPipelineArrayRef

func NewFilesInputPipelineArrayRef(pipeline, filename string, metadata FilesInputRefMetadata) FilesInputRef

func NewFilesInputPipelineObjectRef

func NewFilesInputPipelineObjectRef(pipeline, filename string, metadata FilesInputRefMetadata) FilesInputRef

func NewFilesInputSourceArrayRef

func NewFilesInputSourceArrayRef(entries []FilesInputSourceArrayRefEntry) FilesInputRef

func NewFilesInputSourceObjectRef

func NewFilesInputSourceObjectRef(entries map[string]FilesInputRefMetadata) FilesInputRef

NewFilesInputSourceObjectRef creates a FilesInputSourceObjectRef from a map of checksums to metadata. The checksums must be prefixed by the name of the corresponding hashing algorithm followed by a colon (e.g. sha256:, sha1:, etc).

func NewFilesInputSourcePlainRef

func NewFilesInputSourcePlainRef(checksums []string) FilesInputRef

NewFilesInputSourcePlainRef creates a FilesInputSourcePlainRef from a list of checksums. The checksums must be prefixed by the name of the corresponding hashing algorithm followed by a colon (e.g. sha256:, sha1:, etc).

type FilesInputRefMetadata

type FilesInputRefMetadata interface {
	// contains filtered or unexported methods
}

Type to represent stage-specific metadata that can be passed via the files input to the stage. The expected JSON structure is:

`{
	"<metadata.str1>": <anything_but_object_with_additional_properties>,
	"<metadata.str2>": <anything_but_object_with_additional_properties>,
	...
}`

type FilesInputSourceArrayRef

type FilesInputSourceArrayRef []FilesInputSourceArrayRefEntry

Source Array Reference The expected JSON structure is:

`[
	{
		"id": "sha256:<sha256sum>",
		"options": {
			"metadata": {
				"<metadata.str1>": <anything_but_object_with_additional_properties>,
				"<metadata.str2>": <anything_but_object_with_additional_properties>,
				...
			}
		}
	},
	...
]`

type FilesInputSourceArrayRefEntry

type FilesInputSourceArrayRefEntry struct {
	ID      string                   `json:"id"`
	Options *FilesInputSourceOptions `json:"options,omitempty"`
}

func NewFilesInputSourceArrayRefEntry

func NewFilesInputSourceArrayRefEntry(checksum string, metadata FilesInputRefMetadata) FilesInputSourceArrayRefEntry

NewFilesInputSourceArrayRefEntry creates a FilesInputSourceArrayRefEntry from a checksum and metadata. The checksum must be prefixed by the name of the corresponding hashing algorithm followed by a colon (e.g. sha256:, sha1:, etc).

type FilesInputSourceObjectRef

type FilesInputSourceObjectRef map[string]FilesInputSourceOptions

Source Object Reference The expected JSON structure is:

`{
	"sha256:<sha256sum>": {
		"metadata": {
			"<metadata.str1>": <anything_but_object_with_additional_properties>,
			"<metadata.str2>": <anything_but_object_with_additional_properties>,
			...
		}
	},
	...
}`

type FilesInputSourceOptions

type FilesInputSourceOptions struct {
	// Additional metadata to forward to the stage
	Metadata FilesInputRefMetadata `json:"metadata,omitempty"`
}

type FilesInputSourcePlainRef

type FilesInputSourcePlainRef []string

Source Plain Reference The expected JSON structure is:

`[
	"sha256:<sha256sum>",
	...
]`

type FirewallStageOptions

type FirewallStageOptions struct {
	Ports            []string       `json:"ports,omitempty"`
	EnabledServices  []string       `json:"enabled_services,omitempty"`
	DisabledServices []string       `json:"disabled_services,omitempty"`
	DefaultZone      string         `json:"default_zone,omitempty"`
	Zones            []FirewallZone `json:"zones,omitempty"`
}

type FirewallZone

type FirewallZone struct {
	Name    string   `json:"name,omitempty"`
	Sources []string `json:"sources,omitempty"`
}

type FirstBootStageOptions

type FirstBootStageOptions struct {
	Commands       []string `json:"commands"`
	WaitForNetwork bool     `json:"wait_for_network,omitempty"`
}

type FixBLSStageOptions

type FixBLSStageOptions struct {
	// Prefix defaults to "/boot" if not provided
	Prefix *string `json:"prefix,omitempty"`
}

A FixBLSStageOptions struct

The paths in the Bootloader Specification are relative to the partition they are located on, i.e. `/boot/loader/...` if `/boot` is on the root file-system partition. If `/boot` is on a separate partition, the correct path would be `/loader/.../` The `prefix` can be used to adjust for that. By default it is `/boot`, i.e. assumes `/boot` is on the root file-system.

type GRUB2BIOS

type GRUB2BIOS struct {
	Platform string `json:"platform,"`
}

type GRUB2Config

type GRUB2Config struct {
	Default         string                  `json:"default,omitempty"`
	DisableRecovery *bool                   `json:"disable_recovery,omitempty"`
	DisableSubmenu  *bool                   `json:"disable_submenu,omitempty"`
	Distributor     string                  `json:"distributor,omitempty"`
	Terminal        []string                `json:"terminal,omitempty"`
	TerminalInput   []string                `json:"terminal_input,omitempty"`
	TerminalOutput  []string                `json:"terminal_output,omitempty"`
	Timeout         int                     `json:"timeout,omitempty"`
	TimeoutStyle    GRUB2ConfigTimeoutStyle `json:"timeout_style,omitempty"`
	Serial          string                  `json:"serial,omitempty"`
}

type GRUB2ConfigTimeoutStyle added in v0.39.0

type GRUB2ConfigTimeoutStyle string
const (
	GRUB2ConfigTimeoutStyleCountdown GRUB2ConfigTimeoutStyle = "countdown"
	GRUB2ConfigTimeoutStyleHidden    GRUB2ConfigTimeoutStyle = "hidden"
	GRUB2ConfigTimeoutStyleMenu      GRUB2ConfigTimeoutStyle = "menu"
)

type GRUB2FSDesc

type GRUB2FSDesc struct {
	Device string     `json:"device,omitempty"`
	Label  string     `json:"label,omitempty"`
	UUID   *uuid.UUID `json:"uuid,omitempty"`
}

type GRUB2LegacyConfig

type GRUB2LegacyConfig struct {
	GRUB2Config
	CmdLine string `json:"cmdline,omitempty"`
}

type GRUB2LegacyStageOptions

type GRUB2LegacyStageOptions struct {
	// Required
	RootFS  GRUB2FSDesc      `json:"rootfs"`
	Entries []GRUB2MenuEntry `json:"entries"`

	// One of
	BIOS *GRUB2BIOS `json:"bios,omitempty"`
	UEFI *GRUB2UEFI `json:"uefi,omitempty"`

	// Optional
	BootFS        *GRUB2FSDesc       `json:"bootfs,omitempty"`
	WriteDefaults *bool              `json:"write_defaults,omitempty"`
	Config        *GRUB2LegacyConfig `json:"config,omitempty"`
}

func NewGrub2LegacyStageOptions

func NewGrub2LegacyStageOptions(cfg *GRUB2Config,
	pt *disk.PartitionTable,
	kernelOptions []string,
	legacy string,
	uefi string,
	entries []GRUB2MenuEntry) *GRUB2LegacyStageOptions

type GRUB2MenuEntry

type GRUB2MenuEntry struct {
	Default *bool        `json:"default,omitempty"`
	Id      string       `json:"id,omitempty"`
	Kernel  string       `json:"kernel,omitempty"`
	Product GRUB2Product `json:"product,omitempty"`
}

func MakeGrub2MenuEntries

func MakeGrub2MenuEntries(id string, kernelVer string, product GRUB2Product, rescue bool) []GRUB2MenuEntry

type GRUB2Product

type GRUB2Product struct {
	Name    string `json:"name"`
	Version string `json:"version"`
	Nick    string `json:"nick,omitempty"`
}

type GRUB2StageOptions

type GRUB2StageOptions struct {
	RootFilesystemUUID uuid.UUID    `json:"root_fs_uuid"`
	BootFilesystemUUID *uuid.UUID   `json:"boot_fs_uuid,omitempty"`
	KernelOptions      string       `json:"kernel_opts,omitempty"`
	Legacy             string       `json:"legacy,omitempty"`
	UEFI               *GRUB2UEFI   `json:"uefi,omitempty"`
	SavedEntry         string       `json:"saved_entry,omitempty"`
	Greenboot          bool         `json:"greenboot,omitempty"`
	WriteCmdLine       *bool        `json:"write_cmdline,omitempty"`
	Config             *GRUB2Config `json:"config,omitempty"`
	Ignition           bool         `json:"ignition,omitempty"`
}

The GRUB2StageOptions describes the bootloader configuration.

The stage is responsible for installing all bootloader files in /boot as well as config files in /etc necessary for regenerating the configuration in /boot.

Note that it is the role of an assembler to install any necessary bootloaders that are stored in the image outside of any filesystem.

func NewGrub2StageOptions

func NewGrub2StageOptions(pt *disk.PartitionTable,
	kernelOptions string,
	kernelVer string,
	uefi bool,
	legacy string,
	vendor string,
	install bool) *GRUB2StageOptions

type GRUB2UEFI

type GRUB2UEFI struct {
	Vendor  string `json:"vendor"`
	Install bool   `json:"install,omitempty"`
	Unified bool   `json:"unified,omitempty"`
}

type GcpGuestAgentConfig

type GcpGuestAgentConfig struct {
	Accounts          *GcpGuestAgentConfigAccounts          `json:"Accounts,omitempty"`
	Daemons           *GcpGuestAgentConfigDaemons           `json:"Daemons,omitempty"`
	InstanceSetup     *GcpGuestAgentConfigInstanceSetup     `json:"InstanceSetup,omitempty"`
	IpForwarding      *GcpGuestAgentConfigIpForwarding      `json:"IpForwarding,omitempty"`
	MetadataScripts   *GcpGuestAgentConfigMetadataScripts   `json:"MetadataScripts,omitempty"`
	NetworkInterfaces *GcpGuestAgentConfigNetworkInterfaces `json:"NetworkInterfaces,omitempty"`
}

type GcpGuestAgentConfigAccounts

type GcpGuestAgentConfigAccounts struct {
	DeprovisionRemove *bool    `json:"deprovision_remove,omitempty"`
	Groups            []string `json:"groups,omitempty"`
	UseraddCmd        string   `json:"useradd_cmd,omitempty"`
	UserdelCmd        string   `json:"userdel_cmd,omitempty"`
	UsermodCmd        string   `json:"usermod_cmd,omitempty"`
	GpasswdAddCmd     string   `json:"gpasswd_add_cmd,omitempty"`
	GpasswdRemoveCmd  string   `json:"gpasswd_remove_cmd,omitempty"`
	GroupaddCmd       string   `json:"groupadd_cmd,omitempty"`
}

type GcpGuestAgentConfigDaemons

type GcpGuestAgentConfigDaemons struct {
	AccountsDaemon  *bool `json:"accounts_daemon,omitempty"`
	ClockSkewDaemon *bool `json:"clock_skew_daemon,omitempty"`
	NetworkDaemon   *bool `json:"network_daemon,omitempty"`
}

type GcpGuestAgentConfigInstanceSetup

type GcpGuestAgentConfigInstanceSetup struct {
	HostKeyTypes     []string `json:"host_key_types,omitempty"`
	OptimizeLocalSsd *bool    `json:"optimize_local_ssd,omitempty"`
	NetworkEnabled   *bool    `json:"network_enabled,omitempty"`
	SetBotoConfig    *bool    `json:"set_boto_config,omitempty"`
	SetHostKeys      *bool    `json:"set_host_keys,omitempty"`
	SetMultiqueue    *bool    `json:"set_multiqueue,omitempty"`
}

type GcpGuestAgentConfigIpForwarding

type GcpGuestAgentConfigIpForwarding struct {
	EthernetProtoId   string `json:"ethernet_proto_id,omitempty"`
	IpAliases         *bool  `json:"ip_aliases,omitempty"`
	TargetInstanceIps *bool  `json:"target_instance_ips,omitempty"`
}

type GcpGuestAgentConfigMetadataScripts

type GcpGuestAgentConfigMetadataScripts struct {
	DefaultShell string `json:"default_shell,omitempty"`
	RunDir       string `json:"run_dir,omitempty"`
	Startup      *bool  `json:"startup,omitempty"`
	Shutdown     *bool  `json:"shutdown,omitempty"`
}

type GcpGuestAgentConfigNetworkInterfaces

type GcpGuestAgentConfigNetworkInterfaces struct {
	Setup        *bool  `json:"setup,omitempty"`
	IpForwarding *bool  `json:"ip_forwarding,omitempty"`
	DhcpCommand  string `json:"dhcp_command,omitempty"`
}

type GcpGuestAgentConfigOptions

type GcpGuestAgentConfigOptions struct {
	ConfigScope GcpGuestAgentConfigScopeValue `json:"config_scope,omitempty"`
	Config      *GcpGuestAgentConfig          `json:"config"`
}

type GcpGuestAgentConfigScopeValue

type GcpGuestAgentConfigScopeValue string
const (
	GcpGuestAgentConfigScopeDistro   GcpGuestAgentConfigScopeValue = "distro"
	GcpGuestAgentConfigScopeInstance GcpGuestAgentConfigScopeValue = "instance"
)

type GroupsStageOptions

type GroupsStageOptions struct {
	Groups map[string]GroupsStageOptionsGroup `json:"groups"`
}

func NewGroupsStageOptions

func NewGroupsStageOptions(groups []users.Group) *GroupsStageOptions

type GroupsStageOptionsGroup

type GroupsStageOptionsGroup struct {
	GID *int `json:"gid,omitempty"`
}

type Grub2InstStageOptions

type Grub2InstStageOptions struct {
	// Filename of the disk image
	Filename string `json:"filename"`

	// Platform of the target system
	Platform string `json:"platform"`

	Location uint64 `json:"location"`

	// How to obtain the GRUB core image
	Core CoreMkImage `json:"core"`

	// Location of grub config
	Prefix PrefixPartition `json:"prefix"`

	// Sector size (in bytes)
	SectorSize *uint64 `json:"sector-size,omitempty"`
}

func NewGrub2InstStageOption

func NewGrub2InstStageOption(filename string, pt *disk.PartitionTable, platform string) *Grub2InstStageOptions

func (Grub2InstStageOptions) MarshalJSON

func (options Grub2InstStageOptions) MarshalJSON() ([]byte, error)

type GrubISOStageOptions

type GrubISOStageOptions struct {
	Product Product `json:"product"`

	Kernel ISOKernel `json:"kernel"`

	ISOLabel string `json:"isolabel"`

	Architectures []string `json:"architectures,omitempty"`

	Vendor string `json:"vendor,omitempty"`
}

type HostnameStageOptions

type HostnameStageOptions struct {
	Hostname string `json:"hostname"`
}

type ISOKernel

type ISOKernel struct {
	Dir string `json:"dir"`

	// Additional kernel boot options
	Opts []string `json:"opts,omitempty"`
}

type ISOLinux

type ISOLinux struct {
	Enabled bool `json:"enabled"`
	Debug   bool `json:"debug,omitempty"`
}

type ISOLinuxKernel

type ISOLinuxKernel struct {
	Dir string `json:"dir"`

	Opts []string `json:"opts"`
}

type ISOLinuxProduct

type ISOLinuxProduct struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

type ISOLinuxStageOptions

type ISOLinuxStageOptions struct {
	Product ISOLinuxProduct `json:"product"`
	Kernel  ISOLinuxKernel  `json:"kernel"`
}

type IfcfgBootprotoValue

type IfcfgBootprotoValue string
const (
	IfcfgBootprotoNone   IfcfgBootprotoValue = "none"
	IfcfgBootprotoBootp  IfcfgBootprotoValue = "bootp"
	IfcfgBootprotoDHCP   IfcfgBootprotoValue = "dhcp"
	IfcfgBootprotoStatic IfcfgBootprotoValue = "static"
	IfcfgBootprotoIbft   IfcfgBootprotoValue = "ibft"
	IfcfgBootprotoAutoIP IfcfgBootprotoValue = "autoip"
	IfcfgBootprotoShared IfcfgBootprotoValue = "shared"
)

Valid values for the 'Bootproto' item of 'IfcfgFile' struct

type IfcfgFile

type IfcfgFile struct {
	// Method used for IPv4 protocol configuration
	Bootproto IfcfgBootprotoValue `json:"bootproto,omitempty"`

	// Interface name of the device
	Device string `json:"device,omitempty"`

	// Whether to initialize this device for IPv6 addressing
	IPv6Init *bool `json:"ipv6init,omitempty"`

	// Whether the connection should be autoconnected
	OnBoot *bool `json:"onboot,omitempty"`

	// Whether to modify /etc/resolv.conf
	PeerDNS *bool `json:"peerdns,omitempty"`

	// Base type of the connection
	Type IfcfgTypeValue `json:"type,omitempty"`

	// Whether non-root users are allowed to control the device
	UserCtl *bool `json:"userctl,omitempty"`
}

type IfcfgTypeValue

type IfcfgTypeValue string
const (
	IfcfgTypeEthernet   IfcfgTypeValue = "Ethernet"
	IfcfgTypeWireless   IfcfgTypeValue = "Wireless"
	IfcfgTypeInfiniBand IfcfgTypeValue = "InfiniBand"
	IfcfgTypeBridge     IfcfgTypeValue = "Bridge"
	IfcfgTypeBond       IfcfgTypeValue = "Bond"
	IfcfgTypeVLAN       IfcfgTypeValue = "Vlan"
)

Valid values for the 'Type' item of 'IfcfgFile' struct

type IgnitionStageInputInline

type IgnitionStageInputInline struct {
	InlineFile *FilesInput `json:"inlinefile"`
}

type IgnitionStageOptions

type IgnitionStageOptions struct {
	Network []string `json:"network,omitempty"`
}

type Implantisomd5StageOptions

type Implantisomd5StageOptions struct {
	// Path in the ISO where the md5 checksum will be implanted
	Filename string `json:"filename"`
}

type InitMode

type InitMode string
const (
	ModeBare         InitMode = "bare"
	ModeBareUser     InitMode = "bare-user"
	ModeBareUserOnly InitMode = "bare-user-only"
	ModeArchvie      InitMode = "archive"
)

type InlineSource

type InlineSource struct {
	Items map[string]InlineSourceItem `json:"items"`
}

func NewInlineSource

func NewInlineSource() *InlineSource

func (*InlineSource) AddItem

func (s *InlineSource) AddItem(data string) string

AddItem a new item to the source. Well hash and encode that data and return the checksum.

type InlineSourceItem

type InlineSourceItem struct {
	Encoding string `json:"encoding"`
	Data     string `json:"data"`
}

type Input

type Input interface {
	// contains filtered or unexported methods
}

Single Input for a Stage

type Inputs

type Inputs interface {
	// contains filtered or unexported methods
}

Collection of Inputs for a Stage

func NewIgnitionInlineInput

func NewIgnitionInlineInput(embeddedData string) Inputs

type Install added in v0.50.0

type Install struct {
	RequiredBy []string `json:"RequiredBy,omitempty"`
	WantedBy   []string `json:"WantedBy,omitempty"`
}

type KernelCmdlineStageOptions

type KernelCmdlineStageOptions struct {
	RootFsUUID string `json:"root_fs_uuid,omitempty"`
	KernelOpts string `json:"kernel_opts,omitempty"`
}

KernelCmdlineStageOptions describe how to create kernel-cmdline stage

Configures the kernel boot parameters, also known as the kernel command line.

func NewKernelCmdlineStageOptions

func NewKernelCmdlineStageOptions(rootUUID string, kernelOptions string) *KernelCmdlineStageOptions

type KeymapStageOptions

type KeymapStageOptions struct {
	Keymap    string            `json:"keymap"`
	X11Keymap *X11KeymapOptions `json:"x11-keymap,omitempty"`
}

type KickstartStageOptions

type KickstartStageOptions struct {
	// Where to place the kickstart file
	Path string `json:"path"`

	OSTreeCommit    *OSTreeCommitOptions    `json:"ostree,omitempty"`
	OSTreeContainer *OSTreeContainerOptions `json:"ostreecontainer,omitempty"`

	LiveIMG *LiveIMGOptions `json:"liveimg,omitempty"`

	Users map[string]UsersStageOptionsUser `json:"users,omitempty"`

	Groups map[string]GroupsStageOptionsGroup `json:"groups,omitempty"`

	Lang         string               `json:"lang,omitempty"`
	Keyboard     string               `json:"keyboard,omitempty"`
	Timezone     string               `json:"timezone,omitempty"`
	DisplayMode  string               `json:"display_mode,omitempty"`
	Reboot       *RebootOptions       `json:"reboot,omitempty"`
	RootPassword *RootPasswordOptions `json:"rootpw,omitempty"`
	ZeroMBR      bool                 `json:"zerombr,omitempty"`
	ClearPart    *ClearPartOptions    `json:"clearpart,omitempty"`
	AutoPart     *AutoPartOptions     `json:"autopart,omitempty"`
	Network      []NetworkOptions     `json:"network,omitempty"`
	Bootloader   *BootloaderOptions   `json:"bootloader,omitempty"`
}

func NewKickstartStageOptions

func NewKickstartStageOptions(
	path string,
	userCustomizations []users.User,
	groupCustomizations []users.Group) (*KickstartStageOptions, error)

func NewKickstartStageOptionsWithLiveIMG added in v0.23.0

func NewKickstartStageOptionsWithLiveIMG(
	path string,
	userCustomizations []users.User,
	groupCustomizations []users.Group,
	imageURL string) (*KickstartStageOptions, error)

func NewKickstartStageOptionsWithOSTreeCommit added in v0.23.0

func NewKickstartStageOptionsWithOSTreeCommit(
	path string,
	userCustomizations []users.User,
	groupCustomizations []users.Group,
	ostreeURL string,
	ostreeRef string,
	ostreeRemote string,
	osName string) (*KickstartStageOptions, error)

func NewKickstartStageOptionsWithOSTreeContainer added in v0.23.0

func NewKickstartStageOptionsWithOSTreeContainer(
	path string,
	userCustomizations []users.User,
	groupCustomizations []users.Group,
	containerURL string,
	containerTransport string,
	containerRemote string,
	containerStateRoot string) (*KickstartStageOptions, error)

func (*KickstartStageOptions) IncludeRaw added in v0.38.0

func (options *KickstartStageOptions) IncludeRaw(raw string) (*fsnode.File, error)

IncludeRaw is used for adding raw text as an extension to the kickstart file. First it changes the filename of the existing kickstart stage options and then creates a new file with the given raw content and an %include statement at the top that points to the renamed file. The new raw content is generated in place of the original file and is returned as an fsnode.File. The raw content *should not* contain the %include statement.

type LUKS2CreateStageOptions

type LUKS2CreateStageOptions struct {
	Passphrase string `json:"passphrase"`
	UUID       string `json:"uuid"`
	Cipher     string `json:"cipher,omitempty"`
	Label      string `json:"label,omitempty"`
	Subsystem  string `json:"subsystem,omitempty"`
	SectorSize uint64 `json:"sector-size"`

	// password-based key derivation function
	PBKDF Argon2id `json:"pbkdf"`
}

type LUKS2DeviceOptions

type LUKS2DeviceOptions struct {
	Passphrase string `json:"passphrase"`
}

type LUKS2RemoveKeyStageOptions

type LUKS2RemoveKeyStageOptions struct {
	Passphrase string `json:"passphrase"`
}

type LVM2CreateStageOptions

type LVM2CreateStageOptions struct {
	Volumes []LogicalVolume `json:"volumes"`
}

type LVM2LVDeviceOptions

type LVM2LVDeviceOptions struct {
	// Logical volume to activate
	Volume string `json:"volume"`
}

type LVM2MetadataStageOptions

type LVM2MetadataStageOptions struct {
	CreationHost string `json:"creation_host,omitempty"`

	// Creation time (uint64 represented as string)
	CreationTime string `json:"creation_time,omitempty"`

	Description string `json:"description,omitempty"`

	VGName string `json:"vg_name"`
}

type LiveIMGOptions added in v0.23.0

type LiveIMGOptions struct {
	URL string `json:"url"`
}

type LocaleStageOptions

type LocaleStageOptions struct {
	Language string `json:"language"`
}

The LocaleStageOptions describes the image's locale.

A locale is typically specified as language_[territory], where language is specified in ISO 639 and territory in ISO 3166.

type LogicalVolume

type LogicalVolume struct {
	Name string `json:"name"`

	Size string `json:"size"`
}

type LoopbackDeviceOptions

type LoopbackDeviceOptions struct {
	// File to associate with the loopback device
	Filename string `json:"filename"`

	// Start of the data segment
	Start uint64 `json:"start,omitempty"`

	// Size limit of the data segment (in sectors)
	Size uint64 `json:"size,omitempty"`

	// Sector size (in bytes)
	SectorSize *uint64 `json:"sector-size,omitempty"`

	// Lock (bsd lock) the device after opening it
	Lock bool `json:"lock,omitempty"`

	// Enable partition scanning as an option
	Partscan bool `json:"partscan,omitempty"`
}

type LoraxScriptStageOptions

type LoraxScriptStageOptions struct {
	// Where to put the script
	Path string `json:"path"`

	// The basic architecture parameter to supply to the template
	BaseArch string `json:"basearch,omitempty"`

	Product Product `json:"product,omitempty"`

	LibDir string `json:"libdir,omitempty"`
}

type Manifest

type Manifest struct {
	Version   string     `json:"version"`
	Pipelines []Pipeline `json:"pipelines"`
	Sources   Sources    `json:"sources"`
}

A Manifest represents an OSBuild source and pipeline manifest

type MkdirStageOptions

type MkdirStageOptions struct {
	Paths []MkdirStagePath `json:"paths"`
}

Options for the org.osbuild.ostree.config stage.

type MkdirStagePath

type MkdirStagePath struct {
	Path    string       `json:"path"`
	Mode    *os.FileMode `json:"mode,omitempty"`     // If not specified, the default mode is 0777
	Parents bool         `json:"parents,omitempty"`  // If true, create parent directories as needed
	ExistOk bool         `json:"exist_ok,omitempty"` // If true, do not fail if the target directory already exists
}

type MkfsBtrfsStageOptions

type MkfsBtrfsStageOptions struct {
	UUID  string `json:"uuid"`
	Label string `json:"label,omitempty"`
}

type MkfsExt4StageOptions

type MkfsExt4StageOptions struct {
	UUID  string `json:"uuid"`
	Label string `json:"label,omitempty"`
}

type MkfsFATStageOptions

type MkfsFATStageOptions struct {
	VolID   string `json:"volid"`
	Label   string `json:"label,omitempty"`
	FATSize *int   `json:"fat-size,omitempty"`
}

type MkfsXfsStageOptions

type MkfsXfsStageOptions struct {
	UUID  string `json:"uuid"`
	Label string `json:"label,omitempty"`
}

type ModprobeConfigCmd

type ModprobeConfigCmd interface {
	// contains filtered or unexported methods
}

type ModprobeConfigCmdBlacklist

type ModprobeConfigCmdBlacklist struct {
	Command    string `json:"command"`
	Modulename string `json:"modulename"`
}

ModprobeConfigCmdBlacklist represents the 'blacklist' command in the modprobe configuration.

func NewModprobeConfigCmdBlacklist

func NewModprobeConfigCmdBlacklist(modulename string) *ModprobeConfigCmdBlacklist

NewModprobeConfigCmdBlacklist creates a new instance of ModprobeConfigCmdBlacklist for the provided modulename.

type ModprobeConfigCmdInstall

type ModprobeConfigCmdInstall struct {
	Command    string `json:"command"`
	Modulename string `json:"modulename"`
	Cmdline    string `json:"cmdline"`
}

ModprobeConfigCmdInstall represents the 'install' command in the modprobe configuration.

func NewModprobeConfigCmdInstall

func NewModprobeConfigCmdInstall(modulename, cmdline string) *ModprobeConfigCmdInstall

NewModprobeConfigCmdInstall creates a new instance of ModprobeConfigCmdInstall for the provided modulename.

type ModprobeConfigCmdList

type ModprobeConfigCmdList []ModprobeConfigCmd

ModprobeConfigCmdList represents a modprobe configuration file, which contains a list of commands.

func (*ModprobeConfigCmdList) UnmarshalJSON

func (configFile *ModprobeConfigCmdList) UnmarshalJSON(data []byte) error

type ModprobeStageOptions

type ModprobeStageOptions struct {
	Filename string                `json:"filename"`
	Commands ModprobeConfigCmdList `json:"commands"`
}

type Mount

type Mount struct {
	Name      string       `json:"name"`
	Type      string       `json:"type"`
	Source    string       `json:"source,omitempty"`
	Target    string       `json:"target,omitempty"`
	Options   MountOptions `json:"options,omitempty"`
	Partition *int         `json:"partition,omitempty"`
}

func GenBootupdDevicesMounts added in v0.32.0

func GenBootupdDevicesMounts(filename string, pt *disk.PartitionTable) (map[string]Device, []Mount, error)

func NewBindMount added in v0.56.0

func NewBindMount(name, source, target string) *Mount

func NewBtrfsMount

func NewBtrfsMount(name, source, target string) *Mount

func NewExt4Mount

func NewExt4Mount(name, source, target string) *Mount

func NewFATMount

func NewFATMount(name, source, target string) *Mount

func NewOSTreeDeploymentMount

func NewOSTreeDeploymentMount(name, osName, ref string, serial int) *Mount

func NewOSTreeDeploymentMountDefault added in v0.53.0

func NewOSTreeDeploymentMountDefault(name string, source OSTreeMountSource) *Mount

func NewXfsMount

func NewXfsMount(name, source, target string) *Mount

type MountOptions

type MountOptions interface {
	// contains filtered or unexported methods
}

type NetworkOptions added in v0.37.0

type NetworkOptions struct {
	Activate    *bool    `json:"activate,omitempty"`
	BootProto   string   `json:"bootproto,omitempty"`
	Device      string   `json:"device,omitempty"`
	OnBoot      string   `json:"onboot,omitempty"`
	IP          string   `json:"ip,omitempty"`
	IPV6        string   `json:"ipv6,omitempty"`
	Gateway     string   `json:"gateway,omitempty"`
	IPV6Gateway string   `json:"ipv6gateway,omitempty"`
	Nameservers []string `json:"nameservers,omitempty"`
	Netmask     string   `json:"netmask,omitempty"`
	Hostname    string   `json:"hostname,omitempty"`
	ESSid       string   `json:"essid,omitempty"`
	WPAKey      string   `json:"wpakey,omitempty"`
}

type NetworkScriptsOptions

type NetworkScriptsOptions struct {
	// Keys are interface names, values are objects containing interface configuration
	IfcfgFiles map[string]IfcfgFile `json:"ifcfg,omitempty"`
}

type NginxConfig

type NginxConfig struct {
	// The address and/or port on which the server will accept requests
	Listen string `json:"listen,omitempty"`

	// The root directory for requests
	Root string `json:"root,omitempty"`

	// File that will store the process ID of the main process
	PID string `json:"pid,omitempty"`

	// Whether nginx should become a daemon
	Daemon *bool `json:"daemon,omitempty"`
}

type NginxConfigStageOptions

type NginxConfigStageOptions struct {
	// Config file location
	Path string `json:"path,omitempty"`

	Config *NginxConfig `json:"config,omitempty"`
}

type OCIArchiveConfig

type OCIArchiveConfig struct {
	Cmd          []string          `json:"Cmd,omitempty"`
	Env          []string          `json:"Env,omitempty"`
	ExposedPorts []string          `json:"ExposedPorts,omitempty"`
	User         string            `json:"User,omitempty"`
	Labels       map[string]string `json:"Labels,omitempty"`
	StopSignal   string            `json:"StopSignal,omitempty"`
	Volumes      []string          `json:"Volumes,omitempty"`
	WorkingDir   string            `json:"WorkingDir,omitempty"`
}

type OCIArchiveStageInputs

type OCIArchiveStageInputs struct {
	// Base layer for the container
	Base *TreeInput `json:"base"`
	// Additional layers in ascending order
	Layers []TreeInput `json:",omitempty"`
}

func (*OCIArchiveStageInputs) MarshalJSON

func (inputs *OCIArchiveStageInputs) MarshalJSON() ([]byte, error)

Custom marshaller for OCIArchiveStageInputs, needed to generate keys of the form "layer.N", (where N = 1, 2, ...) for the Layers property

func (*OCIArchiveStageInputs) UnmarshalJSON

func (inputs *OCIArchiveStageInputs) UnmarshalJSON(data []byte) error

Custom unmarshaller for OCIArchiveStageInputs, needed to handle keys of the form "layer.N", (where N = 1, 2, ...) for the Layers property

type OCIArchiveStageOptions

type OCIArchiveStageOptions struct {
	// The CPU architecture of the image
	Architecture string `json:"architecture"`

	// Resulting image filename
	Filename string `json:"filename"`

	// The execution parameters
	Config *OCIArchiveConfig `json:"config,omitempty"`
}

type OSTreeCheckoutInput

type OSTreeCheckoutInput struct {
	References OSTreeCheckoutReferences `json:"references"`
	// contains filtered or unexported fields
}

Inputs of type org.osbuild.ostree.checkout

func NewOSTreeCheckoutInput

func NewOSTreeCheckoutInput(origin, name string) *OSTreeCheckoutInput

NewOSTreeCommitsInput creates a new OSTreeCommitsInputs where `origin` is either "org.osbuild.source" or "org.osbuild.pipeline `name` is the id of the commit, i.e. its digest or the pipeline name that produced it)

type OSTreeCheckoutInputs

type OSTreeCheckoutInputs map[string]OSTreeCheckoutInput

type OSTreeCheckoutReferences

type OSTreeCheckoutReferences []string

type OSTreeCommitOptions added in v0.23.0

type OSTreeCommitOptions struct {
	OSName string `json:"osname"`
	Remote string `json:"remote"`
	URL    string `json:"url"`
	Ref    string `json:"ref"`
	GPG    bool   `json:"gpg"`
}

type OSTreeCommitStageMetadata

type OSTreeCommitStageMetadata struct {
	Compose OSTreeCommitStageMetadataCompose `json:"compose"`
}

type OSTreeCommitStageMetadataCompose

type OSTreeCommitStageMetadataCompose struct {
	Ref                       string `json:"ref"`
	OSTreeNMetadataTotal      int    `json:"ostree-n-metadata-total"`
	OSTreeNMetadataWritten    int    `json:"ostree-n-metadata-written"`
	OSTreeNContentTotal       int    `json:"ostree-n-content-total"`
	OSTreeNContentWritten     int    `json:"ostree-n-content-written"`
	OSTreeNCacheHits          int    `json:"ostree-n-cache-hits"`
	OSTreeContentBytesWritten int    `json:"ostree-content-bytes-written"`
	OSTreeCommit              string `json:"ostree-commit"`
	OSTreeContentChecksum     string `json:"ostree-content-checksum"`
	OSTreeTimestamp           string `json:"ostree-timestamp"`
	RPMOSTreeInputHash        string `json:"rpm-ostree-inputhash"`
}

type OSTreeCommitStageOptions

type OSTreeCommitStageOptions struct {
	// OStree ref to create for the commit
	Ref string `json:"ref"`

	// Set the version of the OS as commit metadata
	OSVersion string `json:"os_version,omitempty"`

	// Commit ID of the parent commit
	Parent string `json:"parent,omitempty"`
}

type OSTreeConfig

type OSTreeConfig struct {
	// Options concerning the sysroot
	Sysroot *SysrootOptions `json:"sysroot,omitempty"`
}

type OSTreeConfigStageOptions

type OSTreeConfigStageOptions struct {
	// Location of the ostree repo
	Repo string `json:"repo"`

	Config *OSTreeConfig `json:"config,omitempty"`
}

Options for the org.osbuild.ostree.config stage.

type OSTreeContainerOptions added in v0.23.0

type OSTreeContainerOptions struct {
	StateRoot             string `json:"stateroot"`
	URL                   string `json:"url"`
	Transport             string `json:"transport"`
	Remote                string `json:"remote"`
	SignatureVerification bool   `json:"signatureverification"`
}

type OSTreeDeployContainerInputs added in v0.20.0

type OSTreeDeployContainerInputs struct {
	Images ContainersInput `json:"images"`
}

type OSTreeDeployContainerStageOptions added in v0.20.0

type OSTreeDeployContainerStageOptions struct {

	// Name of the stateroot to be used in the deployment
	OsName string `json:"osname"`

	// Additional kernel command line options
	KernelOpts []string `json:"kernel_opts,omitempty"`

	// Image ref used as the source of truth for updates
	TargetImgref string `json:"target_imgref"`

	// Identifier to locate the root file system (uuid or label)
	Rootfs *Rootfs `json:"rootfs,omitempty"`

	// Mount points of the final file system
	Mounts []string `json:"mounts,omitempty"`
}

Options for the org.osbuild.ostree.deploy.container stage.

type OSTreeDeployStageOptions

type OSTreeDeployStageOptions struct {
	OsName string `json:"osname"`

	Ref string `json:"ref"`

	Remote string `json:"remote,omitempty"`

	Mounts []string `json:"mounts"`

	Rootfs Rootfs `json:"rootfs"`

	KernelOpts []string `json:"kernel_opts"`
}

Options for the org.osbuild.ostree.deploy stage.

func (OSTreeDeployStageOptions) MarshalJSON

func (options OSTreeDeployStageOptions) MarshalJSON() ([]byte, error)

type OSTreeDeployment

type OSTreeDeployment struct {
	OSName string `json:"osname"`

	Ref string `json:"ref"`

	Serial *int `json:"serial,omitempty"`
}

type OSTreeEncapsulateStageInput added in v0.20.0

type OSTreeEncapsulateStageInput struct {
	References []string `json:"references"`
	// contains filtered or unexported fields
}

type OSTreeEncapsulateStageInputs added in v0.20.0

type OSTreeEncapsulateStageInputs struct {
	Commit *OSTreeEncapsulateStageInput `json:"commit"`
}

func NewOSTreeEncapsulateStageInputs added in v0.20.0

func NewOSTreeEncapsulateStageInputs(origin, pipeline string) *OSTreeEncapsulateStageInputs

type OSTreeEncapsulateStageOptions added in v0.20.0

type OSTreeEncapsulateStageOptions struct {
	// Resulting image filename
	Filename string `json:"filename"`

	Cmd []string `json:"cmd,omitempty"`

	// Propagate an OSTree commit metadata key to container label
	CopyMeta []string `json:"copymeta,omitempty"`

	// The encapsulated container format version (default 1)
	FormatVersion *int `json:"format_version,omitempty"`

	// Additional labels for the container
	Labels []string `json:"labels,omitempty"`

	// Max number of container image layers
	MaxLayers *int `json:"max_layers,omitempty"`
}

type OSTreeFillvarStageOptions

type OSTreeFillvarStageOptions struct {
	Deployment OSTreeDeployment `json:"deployment"`
}

Options for the org.osbuild.ostree.fillvar stage.

type OSTreeFstab

type OSTreeFstab struct {
	Deployment OSTreeDeployment `json:"deployment"`
}

type OSTreeInitStageOptions

type OSTreeInitStageOptions struct {
	// The Mode in which to initialise the repo
	Mode InitMode `json:"mode,omitempty"`

	// Location in which to create the repo
	Path string `json:"path,omitempty"`
}

Options for the org.osbuild.ostree.init stage.

type OSTreeInput

type OSTreeInput struct {
	// contains filtered or unexported fields
}

Inputs for ostree commits

func NewOSTreeInput

func NewOSTreeInput() *OSTreeInput

type OSTreeMountDeployment

type OSTreeMountDeployment struct {
	// Name of the stateroot to be used in the deployment
	OSName string `json:"osname,omitempty"`

	// OStree ref to create and use for deployment
	Ref string `json:"ref,omitempty"`

	// The deployment serial (usually '0')
	Serial *int `json:"serial,omitempty"`

	// When set the OSName/Ref/Serial is detected automatically
	Default *bool `json:"default,omitempty"`
}

type OSTreeMountOptions

type OSTreeMountOptions struct {
	Source     OSTreeMountSource     `json:"source,omitempty"`
	Deployment OSTreeMountDeployment `json:"deployment"`
}

type OSTreeMountSource added in v0.53.0

type OSTreeMountSource string
const (
	OSTreeMountSourceTree  OSTreeMountSource = "tree"
	OSTreeMountSourceMount OSTreeMountSource = "mount"
)

type OSTreeOsInitStageOptions

type OSTreeOsInitStageOptions struct {
	// Name of the OS
	OSName string `json:"osname"`
}

Options for the org.osbuild.ostree.os-init stage.

type OSTreePasswdStageInputs

type OSTreePasswdStageInputs struct {
	Commits *OSTreeCheckoutInput `json:"commits"`
}

type OSTreePasswdStageOptions

type OSTreePasswdStageOptions struct {
}

The org.osbuild.ostree.passwd stage has no options so far.

type OSTreePrepTreeStageOptions

type OSTreePrepTreeStageOptions struct {
	// Array of group names to still keep in /etc/group
	EtcGroupMembers []string `json:"etc_group_members,omitempty"`

	// Array of arguments passed to dracut
	InitramfsArgs []string `json:"initramfs-args,omitempty"`

	// Create a regular directory for /tmp
	TmpIsDir *bool `json:"tmp-is-dir,omitempty"`
}

type OSTreePullStageInput

type OSTreePullStageInput struct {
	References OSTreePullStageReferences `json:"references"`
	// contains filtered or unexported fields
}

type OSTreePullStageInputs

type OSTreePullStageInputs struct {
	Commits *OSTreePullStageInput `json:"commits"`
}

func NewOstreePullStageInputs

func NewOstreePullStageInputs(origin, source, commitRef string) *OSTreePullStageInputs

type OSTreePullStageOptions

type OSTreePullStageOptions struct {
	// Location of the ostree repo
	Repo string `json:"repo"`
	// Add the 'remote' to the ref spec
	Remote string `json:"remote,omitempty"`
}

Options for the org.osbuild.ostree.pull stage.

type OSTreePullStageReference

type OSTreePullStageReference struct {
	Ref string `json:"ref"`
}

type OSTreePullStageReferences

type OSTreePullStageReferences map[string]OSTreePullStageReference

type OSTreeRemote

type OSTreeRemote struct {
	// Identifier for the remote
	Name string `json:"name"`

	// URL for accessing metadata and content for the remote
	URL string `json:"url"`

	// URL for accessing content. When set, url is used only for
	// metadata. Supports 'mirrorlist=' prefix
	ContentURL string `json:"contenturl,omitempty"`

	// Configured branches for the remote
	Branches []string `json:"branches,omitempty"`

	// GPG keys to verify the commits
	GPGKeys []string `json:"secrets,omitempty"`

	// Paths to ASCII-armored GPG key or directories containing ASCII-armored
	// GPG keys to import
	GPGKeyPaths []string `json:"gpgkeypaths,omitempty"`
}

type OSTreeRemotesStageOptions

type OSTreeRemotesStageOptions struct {
	// Location of the ostree repo
	Repo string `json:"repo"`

	// Configure remotes for the system repository
	Remotes []OSTreeRemote `json:"remotes,omitempty"`
}

Options for the org.osbuild.ostree.remotes stage.

type OSTreeSelinuxStageOptions

type OSTreeSelinuxStageOptions struct {
	// shared with ostree.fillvar
	Deployment OSTreeDeployment `json:"deployment"`
}

Options for the org.osbuild.ostree.selinux stage.

type OSTreeSource

type OSTreeSource struct {
	Items map[string]OSTreeSourceItem `json:"items"`
}

The commits to fetch indexed their checksum

func NewOSTreeSource added in v0.6.0

func NewOSTreeSource() *OSTreeSource

func (*OSTreeSource) AddItem added in v0.6.0

func (source *OSTreeSource) AddItem(commit ostree.CommitSpec)

type OSTreeSourceItem

type OSTreeSourceItem struct {
	Remote OSTreeSourceRemote `json:"remote"`
}

func NewOSTreeSourceItem added in v0.6.0

func NewOSTreeSourceItem(commit ostree.CommitSpec) *OSTreeSourceItem

type OSTreeSourceRemote

type OSTreeSourceRemote struct {
	// URL of the repository.
	URL        string `json:"url"`
	ContentURL string `json:"contenturl,omitempty"`
	// GPG keys to verify the commits
	GPGKeys []string                   `json:"gpgkeys,omitempty"`
	Secrets *OSTreeSourceRemoteSecrets `json:"secrets,omitempty"`
}

type OSTreeSourceRemoteSecrets

type OSTreeSourceRemoteSecrets struct {
	Name string `json:"name"`
}

type OVFStageOptions

type OVFStageOptions struct {
	Vmdk string `json:"vmdk"`
}

type OscapAutotailorConfig

type OscapAutotailorConfig struct {
	NewProfile string   `json:"new_profile"`
	Datastream string   `json:"datastream" toml:"datastream"`
	ProfileID  string   `json:"profile_id" toml:"profile_id"`
	Selected   []string `json:"selected,omitempty"`
	Unselected []string `json:"unselected,omitempty"`
}

type OscapAutotailorStageOptions

type OscapAutotailorStageOptions struct {
	Filepath string                `json:"filepath"`
	Config   OscapAutotailorConfig `json:"config"`
}

func NewOscapAutotailorStageOptions

func NewOscapAutotailorStageOptions(filepath string, autotailorOptions OscapAutotailorConfig) *OscapAutotailorStageOptions

type OscapConfig

type OscapConfig struct {
	Datastream   string              `json:"datastream" toml:"datastream"`
	ProfileID    string              `json:"profile_id" toml:"profile_id"`
	DatastreamID string              `json:"datastream_id,omitempty" toml:"datastream_id,omitempty"`
	XCCDFID      string              `json:"xccdf_id,omitempty" toml:"xccdf_id,omitempty"`
	BenchmarkID  string              `json:"benchmark_id,omitempty" toml:"benchmark_id,omitempty"`
	Tailoring    string              `json:"tailoring,omitempty" toml:"tailoring,omitempty"`
	TailoringID  string              `json:"tailoring_id,omitempty" toml:"tailoring_id,omitempty"`
	ArfResult    string              `json:"arf_results,omitempty" toml:"arf_results,omitempty"`
	HtmlReport   string              `json:"html_report,omitempty" toml:"html_report,omitempty"`
	VerboseLog   string              `json:"verbose_log,omitempty" toml:"verbose_log,omitempty"`
	VerboseLevel OscapVerbosityLevel `json:"verbose_level,omitempty" toml:"verbose_level,omitempty"`
	Compression  bool                `json:"compress_results,omitempty" toml:"compress_results,omitempty"`
}

type OscapRemediationStageOptions

type OscapRemediationStageOptions struct {
	DataDir string      `json:"data_dir,omitempty"`
	Config  OscapConfig `json:"config"`
}

func NewOscapRemediationStageOptions

func NewOscapRemediationStageOptions(dataDir string, options OscapConfig) *OscapRemediationStageOptions

type OscapVerbosityLevel

type OscapVerbosityLevel string

type PamLimitsConfStageOptions

type PamLimitsConfStageOptions struct {
	// Filename of the configuration file to be created. Must end with '.conf'.
	Filename string `json:"filename"`
	// List of configuration directives. The list must contain at least one item.
	Config []PamLimitsConfigLine `json:"config"`
}

PamLimitsConfStageOptions represents a single pam_limits module configuration file.

func NewPamLimitsConfStageOptions

func NewPamLimitsConfStageOptions(filename string, config []PamLimitsConfigLine) *PamLimitsConfStageOptions

NewPamLimitsConfStageOptions creates a new PamLimitsConf Stage options object.

func (PamLimitsConfStageOptions) MarshalJSON

func (o PamLimitsConfStageOptions) MarshalJSON() ([]byte, error)

type PamLimitsConfigLine

type PamLimitsConfigLine struct {
	// Domain to which the limit applies. E.g. username, groupname, etc.
	Domain string `json:"domain"`
	// Type of the limit.
	Type PamLimitsType `json:"type"`
	// The resource type, which is being limited.
	Item PamLimitsItem `json:"item"`
	// The limit value.
	Value PamLimitsValue `json:"value"`
}

PamLimitsConfigLine represents a single line in a pam_limits module configuration.

func (*PamLimitsConfigLine) UnmarshalJSON

func (l *PamLimitsConfigLine) UnmarshalJSON(data []byte) error

type PamLimitsItem

type PamLimitsItem string
const (
	PamLimitsItemCore         PamLimitsItem = "core"
	PamLimitsItemData         PamLimitsItem = "data"
	PamLimitsItemFsize        PamLimitsItem = "fsize"
	PamLimitsItemMemlock      PamLimitsItem = "memlock"
	PamLimitsItemNofile       PamLimitsItem = "nofile"
	PamLimitsItemRss          PamLimitsItem = "rss"
	PamLimitsItemStack        PamLimitsItem = "stack"
	PamLimitsItemCpu          PamLimitsItem = "cpu"
	PamLimitsItemNproc        PamLimitsItem = "nproc"
	PamLimitsItemAs           PamLimitsItem = "as"
	PamLimitsItemMaxlogins    PamLimitsItem = "maxlogins"
	PamLimitsItemMaxsyslogins PamLimitsItem = "maxsyslogins"
	PamLimitsItemNonewprivs   PamLimitsItem = "nonewprivs"
	PamLimitsItemPriority     PamLimitsItem = "priority"
	PamLimitsItemLocks        PamLimitsItem = "locks"
	PamLimitsItemSigpending   PamLimitsItem = "sigpending"
	PamLimitsItemMsgqueue     PamLimitsItem = "msgqueue"
	PamLimitsItemNice         PamLimitsItem = "nice"
	PamLimitsItemRtprio       PamLimitsItem = "rtprio"
)

Valid 'Item' values for the use with the PamLimitsConfigLine structure.

type PamLimitsType

type PamLimitsType string
const (
	PamLimitsTypeHard PamLimitsType = "hard"
	PamLimitsTypeSoft PamLimitsType = "soft"
	PamLimitsTypeBoth PamLimitsType = "-"
)

Valid 'Type' values for the use with the PamLimitsConfigLine structure.

type PamLimitsValue

type PamLimitsValue interface {
	// contains filtered or unexported methods
}

PamLimitsValue is defined to represent all valid types of the 'Value' item in the PamLimitsConfigLine structure.

type PamLimitsValueInt

type PamLimitsValueInt int

PamLimitsValueInt represents an integer type of the 'Value' item in the PamLimitsConfigLine structure.

type PamLimitsValueStr

type PamLimitsValueStr string

PamLimitsValueStr represents a string type of the 'Value' item in the PamLimitsConfigLine structure.

const (
	PamLimitsValueUnlimited PamLimitsValueStr = "unlimited"
	PamLimitsValueInfinity  PamLimitsValueStr = "infinity"
)

Valid string values which can be used for the 'Value' item in the PamLimitsConfigLine structure.

type PartTool

type PartTool string
const (
	PTSfdisk PartTool = "sfdisk"
	PTSgdisk PartTool = "sgdisk"
)

type PermitRootLoginValue

type PermitRootLoginValue interface {
	// contains filtered or unexported methods
}

PermitRootLoginValue is defined to represent all valid types of the 'PermitRootLogin' item in the SshdConfigConfig structure.

type PermitRootLoginValueBool

type PermitRootLoginValueBool bool

PermitRootLoginValueBool represents a bool type of the 'PermitRootLogin' item in the SshdConfigConfig structure.

type PermitRootLoginValueStr

type PermitRootLoginValueStr string

PermitRootLoginValueStr represents a string type of the 'PermitRootLogin' item in the SshdConfigConfig structure.

type Pipeline

type Pipeline struct {
	Name string `json:"name,omitempty"`
	// The build environment which can run this pipeline
	Build string `json:"build,omitempty"`

	Runner string `json:"runner,omitempty"`

	// Sequence of stages that produce the filesystem tree, which is the
	// payload of the produced image.
	Stages []*Stage `json:"stages,omitempty"`
}

A Pipeline represents an OSBuild pipeline

func (*Pipeline) AddStage

func (p *Pipeline) AddStage(stage *Stage)

AddStage appends a stage to the list of stages of a pipeline. The stages will be executed in the order they are appended. If the argument is nil, it is not added.

func (*Pipeline) AddStages

func (p *Pipeline) AddStages(stages ...*Stage)

AddStages appends multiple stages to the list of stages of a pipeline. The stages will be executed in the order they are appended. If the argument is nil, it is not added.

func (*Pipeline) SetBuild

func (p *Pipeline) SetBuild(build string)

SetBuild sets the pipeline and runner for generating the build environment for a pipeline.

type PipelineMetadata

type PipelineMetadata map[string]StageMetadata

func (*PipelineMetadata) UnmarshalJSON

func (md *PipelineMetadata) UnmarshalJSON(data []byte) error

type PipelineResult

type PipelineResult []StageResult

type PipelineTreeInputs

type PipelineTreeInputs map[string]TreeInput

func NewPipelineTreeInputs

func NewPipelineTreeInputs(name, pipeline string) *PipelineTreeInputs

type PrefixPartition

type PrefixPartition struct {
	Type string `json:"type"`

	PartLabel string `json:"partlabel"`

	// The partition number, starting at zero
	Number uint `json:"number"`

	// Location of the grub config inside the partition
	Path string `json:"path"`
}

Grub2 config on a specific partition, e.g. (,gpt3)/boot

type Preset

type Preset struct {
	Name  string      `json:"name,omitempty"`
	State PresetState `json:"state,omitempty"`
}

type PresetState

type PresetState string
const (
	StateEnable  PresetState = "enable"
	StateDisable PresetState = "disable"
)

type Product

type Product struct {
	Name    string `json:"name"`
	Version string `json:"version"`
}

type PwqualityConfConfig

type PwqualityConfConfig struct {
	Minlen   *int `json:"minlen,omitempty"`
	Dcredit  *int `json:"dcredit,omitempty"`
	Ucredit  *int `json:"ucredit,omitempty"`
	Lcredit  *int `json:"lcredit,omitempty"`
	Ocredit  *int `json:"ocredit,omitempty"`
	Minclass *int `json:"minclass,omitempty"`
}

type PwqualityConfStageOptions

type PwqualityConfStageOptions struct {
	Config PwqualityConfConfig `json:"config"`
}

type QCOW2Options

type QCOW2Options struct {
	// The type of the format must be 'qcow2'
	Type QEMUFormat `json:"type"`

	// The qcow2-compatibility-version to use
	Compat string `json:"compat"`
}

type QEMUFormat

type QEMUFormat string

type QEMUFormatOptions

type QEMUFormatOptions interface {
	// contains filtered or unexported methods
}

type QEMUStageInputs

type QEMUStageInputs struct {
	Image *FilesInput `json:"image"`
}

func NewQemuStagePipelineFilesInputs

func NewQemuStagePipelineFilesInputs(pipeline, file string) *QEMUStageInputs

type QEMUStageOptions

type QEMUStageOptions struct {
	// Filename for resulting image
	Filename string `json:"filename"`

	// Image format and options
	Format QEMUFormatOptions `json:"format"`
}

func NewQEMUStageOptions

func NewQEMUStageOptions(filename string, format QEMUFormat, formatOptions QEMUFormatOptions) *QEMUStageOptions

NewQEMUStageOptions creates a new QEMU Stage options object.

In case the format-specific options are provided, they are used for the Stage options.

func (QEMUStageOptions) MarshalJSON

func (options QEMUStageOptions) MarshalJSON() ([]byte, error)

Custom marshaller for validating

type RHSMFacts

type RHSMFacts struct {
	ApiType string `json:"image-builder.osbuild-composer.api-type"`
}

type RHSMFactsStageOptions

type RHSMFactsStageOptions struct {
	Facts RHSMFacts `json:"facts"`
}

type RHSMStageOptions

type RHSMStageOptions struct {
	YumPlugins *RHSMStageOptionsDnfPlugins `json:"yum-plugins,omitempty"`
	DnfPlugins *RHSMStageOptionsDnfPlugins `json:"dnf-plugins,omitempty"`
	SubMan     *RHSMStageOptionsSubMan     `json:"subscription-manager,omitempty"`
}

RHSMStageOptions describes configuration of the RHSM stage.

The RHSM stage allows configuration of Red Hat Subscription Manager (RHSM) related components. Currently it allows only configuration of the enablement state of DNF plugins used by the Subscription Manager.

type RHSMStageOptionsDnfPlugin

type RHSMStageOptionsDnfPlugin struct {
	Enabled bool `json:"enabled"`
}

RHSMStageOptionsDnfPlugin describes configuration of a specific RHSM DNF plugin

Only the enablement state of a DNF plugin can be currenlty set.

type RHSMStageOptionsDnfPlugins

type RHSMStageOptionsDnfPlugins struct {
	ProductID           *RHSMStageOptionsDnfPlugin `json:"product-id,omitempty"`
	SubscriptionManager *RHSMStageOptionsDnfPlugin `json:"subscription-manager,omitempty"`
}

RHSMStageOptionsDnfPlugins describes configuration of all RHSM DNF plugins

type RHSMStageOptionsSubMan

type RHSMStageOptionsSubMan struct {
	Rhsm      *SubManConfigRHSMSection      `json:"rhsm,omitempty"`
	Rhsmcertd *SubManConfigRHSMCERTDSection `json:"rhsmcertd,omitempty"`
}

Subscription-manager configuration (/etc/rhsm/rhsm.conf)

type RPMPackage

type RPMPackage struct {
	Checksum string `json:"checksum"`
	CheckGPG bool   `json:"check_gpg,omitempty"`
}

RPMPackage represents one RPM, as referenced by its content hash (checksum). The files source must indicate where to fetch the given RPM. If CheckGPG is `true` the RPM must be signed with one of the GPGKeys given in the RPMStageOptions.

type RPMPackageMetadata

type RPMPackageMetadata struct {
	Name    string  `json:"name"`
	Version string  `json:"version"`
	Release string  `json:"release"`
	Epoch   *string `json:"epoch"`
	Arch    string  `json:"arch"`
	SigMD5  string  `json:"sigmd5"`
	SigPGP  string  `json:"sigpgp"`
	SigGPG  string  `json:"siggpg"`
}

RPMPackageMetadata contains the metadata extracted from one RPM header

type RPMStageInputs

type RPMStageInputs struct {
	// Packages to install
	Packages *FilesInput `json:"packages"`
}

RPMStageInputs defines a collection of packages to be installed by the RPM stage.

func NewRpmStageSourceFilesInputs

func NewRpmStageSourceFilesInputs(specs []rpmmd.PackageSpec) *RPMStageInputs

type RPMStageMetadata

type RPMStageMetadata struct {
	Packages []RPMPackageMetadata `json:"packages"`
}

RPMStageMetadata gives the set of packages installed by the RPM stage

type RPMStageOptions

type RPMStageOptions struct {
	// Use the given path as RPM database
	DBPath string `json:"dbpath,omitempty"`

	// Array of GPG key contents to import
	GPGKeys []string `json:"gpgkeys,omitempty"`

	// Array of files in the tree containing GPG keys to import
	GPGKeysFromTree []string `json:"gpgkeys.fromtree,omitempty"`

	// Prevent dracut from running
	DisableDracut bool `json:"disable_dracut,omitempty"`

	Exclude *Exclude `json:"exclude,omitempty"`

	// Create the '/run/ostree-booted' marker
	OSTreeBooted *bool `json:"ostree_booted,omitempty"`
}

func NewRPMStageOptions

func NewRPMStageOptions(repos []rpmmd.RepoConfig) *RPMStageOptions

type RPMStageReferenceMetadata

type RPMStageReferenceMetadata struct {
	// This option defaults to `false`, therefore it does not need to be
	// defined as pointer to bool and can be omitted.
	CheckGPG bool `json:"rpm.check_gpg,omitempty"`
}

RPM package reference metadata

type RawStageMetadata

type RawStageMetadata json.RawMessage

RawStageMetadata is used to store the metadata from a stage that doesn't define its own structure

type RebootOptions added in v0.37.0

type RebootOptions struct {
	Eject bool `json:"eject,omitempty"`
	KExec bool `json:"kexec,omitempty"`
}

type References

type References interface {
	// contains filtered or unexported methods
}

type Result

type Result struct {
	Type     string                      `json:"type"`
	Success  bool                        `json:"success"`
	Error    json.RawMessage             `json:"error,omitempty"`
	Log      map[string]PipelineResult   `json:"log"`
	Metadata map[string]PipelineMetadata `json:"metadata"`
	Errors   []ValidationError           `json:"errors,omitempty"`
	Title    string                      `json:"title,omitempty"`
}

func RunOSBuild

func RunOSBuild(manifest []byte, store, outputDirectory string, exports, checkpoints, extraEnv []string, result bool, errorWriter io.Writer) (*Result, error)

Run an instance of osbuild, returning a parsed osbuild.Result.

Note that osbuild returns non-zero when the pipeline fails. This function does not return an error in this case. Instead, the failure is communicated with its corresponding logs through osbuild.Result.

func (*Result) UnmarshalJSON

func (res *Result) UnmarshalJSON(data []byte) error

func (*Result) Write

func (res *Result) Write(writer io.Writer) error

type RootFS

type RootFS struct {
	Compression FSCompression `json:"compression"`

	// Size in MiB
	Size int `json:"size"`
}

type RootPasswordOptions added in v0.37.0

type RootPasswordOptions struct {
	Lock      bool   `json:"lock,omitempty"`
	PlainText bool   `json:"plaintext,omitempty"`
	IsCrypted bool   `json:"iscrypted,omitempty"`
	AllowSSH  bool   `json:"allow_ssh,omitempty"`
	Password  string `json:"password,omitempty"`
}

type Rootfs

type Rootfs struct {
	// Identify the root file system by label
	Label string `json:"label,omitempty"`

	// Identify the root file system by UUID
	UUID string `json:"uuid,omitempty"`
}

type SELinuxConfigStageOptions

type SELinuxConfigStageOptions struct {
	State SELinuxPolicyState `json:"state,omitempty"`
	Type  SELinuxPolicyType  `json:"type,omitempty"`
}

The SELinuxConfigStageOptions describe the desired SELinux policy state and type on the system.

type SELinuxPolicyState

type SELinuxPolicyState string

Valid SELinux Policy states

const (
	SELinuxStateEnforcing  SELinuxPolicyState = "enforcing"
	SELinuxStatePermissive SELinuxPolicyState = "permissive"
	SELinuxStateDisabled   SELinuxPolicyState = "disabled"
)

type SELinuxPolicyType

type SELinuxPolicyType string

Valid SELinux Policy types

const (
	SELinuxTypeTargeted SELinuxPolicyType = "targeted"
	SELinuxTypeMinimum  SELinuxPolicyType = "minimum"
	SELinuxTypeMLS      SELinuxPolicyType = "mls"
)

type SELinuxStageOptions

type SELinuxStageOptions struct {
	FileContexts     string            `json:"file_contexts"`
	ExcludePaths     []string          `json:"exclude_paths,omitempty"`
	Labels           map[string]string `json:"labels,omitempty"`
	ForceAutorelabel *bool             `json:"force_autorelabel,omitempty"`
}

The SELinuxStageOptions describe how to apply selinux labels.

A file contexts configuration file is sepcified that describes the filesystem labels to apply to the image.

func NewSELinuxStageOptions

func NewSELinuxStageOptions(fileContexts string) *SELinuxStageOptions

NewSELinuxStageOptions creates a new SELinuxStaeOptions object, with the mandatory fields set.

type Service added in v0.50.0

type Service struct {
	Type            serviceType           `json:"Type,omitempty"`
	RemainAfterExit bool                  `json:"RemainAfterExit,omitempty"`
	ExecStartPre    []string              `json:"ExecStartPre,omitempty"`
	ExecStopPost    []string              `json:"ExecStopPost,omitempty"`
	ExecStart       []string              `json:"ExecStart,omitempty"`
	Environment     []EnvironmentVariable `json:"Environment,omitempty"`
	EnvironmentFile []string              `json:"EnvironmentFile,omitempty"`
}

type SfdiskPartition

type SfdiskPartition struct {
	// Mark the partition as bootable (dos)
	Bootable bool `json:"bootable,omitempty"`

	// The partition name (GPT)
	Name string `json:"name,omitempty"`

	// The size of the partition
	Size uint64 `json:"size,omitempty"`

	// The start offset of the partition
	Start uint64 `json:"start,omitempty"`

	// The partition type (UUID or identifier)
	Type string `json:"type,omitempty"`

	// UUID of the partition (GPT)
	UUID string `json:"uuid,omitempty"`
}

Description of a partition

type SfdiskStageOptions

type SfdiskStageOptions struct {
	// The type of the partition table
	Label string `json:"label"`

	// UUID for the disk image's partition table
	UUID string `json:"uuid"`

	// Partition layout
	Partitions []SfdiskPartition `json:"partitions,omitempty"`
}

type SgdiskPartition

type SgdiskPartition struct {
	// Mark the partition as bootable (dos)
	Bootable bool `json:"bootable,omitempty"`

	// The partition name
	Name string `json:"name,omitempty"`

	// The size of the partition (sectors)
	Size uint64 `json:"size,omitempty"`

	// The start offset of the partition (sectors)
	Start uint64 `json:"start,omitempty"`

	// The partition type
	Type string `json:"type,omitempty"`

	// UUID of the partition
	UUID *uuid.UUID `json:"uuid,omitempty"`
}

Description of a partition

type SgdiskStageOptions

type SgdiskStageOptions struct {
	// UUID for the disk image's partition table
	UUID uuid.UUID `json:"uuid"`

	// Partition layout
	Partitions []SgdiskPartition `json:"partitions,omitempty"`
}

type ShellInitFile

type ShellInitFile struct {
	Env []EnvironmentVariable `json:"env"`
}

type ShellInitStageOptions

type ShellInitStageOptions struct {
	Files map[string]ShellInitFile `json:"files"`
}

type SkopeoDestination

type SkopeoDestination interface {
	// contains filtered or unexported methods
}

type SkopeoDestinationContainersStorage added in v0.25.0

type SkopeoDestinationContainersStorage struct {
	Type          string `json:"type"`
	StoragePath   string `json:"storage-path,omitempty"`
	StorageDriver string `json:"storage-driver,omitempty"`
}

type SkopeoDestinationOCI added in v0.25.0

type SkopeoDestinationOCI struct {
	Type string `json:"type"`
	Path string `json:"path,omitempty"`
}

type SkopeoIndexSource

type SkopeoIndexSource struct {
	Items map[string]SkopeoIndexSourceItem `json:"items"`
}

func NewSkopeoIndexSource

func NewSkopeoIndexSource() *SkopeoIndexSource

NewSkopeoIndexSource creates a new and empty SkopeoIndexSource

func (*SkopeoIndexSource) AddItem

func (source *SkopeoIndexSource) AddItem(name, image string, tlsVerify *bool)

AddItem adds a source item to the source; will panic if any of the supplied options are invalid or missing

type SkopeoIndexSourceImage

type SkopeoIndexSourceImage struct {
	Name      string `json:"name"`
	TLSVerify *bool  `json:"tls-verify,omitempty"`
}

type SkopeoIndexSourceItem

type SkopeoIndexSourceItem struct {
	Image SkopeoIndexSourceImage `json:"image"`
}

type SkopeoSource

type SkopeoSource struct {
	Items map[string]SkopeoSourceItem `json:"items"`
}

func NewSkopeoSource

func NewSkopeoSource() *SkopeoSource

NewSkopeoSource creates a new and empty SkopeoSource

func (*SkopeoSource) AddItem

func (source *SkopeoSource) AddItem(name, digest, image string, tlsVerify *bool)

AddItem adds a source item to the source; will panic if any of the supplied options are invalid or missing

type SkopeoSourceItem

type SkopeoSourceItem struct {
	Image SkopeopSourceImage `json:"image"`
}

func NewSkopeoSourceItem

func NewSkopeoSourceItem(name, digest string, tlsVerify *bool) SkopeoSourceItem

NewSkopeoSourceItem creates a new source item for name and digest

type SkopeoStageInputs

type SkopeoStageInputs struct {
	Images        ContainersInput `json:"images"`
	ManifestLists *FilesInput     `json:"manifest-lists,omitempty"`
}

type SkopeoStageOptions

type SkopeoStageOptions struct {
	Destination SkopeoDestination `json:"destination"`
}

type SkopeopSourceImage

type SkopeopSourceImage struct {
	Name      string `json:"name,omitempty"`
	Digest    string `json:"digest,omitempty"`
	TLSVerify *bool  `json:"tls-verify,omitempty"`
}

type Source

type Source interface {
	// contains filtered or unexported methods
}

Source specifies the operations of a given source-type.

type SourceOptions

type SourceOptions interface {
	// contains filtered or unexported methods
}

type Sources

type Sources map[string]Source

A Sources map contains all the sources made available to an osbuild run

func GenSources

func GenSources(packages []rpmmd.PackageSpec, ostreeCommits []ostree.CommitSpec, inlineData []string, containers []container.Spec) (Sources, error)

func (*Sources) UnmarshalJSON

func (sources *Sources) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals JSON into a Source object. Each type of source has a custom unmarshaller for its options, selected based on the source name.

type SquashfsStageOptions

type SquashfsStageOptions struct {
	Filename string `json:"filename"`

	Compression FSCompression `json:"compression"`
}

type SshdConfigConfig

type SshdConfigConfig struct {
	PasswordAuthentication          *bool                `json:"PasswordAuthentication,omitempty"`
	ChallengeResponseAuthentication *bool                `json:"ChallengeResponseAuthentication,omitempty"`
	ClientAliveInterval             *int                 `json:"ClientAliveInterval,omitempty"`
	PermitRootLogin                 PermitRootLoginValue `json:"PermitRootLogin,omitempty"`
}

func (*SshdConfigConfig) UnmarshalJSON

func (c *SshdConfigConfig) UnmarshalJSON(data []byte) error

type SshdConfigStageOptions

type SshdConfigStageOptions struct {
	Config SshdConfigConfig `json:"config"`
}

type Stage

type Stage struct {
	// Well-known name in reverse domain-name notation, uniquely identifying
	// the stage type.
	Type string `json:"type"`

	Inputs  Inputs            `json:"inputs,omitempty"`
	Options StageOptions      `json:"options,omitempty"`
	Devices map[string]Device `json:"devices,omitempty"`
	Mounts  []Mount           `json:"mounts,omitempty"`
}

Single stage of a pipeline executing one step

func GenContainerStorageStages added in v0.41.0

func GenContainerStorageStages(storagePath string, containerSpecs []container.Spec) (stages []*Stage)

func GenDeviceCreationStages

func GenDeviceCreationStages(pt *disk.PartitionTable, filename string) []*Stage

func GenDeviceFinishStages

func GenDeviceFinishStages(pt *disk.PartitionTable, filename string) []*Stage

func GenDirectoryNodesStages

func GenDirectoryNodesStages(dirs []*fsnode.Directory) []*Stage

GenDirectoryNodesStages generates the stages for a list of directory nodes. It generates the following stages:

  • mkdir stage with all the directories that need to be created. -- The existence of the directory will be gracefully handled only if no explicit permissions or ownership are set.
  • chmod stage with all the directories that need to have their permissions set.
  • chown stage with all the directories that need to have their ownership set.

func GenFIPSStages added in v0.18.0

func GenFIPSStages() (stages []*Stage)

func GenFileNodesStages

func GenFileNodesStages(files []*fsnode.File) []*Stage

GenFileNodesStages generates the stages for a list of file nodes. It generates the following stages:

  • copy stage with all the files that need to be created by copying their content from the list of inline sources. The SHA256 sum of the file is used as the name of the stage input.
  • chmod stage with all the files that need to have their permissions set.
  • chown stage with all the files that need to have their ownership set.

func GenGroupsStage

func GenGroupsStage(groups []users.Group) *Stage

func GenImageFinishStages

func GenImageFinishStages(pt *disk.PartitionTable, filename string) []*Stage

func GenImagePrepareStages

func GenImagePrepareStages(pt *disk.PartitionTable, filename string, partTool PartTool) []*Stage

func GenMkfsStages

func GenMkfsStages(pt *disk.PartitionTable, filename string) []*Stage

GenMkfsStages generates a list of org.mkfs.* stages based on a partition table description for a single device node filename is the path to the underlying image file (to be used as a source for the loopback device)

func GenServicesPresetStage added in v0.3.0

func GenServicesPresetStage(enabled, disabled []string) *Stage

GenServicesPresetStage creates a new systemd preset stage for the given list of services to enable and disable.

func GenShellInitStage

func GenShellInitStage(initFiles []shell.InitFile) *Stage

GenShellInitStage generates an org.osbuild.shell.init stage from a basic map of the form filename->key->value.

func GenUsersStage

func GenUsersStage(users []users.User, omitKey bool) (*Stage, error)

func NewAnacondaStage

func NewAnacondaStage(options *AnacondaStageOptions) *Stage

Configure basic aspects of the Anaconda installer

func NewAuthconfigStage

func NewAuthconfigStage(options *AuthconfigStageOptions) *Stage

func NewAuthselectStage

func NewAuthselectStage(options *AuthselectStageOptions) *Stage

func NewBootISOMonoStage

func NewBootISOMonoStage(options *BootISOMonoStageOptions, inputs *BootISOMonoStageInputs) *Stage

Assemble a file system tree for a bootable ISO

func NewBootcInstallConfigStage added in v0.61.0

func NewBootcInstallConfigStage(options *BootcInstallConfigStageOptions) *Stage

func NewBootcInstallToFilesystemStage added in v0.38.0

func NewBootcInstallToFilesystemStage(options *BootcInstallToFilesystemOptions, inputs ContainerDeployInputs, devices map[string]Device, mounts []Mount) (*Stage, error)

NewBootcInstallToFilesystem creates a new stage for the org.osbuild.bootc.install-to-filesystem stage.

It requires a mount setup so that bootupd can be run by bootc. I.e "/", "/boot" and "/boot/efi" need to be set up so that bootc/bootupd find and install all required bootloader bits.

The mounts input should be generated with GenBootupdDevicesMounts.

func NewBootupdGenMetadataStage added in v0.36.0

func NewBootupdGenMetadataStage() *Stage

func NewBootupdStage added in v0.31.0

func NewBootupdStage(opts *BootupdStageOptions, devices map[string]Device, mounts []Mount) (*Stage, error)

NewBootupdStage creates a new stage for the org.osbuild.bootupd stage. It requires a mount setup of "/", "/boot" and "/boot/efi" right now so that bootupd can find and install all required bootloader bits.

func NewBuildstampStage

func NewBuildstampStage(options *BuildstampStageOptions) *Stage

Creates a buildstamp file describing the system (required by anaconda)

func NewChmodStage

func NewChmodStage(options *ChmodStageOptions) *Stage

NewChmodStage creates a new org.osbuild.chmod stage

func NewChownStage

func NewChownStage(options *ChownStageOptions) *Stage

NewChownStage creates a new org.osbuild.chown stage

func NewChronyStage

func NewChronyStage(options *ChronyStageOptions) *Stage

func NewClevisLuksBindStage

func NewClevisLuksBindStage(options *ClevisLuksBindStageOptions, devices map[string]Device) *Stage

func NewCloudInitStage

func NewCloudInitStage(options *CloudInitStageOptions) *Stage

func NewContainerDeployStage added in v0.29.0

func NewContainerDeployStage(images ContainersInput, options *ContainerDeployOptions) (*Stage, error)

func NewContainersStorageConfStage

func NewContainersStorageConfStage(options *ContainersStorageConfStageOptions) *Stage

func NewCopyStage

func NewCopyStage(options *CopyStageOptions, inputs Inputs, devices map[string]Device, mounts []Mount) *Stage

func NewCopyStageSimple

func NewCopyStageSimple(options *CopyStageOptions, inputs Inputs) *Stage

func NewDNFAutomaticConfigStage

func NewDNFAutomaticConfigStage(options *DNFAutomaticConfigStageOptions) *Stage

func NewDNFConfigStage

func NewDNFConfigStage(options *DNFConfigStageOptions) *Stage

NewDNFConfigStage creates a new DNFConfig Stage object.

func NewDiscinfoStage

func NewDiscinfoStage(options *DiscinfoStageOptions) *Stage

Creates a .discinfo file describing a disk

func NewDracutConfStage

func NewDracutConfStage(options *DracutConfStageOptions) *Stage

Dracut.conf stage creates dracut configuration files under /usr/lib/dracut/dracut.conf.d/

func NewDracutStage

func NewDracutStage(options *DracutStageOptions) *Stage

Dracut stage (re-)creates the initial RAM file-system

func NewFDOStageForRootCerts

func NewFDOStageForRootCerts(rootCertsData string) *Stage

NewFDOStageForCert creates FDOStage

func NewFSTabStage

func NewFSTabStage(options *FSTabStageOptions) *Stage

NewFSTabStage creates a now FSTabStage object

func NewFirewallStage

func NewFirewallStage(options *FirewallStageOptions) *Stage

func NewFirstBootStage

func NewFirstBootStage(options *FirstBootStageOptions) *Stage

func NewFixBLSStage

func NewFixBLSStage(options *FixBLSStageOptions) *Stage

NewFixBLSStage creates a new FixBLSStage.

func NewGRUB2Stage

func NewGRUB2Stage(options *GRUB2StageOptions) *Stage

NewGRUB2Stage creates a new GRUB2 stage object.

func NewGcpGuestAgentConfigStage

func NewGcpGuestAgentConfigStage(options *GcpGuestAgentConfigOptions) *Stage

func NewGroupsStage

func NewGroupsStage(options *GroupsStageOptions) *Stage

func NewGrub2InstStage

func NewGrub2InstStage(options *Grub2InstStageOptions) *Stage

func NewGrub2LegacyStage

func NewGrub2LegacyStage(options *GRUB2LegacyStageOptions) *Stage

func NewGrubISOStage

func NewGrubISOStage(options *GrubISOStageOptions) *Stage

Assemble a file system tree for a bootable ISO

func NewHostnameStage

func NewHostnameStage(options *HostnameStageOptions) *Stage

func NewISOLinuxStage

func NewISOLinuxStage(options *ISOLinuxStageOptions, inputPipeline string) *Stage

func NewIgnitionStage

func NewIgnitionStage(options *IgnitionStageOptions) *Stage

func NewImplantisomd5Stage

func NewImplantisomd5Stage(options *Implantisomd5StageOptions) *Stage

Implant an MD5 checksum in an ISO9660 image

func NewKernelCmdlineStage

func NewKernelCmdlineStage(options *KernelCmdlineStageOptions) *Stage

NewKernelCmdlineStage creates a new kernel-cmdline Stage object.

func NewKeymapStage

func NewKeymapStage(options *KeymapStageOptions) *Stage

func NewKickstartStage

func NewKickstartStage(options *KickstartStageOptions) *Stage

Creates an Anaconda kickstart file

func NewLUKS2CreateStage

func NewLUKS2CreateStage(options *LUKS2CreateStageOptions, devices map[string]Device) *Stage

func NewLUKS2RemoveKeyStage

func NewLUKS2RemoveKeyStage(options *LUKS2RemoveKeyStageOptions, devices map[string]Device) *Stage

func NewLVM2CreateStage

func NewLVM2CreateStage(options *LVM2CreateStageOptions, devices map[string]Device) *Stage

func NewLVM2MetadataStage

func NewLVM2MetadataStage(options *LVM2MetadataStageOptions, devices map[string]Device) *Stage

func NewLocaleStage

func NewLocaleStage(options *LocaleStageOptions) *Stage

NewLocaleStage creates a new Locale Stage object.

func NewLoraxScriptStage

func NewLoraxScriptStage(options *LoraxScriptStageOptions) *Stage

Run a Lorax template script on the tree

func NewMkdirStage

func NewMkdirStage(options *MkdirStageOptions) *Stage

NewMkdirStage creates a new org.osbuild.mkdir stage to create FS directories

func NewMkfsBtrfsStage

func NewMkfsBtrfsStage(options *MkfsBtrfsStageOptions, devices map[string]Device) *Stage

func NewMkfsExt4Stage

func NewMkfsExt4Stage(options *MkfsExt4StageOptions, devices map[string]Device) *Stage

func NewMkfsFATStage

func NewMkfsFATStage(options *MkfsFATStageOptions, devices map[string]Device) *Stage

func NewMkfsXfsStage

func NewMkfsXfsStage(options *MkfsXfsStageOptions, devices map[string]Device) *Stage

func NewModprobeStage

func NewModprobeStage(options *ModprobeStageOptions) *Stage

func NewNginxConfigStage

func NewNginxConfigStage(options *NginxConfigStageOptions) *Stage

NewNingxConfigStage creates a new org.osbuild.nginxconfig stage

func NewOCIArchiveStage

func NewOCIArchiveStage(options *OCIArchiveStageOptions, inputs *OCIArchiveStageInputs) *Stage

A new OCIArchiveStage to to assemble an OCI image archive

func NewOSTreeCommitStage

func NewOSTreeCommitStage(options *OSTreeCommitStageOptions, inputPipeline string) *Stage

The OSTreeCommitStage (org.osbuild.ostree.commit) describes how to assemble a tree into an OSTree commit.

func NewOSTreeConfigStage

func NewOSTreeConfigStage(options *OSTreeConfigStageOptions) *Stage

A new org.osbuild.ostree.config stage to configure an OSTree repository

func NewOSTreeDeployContainerStage added in v0.20.0

func NewOSTreeDeployContainerStage(options *OSTreeDeployContainerStageOptions, images ContainersInput) *Stage

func NewOSTreeDeployStage

func NewOSTreeDeployStage(options *OSTreeDeployStageOptions) *Stage

A new org.osbuild.ostree.init stage to create an OSTree repository

func NewOSTreeEncapsulateStage added in v0.20.0

func NewOSTreeEncapsulateStage(options *OSTreeEncapsulateStageOptions, inputPipeline string) *Stage

func NewOSTreeFillvarStage

func NewOSTreeFillvarStage(options *OSTreeFillvarStageOptions) *Stage

A new org.osbuild.ostree.init stage to create an OSTree repository

func NewOSTreeInitStage

func NewOSTreeInitStage(options *OSTreeInitStageOptions) *Stage

A new org.osbuild.ostree.init stage to create an OSTree repository

func NewOSTreeOsInitStage

func NewOSTreeOsInitStage(options *OSTreeOsInitStageOptions) *Stage

A new org.osbuild.ostree.init stage to create an OSTree repository

func NewOSTreePasswdStage

func NewOSTreePasswdStage(origin, name string) *Stage

A new org.osbuild.ostree.passwd stage to pre-fill the user and group databases

func NewOSTreePrepTreeStage

func NewOSTreePrepTreeStage(options *OSTreePrepTreeStageOptions) *Stage

The OSTree PrepTree (org.osbuild.ostree.preptree) stage transforms the tree to an ostree layout.

func NewOSTreePullStage

func NewOSTreePullStage(options *OSTreePullStageOptions, inputs *OSTreePullStageInputs) *Stage

A new org.osbuild.ostree.pull stage to pull OSTree commits into an existing repo

func NewOSTreeRemotesStage

func NewOSTreeRemotesStage(options *OSTreeRemotesStageOptions) *Stage

A new org.osbuild.ostree.remotes stage to configure remotes

func NewOSTreeSelinuxStage

func NewOSTreeSelinuxStage(options *OSTreeSelinuxStageOptions) *Stage

A new org.osbuild.ostree.init stage to create an OSTree repository

func NewOVFStage

func NewOVFStage(options *OVFStageOptions) *Stage

Generates a file descriptor for an in-tree vmdk file

func NewOscapAutotailorStage

func NewOscapAutotailorStage(options *OscapAutotailorStageOptions) *Stage

func NewOscapRemediationStage

func NewOscapRemediationStage(options *OscapRemediationStageOptions) *Stage

func NewPamLimitsConfStage

func NewPamLimitsConfStage(options *PamLimitsConfStageOptions) *Stage

NewPamLimitsConfStage creates a new PamLimitsConf Stage object.

func NewPwqualityConfStage

func NewPwqualityConfStage(options *PwqualityConfStageOptions) *Stage

func NewQEMUStage

func NewQEMUStage(options *QEMUStageOptions, inputs *QEMUStageInputs) *Stage

NewQEMUStage creates a new QEMU Stage object.

func NewRHSMFactsStage

func NewRHSMFactsStage(options *RHSMFactsStageOptions) *Stage

NewRHSMFactsStage creates a new RHSM stage

func NewRHSMStage

func NewRHSMStage(options *RHSMStageOptions) *Stage

NewRHSMStage creates a new RHSM stage

func NewRPMStage

func NewRPMStage(options *RPMStageOptions, inputs *RPMStageInputs) *Stage

NewRPMStage creates a new RPM stage.

func NewSELinuxConfigStage

func NewSELinuxConfigStage(options *SELinuxConfigStageOptions) *Stage

NewSELinuxConfigStage creates a new SELinuxConfig Stage object.

func NewSELinuxStage

func NewSELinuxStage(options *SELinuxStageOptions) *Stage

NewSELinuxStage creates a new SELinux Stage object.

func NewSfdiskStage

func NewSfdiskStage(options *SfdiskStageOptions, device *Device) *Stage

func NewSgdiskStage

func NewSgdiskStage(options *SgdiskStageOptions, device *Device) *Stage

func NewShellInitStage

func NewShellInitStage(options *ShellInitStageOptions) *Stage

func NewSkopeoStageWithContainersStorage added in v0.25.0

func NewSkopeoStageWithContainersStorage(path string, images ContainersInput, manifests *FilesInput) *Stage

func NewSkopeoStageWithOCI added in v0.25.0

func NewSkopeoStageWithOCI(path string, images ContainersInput, manifests *FilesInput) *Stage

func NewSquashfsStage

func NewSquashfsStage(options *SquashfsStageOptions, inputPipeline string) *Stage

func NewSshdConfigStage

func NewSshdConfigStage(options *SshdConfigStageOptions) *Stage

func NewSysconfigStage

func NewSysconfigStage(options *SysconfigStageOptions) *Stage

func NewSysctldStage

func NewSysctldStage(options *SysctldStageOptions) *Stage

NewSysctldStage creates a new Sysctld Stage object.

func NewSystemdJournaldStage

func NewSystemdJournaldStage(options *SystemdJournaldStageOptions) *Stage

func NewSystemdLogindStage

func NewSystemdLogindStage(options *SystemdLogindStageOptions) *Stage

func NewSystemdPresetStage

func NewSystemdPresetStage(options *SystemdPresetStageOptions) *Stage

func NewSystemdStage

func NewSystemdStage(options *SystemdStageOptions) *Stage

func NewSystemdUnitCreateStage added in v0.57.0

func NewSystemdUnitCreateStage(options *SystemdUnitCreateStageOptions) *Stage

func NewSystemdUnitStage

func NewSystemdUnitStage(options *SystemdUnitStageOptions) *Stage

func NewTarStage

func NewTarStage(options *TarStageOptions, inputPipeline string) *Stage

Assembles a tree into a tar archive. Compression is determined by the suffix (i.e., --auto-compress is used).

func NewTimezoneStage

func NewTimezoneStage(options *TimezoneStageOptions) *Stage

func NewTmpfilesdStage

func NewTmpfilesdStage(options *TmpfilesdStageOptions) *Stage

NewTmpfilesdStage creates a new Tmpfilesd Stage object.

func NewTruncateStage

func NewTruncateStage(options *TruncateStageOptions) *Stage

func NewTunedStage

func NewTunedStage(options *TunedStageOptions) *Stage

NewTunedStage creates a new TuneD Stage object.

func NewUdevRulesStage

func NewUdevRulesStage(options *UdevRulesStageOptions) *Stage

func NewUpdateCryptoPoliciesStage added in v0.18.0

func NewUpdateCryptoPoliciesStage(options *UpdateCryptoPoliciesStageOptions) *Stage

func NewUsersStage

func NewUsersStage(options *UsersStageOptions) *Stage

func NewWAAgentConfStage

func NewWAAgentConfStage(options *WAAgentConfStageOptions) *Stage

func NewWSLConfStage

func NewWSLConfStage(options *WSLConfStageOptions) *Stage

func NewXorrisofsStage

func NewXorrisofsStage(options *XorrisofsStageOptions, inputPipeline string) *Stage

Assembles a Rock Ridge enhanced ISO 9660 filesystem (iso)

func NewXzStage

func NewXzStage(options *XzStageOptions, inputs *XzStageInputs) *Stage

Compresses a file into a xz archive.

func NewYumConfigStage

func NewYumConfigStage(options *YumConfigStageOptions) *Stage

func NewYumReposStage

func NewYumReposStage(options *YumReposStageOptions) *Stage

func NewZiplInstStage

func NewZiplInstStage(options *ZiplInstStageOptions, disk *Device, devices map[string]Device, mounts []Mount) *Stage

Return a new zipl.inst stage. The 'disk' parameter must represent the (entire) device that contains the /boot partition.

func NewZiplStage

func NewZiplStage(options *ZiplStageOptions) *Stage

NewZiplStage creates a new zipl Stage object.

func OSTreeInitFsStage

func OSTreeInitFsStage() *Stage

A new org.osbuild.ostree.init stage to create an OSTree repository

func (*Stage) MountOSTree

func (s *Stage) MountOSTree(osName, ref string, serial int)

MountOSTree adds an ostree mount to a stage which makes it run in a deployed ostree stateroot.

type StageInput

type StageInput interface {
	// contains filtered or unexported methods
}

type StageMetadata

type StageMetadata interface {
	// contains filtered or unexported methods
}

type StageOptions

type StageOptions interface {
	// contains filtered or unexported methods
}

StageOptions specify the operations of a given stage-type.

type StageResult

type StageResult struct {
	ID      string `json:"id"`
	Type    string `json:"type"`
	Output  string `json:"output"`
	Success bool   `json:"success,omitempty"`
	Error   string `json:"string,omitempty"`
}

func (*StageResult) UnmarshalJSON

func (sr *StageResult) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes json-encoded StageResult.

This method is here only as a workaround for the default value of the success field, see the comment inside the method.

type SubManConfigRHSMCERTDSection

type SubManConfigRHSMCERTDSection struct {
	// Automatic system registration
	AutoRegistration *bool `json:"auto_registration,omitempty"`
}

RHSMCERTD configuration section of /etc/rhsm/rhsm.conf

type SubManConfigRHSMSection

type SubManConfigRHSMSection struct {
	// Whether subscription-manager should manage DNF repos file
	ManageRepos *bool `json:"manage_repos,omitempty"`
}

RHSM configuration section of /etc/rhsm/rhsm.conf

type SysconfigDesktopOptions

type SysconfigDesktopOptions struct {
	Preferred      string `json:"preferred,omitempty"`
	DisplayManager string `json:"displaymanager,omitempty"`
}

type SysconfigKernelOptions

type SysconfigKernelOptions struct {
	UpdateDefault bool   `json:"update_default,omitempty"`
	DefaultKernel string `json:"default_kernel,omitempty"`
}

type SysconfigLivesysOptions

type SysconfigLivesysOptions struct {
	Session string `json:"session"`
}

type SysconfigNetworkOptions

type SysconfigNetworkOptions struct {
	Networking bool `json:"networking,omitempty"`
	NoZeroConf bool `json:"no_zero_conf,omitempty"`
}

type SysconfigStageOptions

type SysconfigStageOptions struct {
	Kernel         *SysconfigKernelOptions  `json:"kernel,omitempty"`
	Network        *SysconfigNetworkOptions `json:"network,omitempty"`
	NetworkScripts *NetworkScriptsOptions   `json:"network-scripts,omitempty"`
	Desktop        *SysconfigDesktopOptions `json:"desktop,omitempty"`
	LiveSys        *SysconfigLivesysOptions `json:"livesys,omitempty"`
}

type SysctldConfigLine

type SysctldConfigLine struct {
	// Kernel parameter name.
	// If the string starts with "-" and the Value is not set,
	// then the key is excluded from being set by a matching glob.
	Key string `json:"key"`
	// Kernel parameter value.
	// Must be set, unless the Key value starts with "-".
	Value string `json:"value,omitempty"`
}

SysctldConfigLine represents a single line in a sysctl.d configuration.

func (SysctldConfigLine) MarshalJSON

func (l SysctldConfigLine) MarshalJSON() ([]byte, error)

type SysctldStageOptions

type SysctldStageOptions struct {
	// Filename of the configuration file to be created. Must end with '.conf'.
	Filename string `json:"filename"`
	// List of configuration directives. The list must contain at least one item.
	Config []SysctldConfigLine `json:"config"`
}

SysctldStageOptions represents a single sysctl.d configuration file.

func NewSysctldStageOptions

func NewSysctldStageOptions(filename string, config []SysctldConfigLine) *SysctldStageOptions

NewSysctldStageOptions creates a new PamLimitsConf Stage options object.

func (SysctldStageOptions) MarshalJSON

func (o SysctldStageOptions) MarshalJSON() ([]byte, error)

type SysrootOptions

type SysrootOptions struct {
	ReadOnly   *bool  `json:"readonly,omitempty"`
	Bootloader string `json:"bootloader,omitempty"`
}

type SystemdJournaldConfigDropin

type SystemdJournaldConfigDropin struct {
	Journal SystemdJournaldConfigJournalSection `json:"Journal"`
}

type SystemdJournaldConfigJournalSection

type SystemdJournaldConfigJournalSection struct {
	// Controls where to store journal data.
	Storage ConfigStorage `json:"Storage,omitempty"`

	// Sets whether the data objects stored in the journal should be
	// compressed or not. Can also take threshold values.
	Compress string `json:"Compress,omitempty"`

	// Splits journal files per user or to a single file.
	SplitMode ConfigSplitMode `json:"SplitMode,omitempty"`

	// Max time to store entries in a single file. By default seconds, may be
	// sufixed with units (year, month, week, day, h, m) to override this.
	MaxFileSec string `json:"MaxFileSec,omitempty"`

	// Maximum time to store journal entries. By default seconds, may be sufixed
	// with units (year, month, week, day, h, m) to override this.
	MaxRetentionSec string `json:"MaxRetentionSec,omitempty"`

	// Timeout before synchronizing journal files to disk. Minimum 0.
	SyncIntervalSec int `json:"SyncIntervalSec,omitempty"`

	// Enables/Disables kernel auditing on start-up, leaves it as is if
	// unspecified.
	Audit ConfigAudit `json:"Audit,omitempty"`
}

'Journal' configuration section, at least one option must be specified

type SystemdJournaldStageOptions

type SystemdJournaldStageOptions struct {
	Filename string                      `json:"filename"`
	Config   SystemdJournaldConfigDropin `json:"config"`
}

type SystemdLogindConfigDropin

type SystemdLogindConfigDropin struct {
	Login SystemdLogindConfigLoginSection `json:"Login"`
}

Drop-in configuration for systemd-logind

type SystemdLogindConfigLoginSection

type SystemdLogindConfigLoginSection struct {
	// Configures how many virtual terminals (VTs) to allocate by default
	// The option is optional, but zero is a valid value
	NAutoVTs *int `json:"NAutoVTs,omitempty"`
}

'Login' configuration section - at least one option must be specified

func (SystemdLogindConfigLoginSection) MarshalJSON

func (s SystemdLogindConfigLoginSection) MarshalJSON() ([]byte, error)

type SystemdLogindStageOptions

type SystemdLogindStageOptions struct {
	Filename string                    `json:"filename"`
	Config   SystemdLogindConfigDropin `json:"config"`
}

type SystemdPresetStageOptions

type SystemdPresetStageOptions struct {
	Presets []Preset `json:"presets,omitempty"`
}

type SystemdServiceUnit added in v0.50.0

type SystemdServiceUnit struct {
	Unit    *Unit    `json:"Unit"`
	Service *Service `json:"Service"`
	Install *Install `json:"Install"`
}

type SystemdServiceUnitDropin

type SystemdServiceUnitDropin struct {
	Service *SystemdUnitServiceSection `json:"Service,omitempty"`
	Unit    *SystemdUnitSection        `json:"Unit,omitempty"`
}

Drop-in configuration for a '.service' unit

type SystemdStageOptions

type SystemdStageOptions struct {
	EnabledServices  []string `json:"enabled_services,omitempty"`
	DisabledServices []string `json:"disabled_services,omitempty"`
	MaskedServices   []string `json:"masked_services,omitempty"`
	DefaultTarget    string   `json:"default_target,omitempty"`
}

type SystemdUnitCreateStageOptions added in v0.50.0

type SystemdUnitCreateStageOptions struct {
	Filename string             `json:"filename"`
	UnitType unitType           `json:"unit-type,omitempty"` // unitType defined in ./systemd_unit_stage.go
	UnitPath unitPath           `json:"unit-path,omitempty"`
	Config   SystemdServiceUnit `json:"config"`
}

type SystemdUnitSection added in v0.3.0

type SystemdUnitSection struct {
	// Sets condition to to check if file exits
	FileExists string `json:"ConditionPathExists,omitempty"`
}

'Unit' configuration section of a unit file

type SystemdUnitServiceSection

type SystemdUnitServiceSection struct {
	// Sets environment variables for executed process
	Environment     []EnvironmentVariable `json:"Environment,omitempty"`
	EnvironmentFile []string              `json:"EnvironmentFile,omitempty"`
}

'Service' configuration section of a unit file

type SystemdUnitStageOptions

type SystemdUnitStageOptions struct {
	Unit     string                   `json:"unit"`
	Dropin   string                   `json:"dropin"`
	Config   SystemdServiceUnitDropin `json:"config"`
	UnitType unitType                 `json:"unit-type,omitempty"`
}

type TarArchiveFormat

type TarArchiveFormat string
const (
	TarArchiveFormatGnu    TarArchiveFormat = "gnu"
	TarArchiveFormatOldgnu TarArchiveFormat = "oldgnu"
	TarArchiveFormatPosix  TarArchiveFormat = "posix"
	TarArchiveFormatUstar  TarArchiveFormat = "ustar"
	TarArchiveFormatV7     TarArchiveFormat = "v7"
)

valid values for the 'format' Tar stage option

type TarRootNode

type TarRootNode string
const (
	TarRootNodeInclude TarRootNode = "include"
	TarRootNodeOmit    TarRootNode = "omit"
)

valid values for the 'root-node' Tar stage option

type TarStageOptions

type TarStageOptions struct {
	// Filename for tar archive
	Filename string `json:"filename"`

	// Archive format to use
	Format TarArchiveFormat `json:"format,omitempty"`

	// Enable support for POSIX ACLs
	ACLs *bool `json:"acls,omitempty"`

	// Enable support for SELinux contexts
	SELinux *bool `json:"selinux,omitempty"`

	// Enable support for extended attributes
	Xattrs *bool `json:"xattrs,omitempty"`

	// How to handle the root node: include or omit
	RootNode TarRootNode `json:"root-node,omitempty"`

	// List of paths to include, instead of the whole tree
	Paths []string `json:"paths,omitempty"`
}

type TimezoneStageOptions

type TimezoneStageOptions struct {
	Zone string `json:"zone"`
}

type TmpfilesdConfigLine

type TmpfilesdConfigLine struct {
	// The file system path type
	Type string `json:"type"`
	// Absolute file system path
	Path string `json:"path"`
	// The file access mode when creating the file or directory
	Mode string `json:"mode,omitempty"`
	// The user to use for the file or directory
	User string `json:"user,omitempty"`
	// The group to use for the file or directory
	Group string `json:"group,omitempty"`
	// Date field used to decide what files to delete when cleaning
	Age string `json:"age,omitempty"`
	// Argument with its meaning being specific to the path type
	Argument string `json:"argument,omitempty"`
}

TmpfilesdConfigLine represents a single line in a tmpfiles.d configuration.

type TmpfilesdStageOptions

type TmpfilesdStageOptions struct {
	// Filename of the configuration file to be created. Must end with '.conf'.
	Filename string `json:"filename"`
	// List of configuration directives. The list must contain at least one item.
	Config []TmpfilesdConfigLine `json:"config"`
}

TmpfilesdStageOptions represents a single tmpfiles.d configuration file.

func NewTmpfilesdStageOptions

func NewTmpfilesdStageOptions(filename string, config []TmpfilesdConfigLine) *TmpfilesdStageOptions

NewTmpfilesdStageOptions creates a new Tmpfilesd Stage options object.

func (TmpfilesdStageOptions) MarshalJSON

func (o TmpfilesdStageOptions) MarshalJSON() ([]byte, error)

type TreeInput

type TreeInput struct {
	References []string `json:"references"`
	// contains filtered or unexported fields
}

Tree inputs

func NewTreeInput

func NewTreeInput(reference string) *TreeInput

NewTreeInput creates an org.osbuild.tree input for an osbuild stage. The input is the final tree from a pipeline that should be referenced as 'name:<pipelinename>' in the reference argument.

type TruncateStageOptions

type TruncateStageOptions struct {
	// Image filename
	Filename string `json:"filename"`

	// Desired size
	Size string `json:"size"`
}

type TunedStageOptions

type TunedStageOptions struct {
	// List of TuneD profiles to apply.
	Profiles []string `json:"profiles"`
}

TunedStageOptions represents manually set TuneD profiles.

func NewTunedStageOptions

func NewTunedStageOptions(profiles ...string) *TunedStageOptions

NewTunedStageOptions creates a new TuneD Stage options object.

func (TunedStageOptions) MarshalJSON

func (o TunedStageOptions) MarshalJSON() ([]byte, error)

type URL

type URL string

type URLSecrets

type URLSecrets struct {
	Name string `json:"name"`
}

type UdevKV

type UdevKV struct {
	K string // Key, e.g. "ENV"
	A string // Argument for the key, MANAGED, in `ENV{MANAGED}`
	O string // Operator, e.g. "="
	V string // Value, e.g. "1"
}

UdevKV is a helper struct that in order to be able to create a UdevRule more compactly

type UdevOp

type UdevOp interface {
	// contains filtered or unexported methods
}

type UdevOpArg

type UdevOpArg struct {
	Key   UdevRuleKeyArg `json:"key"`
	Op    string         `json:"op"`
	Value string         `json:"val"`
}

type UdevOpSimple

type UdevOpSimple struct {
	Key   string `json:"key"`
	Op    string `json:"op"`
	Value string `json:"val"`
}

type UdevOps

type UdevOps []UdevOp

type UdevRule

type UdevRule interface {
	// contains filtered or unexported methods
}

func NewUdevRule

func NewUdevRule(ops []UdevKV) UdevRule

NewUdevRule creates a new UdevRule from a list of UdevKV helper structs. A UdevOpSimple or a UdevOpArg is created depending on the value of the `A` field. The result is validated and the function will panic if validation fails.

func NewUdevRuleComment

func NewUdevRuleComment(comment []string) UdevRule

type UdevRuleComment

type UdevRuleComment struct {
	Comment []string `json:"comment"`
}

Comments

type UdevRuleKey

type UdevRuleKey interface {
	// contains filtered or unexported methods
}

type UdevRuleKeyArg

type UdevRuleKeyArg struct {
	Name string `json:"name"`
	Arg  string `json:"arg"`
}

type UdevRuleKeySimple

type UdevRuleKeySimple struct {
	Key string `json:"key"`
}

type UdevRules

type UdevRules []UdevRule

type UdevRulesStageOptions

type UdevRulesStageOptions struct {
	Filename string    `json:"filename"`
	Rules    UdevRules `json:"rules"`
}

type Unit added in v0.50.0

type Unit struct {
	Description              string   `json:"Description,omitempty"`
	DefaultDependencies      bool     `json:"DefaultDependencies,omitempty"`
	ConditionPathExists      []string `json:"ConditionPathExists,omitempty"`
	ConditionPathIsDirectory []string `json:"ConditionPathIsDirectory,omitempty"`
	Requires                 []string `json:"Requires,omitempty"`
	Wants                    []string `json:"Wants,omitempty"`
	After                    []string `json:"After,omitempty"`
}

type UpdateCryptoPoliciesStageOptions added in v0.18.0

type UpdateCryptoPoliciesStageOptions struct {
	Policy string `json:"policy"`
}

type UsersStageOptions

type UsersStageOptions struct {
	Users map[string]UsersStageOptionsUser `json:"users"`
}

func NewUsersStageOptions

func NewUsersStageOptions(userCustomizations []users.User, omitKey bool) (*UsersStageOptions, error)

type UsersStageOptionsUser

type UsersStageOptionsUser struct {
	UID         *int     `json:"uid,omitempty"`
	GID         *int     `json:"gid,omitempty"`
	Groups      []string `json:"groups,omitempty"`
	Description *string  `json:"description,omitempty"`
	Home        *string  `json:"home,omitempty"`
	Shell       *string  `json:"shell,omitempty"`
	Password    *string  `json:"password,omitempty"`
	Key         *string  `json:"key,omitempty"`
	ExpireDate  *int     `json:"expiredate,omitempty"`
}

type VDIOptions

type VDIOptions struct {
	// The type of the format must be 'vdi'
	Type QEMUFormat `json:"type"`
}

type VHDXOptions

type VHDXOptions struct {
	// The type of the format must be 'vhdx'
	Type QEMUFormat `json:"type"`
}

type VMDKOptions

type VMDKOptions struct {
	// The type of the format must be 'vmdk'
	Type QEMUFormat `json:"type"`

	Subformat VMDKSubformat `json:"subformat,omitempty"`
}

type VMDKSubformat

type VMDKSubformat string

type VPCOptions

type VPCOptions struct {
	// The type of the format must be 'vpc'
	Type QEMUFormat `json:"type"`

	// VPC related options
	ForceSize *bool `json:"force_size,omitempty"`
}

type ValidationError

type ValidationError struct {
	Message string   `json:"message"`
	Path    []string `json:"path"`
}

func (*ValidationError) UnmarshalJSON

func (ve *ValidationError) UnmarshalJSON(data []byte) error

The ValidationError path from osbuild can contain strings or numbers json represents all numbers as float64 but since we know they are really ints any fractional part is truncated when converting to a string.

type WAAgentConfStageOptions

type WAAgentConfStageOptions struct {
	Config WAAgentConfig `json:"config"`
}

type WAAgentConfig

type WAAgentConfig struct {
	RDFormat     *bool `json:"ResourceDisk.Format"`
	RDEnableSwap *bool `json:"ResourceDisk.EnableSwap"`
}

type WSLConfBootOptions

type WSLConfBootOptions struct {
	Systemd bool `json:"systemd"`
}

type WSLConfStageOptions

type WSLConfStageOptions struct {
	Boot WSLConfBootOptions `json:"boot"`
}

type X11KeymapOptions

type X11KeymapOptions struct {
	Layouts []string `json:"layouts"`
}

func (X11KeymapOptions) MarshalJSON

func (o X11KeymapOptions) MarshalJSON() ([]byte, error)

type XorrisofsBoot

type XorrisofsBoot struct {
	// Path to the boot image (on the ISO)
	Image string `json:"image"`
	// Path to the boot catalog file (on the ISO)
	Catalog string `json:"catalog"`
}

type XorrisofsStageOptions

type XorrisofsStageOptions struct {
	// Filename of the ISO to create
	Filename string `json:"filename"`

	// Volume ID to set
	VolID string `json:"volid"`

	// System ID to set
	SysID string `json:"sysid,omitempty"`

	Boot *XorrisofsBoot `json:"boot,omitempty"`

	EFI string `json:"efi,omitempty"`

	// Install the argument (buildroot) as ISOLINUX isohybrid MBR
	IsohybridMBR string `json:"isohybridmbr,omitempty"`

	// The ISO 9660 version (limits data size and filenames; min: 1, max: 4)
	ISOLevel int `json:"isolevel,omitempty"`
}

type XzStageInputs

type XzStageInputs struct {
	File *FilesInput `json:"file"`
}

func NewXzStageInputs

func NewXzStageInputs(references FilesInputRef) *XzStageInputs

type XzStageOptions

type XzStageOptions struct {
	// Filename for xz archive
	Filename string `json:"filename"`
}

func NewXzStageOptions

func NewXzStageOptions(filename string) *XzStageOptions

type YumConfigConfig

type YumConfigConfig struct {
	HttpCaching *string `json:"http_caching,omitempty"`
}

type YumConfigPlugins

type YumConfigPlugins struct {
	Langpacks *YumConfigPluginsLangpacks `json:"langpacks,omitempty"`
}

type YumConfigPluginsLangpacks

type YumConfigPluginsLangpacks struct {
	Locales []string `json:"locales"`
}

type YumConfigStageOptions

type YumConfigStageOptions struct {
	Config  *YumConfigConfig  `json:"config,omitempty"`
	Plugins *YumConfigPlugins `json:"plugins,omitempty"`
}

type YumReposStageOptions

type YumReposStageOptions struct {
	// Filename of the configuration file to be created. Must end with '.repo'.
	Filename string `json:"filename"`
	// List of repositories. The list must contain at least one item.
	Repos []YumRepository `json:"repos"`
}

YumReposStageOptions represents a single DNF / YUM repo configuration file.

func NewYumReposStageOptions

func NewYumReposStageOptions(filename string, repos []rpmmd.RepoConfig) *YumReposStageOptions

NewYumReposStageOptions creates a new YumRepos Stage options object.

type YumRepository

type YumRepository struct {
	Id             string   `json:"id"`
	BaseURLs       []string `json:"baseurl,omitempty"`
	Cost           *int     `json:"cost,omitempty"`
	Enabled        *bool    `json:"enabled,omitempty"`
	Priority       *int     `json:"priority,omitempty"`
	GPGKey         []string `json:"gpgkey,omitempty"`
	Metalink       string   `json:"metalink,omitempty"`
	Mirrorlist     string   `json:"mirrorlist,omitempty"`
	ModuleHotfixes *bool    `json:"module_hotfixes,omitempty"`
	Name           string   `json:"name,omitempty"`
	GPGCheck       *bool    `json:"gpgcheck,omitempty"`
	RepoGPGCheck   *bool    `json:"repo_gpgcheck,omitempty"`
	SSLVerify      *bool    `json:"sslverify,omitempty"`
}

YumRepository represents a single DNF / YUM repository.

type ZiplInstStageOptions

type ZiplInstStageOptions struct {
	Kernel string `json:"kernel"`

	// The offset of the partition containing /boot
	Location uint64 `json:"location"`

	SectorSize *uint64 `json:"sector-size,omitempty"`
}

func NewZiplInstStageOptions

func NewZiplInstStageOptions(kernel string, pt *disk.PartitionTable) *ZiplInstStageOptions

type ZiplStageOptions

type ZiplStageOptions struct {
	Timeout int `json:"timeout,omitempty"`
}

The ZiplStageOptions describe how to create zipl stage

The only configuration option available is a boot timeout and it is optional

Source Files

Jump to

Keyboard shortcuts

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