go.mod: update osbuild/images to v0.118.0
Replace ifcfg with net-lib for EL10 and F42 installers. In RHEL 10 and Fedora 42, the ifcfg module was replaced by net-lib. This PR removes ifcfg from common anaconda dracut stage modules and adds either ifcfg or net-lib to each installer based on distro version.
This commit is contained in:
parent
2fc64aeaca
commit
5817db95f8
43 changed files with 900 additions and 307 deletions
30
vendor/github.com/osbuild/images/pkg/arch/arch.go
generated
vendored
30
vendor/github.com/osbuild/images/pkg/arch/arch.go
generated
vendored
|
|
@ -12,6 +12,7 @@ const ( // architecture enum
|
|||
ARCH_PPC64LE
|
||||
ARCH_S390X
|
||||
ARCH_X86_64
|
||||
ARCH_RISCV64
|
||||
)
|
||||
|
||||
func (a Arch) String() string {
|
||||
|
|
@ -26,6 +27,8 @@ func (a Arch) String() string {
|
|||
return "s390x"
|
||||
case ARCH_X86_64:
|
||||
return "x86_64"
|
||||
case ARCH_RISCV64:
|
||||
return "riscv64"
|
||||
default:
|
||||
panic("invalid architecture")
|
||||
}
|
||||
|
|
@ -33,18 +36,16 @@ func (a Arch) String() string {
|
|||
|
||||
func FromString(a string) Arch {
|
||||
switch a {
|
||||
case "amd64":
|
||||
fallthrough
|
||||
case "x86_64":
|
||||
case "amd64", "x86_64":
|
||||
return ARCH_X86_64
|
||||
case "arm64":
|
||||
fallthrough
|
||||
case "aarch64":
|
||||
case "arm64", "aarch64":
|
||||
return ARCH_AARCH64
|
||||
case "s390x":
|
||||
return ARCH_S390X
|
||||
case "ppc64le":
|
||||
return ARCH_PPC64LE
|
||||
case "riscv64":
|
||||
return ARCH_RISCV64
|
||||
default:
|
||||
panic("unsupported architecture")
|
||||
}
|
||||
|
|
@ -53,18 +54,7 @@ func FromString(a string) Arch {
|
|||
var runtimeGOARCH = runtime.GOARCH
|
||||
|
||||
func Current() Arch {
|
||||
switch runtimeGOARCH {
|
||||
case "amd64":
|
||||
return ARCH_X86_64
|
||||
case "arm64":
|
||||
return ARCH_AARCH64
|
||||
case "ppc64le":
|
||||
return ARCH_PPC64LE
|
||||
case "s390x":
|
||||
return ARCH_S390X
|
||||
default:
|
||||
panic("unsupported architecture")
|
||||
}
|
||||
return FromString(runtimeGOARCH)
|
||||
}
|
||||
|
||||
func IsX86_64() bool {
|
||||
|
|
@ -82,3 +72,7 @@ func IsPPC() bool {
|
|||
func IsS390x() bool {
|
||||
return Current() == ARCH_S390X
|
||||
}
|
||||
|
||||
func IsRISCV64() bool {
|
||||
return Current() == ARCH_RISCV64
|
||||
}
|
||||
|
|
|
|||
146
vendor/github.com/osbuild/images/pkg/disk/disk.go
generated
vendored
146
vendor/github.com/osbuild/images/pkg/disk/disk.go
generated
vendored
|
|
@ -29,6 +29,7 @@ import (
|
|||
"slices"
|
||||
|
||||
"github.com/google/uuid"
|
||||
"github.com/osbuild/images/pkg/arch"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
@ -40,26 +41,29 @@ const (
|
|||
// rounded to the next MiB.
|
||||
DefaultGrainBytes = uint64(1048576) // 1 MiB
|
||||
|
||||
// UUIDs for GPT disks
|
||||
BIOSBootPartitionGUID = "21686148-6449-6E6F-744E-656564454649"
|
||||
BIOSBootPartitionUUID = "FAC7F1FB-3E8D-4137-A512-961DE09A5549"
|
||||
// GUIDs (partition types) for partitions on GPT disks
|
||||
// The SD_GPT name next to each constant is the partition type shown in
|
||||
// systemd-gpt-auto-generator(8) (if present)
|
||||
// See also
|
||||
// - https://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec/
|
||||
// - https://uapi-group.org/specifications/specs/discoverable_partitions_specification/
|
||||
BIOSBootPartitionGUID = "21686148-6449-6E6F-744E-656564454649"
|
||||
FilesystemDataGUID = "0FC63DAF-8483-4772-8E79-3D69D8477DE4" // SD_GPT_LINUX_GENERIC
|
||||
EFISystemPartitionGUID = "C12A7328-F81F-11D2-BA4B-00A0C93EC93B" // SD_GPT_ESP
|
||||
LVMPartitionGUID = "E6D6D379-F507-44C2-A23C-238F2A3DF928"
|
||||
PRePartitionGUID = "9E1A2D38-C612-4316-AA26-8B49521E5A8B"
|
||||
SwapPartitionGUID = "0657FD6D-A4AB-43C4-84E5-0933C84B4F4F" // SD_GPT_SWAP
|
||||
XBootLDRPartitionGUID = "BC13C2FF-59E6-4262-A352-B275FD6F7172" // SD_GPT_XBOOTLDR
|
||||
|
||||
FilesystemDataGUID = "0FC63DAF-8483-4772-8E79-3D69D8477DE4"
|
||||
FilesystemDataUUID = "CB07C243-BC44-4717-853E-28852021225B"
|
||||
RootPartitionX86_64GUID = "4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709" // SD_GPT_ROOT_X86_64
|
||||
RootPartitionAarch64GUID = "B921B045-1DF0-41C3-AF44-4C6F280D3FAE" // SD_GPT_ROOT_ARM64
|
||||
RootPartitionPpc64leGUID = "C31C45E6-3F39-412E-80FB-4809C4980599" // SD_GPT_ROOT_PPC64_LE
|
||||
RootPartitionS390xGUID = "5EEAD9A9-FE09-4A1E-A1D7-520D00531306" // SD_GPT_ROOT_S390X
|
||||
|
||||
EFISystemPartitionGUID = "C12A7328-F81F-11D2-BA4B-00A0C93EC93B"
|
||||
EFISystemPartitionUUID = "68B2905B-DF3E-4FB3-80FA-49D1E773AA33"
|
||||
EFIFilesystemUUID = "7B77-95E7"
|
||||
|
||||
LVMPartitionGUID = "E6D6D379-F507-44C2-A23C-238F2A3DF928"
|
||||
PRePartitionGUID = "9E1A2D38-C612-4316-AA26-8B49521E5A8B"
|
||||
|
||||
RootPartitionUUID = "6264D520-3FB9-423F-8AB8-7A0A8E3D3562"
|
||||
|
||||
SwapPartitionGUID = "0657FD6D-A4AB-43C4-84E5-0933C84B4F4F"
|
||||
|
||||
// Extended Boot Loader Partition
|
||||
XBootLDRPartitionGUID = "BC13C2FF-59E6-4262-A352-B275FD6F7172"
|
||||
UsrPartitionX86_64GUID = "8484680C-9521-48C6-9C11-B0720656F69E" // SD_GPT_USR_X86_64
|
||||
UsrPartitionAarch64GUID = "B0E01050-EE5F-4390-949A-9101B17104E9" // SD_GPT_USR_ARM64
|
||||
UsrPartitionPpc64leGUID = "15BB03AF-77E7-4D4A-B12B-C0D084F7491C" // SD_GPT_USR_PPC64_LE
|
||||
UsrPartitionS390xGUID = "8A4F5770-50AA-4ED3-874A-99B710DB6FEA" // SD_GPT_USR_S390X
|
||||
|
||||
// Partition type IDs for DOS disks
|
||||
|
||||
|
|
@ -86,38 +90,88 @@ const (
|
|||
|
||||
// Partition type ID for PRep on dos
|
||||
PRepPartitionDOSID = "41"
|
||||
|
||||
// static UUIDs for partitions and filesystems
|
||||
// NOTE(akoutsou): These are unnecessary and have stuck around since the
|
||||
// beginning where (I believe) the goal was to have predictable,
|
||||
// reproducible partition tables. They might be removed soon in favour of
|
||||
// proper, random UUIDs, with reproducibility being controlled by fixing
|
||||
// rng seeds.
|
||||
BIOSBootPartitionUUID = "FAC7F1FB-3E8D-4137-A512-961DE09A5549"
|
||||
RootPartitionUUID = "6264D520-3FB9-423F-8AB8-7A0A8E3D3562"
|
||||
DataPartitionUUID = "CB07C243-BC44-4717-853E-28852021225B"
|
||||
EFISystemPartitionUUID = "68B2905B-DF3E-4FB3-80FA-49D1E773AA33"
|
||||
|
||||
EFIFilesystemUUID = "7B77-95E7"
|
||||
)
|
||||
|
||||
// pt type -> type -> ID mapping for convenience
|
||||
var idMap = map[PartitionTableType]map[string]string{
|
||||
PT_DOS: {
|
||||
"bios": BIOSBootPartitionDOSID,
|
||||
"boot": FilesystemLinuxDOSID,
|
||||
"data": FilesystemLinuxDOSID,
|
||||
"esp": EFISystemPartitionDOSID,
|
||||
"lvm": LVMPartitionDOSID,
|
||||
"swap": SwapPartitionDOSID,
|
||||
},
|
||||
PT_GPT: {
|
||||
"bios": BIOSBootPartitionGUID,
|
||||
"boot": XBootLDRPartitionGUID,
|
||||
"data": FilesystemDataGUID,
|
||||
"esp": EFISystemPartitionGUID,
|
||||
"lvm": LVMPartitionGUID,
|
||||
"swap": SwapPartitionGUID,
|
||||
},
|
||||
}
|
||||
|
||||
func getPartitionTypeIDfor(ptType PartitionTableType, partTypeName string) (string, error) {
|
||||
ptMap, ok := idMap[ptType]
|
||||
if !ok {
|
||||
func getPartitionTypeIDfor(ptType PartitionTableType, partTypeName string, architecture arch.Arch) (string, error) {
|
||||
switch ptType {
|
||||
case PT_DOS:
|
||||
switch partTypeName {
|
||||
case "bios":
|
||||
return BIOSBootPartitionDOSID, nil
|
||||
case "data", "boot", "root", "usr":
|
||||
return FilesystemLinuxDOSID, nil
|
||||
case "esp":
|
||||
return EFISystemPartitionDOSID, nil
|
||||
case "lvm":
|
||||
return LVMPartitionDOSID, nil
|
||||
case "swap":
|
||||
return SwapPartitionDOSID, nil
|
||||
default:
|
||||
return "", fmt.Errorf("unknown or unsupported partition type name: %s", partTypeName)
|
||||
}
|
||||
case PT_GPT:
|
||||
switch partTypeName {
|
||||
case "bios":
|
||||
return BIOSBootPartitionGUID, nil
|
||||
case "boot":
|
||||
return XBootLDRPartitionGUID, nil
|
||||
case "data":
|
||||
return FilesystemDataGUID, nil
|
||||
case "esp":
|
||||
return EFISystemPartitionGUID, nil
|
||||
case "lvm":
|
||||
return LVMPartitionGUID, nil
|
||||
case "swap":
|
||||
return SwapPartitionGUID, nil
|
||||
case "root":
|
||||
switch architecture {
|
||||
case arch.ARCH_X86_64:
|
||||
return RootPartitionX86_64GUID, nil
|
||||
case arch.ARCH_AARCH64:
|
||||
return RootPartitionAarch64GUID, nil
|
||||
case arch.ARCH_PPC64LE:
|
||||
return RootPartitionPpc64leGUID, nil
|
||||
case arch.ARCH_S390X:
|
||||
return RootPartitionS390xGUID, nil
|
||||
case arch.ARCH_UNSET:
|
||||
return "", fmt.Errorf("architecture must be specified for selecting GUID for %q partition", partTypeName)
|
||||
default:
|
||||
return "", fmt.Errorf("unknown or unsupported architecture enum value: %d", architecture)
|
||||
}
|
||||
case "usr":
|
||||
switch architecture {
|
||||
case arch.ARCH_X86_64:
|
||||
return UsrPartitionX86_64GUID, nil
|
||||
case arch.ARCH_AARCH64:
|
||||
return UsrPartitionAarch64GUID, nil
|
||||
case arch.ARCH_PPC64LE:
|
||||
return UsrPartitionPpc64leGUID, nil
|
||||
case arch.ARCH_S390X:
|
||||
return UsrPartitionS390xGUID, nil
|
||||
case arch.ARCH_UNSET:
|
||||
return "", fmt.Errorf("architecture must be specified for selecting GUID for %q partition", partTypeName)
|
||||
default:
|
||||
return "", fmt.Errorf("unknown or unsupported architecture enum value: %d", architecture)
|
||||
}
|
||||
default:
|
||||
return "", fmt.Errorf("unknown or unsupported partition type name: %s", partTypeName)
|
||||
}
|
||||
default:
|
||||
return "", fmt.Errorf("unknown or unsupported partition table enum: %d", ptType)
|
||||
}
|
||||
id, ok := ptMap[partTypeName]
|
||||
if !ok {
|
||||
return "", fmt.Errorf("unknown or unsupported partition type name: %s", partTypeName)
|
||||
}
|
||||
return id, nil
|
||||
}
|
||||
|
||||
// FSType is the filesystem type enum.
|
||||
|
|
|
|||
39
vendor/github.com/osbuild/images/pkg/disk/partition_table.go
generated
vendored
39
vendor/github.com/osbuild/images/pkg/disk/partition_table.go
generated
vendored
|
|
@ -7,6 +7,7 @@ import (
|
|||
|
||||
"github.com/google/uuid"
|
||||
|
||||
"github.com/osbuild/images/pkg/arch"
|
||||
"github.com/osbuild/images/pkg/blueprint"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/platform"
|
||||
|
|
@ -97,7 +98,7 @@ const (
|
|||
// containing the root filesystem is grown to fill any left over space on the
|
||||
// partition table. Logical Volumes are not grown to fill the space in the
|
||||
// Volume Group since they are trivial to grow on a live system.
|
||||
func NewPartitionTable(basePT *PartitionTable, mountpoints []blueprint.FilesystemCustomization, imageSize uint64, mode PartitioningMode, requiredSizes map[string]uint64, rng *rand.Rand) (*PartitionTable, error) {
|
||||
func NewPartitionTable(basePT *PartitionTable, mountpoints []blueprint.FilesystemCustomization, imageSize uint64, mode PartitioningMode, architecture arch.Arch, requiredSizes map[string]uint64, rng *rand.Rand) (*PartitionTable, error) {
|
||||
newPT := basePT.Clone().(*PartitionTable)
|
||||
|
||||
if basePT.features().LVM && (mode == RawPartitioningMode || mode == BtrfsPartitioningMode) {
|
||||
|
|
@ -126,7 +127,7 @@ func NewPartitionTable(basePT *PartitionTable, mountpoints []blueprint.Filesyste
|
|||
return nil, err
|
||||
}
|
||||
} else if ensureBtrfs {
|
||||
err := newPT.ensureBtrfs()
|
||||
err := newPT.ensureBtrfs(architecture)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -767,7 +768,7 @@ func (pt *PartitionTable) ensureLVM() error {
|
|||
|
||||
// ensureBtrfs will ensure that the root partition is on a btrfs subvolume, i.e. if
|
||||
// it currently is not, it will wrap it in one
|
||||
func (pt *PartitionTable) ensureBtrfs() error {
|
||||
func (pt *PartitionTable) ensureBtrfs(architecture arch.Arch) error {
|
||||
|
||||
rootPath := entityPath(pt, "/")
|
||||
if rootPath == nil {
|
||||
|
|
@ -823,7 +824,7 @@ func (pt *PartitionTable) ensureBtrfs() error {
|
|||
// reset the btrfs partition size - it will be grown later
|
||||
part.Size = 0
|
||||
|
||||
part.Type, err = getPartitionTypeIDfor(pt.Type, "data")
|
||||
part.Type, err = getPartitionTypeIDfor(pt.Type, "root", architecture)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error converting partition table to btrfs: %w", err)
|
||||
}
|
||||
|
|
@ -942,7 +943,7 @@ func (pt *PartitionTable) GetMountpointSize(mountpoint string) (uint64, error) {
|
|||
// - At the end of the plain partitions.
|
||||
//
|
||||
// For LVM and Plain, the fsType argument must be a valid filesystem type.
|
||||
func EnsureRootFilesystem(pt *PartitionTable, defaultFsType FSType) error {
|
||||
func EnsureRootFilesystem(pt *PartitionTable, defaultFsType FSType, architecture arch.Arch) error {
|
||||
// collect all labels and subvolume names to avoid conflicts
|
||||
subvolNames := make(map[string]bool)
|
||||
labels := make(map[string]bool)
|
||||
|
|
@ -1015,7 +1016,7 @@ func EnsureRootFilesystem(pt *PartitionTable, defaultFsType FSType) error {
|
|||
return fmt.Errorf("error creating root partition: %w", err)
|
||||
}
|
||||
|
||||
partType, err := getPartitionTypeIDfor(pt.Type, "data")
|
||||
partType, err := getPartitionTypeIDfor(pt.Type, "root", architecture)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error creating root partition: %w", err)
|
||||
}
|
||||
|
|
@ -1053,7 +1054,7 @@ func addBootPartition(pt *PartitionTable, bootFsType FSType) error {
|
|||
return fmt.Errorf("error creating boot partition: %w", err)
|
||||
}
|
||||
|
||||
partType, err := getPartitionTypeIDfor(pt.Type, "boot")
|
||||
partType, err := getPartitionTypeIDfor(pt.Type, "boot", arch.ARCH_UNSET)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error creating boot partition: %w", err)
|
||||
}
|
||||
|
|
@ -1117,7 +1118,7 @@ func addPartitionsForBootMode(pt *PartitionTable, bootMode platform.BootMode) er
|
|||
}
|
||||
|
||||
func mkBIOSBoot(ptType PartitionTableType) (Partition, error) {
|
||||
partType, err := getPartitionTypeIDfor(ptType, "bios")
|
||||
partType, err := getPartitionTypeIDfor(ptType, "bios", arch.ARCH_UNSET)
|
||||
if err != nil {
|
||||
return Partition{}, fmt.Errorf("error creating BIOS boot partition: %w", err)
|
||||
}
|
||||
|
|
@ -1130,7 +1131,7 @@ func mkBIOSBoot(ptType PartitionTableType) (Partition, error) {
|
|||
}
|
||||
|
||||
func mkESP(size uint64, ptType PartitionTableType) (Partition, error) {
|
||||
partType, err := getPartitionTypeIDfor(ptType, "esp")
|
||||
partType, err := getPartitionTypeIDfor(ptType, "esp", arch.ARCH_UNSET)
|
||||
if err != nil {
|
||||
return Partition{}, fmt.Errorf("error creating EFI system partition: %w", err)
|
||||
}
|
||||
|
|
@ -1151,7 +1152,7 @@ func mkESP(size uint64, ptType PartitionTableType) (Partition, error) {
|
|||
}
|
||||
|
||||
type CustomPartitionTableOptions struct {
|
||||
// PartitionTableType must be either "dos" or "gpt". Defaults to "gpt".
|
||||
// PartitionTableType must be either PT_DOS or PT_GPT. Defaults to PT_GPT.
|
||||
PartitionTableType PartitionTableType
|
||||
|
||||
// BootMode determines the types of boot-related partitions that are
|
||||
|
|
@ -1176,6 +1177,12 @@ type CustomPartitionTableOptions struct {
|
|||
// mountpoint's partition is the sum of all the required directory sizes it
|
||||
// will contain.
|
||||
RequiredMinSizes map[string]uint64
|
||||
|
||||
// Architecture of the hardware that will use the partition table. This is
|
||||
// used to select appropriate partition types for GPT formatted disks to
|
||||
// enable automatic discovery. It has no effect and is not required when
|
||||
// the PartitionTableType is PT_DOS.
|
||||
Architecture arch.Arch
|
||||
}
|
||||
|
||||
// Returns the default filesystem type if the fstype is empty. If both are
|
||||
|
|
@ -1283,7 +1290,7 @@ func NewCustomPartitionTable(customizations *blueprint.DiskCustomization, option
|
|||
}
|
||||
}
|
||||
|
||||
if err := EnsureRootFilesystem(pt, options.DefaultFSType); err != nil {
|
||||
if err := EnsureRootFilesystem(pt, options.DefaultFSType, options.Architecture); err != nil {
|
||||
return nil, fmt.Errorf("%s %w", errPrefix, err)
|
||||
}
|
||||
|
||||
|
|
@ -1316,6 +1323,10 @@ func addPlainPartition(pt *PartitionTable, partition blueprint.PartitionCustomiz
|
|||
// all user-defined partitions are data partitions except boot and swap
|
||||
var typeName string
|
||||
switch {
|
||||
case partition.Mountpoint == "/":
|
||||
typeName = "root"
|
||||
case partition.Mountpoint == "/usr":
|
||||
typeName = "usr"
|
||||
case partition.Mountpoint == "/boot":
|
||||
typeName = "boot"
|
||||
case fstype == "swap":
|
||||
|
|
@ -1324,7 +1335,7 @@ func addPlainPartition(pt *PartitionTable, partition blueprint.PartitionCustomiz
|
|||
typeName = "data"
|
||||
}
|
||||
|
||||
partType, err := getPartitionTypeIDfor(pt.Type, typeName)
|
||||
partType, err := getPartitionTypeIDfor(pt.Type, typeName, options.Architecture)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error getting partition type ID for %q: %w", partition.Mountpoint, err)
|
||||
}
|
||||
|
|
@ -1408,7 +1419,7 @@ func addLVMPartition(pt *PartitionTable, partition blueprint.PartitionCustomizat
|
|||
}
|
||||
|
||||
// create partition for volume group
|
||||
partType, err := getPartitionTypeIDfor(pt.Type, "lvm")
|
||||
partType, err := getPartitionTypeIDfor(pt.Type, "lvm", arch.ARCH_UNSET)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error creating lvm partition %q: %w", vgname, err)
|
||||
}
|
||||
|
|
@ -1437,7 +1448,7 @@ func addBtrfsPartition(pt *PartitionTable, partition blueprint.PartitionCustomiz
|
|||
}
|
||||
|
||||
// create partition for btrfs volume
|
||||
partType, err := getPartitionTypeIDfor(pt.Type, "data")
|
||||
partType, err := getPartitionTypeIDfor(pt.Type, "data", arch.ARCH_UNSET)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error creating btrfs partition: %w", err)
|
||||
}
|
||||
|
|
|
|||
31
vendor/github.com/osbuild/images/pkg/distro/fedora/distro.go
generated
vendored
31
vendor/github.com/osbuild/images/pkg/distro/fedora/distro.go
generated
vendored
|
|
@ -475,6 +475,18 @@ var defaultDistroImageConfig = &distro.ImageConfig{
|
|||
DefaultOSCAPDatastream: common.ToPtr(oscap.DefaultFedoraDatastream()),
|
||||
}
|
||||
|
||||
func defaultDistroInstallerConfig(d *distribution) *distro.InstallerConfig {
|
||||
config := distro.InstallerConfig{}
|
||||
// In Fedora 42 the ifcfg module was replaced by net-lib.
|
||||
if common.VersionLessThan(d.osVersion, "42") {
|
||||
config.AdditionalDracutModules = append(config.AdditionalDracutModules, "ifcfg")
|
||||
} else {
|
||||
config.AdditionalDracutModules = append(config.AdditionalDracutModules, "net-lib")
|
||||
}
|
||||
|
||||
return &config
|
||||
}
|
||||
|
||||
func getISOLabelFunc(variant string) isoLabelFunc {
|
||||
const ISO_LABEL = "%s-%s-%s-%s"
|
||||
|
||||
|
|
@ -646,6 +658,11 @@ func newDistro(version int) distro.Distro {
|
|||
name: arch.ARCH_S390X.String(),
|
||||
}
|
||||
|
||||
riscv64 := architecture{
|
||||
name: arch.ARCH_RISCV64.String(),
|
||||
distro: &rd,
|
||||
}
|
||||
|
||||
ociImgType := qcow2ImgType
|
||||
ociImgType.name = "oci"
|
||||
|
||||
|
|
@ -746,6 +763,12 @@ func newDistro(version int) distro.Distro {
|
|||
containerImgType,
|
||||
wslImgType,
|
||||
)
|
||||
|
||||
// add distro installer configuration to all installer types
|
||||
distroInstallerConfig := defaultDistroInstallerConfig(&rd)
|
||||
liveInstallerImgType.defaultInstallerConfig = distroInstallerConfig
|
||||
imageInstallerImgType.defaultInstallerConfig = distroInstallerConfig
|
||||
iotInstallerImgType.defaultInstallerConfig = distroInstallerConfig
|
||||
x86_64.addImageTypes(
|
||||
&platform.X86{
|
||||
BasePlatform: platform.BasePlatform{
|
||||
|
|
@ -907,6 +930,7 @@ func newDistro(version int) distro.Distro {
|
|||
minimalrawImgType,
|
||||
)
|
||||
|
||||
iotSimplifiedInstallerImgType.defaultInstallerConfig = distroInstallerConfig
|
||||
x86_64.addImageTypes(
|
||||
&platform.X86{
|
||||
BasePlatform: platform.BasePlatform{
|
||||
|
|
@ -1039,7 +1063,12 @@ func newDistro(version int) distro.Distro {
|
|||
containerImgType,
|
||||
)
|
||||
|
||||
rd.addArches(x86_64, aarch64, ppc64le, s390x)
|
||||
riscv64.addImageTypes(
|
||||
&platform.RISCV64{},
|
||||
containerImgType,
|
||||
)
|
||||
|
||||
rd.addArches(x86_64, aarch64, ppc64le, s390x, riscv64)
|
||||
return &rd
|
||||
}
|
||||
|
||||
|
|
|
|||
40
vendor/github.com/osbuild/images/pkg/distro/fedora/images.go
generated
vendored
40
vendor/github.com/osbuild/images/pkg/distro/fedora/images.go
generated
vendored
|
|
@ -411,6 +411,16 @@ func liveInstallerImage(workload workload.Workload,
|
|||
img.Locale = *locale
|
||||
}
|
||||
|
||||
installerConfig, err := t.getDefaultInstallerConfig()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if installerConfig != nil {
|
||||
img.AdditionalDracutModules = append(img.AdditionalDracutModules, installerConfig.AdditionalDracutModules...)
|
||||
img.AdditionalDrivers = append(img.AdditionalDrivers, installerConfig.AdditionalDrivers...)
|
||||
}
|
||||
|
||||
return img, nil
|
||||
}
|
||||
|
||||
|
|
@ -464,6 +474,16 @@ func imageInstallerImage(workload workload.Workload,
|
|||
|
||||
img.ExtraBasePackages = packageSets[installerPkgsKey]
|
||||
|
||||
installerConfig, err := t.getDefaultInstallerConfig()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if installerConfig != nil {
|
||||
img.AdditionalDracutModules = append(img.AdditionalDracutModules, installerConfig.AdditionalDracutModules...)
|
||||
img.AdditionalDrivers = append(img.AdditionalDrivers, installerConfig.AdditionalDrivers...)
|
||||
}
|
||||
|
||||
d := t.arch.distro
|
||||
|
||||
img.Product = d.product
|
||||
|
|
@ -671,6 +691,16 @@ func iotInstallerImage(workload workload.Workload,
|
|||
anaconda.ModuleUsers,
|
||||
}...)
|
||||
|
||||
installerConfig, err := t.getDefaultInstallerConfig()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if installerConfig != nil {
|
||||
img.AdditionalDracutModules = append(img.AdditionalDracutModules, installerConfig.AdditionalDracutModules...)
|
||||
img.AdditionalDrivers = append(img.AdditionalDrivers, installerConfig.AdditionalDrivers...)
|
||||
}
|
||||
|
||||
img.Product = d.product
|
||||
img.Variant = "IoT"
|
||||
img.OSVersion = d.osVersion
|
||||
|
|
@ -794,6 +824,16 @@ func iotSimplifiedInstallerImage(workload workload.Workload,
|
|||
}
|
||||
}
|
||||
|
||||
installerConfig, err := t.getDefaultInstallerConfig()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if installerConfig != nil {
|
||||
img.AdditionalDracutModules = append(img.AdditionalDracutModules, installerConfig.AdditionalDracutModules...)
|
||||
img.AdditionalDrivers = append(img.AdditionalDrivers, installerConfig.AdditionalDrivers...)
|
||||
}
|
||||
|
||||
img.AdditionalDracutModules = append(img.AdditionalDracutModules, "dbus-broker")
|
||||
|
||||
d := t.arch.distro
|
||||
|
|
|
|||
48
vendor/github.com/osbuild/images/pkg/distro/fedora/imagetype.go
generated
vendored
48
vendor/github.com/osbuild/images/pkg/distro/fedora/imagetype.go
generated
vendored
|
|
@ -30,24 +30,25 @@ type packageSetFunc func(t *imageType) rpmmd.PackageSet
|
|||
type isoLabelFunc func(t *imageType) string
|
||||
|
||||
type imageType struct {
|
||||
arch *architecture
|
||||
platform platform.Platform
|
||||
environment environment.Environment
|
||||
workload workload.Workload
|
||||
name string
|
||||
nameAliases []string
|
||||
filename string
|
||||
compression string
|
||||
mimeType string
|
||||
packageSets map[string]packageSetFunc
|
||||
defaultImageConfig *distro.ImageConfig
|
||||
kernelOptions string
|
||||
defaultSize uint64
|
||||
buildPipelines []string
|
||||
payloadPipelines []string
|
||||
exports []string
|
||||
image imageFunc
|
||||
isoLabel isoLabelFunc
|
||||
arch *architecture
|
||||
platform platform.Platform
|
||||
environment environment.Environment
|
||||
workload workload.Workload
|
||||
name string
|
||||
nameAliases []string
|
||||
filename string
|
||||
compression string
|
||||
mimeType string
|
||||
packageSets map[string]packageSetFunc
|
||||
defaultImageConfig *distro.ImageConfig
|
||||
defaultInstallerConfig *distro.InstallerConfig
|
||||
kernelOptions string
|
||||
defaultSize uint64
|
||||
buildPipelines []string
|
||||
payloadPipelines []string
|
||||
exports []string
|
||||
image imageFunc
|
||||
isoLabel isoLabelFunc
|
||||
|
||||
// bootISO: installable ISO
|
||||
bootISO bool
|
||||
|
|
@ -166,6 +167,7 @@ func (t *imageType) getPartitionTable(
|
|||
BootMode: t.BootMode(),
|
||||
DefaultFSType: disk.FS_EXT4, // default fs type for Fedora
|
||||
RequiredMinSizes: t.requiredPartitionSizes,
|
||||
Architecture: t.platform.GetArch(),
|
||||
}
|
||||
return disk.NewCustomPartitionTable(partitioning, partOptions, rng)
|
||||
}
|
||||
|
|
@ -182,7 +184,7 @@ func (t *imageType) getPartitionTable(
|
|||
}
|
||||
|
||||
mountpoints := customizations.GetFilesystems()
|
||||
return disk.NewPartitionTable(&basePartitionTable, mountpoints, imageSize, partitioningMode, t.requiredPartitionSizes, rng)
|
||||
return disk.NewPartitionTable(&basePartitionTable, mountpoints, imageSize, partitioningMode, t.platform.GetArch(), t.requiredPartitionSizes, rng)
|
||||
}
|
||||
|
||||
func (t *imageType) getDefaultImageConfig() *distro.ImageConfig {
|
||||
|
|
@ -195,6 +197,14 @@ func (t *imageType) getDefaultImageConfig() *distro.ImageConfig {
|
|||
|
||||
}
|
||||
|
||||
func (t *imageType) getDefaultInstallerConfig() (*distro.InstallerConfig, error) {
|
||||
if !t.bootISO {
|
||||
return nil, fmt.Errorf("image type %q is not an ISO", t.name)
|
||||
}
|
||||
|
||||
return t.defaultInstallerConfig, nil
|
||||
}
|
||||
|
||||
func (t *imageType) PartitionType() disk.PartitionTableType {
|
||||
basePartitionTable, exists := t.basePartitionTables[t.arch.Name()]
|
||||
if !exists {
|
||||
|
|
|
|||
12
vendor/github.com/osbuild/images/pkg/distro/fedora/partition_tables.go
generated
vendored
12
vendor/github.com/osbuild/images/pkg/distro/fedora/partition_tables.go
generated
vendored
|
|
@ -35,7 +35,7 @@ var defaultBasePartitionTables = distro.BasePartitionTableMap{
|
|||
{
|
||||
Size: 500 * datasizes.MebiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "ext4",
|
||||
Mountpoint: "/boot",
|
||||
|
|
@ -81,7 +81,7 @@ var defaultBasePartitionTables = distro.BasePartitionTableMap{
|
|||
{
|
||||
Size: 500 * datasizes.MebiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "ext4",
|
||||
Mountpoint: "/boot",
|
||||
|
|
@ -192,7 +192,7 @@ var minimalrawPartitionTables = distro.BasePartitionTableMap{
|
|||
{
|
||||
Size: 1 * datasizes.GibiByte,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "ext4",
|
||||
Mountpoint: "/boot",
|
||||
|
|
@ -287,7 +287,7 @@ var iotBasePartitionTables = distro.BasePartitionTableMap{
|
|||
{
|
||||
Size: 1 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "ext4",
|
||||
Mountpoint: "/boot",
|
||||
|
|
@ -381,7 +381,7 @@ var iotSimplifiedInstallerPartitionTables = distro.BasePartitionTableMap{
|
|||
{
|
||||
Size: 1 * datasizes.GibiByte,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "ext4",
|
||||
Mountpoint: "/boot",
|
||||
|
|
@ -451,7 +451,7 @@ var iotSimplifiedInstallerPartitionTables = distro.BasePartitionTableMap{
|
|||
{
|
||||
Size: 1 * datasizes.GibiByte,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "ext4",
|
||||
Mountpoint: "/boot",
|
||||
|
|
|
|||
11
vendor/github.com/osbuild/images/pkg/distro/rhel/images.go
generated
vendored
11
vendor/github.com/osbuild/images/pkg/distro/rhel/images.go
generated
vendored
|
|
@ -506,8 +506,8 @@ func EdgeInstallerImage(workload workload.Workload,
|
|||
}
|
||||
|
||||
if installerConfig != nil {
|
||||
img.AdditionalDracutModules = installerConfig.AdditionalDracutModules
|
||||
img.AdditionalDrivers = installerConfig.AdditionalDrivers
|
||||
img.AdditionalDracutModules = append(img.AdditionalDracutModules, installerConfig.AdditionalDracutModules...)
|
||||
img.AdditionalDrivers = append(img.AdditionalDrivers, installerConfig.AdditionalDrivers...)
|
||||
}
|
||||
|
||||
instCust, err := customizations.GetInstaller()
|
||||
|
|
@ -660,7 +660,8 @@ func EdgeSimplifiedInstallerImage(workload workload.Workload,
|
|||
}
|
||||
|
||||
if installerConfig != nil {
|
||||
img.AdditionalDracutModules = installerConfig.AdditionalDracutModules
|
||||
img.AdditionalDracutModules = append(img.AdditionalDracutModules, installerConfig.AdditionalDracutModules...)
|
||||
img.AdditionalDrivers = append(img.AdditionalDrivers, installerConfig.AdditionalDrivers...)
|
||||
}
|
||||
|
||||
return img, nil
|
||||
|
|
@ -706,8 +707,8 @@ func ImageInstallerImage(workload workload.Workload,
|
|||
}
|
||||
|
||||
if installerConfig != nil {
|
||||
img.AdditionalDracutModules = installerConfig.AdditionalDracutModules
|
||||
img.AdditionalDrivers = installerConfig.AdditionalDrivers
|
||||
img.AdditionalDracutModules = append(img.AdditionalDracutModules, installerConfig.AdditionalDracutModules...)
|
||||
img.AdditionalDrivers = append(img.AdditionalDrivers, installerConfig.AdditionalDrivers...)
|
||||
}
|
||||
|
||||
instCust, err := customizations.GetInstaller()
|
||||
|
|
|
|||
3
vendor/github.com/osbuild/images/pkg/distro/rhel/imagetype.go
generated
vendored
3
vendor/github.com/osbuild/images/pkg/distro/rhel/imagetype.go
generated
vendored
|
|
@ -217,11 +217,12 @@ func (t *ImageType) GetPartitionTable(
|
|||
BootMode: t.BootMode(),
|
||||
DefaultFSType: disk.FS_XFS, // default fs type for RHEL
|
||||
RequiredMinSizes: requiredDirectorySizes,
|
||||
Architecture: t.platform.GetArch(),
|
||||
}
|
||||
return disk.NewCustomPartitionTable(partitioning, partOptions, rng)
|
||||
}
|
||||
|
||||
return disk.NewPartitionTable(&basePartitionTable, customizations.GetFilesystems(), imageSize, options.PartitioningMode, nil, rng)
|
||||
return disk.NewPartitionTable(&basePartitionTable, customizations.GetFilesystems(), imageSize, options.PartitioningMode, t.platform.GetArch(), nil, rng)
|
||||
}
|
||||
|
||||
func (t *ImageType) getDefaultImageConfig() *distro.ImageConfig {
|
||||
|
|
|
|||
4
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/azure.go
generated
vendored
4
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/azure.go
generated
vendored
|
|
@ -202,7 +202,7 @@ func azureInternalBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, b
|
|||
{
|
||||
Size: 1 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
|
|
@ -312,7 +312,7 @@ func azureInternalBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, b
|
|||
{
|
||||
Size: 1 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
|
|
|
|||
1
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/bare_metal.go
generated
vendored
1
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/bare_metal.go
generated
vendored
|
|
@ -53,6 +53,7 @@ func mkImageInstallerImgType() *rhel.ImageType {
|
|||
"nvdimm", // non-volatile DIMM firmware (provides nfit, cuse, and nd_e820)
|
||||
"prefixdevname",
|
||||
"prefixdevname-tools",
|
||||
"net-lib",
|
||||
},
|
||||
AdditionalDrivers: []string{
|
||||
"ipmi_devintf",
|
||||
|
|
|
|||
2
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel7/azure.go
generated
vendored
2
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel7/azure.go
generated
vendored
|
|
@ -305,7 +305,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
{
|
||||
Size: 500 * datasizes.MebiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
|
|
|
|||
2
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel7/partition_tables.go
generated
vendored
2
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel7/partition_tables.go
generated
vendored
|
|
@ -37,7 +37,7 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
{
|
||||
Size: 500 * datasizes.MebiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
|
|
|
|||
4
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/azure.go
generated
vendored
4
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/azure.go
generated
vendored
|
|
@ -306,7 +306,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
{
|
||||
Size: 500 * datasizes.MebiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
|
|
@ -416,7 +416,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
{
|
||||
Size: 500 * datasizes.MebiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
|
|
|
|||
1
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/bare_metal.go
generated
vendored
1
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/bare_metal.go
generated
vendored
|
|
@ -32,6 +32,7 @@ func mkImageInstaller() *rhel.ImageType {
|
|||
AdditionalDracutModules: []string{
|
||||
"prefixdevname",
|
||||
"prefixdevname-tools",
|
||||
"ifcfg",
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
1
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/edge.go
generated
vendored
1
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/edge.go
generated
vendored
|
|
@ -130,6 +130,7 @@ func mkEdgeInstallerImgType(rd *rhel.Distribution) *rhel.ImageType {
|
|||
AdditionalDracutModules: []string{
|
||||
"prefixdevname",
|
||||
"prefixdevname-tools",
|
||||
"ifcfg",
|
||||
},
|
||||
}
|
||||
it.RPMOSTree = true
|
||||
|
|
|
|||
6
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/partition_tables.go
generated
vendored
6
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/partition_tables.go
generated
vendored
|
|
@ -161,7 +161,7 @@ func edgeBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
{
|
||||
Size: 384 * datasizes.MebiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
|
|
@ -224,7 +224,7 @@ func edgeBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
{
|
||||
Size: 384 * datasizes.MebiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
|
|
@ -373,7 +373,7 @@ func ec2PartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
{
|
||||
Size: aarch64BootSize,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
|
|
|
|||
4
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/azure.go
generated
vendored
4
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/azure.go
generated
vendored
|
|
@ -215,7 +215,7 @@ func azureInternalBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, b
|
|||
{
|
||||
Size: bootSize,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
|
|
@ -324,7 +324,7 @@ func azureInternalBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, b
|
|||
{
|
||||
Size: bootSize,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
|
|
|
|||
1
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/bare_metal.go
generated
vendored
1
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/bare_metal.go
generated
vendored
|
|
@ -54,6 +54,7 @@ func mkImageInstallerImgType() *rhel.ImageType {
|
|||
"nvdimm", // non-volatile DIMM firmware (provides nfit, cuse, and nd_e820)
|
||||
"prefixdevname",
|
||||
"prefixdevname-tools",
|
||||
"ifcfg",
|
||||
},
|
||||
AdditionalDrivers: []string{
|
||||
"cuse",
|
||||
|
|
|
|||
9
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/edge.go
generated
vendored
9
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/edge.go
generated
vendored
|
|
@ -148,6 +148,7 @@ func mkEdgeInstallerImgType() *rhel.ImageType {
|
|||
"nvdimm", // non-volatile DIMM firmware (provides nfit, cuse, and nd_e820)
|
||||
"prefixdevname",
|
||||
"prefixdevname-tools",
|
||||
"ifcfg",
|
||||
},
|
||||
AdditionalDrivers: []string{
|
||||
"cuse",
|
||||
|
|
@ -393,7 +394,7 @@ func minimalrawPartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
{
|
||||
Size: bootSize,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
|
|
@ -441,7 +442,7 @@ func minimalrawPartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
{
|
||||
Size: bootSize,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
|
|
@ -501,7 +502,7 @@ func edgeBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
{
|
||||
Size: 384 * datasizes.MebiByte,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
|
|
@ -572,7 +573,7 @@ func edgeBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
{
|
||||
Size: 384 * datasizes.MebiByte,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
|
|
|
|||
6
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/partition_tables.go
generated
vendored
6
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/partition_tables.go
generated
vendored
|
|
@ -41,7 +41,7 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
{
|
||||
Size: bootSize,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
|
|
@ -94,7 +94,7 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
{
|
||||
Size: bootSize,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
|
|
@ -141,7 +141,7 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
{
|
||||
Size: bootSize,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
|
|
|
|||
10
vendor/github.com/osbuild/images/pkg/image/anaconda_container_installer.go
generated
vendored
10
vendor/github.com/osbuild/images/pkg/image/anaconda_container_installer.go
generated
vendored
|
|
@ -38,11 +38,13 @@ type AnacondaContainerInstaller struct {
|
|||
|
||||
Filename string
|
||||
|
||||
AdditionalDracutModules []string
|
||||
AdditionalAnacondaModules []string
|
||||
DisabledAnacondaModules []string
|
||||
AdditionalDrivers []string
|
||||
FIPS bool
|
||||
|
||||
AdditionalDracutModules []string
|
||||
AdditionalDrivers []string
|
||||
|
||||
FIPS bool
|
||||
|
||||
Kickstart *kickstart.Options
|
||||
|
||||
|
|
@ -92,7 +94,6 @@ func (img *AnacondaContainerInstaller) InstantiateManifest(m *manifest.Manifest,
|
|||
anacondaPipeline.Variant = img.Variant
|
||||
anacondaPipeline.Biosdevname = (img.Platform.GetArch() == arch.ARCH_X86_64)
|
||||
anacondaPipeline.Checkpoint()
|
||||
anacondaPipeline.AdditionalDracutModules = img.AdditionalDracutModules
|
||||
anacondaPipeline.AdditionalAnacondaModules = img.AdditionalAnacondaModules
|
||||
anacondaPipeline.DisabledAnacondaModules = img.DisabledAnacondaModules
|
||||
if img.FIPS {
|
||||
|
|
@ -101,6 +102,7 @@ func (img *AnacondaContainerInstaller) InstantiateManifest(m *manifest.Manifest,
|
|||
anaconda.ModuleSecurity,
|
||||
)
|
||||
}
|
||||
anacondaPipeline.AdditionalDracutModules = img.AdditionalDracutModules
|
||||
anacondaPipeline.AdditionalDrivers = img.AdditionalDrivers
|
||||
anacondaPipeline.Locale = img.Locale
|
||||
|
||||
|
|
|
|||
3
vendor/github.com/osbuild/images/pkg/image/anaconda_live_installer.go
generated
vendored
3
vendor/github.com/osbuild/images/pkg/image/anaconda_live_installer.go
generated
vendored
|
|
@ -40,6 +40,9 @@ type AnacondaLiveInstaller struct {
|
|||
// Locale for the installer. This should be set to the same locale as the
|
||||
// ISO OS payload, if known.
|
||||
Locale string
|
||||
|
||||
AdditionalDracutModules []string
|
||||
AdditionalDrivers []string
|
||||
}
|
||||
|
||||
func NewAnacondaLiveInstaller() *AnacondaLiveInstaller {
|
||||
|
|
|
|||
8
vendor/github.com/osbuild/images/pkg/image/anaconda_ostree_installer.go
generated
vendored
8
vendor/github.com/osbuild/images/pkg/image/anaconda_ostree_installer.go
generated
vendored
|
|
@ -42,11 +42,13 @@ type AnacondaOSTreeInstaller struct {
|
|||
|
||||
Filename string
|
||||
|
||||
AdditionalDracutModules []string
|
||||
AdditionalAnacondaModules []string
|
||||
DisabledAnacondaModules []string
|
||||
AdditionalDrivers []string
|
||||
FIPS bool
|
||||
|
||||
AdditionalDracutModules []string
|
||||
AdditionalDrivers []string
|
||||
|
||||
FIPS bool
|
||||
|
||||
// Uses the old, deprecated, Anaconda config option "kickstart-modules".
|
||||
// Only for RHEL 8.
|
||||
|
|
|
|||
5
vendor/github.com/osbuild/images/pkg/image/anaconda_tar_installer.go
generated
vendored
5
vendor/github.com/osbuild/images/pkg/image/anaconda_tar_installer.go
generated
vendored
|
|
@ -71,8 +71,9 @@ type AnacondaTarInstaller struct {
|
|||
AdditionalKernelOpts []string
|
||||
AdditionalAnacondaModules []string
|
||||
DisabledAnacondaModules []string
|
||||
AdditionalDracutModules []string
|
||||
AdditionalDrivers []string
|
||||
|
||||
AdditionalDracutModules []string
|
||||
AdditionalDrivers []string
|
||||
|
||||
// Uses the old, deprecated, Anaconda config option "kickstart-modules".
|
||||
// Only for RHEL 8.
|
||||
|
|
|
|||
2
vendor/github.com/osbuild/images/pkg/image/ostree_simplified_installer.go
generated
vendored
2
vendor/github.com/osbuild/images/pkg/image/ostree_simplified_installer.go
generated
vendored
|
|
@ -59,6 +59,7 @@ type OSTreeSimplifiedInstaller struct {
|
|||
IgnitionEmbedded *ignition.EmbeddedOptions
|
||||
|
||||
AdditionalDracutModules []string
|
||||
AdditionalDrivers []string
|
||||
}
|
||||
|
||||
func NewOSTreeSimplifiedInstaller(rawImage *OSTreeDiskImage, installDevice string) *OSTreeSimplifiedInstaller {
|
||||
|
|
@ -98,6 +99,7 @@ func (img *OSTreeSimplifiedInstaller) InstantiateManifest(m *manifest.Manifest,
|
|||
coiPipeline.Biosdevname = (img.Platform.GetArch() == arch.ARCH_X86_64)
|
||||
coiPipeline.Variant = img.Variant
|
||||
coiPipeline.AdditionalDracutModules = img.AdditionalDracutModules
|
||||
coiPipeline.AdditionalDrivers = img.AdditionalDrivers
|
||||
|
||||
var isoLabel string
|
||||
|
||||
|
|
|
|||
1
vendor/github.com/osbuild/images/pkg/manifest/anaconda_installer.go
generated
vendored
1
vendor/github.com/osbuild/images/pkg/manifest/anaconda_installer.go
generated
vendored
|
|
@ -422,7 +422,6 @@ func dracutStageOptions(kernelVer string, biosdevname bool, additionalModules []
|
|||
"convertfs",
|
||||
"network-manager",
|
||||
"network",
|
||||
"ifcfg",
|
||||
"url-lib",
|
||||
"drm",
|
||||
"plymouth",
|
||||
|
|
|
|||
9
vendor/github.com/osbuild/images/pkg/manifest/coreos_installer.go
generated
vendored
9
vendor/github.com/osbuild/images/pkg/manifest/coreos_installer.go
generated
vendored
|
|
@ -42,6 +42,7 @@ type CoreOSInstaller struct {
|
|||
Ignition *ignition.EmbeddedOptions
|
||||
|
||||
AdditionalDracutModules []string
|
||||
AdditionalDrivers []string
|
||||
}
|
||||
|
||||
// NewCoreOSInstaller creates an CoreOS installer pipeline object.
|
||||
|
|
@ -206,10 +207,12 @@ func (p *CoreOSInstaller) serialize() osbuild.Pipeline {
|
|||
if p.Biosdevname {
|
||||
dracutModules = append(dracutModules, "biosdevname")
|
||||
}
|
||||
drivers := p.AdditionalDrivers
|
||||
dracutStageOptions := &osbuild.DracutStageOptions{
|
||||
Kernel: []string{p.kernelVer},
|
||||
Modules: dracutModules,
|
||||
Install: []string{"/.buildstamp"},
|
||||
Kernel: []string{p.kernelVer},
|
||||
Modules: dracutModules,
|
||||
Install: []string{"/.buildstamp"},
|
||||
AddDrivers: drivers,
|
||||
}
|
||||
if p.FDO != nil && p.FDO.DiunPubKeyRootCerts != "" {
|
||||
pipeline.AddStage(osbuild.NewFDOStageForRootCerts(p.FDO.DiunPubKeyRootCerts))
|
||||
|
|
|
|||
7
vendor/github.com/osbuild/images/pkg/osbuild/osbuild-exec.go
generated
vendored
7
vendor/github.com/osbuild/images/pkg/osbuild/osbuild-exec.go
generated
vendored
|
|
@ -8,6 +8,8 @@ import (
|
|||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
)
|
||||
|
||||
// Run an instance of osbuild, returning a parsed osbuild.Result.
|
||||
|
|
@ -34,6 +36,11 @@ func RunOSBuild(manifest []byte, store, outputDirectory string, exports, checkpo
|
|||
cmd.Args = append(cmd.Args, "--checkpoint", checkpoint)
|
||||
}
|
||||
|
||||
if len(checkpoints) > 0 {
|
||||
// set the cache-max-size to a reasonable size that the checkpoints actually get stored
|
||||
cmd.Args = append(cmd.Args, "--cache-max-size", fmt.Sprint(20*datasizes.GiB))
|
||||
}
|
||||
|
||||
if result {
|
||||
cmd.Args = append(cmd.Args, "--json")
|
||||
cmd.Stdout = &stdoutBuffer
|
||||
|
|
|
|||
25
vendor/github.com/osbuild/images/pkg/platform/riscv64.go
generated
vendored
Normal file
25
vendor/github.com/osbuild/images/pkg/platform/riscv64.go
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
package platform
|
||||
|
||||
import (
|
||||
"github.com/osbuild/images/pkg/arch"
|
||||
)
|
||||
|
||||
type RISCV64 struct {
|
||||
BasePlatform
|
||||
}
|
||||
|
||||
func (p *RISCV64) GetArch() arch.Arch {
|
||||
return arch.ARCH_RISCV64
|
||||
}
|
||||
|
||||
func (p *RISCV64) GetPackages() []string {
|
||||
packages := p.BasePlatform.FirmwarePackages
|
||||
|
||||
return packages
|
||||
}
|
||||
|
||||
func (p *RISCV64) GetBuildPackages() []string {
|
||||
var packages []string
|
||||
|
||||
return packages
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue