deps: update images to 0.94
Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
This commit is contained in:
parent
4f90a757dc
commit
bccd1639af
1096 changed files with 411794 additions and 11488 deletions
21
vendor/github.com/osbuild/images/internal/common/constants.go
generated
vendored
21
vendor/github.com/osbuild/images/internal/common/constants.go
generated
vendored
|
|
@ -1,24 +1,7 @@
|
|||
package common
|
||||
|
||||
import "fmt"
|
||||
|
||||
const (
|
||||
KiloByte = 1000 // kB
|
||||
KibiByte = 1024 // KiB
|
||||
MegaByte = 1000 * 1000 // MB
|
||||
MebiByte = 1024 * 1024 // MiB
|
||||
GigaByte = 1000 * 1000 * 1000 // GB
|
||||
GibiByte = 1024 * 1024 * 1024 // GiB
|
||||
TeraByte = 1000 * 1000 * 1000 * 1000 // TB
|
||||
TebiByte = 1024 * 1024 * 1024 * 1024 // TiB
|
||||
|
||||
// shorthands
|
||||
KiB = KibiByte
|
||||
MB = MegaByte
|
||||
MiB = MebiByte
|
||||
GB = GigaByte
|
||||
GiB = GibiByte
|
||||
TiB = TebiByte
|
||||
import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// These constants are set during buildtime using additional
|
||||
|
|
|
|||
50
vendor/github.com/osbuild/images/internal/common/helpers.go
generated
vendored
50
vendor/github.com/osbuild/images/internal/common/helpers.go
generated
vendored
|
|
@ -5,9 +5,7 @@ import (
|
|||
"fmt"
|
||||
"io"
|
||||
"os/exec"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
|
@ -27,54 +25,6 @@ func IsStringInSortedSlice(slice []string, s string) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
// DataSizeToUint64 converts a size specified as a string in KB/KiB/MB/etc. to
|
||||
// a number of bytes represented by uint64.
|
||||
func DataSizeToUint64(size string) (uint64, error) {
|
||||
// Pre-process the input
|
||||
size = strings.TrimSpace(size)
|
||||
|
||||
// Get the number from the string
|
||||
plain_number := regexp.MustCompile(`[[:digit:]]+`)
|
||||
number_as_str := plain_number.FindString(size)
|
||||
if number_as_str == "" {
|
||||
return 0, fmt.Errorf("the size string doesn't contain any number: %s", size)
|
||||
}
|
||||
|
||||
// Parse the number into integer
|
||||
return_size, err := strconv.ParseUint(number_as_str, 10, 64)
|
||||
if err != nil {
|
||||
return 0, fmt.Errorf("failed to parse size as integer: %s", number_as_str)
|
||||
}
|
||||
|
||||
// List of all supported units (from kB to TB and KiB to TiB)
|
||||
supported_units := []struct {
|
||||
re *regexp.Regexp
|
||||
multiple uint64
|
||||
}{
|
||||
{regexp.MustCompile(`^\s*[[:digit:]]+\s*kB$`), KiloByte},
|
||||
{regexp.MustCompile(`^\s*[[:digit:]]+\s*KiB$`), KibiByte},
|
||||
{regexp.MustCompile(`^\s*[[:digit:]]+\s*MB$`), MegaByte},
|
||||
{regexp.MustCompile(`^\s*[[:digit:]]+\s*MiB$`), MebiByte},
|
||||
{regexp.MustCompile(`^\s*[[:digit:]]+\s*GB$`), GigaByte},
|
||||
{regexp.MustCompile(`^\s*[[:digit:]]+\s*GiB$`), GibiByte},
|
||||
{regexp.MustCompile(`^\s*[[:digit:]]+\s*TB$`), TeraByte},
|
||||
{regexp.MustCompile(`^\s*[[:digit:]]+\s*TiB$`), TebiByte},
|
||||
{regexp.MustCompile(`^\s*[[:digit:]]+$`), 1},
|
||||
}
|
||||
|
||||
for _, unit := range supported_units {
|
||||
if unit.re.MatchString(size) {
|
||||
return_size *= unit.multiple
|
||||
return return_size, nil
|
||||
}
|
||||
}
|
||||
|
||||
// In case the strign didn't match any of the above regexes, return nil
|
||||
// even if a number was found. This is to prevent users from submitting
|
||||
// unknown units.
|
||||
return 0, fmt.Errorf("unknown data size units in string: %s", size)
|
||||
}
|
||||
|
||||
// NopSeekCloser returns an io.ReadSeekCloser with a no-op Close method
|
||||
// wrapping the provided io.ReadSeeker r.
|
||||
func NopSeekCloser(r io.ReadSeeker) io.ReadSeekCloser {
|
||||
|
|
|
|||
12
vendor/github.com/osbuild/images/pkg/blueprint/filesystem_customizations.go
generated
vendored
12
vendor/github.com/osbuild/images/pkg/blueprint/filesystem_customizations.go
generated
vendored
|
|
@ -5,7 +5,7 @@ import (
|
|||
"errors"
|
||||
"fmt"
|
||||
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/pathpolicy"
|
||||
)
|
||||
|
||||
|
|
@ -26,9 +26,13 @@ func (fsc *FilesystemCustomization) UnmarshalTOML(data interface{}) error {
|
|||
|
||||
switch d["minsize"].(type) {
|
||||
case int64:
|
||||
fsc.MinSize = uint64(d["minsize"].(int64))
|
||||
minSize := d["minsize"].(int64)
|
||||
if minSize < 0 {
|
||||
return fmt.Errorf("TOML unmarshal: minsize cannot be negative")
|
||||
}
|
||||
fsc.MinSize = uint64(minSize)
|
||||
case string:
|
||||
minSize, err := common.DataSizeToUint64(d["minsize"].(string))
|
||||
minSize, err := datasizes.Parse(d["minsize"].(string))
|
||||
if err != nil {
|
||||
return fmt.Errorf("TOML unmarshal: minsize is not valid filesystem size (%w)", err)
|
||||
}
|
||||
|
|
@ -59,7 +63,7 @@ func (fsc *FilesystemCustomization) UnmarshalJSON(data []byte) error {
|
|||
case float64:
|
||||
fsc.MinSize = uint64(d["minsize"].(float64))
|
||||
case string:
|
||||
minSize, err := common.DataSizeToUint64(d["minsize"].(string))
|
||||
minSize, err := datasizes.Parse(d["minsize"].(string))
|
||||
if err != nil {
|
||||
return fmt.Errorf("JSON unmarshal: minsize is not valid filesystem size (%w)", err)
|
||||
}
|
||||
|
|
|
|||
20
vendor/github.com/osbuild/images/pkg/datasizes/constants.go
generated
vendored
Normal file
20
vendor/github.com/osbuild/images/pkg/datasizes/constants.go
generated
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
package datasizes
|
||||
|
||||
const (
|
||||
KiloByte = 1000 // kB
|
||||
KibiByte = 1024 // KiB
|
||||
MegaByte = 1000 * 1000 // MB
|
||||
MebiByte = 1024 * 1024 // MiB
|
||||
GigaByte = 1000 * 1000 * 1000 // GB
|
||||
GibiByte = 1024 * 1024 * 1024 // GiB
|
||||
TeraByte = 1000 * 1000 * 1000 * 1000 // TB
|
||||
TebiByte = 1024 * 1024 * 1024 * 1024 // TiB
|
||||
|
||||
// shorthands
|
||||
KiB = KibiByte
|
||||
MB = MegaByte
|
||||
MiB = MebiByte
|
||||
GB = GigaByte
|
||||
GiB = GibiByte
|
||||
TiB = TebiByte
|
||||
)
|
||||
56
vendor/github.com/osbuild/images/pkg/datasizes/parse.go
generated
vendored
Normal file
56
vendor/github.com/osbuild/images/pkg/datasizes/parse.go
generated
vendored
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
package datasizes
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strconv"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// Parse converts a size specified as a string in KB/KiB/MB/etc. to
|
||||
// a number of bytes represented by uint64.
|
||||
func Parse(size string) (uint64, error) {
|
||||
// Pre-process the input
|
||||
size = strings.TrimSpace(size)
|
||||
|
||||
// Get the number from the string
|
||||
plain_number := regexp.MustCompile(`[[:digit:]]+`)
|
||||
number_as_str := plain_number.FindString(size)
|
||||
if number_as_str == "" {
|
||||
return 0, fmt.Errorf("the size string doesn't contain any number: %s", size)
|
||||
}
|
||||
|
||||
// Parse the number into integer
|
||||
return_size, err := strconv.ParseUint(number_as_str, 10, 64)
|
||||
if err != nil {
|
||||
return 0, fmt.Errorf("failed to parse size as integer: %s", number_as_str)
|
||||
}
|
||||
|
||||
// List of all supported units (from kB to TB and KiB to TiB)
|
||||
supported_units := []struct {
|
||||
re *regexp.Regexp
|
||||
multiple uint64
|
||||
}{
|
||||
{regexp.MustCompile(`^\s*[[:digit:]]+\s*kB$`), KiloByte},
|
||||
{regexp.MustCompile(`^\s*[[:digit:]]+\s*KiB$`), KibiByte},
|
||||
{regexp.MustCompile(`^\s*[[:digit:]]+\s*MB$`), MegaByte},
|
||||
{regexp.MustCompile(`^\s*[[:digit:]]+\s*MiB$`), MebiByte},
|
||||
{regexp.MustCompile(`^\s*[[:digit:]]+\s*GB$`), GigaByte},
|
||||
{regexp.MustCompile(`^\s*[[:digit:]]+\s*GiB$`), GibiByte},
|
||||
{regexp.MustCompile(`^\s*[[:digit:]]+\s*TB$`), TeraByte},
|
||||
{regexp.MustCompile(`^\s*[[:digit:]]+\s*TiB$`), TebiByte},
|
||||
{regexp.MustCompile(`^\s*[[:digit:]]+$`), 1},
|
||||
}
|
||||
|
||||
for _, unit := range supported_units {
|
||||
if unit.re.MatchString(size) {
|
||||
return_size *= unit.multiple
|
||||
return return_size, nil
|
||||
}
|
||||
}
|
||||
|
||||
// In case the strign didn't match any of the above regexes, return nil
|
||||
// even if a number was found. This is to prevent users from submitting
|
||||
// unknown units.
|
||||
return 0, fmt.Errorf("unknown data size units in string: %s", size)
|
||||
}
|
||||
4
vendor/github.com/osbuild/images/pkg/disk/luks.go
generated
vendored
4
vendor/github.com/osbuild/images/pkg/disk/luks.go
generated
vendored
|
|
@ -7,7 +7,7 @@ import (
|
|||
|
||||
"github.com/google/uuid"
|
||||
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
)
|
||||
|
||||
// Argon2id defines parameters for the key derivation function for LUKS.
|
||||
|
|
@ -116,7 +116,7 @@ func (lc *LUKSContainer) MetadataSize() uint64 {
|
|||
}
|
||||
|
||||
// 16 MiB is the default size for the LUKS2 header
|
||||
return 16 * common.MiB
|
||||
return 16 * datasizes.MiB
|
||||
}
|
||||
|
||||
func (lc *LUKSContainer) minSize(size uint64) uint64 {
|
||||
|
|
|
|||
6
vendor/github.com/osbuild/images/pkg/disk/lvm.go
generated
vendored
6
vendor/github.com/osbuild/images/pkg/disk/lvm.go
generated
vendored
|
|
@ -5,12 +5,12 @@ import (
|
|||
"reflect"
|
||||
"strings"
|
||||
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
)
|
||||
|
||||
// Default physical extent size in bytes: logical volumes
|
||||
// created inside the VG will be aligned to this.
|
||||
const LVMDefaultExtentSize = 4 * common.MebiByte
|
||||
const LVMDefaultExtentSize = 4 * datasizes.MebiByte
|
||||
|
||||
type LVMVolumeGroup struct {
|
||||
Name string
|
||||
|
|
@ -143,7 +143,7 @@ func (vg *LVMVolumeGroup) MetadataSize() uint64 {
|
|||
// of the metadata and its location and thus the start of the physical
|
||||
// extent. For now we assume the default which results in a start of
|
||||
// the physical extent 1 MiB
|
||||
return 1 * common.MiB
|
||||
return 1 * datasizes.MiB
|
||||
}
|
||||
|
||||
func (vg *LVMVolumeGroup) minSize(size uint64) uint64 {
|
||||
|
|
|
|||
12
vendor/github.com/osbuild/images/pkg/disk/partition_table.go
generated
vendored
12
vendor/github.com/osbuild/images/pkg/disk/partition_table.go
generated
vendored
|
|
@ -7,8 +7,8 @@ import (
|
|||
|
||||
"github.com/google/uuid"
|
||||
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/blueprint"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
)
|
||||
|
||||
type PartitionTable struct {
|
||||
|
|
@ -403,7 +403,7 @@ func (pt *PartitionTable) HeaderSize() uint64 {
|
|||
}
|
||||
|
||||
// calculate the space we need for
|
||||
parts := len(pt.Partitions)
|
||||
parts := uint64(len(pt.Partitions))
|
||||
|
||||
// reserve a minimum of 128 partition entires
|
||||
if parts < 128 {
|
||||
|
|
@ -413,7 +413,7 @@ func (pt *PartitionTable) HeaderSize() uint64 {
|
|||
// Assume that each partition entry is 128 bytes
|
||||
// which might not be the case if the partition
|
||||
// name exceeds 72 bytes
|
||||
header += uint64(parts * 128)
|
||||
header += parts * 128
|
||||
|
||||
return header
|
||||
}
|
||||
|
|
@ -531,7 +531,7 @@ func (pt *PartitionTable) createFilesystem(mountpoint string, size uint64) error
|
|||
|
||||
newVol, err := vc.CreateMountpoint(mountpoint, 0)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed creating volume: " + err.Error())
|
||||
return fmt.Errorf("failed creating volume: %w", err)
|
||||
}
|
||||
vcPath := append([]Entity{newVol}, rootPath[idx:]...)
|
||||
size = alignEntityBranch(vcPath, size)
|
||||
|
|
@ -692,7 +692,7 @@ func (pt *PartitionTable) ensureLVM() error {
|
|||
// we need a /boot partition to boot LVM, ensure one exists
|
||||
bootPath := entityPath(pt, "/boot")
|
||||
if bootPath == nil {
|
||||
_, err := pt.CreateMountpoint("/boot", 512*common.MiB)
|
||||
_, err := pt.CreateMountpoint("/boot", 512*datasizes.MiB)
|
||||
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
@ -751,7 +751,7 @@ func (pt *PartitionTable) ensureBtrfs() error {
|
|||
// we need a /boot partition to boot btrfs, ensure one exists
|
||||
bootPath := entityPath(pt, "/boot")
|
||||
if bootPath == nil {
|
||||
_, err := pt.CreateMountpoint("/boot", 512*common.MiB)
|
||||
_, err := pt.CreateMountpoint("/boot", 512*datasizes.MiB)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create /boot partition when ensuring btrfs: %w", err)
|
||||
}
|
||||
|
|
|
|||
18
vendor/github.com/osbuild/images/pkg/distro/fedora/distro.go
generated
vendored
18
vendor/github.com/osbuild/images/pkg/distro/fedora/distro.go
generated
vendored
|
|
@ -11,6 +11,7 @@ import (
|
|||
"github.com/osbuild/images/pkg/arch"
|
||||
"github.com/osbuild/images/pkg/customizations/fsnode"
|
||||
"github.com/osbuild/images/pkg/customizations/oscap"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/osbuild"
|
||||
"github.com/osbuild/images/pkg/platform"
|
||||
|
|
@ -209,7 +210,7 @@ var (
|
|||
LockRootUser: common.ToPtr(true),
|
||||
IgnitionPlatform: common.ToPtr("metal"),
|
||||
},
|
||||
defaultSize: 10 * common.GibiByte,
|
||||
defaultSize: 10 * datasizes.GibiByte,
|
||||
rpmOstree: true,
|
||||
bootable: true,
|
||||
bootISO: true,
|
||||
|
|
@ -238,7 +239,7 @@ var (
|
|||
LockRootUser: common.ToPtr(true),
|
||||
IgnitionPlatform: common.ToPtr("metal"),
|
||||
},
|
||||
defaultSize: 4 * common.GibiByte,
|
||||
defaultSize: 4 * datasizes.GibiByte,
|
||||
rpmOstree: true,
|
||||
bootable: true,
|
||||
image: iotImage,
|
||||
|
|
@ -268,7 +269,7 @@ var (
|
|||
LockRootUser: common.ToPtr(true),
|
||||
IgnitionPlatform: common.ToPtr("qemu"),
|
||||
},
|
||||
defaultSize: 10 * common.GibiByte,
|
||||
defaultSize: 10 * datasizes.GibiByte,
|
||||
rpmOstree: true,
|
||||
bootable: true,
|
||||
image: iotImage,
|
||||
|
|
@ -292,7 +293,7 @@ var (
|
|||
},
|
||||
kernelOptions: cloudKernelOptions,
|
||||
bootable: true,
|
||||
defaultSize: 5 * common.GibiByte,
|
||||
defaultSize: 5 * datasizes.GibiByte,
|
||||
image: diskImage,
|
||||
buildPipelines: []string{"build"},
|
||||
payloadPipelines: []string{"os", "image", "qcow2"},
|
||||
|
|
@ -320,7 +321,7 @@ var (
|
|||
defaultImageConfig: vmdkDefaultImageConfig,
|
||||
kernelOptions: cloudKernelOptions,
|
||||
bootable: true,
|
||||
defaultSize: 2 * common.GibiByte,
|
||||
defaultSize: 2 * datasizes.GibiByte,
|
||||
image: diskImage,
|
||||
buildPipelines: []string{"build"},
|
||||
payloadPipelines: []string{"os", "image", "vmdk"},
|
||||
|
|
@ -338,7 +339,7 @@ var (
|
|||
defaultImageConfig: vmdkDefaultImageConfig,
|
||||
kernelOptions: cloudKernelOptions,
|
||||
bootable: true,
|
||||
defaultSize: 2 * common.GibiByte,
|
||||
defaultSize: 2 * datasizes.GibiByte,
|
||||
image: diskImage,
|
||||
buildPipelines: []string{"build"},
|
||||
payloadPipelines: []string{"os", "image", "vmdk", "ovf", "archive"},
|
||||
|
|
@ -412,7 +413,7 @@ var (
|
|||
rpmOstree: false,
|
||||
kernelOptions: defaultKernelOptions,
|
||||
bootable: true,
|
||||
defaultSize: 2 * common.GibiByte,
|
||||
defaultSize: 2 * datasizes.GibiByte,
|
||||
image: diskImage,
|
||||
buildPipelines: []string{"build"},
|
||||
payloadPipelines: []string{"os", "image", "xz"},
|
||||
|
|
@ -450,6 +451,9 @@ func getISOLabelFunc(variant string) isoLabelFunc {
|
|||
}
|
||||
|
||||
func getDistro(version int) distribution {
|
||||
if version < 0 {
|
||||
panic("Invalid Fedora version (must be positive)")
|
||||
}
|
||||
return distribution{
|
||||
name: fmt.Sprintf("fedora-%d", version),
|
||||
product: "Fedora",
|
||||
|
|
|
|||
9
vendor/github.com/osbuild/images/pkg/distro/fedora/imagetype.go
generated
vendored
9
vendor/github.com/osbuild/images/pkg/distro/fedora/imagetype.go
generated
vendored
|
|
@ -13,6 +13,7 @@ import (
|
|||
"github.com/osbuild/images/pkg/blueprint"
|
||||
"github.com/osbuild/images/pkg/container"
|
||||
"github.com/osbuild/images/pkg/customizations/oscap"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/disk"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/image"
|
||||
|
|
@ -97,8 +98,8 @@ func (t *imageType) ISOLabel() (string, error) {
|
|||
|
||||
func (t *imageType) Size(size uint64) uint64 {
|
||||
// Microsoft Azure requires vhd images to be rounded up to the nearest MB
|
||||
if t.name == "vhd" && size%common.MebiByte != 0 {
|
||||
size = (size/common.MebiByte + 1) * common.MebiByte
|
||||
if t.name == "vhd" && size%datasizes.MebiByte != 0 {
|
||||
size = (size/datasizes.MebiByte + 1) * datasizes.MebiByte
|
||||
}
|
||||
if size == 0 {
|
||||
size = t.defaultSize
|
||||
|
|
@ -143,7 +144,7 @@ func (t *imageType) getPartitionTable(
|
|||
) (*disk.PartitionTable, error) {
|
||||
basePartitionTable, exists := t.basePartitionTables[t.arch.Name()]
|
||||
if !exists {
|
||||
return nil, fmt.Errorf("unknown arch: " + t.arch.Name())
|
||||
return nil, fmt.Errorf("unknown arch: %s", t.arch.Name())
|
||||
}
|
||||
|
||||
imageSize := t.Size(options.Size)
|
||||
|
|
@ -367,7 +368,7 @@ func (t *imageType) checkOptions(bp *blueprint.Blueprint, options distro.ImageOp
|
|||
if osc := customizations.GetOpenSCAP(); osc != nil {
|
||||
supported := oscap.IsProfileAllowed(osc.ProfileID, oscapProfileAllowList)
|
||||
if !supported {
|
||||
return nil, fmt.Errorf(fmt.Sprintf("OpenSCAP unsupported profile: %s", osc.ProfileID))
|
||||
return nil, fmt.Errorf("OpenSCAP unsupported profile: %s", osc.ProfileID)
|
||||
}
|
||||
if t.rpmOstree {
|
||||
return nil, fmt.Errorf("OpenSCAP customizations are not supported for ostree types")
|
||||
|
|
|
|||
70
vendor/github.com/osbuild/images/pkg/distro/fedora/partition_tables.go
generated
vendored
70
vendor/github.com/osbuild/images/pkg/distro/fedora/partition_tables.go
generated
vendored
|
|
@ -1,8 +1,8 @@
|
|||
package fedora
|
||||
|
||||
import (
|
||||
"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"
|
||||
)
|
||||
|
|
@ -13,13 +13,13 @@ var defaultBasePartitionTables = distro.BasePartitionTableMap{
|
|||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 1 * common.MebiByte,
|
||||
Size: 1 * datasizes.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
},
|
||||
{
|
||||
Size: 200 * common.MebiByte,
|
||||
Size: 200 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -33,7 +33,7 @@ var defaultBasePartitionTables = distro.BasePartitionTableMap{
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Size: 500 * datasizes.MebiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -46,7 +46,7 @@ var defaultBasePartitionTables = distro.BasePartitionTableMap{
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -65,7 +65,7 @@ var defaultBasePartitionTables = distro.BasePartitionTableMap{
|
|||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 200 * common.MebiByte,
|
||||
Size: 200 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -79,7 +79,7 @@ var defaultBasePartitionTables = distro.BasePartitionTableMap{
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Size: 500 * datasizes.MebiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -92,7 +92,7 @@ var defaultBasePartitionTables = distro.BasePartitionTableMap{
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -111,12 +111,12 @@ var defaultBasePartitionTables = distro.BasePartitionTableMap{
|
|||
Type: "dos",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 4 * common.MebiByte,
|
||||
Size: 4 * datasizes.MebiByte,
|
||||
Type: "41",
|
||||
Bootable: true,
|
||||
},
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Size: 500 * datasizes.MebiByte,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "ext4",
|
||||
Mountpoint: "/boot",
|
||||
|
|
@ -127,7 +127,7 @@ var defaultBasePartitionTables = distro.BasePartitionTableMap{
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "ext4",
|
||||
Mountpoint: "/",
|
||||
|
|
@ -144,7 +144,7 @@ var defaultBasePartitionTables = distro.BasePartitionTableMap{
|
|||
Type: "dos",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Size: 500 * datasizes.MebiByte,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "ext4",
|
||||
Mountpoint: "/boot",
|
||||
|
|
@ -155,7 +155,7 @@ var defaultBasePartitionTables = distro.BasePartitionTableMap{
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Bootable: true,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "ext4",
|
||||
|
|
@ -173,10 +173,10 @@ var minimalrawPartitionTables = distro.BasePartitionTableMap{
|
|||
arch.ARCH_X86_64.String(): disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
StartOffset: 8 * common.MebiByte,
|
||||
StartOffset: 8 * datasizes.MebiByte,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 200 * common.MebiByte,
|
||||
Size: 200 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -190,7 +190,7 @@ var minimalrawPartitionTables = distro.BasePartitionTableMap{
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 1 * common.GibiByte,
|
||||
Size: 1 * datasizes.GibiByte,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -203,7 +203,7 @@ var minimalrawPartitionTables = distro.BasePartitionTableMap{
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -220,10 +220,10 @@ var minimalrawPartitionTables = distro.BasePartitionTableMap{
|
|||
arch.ARCH_AARCH64.String(): disk.PartitionTable{
|
||||
UUID: "0xc1748067",
|
||||
Type: "dos",
|
||||
StartOffset: 8 * common.MebiByte,
|
||||
StartOffset: 8 * datasizes.MebiByte,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 200 * common.MebiByte,
|
||||
Size: 200 * datasizes.MebiByte,
|
||||
Type: disk.DosFat16B,
|
||||
Bootable: true,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -237,7 +237,7 @@ var minimalrawPartitionTables = distro.BasePartitionTableMap{
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 1 * common.GibiByte,
|
||||
Size: 1 * datasizes.GibiByte,
|
||||
Type: "83",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "ext4",
|
||||
|
|
@ -249,7 +249,7 @@ var minimalrawPartitionTables = distro.BasePartitionTableMap{
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: "83",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "ext4",
|
||||
|
|
@ -268,10 +268,10 @@ var iotBasePartitionTables = distro.BasePartitionTableMap{
|
|||
arch.ARCH_X86_64.String(): disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
StartOffset: 8 * common.MebiByte,
|
||||
StartOffset: 8 * datasizes.MebiByte,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 501 * common.MebiByte,
|
||||
Size: 501 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -285,7 +285,7 @@ var iotBasePartitionTables = distro.BasePartitionTableMap{
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 1 * common.GibiByte,
|
||||
Size: 1 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -298,7 +298,7 @@ var iotBasePartitionTables = distro.BasePartitionTableMap{
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2569 * common.MebiByte,
|
||||
Size: 2569 * datasizes.MebiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -315,10 +315,10 @@ var iotBasePartitionTables = distro.BasePartitionTableMap{
|
|||
arch.ARCH_AARCH64.String(): disk.PartitionTable{
|
||||
UUID: "0xc1748067",
|
||||
Type: "dos",
|
||||
StartOffset: 8 * common.MebiByte,
|
||||
StartOffset: 8 * datasizes.MebiByte,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 501 * common.MebiByte,
|
||||
Size: 501 * datasizes.MebiByte,
|
||||
Type: disk.DosFat16B,
|
||||
Bootable: true,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -332,7 +332,7 @@ var iotBasePartitionTables = distro.BasePartitionTableMap{
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 1 * common.GibiByte,
|
||||
Size: 1 * datasizes.GibiByte,
|
||||
Type: "83",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "ext4",
|
||||
|
|
@ -344,7 +344,7 @@ var iotBasePartitionTables = distro.BasePartitionTableMap{
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2569 * common.MebiByte,
|
||||
Size: 2569 * datasizes.MebiByte,
|
||||
Type: "83",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "ext4",
|
||||
|
|
@ -365,7 +365,7 @@ var iotSimplifiedInstallerPartitionTables = distro.BasePartitionTableMap{
|
|||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 501 * common.MebiByte,
|
||||
Size: 501 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -379,7 +379,7 @@ var iotSimplifiedInstallerPartitionTables = distro.BasePartitionTableMap{
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 1 * common.GibiByte,
|
||||
Size: 1 * datasizes.GibiByte,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -413,7 +413,7 @@ var iotSimplifiedInstallerPartitionTables = distro.BasePartitionTableMap{
|
|||
Description: "built with lvm2 and osbuild",
|
||||
LogicalVolumes: []disk.LVMLogicalVolume{
|
||||
{
|
||||
Size: 8 * common.GibiByte,
|
||||
Size: 8 * datasizes.GibiByte,
|
||||
Name: "rootlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "ext4",
|
||||
|
|
@ -435,7 +435,7 @@ var iotSimplifiedInstallerPartitionTables = distro.BasePartitionTableMap{
|
|||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 501 * common.MebiByte,
|
||||
Size: 501 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -449,7 +449,7 @@ var iotSimplifiedInstallerPartitionTables = distro.BasePartitionTableMap{
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 1 * common.GibiByte,
|
||||
Size: 1 * datasizes.GibiByte,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -483,7 +483,7 @@ var iotSimplifiedInstallerPartitionTables = distro.BasePartitionTableMap{
|
|||
Description: "built with lvm2 and osbuild",
|
||||
LogicalVolumes: []disk.LVMLogicalVolume{
|
||||
{
|
||||
Size: 8 * common.GibiByte,
|
||||
Size: 8 * datasizes.GibiByte,
|
||||
Name: "rootlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "ext4",
|
||||
|
|
|
|||
2
vendor/github.com/osbuild/images/pkg/distro/fedora/version.go
generated
vendored
2
vendor/github.com/osbuild/images/pkg/distro/fedora/version.go
generated
vendored
|
|
@ -1,4 +1,4 @@
|
|||
package fedora
|
||||
|
||||
const VERSION_BRANCHED = "41"
|
||||
const VERSION_BRANCHED = "42"
|
||||
const VERSION_RAWHIDE = "42"
|
||||
|
|
|
|||
6
vendor/github.com/osbuild/images/pkg/distro/rhel/distribution.go
generated
vendored
6
vendor/github.com/osbuild/images/pkg/distro/rhel/distribution.go
generated
vendored
|
|
@ -109,7 +109,11 @@ func NewDistribution(name string, major, minor int) (*Distribution, error) {
|
|||
var rd *Distribution
|
||||
switch name {
|
||||
case "rhel":
|
||||
if minor == -1 {
|
||||
if major < 0 {
|
||||
return nil, errors.New("Invalid RHEL major version (must be positive)")
|
||||
}
|
||||
|
||||
if minor < 0 {
|
||||
return nil, errors.New("RHEL requires a minor version")
|
||||
}
|
||||
|
||||
|
|
|
|||
6
vendor/github.com/osbuild/images/pkg/distro/rhel/imagetype.go
generated
vendored
6
vendor/github.com/osbuild/images/pkg/distro/rhel/imagetype.go
generated
vendored
|
|
@ -6,11 +6,11 @@ import (
|
|||
|
||||
"slices"
|
||||
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/internal/environment"
|
||||
"github.com/osbuild/images/internal/workload"
|
||||
"github.com/osbuild/images/pkg/blueprint"
|
||||
"github.com/osbuild/images/pkg/container"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/disk"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/image"
|
||||
|
|
@ -140,8 +140,8 @@ func (t *ImageType) ISOLabel() (string, error) {
|
|||
|
||||
func (t *ImageType) Size(size uint64) uint64 {
|
||||
// Microsoft Azure requires vhd images to be rounded up to the nearest MB
|
||||
if t.name == "vhd" && size%common.MebiByte != 0 {
|
||||
size = (size/common.MebiByte + 1) * common.MebiByte
|
||||
if t.name == "vhd" && size%datasizes.MebiByte != 0 {
|
||||
size = (size/datasizes.MebiByte + 1) * datasizes.MebiByte
|
||||
}
|
||||
if size == 0 {
|
||||
size = t.DefaultSize
|
||||
|
|
|
|||
5
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/ami.go
generated
vendored
5
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/ami.go
generated
vendored
|
|
@ -2,6 +2,7 @@ package rhel10
|
|||
|
||||
import (
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/distro/rhel"
|
||||
"github.com/osbuild/images/pkg/osbuild"
|
||||
|
|
@ -217,7 +218,7 @@ func mkAMIImgTypeX86_64() *rhel.ImageType {
|
|||
|
||||
it.KernelOptions = amiKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.DefaultImageConfig = defaultAMIImageConfigX86_64()
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
|
|
@ -241,7 +242,7 @@ func mkAMIImgTypeAarch64() *rhel.ImageType {
|
|||
|
||||
it.KernelOptions = "console=ttyS0,115200n8 console=tty0 nvme_core.io_timeout=4294967295 iommu.strict=0"
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.DefaultImageConfig = defaultAMIImageConfig()
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
|
|
|
|||
5
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/azure.go
generated
vendored
5
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/azure.go
generated
vendored
|
|
@ -2,6 +2,7 @@ package rhel10
|
|||
|
||||
import (
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/distro/rhel"
|
||||
"github.com/osbuild/images/pkg/osbuild"
|
||||
|
|
@ -25,7 +26,7 @@ func mkAzureImgType() *rhel.ImageType {
|
|||
|
||||
it.KernelOptions = defaultAzureKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 4 * common.GibiByte
|
||||
it.DefaultSize = 4 * datasizes.GibiByte
|
||||
it.DefaultImageConfig = defaultAzureImageConfig
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
|
|
@ -49,7 +50,7 @@ func mkAzureByosImgType(rd distro.Distro) *rhel.ImageType {
|
|||
|
||||
it.KernelOptions = defaultAzureKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 4 * common.GibiByte
|
||||
it.DefaultSize = 4 * datasizes.GibiByte
|
||||
it.DefaultImageConfig = defaultAzureImageConfig
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
|
|
|
|||
3
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/gce.go
generated
vendored
3
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/gce.go
generated
vendored
|
|
@ -2,6 +2,7 @@ package rhel10
|
|||
|
||||
import (
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/distro/rhel"
|
||||
"github.com/osbuild/images/pkg/osbuild"
|
||||
|
|
@ -26,7 +27,7 @@ func mkGCEImageType() *rhel.ImageType {
|
|||
|
||||
it.DefaultImageConfig = baseGCEImageConfig()
|
||||
it.KernelOptions = gceKernelOptions
|
||||
it.DefaultSize = 20 * common.GibiByte
|
||||
it.DefaultSize = 20 * datasizes.GibiByte
|
||||
it.Bootable = true
|
||||
// TODO: the base partition table still contains the BIOS boot partition, but the image is UEFI-only
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
|
|
|||
2
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/options.go
generated
vendored
2
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/options.go
generated
vendored
|
|
@ -35,7 +35,7 @@ func checkOptions(t *rhel.ImageType, bp *blueprint.Blueprint, options distro.Ima
|
|||
|
||||
if osc := customizations.GetOpenSCAP(); osc != nil {
|
||||
if !oscap.IsProfileAllowed(osc.ProfileID, oscapProfileAllowList) {
|
||||
return warnings, fmt.Errorf(fmt.Sprintf("OpenSCAP unsupported profile: %s", osc.ProfileID))
|
||||
return warnings, fmt.Errorf("OpenSCAP unsupported profile: %s", osc.ProfileID)
|
||||
}
|
||||
if osc.ProfileID == "" {
|
||||
return warnings, fmt.Errorf("OpenSCAP profile cannot be empty")
|
||||
|
|
|
|||
18
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/partition_tables.go
generated
vendored
18
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/partition_tables.go
generated
vendored
|
|
@ -1,8 +1,8 @@
|
|||
package rhel10
|
||||
|
||||
import (
|
||||
"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/rhel"
|
||||
)
|
||||
|
|
@ -15,13 +15,13 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 1 * common.MebiByte,
|
||||
Size: 1 * datasizes.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
},
|
||||
{
|
||||
Size: 200 * common.MebiByte,
|
||||
Size: 200 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -35,7 +35,7 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -55,7 +55,7 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 200 * common.MebiByte,
|
||||
Size: 200 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -69,7 +69,7 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -89,12 +89,12 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
Type: "dos",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 4 * common.MebiByte,
|
||||
Size: 4 * datasizes.MebiByte,
|
||||
Type: "41",
|
||||
Bootable: true,
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/",
|
||||
|
|
@ -112,7 +112,7 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
Type: "dos",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Bootable: true,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
|
|||
5
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/qcow2.go
generated
vendored
5
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/qcow2.go
generated
vendored
|
|
@ -3,6 +3,7 @@ package rhel10
|
|||
import (
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/customizations/subscription"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/distro/rhel"
|
||||
"github.com/osbuild/images/pkg/rpmmd"
|
||||
|
|
@ -24,7 +25,7 @@ func mkQcow2ImgType(d *rhel.Distribution) *rhel.ImageType {
|
|||
|
||||
it.DefaultImageConfig = qcowImageConfig(d)
|
||||
it.KernelOptions = "console=tty0 console=ttyS0,115200n8 no_timer_check"
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.Bootable = true
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
|
|
@ -47,7 +48,7 @@ func mkOCIImgType(d *rhel.Distribution) *rhel.ImageType {
|
|||
|
||||
it.DefaultImageConfig = qcowImageConfig(d)
|
||||
it.KernelOptions = "console=tty0 console=ttyS0,115200n8 no_timer_check"
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.Bootable = true
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
|
|
|
|||
5
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/vmdk.go
generated
vendored
5
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel10/vmdk.go
generated
vendored
|
|
@ -2,6 +2,7 @@ package rhel10
|
|||
|
||||
import (
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/distro/rhel"
|
||||
"github.com/osbuild/images/pkg/rpmmd"
|
||||
|
|
@ -28,7 +29,7 @@ func mkVMDKImgType() *rhel.ImageType {
|
|||
}
|
||||
it.KernelOptions = vmdkKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 4 * common.GibiByte
|
||||
it.DefaultSize = 4 * datasizes.GibiByte
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
return it
|
||||
|
|
@ -53,7 +54,7 @@ func mkOVAImgType() *rhel.ImageType {
|
|||
}
|
||||
it.KernelOptions = vmdkKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 4 * common.GibiByte
|
||||
it.DefaultSize = 4 * datasizes.GibiByte
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
return it
|
||||
|
|
|
|||
9
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel7/ami.go
generated
vendored
9
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel7/ami.go
generated
vendored
|
|
@ -6,6 +6,7 @@ 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"
|
||||
"github.com/osbuild/images/pkg/distro/rhel"
|
||||
|
|
@ -38,7 +39,7 @@ func mkEc2ImgTypeX86_64() *rhel.ImageType {
|
|||
it.DefaultImageConfig = ec2ImageConfig()
|
||||
it.KernelOptions = ec2KernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.BasePartitionTables = ec2PartitionTables
|
||||
|
||||
return it
|
||||
|
|
@ -259,16 +260,16 @@ func ec2PartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
Size: 10 * common.GibiByte,
|
||||
Size: 10 * datasizes.GibiByte,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 1 * common.MebiByte,
|
||||
Size: 1 * datasizes.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
},
|
||||
{
|
||||
Size: 6144 * common.MebiByte,
|
||||
Size: 6144 * datasizes.MebiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
|
|||
21
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel7/azure.go
generated
vendored
21
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel7/azure.go
generated
vendored
|
|
@ -4,6 +4,7 @@ import (
|
|||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/arch"
|
||||
"github.com/osbuild/images/pkg/customizations/subscription"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/disk"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/distro/rhel"
|
||||
|
|
@ -34,7 +35,7 @@ func mkAzureRhuiImgType() *rhel.ImageType {
|
|||
it.KernelOptions = "ro crashkernel=auto console=tty1 console=ttyS0 earlyprintk=ttyS0 rootdelay=300 scsi_mod.use_blk_mq=y"
|
||||
it.DefaultImageConfig = azureDefaultImgConfig
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 64 * common.GibiByte
|
||||
it.DefaultSize = 64 * datasizes.GibiByte
|
||||
it.BasePartitionTables = azureRhuiBasePartitionTables
|
||||
|
||||
return it
|
||||
|
|
@ -286,10 +287,10 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
Size: 64 * common.GibiByte,
|
||||
Size: 64 * datasizes.GibiByte,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Size: 500 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -302,7 +303,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Size: 500 * datasizes.MebiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -314,7 +315,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.MebiByte,
|
||||
Size: 2 * datasizes.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
|
|
@ -327,7 +328,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
Description: "built with lvm2 and osbuild",
|
||||
LogicalVolumes: []disk.LVMLogicalVolume{
|
||||
{
|
||||
Size: 1 * common.GibiByte,
|
||||
Size: 1 * datasizes.GibiByte,
|
||||
Name: "homelv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -339,7 +340,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Name: "rootlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -351,7 +352,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Name: "tmplv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -363,7 +364,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 10 * common.GibiByte,
|
||||
Size: 10 * datasizes.GibiByte,
|
||||
Name: "usrlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -375,7 +376,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 10 * common.GibiByte, // firedrill: 8 GB
|
||||
Size: 10 * datasizes.GibiByte,
|
||||
Name: "varlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
|
|||
2
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel7/options.go
generated
vendored
2
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel7/options.go
generated
vendored
|
|
@ -28,7 +28,7 @@ func checkOptions(t *rhel.ImageType, bp *blueprint.Blueprint, options distro.Ima
|
|||
}
|
||||
|
||||
if osc := customizations.GetOpenSCAP(); osc != nil {
|
||||
return warnings, fmt.Errorf(fmt.Sprintf("OpenSCAP unsupported os version: %s", t.Arch().Distro().OsVersion()))
|
||||
return warnings, fmt.Errorf("OpenSCAP unsupported os version: %s", t.Arch().Distro().OsVersion())
|
||||
}
|
||||
|
||||
// Check Directory/File Customizations are valid
|
||||
|
|
|
|||
10
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel7/partition_tables.go
generated
vendored
10
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel7/partition_tables.go
generated
vendored
|
|
@ -1,8 +1,8 @@
|
|||
package rhel7
|
||||
|
||||
import (
|
||||
"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/rhel"
|
||||
)
|
||||
|
|
@ -15,13 +15,13 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 1 * common.MebiByte,
|
||||
Size: 1 * datasizes.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
},
|
||||
{
|
||||
Size: 200 * common.MebiByte,
|
||||
Size: 200 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -35,7 +35,7 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Size: 500 * datasizes.MebiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -48,7 +48,7 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
|
|||
3
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel7/qcow2.go
generated
vendored
3
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel7/qcow2.go
generated
vendored
|
|
@ -3,6 +3,7 @@ package rhel7
|
|||
import (
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/customizations/subscription"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/distro/rhel"
|
||||
"github.com/osbuild/images/pkg/osbuild"
|
||||
|
|
@ -28,7 +29,7 @@ func mkQcow2ImgType() *rhel.ImageType {
|
|||
|
||||
it.KernelOptions = "console=tty0 console=ttyS0,115200n8 no_timer_check net.ifnames=0 crashkernel=auto"
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.DefaultImageConfig = qcow2DefaultImgConfig
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
|
|
|
|||
13
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/ami.go
generated
vendored
13
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/ami.go
generated
vendored
|
|
@ -3,6 +3,7 @@ package rhel8
|
|||
import (
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/customizations/subscription"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/distro/rhel"
|
||||
"github.com/osbuild/images/pkg/osbuild"
|
||||
|
|
@ -32,7 +33,7 @@ func mkAmiImgTypeX86_64() *rhel.ImageType {
|
|||
it.DefaultImageConfig = defaultAMIImageConfigX86_64()
|
||||
it.KernelOptions = amiX86KernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.BasePartitionTables = ec2PartitionTables
|
||||
|
||||
return it
|
||||
|
|
@ -56,7 +57,7 @@ func mkEc2ImgTypeX86_64(rd *rhel.Distribution) *rhel.ImageType {
|
|||
it.DefaultImageConfig = defaultEc2ImageConfigX86_64(rd)
|
||||
it.KernelOptions = amiX86KernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.BasePartitionTables = ec2PartitionTables
|
||||
|
||||
return it
|
||||
|
|
@ -80,7 +81,7 @@ func mkEc2HaImgTypeX86_64(rd *rhel.Distribution) *rhel.ImageType {
|
|||
it.DefaultImageConfig = defaultEc2ImageConfigX86_64(rd)
|
||||
it.KernelOptions = amiX86KernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.BasePartitionTables = ec2PartitionTables
|
||||
|
||||
return it
|
||||
|
|
@ -103,7 +104,7 @@ func mkAmiImgTypeAarch64() *rhel.ImageType {
|
|||
it.DefaultImageConfig = defaultAMIImageConfig()
|
||||
it.KernelOptions = amiAarch64KernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.BasePartitionTables = ec2PartitionTables
|
||||
|
||||
return it
|
||||
|
|
@ -127,7 +128,7 @@ func mkEc2ImgTypeAarch64(rd *rhel.Distribution) *rhel.ImageType {
|
|||
it.DefaultImageConfig = defaultEc2ImageConfig(rd)
|
||||
it.KernelOptions = amiAarch64KernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.BasePartitionTables = ec2PartitionTables
|
||||
|
||||
return it
|
||||
|
|
@ -151,7 +152,7 @@ func mkEc2SapImgTypeX86_64(rd *rhel.Distribution) *rhel.ImageType {
|
|||
it.DefaultImageConfig = defaultEc2SapImageConfigX86_64(rd)
|
||||
it.KernelOptions = amiSapKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.BasePartitionTables = ec2PartitionTables
|
||||
|
||||
return it
|
||||
|
|
|
|||
45
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/azure.go
generated
vendored
45
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/azure.go
generated
vendored
|
|
@ -5,6 +5,7 @@ import (
|
|||
"github.com/osbuild/images/pkg/arch"
|
||||
"github.com/osbuild/images/pkg/customizations/shell"
|
||||
"github.com/osbuild/images/pkg/customizations/subscription"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/disk"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/distro/rhel"
|
||||
|
|
@ -33,7 +34,7 @@ func mkAzureRhuiImgType() *rhel.ImageType {
|
|||
it.DefaultImageConfig = defaultAzureRhuiImageConfig.InheritFrom(defaultVhdImageConfig())
|
||||
it.KernelOptions = defaultAzureKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 64 * common.GibiByte
|
||||
it.DefaultSize = 64 * datasizes.GibiByte
|
||||
it.BasePartitionTables = azureRhuiBasePartitionTables
|
||||
|
||||
return it
|
||||
|
|
@ -57,7 +58,7 @@ func mkAzureSapRhuiImgType(rd *rhel.Distribution) *rhel.ImageType {
|
|||
it.DefaultImageConfig = defaultAzureRhuiImageConfig.InheritFrom(sapAzureImageConfig(rd))
|
||||
it.KernelOptions = defaultAzureKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 64 * common.GibiByte
|
||||
it.DefaultSize = 64 * datasizes.GibiByte
|
||||
it.BasePartitionTables = azureRhuiBasePartitionTables
|
||||
|
||||
return it
|
||||
|
|
@ -80,7 +81,7 @@ func mkAzureByosImgType() *rhel.ImageType {
|
|||
it.DefaultImageConfig = defaultAzureByosImageConfig.InheritFrom(defaultVhdImageConfig())
|
||||
it.KernelOptions = defaultAzureKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 4 * common.GibiByte
|
||||
it.DefaultSize = 4 * datasizes.GibiByte
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
return it
|
||||
|
|
@ -104,7 +105,7 @@ func mkAzureImgType() *rhel.ImageType {
|
|||
it.DefaultImageConfig = defaultVhdImageConfig()
|
||||
it.KernelOptions = defaultAzureKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 4 * common.GibiByte
|
||||
it.DefaultSize = 4 * datasizes.GibiByte
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
return it
|
||||
|
|
@ -128,7 +129,7 @@ func mkAzureEap7RhuiImgType() *rhel.ImageType {
|
|||
it.DefaultImageConfig = defaultAzureEapImageConfig.InheritFrom(defaultAzureRhuiImageConfig.InheritFrom(defaultAzureImageConfig))
|
||||
it.KernelOptions = defaultAzureKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 64 * common.GibiByte
|
||||
it.DefaultSize = 64 * datasizes.GibiByte
|
||||
it.BasePartitionTables = azureRhuiBasePartitionTables
|
||||
it.Workload = eapWorkload()
|
||||
|
||||
|
|
@ -287,10 +288,10 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
Size: 64 * common.GibiByte,
|
||||
Size: 64 * datasizes.GibiByte,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Size: 500 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -303,7 +304,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Size: 500 * datasizes.MebiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -315,7 +316,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.MebiByte,
|
||||
Size: 2 * datasizes.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
|
|
@ -328,7 +329,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
Description: "built with lvm2 and osbuild",
|
||||
LogicalVolumes: []disk.LVMLogicalVolume{
|
||||
{
|
||||
Size: 1 * common.GibiByte,
|
||||
Size: 1 * datasizes.GibiByte,
|
||||
Name: "homelv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -340,7 +341,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Name: "rootlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -352,7 +353,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Name: "tmplv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -364,7 +365,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 10 * common.GibiByte,
|
||||
Size: 10 * datasizes.GibiByte,
|
||||
Name: "usrlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -376,7 +377,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 10 * common.GibiByte,
|
||||
Size: 10 * datasizes.GibiByte,
|
||||
Name: "varlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -397,10 +398,10 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
Size: 64 * common.GibiByte,
|
||||
Size: 64 * datasizes.GibiByte,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Size: 500 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -413,7 +414,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Size: 500 * datasizes.MebiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -432,7 +433,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
Description: "built with lvm2 and osbuild",
|
||||
LogicalVolumes: []disk.LVMLogicalVolume{
|
||||
{
|
||||
Size: 1 * common.GibiByte,
|
||||
Size: 1 * datasizes.GibiByte,
|
||||
Name: "homelv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -444,7 +445,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Name: "rootlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -456,7 +457,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Name: "tmplv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -468,7 +469,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 10 * common.GibiByte,
|
||||
Size: 10 * datasizes.GibiByte,
|
||||
Name: "usrlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -480,7 +481,7 @@ func azureRhuiBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool)
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 10 * common.GibiByte,
|
||||
Size: 10 * datasizes.GibiByte,
|
||||
Name: "varlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
|
|||
7
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/edge.go
generated
vendored
7
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/edge.go
generated
vendored
|
|
@ -6,6 +6,7 @@ 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"
|
||||
"github.com/osbuild/images/pkg/distro/rhel"
|
||||
|
|
@ -88,7 +89,7 @@ func mkEdgeRawImgType() *rhel.ImageType {
|
|||
Locale: common.ToPtr("C.UTF-8"),
|
||||
LockRootUser: common.ToPtr(true),
|
||||
}
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.RPMOSTree = true
|
||||
it.Bootable = true
|
||||
it.BasePartitionTables = edgeBasePartitionTables
|
||||
|
|
@ -175,7 +176,7 @@ func mkEdgeSimplifiedInstallerImgType(rd *rhel.Distribution) *rhel.ImageType {
|
|||
"prefixdevname-tools",
|
||||
},
|
||||
}
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.RPMOSTree = true
|
||||
it.Bootable = true
|
||||
it.BootISO = true
|
||||
|
|
@ -212,7 +213,7 @@ func mkMinimalRawImgType() *rhel.ImageType {
|
|||
}
|
||||
it.KernelOptions = "ro"
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 2 * common.GibiByte
|
||||
it.DefaultSize = 2 * datasizes.GibiByte
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
return it
|
||||
|
|
|
|||
5
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/gce.go
generated
vendored
5
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/gce.go
generated
vendored
|
|
@ -3,6 +3,7 @@ package rhel8
|
|||
import (
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/customizations/subscription"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/distro/rhel"
|
||||
"github.com/osbuild/images/pkg/osbuild"
|
||||
|
|
@ -28,7 +29,7 @@ func mkGceImgType(rd distro.Distro) *rhel.ImageType {
|
|||
it.DefaultImageConfig = defaultGceByosImageConfig(rd)
|
||||
it.KernelOptions = gceKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 20 * common.GibiByte
|
||||
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
|
||||
|
||||
|
|
@ -52,7 +53,7 @@ func mkGceRhuiImgType(rd distro.Distro) *rhel.ImageType {
|
|||
it.DefaultImageConfig = defaultGceRhuiImageConfig(rd)
|
||||
it.KernelOptions = gceKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 20 * common.GibiByte
|
||||
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
|
||||
|
||||
|
|
|
|||
4
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/options.go
generated
vendored
4
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/options.go
generated
vendored
|
|
@ -123,10 +123,10 @@ func checkOptions(t *rhel.ImageType, bp *blueprint.Blueprint, options distro.Ima
|
|||
|
||||
if osc := customizations.GetOpenSCAP(); osc != nil {
|
||||
if t.Arch().Distro().OsVersion() == "9.0" {
|
||||
return warnings, fmt.Errorf(fmt.Sprintf("OpenSCAP unsupported os version: %s", t.Arch().Distro().OsVersion()))
|
||||
return warnings, fmt.Errorf("OpenSCAP unsupported os version: %s", t.Arch().Distro().OsVersion())
|
||||
}
|
||||
if !oscap.IsProfileAllowed(osc.ProfileID, oscapProfileAllowList) {
|
||||
return warnings, fmt.Errorf(fmt.Sprintf("OpenSCAP unsupported profile: %s", osc.ProfileID))
|
||||
return warnings, fmt.Errorf("OpenSCAP unsupported profile: %s", osc.ProfileID)
|
||||
}
|
||||
if t.RPMOSTree {
|
||||
return warnings, fmt.Errorf("OpenSCAP customizations are not supported for ostree types")
|
||||
|
|
|
|||
49
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/partition_tables.go
generated
vendored
49
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/partition_tables.go
generated
vendored
|
|
@ -3,6 +3,7 @@ package rhel8
|
|||
import (
|
||||
"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/rhel"
|
||||
)
|
||||
|
|
@ -15,13 +16,13 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 1 * common.MebiByte,
|
||||
Size: 1 * datasizes.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
},
|
||||
{
|
||||
Size: 100 * common.MebiByte,
|
||||
Size: 100 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -34,7 +35,7 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -55,7 +56,7 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 100 * common.MebiByte,
|
||||
Size: 100 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -68,7 +69,7 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -89,12 +90,12 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
Type: "dos",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 4 * common.MebiByte,
|
||||
Size: 4 * datasizes.MebiByte,
|
||||
Type: "41",
|
||||
Bootable: true,
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/",
|
||||
|
|
@ -112,7 +113,7 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
Type: "dos",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Bootable: true,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -138,13 +139,13 @@ func edgeBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 1 * common.MebiByte,
|
||||
Size: 1 * datasizes.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
},
|
||||
{
|
||||
Size: 127 * common.MebiByte,
|
||||
Size: 127 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -158,7 +159,7 @@ func edgeBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 384 * common.MebiByte,
|
||||
Size: 384 * datasizes.MebiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -171,7 +172,7 @@ func edgeBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.LUKSContainer{
|
||||
|
|
@ -207,7 +208,7 @@ func edgeBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 127 * common.MebiByte,
|
||||
Size: 127 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -221,7 +222,7 @@ func edgeBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 384 * common.MebiByte,
|
||||
Size: 384 * datasizes.MebiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -234,7 +235,7 @@ func edgeBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.LUKSContainer{
|
||||
|
|
@ -275,9 +276,9 @@ func ec2PartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
var aarch64BootSize uint64
|
||||
switch {
|
||||
case common.VersionLessThan(t.Arch().Distro().OsVersion(), "8.10") && t.IsRHEL():
|
||||
aarch64BootSize = 512 * common.MebiByte
|
||||
aarch64BootSize = 512 * datasizes.MebiByte
|
||||
default:
|
||||
aarch64BootSize = 1 * common.GibiByte
|
||||
aarch64BootSize = 1 * datasizes.GibiByte
|
||||
}
|
||||
|
||||
x86PartitionTable := disk.PartitionTable{
|
||||
|
|
@ -285,13 +286,13 @@ func ec2PartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 1 * common.MebiByte,
|
||||
Size: 1 * datasizes.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
},
|
||||
{
|
||||
Size: 200 * common.MebiByte,
|
||||
Size: 200 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -304,7 +305,7 @@ func ec2PartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -325,13 +326,13 @@ func ec2PartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 1 * common.MebiByte,
|
||||
Size: 1 * datasizes.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -357,7 +358,7 @@ func ec2PartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 200 * common.MebiByte,
|
||||
Size: 200 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -382,7 +383,7 @@ func ec2PartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
|
|||
7
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/qcow2.go
generated
vendored
7
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/qcow2.go
generated
vendored
|
|
@ -3,6 +3,7 @@ package rhel8
|
|||
import (
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/customizations/subscription"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/distro/rhel"
|
||||
"github.com/osbuild/images/pkg/rpmmd"
|
||||
|
|
@ -25,7 +26,7 @@ func mkQcow2ImgType(rd *rhel.Distribution) *rhel.ImageType {
|
|||
it.DefaultImageConfig = qcowImageConfig(rd)
|
||||
it.KernelOptions = "console=tty0 console=ttyS0,115200n8 no_timer_check net.ifnames=0 crashkernel=auto"
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
return it
|
||||
|
|
@ -48,7 +49,7 @@ func mkOCIImgType(rd *rhel.Distribution) *rhel.ImageType {
|
|||
it.DefaultImageConfig = qcowImageConfig(rd)
|
||||
it.KernelOptions = "console=tty0 console=ttyS0,115200n8 no_timer_check net.ifnames=0 crashkernel=auto"
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
return it
|
||||
|
|
@ -69,7 +70,7 @@ func mkOpenstackImgType() *rhel.ImageType {
|
|||
)
|
||||
|
||||
it.KernelOptions = "ro net.ifnames=0"
|
||||
it.DefaultSize = 4 * common.GibiByte
|
||||
it.DefaultSize = 4 * datasizes.GibiByte
|
||||
it.Bootable = true
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
|
|
|
|||
6
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/vmdk.go
generated
vendored
6
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel8/vmdk.go
generated
vendored
|
|
@ -1,7 +1,7 @@
|
|||
package rhel8
|
||||
|
||||
import (
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/distro/rhel"
|
||||
"github.com/osbuild/images/pkg/rpmmd"
|
||||
)
|
||||
|
|
@ -24,7 +24,7 @@ func mkVmdkImgType() *rhel.ImageType {
|
|||
|
||||
it.KernelOptions = vmdkKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 4 * common.GibiByte
|
||||
it.DefaultSize = 4 * datasizes.GibiByte
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
return it
|
||||
|
|
@ -46,7 +46,7 @@ func mkOvaImgType() *rhel.ImageType {
|
|||
|
||||
it.KernelOptions = vmdkKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 4 * common.GibiByte
|
||||
it.DefaultSize = 4 * datasizes.GibiByte
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
return it
|
||||
|
|
|
|||
13
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/ami.go
generated
vendored
13
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/ami.go
generated
vendored
|
|
@ -2,6 +2,7 @@ package rhel9
|
|||
|
||||
import (
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/distro/rhel"
|
||||
"github.com/osbuild/images/pkg/osbuild"
|
||||
|
|
@ -276,7 +277,7 @@ func mkEc2ImgTypeX86_64() *rhel.ImageType {
|
|||
it.Compression = "xz"
|
||||
it.KernelOptions = amiKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.DefaultImageConfig = defaultEc2ImageConfigX86_64()
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
|
|
@ -299,7 +300,7 @@ func mkAMIImgTypeX86_64() *rhel.ImageType {
|
|||
|
||||
it.KernelOptions = amiKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.DefaultImageConfig = defaultEc2ImageConfigX86_64()
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
|
|
@ -323,7 +324,7 @@ func mkEC2SapImgTypeX86_64(osVersion string) *rhel.ImageType {
|
|||
it.Compression = "xz"
|
||||
it.KernelOptions = "console=ttyS0,115200n8 console=tty0 net.ifnames=0 nvme_core.io_timeout=4294967295 processor.max_cstate=1 intel_idle.max_cstate=1"
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.DefaultImageConfig = sapImageConfig(osVersion).InheritFrom(defaultEc2ImageConfigX86_64())
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
|
|
@ -347,7 +348,7 @@ func mkEc2HaImgTypeX86_64() *rhel.ImageType {
|
|||
it.Compression = "xz"
|
||||
it.KernelOptions = amiKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.DefaultImageConfig = defaultEc2ImageConfigX86_64()
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
|
|
@ -370,7 +371,7 @@ func mkAMIImgTypeAarch64() *rhel.ImageType {
|
|||
|
||||
it.KernelOptions = "console=ttyS0,115200n8 console=tty0 net.ifnames=0 nvme_core.io_timeout=4294967295 iommu.strict=0"
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.DefaultImageConfig = defaultEc2ImageConfig()
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
|
|
@ -394,7 +395,7 @@ func mkEC2ImgTypeAarch64() *rhel.ImageType {
|
|||
it.Compression = "xz"
|
||||
it.KernelOptions = "console=ttyS0,115200n8 console=tty0 net.ifnames=0 nvme_core.io_timeout=4294967295 iommu.strict=0"
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.DefaultImageConfig = defaultEc2ImageConfig()
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
|
|
|
|||
43
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/azure.go
generated
vendored
43
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/azure.go
generated
vendored
|
|
@ -3,6 +3,7 @@ package rhel9
|
|||
import (
|
||||
"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"
|
||||
"github.com/osbuild/images/pkg/distro/rhel"
|
||||
|
|
@ -27,7 +28,7 @@ func mkAzureImgType(rd *rhel.Distribution) *rhel.ImageType {
|
|||
|
||||
it.KernelOptions = defaultAzureKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 4 * common.GibiByte
|
||||
it.DefaultSize = 4 * datasizes.GibiByte
|
||||
it.DefaultImageConfig = defaultAzureImageConfig(rd)
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
|
|
@ -52,7 +53,7 @@ func mkAzureInternalImgType(rd *rhel.Distribution) *rhel.ImageType {
|
|||
it.Compression = "xz"
|
||||
it.KernelOptions = defaultAzureKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 64 * common.GibiByte
|
||||
it.DefaultSize = 64 * datasizes.GibiByte
|
||||
it.DefaultImageConfig = defaultAzureImageConfig(rd)
|
||||
it.BasePartitionTables = azureInternalBasePartitionTables
|
||||
|
||||
|
|
@ -76,7 +77,7 @@ func mkAzureSapInternalImgType(rd *rhel.Distribution) *rhel.ImageType {
|
|||
it.Compression = "xz"
|
||||
it.KernelOptions = defaultAzureKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 64 * common.GibiByte
|
||||
it.DefaultSize = 64 * datasizes.GibiByte
|
||||
it.DefaultImageConfig = sapAzureImageConfig(rd)
|
||||
it.BasePartitionTables = azureInternalBasePartitionTables
|
||||
|
||||
|
|
@ -182,13 +183,13 @@ func azureInternalBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, b
|
|||
switch {
|
||||
case common.VersionLessThan(t.Arch().Distro().OsVersion(), "9.3") && t.IsRHEL():
|
||||
// RHEL <= 9.2 had only 500 MiB /boot
|
||||
bootSize = 500 * common.MebiByte
|
||||
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 * common.MebiByte
|
||||
bootSize = 600 * datasizes.MebiByte
|
||||
default:
|
||||
// RHEL >= 9.4 needs to have even a bigger /boot, see COMPOSER-2155
|
||||
bootSize = 1 * common.GibiByte
|
||||
bootSize = 1 * datasizes.GibiByte
|
||||
}
|
||||
|
||||
switch t.Arch().Name() {
|
||||
|
|
@ -196,10 +197,10 @@ func azureInternalBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, b
|
|||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
Size: 64 * common.GibiByte,
|
||||
Size: 64 * datasizes.GibiByte,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Size: 500 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -224,7 +225,7 @@ func azureInternalBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, b
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.MebiByte,
|
||||
Size: 2 * datasizes.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
|
|
@ -237,7 +238,7 @@ func azureInternalBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, b
|
|||
Description: "built with lvm2 and osbuild",
|
||||
LogicalVolumes: []disk.LVMLogicalVolume{
|
||||
{
|
||||
Size: 1 * common.GibiByte,
|
||||
Size: 1 * datasizes.GibiByte,
|
||||
Name: "homelv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -249,7 +250,7 @@ func azureInternalBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, b
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Name: "rootlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -261,7 +262,7 @@ func azureInternalBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, b
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Name: "tmplv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -273,7 +274,7 @@ func azureInternalBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, b
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 10 * common.GibiByte,
|
||||
Size: 10 * datasizes.GibiByte,
|
||||
Name: "usrlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -285,7 +286,7 @@ func azureInternalBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, b
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 10 * common.GibiByte,
|
||||
Size: 10 * datasizes.GibiByte,
|
||||
Name: "varlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -305,10 +306,10 @@ func azureInternalBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, b
|
|||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
Size: 64 * common.GibiByte,
|
||||
Size: 64 * datasizes.GibiByte,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Size: 500 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -340,7 +341,7 @@ func azureInternalBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, b
|
|||
Description: "built with lvm2 and osbuild",
|
||||
LogicalVolumes: []disk.LVMLogicalVolume{
|
||||
{
|
||||
Size: 1 * common.GibiByte,
|
||||
Size: 1 * datasizes.GibiByte,
|
||||
Name: "homelv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -352,7 +353,7 @@ func azureInternalBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, b
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Name: "rootlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -364,7 +365,7 @@ func azureInternalBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, b
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Name: "tmplv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -376,7 +377,7 @@ func azureInternalBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, b
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 10 * common.GibiByte,
|
||||
Size: 10 * datasizes.GibiByte,
|
||||
Name: "usrlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -388,7 +389,7 @@ func azureInternalBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, b
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 10 * common.GibiByte,
|
||||
Size: 10 * datasizes.GibiByte,
|
||||
Name: "varlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
|
|||
41
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/edge.go
generated
vendored
41
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/edge.go
generated
vendored
|
|
@ -7,6 +7,7 @@ import (
|
|||
"github.com/osbuild/images/internal/environment"
|
||||
"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"
|
||||
"github.com/osbuild/images/pkg/distro/rhel"
|
||||
|
|
@ -114,7 +115,7 @@ func mkEdgeRawImgType(d *rhel.Distribution) *rhel.ImageType {
|
|||
it.KernelOptions += " rw coreos.no_persist_ip"
|
||||
}
|
||||
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.RPMOSTree = true
|
||||
it.Bootable = true
|
||||
it.BasePartitionTables = edgeBasePartitionTables
|
||||
|
|
@ -203,7 +204,7 @@ func mkEdgeSimplifiedInstallerImgType(d *rhel.Distribution) *rhel.ImageType {
|
|||
},
|
||||
}
|
||||
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.RPMOSTree = true
|
||||
it.BootISO = true
|
||||
it.Bootable = true
|
||||
|
|
@ -248,7 +249,7 @@ func mkEdgeAMIImgType(d *rhel.Distribution) *rhel.ImageType {
|
|||
it.KernelOptions += " rw coreos.no_persist_ip"
|
||||
}
|
||||
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.RPMOSTree = true
|
||||
it.Bootable = true
|
||||
it.BasePartitionTables = edgeBasePartitionTables
|
||||
|
|
@ -287,7 +288,7 @@ func mkEdgeVsphereImgType(d *rhel.Distribution) *rhel.ImageType {
|
|||
it.KernelOptions += " rw coreos.no_persist_ip"
|
||||
}
|
||||
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.RPMOSTree = true
|
||||
it.Bootable = true
|
||||
it.BasePartitionTables = edgeBasePartitionTables
|
||||
|
|
@ -319,7 +320,7 @@ func mkMinimalrawImgType() *rhel.ImageType {
|
|||
Files: []*fsnode.File{initialSetupKickstart()},
|
||||
}
|
||||
it.KernelOptions = "ro"
|
||||
it.DefaultSize = 2 * common.GibiByte
|
||||
it.DefaultSize = 2 * datasizes.GibiByte
|
||||
it.Bootable = true
|
||||
it.BasePartitionTables = minimalrawPartitionTables
|
||||
|
||||
|
|
@ -363,9 +364,9 @@ func initialSetupKickstart() *fsnode.File {
|
|||
// Partition tables
|
||||
func minimalrawPartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
||||
// RHEL >= 9.3 needs to have a bigger /boot, see RHEL-7999
|
||||
bootSize := uint64(600) * common.MebiByte
|
||||
bootSize := uint64(600) * datasizes.MebiByte
|
||||
if common.VersionLessThan(t.Arch().Distro().OsVersion(), "9.3") && t.IsRHEL() {
|
||||
bootSize = 500 * common.MebiByte
|
||||
bootSize = 500 * datasizes.MebiByte
|
||||
}
|
||||
|
||||
switch t.Arch().Name() {
|
||||
|
|
@ -373,10 +374,10 @@ func minimalrawPartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
StartOffset: 8 * common.MebiByte,
|
||||
StartOffset: 8 * datasizes.MebiByte,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 200 * common.MebiByte,
|
||||
Size: 200 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -403,7 +404,7 @@ func minimalrawPartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -421,10 +422,10 @@ func minimalrawPartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
StartOffset: 8 * common.MebiByte,
|
||||
StartOffset: 8 * datasizes.MebiByte,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 200 * common.MebiByte,
|
||||
Size: 200 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -451,7 +452,7 @@ func minimalrawPartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -478,13 +479,13 @@ func edgeBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 1 * common.MebiByte, // 1MB
|
||||
Size: 1 * datasizes.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
},
|
||||
{
|
||||
Size: 127 * common.MebiByte, // 127 MB
|
||||
Size: 127 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -498,7 +499,7 @@ func edgeBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 384 * common.MebiByte, // 384 MB
|
||||
Size: 384 * datasizes.MebiByte,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -532,7 +533,7 @@ func edgeBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
Description: "built with lvm2 and osbuild",
|
||||
LogicalVolumes: []disk.LVMLogicalVolume{
|
||||
{
|
||||
Size: 9 * common.GiB, // 9 GiB
|
||||
Size: 9 * datasizes.GiB, // 9 GiB
|
||||
Name: "rootlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
@ -555,7 +556,7 @@ func edgeBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 127 * common.MebiByte, // 127 MB
|
||||
Size: 127 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -569,7 +570,7 @@ func edgeBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 384 * common.MebiByte, // 384 MB
|
||||
Size: 384 * datasizes.MebiByte,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -603,7 +604,7 @@ func edgeBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
Description: "built with lvm2 and osbuild",
|
||||
LogicalVolumes: []disk.LVMLogicalVolume{
|
||||
{
|
||||
Size: 9 * common.GiB, // 9 GiB
|
||||
Size: 9 * datasizes.GiB, // 9 GiB
|
||||
Name: "rootlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
|
|||
3
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/gce.go
generated
vendored
3
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/gce.go
generated
vendored
|
|
@ -2,6 +2,7 @@ package rhel9
|
|||
|
||||
import (
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/distro/rhel"
|
||||
"github.com/osbuild/images/pkg/osbuild"
|
||||
|
|
@ -29,7 +30,7 @@ func mkGCEImageType() *rhel.ImageType {
|
|||
// https://issues.redhat.com/browse/COMPOSER-2157
|
||||
it.DefaultImageConfig = baseGCEImageConfig()
|
||||
it.KernelOptions = gceKernelOptions
|
||||
it.DefaultSize = 20 * common.GibiByte
|
||||
it.DefaultSize = 20 * datasizes.GibiByte
|
||||
it.Bootable = true
|
||||
// TODO: the base partition table still contains the BIOS boot partition, but the image is UEFI-only
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
|
|
|||
4
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/options.go
generated
vendored
4
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/options.go
generated
vendored
|
|
@ -142,10 +142,10 @@ func checkOptions(t *rhel.ImageType, bp *blueprint.Blueprint, options distro.Ima
|
|||
|
||||
if osc := customizations.GetOpenSCAP(); osc != nil {
|
||||
if t.Arch().Distro().OsVersion() == "9.0" {
|
||||
return warnings, fmt.Errorf(fmt.Sprintf("OpenSCAP unsupported os version: %s", t.Arch().Distro().OsVersion()))
|
||||
return warnings, fmt.Errorf("OpenSCAP unsupported os version: %s", t.Arch().Distro().OsVersion())
|
||||
}
|
||||
if !oscap.IsProfileAllowed(osc.ProfileID, oscapProfileAllowList) {
|
||||
return warnings, fmt.Errorf(fmt.Sprintf("OpenSCAP unsupported profile: %s", osc.ProfileID))
|
||||
return warnings, fmt.Errorf("OpenSCAP unsupported profile: %s", osc.ProfileID)
|
||||
}
|
||||
if t.RPMOSTree {
|
||||
return warnings, fmt.Errorf("OpenSCAP customizations are not supported for ostree types")
|
||||
|
|
|
|||
23
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/partition_tables.go
generated
vendored
23
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/partition_tables.go
generated
vendored
|
|
@ -3,6 +3,7 @@ package rhel9
|
|||
import (
|
||||
"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/rhel"
|
||||
)
|
||||
|
|
@ -12,13 +13,13 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
switch {
|
||||
case common.VersionLessThan(t.Arch().Distro().OsVersion(), "9.3") && t.IsRHEL():
|
||||
// RHEL <= 9.2 had only 500 MiB /boot
|
||||
bootSize = 500 * common.MebiByte
|
||||
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 * common.MebiByte
|
||||
bootSize = 600 * datasizes.MebiByte
|
||||
default:
|
||||
// RHEL >= 9.4 needs to have even a bigger /boot, see COMPOSER-2155
|
||||
bootSize = 1 * common.GibiByte
|
||||
bootSize = 1 * datasizes.GibiByte
|
||||
}
|
||||
|
||||
switch t.Arch().Name() {
|
||||
|
|
@ -28,13 +29,13 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 1 * common.MebiByte,
|
||||
Size: 1 * datasizes.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
},
|
||||
{
|
||||
Size: 200 * common.MebiByte,
|
||||
Size: 200 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -61,7 +62,7 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -81,7 +82,7 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 200 * common.MebiByte,
|
||||
Size: 200 * datasizes.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -108,7 +109,7 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
|
|
@ -128,7 +129,7 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
Type: "dos",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 4 * common.MebiByte,
|
||||
Size: 4 * datasizes.MebiByte,
|
||||
Type: "41",
|
||||
Bootable: true,
|
||||
},
|
||||
|
|
@ -144,7 +145,7 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/",
|
||||
|
|
@ -173,7 +174,7 @@ func defaultBasePartitionTables(t *rhel.ImageType) (disk.PartitionTable, bool) {
|
|||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Size: 2 * datasizes.GibiByte,
|
||||
Bootable: true,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
|
|
|
|||
7
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/qcow2.go
generated
vendored
7
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/qcow2.go
generated
vendored
|
|
@ -3,6 +3,7 @@ package rhel9
|
|||
import (
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/customizations/subscription"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/distro/rhel"
|
||||
"github.com/osbuild/images/pkg/rpmmd"
|
||||
|
|
@ -24,7 +25,7 @@ func mkQcow2ImgType(d *rhel.Distribution) *rhel.ImageType {
|
|||
|
||||
it.DefaultImageConfig = qcowImageConfig(d)
|
||||
it.KernelOptions = "console=tty0 console=ttyS0,115200n8 no_timer_check net.ifnames=0"
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.Bootable = true
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
|
|
@ -47,7 +48,7 @@ func mkOCIImgType(d *rhel.Distribution) *rhel.ImageType {
|
|||
|
||||
it.DefaultImageConfig = qcowImageConfig(d)
|
||||
it.KernelOptions = "console=tty0 console=ttyS0,115200n8 no_timer_check net.ifnames=0"
|
||||
it.DefaultSize = 10 * common.GibiByte
|
||||
it.DefaultSize = 10 * datasizes.GibiByte
|
||||
it.Bootable = true
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
|
|
@ -72,7 +73,7 @@ func mkOpenstackImgType() *rhel.ImageType {
|
|||
Locale: common.ToPtr("en_US.UTF-8"),
|
||||
}
|
||||
it.KernelOptions = "ro net.ifnames=0"
|
||||
it.DefaultSize = 4 * common.GibiByte
|
||||
it.DefaultSize = 4 * datasizes.GibiByte
|
||||
it.Bootable = true
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
|
|
|
|||
5
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/vmdk.go
generated
vendored
5
vendor/github.com/osbuild/images/pkg/distro/rhel/rhel9/vmdk.go
generated
vendored
|
|
@ -2,6 +2,7 @@ package rhel9
|
|||
|
||||
import (
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/distro/rhel"
|
||||
"github.com/osbuild/images/pkg/rpmmd"
|
||||
|
|
@ -28,7 +29,7 @@ func mkVMDKImgType() *rhel.ImageType {
|
|||
}
|
||||
it.KernelOptions = vmdkKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 4 * common.GibiByte
|
||||
it.DefaultSize = 4 * datasizes.GibiByte
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
return it
|
||||
|
|
@ -53,7 +54,7 @@ func mkOVAImgType() *rhel.ImageType {
|
|||
}
|
||||
it.KernelOptions = vmdkKernelOptions
|
||||
it.Bootable = true
|
||||
it.DefaultSize = 4 * common.GibiByte
|
||||
it.DefaultSize = 4 * datasizes.GibiByte
|
||||
it.BasePartitionTables = defaultBasePartitionTables
|
||||
|
||||
return it
|
||||
|
|
|
|||
5
vendor/github.com/osbuild/images/pkg/dnfjson/cache.go
generated
vendored
5
vendor/github.com/osbuild/images/pkg/dnfjson/cache.go
generated
vendored
|
|
@ -259,7 +259,10 @@ func dirSize(path string) (uint64, error) {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
size += uint64(info.Size())
|
||||
infoSize := info.Size()
|
||||
if infoSize > 0 {
|
||||
size += uint64(infoSize)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
err := filepath.Walk(path, sizer)
|
||||
|
|
|
|||
4
vendor/github.com/osbuild/images/pkg/image/anaconda_container_installer.go
generated
vendored
4
vendor/github.com/osbuild/images/pkg/image/anaconda_container_installer.go
generated
vendored
|
|
@ -4,12 +4,12 @@ import (
|
|||
"fmt"
|
||||
"math/rand"
|
||||
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/arch"
|
||||
"github.com/osbuild/images/pkg/artifact"
|
||||
"github.com/osbuild/images/pkg/container"
|
||||
"github.com/osbuild/images/pkg/customizations/anaconda"
|
||||
"github.com/osbuild/images/pkg/customizations/kickstart"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/manifest"
|
||||
"github.com/osbuild/images/pkg/osbuild"
|
||||
"github.com/osbuild/images/pkg/platform"
|
||||
|
|
@ -99,7 +99,7 @@ func (img *AnacondaContainerInstaller) InstantiateManifest(m *manifest.Manifest,
|
|||
anacondaPipeline.AdditionalDrivers = img.AdditionalDrivers
|
||||
|
||||
rootfsImagePipeline := manifest.NewISORootfsImg(buildPipeline, anacondaPipeline)
|
||||
rootfsImagePipeline.Size = 4 * common.GibiByte
|
||||
rootfsImagePipeline.Size = 4 * datasizes.GibiByte
|
||||
|
||||
bootTreePipeline := manifest.NewEFIBootTree(buildPipeline, img.Product, img.OSVersion)
|
||||
bootTreePipeline.Platform = img.Platform
|
||||
|
|
|
|||
4
vendor/github.com/osbuild/images/pkg/image/anaconda_live_installer.go
generated
vendored
4
vendor/github.com/osbuild/images/pkg/image/anaconda_live_installer.go
generated
vendored
|
|
@ -4,11 +4,11 @@ import (
|
|||
"fmt"
|
||||
"math/rand"
|
||||
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/internal/environment"
|
||||
"github.com/osbuild/images/internal/workload"
|
||||
"github.com/osbuild/images/pkg/arch"
|
||||
"github.com/osbuild/images/pkg/artifact"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/manifest"
|
||||
"github.com/osbuild/images/pkg/platform"
|
||||
"github.com/osbuild/images/pkg/rpmmd"
|
||||
|
|
@ -71,7 +71,7 @@ func (img *AnacondaLiveInstaller) InstantiateManifest(m *manifest.Manifest,
|
|||
livePipeline.Checkpoint()
|
||||
|
||||
rootfsImagePipeline := manifest.NewISORootfsImg(buildPipeline, livePipeline)
|
||||
rootfsImagePipeline.Size = 8 * common.GibiByte
|
||||
rootfsImagePipeline.Size = 8 * datasizes.GibiByte
|
||||
|
||||
bootTreePipeline := manifest.NewEFIBootTree(buildPipeline, img.Product, img.OSVersion)
|
||||
bootTreePipeline.Platform = img.Platform
|
||||
|
|
|
|||
4
vendor/github.com/osbuild/images/pkg/image/anaconda_ostree_installer.go
generated
vendored
4
vendor/github.com/osbuild/images/pkg/image/anaconda_ostree_installer.go
generated
vendored
|
|
@ -4,12 +4,12 @@ import (
|
|||
"fmt"
|
||||
"math/rand"
|
||||
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/arch"
|
||||
"github.com/osbuild/images/pkg/artifact"
|
||||
"github.com/osbuild/images/pkg/customizations/anaconda"
|
||||
"github.com/osbuild/images/pkg/customizations/kickstart"
|
||||
"github.com/osbuild/images/pkg/customizations/subscription"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/manifest"
|
||||
"github.com/osbuild/images/pkg/osbuild"
|
||||
"github.com/osbuild/images/pkg/ostree"
|
||||
|
|
@ -102,7 +102,7 @@ func (img *AnacondaOSTreeInstaller) InstantiateManifest(m *manifest.Manifest,
|
|||
anacondaPipeline.AdditionalDrivers = img.AdditionalDrivers
|
||||
|
||||
rootfsImagePipeline := manifest.NewISORootfsImg(buildPipeline, anacondaPipeline)
|
||||
rootfsImagePipeline.Size = 4 * common.GibiByte
|
||||
rootfsImagePipeline.Size = 4 * datasizes.GibiByte
|
||||
|
||||
bootTreePipeline := manifest.NewEFIBootTree(buildPipeline, img.Product, img.OSVersion)
|
||||
bootTreePipeline.Platform = img.Platform
|
||||
|
|
|
|||
6
vendor/github.com/osbuild/images/pkg/image/anaconda_tar_installer.go
generated
vendored
6
vendor/github.com/osbuild/images/pkg/image/anaconda_tar_installer.go
generated
vendored
|
|
@ -5,13 +5,13 @@ import (
|
|||
"math/rand"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/internal/environment"
|
||||
"github.com/osbuild/images/internal/workload"
|
||||
"github.com/osbuild/images/pkg/arch"
|
||||
"github.com/osbuild/images/pkg/artifact"
|
||||
"github.com/osbuild/images/pkg/customizations/anaconda"
|
||||
"github.com/osbuild/images/pkg/customizations/kickstart"
|
||||
"github.com/osbuild/images/pkg/datasizes"
|
||||
"github.com/osbuild/images/pkg/disk"
|
||||
"github.com/osbuild/images/pkg/manifest"
|
||||
"github.com/osbuild/images/pkg/osbuild"
|
||||
|
|
@ -21,7 +21,7 @@ import (
|
|||
)
|
||||
|
||||
func efiBootPartitionTable(rng *rand.Rand) *disk.PartitionTable {
|
||||
var efibootImageSize uint64 = 20 * common.MebiByte
|
||||
var efibootImageSize uint64 = 20 * datasizes.MebiByte
|
||||
return &disk.PartitionTable{
|
||||
Size: efibootImageSize,
|
||||
Partitions: []disk.Partition{
|
||||
|
|
@ -154,7 +154,7 @@ func (img *AnacondaTarInstaller) InstantiateManifest(m *manifest.Manifest,
|
|||
anacondaPipeline.Checkpoint()
|
||||
|
||||
rootfsImagePipeline := manifest.NewISORootfsImg(buildPipeline, anacondaPipeline)
|
||||
rootfsImagePipeline.Size = 5 * common.GibiByte
|
||||
rootfsImagePipeline.Size = 5 * datasizes.GibiByte
|
||||
|
||||
bootTreePipeline := manifest.NewEFIBootTree(buildPipeline, img.Product, img.OSVersion)
|
||||
bootTreePipeline.Platform = img.Platform
|
||||
|
|
|
|||
14
vendor/github.com/osbuild/images/pkg/image/bootc_disk.go
generated
vendored
14
vendor/github.com/osbuild/images/pkg/image/bootc_disk.go
generated
vendored
|
|
@ -3,7 +3,9 @@ package image
|
|||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"regexp"
|
||||
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/container"
|
||||
"github.com/osbuild/images/pkg/customizations/users"
|
||||
"github.com/osbuild/images/pkg/disk"
|
||||
|
|
@ -89,5 +91,17 @@ func (img *BootcDiskImage) InstantiateManifestFromContainers(m *manifest.Manifes
|
|||
fmt.Sprintf("%s.vmdk", fileBasename),
|
||||
fmt.Sprintf("%s.vhd", fileBasename),
|
||||
}
|
||||
|
||||
// XXX: copied from https://github.com/osbuild/images/blob/v0.85.0/pkg/image/disk.go#L102
|
||||
gcePipeline := manifest.NewTar(buildPipeline, rawImage, "gce")
|
||||
gcePipeline.Format = osbuild.TarArchiveFormatOldgnu
|
||||
gcePipeline.RootNode = osbuild.TarRootNodeOmit
|
||||
// these are required to successfully import the image to GCP
|
||||
gcePipeline.ACLs = common.ToPtr(false)
|
||||
gcePipeline.SELinux = common.ToPtr(false)
|
||||
gcePipeline.Xattrs = common.ToPtr(false)
|
||||
gcePipeline.Transform = fmt.Sprintf(`s/%s/disk.raw/`, regexp.QuoteMeta(rawImage.Filename()))
|
||||
gcePipeline.SetFilename("image.tar.gz")
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
27
vendor/github.com/osbuild/images/pkg/manifest/coreos_installer.go
generated
vendored
27
vendor/github.com/osbuild/images/pkg/manifest/coreos_installer.go
generated
vendored
|
|
@ -185,11 +185,34 @@ func (p *CoreOSInstaller) serialize() osbuild.Pipeline {
|
|||
|
||||
dracutModules := append(
|
||||
p.AdditionalDracutModules,
|
||||
"systemd",
|
||||
"systemd-initrd",
|
||||
"fips",
|
||||
"modsign",
|
||||
"rescue",
|
||||
"i18n",
|
||||
"kernel-modules",
|
||||
"kernel-modules-extra",
|
||||
"network-manager",
|
||||
"network",
|
||||
"drm",
|
||||
"coreos-installer",
|
||||
"fdo",
|
||||
"lvm",
|
||||
"terminfo",
|
||||
"fs-lib",
|
||||
"dracut-systemd",
|
||||
"debug",
|
||||
"shutdown",
|
||||
)
|
||||
|
||||
dracutStageOptions := dracutStageOptions(p.kernelVer, p.Biosdevname, dracutModules)
|
||||
if p.Biosdevname {
|
||||
dracutModules = append(dracutModules, "biosdevname")
|
||||
}
|
||||
dracutStageOptions := &osbuild.DracutStageOptions{
|
||||
Kernel: []string{p.kernelVer},
|
||||
Modules: dracutModules,
|
||||
Install: []string{"/.buildstamp"},
|
||||
}
|
||||
if p.FDO != nil && p.FDO.DiunPubKeyRootCerts != "" {
|
||||
pipeline.AddStage(osbuild.NewFDOStageForRootCerts(p.FDO.DiunPubKeyRootCerts))
|
||||
dracutStageOptions.Install = []string{"/fdo_diun_pub_key_root_certs.pem"}
|
||||
|
|
|
|||
36
vendor/github.com/osbuild/images/pkg/manifest/os.go
generated
vendored
36
vendor/github.com/osbuild/images/pkg/manifest/os.go
generated
vendored
|
|
@ -163,7 +163,6 @@ type OS struct {
|
|||
// OSTreeParent source spec (optional). If nil the new commit (if
|
||||
// applicable) will have no parent
|
||||
OSTreeParent *ostree.SourceSpec
|
||||
|
||||
// Enabling Bootupd runs bootupctl generate-update-metadata in the tree to
|
||||
// transform /usr/lib/ostree-boot into a bootupd-compatible update
|
||||
// payload. Only works with ostree-based images.
|
||||
|
|
@ -289,6 +288,25 @@ func (p *OS) getContainerSources() []container.SourceSpec {
|
|||
return p.OSCustomizations.Containers
|
||||
}
|
||||
|
||||
func tomlPkgsFor(distro Distro) []string {
|
||||
switch distro {
|
||||
case DISTRO_EL7:
|
||||
// nothing needs toml in rhel7
|
||||
panic("no support for toml on rhel7")
|
||||
case DISTRO_EL8:
|
||||
// deprecated, needed for backwards compatibility (EL8 manifests)
|
||||
return []string{"python3-pytoml"}
|
||||
case DISTRO_EL9:
|
||||
// older unmaintained lib, needed for backwards compatibility
|
||||
return []string{"python3-toml"}
|
||||
default:
|
||||
// No extra package needed for reading, on rhel10 and
|
||||
// fedora as stdlib has "tomlib" but we need tomli-w
|
||||
// for writing
|
||||
return []string{"python3-tomli-w"}
|
||||
}
|
||||
}
|
||||
|
||||
func (p *OS) getBuildPackages(distro Distro) []string {
|
||||
packages := p.platform.GetBuildPackages()
|
||||
if p.PartitionTable != nil {
|
||||
|
|
@ -315,13 +333,7 @@ func (p *OS) getBuildPackages(distro Distro) []string {
|
|||
|
||||
if len(p.OSCustomizations.Containers) > 0 {
|
||||
if p.OSCustomizations.ContainersStorage != nil {
|
||||
switch distro {
|
||||
case DISTRO_EL8:
|
||||
packages = append(packages, "python3-pytoml")
|
||||
case DISTRO_EL10:
|
||||
default:
|
||||
packages = append(packages, "python3-toml")
|
||||
}
|
||||
packages = append(packages, tomlPkgsFor(distro)...)
|
||||
}
|
||||
packages = append(packages, "skopeo")
|
||||
}
|
||||
|
|
@ -331,13 +343,7 @@ func (p *OS) getBuildPackages(distro Distro) []string {
|
|||
}
|
||||
|
||||
if p.BootcConfig != nil {
|
||||
switch distro {
|
||||
case DISTRO_EL8:
|
||||
packages = append(packages, "python3-pytoml")
|
||||
case DISTRO_EL10:
|
||||
default:
|
||||
packages = append(packages, "python3-toml")
|
||||
}
|
||||
packages = append(packages, tomlPkgsFor(distro)...)
|
||||
}
|
||||
|
||||
return packages
|
||||
|
|
|
|||
28
vendor/github.com/osbuild/images/pkg/manifest/tar.go
generated
vendored
28
vendor/github.com/osbuild/images/pkg/manifest/tar.go
generated
vendored
|
|
@ -10,12 +10,13 @@ type Tar struct {
|
|||
Base
|
||||
filename string
|
||||
|
||||
Format osbuild.TarArchiveFormat
|
||||
RootNode osbuild.TarRootNode
|
||||
Paths []string
|
||||
ACLs *bool
|
||||
SELinux *bool
|
||||
Xattrs *bool
|
||||
Format osbuild.TarArchiveFormat
|
||||
RootNode osbuild.TarRootNode
|
||||
Paths []string
|
||||
ACLs *bool
|
||||
SELinux *bool
|
||||
Xattrs *bool
|
||||
Transform string
|
||||
|
||||
inputPipeline Pipeline
|
||||
}
|
||||
|
|
@ -50,13 +51,14 @@ func (p *Tar) serialize() osbuild.Pipeline {
|
|||
pipeline := p.Base.serialize()
|
||||
|
||||
tarOptions := &osbuild.TarStageOptions{
|
||||
Filename: p.Filename(),
|
||||
Format: p.Format,
|
||||
ACLs: p.ACLs,
|
||||
SELinux: p.SELinux,
|
||||
Xattrs: p.Xattrs,
|
||||
RootNode: p.RootNode,
|
||||
Paths: p.Paths,
|
||||
Filename: p.Filename(),
|
||||
Format: p.Format,
|
||||
ACLs: p.ACLs,
|
||||
SELinux: p.SELinux,
|
||||
Xattrs: p.Xattrs,
|
||||
RootNode: p.RootNode,
|
||||
Paths: p.Paths,
|
||||
Transform: p.Transform,
|
||||
}
|
||||
tarStage := osbuild.NewTarStage(tarOptions, p.inputPipeline.Name())
|
||||
pipeline.AddStage(tarStage)
|
||||
|
|
|
|||
2
vendor/github.com/osbuild/images/pkg/osbuild/device.go
generated
vendored
2
vendor/github.com/osbuild/images/pkg/osbuild/device.go
generated
vendored
|
|
@ -262,7 +262,7 @@ func genOsbuildMount(source string, mnt disk.Mountable) (*Mount, error) {
|
|||
return nil, fmt.Errorf("mounting bare btrfs partition is unsupported: %s", mountpoint)
|
||||
}
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown fs type " + t)
|
||||
return nil, fmt.Errorf("unknown fs type %s", t)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
6
vendor/github.com/osbuild/images/pkg/osbuild/grub2_inst_stage.go
generated
vendored
6
vendor/github.com/osbuild/images/pkg/osbuild/grub2_inst_stage.go
generated
vendored
|
|
@ -150,8 +150,10 @@ func NewGrub2InstStageOption(filename string, pt *disk.PartitionTable, platform
|
|||
prefix := PrefixPartition{
|
||||
Type: "partition",
|
||||
PartLabel: pt.Type,
|
||||
Number: uint(bootIdx),
|
||||
Path: prefixPath,
|
||||
// bootidx can't be negative after check with rootIdx above:
|
||||
// nolint:gosec
|
||||
Number: uint(bootIdx),
|
||||
Path: prefixPath,
|
||||
}
|
||||
|
||||
return &Grub2InstStageOptions{
|
||||
|
|
|
|||
3
vendor/github.com/osbuild/images/pkg/osbuild/tar_stage.go
generated
vendored
3
vendor/github.com/osbuild/images/pkg/osbuild/tar_stage.go
generated
vendored
|
|
@ -42,6 +42,9 @@ type TarStageOptions struct {
|
|||
|
||||
// List of paths to include, instead of the whole tree
|
||||
Paths []string `json:"paths,omitempty"`
|
||||
|
||||
// Pass --transform=...
|
||||
Transform string `json:"transform,omitempty"`
|
||||
}
|
||||
|
||||
func (TarStageOptions) isStageOptions() {}
|
||||
|
|
|
|||
6
vendor/github.com/osbuild/images/pkg/ostree/ostree.go
generated
vendored
6
vendor/github.com/osbuild/images/pkg/ostree/ostree.go
generated
vendored
|
|
@ -144,7 +144,7 @@ func verifyChecksum(commit string) bool {
|
|||
func ResolveRef(location, ref string, consumerCerts bool, subs *rhsm.Subscriptions, ca *string) (string, error) {
|
||||
u, err := url.Parse(location)
|
||||
if err != nil {
|
||||
return "", NewResolveRefError(fmt.Sprintf("error parsing ostree repository location: %v", err))
|
||||
return "", NewResolveRefError("error parsing ostree repository location: %v", err)
|
||||
}
|
||||
u.Path = path.Join(u.Path, "refs/heads/", ref)
|
||||
|
||||
|
|
@ -200,14 +200,14 @@ func ResolveRef(location, ref string, consumerCerts bool, subs *rhsm.Subscriptio
|
|||
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
return "", NewResolveRefError(fmt.Sprintf("error sending request to ostree repository %q: %v", u.String(), err))
|
||||
return "", NewResolveRefError("error sending request to ostree repository %q: %v", u.String(), err)
|
||||
}
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return "", NewResolveRefError("ostree repository %q returned status: %s", u.String(), resp.Status)
|
||||
}
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return "", NewResolveRefError(fmt.Sprintf("error reading response from ostree repository %q: %v", u.String(), err))
|
||||
return "", NewResolveRefError("error reading response from ostree repository %q: %v", u.String(), err)
|
||||
}
|
||||
checksum := strings.TrimSpace(string(body))
|
||||
// Check that this is at least a hex string.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue