Skip to content

Commit

Permalink
distro,manifest: replace ifcfg with net-lib for EL10 and F42 installers
Browse files Browse the repository at this point in the history
In RHEL 10 and Fedora 42, the ifcfg module was replaced by net-lib.
Anaconda changes:
- rhinstaller/anaconda#6125
- rhinstaller/anaconda#6155

Remove ifcfg from common anaconda dracut stage modules and add either
ifcfg or net-lib to each installer based on distro version.
  • Loading branch information
achilleas-k committed Feb 19, 2025
1 parent 391277d commit bc8f626
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 1 deletion.
19 changes: 19 additions & 0 deletions pkg/distro/fedora/distro.go
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,18 @@ var defaultDistroImageConfig = &distro.ImageConfig{
DefaultOSCAPDatastream: common.ToPtr(oscap.DefaultFedoraDatastream()),
}

func defaultDistroInstallerConfig(d *distribution) *distro.InstallerConfig {
config := distro.InstallerConfig{}
// In Fedora 42 the ifcfg module was replaced by net-lib.
if common.VersionLessThan(d.osVersion, "42") {
config.AdditionalDracutModules = append(config.AdditionalDracutModules, "ifcfg")
} else {
config.AdditionalDracutModules = append(config.AdditionalDracutModules, "net-lib")
}

return &config
}

func getISOLabelFunc(variant string) isoLabelFunc {
const ISO_LABEL = "%s-%s-%s-%s"

Expand Down Expand Up @@ -746,6 +758,12 @@ func newDistro(version int) distro.Distro {
containerImgType,
wslImgType,
)

// add distro installer configuration to all installer types
distroInstallerConfig := defaultDistroInstallerConfig(&rd)
liveInstallerImgType.defaultInstallerConfig = distroInstallerConfig
imageInstallerImgType.defaultInstallerConfig = distroInstallerConfig
iotInstallerImgType.defaultInstallerConfig = distroInstallerConfig
x86_64.addImageTypes(
&platform.X86{
BasePlatform: platform.BasePlatform{
Expand Down Expand Up @@ -907,6 +925,7 @@ func newDistro(version int) distro.Distro {
minimalrawImgType,
)

iotSimplifiedInstallerImgType.defaultInstallerConfig = distroInstallerConfig
x86_64.addImageTypes(
&platform.X86{
BasePlatform: platform.BasePlatform{
Expand Down
1 change: 1 addition & 0 deletions pkg/distro/rhel/rhel10/bare_metal.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ func mkImageInstallerImgType() *rhel.ImageType {
"nvdimm", // non-volatile DIMM firmware (provides nfit, cuse, and nd_e820)
"prefixdevname",
"prefixdevname-tools",
"net-lib",
},
AdditionalDrivers: []string{
"ipmi_devintf",
Expand Down
1 change: 1 addition & 0 deletions pkg/distro/rhel/rhel8/bare_metal.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func mkImageInstaller() *rhel.ImageType {
AdditionalDracutModules: []string{
"prefixdevname",
"prefixdevname-tools",
"ifcfg",
},
}

Expand Down
1 change: 1 addition & 0 deletions pkg/distro/rhel/rhel8/edge.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ func mkEdgeInstallerImgType(rd *rhel.Distribution) *rhel.ImageType {
AdditionalDracutModules: []string{
"prefixdevname",
"prefixdevname-tools",
"ifcfg",
},
}
it.RPMOSTree = true
Expand Down
1 change: 1 addition & 0 deletions pkg/distro/rhel/rhel9/bare_metal.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func mkImageInstallerImgType() *rhel.ImageType {
"nvdimm", // non-volatile DIMM firmware (provides nfit, cuse, and nd_e820)
"prefixdevname",
"prefixdevname-tools",
"ifcfg",
},
AdditionalDrivers: []string{
"cuse",
Expand Down
1 change: 1 addition & 0 deletions pkg/distro/rhel/rhel9/edge.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ func mkEdgeInstallerImgType() *rhel.ImageType {
"nvdimm", // non-volatile DIMM firmware (provides nfit, cuse, and nd_e820)
"prefixdevname",
"prefixdevname-tools",
"ifcfg",
},
AdditionalDrivers: []string{
"cuse",
Expand Down
1 change: 0 additions & 1 deletion pkg/manifest/anaconda_installer.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,6 @@ func dracutStageOptions(kernelVer string, biosdevname bool, additionalModules []
"convertfs",
"network-manager",
"network",
"ifcfg",
"url-lib",
"drm",
"plymouth",
Expand Down

0 comments on commit bc8f626

Please sign in to comment.