-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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
lanzaboote-stub: init at 0.3.0 #231951
lanzaboote-stub: init at 0.3.0 #231951
Conversation
111edf3
to
c9fb579
Compare
c9fb579
to
e1c2349
Compare
e1c2349
to
c521016
Compare
This comment was marked as duplicate.
This comment was marked as duplicate.
#235230 is done; reviewing this PR is next on my list. |
5586367
to
e2723f0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got CI to pass.
My opinion remains unchanged: UEFI is a boondoggle.
But if the boon must be doggled, at least it will be done using Nix and Rust. 🤷♂️
homepage = "https://github.com/nix-community/lanzaboote"; | ||
license = licenses.gpl3Only; | ||
mainProgram = "lanzaboote_stub.efi"; | ||
platforms = [ "x86_64-uefi" "i686-uefi" "aarch64-uefi" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
platforms = [ "x86_64-uefi" "i686-uefi" "aarch64-uefi" ]; | |
hydraPlatforms = [ lib.systems.inspect.platformPatterns.isUefi ]; |
platforms = [ "x86_64-uefi" "i686-uefi" "aarch64-uefi" ]; | ||
# i686: Builtins errors | ||
# aarch64: compile fine but... | ||
broken = stdenv.isi686 || stdenv.isAarch64; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
broken = stdenv.isi686 || stdenv.isAarch64; | |
broken = with stdenv.hostPlatform; isi686 || isAarch64; |
linker = "lld"; | ||
}; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -112,6 +115,7 @@ in { | |||
redox = filterDoubles predicates.isRedox; | |||
windows = filterDoubles predicates.isWindows; | |||
genode = filterDoubles predicates.isGenode; | |||
uefi = filterDoubles predicates.isEfiEnvironment; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uefi = filterDoubles predicates.isEfiEnvironment; | |
uefi = filterDoubles predicates.isUefi; |
@@ -91,6 +91,10 @@ rec { | |||
isMusl = with abis; map (a: { abi = a; }) [ musl musleabi musleabihf muslabin32 muslabi64 ]; | |||
isUClibc = with abis; map (a: { abi = a; }) [ uclibc uclibceabi uclibceabihf ]; | |||
|
|||
isEfiEnvironment = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isEfiEnvironment = [ | |
isUefi = [ |
mainProgram = "lanzaboote_stub.efi"; | ||
platforms = [ "x86_64-uefi" "i686-uefi" "aarch64-uefi" ]; | ||
# i686: Builtins errors | ||
# aarch64: compile fine but... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# aarch64: compile fine but... | |
# aarch64: compile fine but unable to test on real hardware |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't it be # aarch64: compiles fine but unable to test on real hardware
?
If you rebase this to a more recent staging (or switch branch to |
I just need to do it when I don't feel like I will fuck up :D. |
Is there any progress on this? :) |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/installation-medium-has-invalid-secure-boot-signature/58952/6 |
This pull requests is stalled. |
Can I ask you the courtesy to ping the author of PR whom you close PRs? (Or put the documentation of that new nixpkgs process in your closing messages?) Thank you. |
Well, do you want to work on this? You said me in several occasions that you don't want to contribute to nixpkgs anymore and working on your NixOS fork. I do not think we should add too many processes to nixpkgs because it will make it too hard to understand how to make changes, so please just re-open the pull request again if you want to work on this. Otherwise just delete the branch. |
Again, all of this has nothing to do with my request. Simply ask before doing what when it comes to other people's work is what I would like you to do. Thank you. |
Well, usually I ask them to re-open their pull request if they want to continue to work on the pull request. But I was 95% sure you would want not do that, so I kept it at that. |
If you want to make up your own rules, please consider discussing it with others before applying them out of the blue, especially when it comes to the work of others. "Closing then asking to re-open" is not courtesy, it's just you doing whatever you think is acceptable to do at any time, and you are continuing to shove your view. |
Description of changes
This brings https://github.com/nix-community/lanzaboote UEFI stub in-tree.
Dependents:
Dependencies:
Related:
Current design
Stub and tool are packaged in the global hierarchy as:
lanzaboote-tool
andlanzaboote-uefi-stub
, no assumption on the system are encoded inside their package respectively.It is expected to build the UEFI stub using a UEFI system with a UEFI compiler.
The linker is a flavored linker which will propagate adequately the
lld
Windows-style driver for arguments.lanzaboote-tool
is supposed to be wrapped to know about itslanzaboote-stub
, unfortunately, this is impossible to achieve inside of nixpkgs, multiple attempts were proposed to the reviewers in the next section and were all rejected. Therefore, the only solution is to give up on having a wrappedlanzaboote-tool
and propose a semi-wrappedlanzaboote-tool
and expect the user to understand they have to export theLANZABOOTE_STUB
environment variable to know about the stub itself.This is what we do in the systemd-boot NixOS module ourselves and we expect to work in many cases, either case, author would like to move this PR forward ideally and not concern themselves further with the semi wrapping issue stemming from the impossibility to build a package as a data via cross-compilation inside of nixpkgs, alas.
What has been tried?
pkgs/
hierarchy: NACK because it reimports nixpkgs inside nixpkgs.uefiPkgs
for cross compilation inside nixpkgs without a direct reimport: NACK because it's too complicated and does not compose well.Some funny questions
It seems like this PR tries to move to make UEFI a proper target in nixpkgs, but there's already plenty of "data as UEFI binaries" inside of nixpkgs without any cross compilation involved per se:
Ideally, we should treat the same way as in this PR, I suppose this will be very hard given their build system.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)