image: add new image type "minimal-raw" for fedora
Signed-off-by: Sarita Mahajan <sarmahaj@redhat.com>
This commit is contained in:
parent
2e3dd16220
commit
0d16e2310e
11 changed files with 68481 additions and 0 deletions
|
|
@ -319,6 +319,24 @@ var (
|
|||
payloadPipelines: []string{"os", "container"},
|
||||
exports: []string{"container"},
|
||||
}
|
||||
|
||||
minimalrawImgType = imageType{
|
||||
name: "minimal-raw",
|
||||
filename: "raw.img",
|
||||
mimeType: "application/disk",
|
||||
packageSets: map[string]packageSetFunc{
|
||||
osPkgsKey: minimalrpmPackageSet,
|
||||
},
|
||||
rpmOstree: false,
|
||||
kernelOptions: defaultKernelOptions,
|
||||
bootable: true,
|
||||
defaultSize: 2 * common.GibiByte,
|
||||
image: liveImage,
|
||||
buildPipelines: []string{"build"},
|
||||
payloadPipelines: []string{"os", "image"},
|
||||
exports: []string{"image"},
|
||||
basePartitionTables: defaultBasePartitionTables,
|
||||
}
|
||||
)
|
||||
|
||||
type distribution struct {
|
||||
|
|
@ -966,6 +984,24 @@ func newDistro(version int) distro.Distro {
|
|||
},
|
||||
iotRawImgType,
|
||||
)
|
||||
x86_64.addImageTypes(
|
||||
&platform.X86{
|
||||
UEFIVendor: "fedora",
|
||||
BasePlatform: platform.BasePlatform{
|
||||
ImageFormat: platform.FORMAT_RAW,
|
||||
},
|
||||
},
|
||||
minimalrawImgType,
|
||||
)
|
||||
aarch64.addImageTypes(
|
||||
&platform.Aarch64{
|
||||
UEFIVendor: "fedora",
|
||||
BasePlatform: platform.BasePlatform{
|
||||
ImageFormat: platform.FORMAT_RAW,
|
||||
},
|
||||
},
|
||||
minimalrawImgType,
|
||||
)
|
||||
|
||||
s390x.addImageTypes(nil)
|
||||
|
||||
|
|
|
|||
|
|
@ -165,6 +165,14 @@ func TestFilenameFromType(t *testing.T) {
|
|||
args: args{"foobar"},
|
||||
want: wantResult{wantErr: true},
|
||||
},
|
||||
{
|
||||
name: "minimal-raw",
|
||||
args: args{"minimal-raw"},
|
||||
want: wantResult{
|
||||
filename: "raw.img",
|
||||
mimeType: "application/disk",
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, dist := range fedoraFamilyDistros {
|
||||
t.Run(dist.name, func(t *testing.T) {
|
||||
|
|
@ -263,6 +271,7 @@ func TestImageType_Name(t *testing.T) {
|
|||
"iot-raw-image",
|
||||
"oci",
|
||||
"image-installer",
|
||||
"minimal-raw",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -277,6 +286,7 @@ func TestImageType_Name(t *testing.T) {
|
|||
"iot-installer",
|
||||
"iot-raw-image",
|
||||
"image-installer",
|
||||
"minimal-raw",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -438,6 +448,7 @@ func TestArchitecture_ListImageTypes(t *testing.T) {
|
|||
"oci",
|
||||
"container",
|
||||
"image-installer",
|
||||
"minimal-raw",
|
||||
},
|
||||
},
|
||||
{
|
||||
|
|
@ -453,6 +464,7 @@ func TestArchitecture_ListImageTypes(t *testing.T) {
|
|||
"oci",
|
||||
"container",
|
||||
"image-installer",
|
||||
"minimal-raw",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -571,3 +571,11 @@ func bareMetalPackageSet(t *imageType) rpmmd.PackageSet {
|
|||
},
|
||||
}
|
||||
}
|
||||
|
||||
func minimalrpmPackageSet(t *imageType) rpmmd.PackageSet {
|
||||
return rpmmd.PackageSet{
|
||||
Include: []string{
|
||||
"@core",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -371,6 +371,7 @@ var imageTypeCompatMapping = map[string]string{
|
|||
"tar": "Tar",
|
||||
"gce": "GCP",
|
||||
"gce-rhui": "GCE RHUI",
|
||||
"minimal-raw": "minimal-raw",
|
||||
}
|
||||
|
||||
func imageTypeToCompatString(imgType distro.ImageType) string {
|
||||
|
|
|
|||
11248
test/data/manifests/fedora_36-aarch64-minimal_raw-boot.json
Normal file
11248
test/data/manifests/fedora_36-aarch64-minimal_raw-boot.json
Normal file
File diff suppressed because it is too large
Load diff
11357
test/data/manifests/fedora_36-x86_64-minimal_raw-boot.json
Normal file
11357
test/data/manifests/fedora_36-x86_64-minimal_raw-boot.json
Normal file
File diff suppressed because it is too large
Load diff
11392
test/data/manifests/fedora_37-aarch64-minimal_raw-boot.json
Normal file
11392
test/data/manifests/fedora_37-aarch64-minimal_raw-boot.json
Normal file
File diff suppressed because it is too large
Load diff
11501
test/data/manifests/fedora_37-x86_64-minimal_raw-boot.json
Normal file
11501
test/data/manifests/fedora_37-x86_64-minimal_raw-boot.json
Normal file
File diff suppressed because it is too large
Load diff
11413
test/data/manifests/fedora_38-aarch64-minimal_raw-boot.json
Normal file
11413
test/data/manifests/fedora_38-aarch64-minimal_raw-boot.json
Normal file
File diff suppressed because it is too large
Load diff
11501
test/data/manifests/fedora_38-x86_64-minimal_raw-boot.json
Normal file
11501
test/data/manifests/fedora_38-x86_64-minimal_raw-boot.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1095,5 +1095,17 @@
|
|||
}
|
||||
},
|
||||
"overrides": {}
|
||||
},
|
||||
"minimal-raw": {
|
||||
"compose-request": {
|
||||
"distro": "",
|
||||
"arch": "",
|
||||
"image-type": "minimal-raw",
|
||||
"repositories": [],
|
||||
"filename": "raw.img",
|
||||
"blueprint": {}
|
||||
},
|
||||
"no-image-info": true,
|
||||
"overrides": {}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue