rhel

package
v0.63.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// build package set name
	BuildPkgsKey = "build"

	// main/common os image package set name
	OSPkgsKey = "os"

	// container package set name
	ContainerPkgsKey = "container"

	// installer package set name
	InstallerPkgsKey = "installer"

	// blueprint package set name
	BlueprintPkgsKey = "blueprint"
)
View Source
const (
	UEFIVendor = "redhat"
)

Variables

This section is empty.

Functions

func DiskImage

func DiskImage(workload workload.Workload,
	t *ImageType,
	customizations *blueprint.Customizations,
	options distro.ImageOptions,
	packageSets map[string]rpmmd.PackageSet,
	containers []container.SourceSpec,
	rng *rand.Rand) (image.ImageKind, error)

func EdgeCommitImage

func EdgeCommitImage(workload workload.Workload,
	t *ImageType,
	customizations *blueprint.Customizations,
	options distro.ImageOptions,
	packageSets map[string]rpmmd.PackageSet,
	containers []container.SourceSpec,
	rng *rand.Rand) (image.ImageKind, error)

func EdgeContainerImage

func EdgeContainerImage(workload workload.Workload,
	t *ImageType,
	customizations *blueprint.Customizations,
	options distro.ImageOptions,
	packageSets map[string]rpmmd.PackageSet,
	containers []container.SourceSpec,
	rng *rand.Rand) (image.ImageKind, error)

func EdgeInstallerImage

func EdgeInstallerImage(workload workload.Workload,
	t *ImageType,
	customizations *blueprint.Customizations,
	options distro.ImageOptions,
	packageSets map[string]rpmmd.PackageSet,
	containers []container.SourceSpec,
	rng *rand.Rand) (image.ImageKind, error)

func EdgeRawImage

func EdgeRawImage(workload workload.Workload,
	t *ImageType,
	customizations *blueprint.Customizations,
	options distro.ImageOptions,
	packageSets map[string]rpmmd.PackageSet,
	containers []container.SourceSpec,
	rng *rand.Rand) (image.ImageKind, error)

func EdgeSimplifiedInstallerImage

func EdgeSimplifiedInstallerImage(workload workload.Workload,
	t *ImageType,
	customizations *blueprint.Customizations,
	options distro.ImageOptions,
	packageSets map[string]rpmmd.PackageSet,
	containers []container.SourceSpec,
	rng *rand.Rand) (image.ImageKind, error)

func ImageInstallerImage

func ImageInstallerImage(workload workload.Workload,
	t *ImageType,
	customizations *blueprint.Customizations,
	options distro.ImageOptions,
	packageSets map[string]rpmmd.PackageSet,
	containers []container.SourceSpec,
	rng *rand.Rand) (image.ImageKind, error)

func TarImage

func TarImage(workload workload.Workload,
	t *ImageType,
	customizations *blueprint.Customizations,
	options distro.ImageOptions,
	packageSets map[string]rpmmd.PackageSet,
	containers []container.SourceSpec,
	rng *rand.Rand) (image.ImageKind, error)

Types

type Architecture

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

func NewArchitecture

func NewArchitecture(distro *Distribution, arch arch.Arch) *Architecture

func (*Architecture) AddImageTypes

func (a *Architecture) AddImageTypes(platform platform.Platform, imageTypes ...*ImageType)

func (*Architecture) Distro

func (a *Architecture) Distro() distro.Distro

func (*Architecture) GetImageType

func (a *Architecture) GetImageType(name string) (distro.ImageType, error)

func (*Architecture) ListImageTypes

func (a *Architecture) ListImageTypes() []string

func (*Architecture) Name

func (a *Architecture) Name() string

type BasePartitionTableFunc

type BasePartitionTableFunc func(t *ImageType) (disk.PartitionTable, bool)

type CheckOptionsFunc

type CheckOptionsFunc func(t *ImageType, bp *blueprint.Blueprint, options distro.ImageOptions) ([]string, error)

type DefaultDistroImageConfigFunc added in v0.54.0

type DefaultDistroImageConfigFunc func(d *Distribution) *distro.ImageConfig

DefaultDistroImageConfigFunc is a function that returns the default image configuration for a distribution.

type Distribution

type Distribution struct {
	DistCodename string

	DefaultImageConfig DefaultDistroImageConfigFunc

	// distro specific function to check options per image type
	CheckOptions CheckOptionsFunc
	// contains filtered or unexported fields
}

func NewDistribution

func NewDistribution(name string, major, minor int) (*Distribution, error)

func (*Distribution) AddArches

func (d *Distribution) AddArches(arches ...*Architecture)

func (*Distribution) Codename added in v0.56.0

