Skip to content

Adapt for use in eos7#423

Merged
dsd merged 3 commits intomasterfrom
unknown repository
Sep 5, 2025
Merged

Adapt for use in eos7#423
dsd merged 3 commits intomasterfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented Sep 1, 2025

This PR adapts eos-boot-helper to work with EOS7, based on GNOME OS. See commits for details, but the breaking changes are:

  • Deal with explicit unsigned char parameter in efivar (rhboot/efivar@ba165d1)
  • Enable systemd-resolved service
  • Remove some initramfs modules that don't exist in EOS7
  • Drop systemd preset states for services that don't exist in EOS7

When merged, this will effectively drop support for EOS6 in the 'master' branch.

The pointer in the line changed needs to be an unsigned char, or the
build fails due to -Werror.
@ghost ghost changed the title WIP: Changes for eos7 Adapt for use in eos7 Sep 3, 2025
@ghost ghost marked this pull request as ready for review September 3, 2025 14:38
@ghost
Copy link
Author

ghost commented Sep 3, 2025

CI is failing because it runs the OBS build with an old version of 'efivar', where the first parameter of efidp_format_device_path is a char * not an unsigned char *. This whole CI path doesn't make sense for EOS7 since OBS is no longer involved.

@ghost
Copy link
Author

ghost commented Sep 3, 2025

You will probably want to either update eos6 to build from a new 'eos6' branch; or merge this to a new 'eos7' branch instead of 'master'.


size_t path_len = len + 1;
cleanup_free char *path = calloc (path_len, sizeof (char));
cleanup_free unsigned char *path = calloc (path_len, sizeof (char));
Copy link
Contributor

Choose a reason for hiding this comment

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

As the PR description said: "Deal with explicit unsigned char parameter in efivar (rhboot/efivar@ba165d1)", this is a critical point. Current EOS master branch environment cannot build it, and shows following error:

gcc -DPACKAGE_NAME=\"eos-boot-helper\" -DPACKAGE_TARNAME=\"eos-boot-helper\" -DPACKAGE_VERSION=\"0.0\" -DPACKAGE_STRING=\"eos-boot-helper\ 0.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"eos-boot-helper\" -DVERSION=\"0.0\" -I.    -Wall -Werror -I/usr/include/efivar  -g -O2 -MT eos_update_efi_uuid-eos-update-efi-uuid.o -MD -MP -MF .deps/eos_update_efi_uuid-eos-update-efi-uuid.Tpo -c -o eos_update_efi_uuid-eos-update-efi-uuid.o `test -f 'eos-update-efi-uuid.c' || echo './'`eos-update-efi-uuid.c
eos-update-efi-uuid.c: In function ‘dump_load_option’:
eos-update-efi-uuid.c:221:35: error: pointer targets in passing argument 1 of ‘efidp_format_device_path’ differ in signedness [-Werror=pointer-sign]
  221 |   len = efidp_format_device_path (path, path_len, dp, dp_len);
      |                                   ^~~~
      |                                   |
      |                                   unsigned char *
In file included from /usr/include/efivar/efivar.h:238,
                 from eos-update-efi-uuid.c:6:
/usr/include/efivar/efivar-dp.h:1245:47: note: expected ‘char *’ but argument is of type ‘unsigned char *’
 1245 | extern ssize_t efidp_format_device_path(char *buf, size_t size, const_efidp dp,
      |                                         ~~~~~~^~~
cc1: all warnings being treated as errors

However, we are developing EOS 7 based on GNOME 48.x now, and need it.

@wjt
Copy link
Member

wjt commented Sep 4, 2025

We use BusyBox in the initramfs not for size reasons but for licence reasons on PAYG systems.

#314

@ghost
Copy link
Author

ghost commented Sep 4, 2025

We use BusyBox in the initramfs not for size reasons but for licence reasons on PAYG systems.

#314

Right. I forgot about that. It won't be a problem to add busybox back in for Milestone 2.

@dsd
Copy link
Member

dsd commented Sep 4, 2025

I'm a bit concerned that we'll set ourselves up for some traps if we swap out the shell and busybox, as we may encounter behavioural differences with these replacements, or may then encounter behavioural differences if we tweak other stuff and move back later.

But trying to be practical and keep things moving - I suggest seeing if dash can be added quickly at this stage, and doing that if so. I know busybox is a bit more painful, and maybe we push that til later.

@ghost ghost mentioned this pull request Sep 4, 2025
@ghost
Copy link
Author

ghost commented Sep 4, 2025

I'm a bit concerned that we'll set ourselves up for some traps if we swap out the shell and busybox, as we may encounter behavioural differences with these replacements, or may then encounter behavioural differences if we tweak other stuff and move back later.

But trying to be practical and keep things moving - I suggest seeing if dash can be added quickly at this stage, and doing that if so. I know busybox is a bit more painful, and maybe we push that til later.

I'll have a go today. It may not be that hard.

Sam Thursfield added 2 commits September 5, 2025 15:14
Bring EOS7 in line with GNOME OS and enable systemd-resolved.

We still don't use systemd-networkd, and it might require a migration
of existing WiFi configurations if we did. GNOME OS also still uses
NetworkManager for networking.
Remove anything that is not likely to be added to EOS7,
and workarounds for Debian-specific issues.
Copy link
Member

@dsd dsd left a comment

Choose a reason for hiding this comment

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

Looks good, anything blocking us from merging this?

@ghost
Copy link
Author

ghost commented Sep 5, 2025

Looks good, anything blocking us from merging this?

Its ready to go from my side. I can do a separate PR to remove the initramfs config once it lands in eos-build-meta.

@dsd dsd merged commit 5f8019d into endlessm:master Sep 5, 2025
1 check passed
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.

3 participants