Skip to content

Commit

Permalink
distro: remove Fedora 38 conditions from image definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
achilleas-k committed Jun 4, 2024
1 parent 55ca7f8 commit 8f9d9e1
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 68 deletions.
98 changes: 47 additions & 51 deletions pkg/distro/fedora/distro.go
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,6 @@ func newDistro(version int) distro.Distro {
minimalrawImgType,
)

// iot simplified installer was introduced in F38
x86_64.addImageTypes(
&platform.X86{
BasePlatform: platform.BasePlatform{
Expand Down Expand Up @@ -921,62 +920,59 @@ func newDistro(version int) distro.Distro {
iotSimplifiedInstallerImgType,
)

if common.VersionGreaterThanOrEqual(rd.Releasever(), "39") {
// bootc was introduced in F39
x86_64.addImageTypes(
&platform.X86{
BasePlatform: platform.BasePlatform{
FirmwarePackages: []string{
"biosdevname",
"iwlwifi-dvm-firmware",
"iwlwifi-mvm-firmware",
"microcode_ctl",
},
x86_64.addImageTypes(
&platform.X86{
BasePlatform: platform.BasePlatform{
FirmwarePackages: []string{
"biosdevname",
"iwlwifi-dvm-firmware",
"iwlwifi-mvm-firmware",
"microcode_ctl",
},
BIOS: true,
UEFIVendor: "fedora",
},
iotBootableContainer,
)
aarch64.addImageTypes(
&platform.Aarch64{
BasePlatform: platform.BasePlatform{
FirmwarePackages: []string{
"arm-image-installer",
"bcm283x-firmware",
"brcmfmac-firmware",
"iwlwifi-mvm-firmware",
"realtek-firmware",
"uboot-images-armv8",
},
BIOS: true,
UEFIVendor: "fedora",
},
iotBootableContainer,
)
aarch64.addImageTypes(
&platform.Aarch64{
BasePlatform: platform.BasePlatform{
FirmwarePackages: []string{
"arm-image-installer",
"bcm283x-firmware",
"brcmfmac-firmware",
"iwlwifi-mvm-firmware",
"realtek-firmware",
"uboot-images-armv8",
},
UEFIVendor: "fedora",
},
iotBootableContainer,
)

ppc64le.addImageTypes(
&platform.PPC64LE{
BIOS: true,
BasePlatform: platform.BasePlatform{
ImageFormat: platform.FORMAT_QCOW2,
QCOW2Compat: "1.1",
},
UEFIVendor: "fedora",
},
iotBootableContainer,
)

ppc64le.addImageTypes(
&platform.PPC64LE{
BIOS: true,
BasePlatform: platform.BasePlatform{
ImageFormat: platform.FORMAT_QCOW2,
QCOW2Compat: "1.1",
},
iotBootableContainer,
)

s390x.addImageTypes(
&platform.S390X{
Zipl: true,
BasePlatform: platform.BasePlatform{
ImageFormat: platform.FORMAT_QCOW2,
QCOW2Compat: "1.1",
},
},
iotBootableContainer,
)

s390x.addImageTypes(
&platform.S390X{
Zipl: true,
BasePlatform: platform.BasePlatform{
ImageFormat: platform.FORMAT_QCOW2,
QCOW2Compat: "1.1",
},
iotBootableContainer,
)
}
},
iotBootableContainer,
)

ppc64le.addImageTypes(
&platform.PPC64LE{
Expand Down
19 changes: 2 additions & 17 deletions pkg/distro/fedora/package_sets.go
Original file line number Diff line number Diff line change
Expand Up @@ -474,14 +474,6 @@ func anacondaPackageSet(t *imageType) rpmmd.PackageSet {
},
})

if common.VersionLessThan(t.arch.distro.osVersion, "39") {
ps = ps.Append(rpmmd.PackageSet{
Include: []string{
"lklug-fonts", // orphaned, unavailable in F39
},
})
}

switch t.Arch().Name() {
case arch.ARCH_X86_64.String():
ps = ps.Append(rpmmd.PackageSet{
Expand Down Expand Up @@ -627,14 +619,6 @@ func containerPackageSet(t *imageType) rpmmd.PackageSet {
},
}

if common.VersionLessThan(t.arch.distro.osVersion, "39") {
ps = ps.Append(rpmmd.PackageSet{
Include: []string{
"fedora-repos-modular",
},
})
}

return ps
}

Expand Down Expand Up @@ -705,7 +689,8 @@ func iotSimplifiedInstallerPackageSet(t *imageType) rpmmd.PackageSet {
"shadow-utils", // includes passwd
},
})
} else if common.VersionLessThan(t.arch.distro.osVersion, "40") {
} else {
// F39 only
ps = ps.Append(rpmmd.PackageSet{
Include: []string{
"passwd",
Expand Down

0 comments on commit 8f9d9e1

Please sign in to comment.