plymouth: fix breeze-plymouth (and other themes) #30665
Merged
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.
Motivation for this change
Plymouth puts commands into the initrd, which has strict restrictions on output references. So we need to be careful to get rid of those. One common case (which appears in
breeze-plymouth
) is to setImageDir
orScriptFile
to be the store path of the package (it needs to be absolute). This leads to a reference on that store path, which is banned.The most robust solution to this that I could come up with was to just look through all the files in the included themes and replace anything that looked like a reference to plymouth or the theme's
share/plymouth/themes
directory to the one in$out
. This works pretty well for the things I've tried.With this patch the
breeze
theme works.breeze-text
still doesn't work - it usesbreeze-text.so
, which has some rpath references that would need to be patched. As it is, they get nuked bynukeReferences
and so just fail to work. I'm not really sure of a good way to do this patching robustly. In general it seems tough to get plymouth things with arbitrary dependencies working nicely in the initrd with reference restrictions.Given that the theme now works, I set it as the default if you're using
plasma5
, similarly to how it sets a theme for sddm.Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)