go.mod: update osbuild/images to v0.141.0
tag v0.140.0 Tagger: imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> Changes with 0.140.0 ---------------- * Loader part override followups (osbuild/images#1466) * Author: Michael Vogt, Reviewers: Tomáš Hozza * RHEL-10/gce: install cloud-utils-growpart by default (osbuild/images#1463) * Author: Tomáš Hozza, Reviewers: Michael Vogt, Simon de Vlieger * base-host-check: expand to cover more (COMPOSER-2498) (osbuild/images#1432) * Author: Simon de Vlieger, Reviewers: Tomáš Hozza * rhel8,9: move partitioning into YAML (osbuild/images#1390) * Author: Michael Vogt, Reviewers: Tomáš Hozza — Somewhere on the Internet, 2025-04-28 --- tag v0.141.0 Tagger: imagebuilder-bot <imagebuilder-bots+imagebuilder-bot@redhat.com> Changes with 0.141.0 ---------------- * Shrink the current installer images a bit (osbuild/images#1423) * Author: Brian C. Lane, Reviewers: Achilleas Koutsou, Simon de Vlieger, Tomáš Hozza * Update EL10 Azure images with changes made in RHEL 9.6 (osbuild/images#1472) * Author: Achilleas Koutsou, Reviewers: Michael Vogt, Tomáš Hozza * distro: add DNFSetReleaseVerVar to ImageConfig (osbuild/images#1465) * Author: Michael Vogt, Reviewers: Achilleas Koutsou, Tomáš Hozza * test/base-host-check.sh: fix disabled firewall services check (osbuild/images#1471) * Author: Sanne Raymaekers, Reviewers: Achilleas Koutsou, Tomáš Hozza — Somewhere on the Internet, 2025-04-29 ---
This commit is contained in:
parent
7036e2bcb9
commit
84dfe7e21b
32 changed files with 1022 additions and 999 deletions
2
go.mod
2
go.mod
|
|
@ -45,7 +45,7 @@ require (
|
|||
github.com/openshift-online/ocm-sdk-go v0.1.438
|
||||
github.com/oracle/oci-go-sdk/v54 v54.0.0
|
||||
github.com/osbuild/blueprint v1.6.0
|
||||
github.com/osbuild/images v0.139.0
|
||||
github.com/osbuild/images v0.141.0
|
||||
github.com/osbuild/osbuild-composer/pkg/splunk_logger v0.0.0-20240814102216-0239db53236d
|
||||
github.com/osbuild/pulp-client v0.1.0
|
||||
github.com/prometheus/client_golang v1.20.5
|
||||
|
|
|
|||
4
go.sum
4
go.sum
|
|
@ -578,8 +578,8 @@ github.com/oracle/oci-go-sdk/v54 v54.0.0 h1:CDLjeSejv2aDpElAJrhKpi6zvT/zhZCZuXch
|
|||
github.com/oracle/oci-go-sdk/v54 v54.0.0/go.mod h1:+t+yvcFGVp+3ZnztnyxqXfQDsMlq8U25faBLa+mqCMc=
|
||||
github.com/osbuild/blueprint v1.6.0 h1:HUV1w/dMxpgqOgVtHhfTZE3zRmWQkuW/qTfx9smKImI=
|
||||
github.com/osbuild/blueprint v1.6.0/go.mod h1:0d3dlY8aSJ6jM6NHwBmJFF1VIySsp/GsDpcJQ0yrOqM=
|
||||
github.com/osbuild/images v0.139.0 h1:GAbWHI3F+z862d/4yvG+HPV3YesTghaqObhWikROjyU=
|
||||
github.com/osbuild/images v0.139.0/go.mod h1:CLuNhj3sO++pzzVzd2hkJ7L3rHzm6XY9zpm+0ERiY6A=
|
||||
github.com/osbuild/images v0.141.0 h1:lyhCxnMz5TQ3aO3wp5cF94HYI1JMAVq2O5UBIZGGBEI=
|
||||
github.com/osbuild/images v0.141.0/go.mod h1:CLuNhj3sO++pzzVzd2hkJ7L3rHzm6XY9zpm+0ERiY6A=
|
||||
github.com/osbuild/osbuild-composer/pkg/splunk_logger v0.0.0-20240814102216-0239db53236d h1:r9BFPDv0uuA9k1947Jybcxs36c/pTywWS1gjeizvtcQ=
|
||||
github.com/osbuild/osbuild-composer/pkg/splunk_logger v0.0.0-20240814102216-0239db53236d/go.mod h1:zR1iu/hOuf+OQNJlk70tju9IqzzM4ycq0ectkFBm94U=
|
||||
github.com/osbuild/pulp-client v0.1.0 h1:L0C4ezBJGTamN3BKdv+rKLuq/WxXJbsFwz/Hj7aEmJ8=
|
||||
|
|
|
|||
226
vendor/github.com/osbuild/images/pkg/distro/defs/fedora/distro.yaml
generated
vendored
226
vendor/github.com/osbuild/images/pkg/distro/defs/fedora/distro.yaml
generated
vendored
|
|
@ -35,52 +35,123 @@
|
|||
- &efi_system_partition_uuid "68B2905B-DF3E-4FB3-80FA-49D1E773AA33"
|
||||
- &efi_filesystem_uuid "7B77-95E7"
|
||||
|
||||
# the invidual partitions for easier composibility
|
||||
partitions:
|
||||
- &default_partition_table_part_bios
|
||||
size: 1_048_576 # 1 MiB
|
||||
bootable: true
|
||||
type: *bios_boot_partition_guid
|
||||
uuid: *bios_boot_partition_uuid
|
||||
- &default_partition_table_part_efi
|
||||
size: 209_715_200 # 200 MiB
|
||||
type: *efi_system_partition_guid
|
||||
uuid: *efi_system_partition_uuid
|
||||
payload_type: "filesystem"
|
||||
payload:
|
||||
type: vfat
|
||||
uuid: *efi_filesystem_uuid
|
||||
mountpoint: "/boot/efi"
|
||||
label: "EFI-SYSTEM"
|
||||
fstab_options: "defaults,uid=0,gid=0,umask=077,shortname=winnt"
|
||||
fstab_freq: 0
|
||||
fstab_passno: 2
|
||||
- &default_partition_table_part_boot
|
||||
size: 524_288_000 # 500 * MiB
|
||||
type: *filesystem_data_guid
|
||||
uuid: *data_partition_uuid
|
||||
payload_type: "filesystem"
|
||||
payload:
|
||||
type: "ext4"
|
||||
mountpoint: "/boot"
|
||||
label: "boot"
|
||||
fstab_options: "defaults"
|
||||
fstab_freq: 0
|
||||
fstab_passno: 0
|
||||
- &default_partition_table_part_root
|
||||
size: 2_147_483_648 # 2 * datasizes.GibiByte,
|
||||
type: *filesystem_data_guid
|
||||
uuid: *root_partition_uuid
|
||||
payload_type: "filesystem"
|
||||
payload: &default_partition_table_part_root_payload
|
||||
type: "ext4"
|
||||
label: "root"
|
||||
mountpoint: "/"
|
||||
fstab_options: "defaults"
|
||||
fstab_freq: 0
|
||||
fstab_passno: 0
|
||||
# iot partitions
|
||||
- &iot_base_partition_table_part_efi
|
||||
size: 525_336_576 # 501 * datasizes.MebiByte
|
||||
type: *efi_system_partition_guid
|
||||
uuid: *efi_system_partition_uuid
|
||||
payload_type: "filesystem"
|
||||
payload:
|
||||
type: vfat
|
||||
uuid: *efi_filesystem_uuid
|
||||
mountpoint: "/boot/efi"
|
||||
label: "EFI-SYSTEM"
|
||||
fstab_options: "umask=0077,shortname=winnt"
|
||||
fstab_freq: 0
|
||||
fstab_passno: 2
|
||||
- &iot_base_partition_table_part_boot
|
||||
size: 1_073_741_824 # 1 * datasizes.GibiByte,
|
||||
type: *filesystem_data_guid
|
||||
uuid: *data_partition_uuid
|
||||
payload_type: "filesystem"
|
||||
payload:
|
||||
type: "ext4"
|
||||
label: "boot"
|
||||
mountpoint: "/boot"
|
||||
fstab_options: "defaults"
|
||||
fstab_freq: 1
|
||||
fstab_passno: 2
|
||||
- &iot_base_partition_table_part_root
|
||||
size: 2_693_791_744 # 2569 * datasizes.MebiByte,
|
||||
type: *filesystem_data_guid
|
||||
uuid: *root_partition_uuid
|
||||
payload_type: "filesystem"
|
||||
payload: &iot_base_partition_table_part_root_payload
|
||||
type: "ext4"
|
||||
label: "root"
|
||||
mountpoint: "/"
|
||||
fstab_options: "defaults,ro"
|
||||
fstab_freq: 1
|
||||
fstab_passno: 1
|
||||
# identical to above but has "fstab_options"
|
||||
- &iot_base_partition_table_part_root_fstab_ro
|
||||
<<: *iot_base_partition_table_part_root
|
||||
payload:
|
||||
<<: *iot_base_partition_table_part_root_payload
|
||||
fstab_options: "defaults,ro"
|
||||
# minimal raw aarch64
|
||||
- &iot_base_partition_table_part_efi_aarch64
|
||||
<<: *iot_base_partition_table_part_efi
|
||||
bootable: true
|
||||
type: *fat16_bdosid
|
||||
uuid: ""
|
||||
- &iot_base_partition_table_part_boot_aarch64
|
||||
<<: *iot_base_partition_table_part_boot
|
||||
type: *filesystem_linux_dosid
|
||||
uuid: ""
|
||||
- &iot_base_partition_table_part_root_aarch64
|
||||
<<: *iot_base_partition_table_part_root
|
||||
type: *filesystem_linux_dosid
|
||||
uuid: ""
|
||||
- &iot_base_partition_table_part_root_fstab_ro_aarch64
|
||||
<<: *iot_base_partition_table_part_root_aarch64
|
||||
payload:
|
||||
<<: *iot_base_partition_table_part_root_payload
|
||||
fstab_options: "defaults,ro"
|
||||
|
||||
default_partition_tables: &default_partition_tables
|
||||
x86_64:
|
||||
uuid: "D209C89E-EA5E-4FBD-B161-B461CCE297E0"
|
||||
type: "gpt"
|
||||
partitions:
|
||||
- size: 1_048_576 # 1 MiB
|
||||
bootable: true
|
||||
type: *bios_boot_partition_guid
|
||||
uuid: *bios_boot_partition_uuid
|
||||
- &default_partition_table_part_efi
|
||||
size: 209_715_200 # 200 MiB
|
||||
type: *efi_system_partition_guid
|
||||
uuid: *efi_system_partition_uuid
|
||||
payload_type: "filesystem"
|
||||
payload:
|
||||
type: vfat
|
||||
uuid: *efi_filesystem_uuid
|
||||
mountpoint: "/boot/efi"
|
||||
label: "EFI-SYSTEM"
|
||||
fstab_options: "defaults,uid=0,gid=0,umask=077,shortname=winnt"
|
||||
fstab_freq: 0
|
||||
fstab_passno: 2
|
||||
- &default_partition_table_part_boot
|
||||
size: 524_288_000 # 500 * MiB
|
||||
type: *filesystem_data_guid
|
||||
uuid: *data_partition_uuid
|
||||
payload_type: "filesystem"
|
||||
payload:
|
||||
type: "ext4"
|
||||
mountpoint: "/boot"
|
||||
label: "boot"
|
||||
fstab_options: "defaults"
|
||||
fstab_freq: 0
|
||||
fstab_passno: 0
|
||||
- &default_partition_table_part_root
|
||||
size: 2_147_483_648 # 2 * datasizes.GibiByte,
|
||||
type: *filesystem_data_guid
|
||||
uuid: *root_partition_uuid
|
||||
payload_type: "filesystem"
|
||||
payload:
|
||||
type: "ext4"
|
||||
label: "root"
|
||||
mountpoint: "/"
|
||||
fstab_options: "defaults"
|
||||
fstab_freq: 0
|
||||
fstab_passno: 0
|
||||
- *default_partition_table_part_bios
|
||||
- *default_partition_table_part_efi
|
||||
- *default_partition_table_part_boot
|
||||
- *default_partition_table_part_root
|
||||
aarch64: &default_partition_table_aarch64
|
||||
uuid: "D209C89E-EA5E-4FBD-B161-B461CCE297E0"
|
||||
type: "gpt"
|
||||
|
|
@ -154,63 +225,22 @@
|
|||
riscv64: *minimal_raw_partition_table_aarch64
|
||||
|
||||
iot_base_partition_tables: &iot_base_partition_tables
|
||||
x86_64:
|
||||
x86_64: &iot_base_partition_table_x86_64
|
||||
uuid: "D209C89E-EA5E-4FBD-B161-B461CCE297E0"
|
||||
type: "gpt"
|
||||
start_offset: 8_388_608 # 8 * datasizes.MebiByte
|
||||
partitions:
|
||||
- &iot_base_partition_table_part_efi
|
||||
size: 525_336_576 # 501 * datasizes.MebiByte
|
||||
type: *efi_system_partition_guid
|
||||
uuid: *efi_system_partition_uuid
|
||||
payload_type: "filesystem"
|
||||
payload:
|
||||
type: vfat
|
||||
uuid: *efi_filesystem_uuid
|
||||
mountpoint: "/boot/efi"
|
||||
label: "EFI-SYSTEM"
|
||||
fstab_options: "umask=0077,shortname=winnt"
|
||||
fstab_freq: 0
|
||||
fstab_passno: 2
|
||||
- &iot_base_partition_table_part_boot
|
||||
size: 1_073_741_824 # 1 * datasizes.GibiByte,
|
||||
type: *filesystem_data_guid
|
||||
uuid: *data_partition_uuid
|
||||
payload_type: "filesystem"
|
||||
payload:
|
||||
type: "ext4"
|
||||
label: "boot"
|
||||
mountpoint: "/boot"
|
||||
fstab_options: "defaults"
|
||||
fstab_freq: 1
|
||||
fstab_passno: 2
|
||||
- &iot_base_partition_table_part_root
|
||||
size: 2_693_791_744 # 2569 * datasizes.MebiByte,
|
||||
type: *filesystem_data_guid
|
||||
uuid: *root_partition_uuid
|
||||
payload_type: "filesystem"
|
||||
payload:
|
||||
type: "ext4"
|
||||
label: "root"
|
||||
mountpoint: "/"
|
||||
fstab_options: "defaults,ro"
|
||||
fstab_freq: 1
|
||||
fstab_passno: 1
|
||||
- *iot_base_partition_table_part_efi
|
||||
- *iot_base_partition_table_part_boot
|
||||
- *iot_base_partition_table_part_root
|
||||
aarch64: &iot_base_partition_table_aarch64
|
||||
uuid: "0xc1748067"
|
||||
type: "dos"
|
||||
start_offset: 8_388_608 # 8 * datasizes.MebiByte
|
||||
partitions:
|
||||
- <<: *iot_base_partition_table_part_efi
|
||||
bootable: true
|
||||
type: *fat16_bdosid
|
||||
uuid: ""
|
||||
- <<: *iot_base_partition_table_part_boot
|
||||
type: *filesystem_linux_dosid
|
||||
uuid: ""
|
||||
- <<: *iot_base_partition_table_part_root
|
||||
type: *filesystem_linux_dosid
|
||||
uuid: ""
|
||||
- *iot_base_partition_table_part_efi_aarch64
|
||||
- *iot_base_partition_table_part_boot_aarch64
|
||||
- *iot_base_partition_table_part_root_aarch64
|
||||
|
||||
iot_simplified_installer_partition_tables: &iot_simplified_installer_partition_tables
|
||||
x86_64: &iot_simplified_installer_partition_tables_x86
|
||||
|
|
@ -441,13 +471,22 @@ image_types:
|
|||
iot_raw_xz:
|
||||
partition_table:
|
||||
<<: *iot_base_partition_tables
|
||||
partition_table_override:
|
||||
partition_tables_override:
|
||||
condition:
|
||||
version_greater_or_equal:
|
||||
"42":
|
||||
- partition_index: 2
|
||||
fstab_options: "defaults,ro"
|
||||
|
||||
x86_64:
|
||||
<<: *iot_base_partition_table_x86_64
|
||||
partitions:
|
||||
- *iot_base_partition_table_part_efi
|
||||
- *iot_base_partition_table_part_boot
|
||||
- *iot_base_partition_table_part_root_fstab_ro
|
||||
aarch64:
|
||||
<<: *iot_base_partition_table_aarch64
|
||||
partitions:
|
||||
- *iot_base_partition_table_part_efi_aarch64
|
||||
- *iot_base_partition_table_part_boot_aarch64
|
||||
- *iot_base_partition_table_part_root_fstab_ro_aarch64
|
||||
iot_qcow2:
|
||||
partition_table:
|
||||
<<: *iot_base_partition_tables
|
||||
|
|
@ -668,6 +707,7 @@ image_types:
|
|||
- "perl-interpreter"
|
||||
- "pigz"
|
||||
- "plymouth"
|
||||
- "prefixdevname"
|
||||
- "python3-pyatspi"
|
||||
- "rdma-core"
|
||||
- "realtek-firmware"
|
||||
|
|
|
|||
133
vendor/github.com/osbuild/images/pkg/distro/defs/loader.go
generated
vendored
133
vendor/github.com/osbuild/images/pkg/distro/defs/loader.go
generated
vendored
|
|
@ -7,12 +7,14 @@ import (
|
|||
"fmt"
|
||||
"io/fs"
|
||||
"os"
|
||||
|
||||
"path/filepath"
|
||||
"slices"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/hashicorp/go-version"
|
||||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/exp/maps"
|
||||
"gopkg.in/yaml.v3"
|
||||
|
||||
"github.com/osbuild/images/internal/common"
|
||||
|
|
@ -53,7 +55,7 @@ type imageType struct {
|
|||
// archStr->partitionTable
|
||||
PartitionTables map[string]*disk.PartitionTable `yaml:"partition_table"`
|
||||
// override specific aspects of the partition table
|
||||
PartitionTablesOverrides *partitionTablesOverrides `yaml:"partition_table_override"`
|
||||
PartitionTablesOverrides *partitionTablesOverrides `yaml:"partition_tables_override"`
|
||||
}
|
||||
|
||||
type packageSet struct {
|
||||
|
|
@ -70,60 +72,44 @@ type pkgSetConditions struct {
|
|||
}
|
||||
|
||||
type partitionTablesOverrides struct {
|
||||
Conditional *partitionTablesOverwriteConditional `yaml:"condition"`
|
||||
Condition *partitionTablesOverwriteCondition `yaml:"condition"`
|
||||
}
|
||||
|
||||
func (po *partitionTablesOverrides) Apply(it distro.ImageType, pt *disk.PartitionTable, replacements map[string]string) error {
|
||||
if po == nil {
|
||||
return nil
|
||||
}
|
||||
cond := po.Conditional
|
||||
_, distroVersion := splitDistroNameVer(it.Arch().Distro().Name())
|
||||
type partitionTablesOverwriteCondition struct {
|
||||
DistroName map[string]map[string]*disk.PartitionTable `yaml:"distro_name,omitempty"`
|
||||
VersionGreaterOrEqual map[string]map[string]*disk.PartitionTable `yaml:"version_greater_or_equal,omitempty"`
|
||||
VersionLessThan map[string]map[string]*disk.PartitionTable `yaml:"version_less_than,omitempty"`
|
||||
}
|
||||
|
||||
for gteqVer, geOverrides := range cond.VersionGreaterOrEqual {
|
||||
if r, ok := replacements[gteqVer]; ok {
|
||||
gteqVer = r
|
||||
// XXX: use slices.Backward() once we move to go1.23
|
||||
// hint: use "git blame" on this comment and just revert
|
||||
// the commit that adds it and you will have the 1.23 version
|
||||
func backward[Slice ~[]E, E any](s Slice) []E {
|
||||
out := make([]E, 0, len(s))
|
||||
for i := len(s) - 1; i >= 0; i-- {
|
||||
out = append(out, s[i])
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
// XXX: use slices.SortedFunc() once we move to go1.23
|
||||
// hint: use "git blame" on this comment and just revert
|
||||
// the commit that adds it and you will have the 1.23 version
|
||||
func versionLessThanSortedKeys[T any](m map[string]T) []string {
|
||||
versions := maps.Keys(m)
|
||||
slices.SortFunc(versions, func(a, b string) int {
|
||||
ver1 := version.Must(version.NewVersion(a))
|
||||
ver2 := version.Must(version.NewVersion(b))
|
||||
switch {
|
||||
case ver1 == ver2:
|
||||
return 0
|
||||
case ver2.LessThan(ver1):
|
||||
return -1
|
||||
default:
|
||||
return 1
|
||||
}
|
||||
if common.VersionGreaterThanOrEqual(distroVersion, gteqVer) {
|
||||
for _, overrideOp := range geOverrides {
|
||||
if err := overrideOp.Apply(pt); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type partitionTablesOverwriteConditional struct {
|
||||
VersionGreaterOrEqual map[string][]partitionTablesOverrideOp `yaml:"version_greater_or_equal,omitempty"`
|
||||
}
|
||||
|
||||
type partitionTablesOverrideOp struct {
|
||||
PartitionIndex int `yaml:"partition_index"`
|
||||
Size uint64 `yaml:"size"`
|
||||
FSTabOptions string `yaml:"fstab_options"`
|
||||
}
|
||||
|
||||
func (op *partitionTablesOverrideOp) Apply(pt *disk.PartitionTable) error {
|
||||
selectPart := op.PartitionIndex
|
||||
if selectPart > len(pt.Partitions) {
|
||||
return fmt.Errorf("override %q part %v outside of partitionTable %+v", op, selectPart, pt)
|
||||
}
|
||||
if op.Size > 0 {
|
||||
pt.Partitions[selectPart].Size = op.Size
|
||||
}
|
||||
if op.FSTabOptions != "" {
|
||||
part := pt.Partitions[selectPart]
|
||||
fs, ok := part.Payload.(*disk.Filesystem)
|
||||
if !ok {
|
||||
return fmt.Errorf("override %q part %v for fstab_options expecting filesystem got %T", op, selectPart, part)
|
||||
}
|
||||
fs.FSTabOptions = op.FSTabOptions
|
||||
}
|
||||
|
||||
return nil
|
||||
})
|
||||
return versions
|
||||
}
|
||||
|
||||
// DistroImageConfig returns the distro wide ImageConfig.
|
||||
|
|
@ -200,7 +186,9 @@ func PackageSet(it distro.ImageType, overrideTypeName string, replacements map[s
|
|||
Exclude: distroNameSet.Exclude,
|
||||
})
|
||||
}
|
||||
|
||||
// note that we don't need to order here, as
|
||||
// packageSets are strictly additive the order
|
||||
// is irrelevant
|
||||
for ltVer, ltSet := range pkgSet.Condition.VersionLessThan {
|
||||
if r, ok := replacements[ltVer]; ok {
|
||||
ltVer = r
|
||||
|
|
@ -253,15 +241,46 @@ func PartitionTable(it distro.ImageType, replacements map[string]string) (*disk.
|
|||
arch := it.Arch()
|
||||
archName := arch.Name()
|
||||
|
||||
if imgType.PartitionTablesOverrides != nil {
|
||||
cond := imgType.PartitionTablesOverrides.Condition
|
||||
distroName, distroVersion := splitDistroNameVer(it.Arch().Distro().Name())
|
||||
|
||||
for _, ltVer := range versionLessThanSortedKeys(cond.VersionLessThan) {
|
||||
ltOverrides := cond.VersionLessThan[ltVer]
|
||||
if r, ok := replacements[ltVer]; ok {
|
||||
ltVer = r
|
||||
}
|
||||
if common.VersionLessThan(distroVersion, ltVer) {
|
||||
for arch, overridePt := range ltOverrides {
|
||||
imgType.PartitionTables[arch] = overridePt
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for _, gteqVer := range backward(versionLessThanSortedKeys(cond.VersionGreaterOrEqual)) {
|
||||
geOverrides := cond.VersionGreaterOrEqual[gteqVer]
|
||||
if r, ok := replacements[gteqVer]; ok {
|
||||
gteqVer = r
|
||||
}
|
||||
if common.VersionGreaterThanOrEqual(distroVersion, gteqVer) {
|
||||
for arch, overridePt := range geOverrides {
|
||||
imgType.PartitionTables[arch] = overridePt
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if distroNameOverrides, ok := cond.DistroName[distroName]; ok {
|
||||
for arch, overridePt := range distroNameOverrides {
|
||||
imgType.PartitionTables[arch] = overridePt
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pt, ok := imgType.PartitionTables[archName]
|
||||
if !ok {
|
||||
return nil, fmt.Errorf("%w (%q): %q", ErrNoPartitionTableForArch, typeName, archName)
|
||||
}
|
||||
|
||||
if err := imgType.PartitionTablesOverrides.Apply(it, pt, replacements); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return pt, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
5
vendor/github.com/osbuild/images/pkg/distro/defs/rhel-10/distro.yaml
generated
vendored
5
vendor/github.com/osbuild/images/pkg/distro/defs/rhel-10/distro.yaml
generated
vendored
|
|
@ -238,7 +238,6 @@
|
|||
image_config:
|
||||
default:
|
||||
default_kernel: "kernel"
|
||||
# XXX: this needs to be conditional for centos and rhel
|
||||
default_oscap_datastream: "/usr/share/xml/scap/ssg/content/ssg-rhel10-ds.xml"
|
||||
install_weak_deps: true
|
||||
locale: "C.UTF-8"
|
||||
|
|
@ -434,6 +433,7 @@ image_types:
|
|||
- "libertas-sd8686-firmware"
|
||||
- "libertas-sd8787-firmware"
|
||||
- "libertas-usb8388-firmware"
|
||||
- "microcode_ctl"
|
||||
- "NetworkManager-config-server"
|
||||
- "plymouth"
|
||||
- "podman"
|
||||
|
|
@ -767,6 +767,9 @@ image_types:
|
|||
# - "gce-disk-expand"
|
||||
# cloud-init is a replacement for- "google-compute-engine" remove once the package is available
|
||||
- "cloud-init"
|
||||
# 'cloud-utils-growpart' is needed by cloud-init to be able to resize the root partition. Remove once
|
||||
# we move to GCP guest tools
|
||||
- cloud-utils-growpart
|
||||
# Not explicitly included in GCP kickstart, but present on the image
|
||||
# for time synchronization
|
||||
- "chrony"
|
||||
|
|
|
|||
274
vendor/github.com/osbuild/images/pkg/distro/defs/rhel-8/distro.yaml
generated
vendored
274
vendor/github.com/osbuild/images/pkg/distro/defs/rhel-8/distro.yaml
generated
vendored
|
|
@ -530,10 +530,244 @@
|
|||
- "insights-client"
|
||||
- "subscription-manager-cockpit"
|
||||
|
||||
partitioning:
|
||||
ids:
|
||||
- &prep_partition_dosid "41"
|
||||
- &filesystem_linux_dosid "83"
|
||||
- &fat16_bdosid "06"
|
||||
guids:
|
||||
- &bios_boot_partition_guid "21686148-6449-6E6F-744E-656564454649"
|
||||
- &efi_system_partition_guid "C12A7328-F81F-11D2-BA4B-00A0C93EC93B"
|
||||
- &filesystem_data_guid "0FC63DAF-8483-4772-8E79-3D69D8477DE4"
|
||||
- &xboot_ldr_partition_guid "BC13C2FF-59E6-4262-A352-B275FD6F7172"
|
||||
# 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.
|
||||
uuids:
|
||||
- &bios_boot_partition_uuid "FAC7F1FB-3E8D-4137-A512-961DE09A5549"
|
||||
- &root_partition_uuid "6264D520-3FB9-423F-8AB8-7A0A8E3D3562"
|
||||
- &data_partition_uuid "CB07C243-BC44-4717-853E-28852021225B"
|
||||
- &efi_system_partition_uuid "68B2905B-DF3E-4FB3-80FA-49D1E773AA33"
|
||||
- &efi_filesystem_uuid "7B77-95E7"
|
||||
|
||||
partitions:
|
||||
- &default_partition_table_part_bios
|
||||
size: 1_048_576 # 1 MiB
|
||||
bootable: true
|
||||
type: *bios_boot_partition_guid
|
||||
uuid: *bios_boot_partition_uuid
|
||||
- &default_partition_table_part_efi
|
||||
size: 104_857_600 # 100 MiB
|
||||
type: *efi_system_partition_guid
|
||||
uuid: *efi_system_partition_uuid
|
||||
payload_type: "filesystem"
|
||||
payload:
|
||||
type: vfat
|
||||
uuid: *efi_filesystem_uuid
|
||||
mountpoint: "/boot/efi"
|
||||
label: "EFI-SYSTEM"
|
||||
fstab_options: "defaults,uid=0,gid=0,umask=077,shortname=winnt"
|
||||
fstab_freq: 0
|
||||
fstab_passno: 2
|
||||
- &default_partition_table_part_root
|
||||
size: 2_147_483_648 # 2 * datasizes.GibiByte,
|
||||
type: *filesystem_data_guid
|
||||
uuid: *root_partition_uuid
|
||||
payload_type: "filesystem"
|
||||
payload: &default_partition_table_part_root_payload
|
||||
type: "xfs"
|
||||
label: "root"
|
||||
mountpoint: "/"
|
||||
fstab_options: "defaults"
|
||||
fstab_freq: 0
|
||||
fstab_passno: 0
|
||||
# ec2
|
||||
- &ec2_partition_table_part_boot
|
||||
size: 1_073_741_824 # 1 GiB
|
||||
type: *filesystem_data_guid
|
||||
uuid: *data_partition_uuid
|
||||
payload_type: "filesystem"
|
||||
payload:
|
||||
type: "xfs"
|
||||
mountpoint: "/boot"
|
||||
fstab_options: "defaults"
|
||||
fstab_freq: 0
|
||||
fstab_passno: 0
|
||||
- &ec2_partition_table_part_boot512
|
||||
<<: *ec2_partition_table_part_boot
|
||||
size: 536_870_912 # 512MiB
|
||||
|
||||
default_partition_tables: &default_partition_tables
|
||||
x86_64:
|
||||
uuid: "D209C89E-EA5E-4FBD-B161-B461CCE297E0"
|
||||
type: "gpt"
|
||||
partitions:
|
||||
- *default_partition_table_part_bios
|
||||
- *default_partition_table_part_efi
|
||||
- *default_partition_table_part_root
|
||||
aarch64: &default_partition_table_aarch64
|
||||
uuid: "D209C89E-EA5E-4FBD-B161-B461CCE297E0"
|
||||
type: "gpt"
|
||||
partitions:
|
||||
- *default_partition_table_part_efi
|
||||
- *default_partition_table_part_root
|
||||
ppc64le:
|
||||
uuid: "0x14fc63d2"
|
||||
type: "dos"
|
||||
partitions:
|
||||
- size: 4_194_304 # 4 MiB
|
||||
bootable: true
|
||||
type: *prep_partition_dosid
|
||||
- &default_partition_table_part_root_ppc64le
|
||||
size: 2_147_483_648 # 2 * datasizes.GibiByte,
|
||||
payload_type: "filesystem"
|
||||
payload:
|
||||
<<: *default_partition_table_part_root_payload
|
||||
label: ""
|
||||
s390x:
|
||||
uuid: "0x14fc63d2"
|
||||
type: "dos"
|
||||
partitions:
|
||||
- <<: *default_partition_table_part_root_ppc64le
|
||||
bootable: true
|
||||
|
||||
edge_base_partition_tables: &edge_base_partition_tables
|
||||
x86_64:
|
||||
uuid: "D209C89E-EA5E-4FBD-B161-B461CCE297E0"
|
||||
type: "gpt"
|
||||
partitions:
|
||||
- *default_partition_table_part_bios
|
||||
- &edge_base_partition_table_part_efi
|
||||
size: 133_169_152 # 127 MiB
|
||||
type: *efi_system_partition_guid
|
||||
uuid: *efi_system_partition_uuid
|
||||
payload_type: "filesystem"
|
||||
payload:
|
||||
type: vfat
|
||||
uuid: *efi_filesystem_uuid
|
||||
mountpoint: "/boot/efi"
|
||||
label: "EFI-SYSTEM"
|
||||
fstab_options: "defaults,uid=0,gid=0,umask=077,shortname=winnt"
|
||||
fstab_freq: 0
|
||||
fstab_passno: 2
|
||||
- &edge_base_partition_table_part_boot
|
||||
size: 402_653_184 # 384 * MiB
|
||||
type: *filesystem_data_guid
|
||||
uuid: *data_partition_uuid
|
||||
payload_type: "filesystem"
|
||||
payload:
|
||||
type: "xfs"
|
||||
mountpoint: "/boot"
|
||||
label: "boot"
|
||||
fstab_options: "defaults"
|
||||
fstab_freq: 1
|
||||
fstab_passno: 1
|
||||
- &edge_base_partition_table_part_root
|
||||
size: 2_147_483_648 # 2 * datasizes.GibiByte,
|
||||
type: *filesystem_data_guid
|
||||
uuid: *root_partition_uuid
|
||||
payload_type: "luks"
|
||||
payload:
|
||||
label: "crypt_root"
|
||||
cipher: "cipher_null"
|
||||
passphrase: "osbuild"
|
||||
pbkdf:
|
||||
memory: 32
|
||||
iterations: 4
|
||||
parallelism: 1
|
||||
clevis:
|
||||
pin: "null"
|
||||
policy: "{}"
|
||||
remove_passphrase: true
|
||||
payload_type: "filesystem"
|
||||
payload:
|
||||
type: "xfs"
|
||||
label: "root"
|
||||
mountpoint: "/"
|
||||
fstab_options: "defaults"
|
||||
fstab_freq: 0
|
||||
fstab_passno: 0
|
||||
aarch64: &edge_base_partition_table_aarch64
|
||||
uuid: "D209C89E-EA5E-4FBD-B161-B461CCE297E0"
|
||||
type: "gpt"
|
||||
partitions:
|
||||
- <<: *edge_base_partition_table_part_efi
|
||||
type: *efi_system_partition_guid
|
||||
uuid: *efi_system_partition_uuid
|
||||
- *edge_base_partition_table_part_boot
|
||||
- *edge_base_partition_table_part_root
|
||||
|
||||
ec2_partition_tables: &ec2_partition_tables
|
||||
x86_64: &ec2_partition_table_x86_64
|
||||
uuid: "D209C89E-EA5E-4FBD-B161-B461CCE297E0"
|
||||
type: "gpt"
|
||||
partitions:
|
||||
- *default_partition_table_part_bios
|
||||
- &ec2_partition_table_part_efi
|
||||
size: 209_715_200 # 200 MiB
|
||||
type: *efi_system_partition_guid
|
||||
uuid: *efi_system_partition_uuid
|
||||
payload_type: "filesystem"
|
||||
payload:
|
||||
type: vfat
|
||||
uuid: *efi_filesystem_uuid
|
||||
mountpoint: "/boot/efi"
|
||||
label: "EFI-SYSTEM"
|
||||
fstab_options: "defaults,uid=0,gid=0,umask=077,shortname=winnt"
|
||||
fstab_freq: 0
|
||||
fstab_passno: 2
|
||||
- &ec2_partition_table_part_root
|
||||
size: 2_147_483_648 # 2 * datasizes.GibiByte,
|
||||
type: *filesystem_data_guid
|
||||
uuid: *root_partition_uuid
|
||||
payload_type: "filesystem"
|
||||
payload:
|
||||
type: "xfs"
|
||||
label: "root"
|
||||
mountpoint: "/"
|
||||
fstab_options: "defaults"
|
||||
fstab_freq: 0
|
||||
fstab_passno: 0
|
||||
aarch64: &ec2_partition_table_aarch64
|
||||
uuid: "D209C89E-EA5E-4FBD-B161-B461CCE297E0"
|
||||
type: "gpt"
|
||||
partitions:
|
||||
- *ec2_partition_table_part_efi
|
||||
- *ec2_partition_table_part_boot
|
||||
- *ec2_partition_table_part_root
|
||||
|
||||
ec2_partition_tables_override: &ec2_partition_tables_override
|
||||
condition:
|
||||
version_less_than:
|
||||
"8.10":
|
||||
aarch64:
|
||||
<<: *ec2_partition_table_aarch64
|
||||
partitions:
|
||||
- *ec2_partition_table_part_efi
|
||||
- *ec2_partition_table_part_boot512
|
||||
- *ec2_partition_table_part_root
|
||||
"8.9":
|
||||
x86_64:
|
||||
<<: *ec2_partition_table_x86_64
|
||||
partitions:
|
||||
- *default_partition_table_part_bios
|
||||
- *ec2_partition_table_part_root
|
||||
distro_name:
|
||||
# we need this override to ensure that centos always gets
|
||||
# the latest partition-tables, otherwise "centos-8" is
|
||||
# less than "8 <= 8.9"
|
||||
"centos":
|
||||
x86_64:
|
||||
<<: *ec2_partition_table_x86_64
|
||||
aarch64:
|
||||
<<: *ec2_partition_table_aarch64
|
||||
|
||||
image_config:
|
||||
default:
|
||||
default_kernel: "kernel"
|
||||
# XXX: this needs to be conditional for centos and rhel
|
||||
default_oscap_datastream: "/usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml"
|
||||
install_weak_deps: true
|
||||
kernel_options_bootloader: true
|
||||
|
|
@ -605,6 +839,10 @@ image_types:
|
|||
- "subscription-manager-cockpit"
|
||||
|
||||
ec2: &ec2
|
||||
partition_table:
|
||||
<<: *ec2_partition_tables
|
||||
partition_tables_override:
|
||||
<<: *ec2_partition_tables_override
|
||||
package_sets:
|
||||
- *ec2_common_pkgset
|
||||
- include:
|
||||
|
|
@ -618,6 +856,7 @@ image_types:
|
|||
- "redhat-cloud-client-configuration"
|
||||
|
||||
ec2_ha:
|
||||
<<: *ec2
|
||||
package_sets:
|
||||
- *ec2_common_pkgset
|
||||
- include:
|
||||
|
|
@ -634,10 +873,12 @@ image_types:
|
|||
- "redhat-cloud-client-configuration"
|
||||
|
||||
ami:
|
||||
<<: *ec2
|
||||
package_sets:
|
||||
- *ec2_common_pkgset
|
||||
|
||||
ec2_sap:
|
||||
<<: *ec2
|
||||
package_sets:
|
||||
- *ec2_common_pkgset
|
||||
- *sap_pkgset
|
||||
|
|
@ -688,6 +929,8 @@ image_types:
|
|||
- "firewalld"
|
||||
|
||||
vhd:
|
||||
partition_table:
|
||||
<<: *default_partition_tables
|
||||
package_sets:
|
||||
- *azure_common_pkgset
|
||||
- &azure_pkgset
|
||||
|
|
@ -846,7 +1089,13 @@ image_types:
|
|||
- *anaconda_pkgset
|
||||
- *anaconda_boot_pkgset
|
||||
|
||||
edge_raw_image:
|
||||
partition_table:
|
||||
<<: *edge_base_partition_tables
|
||||
|
||||
edge_simplified_installer:
|
||||
partition_table:
|
||||
<<: *edge_base_partition_tables
|
||||
package_sets:
|
||||
# TODO: non-arch-specific package set handling for installers
|
||||
# This image type requires build packages for installers and
|
||||
|
|
@ -910,7 +1159,9 @@ image_types:
|
|||
- include:
|
||||
- "nginx"
|
||||
|
||||
vmdk:
|
||||
vmdk: &vmdk
|
||||
partition_table:
|
||||
<<: *default_partition_tables
|
||||
package_sets: &vmdk_pkgsets
|
||||
- include:
|
||||
- "@core"
|
||||
|
|
@ -924,27 +1175,32 @@ image_types:
|
|||
- "dracut-config-rescue"
|
||||
- "rng-tools"
|
||||
|
||||
ova:
|
||||
package_sets: *vmdk_pkgsets
|
||||
ova: *vmdk
|
||||
|
||||
gce:
|
||||
gce: &gce
|
||||
partition_table:
|
||||
<<: *default_partition_tables
|
||||
package_sets:
|
||||
- *gce_common_pkgset
|
||||
|
||||
gce_rhui:
|
||||
<<: *gce
|
||||
package_sets:
|
||||
- *gce_common_pkgset
|
||||
- include:
|
||||
- "google-rhui-client-rhel8"
|
||||
|
||||
qcow2:
|
||||
qcow2: &qcow2
|
||||
partition_table:
|
||||
<<: *default_partition_tables
|
||||
package_sets: &qcow2_pkgset
|
||||
- *qcow2_common_pkgset
|
||||
|
||||
oci:
|
||||
package_sets: *qcow2_pkgset
|
||||
oci: *qcow2
|
||||
|
||||
openstack:
|
||||
partition_table:
|
||||
<<: *default_partition_tables
|
||||
package_sets:
|
||||
- include:
|
||||
- "@Core"
|
||||
|
|
@ -1066,6 +1322,8 @@ image_types:
|
|||
- "xz"
|
||||
|
||||
minimal_raw:
|
||||
partition_table:
|
||||
<<: *default_partition_tables
|
||||
package_sets:
|
||||
- include:
|
||||
- "@core"
|
||||
|
|
|
|||
247
vendor/github.com/osbuild/images/pkg/distro/defs/rhel-9/distro.yaml
generated
vendored
247
vendor/github.com/osbuild/images/pkg/distro/defs/rhel-9/distro.yaml
generated
vendored
|
|
@ -366,6 +366,227 @@
|
|||
include:
|
||||
- "dmidecode"
|
||||
|
||||
partitioning:
|
||||
ids:
|
||||
- &prep_partition_dosid "41"
|
||||
- &filesystem_linux_dosid "83"
|
||||
- &fat16_bdosid "06"
|
||||
guids:
|
||||
- &bios_boot_partition_guid "21686148-6449-6E6F-744E-656564454649"
|
||||
- &efi_system_partition_guid "C12A7328-F81F-11D2-BA4B-00A0C93EC93B"
|
||||
- &filesystem_data_guid "0FC63DAF-8483-4772-8E79-3D69D8477DE4"
|
||||
- &xboot_ldr_partition_guid "BC13C2FF-59E6-4262-A352-B275FD6F7172"
|
||||
# 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.
|
||||
uuids:
|
||||
- &bios_boot_partition_uuid "FAC7F1FB-3E8D-4137-A512-961DE09A5549"
|
||||
- &root_partition_uuid "6264D520-3FB9-423F-8AB8-7A0A8E3D3562"
|
||||
- &data_partition_uuid "CB07C243-BC44-4717-853E-28852021225B"
|
||||
- &efi_system_partition_uuid "68B2905B-DF3E-4FB3-80FA-49D1E773AA33"
|
||||
- &efi_filesystem_uuid "7B77-95E7"
|
||||
|
||||
partitions:
|
||||
- &default_partition_table_part_bios
|
||||
size: 1_048_576 # 1 MiB
|
||||
bootable: true
|
||||
type: *bios_boot_partition_guid
|
||||
uuid: *bios_boot_partition_uuid
|
||||
- &default_partition_table_part_efi
|
||||
size: 209_715_200 # 200 MiB
|
||||
type: *efi_system_partition_guid
|
||||
uuid: *efi_system_partition_uuid
|
||||
payload_type: "filesystem"
|
||||
payload:
|
||||
type: vfat
|
||||
uuid: *efi_filesystem_uuid
|
||||
mountpoint: "/boot/efi"
|
||||
label: "EFI-SYSTEM"
|
||||
fstab_options: "defaults,uid=0,gid=0,umask=077,shortname=winnt"
|
||||
fstab_freq: 0
|
||||
fstab_passno: 2
|
||||
- &default_partition_table_part_boot
|
||||
size: 1_073_741_824 # 1 GiB
|
||||
type: *xboot_ldr_partition_guid
|
||||
uuid: *data_partition_uuid
|
||||
payload_type: "filesystem"
|
||||
payload: &default_partition_table_part_boot_payload
|
||||
type: "xfs"
|
||||
mountpoint: "/boot"
|
||||
label: "boot"
|
||||
fstab_options: "defaults"
|
||||
fstab_freq: 0
|
||||
fstab_passno: 0
|
||||
- &default_partition_table_part_boot512
|
||||
<<: *default_partition_table_part_boot
|
||||
size: 524_288_000 # 500 MiB
|
||||
- &default_partition_table_part_boot600
|
||||
<<: *default_partition_table_part_boot
|
||||
size: 629_145_600 # 600 MiB
|
||||
- &default_partition_table_part_root
|
||||
size: 2_147_483_648 # 2 * datasizes.GibiByte,
|
||||
type: *filesystem_data_guid
|
||||
uuid: *root_partition_uuid
|
||||
payload_type: "filesystem"
|
||||
payload: &default_partition_table_part_root_payload
|
||||
type: "xfs"
|
||||
label: "root"
|
||||
mountpoint: "/"
|
||||
fstab_options: "defaults"
|
||||
fstab_freq: 0
|
||||
fstab_passno: 0
|
||||
# ppc64
|
||||
- &default_partition_table_part_bios_ppc64le
|
||||
size: 4_194_304 # 4 MiB
|
||||
bootable: true
|
||||
type: *prep_partition_dosid
|
||||
- &default_partition_table_part_boot_ppc64le
|
||||
size: 1_073_741_824 # 1 GiB
|
||||
payload_type: "filesystem"
|
||||
payload:
|
||||
<<: *default_partition_table_part_boot_payload
|
||||
- &default_partition_table_part_boot512_ppc64le
|
||||
<<: *default_partition_table_part_boot_ppc64le
|
||||
size: 524_288_000 # 500 MiB
|
||||
- &default_partition_table_part_boot600_ppc64le
|
||||
<<: *default_partition_table_part_boot_ppc64le
|
||||
size: 629_145_600 # 600 MiB
|
||||
- &default_partition_table_part_root_ppc64le
|
||||
size: 2_147_483_648 # 2 * datasizes.GibiByte,
|
||||
payload_type: "filesystem"
|
||||
payload:
|
||||
<<: *default_partition_table_part_root_payload
|
||||
label: ""
|
||||
|
||||
default_partition_tables: &default_partition_tables
|
||||
x86_64: &default_partition_table_x86_64
|
||||
uuid: "D209C89E-EA5E-4FBD-B161-B461CCE297E0"
|
||||
type: "gpt"
|
||||
partitions:
|
||||
- *default_partition_table_part_bios
|
||||
- *default_partition_table_part_efi
|
||||
- *default_partition_table_part_boot
|
||||
- *default_partition_table_part_root
|
||||
aarch64: &default_partition_table_aarch64
|
||||
uuid: "D209C89E-EA5E-4FBD-B161-B461CCE297E0"
|
||||
type: "gpt"
|
||||
partitions:
|
||||
- *default_partition_table_part_efi
|
||||
- *default_partition_table_part_boot
|
||||
- *default_partition_table_part_root
|
||||
ppc64le: &default_partition_table_ppc64le
|
||||
uuid: "0x14fc63d2"
|
||||
type: "dos"
|
||||
partitions:
|
||||
- *default_partition_table_part_bios_ppc64le
|
||||
- *default_partition_table_part_boot_ppc64le
|
||||
- *default_partition_table_part_root_ppc64le
|
||||
s390x: &default_partition_table_s390x
|
||||
uuid: "0x14fc63d2"
|
||||
type: "dos"
|
||||
partitions:
|
||||
- *default_partition_table_part_boot_ppc64le
|
||||
- &default_partition_table_part_root_s390x
|
||||
<<: *default_partition_table_part_root_ppc64le
|
||||
bootable: true
|
||||
|
||||
default_partition_tables_override: &default_partition_tables_override
|
||||
condition:
|
||||
version_less_than: &default_partition_tables_override_lt
|
||||
"9.3": &default_partition_tables_override_lt_9_3
|
||||
x86_64:
|
||||
<<: *default_partition_table_x86_64
|
||||
partitions:
|
||||
- *default_partition_table_part_bios
|
||||
- *default_partition_table_part_efi
|
||||
- *default_partition_table_part_boot512
|
||||
- *default_partition_table_part_root
|
||||
aarch64:
|
||||
<<: *default_partition_table_aarch64
|
||||
partitions:
|
||||
- *default_partition_table_part_efi
|
||||
- *default_partition_table_part_boot512
|
||||
- *default_partition_table_part_root
|
||||
ppc64le:
|
||||
<<: *default_partition_table_ppc64le
|
||||
partitions:
|
||||
- *default_partition_table_part_bios_ppc64le
|
||||
- *default_partition_table_part_boot512_ppc64le
|
||||
- *default_partition_table_part_root_ppc64le
|
||||
s390x:
|
||||
<<: *default_partition_table_s390x
|
||||
partitions:
|
||||
- *default_partition_table_part_boot512_ppc64le
|
||||
- *default_partition_table_part_root_s390x
|
||||
"9.4":
|
||||
x86_64:
|
||||
<<: *default_partition_table_x86_64
|
||||
partitions:
|
||||
- *default_partition_table_part_bios
|
||||
- *default_partition_table_part_efi
|
||||
- *default_partition_table_part_boot600
|
||||
- *default_partition_table_part_root
|
||||
aarch64:
|
||||
<<: *default_partition_table_aarch64
|
||||
partitions:
|
||||
- *default_partition_table_part_efi
|
||||
- *default_partition_table_part_boot600
|
||||
- *default_partition_table_part_root
|
||||
ppc64le:
|
||||
<<: *default_partition_table_ppc64le
|
||||
partitions:
|
||||
- *default_partition_table_part_bios_ppc64le
|
||||
- *default_partition_table_part_boot600_ppc64le
|
||||
- *default_partition_table_part_root_ppc64le
|
||||
s390x:
|
||||
<<: *default_partition_table_s390x
|
||||
partitions:
|
||||
- *default_partition_table_part_boot600_ppc64le
|
||||
- *default_partition_table_part_root_s390x
|
||||
distro_name:
|
||||
# we need this override to ensure that centos always gets
|
||||
# the latest partition-tables, othersie "centos-9" is
|
||||
# less then "9 <= 9.3"
|
||||
"centos":
|
||||
x86_64:
|
||||
<<: *default_partition_table_x86_64
|
||||
aarch64:
|
||||
<<: *default_partition_table_aarch64
|
||||
ppc64le:
|
||||
<<: *default_partition_table_ppc64le
|
||||
s390x:
|
||||
<<: *default_partition_table_s390x
|
||||
|
||||
ec2_partition_tables_override: &ec2_partition_tables_override
|
||||
condition:
|
||||
version_less_than:
|
||||
<<: *default_partition_tables_override_lt
|
||||
"9.3":
|
||||
<<: *default_partition_tables_override_lt_9_3
|
||||
x86_64:
|
||||
<<: *default_partition_table_x86_64
|
||||
partitions:
|
||||
- *default_partition_table_part_bios
|
||||
# note no boot efi
|
||||
- *default_partition_table_part_boot512
|
||||
- *default_partition_table_part_root
|
||||
distro_name:
|
||||
# we need this override to ensure that centos always gets
|
||||
# the latest partition-tables, othersie "centos-9" is
|
||||
# less then "9 <= 9.3"
|
||||
"centos":
|
||||
x86_64:
|
||||
<<: *default_partition_table_x86_64
|
||||
aarch64:
|
||||
<<: *default_partition_table_aarch64
|
||||
ppc64le:
|
||||
<<: *default_partition_table_ppc64le
|
||||
s390x:
|
||||
<<: *default_partition_table_s390x
|
||||
|
||||
image_config:
|
||||
default:
|
||||
default_kernel: "kernel"
|
||||
|
|
@ -435,6 +656,10 @@ image_types:
|
|||
- "subscription-manager-cockpit"
|
||||
|
||||
qcow2: &qcow2
|
||||
partition_table:
|
||||
<<: *default_partition_tables
|
||||
partition_tables_override:
|
||||
<<: *default_partition_tables_override
|
||||
package_sets:
|
||||
- include:
|
||||
- "@core"
|
||||
|
|
@ -504,6 +729,10 @@ image_types:
|
|||
oci: *qcow2
|
||||
|
||||
vhd: &vhd
|
||||
partition_table:
|
||||
<<: *default_partition_tables
|
||||
partition_tables_override:
|
||||
<<: *default_partition_tables_override
|
||||
package_sets:
|
||||
- &vhd_pkgset
|
||||
include:
|
||||
|
|
@ -604,6 +833,10 @@ image_types:
|
|||
- "rng-tools"
|
||||
|
||||
vmdk: &vmdk
|
||||
partition_table:
|
||||
<<: *default_partition_tables
|
||||
partition_tables_override:
|
||||
<<: *default_partition_tables_override
|
||||
package_sets:
|
||||
- include:
|
||||
- "@core"
|
||||
|
|
@ -620,6 +853,10 @@ image_types:
|
|||
ova: *vmdk
|
||||
|
||||
ec2: &ec2
|
||||
partition_table:
|
||||
<<: *default_partition_tables
|
||||
partition_tables_override:
|
||||
<<: *ec2_partition_tables_override
|
||||
package_sets:
|
||||
- *ec2_base_pkgset
|
||||
- exclude:
|
||||
|
|
@ -628,6 +865,7 @@ image_types:
|
|||
ami: *ec2
|
||||
|
||||
ec2_ha:
|
||||
<<: *ec2
|
||||
package_sets:
|
||||
- *ec2_base_pkgset
|
||||
- include:
|
||||
|
|
@ -638,6 +876,7 @@ image_types:
|
|||
- "alsa-lib"
|
||||
|
||||
ec2_sap:
|
||||
<<: *ec2
|
||||
package_sets:
|
||||
- *ec2_base_pkgset
|
||||
- *sap_pkgset
|
||||
|
|
@ -710,6 +949,10 @@ image_types:
|
|||
- *anaconda_pkgset
|
||||
|
||||
gce:
|
||||
partition_table:
|
||||
<<: *default_partition_tables
|
||||
partition_tables_override:
|
||||
<<: *default_partition_tables_override
|
||||
package_sets:
|
||||
- include:
|
||||
- "@core"
|
||||
|
|
@ -799,6 +1042,10 @@ image_types:
|
|||
- "iwl3160-firmware"
|
||||
|
||||
openstack:
|
||||
partition_table:
|
||||
<<: *default_partition_tables
|
||||
partition_tables_override:
|
||||
<<: *default_partition_tables_override
|
||||
package_sets:
|
||||
- include:
|
||||
- "@core"
|
||||
|
|
|
|||
12
vendor/github.com/osbuild/images/pkg/distro/fedora/images.go
generated
vendored
12
vendor/github.com/osbuild/images/pkg/distro/fedora/images.go
generated
vendored
|
|
@ -227,7 +227,7 @@ func osCustomizations(
|
|||
osc.Tmpfilesd = imageConfig.Tmpfilesd
|
||||
osc.PamLimitsConf = imageConfig.PamLimitsConf
|
||||
osc.Sysctld = imageConfig.Sysctld
|
||||
osc.DNFConfig = imageConfig.DNFConfig
|
||||
osc.DNFConfig = imageConfig.DNFConfigOptions(t.arch.distro.osVersion)
|
||||
osc.SshdConfig = imageConfig.SshdConfig
|
||||
osc.AuthConfig = imageConfig.Authconfig
|
||||
osc.PwQuality = imageConfig.PwQuality
|
||||
|
|
@ -508,6 +508,9 @@ func imageInstallerImage(workload workload.Workload,
|
|||
img.AdditionalDrivers = append(img.AdditionalDrivers, installerConfig.AdditionalDrivers...)
|
||||
}
|
||||
|
||||
// On Fedora anaconda needs dbus-broker, but isn't added when dracut runs.
|
||||
img.AdditionalDracutModules = append(img.AdditionalDracutModules, "dbus-broker")
|
||||
|
||||
d := t.arch.distro
|
||||
|
||||
img.Product = d.product
|
||||
|
|
@ -527,7 +530,7 @@ func imageInstallerImage(workload workload.Workload,
|
|||
|
||||
img.Filename = t.Filename()
|
||||
|
||||
img.RootfsCompression = "lz4"
|
||||
img.RootfsCompression = "xz" // This also triggers using the bcj filter
|
||||
if common.VersionGreaterThanOrEqual(img.OSVersion, VERSION_ROOTFS_SQUASHFS) {
|
||||
img.RootfsType = manifest.SquashfsRootfs
|
||||
}
|
||||
|
|
@ -730,6 +733,9 @@ func iotInstallerImage(workload workload.Workload,
|
|||
img.AdditionalDrivers = append(img.AdditionalDrivers, installerConfig.AdditionalDrivers...)
|
||||
}
|
||||
|
||||
// On Fedora anaconda needs dbus-broker, but isn't added when dracut runs.
|
||||
img.AdditionalDracutModules = append(img.AdditionalDracutModules, "dbus-broker")
|
||||
|
||||
img.Product = d.product
|
||||
img.Variant = "IoT"
|
||||
img.OSVersion = d.osVersion
|
||||
|
|
@ -743,7 +749,7 @@ func iotInstallerImage(workload workload.Workload,
|
|||
|
||||
img.Filename = t.Filename()
|
||||
|
||||
img.RootfsCompression = "lz4"
|
||||
img.RootfsCompression = "xz" // This also triggers using the bcj filter
|
||||
if common.VersionGreaterThanOrEqual(img.OSVersion, VERSION_ROOTFS_SQUASHFS) {
|
||||
img.RootfsType = manifest.SquashfsRootfs
|
||||
}
|
||||
|
|
|
|||
57
vendor/github.com/osbuild/images/pkg/distro/image_config.go
generated
vendored
57
vendor/github.com/osbuild/images/pkg/distro/image_config.go
generated
vendored
|
|
@ -44,20 +44,22 @@ type ImageConfig struct {
|
|||
|
||||
// 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]*subscription.RHSMConfig
|
||||
SystemdLogind []*osbuild.SystemdLogindStageOptions
|
||||
CloudInit []*osbuild.CloudInitStageOptions
|
||||
Modprobe []*osbuild.ModprobeStageOptions
|
||||
DracutConf []*osbuild.DracutConfStageOptions
|
||||
SystemdDropin []*osbuild.SystemdUnitStageOptions
|
||||
SystemdUnit []*osbuild.SystemdUnitCreateStageOptions
|
||||
Authselect *osbuild.AuthselectStageOptions
|
||||
SELinuxConfig *osbuild.SELinuxConfigStageOptions
|
||||
Tuned *osbuild.TunedStageOptions
|
||||
Tmpfilesd []*osbuild.TmpfilesdStageOptions
|
||||
PamLimitsConf []*osbuild.PamLimitsConfStageOptions
|
||||
Sysctld []*osbuild.SysctldStageOptions
|
||||
RHSMConfig map[subscription.RHSMStatus]*subscription.RHSMConfig
|
||||
SystemdLogind []*osbuild.SystemdLogindStageOptions
|
||||
CloudInit []*osbuild.CloudInitStageOptions
|
||||
Modprobe []*osbuild.ModprobeStageOptions
|
||||
DracutConf []*osbuild.DracutConfStageOptions
|
||||
SystemdDropin []*osbuild.SystemdUnitStageOptions
|
||||
SystemdUnit []*osbuild.SystemdUnitCreateStageOptions
|
||||
Authselect *osbuild.AuthselectStageOptions
|
||||
SELinuxConfig *osbuild.SELinuxConfigStageOptions
|
||||
Tuned *osbuild.TunedStageOptions
|
||||
Tmpfilesd []*osbuild.TmpfilesdStageOptions
|
||||
PamLimitsConf []*osbuild.PamLimitsConfStageOptions
|
||||
Sysctld []*osbuild.SysctldStageOptions
|
||||
// Do not use DNFConfig directly, call "DNFConfigOptions()"
|
||||
DNFConfig []*osbuild.DNFConfigStageOptions
|
||||
DNFSetReleaseVerVar *bool
|
||||
SshdConfig *osbuild.SshdConfigStageOptions
|
||||
Authconfig *osbuild.AuthconfigStageOptions
|
||||
PwQuality *osbuild.PwqualityConfStageOptions
|
||||
|
|
@ -146,6 +148,35 @@ func (c *ImageConfig) InheritFrom(parentConfig *ImageConfig) *ImageConfig {
|
|||
return &finalConfig
|
||||
}
|
||||
|
||||
func (c *ImageConfig) DNFConfigOptions(osVersion string) []*osbuild.DNFConfigStageOptions {
|
||||
if c.DNFSetReleaseVerVar == nil || !*c.DNFSetReleaseVerVar {
|
||||
return c.DNFConfig
|
||||
}
|
||||
|
||||
// We currently have no use-case where we set both a custom
|
||||
// DNFConfig and DNFSetReleaseVerVar. If we have one this needs
|
||||
// to change and we need to decide if we want two dnf
|
||||
// configurations or if we want to merge the variable into all
|
||||
// existing once (exactly once) and we need to consider what to
|
||||
// do about potentially conflicting (manually set) "releasever"
|
||||
// values by the user.
|
||||
if c.DNFConfig != nil {
|
||||
err := fmt.Errorf("internal error: currently DNFConfig and DNFSetReleaseVerVar cannot be used together, please reporting this as a feature request")
|
||||
panic(err)
|
||||
}
|
||||
return []*osbuild.DNFConfigStageOptions{
|
||||
osbuild.NewDNFConfigStageOptions(
|
||||
[]osbuild.DNFVariable{
|
||||
{
|
||||
Name: "releasever",
|
||||
Value: osVersion,
|
||||
},
|
||||
},
|
||||
nil,
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
func (c *ImageConfig) WSLConfStageOptions() *osbuild.WSLConfStageOptions {
|
||||
if c.WSLConfig == nil {
|
||||
return nil
|
||||
|
|
|
|||
52
vendor/github.com/osbuild/images/pkg/distro/rhel/azure.go
generated
vendored
Normal file
52
vendor/github.com/osbuild/images/pkg/distro/rhel/azure.go
generated
vendored
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
package rhel
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/customizations/fsnode"
|
||||
"github.com/osbuild/images/pkg/osbuild"
|
||||
)
|
||||
|
||||
// Dataloss warning script for Azure images.
|
||||
//
|
||||
//go:embed temp-disk-dataloss-warning.sh
|
||||
var azureDatalossWarningScriptContent string
|
||||
|
||||
// Returns a filenode that embeds a script and a systemd unit to run it on
|
||||
// every boot.
|
||||
// The script writes a file named DATALOSS_WARNING_README.txt to the root of an
|
||||
// Azure ephemeral resource disk, if one is mounted, as a warning against using
|
||||
// the disk for data storage.
|
||||
// https://docs.microsoft.com/en-us/azure/virtual-machines/linux/managed-disks-overview#temporary-disk
|
||||
func CreateAzureDatalossWarningScriptAndUnit() (*fsnode.File, *osbuild.SystemdUnitCreateStageOptions, error) {
|
||||
datalossWarningScriptPath := "/usr/local/sbin/temp-disk-dataloss-warning"
|
||||
datalossWarningScript, err := fsnode.NewFile(datalossWarningScriptPath, common.ToPtr(os.FileMode(0755)), nil, nil, []byte(azureDatalossWarningScriptContent))
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("rhel/azure: error creating file node for dataloss warning script: %w", err)
|
||||
}
|
||||
|
||||
systemdUnit := &osbuild.SystemdUnitCreateStageOptions{
|
||||
Filename: "temp-disk-dataloss-warning.service",
|
||||
UnitType: osbuild.SystemUnitType,
|
||||
UnitPath: osbuild.EtcUnitPath,
|
||||
Config: osbuild.SystemdUnit{
|
||||
Unit: &osbuild.UnitSection{
|
||||
Description: "Azure temporary resource disk dataloss warning file creation",
|
||||
After: []string{"multi-user.target", "cloud-final.service"},
|
||||
},
|
||||
Service: &osbuild.ServiceSection{
|
||||
Type: osbuild.OneshotServiceType,
|
||||
ExecStart: []string{datalossWarningScriptPath},
|
||||
StandardOutput: "journal+console",
|
||||
},
|
||||
Install: &osbuild.InstallSection{
|
||||
WantedBy: []string{"default.target"},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return datalossWarningScript, systemdUnit, nil
|
||||
}
|
||||
2
vendor/github.com/osbuild/images/pkg/distro/rhel/images.go
generated
vendored
2
vendor/github.com/osbuild/images/pkg/distro/rhel/images.go
generated
vendored
|
|
@ -260,7 +260,7 @@ func osCustomizations(
|
|||
osc.Tmpfilesd = imageConfig.Tmpfilesd
|
||||
osc.PamLimitsConf = imageConfig.PamLimitsConf
|
||||
osc.Sysctld = imageConfig.Sysctld
|
||||
osc.DNFConfig = imageConfig.DNFConfig
|
||||
osc.DNFConfig = imageConfig.DNFConfigOptions(t.arch.distro.osVersion)
|
||||
osc.DNFAutomaticConfig = imageConfig.DNFAutomaticConfig
|
||||
osc.YUMConfig = imageConfig.YumConfig
|
||||
osc.SshdConfig = imageConfig.SshdConfig
|
||||
|
|
|
|||
71
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/azure.go
generated
vendored
71
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/azure.go
generated
vendored
|
|
@ -3,6 +3,7 @@ package rhel10
|
|||
import (
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/arch"
|
||||
"github.com/osbuild/images/pkg/customizations/fsnode"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/disk"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
|
|
@ -11,7 +12,7 @@ import (
|
|||
)
|
||||
|
||||
// Azure image type
|
||||
func mkAzureImgType(rd *rhel.Distribution) *rhel.ImageType {
|
||||
func mkAzureImgType(rd *rhel.Distribution, a arch.Arch) *rhel.ImageType {
|
||||
it := rhel.NewImageType(
|
||||
"vhd",
|
||||
"disk.vhd",
|
||||
|
|
@ -25,7 +26,7 @@ func mkAzureImgType(rd *rhel.Distribution) *rhel.ImageType {
|
|||
[]string{"vpc"},
|
||||
)
|
||||
|
||||
it.KernelOptions = defaultAzureKernelOptions()
|
||||
it.KernelOptions = defaultAzureKernelOptions(a)
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 4 * datasizes.GibiByte
|
||||
it.DefaultImageConfig = defaultAzureImageConfig(rd)
|
||||
|
|
@ -35,7 +36,7 @@ func mkAzureImgType(rd *rhel.Distribution) *rhel.ImageType {
|
|||
}
|
||||
|
||||
// Azure RHEL-internal image type
|
||||
func mkAzureInternalImgType(rd *rhel.Distribution) *rhel.ImageType {
|
||||
func mkAzureInternalImgType(rd *rhel.Distribution, a arch.Arch) *rhel.ImageType {
|
||||
it := rhel.NewImageType(
|
||||
"azure-rhui",
|
||||
"disk.vhd.xz",
|
||||
|
|
@ -50,7 +51,7 @@ func mkAzureInternalImgType(rd *rhel.Distribution) *rhel.ImageType {
|
|||
)
|
||||
|
||||
it.Compression = "xz"
|
||||
it.KernelOptions = defaultAzureKernelOptions()
|
||||
it.KernelOptions = defaultAzureKernelOptions(a)
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 64 * datasizes.GibiByte
|
||||
it.DefaultImageConfig = defaultAzureImageConfig(rd)
|
||||
|
|
@ -59,7 +60,7 @@ func mkAzureInternalImgType(rd *rhel.Distribution) *rhel.ImageType {
|
|||
return it
|
||||
}
|
||||
|
||||
func mkAzureSapInternalImgType(rd *rhel.Distribution) *rhel.ImageType {
|
||||
func mkAzureSapInternalImgType(rd *rhel.Distribution, a arch.Arch) *rhel.ImageType {
|
||||
it := rhel.NewImageType(
|
||||
"azure-sap-rhui",
|
||||
"disk.vhd.xz",
|
||||
|
|
@ -74,7 +75,7 @@ func mkAzureSapInternalImgType(rd *rhel.Distribution) *rhel.ImageType {
|
|||
)
|
||||
|
||||
it.Compression = "xz"
|
||||
it.KernelOptions = defaultAzureKernelOptions()
|
||||
it.KernelOptions = defaultAzureKernelOptions(a)
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 64 * datasizes.GibiByte
|
||||
it.DefaultImageConfig = sapAzureImageConfig(rd)
|
||||
|
|
@ -307,13 +308,23 @@ func azureInternalBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, b
|
|||
|
||||
// IMAGE CONFIG
|
||||
|
||||
// use loglevel=3 as described in the RHEL documentation and used in existing RHEL images built by MSFT
|
||||
func defaultAzureKernelOptions() []string {
|
||||
return []string{"ro", "loglevel=3", "console=tty1", "console=ttyS0", "earlyprintk=ttyS0", "rootdelay=300"}
|
||||
func defaultAzureKernelOptions(a arch.Arch) []string {
|
||||
kargs := []string{"ro", "loglevel=3", "nvme_core.io_timeout=240"}
|
||||
switch a {
|
||||
case arch.ARCH_AARCH64:
|
||||
kargs = append(kargs, "console=ttyAMA0")
|
||||
case arch.ARCH_X86_64:
|
||||
kargs = append(kargs, "console=tty1", "console=ttyS0", "earlyprintk=ttyS0", "rootdelay=300")
|
||||
}
|
||||
return kargs
|
||||
}
|
||||
|
||||
// based on https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/deploying_rhel_9_on_microsoft_azure/assembly_deploying-a-rhel-image-as-a-virtual-machine-on-microsoft-azure_cloud-content-azure#making-configuration-changes_configure-the-image-azure
|
||||
func defaultAzureImageConfig(rd *rhel.Distribution) *distro.ImageConfig {
|
||||
datalossWarningScript, datalossSystemdUnit, err := rhel.CreateAzureDatalossWarningScriptAndUnit()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
ic := &distro.ImageConfig{
|
||||
Keyboard: &osbuild.KeymapStageOptions{
|
||||
Keymap: "us",
|
||||
|
|
@ -333,6 +344,7 @@ func defaultAzureImageConfig(rd *rhel.Distribution) *distro.ImageConfig {
|
|||
"nm-cloud-setup.timer",
|
||||
"sshd",
|
||||
"waagent",
|
||||
datalossSystemdUnit.Filename,
|
||||
},
|
||||
SshdConfig: &osbuild.SshdConfigStageOptions{
|
||||
Config: osbuild.SshdConfigConfig{
|
||||
|
|
@ -371,6 +383,18 @@ func defaultAzureImageConfig(rd *rhel.Distribution) *distro.ImageConfig {
|
|||
osbuild.NewModprobeConfigCmdBlacklist("skx_edac"),
|
||||
},
|
||||
},
|
||||
{
|
||||
Filename: "blacklist-intel_uncore.conf",
|
||||
Commands: osbuild.ModprobeConfigCmdList{
|
||||
osbuild.NewModprobeConfigCmdBlacklist("intel_uncore"),
|
||||
},
|
||||
},
|
||||
{
|
||||
Filename: "blacklist-acpi_cpufreq.conf",
|
||||
Commands: osbuild.ModprobeConfigCmdList{
|
||||
osbuild.NewModprobeConfigCmdBlacklist("acpi_cpufreq"),
|
||||
},
|
||||
},
|
||||
},
|
||||
CloudInit: []*osbuild.CloudInitStageOptions{
|
||||
{
|
||||
|
|
@ -412,8 +436,10 @@ func defaultAzureImageConfig(rd *rhel.Distribution) *distro.ImageConfig {
|
|||
},
|
||||
WAAgentConfig: &osbuild.WAAgentConfStageOptions{
|
||||
Config: osbuild.WAAgentConfig{
|
||||
RDFormat: common.ToPtr(false),
|
||||
RDEnableSwap: common.ToPtr(false),
|
||||
RDFormat: common.ToPtr(false),
|
||||
RDEnableSwap: common.ToPtr(false),
|
||||
ProvisioningUseCloudInit: common.ToPtr(true),
|
||||
ProvisioningEnabled: common.ToPtr(false),
|
||||
},
|
||||
},
|
||||
Grub2Config: &osbuild.GRUB2Config{
|
||||
|
|
@ -457,6 +483,29 @@ func defaultAzureImageConfig(rd *rhel.Distribution) *distro.ImageConfig {
|
|||
},
|
||||
},
|
||||
DefaultTarget: common.ToPtr("multi-user.target"),
|
||||
TimeSynchronization: &osbuild.ChronyStageOptions{
|
||||
Refclocks: []osbuild.ChronyConfigRefclock{
|
||||
{
|
||||
Driver: osbuild.NewChronyDriverPHC("/dev/ptp_hyperv"),
|
||||
Poll: common.ToPtr(3),
|
||||
Dpoll: common.ToPtr(-2),
|
||||
Offset: common.ToPtr(0.0),
|
||||
},
|
||||
},
|
||||
},
|
||||
Files: []*fsnode.File{datalossWarningScript},
|
||||
SystemdUnit: []*osbuild.SystemdUnitCreateStageOptions{datalossSystemdUnit},
|
||||
NetworkManager: &osbuild.NMConfStageOptions{
|
||||
Path: "/etc/NetworkManager/conf.d/99-azure-unmanaged-devices.conf",
|
||||
Settings: osbuild.NMConfStageSettings{
|
||||
Keyfile: &osbuild.NMConfSettingsKeyfile{
|
||||
UnmanagedDevices: []string{
|
||||
"driver:mlx4_core",
|
||||
"driver:mlx5_core",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
if rd.IsRHEL() {
|
||||
|
|
|
|||
2
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/bare_metal.go
generated
vendored
2
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/bare_metal.go
generated
vendored
|
|
@ -46,8 +46,6 @@ func mkImageInstallerImgType() *rhel.ImageType {
|
|||
it.DefaultInstallerConfig = &distro.InstallerConfig{
|
||||
AdditionalDracutModules: []string{
|
||||
"nvdimm", // non-volatile DIMM firmware (provides nfit, cuse, and nd_e820)
|
||||
"prefixdevname",
|
||||
"prefixdevname-tools",
|
||||
"net-lib",
|
||||
},
|
||||
AdditionalDrivers: []string{
|
||||
|
|
|
|||
10
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/distro.go
generated
vendored
10
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/distro.go
generated
vendored
|
|
@ -200,8 +200,8 @@ func newDistro(name string, major, minor int) *rhel.Distribution {
|
|||
},
|
||||
}
|
||||
|
||||
x86_64.AddImageTypes(azureX64Platform, mkAzureImgType(rd))
|
||||
aarch64.AddImageTypes(azureAarch64Platform, mkAzureImgType(rd))
|
||||
x86_64.AddImageTypes(azureX64Platform, mkAzureImgType(rd, azureX64Platform.GetArch()))
|
||||
aarch64.AddImageTypes(azureAarch64Platform, mkAzureImgType(rd, azureAarch64Platform.GetArch()))
|
||||
|
||||
gceX86Platform := &platform.X86{
|
||||
UEFIVendor: rd.Vendor(),
|
||||
|
|
@ -246,10 +246,10 @@ func newDistro(name string, major, minor int) *rhel.Distribution {
|
|||
)
|
||||
|
||||
if rd.IsRHEL() { // RHEL-only (non-CentOS) image types
|
||||
x86_64.AddImageTypes(azureX64Platform, mkAzureInternalImgType(rd))
|
||||
aarch64.AddImageTypes(azureAarch64Platform, mkAzureInternalImgType(rd))
|
||||
x86_64.AddImageTypes(azureX64Platform, mkAzureInternalImgType(rd, azureX64Platform.GetArch()))
|
||||
aarch64.AddImageTypes(azureAarch64Platform, mkAzureInternalImgType(rd, azureAarch64Platform.GetArch()))
|
||||
|
||||
x86_64.AddImageTypes(azureX64Platform, mkAzureSapInternalImgType(rd))
|
||||
x86_64.AddImageTypes(azureX64Platform, mkAzureSapInternalImgType(rd, azureX64Platform.GetArch()))
|
||||
|
||||
x86_64.AddImageTypes(ec2X86Platform, mkEc2ImgTypeX86_64(), mkEc2HaImgTypeX86_64(), mkEC2SapImgTypeX86_64(rd.OsVersion()))
|
||||
aarch64.AddImageTypes(ec2Aarch64Platform, mkEC2ImgTypeAarch64())
|
||||
|
|
|
|||
13
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/sap.go
generated
vendored
13
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/sap.go
generated
vendored
|
|
@ -1,6 +1,7 @@
|
|||
package rhel10
|
||||
|
||||
import (
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/osbuild"
|
||||
)
|
||||
|
|
@ -103,16 +104,6 @@ func sapImageConfig(osVersion string) *distro.ImageConfig {
|
|||
),
|
||||
},
|
||||
// E4S/EUS
|
||||
DNFConfig: []*osbuild.DNFConfigStageOptions{
|
||||
osbuild.NewDNFConfigStageOptions(
|
||||
[]osbuild.DNFVariable{
|
||||
{
|
||||
Name: "releasever",
|
||||
Value: osVersion,
|
||||
},
|
||||
},
|
||||
nil,
|
||||
),
|
||||
},
|
||||
DNFSetReleaseVerVar: common.ToPtr(true),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
12
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/ami.go
generated
vendored
12
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/ami.go
generated
vendored
|
|
@ -39,7 +39,7 @@ func mkAmiImgTypeX86_64() *rhel.ImageType {
|
|||
it.KernelOptions = amiX86KernelOptions()
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.BasePartitionTables = ec2PartitionTables
|
||||
it.BasePartitionTables = partitionTables
|
||||
|
||||
return it
|
||||
}
|
||||
|
|
@ -63,7 +63,7 @@ func mkEc2ImgTypeX86_64(rd *rhel.Distribution) *rhel.ImageType {
|
|||
it.KernelOptions = amiX86KernelOptions()
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.BasePartitionTables = ec2PartitionTables
|
||||
it.BasePartitionTables = partitionTables
|
||||
|
||||
return it
|
||||
}
|
||||
|
|
@ -87,7 +87,7 @@ func mkEc2HaImgTypeX86_64(rd *rhel.Distribution) *rhel.ImageType {
|
|||
it.KernelOptions = amiX86KernelOptions()
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.BasePartitionTables = ec2PartitionTables
|
||||
it.BasePartitionTables = partitionTables
|
||||
|
||||
return it
|
||||
}
|
||||
|
|
@ -110,7 +110,7 @@ func mkAmiImgTypeAarch64() *rhel.ImageType {
|
|||
it.KernelOptions = amiAarch64KernelOptions()
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.BasePartitionTables = ec2PartitionTables
|
||||
it.BasePartitionTables = partitionTables
|
||||
|
||||
return it
|
||||
}
|
||||
|
|
@ -134,7 +134,7 @@ func mkEc2ImgTypeAarch64(rd *rhel.Distribution) *rhel.ImageType {
|
|||
it.KernelOptions = amiAarch64KernelOptions()
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.BasePartitionTables = ec2PartitionTables
|
||||
it.BasePartitionTables = partitionTables
|
||||
|
||||
return it
|
||||
}
|
||||
|
|
@ -158,7 +158,7 @@ func mkEc2SapImgTypeX86_64(rd *rhel.Distribution) *rhel.ImageType {
|
|||
it.KernelOptions = amiSapKernelOptions()
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.BasePartitionTables = ec2PartitionTables
|
||||
it.BasePartitionTables = partitionTables
|
||||
|
||||
return it
|
||||
}
|
||||
|
|
|
|||
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
|
|
@ -83,7 +83,7 @@ func mkAzureByosImgType() *rhel.ImageType {
|
|||
it.KernelOptions = defaultAzureKernelOptions()
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 4 * datasizes.GibiByte
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
it.BasePartitionTables = partitionTables
|
||||
|
||||
return it
|
||||
}
|
||||
|
|
@ -107,7 +107,7 @@ func mkAzureImgType() *rhel.ImageType {
|
|||
it.KernelOptions = defaultAzureKernelOptions()
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 4 * datasizes.GibiByte
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
it.BasePartitionTables = partitionTables
|
||||
|
||||
return it
|
||||
}
|
||||
|
|
|
|||
2
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/bare_metal.go
generated
vendored
2
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/bare_metal.go
generated
vendored
|
|
@ -30,8 +30,6 @@ func mkImageInstaller() *rhel.ImageType {
|
|||
|
||||
it.DefaultInstallerConfig = &distro.InstallerConfig{
|
||||
AdditionalDracutModules: []string{
|
||||
"prefixdevname",
|
||||
"prefixdevname-tools",
|
||||
"ifcfg",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
8
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/edge.go
generated
vendored
8
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/edge.go
generated
vendored
|
|
@ -88,7 +88,7 @@ func mkEdgeRawImgType() *rhel.ImageType {
|
|||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.RPMOSTree = true
|
||||
it.Bootable = true
|
||||
it.BasePartitionTables = edgeBasePartitionTables
|
||||
it.BasePartitionTables = partitionTables
|
||||
it.UnsupportedPartitioningModes = []disk.PartitioningMode{
|
||||
disk.AutoLVMPartitioningMode,
|
||||
disk.LVMPartitioningMode,
|
||||
|
|
@ -117,8 +117,6 @@ func mkEdgeInstallerImgType(rd *rhel.Distribution) *rhel.ImageType {
|
|||
}
|
||||
it.DefaultInstallerConfig = &distro.InstallerConfig{
|
||||
AdditionalDracutModules: []string{
|
||||
"prefixdevname",
|
||||
"prefixdevname-tools",
|
||||
"ifcfg",
|
||||
},
|
||||
}
|
||||
|
|
@ -164,7 +162,7 @@ func mkEdgeSimplifiedInstallerImgType(rd *rhel.Distribution) *rhel.ImageType {
|
|||
it.Bootable = true
|
||||
it.BootISO = true
|
||||
it.ISOLabelFn = distroISOLabelFunc
|
||||
it.BasePartitionTables = edgeBasePartitionTables
|
||||
it.BasePartitionTables = partitionTables
|
||||
it.UnsupportedPartitioningModes = []disk.PartitioningMode{
|
||||
disk.AutoLVMPartitioningMode,
|
||||
disk.LVMPartitioningMode,
|
||||
|
|
@ -197,7 +195,7 @@ func mkMinimalRawImgType() *rhel.ImageType {
|
|||
it.KernelOptions = []string{"ro"}
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 2 * datasizes.GibiByte
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
it.BasePartitionTables = partitionTables
|
||||
|
||||
return it
|
||||
}
|
||||
|
|
|
|||
4
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/gce.go
generated
vendored
4
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/gce.go
generated
vendored
|
|
@ -32,7 +32,7 @@ func mkGceImgType(rd distro.Distro) *rhel.ImageType {
|
|||
it.Bootable = true
|
||||
it.DefaultSize = 20 * datasizes.GibiByte
|
||||
// TODO: the base partition table still contains the BIOS boot partition, but the image is UEFI-only
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
it.BasePartitionTables = partitionTables
|
||||
|
||||
return it
|
||||
}
|
||||
|
|
@ -56,7 +56,7 @@ func mkGceRhuiImgType(rd distro.Distro) *rhel.ImageType {
|
|||
it.Bootable = true
|
||||
it.DefaultSize = 20 * datasizes.GibiByte
|
||||
// TODO: the base partition table still contains the BIOS boot partition, but the image is UEFI-only
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
it.BasePartitionTables = partitionTables
|
||||
|
||||
return it
|
||||
}
|
||||
|
|
|
|||
403
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/partition_tables.go
generated
vendored
403
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/partition_tables.go
generated
vendored
|
|
@ -1,404 +1,23 @@
|
|||
package rhel8
|
||||
|
||||
import (
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/arch"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"errors"
|
||||
|
||||
"github.com/osbuild/images/pkg/disk"
|
||||
"github.com/osbuild/images/pkg/distro/defs"
|
||||
"github.com/osbuild/images/pkg/distro/rhel"
|
||||
)
|
||||
|
||||
func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
||||
switch t.Arch().Name() {
|
||||
case arch.ARCH_X86_64.String():
|
||||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: disk.PT_GPT,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 1 * datasizes.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
},
|
||||
{
|
||||
Size: 100 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
}, true
|
||||
|
||||
case arch.ARCH_AARCH64.String():
|
||||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: disk.PT_GPT,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 100 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
}, true
|
||||
|
||||
case arch.ARCH_PPC64LE.String():
|
||||
return disk.PartitionTable{
|
||||
UUID: "0x14fc63d2",
|
||||
Type: disk.PT_DOS,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 4 * datasizes.MebiByte,
|
||||
Type: disk.PRepPartitionDOSID,
|
||||
Bootable: true,
|
||||
},
|
||||
{
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
}, true
|
||||
|
||||
case arch.ARCH_S390X.String():
|
||||
return disk.PartitionTable{
|
||||
UUID: "0x14fc63d2",
|
||||
Type: disk.PT_DOS,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Bootable: true,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
}, true
|
||||
|
||||
default:
|
||||
func partitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
||||
partitionTable, err := defs.PartitionTable(t, nil)
|
||||
if errors.Is(err, defs.ErrNoPartitionTableForImgType) {
|
||||
return disk.PartitionTable{}, false
|
||||
}
|
||||
}
|
||||
|
||||
func edgeBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
||||
switch t.Arch().Name() {
|
||||
case arch.ARCH_X86_64.String():
|
||||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: disk.PT_GPT,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 1 * datasizes.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
},
|
||||
{
|
||||
Size: 127 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
Label: "EFI-SYSTEM",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 384 * datasizes.MebiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
Label: "boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 1,
|
||||
FSTabPassNo: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.LUKSContainer{
|
||||
Label: "crypt_root",
|
||||
Cipher: "cipher_null",
|
||||
Passphrase: "osbuild",
|
||||
PBKDF: disk.Argon2id{
|
||||
Memory: 32,
|
||||
Iterations: 4,
|
||||
Parallelism: 1,
|
||||
},
|
||||
Clevis: &disk.ClevisBind{
|
||||
Pin: "null",
|
||||
Policy: "{}",
|
||||
RemovePassphrase: true,
|
||||
},
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}, true
|
||||
|
||||
case arch.ARCH_AARCH64.String():
|
||||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: disk.PT_GPT,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 127 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
Label: "EFI-SYSTEM",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 384 * datasizes.MebiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
Label: "boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 1,
|
||||
FSTabPassNo: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.LUKSContainer{
|
||||
Label: "crypt_root",
|
||||
Cipher: "cipher_null",
|
||||
Passphrase: "osbuild",
|
||||
PBKDF: disk.Argon2id{
|
||||
Memory: 32,
|
||||
Iterations: 4,
|
||||
Parallelism: 1,
|
||||
},
|
||||
Clevis: &disk.ClevisBind{
|
||||
Pin: "null",
|
||||
Policy: "{}",
|
||||
RemovePassphrase: true,
|
||||
},
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}, true
|
||||
|
||||
default:
|
||||
return disk.PartitionTable{}, false
|
||||
}
|
||||
}
|
||||
|
||||
func ec2PartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
||||
// x86_64 - without /boot
|
||||
// aarch - <= 8.9 - 512MiB, 8.10 and centos: 1 GiB
|
||||
var aarch64BootSize uint64
|
||||
switch {
|
||||
case common.VersionLessThan(t.Arch().Distro().OsVersion(), "8.10") && t.IsRHEL():
|
||||
aarch64BootSize = 512 * datasizes.MebiByte
|
||||
default:
|
||||
aarch64BootSize = 1 * datasizes.GibiByte
|
||||
}
|
||||
|
||||
x86PartitionTable := disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: disk.PT_GPT,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 1 * datasizes.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
},
|
||||
{
|
||||
Size: 200 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
// RHEL EC2 x86_64 images prior to 8.9 support only BIOS boot
|
||||
if common.VersionLessThan(t.Arch().Distro().OsVersion(), "8.9") && t.IsRHEL() {
|
||||
x86PartitionTable = disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: disk.PT_GPT,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 1 * datasizes.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
},
|
||||
{
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
switch t.Arch().Name() {
|
||||
case arch.ARCH_X86_64.String():
|
||||
return x86PartitionTable, true
|
||||
|
||||
case arch.ARCH_AARCH64.String():
|
||||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: disk.PT_GPT,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 200 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: aarch64BootSize,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
}, true
|
||||
|
||||
default:
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if partitionTable == nil {
|
||||
return disk.PartitionTable{}, false
|
||||
}
|
||||
return *partitionTable, true
|
||||
}
|
||||
|
|
|
|||
6
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/qcow2.go
generated
vendored
6
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/qcow2.go
generated
vendored
|
|
@ -26,7 +26,7 @@ func mkQcow2ImgType(rd *rhel.Distribution) *rhel.ImageType {
|
|||
it.KernelOptions = []string{"console=tty0", "console=ttyS0,115200n8", "no_timer_check", "net.ifnames=0", "crashkernel=auto"}
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
it.BasePartitionTables = partitionTables
|
||||
|
||||
return it
|
||||
}
|
||||
|
|
@ -49,7 +49,7 @@ func mkOCIImgType(rd *rhel.Distribution) *rhel.ImageType {
|
|||
it.KernelOptions = []string{"console=tty0", "console=ttyS0,115200n8", "no_timer_check", "net.ifnames=0", "crashkernel=auto"}
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
it.BasePartitionTables = partitionTables
|
||||
|
||||
return it
|
||||
}
|
||||
|
|
@ -71,7 +71,7 @@ func mkOpenstackImgType() *rhel.ImageType {
|
|||
it.KernelOptions = []string{"ro", "net.ifnames=0"}
|
||||
it.DefaultSize = 4 * datasizes.GibiByte
|
||||
it.Bootable = true
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
it.BasePartitionTables = partitionTables
|
||||
|
||||
return it
|
||||
}
|
||||
|
|
|
|||
12
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/sap.go
generated
vendored
12
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/sap.go
generated
vendored
|
|
@ -107,17 +107,7 @@ func sapImageConfig(rd distro.Distro) *distro.ImageConfig {
|
|||
|
||||
if common.VersionLessThan(rd.OsVersion(), "8.10") {
|
||||
// E4S/EUS
|
||||
ic.DNFConfig = []*osbuild.DNFConfigStageOptions{
|
||||
osbuild.NewDNFConfigStageOptions(
|
||||
[]osbuild.DNFVariable{
|
||||
{
|
||||
Name: "releasever",
|
||||
Value: rd.OsVersion(),
|
||||
},
|
||||
},
|
||||
nil,
|
||||
),
|
||||
}
|
||||
ic.DNFSetReleaseVerVar = common.ToPtr(true)
|
||||
}
|
||||
|
||||
return ic
|
||||
|
|
|
|||
4
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/vmdk.go
generated
vendored
4
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/vmdk.go
generated
vendored
|
|
@ -26,7 +26,7 @@ func mkVmdkImgType() *rhel.ImageType {
|
|||
it.KernelOptions = vmdkKernelOptions()
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 4 * datasizes.GibiByte
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
it.BasePartitionTables = partitionTables
|
||||
|
||||
return it
|
||||
}
|
||||
|
|
@ -48,7 +48,7 @@ func mkOvaImgType() *rhel.ImageType {
|
|||
it.KernelOptions = vmdkKernelOptions()
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 4 * datasizes.GibiByte
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
it.BasePartitionTables = partitionTables
|
||||
|
||||
return it
|
||||
}
|
||||
|
|
|
|||
46
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/azure.go
generated
vendored
46
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/azure.go
generated
vendored
|
|
@ -1,13 +1,8 @@
|
|||
package rhel9
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/arch"
|
||||
"github.com/osbuild/images/pkg/customizations/fsnode"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/disk"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
|
|
@ -338,9 +333,6 @@ func defaultAzureKernelOptions(rd *rhel.Distribution, a arch.Arch) []string {
|
|||
return kargs
|
||||
}
|
||||
|
||||
//go:embed temp-disk-dataloss-warning.sh
|
||||
var datalossWarningScriptContent string
|
||||
|
||||
// based on https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/deploying_rhel_9_on_microsoft_azure/assembly_deploying-a-rhel-image-as-a-virtual-machine-on-microsoft-azure_cloud-content-azure#making-configuration-changes_configure-the-image-azure
|
||||
func defaultAzureImageConfig(rd *rhel.Distribution) *distro.ImageConfig {
|
||||
ic := &distro.ImageConfig{
|
||||
|
|
@ -523,7 +515,7 @@ func defaultAzureImageConfig(rd *rhel.Distribution) *distro.ImageConfig {
|
|||
},
|
||||
}
|
||||
|
||||
datalossWarningScript, datalossSystemdUnit, err := CreateAzureDatalossWarningScriptAndUnit()
|
||||
datalossWarningScript, datalossSystemdUnit, err := rhel.CreateAzureDatalossWarningScriptAndUnit()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
@ -550,39 +542,3 @@ func defaultAzureImageConfig(rd *rhel.Distribution) *distro.ImageConfig {
|
|||
func sapAzureImageConfig(rd *rhel.Distribution) *distro.ImageConfig {
|
||||
return sapImageConfig(rd.OsVersion()).InheritFrom(defaultAzureImageConfig(rd))
|
||||
}
|
||||
|
||||
// Returns a filenode that embeds a script and a systemd unit to run it on
|
||||
// every boot.
|
||||
// The script writes a file named DATALOSS_WARNING_README.txt to the root of an
|
||||
// Azure ephemeral resource disk, if one is mounted, as a warning against using
|
||||
// the disk for data storage.
|
||||
// https://docs.microsoft.com/en-us/azure/virtual-machines/linux/managed-disks-overview#temporary-disk
|
||||
func CreateAzureDatalossWarningScriptAndUnit() (*fsnode.File, *osbuild.SystemdUnitCreateStageOptions, error) {
|
||||
datalossWarningScriptPath := "/usr/local/sbin/temp-disk-dataloss-warning"
|
||||
datalossWarningScript, err := fsnode.NewFile(datalossWarningScriptPath, common.ToPtr(os.FileMode(0755)), nil, nil, []byte(datalossWarningScriptContent))
|
||||
if err != nil {
|
||||
return nil, nil, fmt.Errorf("rhel9/azure: error creating file node for dataloss warning script: %w", err)
|
||||
}
|
||||
|
||||
systemdUnit := &osbuild.SystemdUnitCreateStageOptions{
|
||||
Filename: "temp-disk-dataloss-warning.service",
|
||||
UnitType: osbuild.SystemUnitType,
|
||||
UnitPath: osbuild.EtcUnitPath,
|
||||
Config: osbuild.SystemdUnit{
|
||||
Unit: &osbuild.UnitSection{
|
||||
Description: "Azure temporary resource disk dataloss warning file creation",
|
||||
After: []string{"multi-user.target", "cloud-final.service"},
|
||||
},
|
||||
Service: &osbuild.ServiceSection{
|
||||
Type: osbuild.OneshotServiceType,
|
||||
ExecStart: []string{datalossWarningScriptPath},
|
||||
StandardOutput: "journal+console",
|
||||
},
|
||||
Install: &osbuild.InstallSection{
|
||||
WantedBy: []string{"default.target"},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
return datalossWarningScript, systemdUnit, nil
|
||||
}
|
||||
|
|
|
|||
2
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/bare_metal.go
generated
vendored
2
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/bare_metal.go
generated
vendored
|
|
@ -47,8 +47,6 @@ func mkImageInstallerImgType() *rhel.ImageType {
|
|||
it.DefaultInstallerConfig = &distro.InstallerConfig{
|
||||
AdditionalDracutModules: []string{
|
||||
"nvdimm", // non-volatile DIMM firmware (provides nfit, cuse, and nd_e820)
|
||||
"prefixdevname",
|
||||
"prefixdevname-tools",
|
||||
"ifcfg",
|
||||
},
|
||||
AdditionalDrivers: []string{
|
||||
|
|
|
|||
2
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/edge.go
generated
vendored
2
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/edge.go
generated
vendored
|
|
@ -143,8 +143,6 @@ func mkEdgeInstallerImgType() *rhel.ImageType {
|
|||
it.DefaultInstallerConfig = &distro.InstallerConfig{
|
||||
AdditionalDracutModules: []string{
|
||||
"nvdimm", // non-volatile DIMM firmware (provides nfit, cuse, and nd_e820)
|
||||
"prefixdevname",
|
||||
"prefixdevname-tools",
|
||||
"ifcfg",
|
||||
},
|
||||
AdditionalDrivers: []string{
|
||||
|
|
|
|||
233
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/partition_tables.go
generated
vendored
233
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/partition_tables.go
generated
vendored
|
|
@ -1,236 +1,19 @@
|
|||
package rhel9
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/arch"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/disk"
|
||||
"github.com/osbuild/images/pkg/distro/defs"
|
||||
"github.com/osbuild/images/pkg/distro/rhel"
|
||||
)
|
||||
|
||||
func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
||||
var bootSize uint64
|
||||
switch {
|
||||
case common.VersionLessThan(t.Arch().Distro().OsVersion(), "9.3") && t.IsRHEL():
|
||||
// RHEL <= 9.2 had only 500 MiB /boot
|
||||
bootSize = 500 * datasizes.MebiByte
|
||||
case common.VersionLessThan(t.Arch().Distro().OsVersion(), "9.4") && t.IsRHEL():
|
||||
// RHEL 9.3 had 600 MiB /boot, see RHEL-7999
|
||||
bootSize = 600 * datasizes.MebiByte
|
||||
default:
|
||||
// RHEL >= 9.4 needs to have even a bigger /boot, see COMPOSER-2155
|
||||
bootSize = 1 * datasizes.GibiByte
|
||||
}
|
||||
|
||||
switch t.Arch().Name() {
|
||||
case arch.ARCH_X86_64.String():
|
||||
// RHEL EC2 x86_64 images prior to 9.3 support only BIOS boot
|
||||
if common.VersionLessThan(t.Arch().Distro().OsVersion(), "9.3") && t.IsRHEL() && (strings.HasPrefix(t.Name(), "ec2") || t.Name() == "ami") {
|
||||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: disk.PT_GPT,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 1 * datasizes.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
},
|
||||
{
|
||||
Size: bootSize,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
Label: "boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
}, true
|
||||
}
|
||||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: disk.PT_GPT,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 1 * datasizes.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
},
|
||||
{
|
||||
Size: 200 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
Label: "EFI-SYSTEM",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: bootSize,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
Label: "boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
}, true
|
||||
case arch.ARCH_AARCH64.String():
|
||||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: disk.PT_GPT,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 200 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
Label: "EFI-SYSTEM",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: bootSize,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.DataPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
Label: "boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
}, true
|
||||
case arch.ARCH_PPC64LE.String():
|
||||
return disk.PartitionTable{
|
||||
UUID: "0x14fc63d2",
|
||||
Type: disk.PT_DOS,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 4 * datasizes.MebiByte,
|
||||
Type: disk.PRepPartitionDOSID,
|
||||
Bootable: true,
|
||||
},
|
||||
{
|
||||
Size: bootSize,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
Label: "boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
}, true
|
||||
|
||||
case arch.ARCH_S390X.String():
|
||||
return disk.PartitionTable{
|
||||
UUID: "0x14fc63d2",
|
||||
Type: disk.PT_DOS,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: bootSize,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
Label: "boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Bootable: true,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
}, true
|
||||
|
||||
default:
|
||||
partitionTable, err := defs.PartitionTable(t, nil)
|
||||
if err != nil {
|
||||
// XXX: have a check to differenciate ErrNoEnt and else
|
||||
return disk.PartitionTable{}, false
|
||||
}
|
||||
if partitionTable == nil {
|
||||
return disk.PartitionTable{}, false
|
||||
}
|
||||
return *partitionTable, true
|
||||
}
|
||||
|
|
|
|||
13
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/sap.go
generated
vendored
13
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/sap.go
generated
vendored
|
|
@ -1,6 +1,7 @@
|
|||
package rhel9
|
||||
|
||||
import (
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/osbuild"
|
||||
)
|
||||
|
|
@ -103,16 +104,6 @@ func sapImageConfig(osVersion string) *distro.ImageConfig {
|
|||
),
|
||||
},
|
||||
// E4S/EUS
|
||||
DNFConfig: []*osbuild.DNFConfigStageOptions{
|
||||
osbuild.NewDNFConfigStageOptions(
|
||||
[]osbuild.DNFVariable{
|
||||
{
|
||||
Name: "releasever",
|
||||
Value: osVersion,
|
||||
},
|
||||
},
|
||||
nil,
|
||||
),
|
||||
},
|
||||
DNFSetReleaseVerVar: common.ToPtr(true),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
156
vendor/github.com/osbuild/images/pkg/manifest/anaconda_installer.go
generated
vendored
156
vendor/github.com/osbuild/images/pkg/manifest/anaconda_installer.go
generated
vendored
|
|
@ -173,6 +173,8 @@ func (p *AnacondaInstaller) getBuildPackages(Distro) []string {
|
|||
return packages
|
||||
}
|
||||
|
||||
// getPackageSetChain returns the packages to install
|
||||
// It will also include weak deps for the Live installer type
|
||||
func (p *AnacondaInstaller) getPackageSetChain(Distro) []rpmmd.PackageSet {
|
||||
packages := p.anacondaBootPackageSet()
|
||||
|
||||
|
|
@ -189,7 +191,7 @@ func (p *AnacondaInstaller) getPackageSetChain(Distro) []rpmmd.PackageSet {
|
|||
Include: append(packages, p.ExtraPackages...),
|
||||
Exclude: p.ExcludePackages,
|
||||
Repositories: append(p.repos, p.ExtraRepos...),
|
||||
InstallWeakDeps: true,
|
||||
InstallWeakDeps: p.Type == AnacondaInstallerTypeLive,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
@ -229,8 +231,13 @@ func (p *AnacondaInstaller) serialize() osbuild.Pipeline {
|
|||
}
|
||||
|
||||
pipeline := p.Base.serialize()
|
||||
options := osbuild.NewRPMStageOptions(p.repos)
|
||||
// Documentation is only installed on live installer images
|
||||
if p.Type != AnacondaInstallerTypeLive {
|
||||
options.Exclude = &osbuild.Exclude{Docs: true}
|
||||
}
|
||||
|
||||
pipeline.AddStage(osbuild.NewRPMStage(osbuild.NewRPMStageOptions(p.repos), osbuild.NewRpmStageSourceFilesInputs(p.packageSpecs)))
|
||||
pipeline.AddStage(osbuild.NewRPMStage(options, osbuild.NewRpmStageSourceFilesInputs(p.packageSpecs)))
|
||||
pipeline.AddStage(osbuild.NewBuildstampStage(&osbuild.BuildstampStageOptions{
|
||||
Arch: p.platform.GetArch().String(),
|
||||
Product: p.product,
|
||||
|
|
@ -266,6 +273,13 @@ func (p *AnacondaInstaller) serialize() osbuild.Pipeline {
|
|||
return pipeline
|
||||
}
|
||||
|
||||
// payloadStages creates the stages needed to boot Anaconda
|
||||
// - root and install users
|
||||
// - lorax postinstall templates to setup the boot environment
|
||||
// - Anaconda spoke configuration
|
||||
// - Generic initrd with support for the boot iso
|
||||
// - SELinux in permissive mode
|
||||
// - Default Anaconda kickstart (optional)
|
||||
func (p *AnacondaInstaller) payloadStages() []*osbuild.Stage {
|
||||
stages := make([]*osbuild.Stage, 0)
|
||||
|
||||
|
|
@ -290,14 +304,6 @@ func (p *AnacondaInstaller) payloadStages() []*osbuild.Stage {
|
|||
}
|
||||
stages = append(stages, osbuild.NewUsersStage(usersStageOptions))
|
||||
|
||||
var LoraxPath string
|
||||
|
||||
if p.UseRHELLoraxTemplates {
|
||||
LoraxPath = "80-rhel/runtime-postinstall.tmpl"
|
||||
} else {
|
||||
LoraxPath = "99-generic/runtime-postinstall.tmpl"
|
||||
}
|
||||
|
||||
var anacondaStageOptions *osbuild.AnacondaStageOptions
|
||||
if p.UseLegacyAnacondaConfig {
|
||||
anacondaStageOptions = osbuild.NewAnacondaStageOptionsLegacy(p.AdditionalAnacondaModules, p.DisabledAnacondaModules)
|
||||
|
|
@ -306,25 +312,17 @@ func (p *AnacondaInstaller) payloadStages() []*osbuild.Stage {
|
|||
}
|
||||
stages = append(stages, osbuild.NewAnacondaStage(anacondaStageOptions))
|
||||
|
||||
LoraxPath := "99-generic/runtime-postinstall.tmpl"
|
||||
if p.UseRHELLoraxTemplates {
|
||||
LoraxPath = "80-rhel/runtime-postinstall.tmpl"
|
||||
}
|
||||
stages = append(stages, osbuild.NewLoraxScriptStage(&osbuild.LoraxScriptStageOptions{
|
||||
Path: LoraxPath,
|
||||
BaseArch: p.platform.GetArch().String(),
|
||||
}))
|
||||
|
||||
dracutModules := append(
|
||||
p.AdditionalDracutModules,
|
||||
"anaconda",
|
||||
"rdma",
|
||||
"rngd",
|
||||
"multipath",
|
||||
"fcoe",
|
||||
"fcoe-uefi",
|
||||
"iscsi",
|
||||
"lunmask",
|
||||
"nfs",
|
||||
)
|
||||
dracutOptions := dracutStageOptions(p.kernelVer, p.Biosdevname, dracutModules)
|
||||
dracutOptions.AddDrivers = p.AdditionalDrivers
|
||||
// Create a generic initrd suitable for booting Anaconda and activating supported hardware
|
||||
dracutOptions := p.dracutStageOptions()
|
||||
stages = append(stages, osbuild.NewDracutStage(dracutOptions))
|
||||
|
||||
stages = append(stages, osbuild.NewSELinuxConfigStage(&osbuild.SELinuxConfigStageOptions{State: osbuild.SELinuxStatePermissive}))
|
||||
|
|
@ -360,6 +358,13 @@ func (p *AnacondaInstaller) payloadStages() []*osbuild.Stage {
|
|||
return stages
|
||||
}
|
||||
|
||||
// liveStages creates the stages needed to boot a live image with Anaconda installed
|
||||
// - root user
|
||||
// - livesys service to setup the live environment
|
||||
// - Configure GNOME livesys session
|
||||
// - Generic initrd with support for the boot iso
|
||||
// - SELinux in permissive mode
|
||||
// - Default Anaconda kickstart (optional)
|
||||
func (p *AnacondaInstaller) liveStages() []*osbuild.Stage {
|
||||
stages := make([]*osbuild.Stage, 0)
|
||||
|
||||
|
|
@ -390,14 +395,8 @@ func (p *AnacondaInstaller) liveStages() []*osbuild.Stage {
|
|||
|
||||
stages = append(stages, osbuild.GenFileNodesStages(p.Files)...)
|
||||
|
||||
dracutModules := append(
|
||||
p.AdditionalDracutModules,
|
||||
"anaconda",
|
||||
"rdma",
|
||||
"rngd",
|
||||
)
|
||||
dracutOptions := dracutStageOptions(p.kernelVer, p.Biosdevname, dracutModules)
|
||||
dracutOptions.AddDrivers = p.AdditionalDrivers
|
||||
// Create a generic initrd suitable for booting the live iso and activating supported hardware
|
||||
dracutOptions := p.dracutStageOptions()
|
||||
stages = append(stages, osbuild.NewDracutStage(dracutOptions))
|
||||
|
||||
if p.SElinux != "" {
|
||||
|
|
@ -409,57 +408,56 @@ func (p *AnacondaInstaller) liveStages() []*osbuild.Stage {
|
|||
return stages
|
||||
}
|
||||
|
||||
func dracutStageOptions(kernelVer string, biosdevname bool, additionalModules []string) *osbuild.DracutStageOptions {
|
||||
kernel := []string{kernelVer}
|
||||
modules := []string{
|
||||
"bash",
|
||||
"systemd",
|
||||
"fips",
|
||||
"systemd-initrd",
|
||||
"modsign",
|
||||
"nss-softokn",
|
||||
"i18n",
|
||||
"convertfs",
|
||||
"network-manager",
|
||||
"network",
|
||||
"url-lib",
|
||||
"drm",
|
||||
"plymouth",
|
||||
"crypt",
|
||||
"dm",
|
||||
"dmsquash-live",
|
||||
"kernel-modules",
|
||||
"kernel-modules-extra",
|
||||
"kernel-network-modules",
|
||||
"livenet",
|
||||
"lvm",
|
||||
"mdraid",
|
||||
"qemu",
|
||||
"qemu-net",
|
||||
"resume",
|
||||
"rootfs-block",
|
||||
"terminfo",
|
||||
"udev-rules",
|
||||
"dracut-systemd",
|
||||
"pollcdrom",
|
||||
"usrmount",
|
||||
"base",
|
||||
"fs-lib",
|
||||
"img-lib",
|
||||
"shutdown",
|
||||
"uefi-lib",
|
||||
// dracutStageOptions returns the basic dracut setup with anaconda support
|
||||
// This is based on the dracut generic config (also called no-hostonly) with
|
||||
// additional modules needed to support booting the iso and running Anaconda.
|
||||
//
|
||||
// NOTE: The goal is to let dracut maintain support for most of the modules and
|
||||
// only add what is needed to support the boot iso and anaconda. When new
|
||||
// hardware support is needed in the inird it just needs to be added to dracut,
|
||||
// not everything that uses dracut (eg. anaconda, lorax, osbuild).
|
||||
func (p *AnacondaInstaller) dracutStageOptions() *osbuild.DracutStageOptions {
|
||||
// Common settings
|
||||
options := osbuild.DracutStageOptions{
|
||||
Kernel: []string{p.kernelVer},
|
||||
EarlyMicrocode: false,
|
||||
AddModules: []string{"pollcdrom", "qemu", "qemu-net"},
|
||||
Extra: []string{"--xz"},
|
||||
AddDrivers: p.AdditionalDrivers,
|
||||
}
|
||||
options.AddModules = append(options.AddModules, p.AdditionalDracutModules...)
|
||||
|
||||
if p.Biosdevname {
|
||||
options.AddModules = append(options.AddModules, "biosdevname")
|
||||
}
|
||||
|
||||
if biosdevname {
|
||||
modules = append(modules, "biosdevname")
|
||||
switch p.Type {
|
||||
case AnacondaInstallerTypePayload:
|
||||
// Lorax calls the boot.iso dracut with:
|
||||
// --nomdadmconf --nolvmconf --xz --install '/.buildstamp' --no-early-microcode
|
||||
// --add 'fips anaconda pollcdrom qemu qemu-net prefixdevname-tools'
|
||||
options.Install = []string{"./buildstamp"}
|
||||
options.AddModules = append(options.AddModules, []string{
|
||||
"fips",
|
||||
"anaconda",
|
||||
"prefixdevname-tools",
|
||||
}...)
|
||||
options.Extra = append(options.Extra, []string{
|
||||
"--nomdadmconf",
|
||||
"--nolvmconf",
|
||||
}...)
|
||||
case AnacondaInstallerTypeLive:
|
||||
// livemedia-creator calls the live iso dracut with:
|
||||
// --xz --no-hostonly -no-early-microcode --debug
|
||||
// --add 'livenet dmsquash-live dmsquash-live-ntfs convertfs pollcdrom qemu qemu-net'
|
||||
options.AddModules = append(options.AddModules, []string{
|
||||
"livenet",
|
||||
"dmsquash-live",
|
||||
"convertfs",
|
||||
}...)
|
||||
}
|
||||
|
||||
modules = append(modules, additionalModules...)
|
||||
return &osbuild.DracutStageOptions{
|
||||
Kernel: kernel,
|
||||
Modules: modules,
|
||||
Install: []string{"/.buildstamp"},
|
||||
}
|
||||
return &options
|
||||
}
|
||||
|
||||
func (p *AnacondaInstaller) Platform() platform.Platform {
|
||||
|
|
|
|||
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
|
|
@ -1049,7 +1049,7 @@ github.com/oracle/oci-go-sdk/v54/workrequests
|
|||
## explicit; go 1.22.8
|
||||
github.com/osbuild/blueprint/internal/common
|
||||
github.com/osbuild/blueprint/pkg/blueprint
|
||||
# github.com/osbuild/images v0.139.0
|
||||
# github.com/osbuild/images v0.141.0
|
||||
## explicit; go 1.22.8
|
||||
github.com/osbuild/images/data/dependencies
|
||||
github.com/osbuild/images/data/repositories
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue