distro/fedora: introduce fedora-iot-raw-image

Image definition is a stub.  No implementation yet and not added to
distro image type list.

Co-Authored-By: Ondřej Budai <ondrej@budai.cz>
This commit is contained in:
Achilleas Koutsou 2022-08-15 20:58:07 +02:00 committed by Tom Gundersen
parent e2a298723e
commit 660444fed1
4 changed files with 31 additions and 1 deletions

View file

@ -131,6 +131,25 @@ var (
exports: []string{"bootiso"},
}
_ = imageType{
name: "fedora-iot-raw-image",
nameAliases: []string{"iot-raw-image"},
filename: "image.raw.xz",
mimeType: "application/xz",
packageSets: map[string]packageSetFunc{},
defaultImageConfig: &distro.ImageConfig{
Locale: common.StringToPtr("en_US.UTF-8"),
},
defaultSize: 10 * GigaByte,
rpmOstree: true,
bootable: true,
image: iotRawImage,
buildPipelines: []string{"build"},
payloadPipelines: []string{"image-tree", "image", "xz"},
exports: []string{"xz"},
basePartitionTables: iotBasePartitionTables,
}
qcow2ImgType = imageType{
name: "qcow2",
filename: "disk.qcow2",

View file

@ -417,7 +417,7 @@ func TestDistro_ManifestError(t *testing.T) {
}
testPackageSpecSets := distro_test_common.GetTestingImagePackageSpecSets("kernel", imgType)
_, err := imgType.Manifest(bp.Customizations, imgOpts, nil, testPackageSpecSets, nil, 0)
if imgTypeName == "fedora-iot-commit" || imgTypeName == "fedora-iot-container" {
if imgTypeName == "fedora-iot-commit" || imgTypeName == "fedora-iot-container" || imgTypeName == "fedora-iot-raw-image" {
assert.EqualError(t, err, "kernel boot parameter customizations are not supported for ostree types")
} else if imgTypeName == "fedora-iot-installer" {
assert.EqualError(t, err, fmt.Sprintf("boot ISO image type \"%s\" requires specifying a URL from which to retrieve the OSTree commit", imgTypeName))

View file

@ -273,3 +273,12 @@ func iotInstallerImage(workload workload.Workload,
return img, nil
}
func iotRawImage(workload workload.Workload,
t *imageType,
customizations *blueprint.Customizations,
options distro.ImageOptions,
packageSets map[string]rpmmd.PackageSet,
rng *rand.Rand) (image.ImageKind, error) {
return nil, nil
}

View file

@ -105,3 +105,5 @@ var defaultBasePartitionTables = distro.BasePartitionTableMap{
},
},
}
var iotBasePartitionTables = distro.BasePartitionTableMap{}