func (d *Distribution) Codename() string

func (*Distribution) GetArch

func (d *Distribution) GetArch(name string) (distro.Arch, error)

func (*Distribution) GetDefaultImageConfig

func (d *Distribution) GetDefaultImageConfig() *distro.ImageConfig

func (*Distribution) IsRHEL

func (d *Distribution) IsRHEL() bool

func (*Distribution) ListArches

func (d *Distribution) ListArches() []string

func (*Distribution) ModulePlatformID

func (d *Distribution) ModulePlatformID() string

func (*Distribution) Name

func (d *Distribution) Name() string

func (*Distribution) OSTreeRef

func (d *Distribution) OSTreeRef() string

func (*Distribution) OsVersion

func (d *Distribution) OsVersion() string

func (*Distribution) Product

func (d *Distribution) Product() string

func (*Distribution) Releasever

func (d *Distribution) Releasever() string

func (*Distribution) Vendor

func (d *Distribution) Vendor() string

type ISOLabelFunc

type ISOLabelFunc func(t *ImageType) string

type ImageFunc

type ImageFunc func(workload workload.Workload, t *ImageType, customizations *blueprint.Customizations, options distro.ImageOptions, packageSets map[string]rpmmd.PackageSet, containers []container.SourceSpec, rng *rand.Rand) (image.ImageKind, error)

type ImageType

type ImageType struct {
	Environment            environment.Environment
	Workload               workload.Workload
	NameAliases            []string
	Compression            string // TODO: remove from image definition and make it a transport option
	DefaultImageConfig     *distro.ImageConfig
	DefaultInstallerConfig *distro.InstallerConfig
	KernelOptions          string
	DefaultSize            uint64

	// bootISO: installable ISO
	BootISO bool
	// rpmOstree: edge/ostree
	RPMOSTree bool
	// bootable image
	Bootable bool
	// List of valid arches for the image type
	BasePartitionTables BasePartitionTableFunc
	// Optional list of unsupported partitioning modes
	UnsupportedPartitioningModes []disk.PartitioningMode

	ISOLabelFn ISOLabelFunc

	// TODO: determine a better place for these options, but for now they are here
	DiskImagePartTool     *osbuild.PartTool
	DiskImageVPCForceSize *bool
	// contains filtered or unexported fields
}

func NewImageType

func NewImageType(
	name, filename, mimeType string,
	pkgSets map[string]PackageSetFunc,
	imgFunc ImageFunc,
	buildPipelines, payloadPipelines, exports []string,
) *ImageType

func (*ImageType) Arch

func (t *ImageType) Arch() distro.Arch

func (*ImageType) BootMode

func (t *ImageType) BootMode() distro.BootMode

func (*ImageType) BuildPipelines

func (t *ImageType) BuildPipelines() []string

func (*ImageType) Exports

func (t *ImageType) Exports() []string

func (*ImageType) Filename

func (t *ImageType) Filename() string

func (*ImageType) GetPartitionTable

func (t *ImageType) GetPartitionTable(
	mountpoints []blueprint.FilesystemCustomization,
	options distro.ImageOptions,
	rng *rand.Rand,
) (*disk.PartitionTable, error)

func (*ImageType) ISOLabel

func (t *ImageType) ISOLabel() (string, error)

func (*ImageType) IsRHEL

func (t *ImageType) IsRHEL() bool

IsRHEL returns true if the image type is part of a RHEL distribution

This is a convenience method, because external packages can't get the information from t.Arch().Distro(), since the distro.Distro interface does not have this method. And since the distro.Distro interface is distro-agnostic, it does not make much sense to have a method like this in the interface.

func (*ImageType) MIMEType

func (t *ImageType) MIMEType() string

func (*ImageType) Manifest

func (t *ImageType) Manifest(bp *blueprint.Blueprint,
	options distro.ImageOptions,
	repos []rpmmd.RepoConfig,
	seed int64) (*manifest.Manifest, []string, error)

func (*ImageType) Name

func (t *ImageType) Name() string

func (*ImageType) OSTreeRef

func (t *ImageType) OSTreeRef() string

func (*ImageType) PackageSetsChains

func (t *ImageType) PackageSetsChains() map[string][]string

func (*ImageType) PartitionType

func (t *ImageType) PartitionType() string

func (*ImageType) PayloadPackageSets

func (t *ImageType) PayloadPackageSets() []string

func (*ImageType) PayloadPipelines

func (t *ImageType) PayloadPipelines() []string

func (*ImageType) Size

func (t *ImageType) Size(size uint64) uint64

type PackageSetFunc

type PackageSetFunc func(t *ImageType) rpmmd.PackageSet

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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