Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RHEL9: Add packages for dracut modules explicitly (don't rely on weak dependencies) #267

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

achilleas-k
Copy link
Member

@achilleas-k achilleas-k commented Nov 21, 2023

For installers (both Anaconda and CoreOS) on RHEL 9, we define a couple of dracut modules that rely on packages that are pulled in as weak dependencies of other packages in the installer package set. Let's define these explicitly instead.
For other packages that are required by other modules, let's still rely on package "hard" dependencies that are already defined.

In the future, we should derive the required packages dynamically from the dracut modules defined in the pipeline.

I've verified this works by applying the following patch and building installers:

diff --git a/pkg/manifest/anaconda_installer.go b/pkg/manifest/anaconda_installer.go
index 0d5c10037..2719d76b6 100644
--- a/pkg/manifest/anaconda_installer.go
+++ b/pkg/manifest/anaconda_installer.go
@@ -149,7 +149,7 @@ func (p *AnacondaInstaller) getPackageSetChain(Distro) []rpmmd.PackageSet {
 			Include:         append(packages, p.ExtraPackages...),
 			Exclude:         p.ExcludePackages,
 			Repositories:    append(p.repos, p.ExtraRepos...),
-			InstallWeakDeps: true,
+			InstallWeakDeps: false,
 		},
 	}
 }
diff --git a/pkg/manifest/coreos_installer.go b/pkg/manifest/coreos_installer.go
index 0f0f2b5d6..321083be3 100644
--- a/pkg/manifest/coreos_installer.go
+++ b/pkg/manifest/coreos_installer.go
@@ -128,7 +128,7 @@ func (p *CoreOSInstaller) getPackageSetChain(Distro) []rpmmd.PackageSet {
 			Include:         append(packages, p.ExtraPackages...),
 			Exclude:         p.ExcludePackages,
 			Repositories:    append(p.repos, p.ExtraRepos...),
-			InstallWeakDeps: true,
+			InstallWeakDeps: false,
 		},
 	}
 }

Applying the same patch on (current) main and building an installer should fail at the dracut stage.

This is not an issue on RHEL 8 and Fedora. The package sets for installers include packages with hard dependencies on the modules.

For installers (both Anaconda and CoreOS) on all distros, we define a
couple of dracut modules that rely on packages that are pulled in as
weak dependencies of other packages in the installer package set.  Let's
define these explicitly instead.
For other packages that are required by other modules, let's still rely
on package "hard" dependencies that are already defined.

In the future, we should derive the required packages dynamically from
the dracut modules defined in the pipeline.
Copy link
Member

@ondrejbudai ondrejbudai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@ondrejbudai ondrejbudai added this pull request to the merge queue Nov 21, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Nov 21, 2023
@achilleas-k achilleas-k added this pull request to the merge queue Nov 22, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 22, 2023
@achilleas-k achilleas-k added this pull request to the merge queue Nov 23, 2023
Merged via the queue into osbuild:main with commit 3949edc Nov 23, 2023
7 checks passed
@achilleas-k achilleas-k deleted the explicit-packages-for-dracut branch November 23, 2023 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants