diff --git a/debian/changelog b/debian/changelog index 0219b4fed..62656680e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +fwupd (1.8.10-2) UNRELEASED; urgency=medium + + * Backport a patch to hopefully help with autopkgtest failures on !x86 + + -- Mario Limonciello Tue, 24 Jan 2023 09:11:44 -0600 + fwupd (1.8.10-1) unstable; urgency=medium * New upstream version (1.8.10) diff --git a/debian/patches/0001-Do-not-make-any-of-the-HWIDs-setup-failures-fatal.patch b/debian/patches/0001-Do-not-make-any-of-the-HWIDs-setup-failures-fatal.patch new file mode 100644 index 000000000..e96a24d96 --- /dev/null +++ b/debian/patches/0001-Do-not-make-any-of-the-HWIDs-setup-failures-fatal.patch @@ -0,0 +1,110 @@ +From 90e5a58736645cdd37bf4c63f9a4056951dfb3f2 Mon Sep 17 00:00:00 2001 +From: Richard Hughes +Date: Tue, 24 Jan 2023 09:52:17 +0000 +Subject: [PATCH] Do not make any of the HWIDs setup failures fatal + +It's perfectly okay to have no HWIDs defined. + +Should help with https://github.com/fwupd/fwupd/issues/5402 +--- + libfwupdplugin/fu-context.c | 73 +++++++++++-------------------------- + 1 file changed, 21 insertions(+), 52 deletions(-) + +diff --git a/libfwupdplugin/fu-context.c b/libfwupdplugin/fu-context.c +index 08618b435..11b4b1b38 100644 +--- a/libfwupdplugin/fu-context.c ++++ b/libfwupdplugin/fu-context.c +@@ -767,6 +767,8 @@ fu_context_security_changed(FuContext *self) + g_signal_emit(self, signals[SIGNAL_SECURITY_CHANGED], 0); + } + ++typedef gboolean (*FuContextHwidsSetupFunc)(FuContext *self, FuHwids *hwids, GError **error); ++ + /** + * fu_context_load_hwinfo: + * @self: a #FuContext +@@ -786,62 +788,29 @@ fu_context_load_hwinfo(FuContext *self, FuContextHwidFlags flags, GError **error + GPtrArray *guids; + g_autoptr(GError) error_hwids = NULL; + g_autoptr(GError) error_bios_settings = NULL; ++ struct { ++ const gchar *name; ++ FuContextHwidFlags flag; ++ FuContextHwidsSetupFunc func; ++ } hwids_setup_map[] = {{"config", FU_CONTEXT_HWID_FLAG_LOAD_CONFIG, fu_hwids_config_setup}, ++ {"smbios", FU_CONTEXT_HWID_FLAG_LOAD_SMBIOS, fu_hwids_smbios_setup}, ++ {"fdt", FU_CONTEXT_HWID_FLAG_LOAD_FDT, fu_hwids_fdt_setup}, ++ {"kenv", FU_CONTEXT_HWID_FLAG_LOAD_KENV, fu_hwids_kenv_setup}, ++ {"dmi", FU_CONTEXT_HWID_FLAG_LOAD_DMI, fu_hwids_dmi_setup}, ++ {NULL, FU_CONTEXT_HWID_FLAG_NONE, NULL}}; + + g_return_val_if_fail(FU_IS_CONTEXT(self), FALSE); + g_return_val_if_fail(error == NULL || *error == NULL, FALSE); + +- if ((flags & FU_CONTEXT_HWID_FLAG_LOAD_CONFIG) > 0) { +- g_autoptr(GError) error_local = NULL; +- if (!fu_hwids_config_setup(self, priv->hwids, &error_local)) { +- if (!g_error_matches(error_local, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED)) { +- g_propagate_prefixed_error(error, +- g_steal_pointer(&error_local), +- "Failed to load HWIDs config: "); +- return FALSE; +- } +- } +- } +- if ((flags & FU_CONTEXT_HWID_FLAG_LOAD_DMI) > 0) { +- g_autoptr(GError) error_local = NULL; +- if (!fu_hwids_dmi_setup(self, priv->hwids, &error_local)) { +- if (!g_error_matches(error_local, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED)) { +- g_propagate_prefixed_error(error, +- g_steal_pointer(&error_local), +- "Failed to load HWIDs DMI: "); +- return FALSE; +- } +- } +- } +- if ((flags & FU_CONTEXT_HWID_FLAG_LOAD_FDT) > 0) { +- g_autoptr(GError) error_local = NULL; +- if (!fu_hwids_fdt_setup(self, priv->hwids, &error_local)) { +- if (!g_error_matches(error_local, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED)) { +- g_propagate_prefixed_error(error, +- g_steal_pointer(&error_local), +- "Failed to load HWIDs FDT: "); +- return FALSE; +- } +- } +- } +- if ((flags & FU_CONTEXT_HWID_FLAG_LOAD_KENV) > 0) { +- g_autoptr(GError) error_local = NULL; +- if (!fu_hwids_kenv_setup(self, priv->hwids, &error_local)) { +- if (!g_error_matches(error_local, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED)) { +- g_propagate_prefixed_error(error, +- g_steal_pointer(&error_local), +- "Failed to load HWIDs kenv: "); +- return FALSE; +- } +- } +- } +- if ((flags & FU_CONTEXT_HWID_FLAG_LOAD_SMBIOS) > 0) { +- g_autoptr(GError) error_local = NULL; +- if (!fu_hwids_smbios_setup(self, priv->hwids, &error_local)) { +- if (!g_error_matches(error_local, FWUPD_ERROR, FWUPD_ERROR_NOT_SUPPORTED)) { +- g_propagate_prefixed_error(error, +- g_steal_pointer(&error_local), +- "Failed to load SMBIOS: "); +- return FALSE; ++ /* run all the HWID setup funcs */ ++ for (guint i = 0; hwids_setup_map[i].name != NULL; i++) { ++ if ((flags & hwids_setup_map[i].flag) > 0) { ++ g_autoptr(GError) error_local = NULL; ++ if (!hwids_setup_map[i].func(self, priv->hwids, &error_local)) { ++ g_debug("failed to load %s: %s", ++ hwids_setup_map[i].name, ++ error_local->message); ++ break; + } + } + } +-- +2.25.1 + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 000000000..e6d4c0cc3 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +0001-Do-not-make-any-of-the-HWIDs-setup-failures-fatal.patch