fix(dracut-functions.sh): do not attempt to install zero-size library files - #2442
Open
aafeijoo-suse wants to merge 2 commits into
Open
fix(dracut-functions.sh): do not attempt to install zero-size library files#2442aafeijoo-suse wants to merge 2 commits into
aafeijoo-suse wants to merge 2 commits into
Conversation
aafeijoo-suse
force-pushed
the
fix-2441
branch
2 times, most recently
from
May 15, 2026 14:30
157844d to
4886f21
Compare
bdrung
reviewed
Jul 22, 2026
bdrung
left a comment
Member
There was a problem hiding this comment.
The change looks good to me. Can you extent the first commit with some more details/reasoning from the PR and linked bug?
… files dracut-install calls `mmap()` in `resolve_deps()`, and that function fails with EINVAL if the second argument `length` is zero (i.e., the file size). There should be no library file with zero bytes, but this actually happened due to some RPM stray files and a less restrictive pattern passed to `inst_libdir_file()`, so extend the condition to additionally check whether the library files contain data. Fixes dracut-ng#2441
These files have the suffix `;%08x`, i.e., semicolon followed by 8 hexadecimal characters.
devkontrol
reviewed
Jul 23, 2026
| for _dir in $libdirs; do | ||
| for _i in "$@"; do | ||
| for _f in "${dracutsysrootdir-}$_dir"/$_i; do | ||
| # Filter temporary RPM files |
Collaborator
There was a problem hiding this comment.
Is this an issue only with RPM ?
It is sad that dracut needs to have knowledge about the underlaying host package manager.
Is this file format/pattern for temp RPM files documented somewhere that we can reference here ?
Collaborator
|
Could this be handled in a config file for RPM based distros with I am not strongly against the idea, but I do wonder if dracut is the best place to deal with this problem. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It should fix #2441
Checklist