From 151d38f80dca075cb849bf698d1410c9a85b73c7 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Thu, 22 May 2025 13:47:09 +0200 Subject: [PATCH] fwupd: 2.0.9 -> 2.0.12 Diff: https://github.com/fwupd/fwupd/compare/refs/tags/2.0.9...refs/tags/2.0.12 Changelog: https://github.com/fwupd/fwupd/releases/tag/2.0.12 Co-authored-by: r-vdp --- pkgs/by-name/fw/fwupd/package.nix | 8 +- .../uefi-capsule-no-splash-fix-test.diff | 82 ------------------- 2 files changed, 6 insertions(+), 84 deletions(-) delete mode 100644 pkgs/by-name/fw/fwupd/uefi-capsule-no-splash-fix-test.diff diff --git a/pkgs/by-name/fw/fwupd/package.nix b/pkgs/by-name/fw/fwupd/package.nix index b9a5657f83b7..4707f56cca7b 100644 --- a/pkgs/by-name/fw/fwupd/package.nix +++ b/pkgs/by-name/fw/fwupd/package.nix @@ -76,6 +76,8 @@ efibootmgr, tpm2-tools, + fetchpatch2, + # passthru nixosTests, nix-update-script, @@ -173,8 +175,10 @@ stdenv.mkDerivation (finalAttrs: { # EFI capsule is located in fwupd-efi now. ./efi-app-path.patch - # See https://github.com/fwupd/fwupd/pull/8959 - ./uefi-capsule-no-splash-fix-test.diff + (fetchpatch2 { + url = "https://github.com/fwupd/fwupd/pull/8959.diff?full_index=1"; + hash = "sha256-w4uf1CXSyy1pqqM4lzMZoOFhDxadcU3Tdnz0dJgLW7w="; + }) ]; postPatch = diff --git a/pkgs/by-name/fw/fwupd/uefi-capsule-no-splash-fix-test.diff b/pkgs/by-name/fw/fwupd/uefi-capsule-no-splash-fix-test.diff deleted file mode 100644 index e95b8f23357f..000000000000 --- a/pkgs/by-name/fw/fwupd/uefi-capsule-no-splash-fix-test.diff +++ /dev/null @@ -1,82 +0,0 @@ -commit 90d854ca68543ed117a5a49c28a027972088b568 -Author: r-vdp -Date: Wed Jun 25 11:31:45 2025 +0200 - - Fix uefi self-test when plugin_uefi_capsule_splash is disabled - -diff --git a/meson.build b/meson.build -index 922e87c23..d36850422 100644 ---- a/meson.build -+++ b/meson.build -@@ -564,6 +564,10 @@ conf.set_quoted('MOTD_DIR', motd_dir) - - conf.set_quoted('FU_DEFAULT_P2P_POLICY', get_option('p2p_policy')) - -+if get_option('plugin_uefi_capsule_splash') -+ conf.set('FWUPD_UEFI_CAPSULE_SPLASH_ENABLED', '1') -+endif -+ - configure_file( - output: 'config.h', - configuration: conf -diff --git a/plugins/uefi-capsule/fu-self-test.c b/plugins/uefi-capsule/fu-self-test.c -index d8ffdd913..d99b72fc7 100644 ---- a/plugins/uefi-capsule/fu-self-test.c -+++ b/plugins/uefi-capsule/fu-self-test.c -@@ -534,6 +534,7 @@ fu_uefi_plugin_nvram_func(void) - g_assert_no_error(error); - g_assert_true(ret); - -+#ifdef FWUPD_UEFI_CAPSULE_SPLASH_ENABLED - /* check UX splash was created */ - g_assert_true(fu_uefi_plugin_esp_file_exists( - esp, -@@ -541,14 +542,17 @@ fu_uefi_plugin_nvram_func(void) - g_assert_true(fu_efivars_exists(fu_context_get_efivars(ctx), - FU_EFIVARS_GUID_FWUPDATE, - "fwupd-ux-capsule")); -+#endif - - /* check FW was created */ - g_assert_true(fu_uefi_plugin_esp_file_exists( - esp, - "EFI/" EFI_OS_DIR "/fw/fwupd-cc4cbfa9-bf9d-540b-b92b-172ce31013c1.cap")); -+#ifdef FWUPD_UEFI_CAPSULE_SPLASH_ENABLED - g_assert_true(fu_efivars_exists(fu_context_get_efivars(ctx), - FU_EFIVARS_GUID_FWUPDATE, - "fwupd-ux-capsule")); -+#endif - g_assert_true(fu_efivars_exists(fu_context_get_efivars(ctx), - FU_EFIVARS_GUID_FWUPDATE, - "fwupd-cc4cbfa9-bf9d-540b-b92b-172ce31013c1-0")); -diff --git a/plugins/uefi-capsule/fu-uefi-capsule-plugin.c b/plugins/uefi-capsule/fu-uefi-capsule-plugin.c -index 6623ccd06..419d86565 100644 ---- a/plugins/uefi-capsule/fu-uefi-capsule-plugin.c -+++ b/plugins/uefi-capsule/fu-uefi-capsule-plugin.c -@@ -327,6 +327,7 @@ fu_uefi_capsule_plugin_add_security_attrs(FuPlugin *plugin, FuSecurityAttrs *att - fu_uefi_capsule_plugin_add_security_attrs_bootservices(plugin, attrs); - } - -+#ifdef FWUPD_UEFI_CAPSULE_SPLASH_ENABLED - static GBytes * - fu_uefi_capsule_plugin_get_splash_data(guint width, guint height, GError **error) - { -@@ -544,6 +545,7 @@ fu_uefi_capsule_plugin_update_splash(FuPlugin *plugin, FuDevice *device, GError - /* perform the upload */ - return fu_uefi_capsule_plugin_write_splash_data(self, device, image_bmp, error); - } -+#endif // FWUPD_UEFI_CAPSULE_SPLASH_ENABLED - - static gboolean - fu_uefi_capsule_plugin_write_firmware(FuPlugin *plugin, -@@ -583,8 +585,10 @@ fu_uefi_capsule_plugin_write_firmware(FuPlugin *plugin, - - /* perform the update */ - fu_progress_set_status(progress, FWUPD_STATUS_SCHEDULING); -+#ifdef FWUPD_UEFI_CAPSULE_SPLASH_ENABLED - if (!fu_uefi_capsule_plugin_update_splash(plugin, device, &error_splash)) - g_info("failed to upload UEFI UX capsule text: %s", error_splash->message); -+#endif - - return fu_device_write_firmware(device, firmware, progress, flags, error); - }