Documentation ¶
Index ¶
- func BuildPipelinesFallback() []string
- func ExportsFallback() []string
- func GetHostDistroName() (string, error)
- func PayloadPackageSets() []string
- func PayloadPipelinesFallback() []string
- type Arch
- type BasePartitionTableMap
- type BootMode
- type Distro
- type ID
- type ImageConfig
- type ImageOptions
- type ImageType
- type ParseError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildPipelinesFallback ¶
func BuildPipelinesFallback() []string
Fallbacks: When a new method is added to an interface to provide to provide information that isn't available for older implementations, the older methods should return a fallback/default value by calling the appropriate function from below. Example: Exports() simply returns "assembler" for older image type implementations that didn't produce v1 manifests that have named pipelines.
func ExportsFallback ¶
func ExportsFallback() []string
func GetHostDistroName ¶ added in v0.33.0
GetHostDistroName returns the name of the host distribution, such as "fedora-32" or "rhel-8.2". It does so by reading the /etc/os-release file.
func PayloadPackageSets ¶
func PayloadPackageSets() []string
func PayloadPipelinesFallback ¶
func PayloadPipelinesFallback() []string
Types ¶
type Arch ¶
type Arch interface { // Returns the name of the architecture. Name() string // Returns a sorted list of the names of the image types this architecture // supports. ListImageTypes() []string // Returns an object representing a given image format for this architecture, // on this distro. GetImageType(imageType string) (ImageType, error) // Returns the parent distro Distro() Distro }
An Arch represents a given distribution's support for a given architecture.
type BasePartitionTableMap ¶
type BasePartitionTableMap map[string]disk.PartitionTable
type Distro ¶
type Distro interface { // Returns the name of the distro. Name() string // Returns the release version of the distro. This is used in repo // files on the host system and required for the subscription support. Releasever() string // Returns the OS version of the distro, which may contain minor versions // if the distro supports them. This is used in various places where the // minor version of the distro is needed to determine the correct // configuration. OsVersion() string // Returns the module platform id of the distro. This is used by DNF // for modularity support. ModulePlatformID() string // Returns the product name of the distro. Product() string // Returns the ostree reference template OSTreeRef() string // Returns a sorted list of the names of the architectures this distro // supports. ListArches() []string // Returns an object representing the given architecture as support // by this distro. GetArch(arch string) (Arch, error) }
A Distro represents composer's notion of what a given distribution is.
type ID ¶ added in v0.33.0
type ID struct { Name string MajorVersion int // MinorVersion is -1 if not specified MinorVersion int }
ID represents a distro name and version
type ImageConfig ¶
type ImageConfig struct { Timezone *string TimeSynchronization *osbuild.ChronyStageOptions Locale *string Keyboard *osbuild.KeymapStageOptions EnabledServices []string DisabledServices []string MaskedServices []string DefaultTarget *string Sysconfig []*osbuild.SysconfigStageOptions // List of files from which to import GPG keys into the RPM database GPGKeyFiles []string // Disable SELinux labelling NoSElinux *bool // Do not use. Forces auto-relabelling on first boot. // See https://github.com/osbuild/osbuild/commit/52cb27631b587c1df177cd17625c5b473e1e85d2 SELinuxForceRelabel *bool // Disable documentation ExcludeDocs *bool ShellInit []shell.InitFile // for RHSM configuration, we need to potentially distinguish the case // when the user want the image to be subscribed on first boot and when not RHSMConfig map[subscription.RHSMStatus]*osbuild.RHSMStageOptions SystemdLogind []*osbuild.SystemdLogindStageOptions CloudInit []*osbuild.CloudInitStageOptions Modprobe []*osbuild.ModprobeStageOptions DracutConf []*osbuild.DracutConfStageOptions SystemdUnit []*osbuild.SystemdUnitStageOptions Authselect *osbuild.AuthselectStageOptions SELinuxConfig *osbuild.SELinuxConfigStageOptions Tuned *osbuild.TunedStageOptions Tmpfilesd []*osbuild.TmpfilesdStageOptions PamLimitsConf []*osbuild.PamLimitsConfStageOptions Sysctld []*osbuild.SysctldStageOptions DNFConfig []*osbuild.DNFConfigStageOptions SshdConfig *osbuild.SshdConfigStageOptions Authconfig *osbuild.AuthconfigStageOptions PwQuality *osbuild.PwqualityConfStageOptions WAAgentConfig *osbuild.WAAgentConfStageOptions Grub2Config *osbuild.GRUB2Config DNFAutomaticConfig *osbuild.DNFAutomaticConfigStageOptions YumConfig *osbuild.YumConfigStageOptions YUMRepos []*osbuild.YumReposStageOptions Firewall *osbuild.FirewallStageOptions UdevRules *osbuild.UdevRulesStageOptions GCPGuestAgentConfig *osbuild.GcpGuestAgentConfigOptions WSLConfig *osbuild.WSLConfStageOptions Files []*fsnode.File Directories []*fsnode.Directory }
ImageConfig represents a (default) configuration applied to the image
func (*ImageConfig) InheritFrom ¶
func (c *ImageConfig) InheritFrom(parentConfig *ImageConfig) *ImageConfig
InheritFrom inherits unset values from the provided parent configuration and returns a new structure instance, which is a result of the inheritance.
type ImageOptions ¶
type ImageOptions struct { Size uint64 OSTree *ostree.ImageOptions Subscription *subscription.ImageOptions Facts *facts.ImageOptions PartitioningMode disk.PartitioningMode }
The ImageOptions specify options for a specific image build
type ImageType ¶
type ImageType interface { // Returns the name of the image type. Name() string // Returns the parent architecture Arch() Arch // Returns the canonical filename for the image type. Filename() string // Retrns the MIME-type for the image type. MIMEType() string // Returns the default OSTree ref for the image type. OSTreeRef() string // Returns the ISO Label for the image type. Returns an error if the image // type is not an ISO. ISOLabel() (string, error) // Returns the proper image size for a given output format. If the input size // is 0 the default value for the format will be returned. Size(size uint64) uint64 // Returns the corresponding partion type ("gpt", "dos") or "" the image type // has no partition table. Only support for RHEL 8.5+ PartitionType() string // Returns the corresponding boot mode ("legacy", "uefi", "hybrid") or "none" BootMode() BootMode // Returns the names of the pipelines that set up the build environment (buildroot). BuildPipelines() []string // Returns the names of the pipelines that create the image. PayloadPipelines() []string // Returns the package set names safe to install custom packages via custom repositories. PayloadPackageSets() []string // Returns named arrays of package set names which should be depsolved in a chain. PackageSetsChains() map[string][]string // Returns the names of the stages that will produce the build output. Exports() []string // Returns an osbuild manifest, containing the sources and pipeline necessary // to build an image, given output format with all packages and customizations // specified in the given blueprint; it also returns any warnings (e.g. // deprecation notices) generated by the manifest. // The packageSpecSets must be labelled in the same way as the originating PackageSets. Manifest(bp *blueprint.Blueprint, options ImageOptions, repos []rpmmd.RepoConfig, seed int64) (*manifest.Manifest, []string, error) }
An ImageType represents a given distribution's support for a given Image Type for a given architecture.
type ParseError ¶ added in v0.33.0
func (ParseError) Error ¶ added in v0.33.0
func (e ParseError) Error() string