go.mod: update images to 0.11
Mainly to include: - distro/rhel9: Make /boot 600 MiB big on RHEL 9.3+ - fedora: exclude sdubby - Minimal image builds Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
parent
edc45fde72
commit
19edaca01a
213 changed files with 4113 additions and 3823 deletions
13
vendor/github.com/osbuild/images/internal/environment/azure.go
generated
vendored
13
vendor/github.com/osbuild/images/internal/environment/azure.go
generated
vendored
|
|
@ -5,9 +5,18 @@ type Azure struct {
|
|||
}
|
||||
|
||||
func (p *Azure) GetPackages() []string {
|
||||
return []string{"WALinuxAgent"}
|
||||
return []string{
|
||||
"cloud-init",
|
||||
"WALinuxAgent",
|
||||
}
|
||||
}
|
||||
|
||||
func (p *Azure) GetServices() []string {
|
||||
return []string{"waagent"}
|
||||
return []string{
|
||||
"cloud-init.service",
|
||||
"cloud-config.service",
|
||||
"cloud-final.service",
|
||||
"cloud-init-local.service",
|
||||
"waagent",
|
||||
}
|
||||
}
|
||||
|
|
|
|||
7
vendor/github.com/osbuild/images/internal/environment/ec2.go
generated
vendored
7
vendor/github.com/osbuild/images/internal/environment/ec2.go
generated
vendored
|
|
@ -9,5 +9,10 @@ func (p *EC2) GetPackages() []string {
|
|||
}
|
||||
|
||||
func (p *EC2) GetServices() []string {
|
||||
return []string{"cloud-init.service"}
|
||||
return []string{
|
||||
"cloud-init.service",
|
||||
"cloud-config.service",
|
||||
"cloud-final.service",
|
||||
"cloud-init-local.service",
|
||||
}
|
||||
}
|
||||
|
|
|
|||
21
vendor/github.com/osbuild/images/internal/environment/kvm.go
generated
vendored
Normal file
21
vendor/github.com/osbuild/images/internal/environment/kvm.go
generated
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
package environment
|
||||
|
||||
type KVM struct {
|
||||
BaseEnvironment
|
||||
}
|
||||
|
||||
func (e *KVM) GetPackages() []string {
|
||||
return []string{
|
||||
"cloud-init",
|
||||
"qemu-guest-agent",
|
||||
}
|
||||
}
|
||||
|
||||
func (e *KVM) GetServices() []string {
|
||||
return []string{
|
||||
"cloud-init.service",
|
||||
"cloud-config.service",
|
||||
"cloud-final.service",
|
||||
"cloud-init-local.service",
|
||||
}
|
||||
}
|
||||
9
vendor/github.com/osbuild/images/pkg/blueprint/blueprint.go
generated
vendored
9
vendor/github.com/osbuild/images/pkg/blueprint/blueprint.go
generated
vendored
|
|
@ -12,14 +12,9 @@ type Blueprint struct {
|
|||
Containers []Container `json:"containers,omitempty" toml:"containers,omitempty"`
|
||||
Customizations *Customizations `json:"customizations,omitempty" toml:"customizations"`
|
||||
Distro string `json:"distro" toml:"distro"`
|
||||
}
|
||||
|
||||
type Change struct {
|
||||
Commit string `json:"commit" toml:"commit"`
|
||||
Message string `json:"message" toml:"message"`
|
||||
Revision *int `json:"revision" toml:"revision"`
|
||||
Timestamp string `json:"timestamp" toml:"timestamp"`
|
||||
Blueprint Blueprint `json:"-" toml:"-"`
|
||||
// EXPERIMENTAL
|
||||
Minimal bool `json:"minimal" toml:"minimal"`
|
||||
}
|
||||
|
||||
// A Package specifies an RPM package.
|
||||
|
|
|
|||
13
vendor/github.com/osbuild/images/pkg/distro/fedora/distro.go
generated
vendored
13
vendor/github.com/osbuild/images/pkg/distro/fedora/distro.go
generated
vendored
|
|
@ -233,20 +233,15 @@ var (
|
|||
}
|
||||
|
||||
qcow2ImgType = imageType{
|
||||
name: "qcow2",
|
||||
filename: "disk.qcow2",
|
||||
mimeType: "application/x-qemu-disk",
|
||||
name: "qcow2",
|
||||
filename: "disk.qcow2",
|
||||
mimeType: "application/x-qemu-disk",
|
||||
environment: &environment.KVM{},
|
||||
packageSets: map[string]packageSetFunc{
|
||||
osPkgsKey: qcow2CommonPackageSet,
|
||||
},
|
||||
defaultImageConfig: &distro.ImageConfig{
|
||||
DefaultTarget: common.ToPtr("multi-user.target"),
|
||||
EnabledServices: []string{
|
||||
"cloud-init.service",
|
||||
"cloud-config.service",
|
||||
"cloud-final.service",
|
||||
"cloud-init-local.service",
|
||||
},
|
||||
},
|
||||
kernelOptions: cloudKernelOptions,
|
||||
bootable: true,
|
||||
|
|
|
|||
36
vendor/github.com/osbuild/images/pkg/distro/fedora/images.go
generated
vendored
36
vendor/github.com/osbuild/images/pkg/distro/fedora/images.go
generated
vendored
|
|
@ -235,7 +235,7 @@ func osCustomizations(
|
|||
|
||||
func diskImage(workload workload.Workload,
|
||||
t *imageType,
|
||||
customizations *blueprint.Customizations,
|
||||
bp *blueprint.Blueprint,
|
||||
options distro.ImageOptions,
|
||||
packageSets map[string]rpmmd.PackageSet,
|
||||
containers []container.SourceSpec,
|
||||
|
|
@ -243,12 +243,16 @@ func diskImage(workload workload.Workload,
|
|||
|
||||
img := image.NewDiskImage()
|
||||
img.Platform = t.platform
|
||||
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], containers, customizations)
|
||||
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], containers, bp.Customizations)
|
||||
img.Environment = t.environment
|
||||
img.Workload = workload
|
||||
img.Compression = t.compression
|
||||
if bp.Minimal {
|
||||
// Disable weak dependencies if the 'minimal' option is enabled
|
||||
img.InstallWeakDeps = common.ToPtr(false)
|
||||
}
|
||||
// TODO: move generation into LiveImage
|
||||
pt, err := t.getPartitionTable(customizations.GetFilesystems(), options, rng)
|
||||
pt, err := t.getPartitionTable(bp.Customizations.GetFilesystems(), options, rng)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -261,7 +265,7 @@ func diskImage(workload workload.Workload,
|
|||
|
||||
func containerImage(workload workload.Workload,
|
||||
t *imageType,
|
||||
c *blueprint.Customizations,
|
||||
bp *blueprint.Blueprint,
|
||||
options distro.ImageOptions,
|
||||
packageSets map[string]rpmmd.PackageSet,
|
||||
containers []container.SourceSpec,
|
||||
|
|
@ -269,7 +273,7 @@ func containerImage(workload workload.Workload,
|
|||
img := image.NewBaseContainer()
|
||||
|
||||
img.Platform = t.platform
|
||||
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], containers, c)
|
||||
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], containers, bp.Customizations)
|
||||
img.Environment = t.environment
|
||||
img.Workload = workload
|
||||
|
||||
|
|
@ -280,7 +284,7 @@ func containerImage(workload workload.Workload,
|
|||
|
||||
func liveInstallerImage(workload workload.Workload,
|
||||
t *imageType,
|
||||
customizations *blueprint.Customizations,
|
||||
bp *blueprint.Blueprint,
|
||||
options distro.ImageOptions,
|
||||
packageSets map[string]rpmmd.PackageSet,
|
||||
containers []container.SourceSpec,
|
||||
|
|
@ -307,7 +311,7 @@ func liveInstallerImage(workload workload.Workload,
|
|||
|
||||
func imageInstallerImage(workload workload.Workload,
|
||||
t *imageType,
|
||||
customizations *blueprint.Customizations,
|
||||
bp *blueprint.Blueprint,
|
||||
options distro.ImageOptions,
|
||||
packageSets map[string]rpmmd.PackageSet,
|
||||
containers []container.SourceSpec,
|
||||
|
|
@ -327,6 +331,7 @@ func imageInstallerImage(workload workload.Workload,
|
|||
}
|
||||
img.AdditionalAnacondaModules = append(img.AdditionalAnacondaModules, "org.fedoraproject.Anaconda.Modules.Users")
|
||||
|
||||
customizations := bp.Customizations
|
||||
img.Platform = t.platform
|
||||
img.Workload = workload
|
||||
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], containers, customizations)
|
||||
|
|
@ -351,7 +356,7 @@ func imageInstallerImage(workload workload.Workload,
|
|||
|
||||
func iotCommitImage(workload workload.Workload,
|
||||
t *imageType,
|
||||
customizations *blueprint.Customizations,
|
||||
bp *blueprint.Blueprint,
|
||||
options distro.ImageOptions,
|
||||
packageSets map[string]rpmmd.PackageSet,
|
||||
containers []container.SourceSpec,
|
||||
|
|
@ -363,7 +368,7 @@ func iotCommitImage(workload workload.Workload,
|
|||
d := t.arch.distro
|
||||
|
||||
img.Platform = t.platform
|
||||
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], containers, customizations)
|
||||
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], containers, bp.Customizations)
|
||||
if !common.VersionLessThan(d.Releasever(), "38") {
|
||||
// see https://github.com/ostreedev/ostree/issues/2840
|
||||
img.OSCustomizations.Presets = []osbuild.Preset{
|
||||
|
|
@ -393,7 +398,7 @@ func iotCommitImage(workload workload.Workload,
|
|||
|
||||
func iotContainerImage(workload workload.Workload,
|
||||
t *imageType,
|
||||
customizations *blueprint.Customizations,
|
||||
bp *blueprint.Blueprint,
|
||||
options distro.ImageOptions,
|
||||
packageSets map[string]rpmmd.PackageSet,
|
||||
containers []container.SourceSpec,
|
||||
|
|
@ -403,7 +408,7 @@ func iotContainerImage(workload workload.Workload,
|
|||
img := image.NewOSTreeContainer(commitRef)
|
||||
d := t.arch.distro
|
||||
img.Platform = t.platform
|
||||
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], containers, customizations)
|
||||
img.OSCustomizations = osCustomizations(t, packageSets[osPkgsKey], containers, bp.Customizations)
|
||||
if !common.VersionLessThan(d.Releasever(), "38") {
|
||||
// see https://github.com/ostreedev/ostree/issues/2840
|
||||
img.OSCustomizations.Presets = []osbuild.Preset{
|
||||
|
|
@ -434,7 +439,7 @@ func iotContainerImage(workload workload.Workload,
|
|||
|
||||
func iotInstallerImage(workload workload.Workload,
|
||||
t *imageType,
|
||||
customizations *blueprint.Customizations,
|
||||
bp *blueprint.Blueprint,
|
||||
options distro.ImageOptions,
|
||||
packageSets map[string]rpmmd.PackageSet,
|
||||
containers []container.SourceSpec,
|
||||
|
|
@ -449,6 +454,7 @@ func iotInstallerImage(workload workload.Workload,
|
|||
|
||||
img := image.NewAnacondaOSTreeInstaller(commit)
|
||||
|
||||
customizations := bp.Customizations
|
||||
img.Platform = t.platform
|
||||
img.ExtraBasePackages = packageSets[installerPkgsKey]
|
||||
img.Users = users.UsersFromBP(customizations.GetUsers())
|
||||
|
|
@ -475,7 +481,7 @@ func iotInstallerImage(workload workload.Workload,
|
|||
|
||||
func iotImage(workload workload.Workload,
|
||||
t *imageType,
|
||||
customizations *blueprint.Customizations,
|
||||
bp *blueprint.Blueprint,
|
||||
options distro.ImageOptions,
|
||||
packageSets map[string]rpmmd.PackageSet,
|
||||
containers []container.SourceSpec,
|
||||
|
|
@ -489,6 +495,7 @@ func iotImage(workload workload.Workload,
|
|||
|
||||
distro := t.Arch().Distro()
|
||||
|
||||
customizations := bp.Customizations
|
||||
img.Users = users.UsersFromBP(customizations.GetUsers())
|
||||
img.Groups = users.GroupsFromBP(customizations.GetGroups())
|
||||
|
||||
|
|
@ -551,7 +558,7 @@ func iotImage(workload workload.Workload,
|
|||
|
||||
func iotSimplifiedInstallerImage(workload workload.Workload,
|
||||
t *imageType,
|
||||
customizations *blueprint.Customizations,
|
||||
bp *blueprint.Blueprint,
|
||||
options distro.ImageOptions,
|
||||
packageSets map[string]rpmmd.PackageSet,
|
||||
containers []container.SourceSpec,
|
||||
|
|
@ -563,6 +570,7 @@ func iotSimplifiedInstallerImage(workload workload.Workload,
|
|||
}
|
||||
rawImg := image.NewOSTreeDiskImage(commit)
|
||||
|
||||
customizations := bp.Customizations
|
||||
rawImg.Users = users.UsersFromBP(customizations.GetUsers())
|
||||
rawImg.Groups = users.GroupsFromBP(customizations.GetGroups())
|
||||
|
||||
|
|
|
|||
11
vendor/github.com/osbuild/images/pkg/distro/fedora/imagetype.go
generated
vendored
11
vendor/github.com/osbuild/images/pkg/distro/fedora/imagetype.go
generated
vendored
|
|
@ -21,7 +21,7 @@ import (
|
|||
"golang.org/x/exp/slices"
|
||||
)
|
||||
|
||||
type imageFunc func(workload workload.Workload, t *imageType, customizations *blueprint.Customizations, options distro.ImageOptions, packageSets map[string]rpmmd.PackageSet, containers []container.SourceSpec, rng *rand.Rand) (image.ImageKind, error)
|
||||
type imageFunc func(workload workload.Workload, t *imageType, bp *blueprint.Blueprint, options distro.ImageOptions, packageSets map[string]rpmmd.PackageSet, containers []container.SourceSpec, rng *rand.Rand) (image.ImageKind, error)
|
||||
|
||||
type packageSetFunc func(t *imageType) rpmmd.PackageSet
|
||||
|
||||
|
|
@ -174,8 +174,11 @@ func (t *imageType) Manifest(bp *blueprint.Blueprint,
|
|||
// of the same name from the distro and arch
|
||||
staticPackageSets := make(map[string]rpmmd.PackageSet)
|
||||
|
||||
for name, getter := range t.packageSets {
|
||||
staticPackageSets[name] = getter(t)
|
||||
// don't add any static packages if Minimal was selected
|
||||
if !bp.Minimal {
|
||||
for name, getter := range t.packageSets {
|
||||
staticPackageSets[name] = getter(t)
|
||||
}
|
||||
}
|
||||
|
||||
// amend with repository information and collect payload repos
|
||||
|
|
@ -219,7 +222,7 @@ func (t *imageType) Manifest(bp *blueprint.Blueprint,
|
|||
/* #nosec G404 */
|
||||
rng := rand.New(source)
|
||||
|
||||
img, err := t.image(w, t, bp.Customizations, options, staticPackageSets, containerSources, rng)
|
||||
img, err := t.image(w, t, bp, options, staticPackageSets, containerSources, rng)
|
||||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
|
|
|
|||
1
vendor/github.com/osbuild/images/pkg/distro/fedora/package_sets.go
generated
vendored
1
vendor/github.com/osbuild/images/pkg/distro/fedora/package_sets.go
generated
vendored
|
|
@ -434,6 +434,7 @@ func liveInstallerPackageSet(t *imageType) rpmmd.PackageSet {
|
|||
"fcoe-utils",
|
||||
"gfs2-utils",
|
||||
"reiserfs-utils",
|
||||
"sdubby",
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
|||
390
vendor/github.com/osbuild/images/pkg/distro/rhel9/azure.go
generated
vendored
390
vendor/github.com/osbuild/images/pkg/distro/rhel9/azure.go
generated
vendored
|
|
@ -176,217 +176,229 @@ func azureRhuiPackageSet(t *imageType) rpmmd.PackageSet {
|
|||
|
||||
// PARTITION TABLES
|
||||
|
||||
var azureRhuiBasePartitionTables = distro.BasePartitionTableMap{
|
||||
platform.ARCH_X86_64.String(): disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
Size: 64 * common.GibiByte,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
func azureRhuiBasePartitionTables(t *imageType) (disk.PartitionTable, bool) {
|
||||
// RHEL >= 9.3 needs to have a bigger /boot, see RHEL-7999
|
||||
bootSize := uint64(600) * common.MebiByte
|
||||
if common.VersionLessThan(t.arch.distro.osVersion, "9.3") && t.arch.distro.isRHEL() {
|
||||
bootSize = 500 * common.MebiByte
|
||||
}
|
||||
|
||||
switch t.platform.GetArch() {
|
||||
case platform.ARCH_X86_64:
|
||||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
Size: 64 * common.GibiByte,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
{
|
||||
Size: bootSize,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
},
|
||||
{
|
||||
Type: disk.LVMPartitionGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.LVMVolumeGroup{
|
||||
Name: "rootvg",
|
||||
Description: "built with lvm2 and osbuild",
|
||||
LogicalVolumes: []disk.LVMLogicalVolume{
|
||||
{
|
||||
Size: 1 * common.GibiByte,
|
||||
Name: "homelv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "home",
|
||||
Mountpoint: "/home",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
{
|
||||
Size: 2 * common.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
},
|
||||
{
|
||||
Type: disk.LVMPartitionGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.LVMVolumeGroup{
|
||||
Name: "rootvg",
|
||||
Description: "built with lvm2 and osbuild",
|
||||
LogicalVolumes: []disk.LVMLogicalVolume{
|
||||
{
|
||||
Size: 1 * common.GibiByte,
|
||||
Name: "homelv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "home",
|
||||
Mountpoint: "/home",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Name: "rootlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Name: "rootlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Name: "tmplv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "tmp",
|
||||
Mountpoint: "/tmp",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Name: "tmplv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "tmp",
|
||||
Mountpoint: "/tmp",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 10 * common.GibiByte,
|
||||
Name: "usrlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "usr",
|
||||
Mountpoint: "/usr",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
{
|
||||
Size: 10 * common.GibiByte,
|
||||
Name: "usrlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "usr",
|
||||
Mountpoint: "/usr",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 10 * common.GibiByte,
|
||||
Name: "varlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "var",
|
||||
Mountpoint: "/var",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
{
|
||||
Size: 10 * common.GibiByte,
|
||||
Name: "varlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "var",
|
||||
Mountpoint: "/var",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
platform.ARCH_AARCH64.String(): disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
Size: 64 * common.GibiByte,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
}, true
|
||||
case platform.ARCH_AARCH64:
|
||||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
Size: 64 * common.GibiByte,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
{
|
||||
Size: bootSize,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Type: disk.LVMPartitionGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.LVMVolumeGroup{
|
||||
Name: "rootvg",
|
||||
Description: "built with lvm2 and osbuild",
|
||||
LogicalVolumes: []disk.LVMLogicalVolume{
|
||||
{
|
||||
Size: 1 * common.GibiByte,
|
||||
Name: "homelv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "home",
|
||||
Mountpoint: "/home",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
{
|
||||
Type: disk.LVMPartitionGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.LVMVolumeGroup{
|
||||
Name: "rootvg",
|
||||
Description: "built with lvm2 and osbuild",
|
||||
LogicalVolumes: []disk.LVMLogicalVolume{
|
||||
{
|
||||
Size: 1 * common.GibiByte,
|
||||
Name: "homelv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "home",
|
||||
Mountpoint: "/home",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Name: "rootlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Name: "rootlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Name: "tmplv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "tmp",
|
||||
Mountpoint: "/tmp",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Name: "tmplv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "tmp",
|
||||
Mountpoint: "/tmp",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 10 * common.GibiByte,
|
||||
Name: "usrlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "usr",
|
||||
Mountpoint: "/usr",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
{
|
||||
Size: 10 * common.GibiByte,
|
||||
Name: "usrlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "usr",
|
||||
Mountpoint: "/usr",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 10 * common.GibiByte,
|
||||
Name: "varlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "var",
|
||||
Mountpoint: "/var",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
{
|
||||
Size: 10 * common.GibiByte,
|
||||
Name: "varlv",
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "var",
|
||||
Mountpoint: "/var",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}, true
|
||||
default:
|
||||
return disk.PartitionTable{}, false
|
||||
}
|
||||
}
|
||||
|
||||
var defaultAzureKernelOptions = "ro console=tty1 console=ttyS0 earlyprintk=ttyS0 rootdelay=300"
|
||||
|
|
|
|||
225
vendor/github.com/osbuild/images/pkg/distro/rhel9/edge.go
generated
vendored
225
vendor/github.com/osbuild/images/pkg/distro/rhel9/edge.go
generated
vendored
|
|
@ -223,105 +223,122 @@ var (
|
|||
},
|
||||
},
|
||||
}
|
||||
// Partition tables
|
||||
minimalrawPartitionTables = distro.BasePartitionTableMap{
|
||||
platform.ARCH_X86_64.String(): disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
StartOffset: 8 * common.MebiByte,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 200 * common.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
Label: "EFI-SYSTEM",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
Label: "boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
platform.ARCH_AARCH64.String(): disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
StartOffset: 8 * common.MebiByte,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 200 * common.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
Label: "EFI-SYSTEM",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
Label: "boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
// Partition tables
|
||||
func minimalrawPartitionTables(t *imageType) (disk.PartitionTable, bool) {
|
||||
// RHEL >= 9.3 needs to have a bigger /boot, see RHEL-7999
|
||||
bootSize := uint64(600) * common.MebiByte
|
||||
if common.VersionLessThan(t.arch.distro.osVersion, "9.3") && t.arch.distro.isRHEL() {
|
||||
bootSize = 500 * common.MebiByte
|
||||
}
|
||||
edgeBasePartitionTables = distro.BasePartitionTableMap{
|
||||
platform.ARCH_X86_64.String(): disk.PartitionTable{
|
||||
|
||||
switch t.platform.GetArch() {
|
||||
case platform.ARCH_X86_64:
|
||||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
StartOffset: 8 * common.MebiByte,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 200 * common.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
Label: "EFI-SYSTEM",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: bootSize,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
Label: "boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
}, true
|
||||
case platform.ARCH_AARCH64:
|
||||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
StartOffset: 8 * common.MebiByte,
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 200 * common.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
Label: "EFI-SYSTEM",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: bootSize,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
Label: "boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
}, true
|
||||
default:
|
||||
return disk.PartitionTable{}, false
|
||||
}
|
||||
}
|
||||
|
||||
func edgeBasePartitionTables(t *imageType) (disk.PartitionTable, bool) {
|
||||
switch t.platform.GetArch() {
|
||||
case platform.ARCH_X86_64:
|
||||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
|
|
@ -396,8 +413,9 @@ var (
|
|||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
platform.ARCH_AARCH64.String(): disk.PartitionTable{
|
||||
}, true
|
||||
case platform.ARCH_AARCH64:
|
||||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
|
|
@ -466,9 +484,12 @@ var (
|
|||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}, true
|
||||
|
||||
default:
|
||||
return disk.PartitionTable{}, false
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
// Package Sets
|
||||
|
||||
|
|
|
|||
9
vendor/github.com/osbuild/images/pkg/distro/rhel9/imagetype.go
generated
vendored
9
vendor/github.com/osbuild/images/pkg/distro/rhel9/imagetype.go
generated
vendored
|
|
@ -46,6 +46,8 @@ type imageFunc func(workload workload.Workload, t *imageType, customizations *bl
|
|||
|
||||
type packageSetFunc func(t *imageType) rpmmd.PackageSet
|
||||
|
||||
type basePartitionTableFunc func(t *imageType) (disk.PartitionTable, bool)
|
||||
|
||||
type imageType struct {
|
||||
arch *architecture
|
||||
platform platform.Platform
|
||||
|
|
@ -72,7 +74,7 @@ type imageType struct {
|
|||
// bootable image
|
||||
bootable bool
|
||||
// List of valid arches for the image type
|
||||
basePartitionTables distro.BasePartitionTableMap
|
||||
basePartitionTables basePartitionTableFunc
|
||||
}
|
||||
|
||||
func (t *imageType) Name() string {
|
||||
|
|
@ -151,7 +153,7 @@ func (t *imageType) getPartitionTable(
|
|||
) (*disk.PartitionTable, error) {
|
||||
archName := t.arch.Name()
|
||||
|
||||
basePartitionTable, exists := t.basePartitionTables[archName]
|
||||
basePartitionTable, exists := t.basePartitionTables(t)
|
||||
|
||||
if !exists {
|
||||
return nil, fmt.Errorf("no partition table defined for architecture %q for image type %q", archName, t.Name())
|
||||
|
|
@ -175,8 +177,7 @@ func (t *imageType) getDefaultImageConfig() *distro.ImageConfig {
|
|||
}
|
||||
|
||||
func (t *imageType) PartitionType() string {
|
||||
archName := t.arch.Name()
|
||||
basePartitionTable, exists := t.basePartitionTables[archName]
|
||||
basePartitionTable, exists := t.basePartitionTables(t)
|
||||
if !exists {
|
||||
return ""
|
||||
}
|
||||
|
|
|
|||
319
vendor/github.com/osbuild/images/pkg/distro/rhel9/partition_tables.go
generated
vendored
319
vendor/github.com/osbuild/images/pkg/distro/rhel9/partition_tables.go
generated
vendored
|
|
@ -3,167 +3,182 @@ package rhel9
|
|||
import (
|
||||
"github.com/osbuild/images/internal/common"
|
||||
"github.com/osbuild/images/pkg/disk"
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/platform"
|
||||
)
|
||||
|
||||
var defaultBasePartitionTables = distro.BasePartitionTableMap{
|
||||
platform.ARCH_X86_64.String(): disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 1 * common.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
},
|
||||
{
|
||||
Size: 200 * common.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
Label: "EFI-SYSTEM",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
func defaultBasePartitionTables(t *imageType) (disk.PartitionTable, bool) {
|
||||
// RHEL >= 9.3 needs to have a bigger /boot, see RHEL-7999
|
||||
bootSize := uint64(600) * common.MebiByte
|
||||
if common.VersionLessThan(t.arch.distro.osVersion, "9.3") && t.arch.distro.isRHEL() {
|
||||
bootSize = 500 * common.MebiByte
|
||||
}
|
||||
|
||||
switch t.platform.GetArch() {
|
||||
case platform.ARCH_X86_64:
|
||||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 1 * common.MebiByte,
|
||||
Bootable: true,
|
||||
Type: disk.BIOSBootPartitionGUID,
|
||||
UUID: disk.BIOSBootPartitionUUID,
|
||||
},
|
||||
{
|
||||
Size: 200 * common.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
Label: "EFI-SYSTEM",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: bootSize,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
Label: "boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
Label: "boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
}, true
|
||||
case platform.ARCH_AARCH64:
|
||||
return disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 200 * common.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
Label: "EFI-SYSTEM",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: bootSize,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
Label: "boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
}, true
|
||||
case platform.ARCH_PPC64LE:
|
||||
return disk.PartitionTable{
|
||||
UUID: "0x14fc63d2",
|
||||
Type: "dos",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 4 * common.MebiByte,
|
||||
Type: "41",
|
||||
Bootable: true,
|
||||
},
|
||||
{
|
||||
Size: bootSize,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
Label: "boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
platform.ARCH_AARCH64.String(): disk.PartitionTable{
|
||||
UUID: "D209C89E-EA5E-4FBD-B161-B461CCE297E0",
|
||||
Type: "gpt",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 200 * common.MebiByte,
|
||||
Type: disk.EFISystemPartitionGUID,
|
||||
UUID: disk.EFISystemPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "vfat",
|
||||
UUID: disk.EFIFilesystemUUID,
|
||||
Mountpoint: "/boot/efi",
|
||||
Label: "EFI-SYSTEM",
|
||||
FSTabOptions: "defaults,uid=0,gid=0,umask=077,shortname=winnt",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 2,
|
||||
}, true
|
||||
|
||||
case platform.ARCH_S390X:
|
||||
return disk.PartitionTable{
|
||||
UUID: "0x14fc63d2",
|
||||
Type: "dos",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: bootSize,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
Label: "boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Bootable: true,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Type: disk.XBootLDRPartitionGUID,
|
||||
UUID: disk.FilesystemDataUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
Label: "boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Type: disk.FilesystemDataGUID,
|
||||
UUID: disk.RootPartitionUUID,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Label: "root",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
platform.ARCH_PPC64LE.String(): disk.PartitionTable{
|
||||
UUID: "0x14fc63d2",
|
||||
Type: "dos",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 4 * common.MebiByte,
|
||||
Type: "41",
|
||||
Bootable: true,
|
||||
},
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
Label: "boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
platform.ARCH_S390X.String(): disk.PartitionTable{
|
||||
UUID: "0x14fc63d2",
|
||||
Type: "dos",
|
||||
Partitions: []disk.Partition{
|
||||
{
|
||||
Size: 500 * common.MebiByte,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/boot",
|
||||
Label: "boot",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
Size: 2 * common.GibiByte,
|
||||
Bootable: true,
|
||||
Payload: &disk.Filesystem{
|
||||
Type: "xfs",
|
||||
Mountpoint: "/",
|
||||
FSTabOptions: "defaults",
|
||||
FSTabFreq: 0,
|
||||
FSTabPassNo: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}, true
|
||||
|
||||
default:
|
||||
return disk.PartitionTable{}, false
|
||||
}
|
||||
}
|
||||
|
|
|
|||
7
vendor/github.com/osbuild/images/pkg/image/disk.go
generated
vendored
7
vendor/github.com/osbuild/images/pkg/image/disk.go
generated
vendored
|
|
@ -32,6 +32,10 @@ type DiskImage struct {
|
|||
OSProduct string
|
||||
OSVersion string
|
||||
OSNick string
|
||||
|
||||
// InstallWeakDeps enables installation of weak dependencies for packages
|
||||
// that are statically defined for the payload pipeline of the image.
|
||||
InstallWeakDeps *bool
|
||||
}
|
||||
|
||||
func NewDiskImage() *DiskImage {
|
||||
|
|
@ -57,6 +61,9 @@ func (img *DiskImage) InstantiateManifest(m *manifest.Manifest,
|
|||
osPipeline.OSProduct = img.OSProduct
|
||||
osPipeline.OSVersion = img.OSVersion
|
||||
osPipeline.OSNick = img.OSNick
|
||||
if img.InstallWeakDeps != nil {
|
||||
osPipeline.InstallWeakDeps = *img.InstallWeakDeps
|
||||
}
|
||||
|
||||
rawImagePipeline := manifest.NewRawImage(buildPipeline, osPipeline)
|
||||
rawImagePipeline.PartTool = img.PartTool
|
||||
|
|
|
|||
3
vendor/github.com/osbuild/images/pkg/manifest/os.go
generated
vendored
3
vendor/github.com/osbuild/images/pkg/manifest/os.go
generated
vendored
|
|
@ -167,6 +167,9 @@ type OS struct {
|
|||
OSVersion string
|
||||
OSNick string
|
||||
|
||||
// InstallWeakDeps enables installation of weak dependencies for packages
|
||||
// that are statically defined for the pipeline.
|
||||
// Defaults to True.
|
||||
InstallWeakDeps bool
|
||||
}
|
||||
|
||||
|
|
|
|||
6
vendor/github.com/osbuild/images/pkg/osbuild/result.go
generated
vendored
6
vendor/github.com/osbuild/images/pkg/osbuild/result.go
generated
vendored
|
|
@ -147,10 +147,10 @@ func (res *Result) Write(writer io.Writer) error {
|
|||
sort.Strings(pipelineNames)
|
||||
|
||||
for _, pipelineName := range pipelineNames {
|
||||
fmt.Fprintf(writer, "Pipeline %s\n", pipelineName)
|
||||
fmt.Fprintf(writer, "Pipeline: %s\n", pipelineName)
|
||||
pipelineMD := res.Metadata[pipelineName]
|
||||
for _, stage := range res.Log[pipelineName] {
|
||||
fmt.Fprintf(writer, "Stage %s\n", stage.Type)
|
||||
fmt.Fprintf(writer, "Stage: %s\n", stage.Type)
|
||||
fmt.Fprintf(writer, "Output:\n%s\n", stage.Output)
|
||||
|
||||
// print structured stage metadata if available
|
||||
|
|
@ -164,8 +164,8 @@ func (res *Result) Write(writer io.Writer) error {
|
|||
return err
|
||||
}
|
||||
}
|
||||
fmt.Fprint(writer, "\n")
|
||||
}
|
||||
fmt.Fprint(writer, "\n")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue