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

plymouth: fix breeze-plymouth (and other themes) #30665

Merged
merged 2 commits into from Nov 6, 2017

Conversation

michaelpj
Copy link
Contributor

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 set ImageDir or ScriptFile 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 uses breeze-text.so, which has some rpath references that would need to be patched. As it is, they get nuked by nukeReferences 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
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@michaelpj michaelpj mentioned this pull request Oct 25, 2017
8 tasks
@orivej orivej merged commit 4435bb8 into NixOS:master Nov 6, 2017
@orivej
Copy link
Contributor

orivej commented Nov 6, 2017

Thank you!

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.

None yet

2 participants