Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

chore(deps): update uefi to 0.31.0 #388

Merged

Conversation

nicholasbishop
Copy link
Contributor

A few code changes were needed where the API has changed since 0.29.0:

  • uefi::helpers::init no longer takes an argument.
  • The PcrEventInputs::new_in_buffer API changed. In addition, there is now a PcrEventInputs::new_in_box constructor that allocates a correctly-sized buffer. Switch to that constructor.

@nicholasbishop nicholasbishop force-pushed the bishop-update-uefi-031 branch 2 times, most recently from 84aefb9 to 1e1e244 Compare September 2, 2024 23:27
@RaitoBezarius
Copy link
Member

Thank you so much <3.

@RaitoBezarius
Copy link
Member

Hmm, it seems CI is saying that it's panicking

vm-test-run-lanzaboote> machine: Guest shell says: b'/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/u'vm-test-run-lanzaboote> machine # [PANIC]: panicked at /nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-vendor-cargo-deps/c19b7c6f923b580ac259164a89f2577984ad5ab09ee9d583b888f934adbbe8d0/uefi-0.31.0/src/helpers/logger.rs:33:30:vm-test-run-lanzaboote> machine # called Result::unwrap() on an Err value: SetLoggerError(())

This function is called at the start of main already; it should not be
called again in thin/fat `boot_linux`.
A few code changes were needed where the API has changed since 0.29.0:
* `uefi::helpers::init` no longer takes an argument.
* The `PcrEventInputs::new_in_buffer` API changed. In addition, there is
  now a `PcrEventInputs::new_in_box` constructor that allocates a
  correctly-sized buffer. Switch to that constructor.
@nicholasbishop
Copy link
Contributor Author

The issue was multiple calls to uefi::helpers::init. (I've opened a PR to better document that the function should only be called once.) It confuses me that this didn't panic with uefi-0.29.0, I'm not sure what changed. At any rate, I dropped the extra calls to init and seems to be passing now.

@nicholasbishop
Copy link
Contributor Author

Hm, now I see the nix-eval job is failing, and clicking through I see errors like this:

       > error: hash mismatch importing path '/nix/store/c1dc6z0rc303q6izkq1a6zx4wdgsyr50-lanzaboote-stub-0.4.1';
       >          specified: sha256:0z8kpds11sv8lpyklj8ifi1bjfghr911d2gii6nbdgj32nxnjgw7
       >          got:       sha256:1j7wqplmzdqwgh42wpcx27qlnj38iclydq4cx001x1f8hpkmn0lw

I do not understand what that means, or if it's related at all to my changes.

@RaitoBezarius
Copy link
Member

Hm, now I see the nix-eval job is failing, and clicking through I see errors like this:

       > error: hash mismatch importing path '/nix/store/c1dc6z0rc303q6izkq1a6zx4wdgsyr50-lanzaboote-stub-0.4.1';
       >          specified: sha256:0z8kpds11sv8lpyklj8ifi1bjfghr911d2gii6nbdgj32nxnjgw7
       >          got:       sha256:1j7wqplmzdqwgh42wpcx27qlnj38iclydq4cx001x1f8hpkmn0lw

I do not understand what that means, or if it's related at all to my changes.

Thank you for the fix, I will take a look.

@RaitoBezarius
Copy link
Member

CI passes.

@RaitoBezarius RaitoBezarius merged commit e2365a1 into nix-community:master Oct 1, 2024
42 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants