!31 fix compiling with new versions of efivar
From: @caodongxia Reviewed-by: @gitee-cmd Signed-off-by: @gitee-cmd
This commit is contained in:
commit
16a04726a0
58
0001-Fix-compiling-with-new-versions-of-efivar.patch
Normal file
58
0001-Fix-compiling-with-new-versions-of-efivar.patch
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
From e74d38bfd3097471fe60dbe843a68c16516a78da Mon Sep 17 00:00:00 2001
|
||||||
|
From: Richard Hughes <richard@hughsie.com>
|
||||||
|
Date: Mon, 17 Jan 2022 14:50:47 +0000
|
||||||
|
Subject: [PATCH] Fix compiling with new versions of efivar
|
||||||
|
|
||||||
|
Fixes https://github.com/fwupd/fwupd/issues/4181
|
||||||
|
---
|
||||||
|
meson.build | 5 +++++
|
||||||
|
plugins/uefi-capsule/fu-uefi-common.h | 3 +++
|
||||||
|
2 files changed, 8 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/meson.build b/meson.build
|
||||||
|
index 86e7057..0c768a2 100644
|
||||||
|
--- a/meson.build
|
||||||
|
+++ b/meson.build
|
||||||
|
@@ -354,6 +354,11 @@ if build_standalone and get_option('plugin_uefi_capsule')
|
||||||
|
readelf = find_program ('readelf')
|
||||||
|
genpeimg = find_program ('genpeimg', required: false)
|
||||||
|
|
||||||
|
+ efivar = dependency('efivar')
|
||||||
|
+ if cc.has_header_symbol('efivar/efivar-types.h', 'efi_time_t', dependencies : efivar)
|
||||||
|
+ conf.set('HAVE_EFI_TIME_T', '1')
|
||||||
|
+ endif
|
||||||
|
+
|
||||||
|
efi_app_location = join_paths(libexecdir, 'fwupd', 'efi')
|
||||||
|
conf.set_quoted ('EFI_APP_LOCATION', efi_app_location)
|
||||||
|
|
||||||
|
diff --git a/plugins/uefi-capsule/fu-uefi-common.h b/plugins/uefi-capsule/fu-uefi-common.h
|
||||||
|
index c7e3996..91b6c99 100644
|
||||||
|
--- a/plugins/uefi-capsule/fu-uefi-common.h
|
||||||
|
+++ b/plugins/uefi-capsule/fu-uefi-common.h
|
||||||
|
@@ -7,6 +7,7 @@
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
+#include <efivar/efivar.h>
|
||||||
|
#include <glib.h>
|
||||||
|
|
||||||
|
#include "fwupd-common.h"
|
||||||
|
@@ -17,6 +18,7 @@
|
||||||
|
#define EFI_CAPSULE_HEADER_FLAGS_POPULATE_SYSTEM_TABLE 0x00020000
|
||||||
|
#define EFI_CAPSULE_HEADER_FLAGS_INITIATE_RESET 0x00040000
|
||||||
|
|
||||||
|
+#ifndef HAVE_EFI_TIME_T
|
||||||
|
typedef struct __attribute__((__packed__)) {
|
||||||
|
guint16 year;
|
||||||
|
guint8 month;
|
||||||
|
@@ -30,6 +32,7 @@ typedef struct __attribute__((__packed__)) {
|
||||||
|
guint8 daylight;
|
||||||
|
guint8 pad2;
|
||||||
|
} efi_time_t;
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
typedef struct __attribute__((__packed__)) {
|
||||||
|
fwupd_guid_t guid;
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
16
fwupd.spec
16
fwupd.spec
@ -3,17 +3,23 @@
|
|||||||
%bcond_without libsmbios
|
%bcond_without libsmbios
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# although we ship a few tiny python files these are utilities that 99.99%
|
||||||
|
# of users do not need -- use this to avoid dragging python onto NestOS
|
||||||
|
%global __requires_exclude ^/usr/bin/python3
|
||||||
|
|
||||||
%ifarch x86_64 aarch64
|
%ifarch x86_64 aarch64
|
||||||
%bcond_without uefi
|
%bcond_without uefi
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: fwupd
|
Name: fwupd
|
||||||
Version: 1.5.8
|
Version: 1.5.8
|
||||||
Release: 1
|
Release: 3
|
||||||
Summary: Make updating firmware on Linux automatic, safe and reliable
|
Summary: Make updating firmware on Linux automatic, safe and reliable
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://github.com/fwupd/fwupd/releases
|
URL: https://github.com/fwupd/fwupd/releases
|
||||||
Source0: http://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz
|
Source0: http://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz
|
||||||
|
#refer: https://github.com/fwupd/fwupd/commit/e74d38bfd3097471fe60dbe843a68c16516a78da
|
||||||
|
Patch0001: 0001-Fix-compiling-with-new-versions-of-efivar.patch
|
||||||
|
|
||||||
BuildRequires: gettext glib2-devel libxmlb-devel valgrind valgrind-devel libgcab1-devel
|
BuildRequires: gettext glib2-devel libxmlb-devel valgrind valgrind-devel libgcab1-devel
|
||||||
BuildRequires: gpgme-devel libgudev1-devel libgusb-devel libsoup-devel polkit-devel sqlite-devel libxslt
|
BuildRequires: gpgme-devel libgudev1-devel libgusb-devel libsoup-devel polkit-devel sqlite-devel libxslt
|
||||||
@ -43,8 +49,6 @@ Requires(postun):systemd
|
|||||||
Obsoletes: dbxtool < 9 dbxtool-help < 9
|
Obsoletes: dbxtool < 9 dbxtool-help < 9
|
||||||
Provides: dbxtool
|
Provides: dbxtool
|
||||||
|
|
||||||
Recommends: python3
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
%{name} aims to make updating firmware on Linux automatic, safe and reliable.
|
%{name} aims to make updating firmware on Linux automatic, safe and reliable.
|
||||||
|
|
||||||
@ -176,6 +180,12 @@ mkdir -pm 0700 %{buildroot}%{_localstatedir}/lib/%{name}/gnupg
|
|||||||
%{_datadir}/man/man1/*
|
%{_datadir}/man/man1/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Nov 10 2022 caodongxia <caodongxia@h-partners.com> - 1.5.8-3
|
||||||
|
- Fix compiling with new versions of efivar
|
||||||
|
|
||||||
|
* Mon Jun 20 2022 fushanqing <fushanqing@kylinos.cn> - 1.5.8-2
|
||||||
|
- Remove the python installation dependency of fwupd
|
||||||
|
|
||||||
* Mon Oct 31 2022 yaoxin <yaoxin30@h-partners.com> - 1.5.8-1
|
* Mon Oct 31 2022 yaoxin <yaoxin30@h-partners.com> - 1.5.8-1
|
||||||
- Upgrade to 1.5.8
|
- Upgrade to 1.5.8
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user