Skip to content

src/bootchooser: add support for efibootguard #1450

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

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

obbardc
Copy link
Contributor

@obbardc obbardc commented Jun 18, 2024

Add bootchooser support for efibootguard.

Draft for now, for some early feedback.

Fixes #1443

Add bootchooser support for efibootguard.

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
// TODO add efibootguard bootchooser tests

// Getting slots:
// TODO call "bg_printenv --raw --part=1" & return k=>v array
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these lines.

@@ -1456,6 +1458,326 @@ static gboolean efi_get_state(RaucSlot* slot, gboolean *good, GError **error)
return TRUE;
}

// TODO add efibootguard bootchooser tests
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add some tests.

Comment on lines +1471 to +1472
// #define BG_PRINTENV_NAME "bg_printenv"
// #define BG_SETENV_NAME "bg_setenv"

Check notice

Code scanning / CodeQL

Commented-out code Note

This comment appears to contain commented-out code.
Copy link

codecov bot commented Jun 18, 2024

Codecov Report

Attention: Patch coverage is 2.72109% with 143 lines in your changes missing coverage. Please review.

Project coverage is 80.98%. Comparing base (d53fe2a) to head (0ee8b85).
Report is 599 commits behind head on master.

Files with missing lines Patch % Lines
src/bootchooser.c 2.72% 143 Missing ⚠️

❌ Your patch check has failed because the patch coverage (2.72%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1450      +/-   ##
==========================================
- Coverage   81.95%   80.98%   -0.98%     
==========================================
  Files          67       67              
  Lines       20093    20408     +315     
==========================================
+ Hits        16467    16527      +60     
- Misses       3626     3881     +255     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

g_ptr_array_add(sub_args, g_strdup(slot));
g_ptr_array_add(sub_args, NULL);

sub = r_subprocess_newv(sub_args, G_SUBPROCESS_FLAGS_STDOUT_PIPE | G_SUBPROCESS_FLAGS_STDERR_MERGE, &ierror);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense to rework this function to get of the data all at once perhaps returning a struct

@jluebbe jluebbe added the enhancement Adds new functionality or enhanced handling to RAUC label Jul 18, 2024
@jluebbe
Copy link
Member

jluebbe commented Apr 2, 2025

This would need to be rebased, as #1636 has split the bootloader backends into different files.

@jluebbe jluebbe added this to the Unplanned milestone Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Adds new functionality or enhanced handling to RAUC help wanted
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bootchooser: efibootguard support
2 participants