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

dracut: Update to v103 and add patches #199

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

ReillyBrogan
Copy link
Contributor

Switch to the dracut-ng fork which is maintained. Add several patches of note:

  • Invalidate depmod index module. Used for initrd extension
  • Skip firmware installation in initrd. Used for linux-firmware initrd extension
  • Skip hwcaps directories when processing libs. Ensures that built initrds are usable on machines with a lower ISA than supported by hwcaps
  • Stateless ldconfig configuration
  • De-compress kbd files prior to initrd creation. Improves initrd compression ratio

Switch to the dracut-ng fork which is maintained. Add several patches of note:
- Invalidate depmod index module. Used for initrd extension
- Skip firmware installation in initrd. Used for linux-firmware initrd extension
- Skip hwcaps directories when processing libs. Ensures that built initrds are usable on machines with a lower ISA than supported by hwcaps
- Stateless ldconfig configuration
- De-compress kbd files prior to initrd creation. Improves initrd compression ratio

Signed-off-by: Reilly Brogan <[email protected]>
@ReillyBrogan ReillyBrogan requested a review from a team as a code owner July 20, 2024 21:01
@@ -24,6 +24,12 @@ rundeps :
- binary(cpio)
- terminus-font
setup : |
%patch %(pkgdir)/patches/downstream/0001-Add-module-to-invalidate-depmod-index.patch
Copy link
Member

Choose a reason for hiding this comment

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

This seems Solus specific not sure where/how it integrates into Serpent atm. Any upstream tracking bug for this in dracut-ng?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This provides the functionality that we talked about where depmod is ran in the initrd when an initrd extension is present with kernel modules. Without this the addon kernel modules will not be available which defeats the purpose of having initrd modules in the first place.

%patch %(pkgdir)/patches/downstream/0001-Support-stateless-glibc-ldconfig-configuration.patch
%patch %(pkgdir)/patches/downstream/0003-Exclude-unwanted-paths-from-initrd-creation.patch
%patch %(pkgdir)/patches/downstream/0004-Downstream-De-compress-kbd-files.patch
%patch %(pkgdir)/patches/downstream/0001-Allow-for-skipping-firmware-installation.patch
Copy link
Member

Choose a reason for hiding this comment

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

Also seems Solus specific, would be nice to get an upstream bug in dracut-ng to track progress

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not really a point tbh I'm not sure of any distro that is taking this approach with the initrd.

return 0;
}

+const char *strip_avx_path(const char *fullpath, const char *avxpath)
Copy link
Member

Choose a reason for hiding this comment

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

I'm quite nervous about this patch in particular. Note strncat is preferred and errors checked.

Also note strstr returns a pointer within existing memory whether allocated or not. This one is returning existing memory or newly allocated memory which seems like its going to explode or cause leaks.

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