distro/rhel8: image type separation: vmdk
This commit is contained in:
parent
fd93f47d3f
commit
801affc26a
3 changed files with 49 additions and 43 deletions
|
|
@ -215,27 +215,6 @@ func newDistro(name string, minor int) *distribution {
|
|||
bootType: distro.LegacyBootType,
|
||||
}
|
||||
|
||||
vmdkImgType := imageType{
|
||||
name: "vmdk",
|
||||
filename: "disk.vmdk",
|
||||
mimeType: "application/x-vmdk",
|
||||
packageSets: map[string]packageSetFunc{
|
||||
buildPkgsKey: distroBuildPackageSet,
|
||||
osPkgsKey: vmdkCommonPackageSet,
|
||||
},
|
||||
packageSetChains: map[string][]string{
|
||||
osPkgsKey: {osPkgsKey, blueprintPkgsKey},
|
||||
},
|
||||
kernelOptions: "ro net.ifnames=0",
|
||||
bootable: true,
|
||||
defaultSize: 4 * common.GibiByte,
|
||||
pipelines: vmdkPipelines,
|
||||
buildPipelines: []string{"build"},
|
||||
payloadPipelines: []string{"os", "image", "vmdk"},
|
||||
exports: []string{"vmdk"},
|
||||
basePartitionTables: defaultBasePartitionTables,
|
||||
}
|
||||
|
||||
// GCE BYOS image
|
||||
defaultGceByosImageConfig := &distro.ImageConfig{
|
||||
Timezone: common.ToPtr("UTC"),
|
||||
|
|
@ -567,7 +546,7 @@ func newDistro(name string, minor int) *distribution {
|
|||
ImageFormat: platform.FORMAT_VMDK,
|
||||
},
|
||||
},
|
||||
vmdkImgType,
|
||||
vmdkImgType(),
|
||||
)
|
||||
|
||||
x86_64.addImageTypes(
|
||||
|
|
|
|||
|
|
@ -241,27 +241,6 @@ func s390xLegacyBootPackageSet(t *imageType) rpmmd.PackageSet {
|
|||
}
|
||||
}
|
||||
|
||||
// OS package sets
|
||||
|
||||
func vmdkCommonPackageSet(t *imageType) rpmmd.PackageSet {
|
||||
return rpmmd.PackageSet{
|
||||
Include: []string{
|
||||
"@core",
|
||||
"chrony",
|
||||
"cloud-init",
|
||||
"firewalld",
|
||||
"langpacks-en",
|
||||
"open-vm-tools",
|
||||
"selinux-policy-targeted",
|
||||
},
|
||||
Exclude: []string{
|
||||
"dracut-config-rescue",
|
||||
"rng-tools",
|
||||
},
|
||||
}.Append(bootPackageSet(t))
|
||||
|
||||
}
|
||||
|
||||
// common GCE image
|
||||
func gceCommonPackageSet(t *imageType) rpmmd.PackageSet {
|
||||
return rpmmd.PackageSet{
|
||||
|
|
|
|||
48
internal/distro/rhel8/vmdk.go
Normal file
48
internal/distro/rhel8/vmdk.go
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
package rhel8
|
||||
|
||||
import (
|
||||
"github.com/osbuild/osbuild-composer/internal/common"
|
||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||
)
|
||||
|
||||
func vmdkImgType() imageType {
|
||||
return imageType{
|
||||
name: "vmdk",
|
||||
filename: "disk.vmdk",
|
||||
mimeType: "application/x-vmdk",
|
||||
packageSets: map[string]packageSetFunc{
|
||||
buildPkgsKey: distroBuildPackageSet,
|
||||
osPkgsKey: vmdkCommonPackageSet,
|
||||
},
|
||||
packageSetChains: map[string][]string{
|
||||
osPkgsKey: {osPkgsKey, blueprintPkgsKey},
|
||||
},
|
||||
kernelOptions: "ro net.ifnames=0",
|
||||
bootable: true,
|
||||
defaultSize: 4 * common.GibiByte,
|
||||
pipelines: vmdkPipelines,
|
||||
buildPipelines: []string{"build"},
|
||||
payloadPipelines: []string{"os", "image", "vmdk"},
|
||||
exports: []string{"vmdk"},
|
||||
basePartitionTables: defaultBasePartitionTables,
|
||||
}
|
||||
}
|
||||
|
||||
func vmdkCommonPackageSet(t *imageType) rpmmd.PackageSet {
|
||||
return rpmmd.PackageSet{
|
||||
Include: []string{
|
||||
"@core",
|
||||
"chrony",
|
||||
"cloud-init",
|
||||
"firewalld",
|
||||
"langpacks-en",
|
||||
"open-vm-tools",
|
||||
"selinux-policy-targeted",
|
||||
},
|
||||
Exclude: []string{
|
||||
"dracut-config-rescue",
|
||||
"rng-tools",
|
||||
},
|
||||
}.Append(bootPackageSet(t))
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue