distro: drop legacy image types
We do not properly test, and do not have properly defined use-cases for the ext4-filesystem, partitioned-disk, nor tar image types. Drop them to focus on delivering the things we car properly test. Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
parent
e06076ed8c
commit
e2c14b9fe6
30 changed files with 0 additions and 117760 deletions
|
|
@ -216,50 +216,6 @@ func New() *Fedora30 {
|
|||
},
|
||||
}
|
||||
|
||||
ext4FilesystemType := imageType{
|
||||
name: "ext4-filesystem",
|
||||
filename: "filesystem.img",
|
||||
mimeType: "application/octet-stream",
|
||||
packages: []string{
|
||||
"policycoreutils",
|
||||
"selinux-policy-targeted",
|
||||
"kernel",
|
||||
"firewalld",
|
||||
"chrony",
|
||||
"langpacks-en",
|
||||
},
|
||||
excludedPackages: []string{
|
||||
"dracut-config-rescue",
|
||||
},
|
||||
kernelOptions: "ro biosdevname=0 net.ifnames=0",
|
||||
bootable: false,
|
||||
defaultSize: 2 * GigaByte,
|
||||
assembler: func(uefi bool, size uint64) *osbuild.Assembler { return rawFSAssembler("filesystem.img", size) },
|
||||
}
|
||||
|
||||
partitionedDisk := imageType{
|
||||
name: "partitioned-disk",
|
||||
filename: "disk.img",
|
||||
mimeType: "application/octet-stream",
|
||||
packages: []string{
|
||||
"@core",
|
||||
"chrony",
|
||||
"firewalld",
|
||||
"kernel",
|
||||
"langpacks-en",
|
||||
"selinux-policy-targeted",
|
||||
},
|
||||
excludedPackages: []string{
|
||||
"dracut-config-rescue",
|
||||
},
|
||||
kernelOptions: "ro biosdevname=0 net.ifnames=0",
|
||||
bootable: true,
|
||||
defaultSize: 2 * GigaByte,
|
||||
assembler: func(uefi bool, size uint64) *osbuild.Assembler {
|
||||
return qemuAssembler("raw", "disk.img", uefi, size)
|
||||
},
|
||||
}
|
||||
|
||||
qcow2ImageType := imageType{
|
||||
name: "qcow2",
|
||||
filename: "disk.qcow2",
|
||||
|
|
@ -315,27 +271,6 @@ func New() *Fedora30 {
|
|||
},
|
||||
}
|
||||
|
||||
tarImgType := imageType{
|
||||
name: "tar",
|
||||
filename: "root.tar.xz",
|
||||
mimeType: "application/x-tar",
|
||||
packages: []string{
|
||||
"policycoreutils",
|
||||
"selinux-policy-targeted",
|
||||
"kernel",
|
||||
"firewalld",
|
||||
"chrony",
|
||||
"langpacks-en",
|
||||
},
|
||||
excludedPackages: []string{
|
||||
"dracut-config-rescue",
|
||||
},
|
||||
kernelOptions: "ro biosdevname=0 net.ifnames=0",
|
||||
bootable: false,
|
||||
defaultSize: 2 * GigaByte,
|
||||
assembler: func(uefi bool, size uint64) *osbuild.Assembler { return tarAssembler("root.tar.xz", "xz") },
|
||||
}
|
||||
|
||||
vhdImgType := imageType{
|
||||
name: "vhd",
|
||||
filename: "disk.vhd",
|
||||
|
|
@ -423,11 +358,8 @@ func New() *Fedora30 {
|
|||
}
|
||||
x8664.setImageTypes(
|
||||
amiImgType,
|
||||
ext4FilesystemType,
|
||||
partitionedDisk,
|
||||
qcow2ImageType,
|
||||
openstackImgType,
|
||||
tarImgType,
|
||||
vhdImgType,
|
||||
vmdkImgType,
|
||||
)
|
||||
|
|
@ -446,11 +378,8 @@ func New() *Fedora30 {
|
|||
}
|
||||
aarch64.setImageTypes(
|
||||
amiImgType,
|
||||
ext4FilesystemType,
|
||||
partitionedDisk,
|
||||
qcow2ImageType,
|
||||
openstackImgType,
|
||||
tarImgType,
|
||||
)
|
||||
|
||||
r.setArches(x8664, aarch64)
|
||||
|
|
@ -748,21 +677,3 @@ func qemuAssembler(format string, filename string, uefi bool, size uint64) *osbu
|
|||
}
|
||||
return osbuild.NewQEMUAssembler(&options)
|
||||
}
|
||||
|
||||
func tarAssembler(filename, compression string) *osbuild.Assembler {
|
||||
return osbuild.NewTarAssembler(
|
||||
&osbuild.TarAssemblerOptions{
|
||||
Filename: filename,
|
||||
Compression: compression,
|
||||
})
|
||||
}
|
||||
|
||||
func rawFSAssembler(filename string, size uint64) *osbuild.Assembler {
|
||||
id := uuid.MustParse("76a22bf4-f153-4541-b6c7-0332c0dfaeac")
|
||||
return osbuild.NewRawFSAssembler(
|
||||
&osbuild.RawFSAssemblerOptions{
|
||||
Filename: filename,
|
||||
RootFilesystemUUID: id,
|
||||
Size: size,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,36 +25,18 @@ func TestFilenameFromType(t *testing.T) {
|
|||
want: "image.vhdx",
|
||||
want1: "application/octet-stream",
|
||||
},
|
||||
{
|
||||
name: "ext4",
|
||||
args: args{"ext4-filesystem"},
|
||||
want: "filesystem.img",
|
||||
want1: "application/octet-stream",
|
||||
},
|
||||
{
|
||||
name: "openstack",
|
||||
args: args{"openstack"},
|
||||
want: "disk.qcow2",
|
||||
want1: "application/x-qemu-disk",
|
||||
},
|
||||
{
|
||||
name: "partitioned-disk",
|
||||
args: args{"partitioned-disk"},
|
||||
want: "disk.img",
|
||||
want1: "application/octet-stream",
|
||||
},
|
||||
{
|
||||
name: "qcow2",
|
||||
args: args{"qcow2"},
|
||||
want: "disk.qcow2",
|
||||
want1: "application/x-qemu-disk",
|
||||
},
|
||||
{
|
||||
name: "tar",
|
||||
args: args{"tar"},
|
||||
want: "root.tar.xz",
|
||||
want1: "application/x-tar",
|
||||
},
|
||||
{
|
||||
name: "vhd",
|
||||
args: args{"vhd"},
|
||||
|
|
@ -150,11 +132,8 @@ func TestImageType_Name(t *testing.T) {
|
|||
arch: "x86_64",
|
||||
imgNames: []string{
|
||||
"ami",
|
||||
"ext4-filesystem",
|
||||
"partitioned-disk",
|
||||
"qcow2",
|
||||
"openstack",
|
||||
"tar",
|
||||
"vhd",
|
||||
"vmdk",
|
||||
},
|
||||
|
|
@ -163,11 +142,8 @@ func TestImageType_Name(t *testing.T) {
|
|||
arch: "aarch64",
|
||||
imgNames: []string{
|
||||
"ami",
|
||||
"ext4-filesystem",
|
||||
"partitioned-disk",
|
||||
"qcow2",
|
||||
"openstack",
|
||||
"tar",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -258,21 +234,6 @@ func TestImageType_BasePackages(t *testing.T) {
|
|||
},
|
||||
bootable: true,
|
||||
},
|
||||
{
|
||||
name: "ext4-filesystem",
|
||||
basePackages: []string{
|
||||
"policycoreutils",
|
||||
"selinux-policy-targeted",
|
||||
"kernel",
|
||||
"firewalld",
|
||||
"chrony",
|
||||
"langpacks-en",
|
||||
},
|
||||
excludedPackages: []string{
|
||||
"dracut-config-rescue",
|
||||
},
|
||||
bootable: true,
|
||||
},
|
||||
{
|
||||
name: "openstack",
|
||||
basePackages: []string{
|
||||
|
|
|
|||
|
|
@ -215,50 +215,6 @@ func New() *Fedora31 {
|
|||
},
|
||||
}
|
||||
|
||||
ext4FilesystemType := imageType{
|
||||
name: "ext4-filesystem",
|
||||
filename: "filesystem.img",
|
||||
mimeType: "application/octet-stream",
|
||||
packages: []string{
|
||||
"policycoreutils",
|
||||
"selinux-policy-targeted",
|
||||
"kernel",
|
||||
"firewalld",
|
||||
"chrony",
|
||||
"langpacks-en",
|
||||
},
|
||||
excludedPackages: []string{
|
||||
"dracut-config-rescue",
|
||||
},
|
||||
kernelOptions: "ro biosdevname=0 net.ifnames=0",
|
||||
bootable: false,
|
||||
defaultSize: 2 * GigaByte,
|
||||
assembler: func(uefi bool, size uint64) *osbuild.Assembler { return rawFSAssembler("filesystem.img", size) },
|
||||
}
|
||||
|
||||
partitionedDisk := imageType{
|
||||
name: "partitioned-disk",
|
||||
filename: "disk.img",
|
||||
mimeType: "application/octet-stream",
|
||||
packages: []string{
|
||||
"@core",
|
||||
"chrony",
|
||||
"firewalld",
|
||||
"kernel",
|
||||
"langpacks-en",
|
||||
"selinux-policy-targeted",
|
||||
},
|
||||
excludedPackages: []string{
|
||||
"dracut-config-rescue",
|
||||
},
|
||||
kernelOptions: "ro biosdevname=0 net.ifnames=0",
|
||||
bootable: true,
|
||||
defaultSize: 2 * GigaByte,
|
||||
assembler: func(uefi bool, size uint64) *osbuild.Assembler {
|
||||
return qemuAssembler("raw", "disk.img", uefi, size)
|
||||
},
|
||||
}
|
||||
|
||||
qcow2ImageType := imageType{
|
||||
name: "qcow2",
|
||||
filename: "disk.qcow2",
|
||||
|
|
@ -314,27 +270,6 @@ func New() *Fedora31 {
|
|||
},
|
||||
}
|
||||
|
||||
tarImgType := imageType{
|
||||
name: "tar",
|
||||
filename: "root.tar.xz",
|
||||
mimeType: "application/x-tar",
|
||||
packages: []string{
|
||||
"policycoreutils",
|
||||
"selinux-policy-targeted",
|
||||
"kernel",
|
||||
"firewalld",
|
||||
"chrony",
|
||||
"langpacks-en",
|
||||
},
|
||||
excludedPackages: []string{
|
||||
"dracut-config-rescue",
|
||||
},
|
||||
kernelOptions: "ro biosdevname=0 net.ifnames=0",
|
||||
bootable: false,
|
||||
defaultSize: 2 * GigaByte,
|
||||
assembler: func(uefi bool, size uint64) *osbuild.Assembler { return tarAssembler("root.tar.xz", "xz") },
|
||||
}
|
||||
|
||||
vhdImgType := imageType{
|
||||
name: "vhd",
|
||||
filename: "disk.vhd",
|
||||
|
|
@ -421,11 +356,8 @@ func New() *Fedora31 {
|
|||
}
|
||||
x8664.setImageTypes(
|
||||
amiImgType,
|
||||
ext4FilesystemType,
|
||||
partitionedDisk,
|
||||
qcow2ImageType,
|
||||
openstackImgType,
|
||||
tarImgType,
|
||||
vhdImgType,
|
||||
vmdkImgType,
|
||||
)
|
||||
|
|
@ -444,11 +376,8 @@ func New() *Fedora31 {
|
|||
}
|
||||
aarch64.setImageTypes(
|
||||
amiImgType,
|
||||
ext4FilesystemType,
|
||||
partitionedDisk,
|
||||
qcow2ImageType,
|
||||
openstackImgType,
|
||||
tarImgType,
|
||||
)
|
||||
|
||||
r.setArches(x8664, aarch64)
|
||||
|
|
@ -746,21 +675,3 @@ func qemuAssembler(format string, filename string, uefi bool, size uint64) *osbu
|
|||
}
|
||||
return osbuild.NewQEMUAssembler(&options)
|
||||
}
|
||||
|
||||
func tarAssembler(filename, compression string) *osbuild.Assembler {
|
||||
return osbuild.NewTarAssembler(
|
||||
&osbuild.TarAssemblerOptions{
|
||||
Filename: filename,
|
||||
Compression: compression,
|
||||
})
|
||||
}
|
||||
|
||||
func rawFSAssembler(filename string, size uint64) *osbuild.Assembler {
|
||||
id := uuid.MustParse("76a22bf4-f153-4541-b6c7-0332c0dfaeac")
|
||||
return osbuild.NewRawFSAssembler(
|
||||
&osbuild.RawFSAssemblerOptions{
|
||||
Filename: filename,
|
||||
RootFilesystemUUID: id,
|
||||
Size: size,
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,36 +25,18 @@ func TestFilenameFromType(t *testing.T) {
|
|||
want: "image.vhdx",
|
||||
want1: "application/octet-stream",
|
||||
},
|
||||
{
|
||||
name: "ext4",
|
||||
args: args{"ext4-filesystem"},
|
||||
want: "filesystem.img",
|
||||
want1: "application/octet-stream",
|
||||
},
|
||||
{
|
||||
name: "openstack",
|
||||
args: args{"openstack"},
|
||||
want: "disk.qcow2",
|
||||
want1: "application/x-qemu-disk",
|
||||
},
|
||||
{
|
||||
name: "partitioned-disk",
|
||||
args: args{"partitioned-disk"},
|
||||
want: "disk.img",
|
||||
want1: "application/octet-stream",
|
||||
},
|
||||
{
|
||||
name: "qcow2",
|
||||
args: args{"qcow2"},
|
||||
want: "disk.qcow2",
|
||||
want1: "application/x-qemu-disk",
|
||||
},
|
||||
{
|
||||
name: "tar",
|
||||
args: args{"tar"},
|
||||
want: "root.tar.xz",
|
||||
want1: "application/x-tar",
|
||||
},
|
||||
{
|
||||
name: "vhd",
|
||||
args: args{"vhd"},
|
||||
|
|
@ -214,21 +196,6 @@ func TestImageType_BasePackages(t *testing.T) {
|
|||
},
|
||||
bootable: true,
|
||||
},
|
||||
{
|
||||
name: "ext4-filesystem",
|
||||
basePackages: []string{
|
||||
"policycoreutils",
|
||||
"selinux-policy-targeted",
|
||||
"kernel",
|
||||
"firewalld",
|
||||
"chrony",
|
||||
"langpacks-en",
|
||||
},
|
||||
excludedPackages: []string{
|
||||
"dracut-config-rescue",
|
||||
},
|
||||
bootable: true,
|
||||
},
|
||||
{
|
||||
name: "openstack",
|
||||
basePackages: []string{
|
||||
|
|
|
|||
|
|
@ -282,52 +282,6 @@ func New() *Fedora32 {
|
|||
},
|
||||
}
|
||||
|
||||
ext4FilesystemType := imageType{
|
||||
name: "ext4-filesystem",
|
||||
filename: "filesystem.img",
|
||||
mimeType: "application/octet-stream",
|
||||
packages: []string{
|
||||
"policycoreutils",
|
||||
"selinux-policy-targeted",
|
||||
"kernel",
|
||||
"firewalld",
|
||||
"chrony",
|
||||
"langpacks-en",
|
||||
},
|
||||
excludedPackages: []string{
|
||||
"dracut-config-rescue",
|
||||
},
|
||||
kernelOptions: "ro biosdevname=0 net.ifnames=0",
|
||||
bootable: false,
|
||||
defaultSize: 2 * GigaByte,
|
||||
assembler: func(uefi bool, options distro.ImageOptions, arch distro.Arch) *osbuild.Assembler {
|
||||
return rawFSAssembler("filesystem.img", options)
|
||||
},
|
||||
}
|
||||
|
||||
partitionedDisk := imageType{
|
||||
name: "partitioned-disk",
|
||||
filename: "disk.img",
|
||||
mimeType: "application/octet-stream",
|
||||
packages: []string{
|
||||
"@core",
|
||||
"chrony",
|
||||
"firewalld",
|
||||
"kernel",
|
||||
"langpacks-en",
|
||||
"selinux-policy-targeted",
|
||||
},
|
||||
excludedPackages: []string{
|
||||
"dracut-config-rescue",
|
||||
},
|
||||
kernelOptions: "ro biosdevname=0 net.ifnames=0",
|
||||
bootable: true,
|
||||
defaultSize: 2 * GigaByte,
|
||||
assembler: func(uefi bool, options distro.ImageOptions, arch distro.Arch) *osbuild.Assembler {
|
||||
return qemuAssembler("raw", "disk.img", uefi, options)
|
||||
},
|
||||
}
|
||||
|
||||
qcow2ImageType := imageType{
|
||||
name: "qcow2",
|
||||
filename: "disk.qcow2",
|
||||
|
|
@ -383,29 +337,6 @@ func New() *Fedora32 {
|
|||
},
|
||||
}
|
||||
|
||||
tarImgType := imageType{
|
||||
name: "tar",
|
||||
filename: "root.tar.xz",
|
||||
mimeType: "application/x-tar",
|
||||
packages: []string{
|
||||
"policycoreutils",
|
||||
"selinux-policy-targeted",
|
||||
"kernel",
|
||||
"firewalld",
|
||||
"chrony",
|
||||
"langpacks-en",
|
||||
},
|
||||
excludedPackages: []string{
|
||||
"dracut-config-rescue",
|
||||
},
|
||||
kernelOptions: "ro biosdevname=0 net.ifnames=0",
|
||||
bootable: false,
|
||||
defaultSize: 2 * GigaByte,
|
||||
assembler: func(uefi bool, options distro.ImageOptions, arch distro.Arch) *osbuild.Assembler {
|
||||
return tarAssembler("root.tar.xz", "xz")
|
||||
},
|
||||
}
|
||||
|
||||
vhdImgType := imageType{
|
||||
name: "vhd",
|
||||
filename: "disk.vhd",
|
||||
|
|
@ -494,11 +425,8 @@ func New() *Fedora32 {
|
|||
x8664.setImageTypes(
|
||||
iotImgType,
|
||||
amiImgType,
|
||||
ext4FilesystemType,
|
||||
partitionedDisk,
|
||||
qcow2ImageType,
|
||||
openstackImgType,
|
||||
tarImgType,
|
||||
vhdImgType,
|
||||
vmdkImgType,
|
||||
)
|
||||
|
|
@ -517,11 +445,8 @@ func New() *Fedora32 {
|
|||
}
|
||||
aarch64.setImageTypes(
|
||||
amiImgType,
|
||||
ext4FilesystemType,
|
||||
partitionedDisk,
|
||||
qcow2ImageType,
|
||||
openstackImgType,
|
||||
tarImgType,
|
||||
)
|
||||
|
||||
r.setArches(x8664, aarch64)
|
||||
|
|
@ -862,24 +787,6 @@ func qemuAssembler(format string, filename string, uefi bool, imageOptions distr
|
|||
return osbuild.NewQEMUAssembler(&options)
|
||||
}
|
||||
|
||||
func tarAssembler(filename, compression string) *osbuild.Assembler {
|
||||
return osbuild.NewTarAssembler(
|
||||
&osbuild.TarAssemblerOptions{
|
||||
Filename: filename,
|
||||
Compression: compression,
|
||||
})
|
||||
}
|
||||
|
||||
func rawFSAssembler(filename string, options distro.ImageOptions) *osbuild.Assembler {
|
||||
id := uuid.MustParse("76a22bf4-f153-4541-b6c7-0332c0dfaeac")
|
||||
return osbuild.NewRawFSAssembler(
|
||||
&osbuild.RawFSAssemblerOptions{
|
||||
Filename: filename,
|
||||
RootFilesystemUUID: id,
|
||||
Size: options.Size,
|
||||
})
|
||||
}
|
||||
|
||||
func ostreeCommitAssembler(options distro.ImageOptions, arch distro.Arch) *osbuild.Assembler {
|
||||
ref := options.OSTree.Ref
|
||||
if ref == "" {
|
||||
|
|
|
|||
|
|
@ -25,36 +25,18 @@ func TestFilenameFromType(t *testing.T) {
|
|||
want: "image.vhdx",
|
||||
want1: "application/octet-stream",
|
||||
},
|
||||
{
|
||||
name: "ext4",
|
||||
args: args{"ext4-filesystem"},
|
||||
want: "filesystem.img",
|
||||
want1: "application/octet-stream",
|
||||
},
|
||||
{
|
||||
name: "openstack",
|
||||
args: args{"openstack"},
|
||||
want: "disk.qcow2",
|
||||
want1: "application/x-qemu-disk",
|
||||
},
|
||||
{
|
||||
name: "partitioned-disk",
|
||||
args: args{"partitioned-disk"},
|
||||
want: "disk.img",
|
||||
want1: "application/octet-stream",
|
||||
},
|
||||
{
|
||||
name: "qcow2",
|
||||
args: args{"qcow2"},
|
||||
want: "disk.qcow2",
|
||||
want1: "application/x-qemu-disk",
|
||||
},
|
||||
{
|
||||
name: "tar",
|
||||
args: args{"tar"},
|
||||
want: "root.tar.xz",
|
||||
want1: "application/x-tar",
|
||||
},
|
||||
{
|
||||
name: "vhd",
|
||||
args: args{"vhd"},
|
||||
|
|
@ -157,11 +139,8 @@ func TestImageType_Name(t *testing.T) {
|
|||
arch: "x86_64",
|
||||
imgNames: []string{
|
||||
"ami",
|
||||
"ext4-filesystem",
|
||||
"partitioned-disk",
|
||||
"qcow2",
|
||||
"openstack",
|
||||
"tar",
|
||||
"vhd",
|
||||
"vmdk",
|
||||
},
|
||||
|
|
@ -170,11 +149,8 @@ func TestImageType_Name(t *testing.T) {
|
|||
arch: "aarch64",
|
||||
imgNames: []string{
|
||||
"ami",
|
||||
"ext4-filesystem",
|
||||
"partitioned-disk",
|
||||
"qcow2",
|
||||
"openstack",
|
||||
"tar",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -265,21 +241,6 @@ func TestImageType_BasePackages(t *testing.T) {
|
|||
},
|
||||
bootable: true,
|
||||
},
|
||||
{
|
||||
name: "ext4-filesystem",
|
||||
basePackages: []string{
|
||||
"policycoreutils",
|
||||
"selinux-policy-targeted",
|
||||
"kernel",
|
||||
"firewalld",
|
||||
"chrony",
|
||||
"langpacks-en",
|
||||
},
|
||||
excludedPackages: []string{
|
||||
"dracut-config-rescue",
|
||||
},
|
||||
bootable: true,
|
||||
},
|
||||
{
|
||||
name: "openstack",
|
||||
basePackages: []string{
|
||||
|
|
|
|||
|
|
@ -282,56 +282,6 @@ func New() *RHEL8 {
|
|||
},
|
||||
}
|
||||
|
||||
r.imageTypes["ext4-filesystem"] = imageType{
|
||||
name: "filesystem.img",
|
||||
mimeType: "application/octet-stream",
|
||||
packages: []string{
|
||||
"policycoreutils",
|
||||
"selinux-policy-targeted",
|
||||
"kernel",
|
||||
"firewalld",
|
||||
"chrony",
|
||||
"langpacks-en",
|
||||
},
|
||||
excludedPackages: []string{
|
||||
"dracut-config-rescue",
|
||||
|
||||
// TODO setfiles failes because of usr/sbin/timedatex. Exlude until
|
||||
// https://errata.devel.redhat.com/advisory/47339 lands
|
||||
"timedatex",
|
||||
},
|
||||
bootable: false,
|
||||
kernelOptions: "ro net.ifnames=0",
|
||||
defaultSize: 2 * GigaByte,
|
||||
assembler: func(uefi bool, size uint64) *osbuild.Assembler { return r.rawFSAssembler("filesystem.img", size) },
|
||||
}
|
||||
|
||||
r.imageTypes["partitioned-disk"] = imageType{
|
||||
name: "disk.img",
|
||||
mimeType: "application/octet-stream",
|
||||
packages: []string{
|
||||
"@core",
|
||||
"chrony",
|
||||
"firewalld",
|
||||
"kernel",
|
||||
"langpacks-en",
|
||||
"selinux-policy-targeted",
|
||||
},
|
||||
excludedPackages: []string{
|
||||
"dracut-config-rescue",
|
||||
|
||||
// TODO setfiles failes because of usr/sbin/timedatex. Exlude until
|
||||
// https://errata.devel.redhat.com/advisory/47339 lands
|
||||
"timedatex",
|
||||
},
|
||||
bootable: true,
|
||||
kernelOptions: "ro net.ifnames=0",
|
||||
defaultSize: 2 * GigaByte,
|
||||
assembler: func(uefi bool, size uint64) *osbuild.Assembler {
|
||||
return r.qemuAssembler("raw", "disk.img", uefi, size)
|
||||
},
|
||||
}
|
||||
|
||||
r.imageTypes["qcow2"] = imageType{
|
||||
name: "disk.qcow2",
|
||||
mimeType: "application/x-qemu-disk",
|
||||
|
|
@ -441,29 +391,6 @@ func New() *RHEL8 {
|
|||
},
|
||||
}
|
||||
|
||||
r.imageTypes["tar"] = imageType{
|
||||
name: "root.tar.xz",
|
||||
mimeType: "application/x-tar",
|
||||
packages: []string{
|
||||
"policycoreutils",
|
||||
"selinux-policy-targeted",
|
||||
"kernel",
|
||||
"firewalld",
|
||||
"chrony",
|
||||
"langpacks-en",
|
||||
},
|
||||
excludedPackages: []string{
|
||||
"dracut-config-rescue",
|
||||
|
||||
// TODO setfiles failes because of usr/sbin/timedatex. Exlude until
|
||||
// https://errata.devel.redhat.com/advisory/47339 lands
|
||||
"timedatex",
|
||||
},
|
||||
bootable: false,
|
||||
kernelOptions: "ro net.ifnames=0",
|
||||
assembler: func(uefi bool, size uint64) *osbuild.Assembler { return r.tarAssembler("root.tar.xz", "xz") },
|
||||
}
|
||||
|
||||
r.imageTypes["vhd"] = imageType{
|
||||
name: "disk.vhd",
|
||||
mimeType: "application/x-vhd",
|
||||
|
|
@ -850,22 +777,3 @@ func (r *RHEL8) qemuAssembler(format string, filename string, uefi bool, size ui
|
|||
}
|
||||
return osbuild.NewQEMUAssembler(&options)
|
||||
}
|
||||
|
||||
func (r *RHEL8) tarAssembler(filename, compression string) *osbuild.Assembler {
|
||||
return osbuild.NewTarAssembler(
|
||||
&osbuild.TarAssemblerOptions{
|
||||
Filename: filename,
|
||||
Compression: compression,
|
||||
})
|
||||
}
|
||||
|
||||
func (r *RHEL8) rawFSAssembler(filename string, size uint64) *osbuild.Assembler {
|
||||
id := uuid.MustParse("0bd700f8-090f-4556-b797-b340297ea1bd")
|
||||
return osbuild.NewRawFSAssembler(
|
||||
&osbuild.RawFSAssemblerOptions{
|
||||
Filename: filename,
|
||||
RootFilesystemUUID: id,
|
||||
Size: size,
|
||||
FilesystemType: "xfs",
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,36 +25,18 @@ func TestFilenameFromType(t *testing.T) {
|
|||
want: "image.vhdx",
|
||||
want1: "application/octet-stream",
|
||||
},
|
||||
{
|
||||
name: "ext4",
|
||||
args: args{"ext4-filesystem"},
|
||||
want: "filesystem.img",
|
||||
want1: "application/octet-stream",
|
||||
},
|
||||
{
|
||||
name: "openstack",
|
||||
args: args{"openstack"},
|
||||
want: "disk.qcow2",
|
||||
want1: "application/x-qemu-disk",
|
||||
},
|
||||
{
|
||||
name: "partitioned-disk",
|
||||
args: args{"partitioned-disk"},
|
||||
want: "disk.img",
|
||||
want1: "application/octet-stream",
|
||||
},
|
||||
{
|
||||
name: "qcow2",
|
||||
args: args{"qcow2"},
|
||||
want: "disk.qcow2",
|
||||
want1: "application/x-qemu-disk",
|
||||
},
|
||||
{
|
||||
name: "tar",
|
||||
args: args{"tar"},
|
||||
want: "root.tar.xz",
|
||||
want1: "application/x-tar",
|
||||
},
|
||||
{
|
||||
name: "vhd",
|
||||
args: args{"vhd"},
|
||||
|
|
@ -148,11 +130,8 @@ func TestImageType_Name(t *testing.T) {
|
|||
arch: "x86_64",
|
||||
imgNames: []string{
|
||||
"ami",
|
||||
"ext4-filesystem",
|
||||
"partitioned-disk",
|
||||
"qcow2",
|
||||
"openstack",
|
||||
"tar",
|
||||
"vhd",
|
||||
"vmdk",
|
||||
},
|
||||
|
|
@ -161,11 +140,8 @@ func TestImageType_Name(t *testing.T) {
|
|||
arch: "aarch64",
|
||||
imgNames: []string{
|
||||
"ami",
|
||||
"ext4-filesystem",
|
||||
"partitioned-disk",
|
||||
"qcow2",
|
||||
"openstack",
|
||||
"tar",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -302,25 +278,6 @@ func TestImageType_BasePackages(t *testing.T) {
|
|||
},
|
||||
bootable: true,
|
||||
},
|
||||
{
|
||||
name: "ext4-filesystem",
|
||||
basePackages: []string{
|
||||
"policycoreutils",
|
||||
"selinux-policy-targeted",
|
||||
"kernel",
|
||||
"firewalld",
|
||||
"chrony",
|
||||
"langpacks-en",
|
||||
},
|
||||
excludedPackages: []string{
|
||||
"dracut-config-rescue",
|
||||
|
||||
// TODO setfiles failes because of usr/sbin/timedatex. Exlude until
|
||||
// https://errata.devel.redhat.com/advisory/47339 lands
|
||||
"timedatex",
|
||||
},
|
||||
bootable: true,
|
||||
},
|
||||
{
|
||||
name: "openstack",
|
||||
basePackages: []string{
|
||||
|
|
|
|||
|
|
@ -26,11 +26,8 @@ image_test_case_path: /usr/share/tests/osbuild-composer/cases
|
|||
|
||||
# List of image tests
|
||||
osbuild_composer_image_test_cases:
|
||||
- ext4_filesystem-boot.json
|
||||
- openstack-boot.json
|
||||
- partitioned_disk-boot.json
|
||||
- qcow2-boot.json
|
||||
- tar-boot.json
|
||||
- vhd-boot.json
|
||||
- vmdk-boot.json
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
|
@ -1 +0,0 @@
|
|||
rhel_8-x86_64-ext4_filesystem-boot.json
|
||||
|
|
@ -1 +0,0 @@
|
|||
rhel_8-x86_64-partitioned_disk-boot.json
|
||||
|
|
@ -1 +0,0 @@
|
|||
rhel_8-x86_64-tar-boot.json
|
||||
Loading…
Add table
Add a link
Reference in a new issue