Update to efivar 31
Work around NVMe EUI sysfs change Provide some oldish version strings we should have kept. lots of overflow checking on our pointer math in dp parsing fix major/minor device number handling in the linux code Do better formatting checks for MBR partitions Fixes for gcc 7 Signed-off-by: Peter Jones <pjones@redhat.com>
This commit is contained in:
parent
2654fad592
commit
8893f31a6e
@ -1,40 +0,0 @@
|
||||
From c950dfce4a04b66e5efde770d82540e5d737f458 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Mon, 17 Oct 2016 10:04:48 -0400
|
||||
Subject: [PATCH] Check for the NVMe EUI in the base sysfs dir for the device
|
||||
as well
|
||||
|
||||
Kernel commit 779ff75617099f4defe14e20443b95019a4c5ae8 moves the NVMe
|
||||
attributes from being under nvme0n1/device/* to just being in the
|
||||
nvme0n1/ directory. So now we get to check for both things. Thanks,
|
||||
sysfs.
|
||||
|
||||
This resolves github issue #65
|
||||
This resolves https://github.com/rhinstaller/efibootmgr/issues/48
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
src/linux.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/src/linux.c b/src/linux.c
|
||||
index 30b5cd0..b995887 100644
|
||||
--- a/src/linux.c
|
||||
+++ b/src/linux.c
|
||||
@@ -363,8 +363,13 @@ sysfs_parse_nvme(uint8_t *buf, ssize_t size, ssize_t *off,
|
||||
* now fish the eui out of sysfs is there is one...
|
||||
*/
|
||||
rc = read_sysfs_file(&filebuf,
|
||||
+ "/sys/class/block/nvme%dn%d/eui",
|
||||
+ ctrl_id, ns_id);
|
||||
+ if (rc < 0 && errno == ENOENT) {
|
||||
+ rc = read_sysfs_file(&filebuf,
|
||||
"/sys/class/block/nvme%dn%d/device/eui",
|
||||
ctrl_id, ns_id);
|
||||
+ }
|
||||
if (rc >= 0) {
|
||||
uint8_t eui[8];
|
||||
if (rc < 23) {
|
||||
--
|
||||
2.10.0
|
||||
|
@ -1,55 +0,0 @@
|
||||
From 7ae5c70750d31d7ddce736b5979d15a1a0ccaae2 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Jones <pjones@redhat.com>
|
||||
Date: Wed, 28 Sep 2016 09:28:24 -0400
|
||||
Subject: [PATCH] lib*: provide LIBEFIVAR_1.28 etc.
|
||||
|
||||
Signed-off-by: Peter Jones <pjones@redhat.com>
|
||||
---
|
||||
src/libefiboot.map.in | 10 ++++++++--
|
||||
src/libefivar.map.in | 10 ++++++++--
|
||||
2 files changed, 16 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/libefiboot.map.in b/src/libefiboot.map.in
|
||||
index 51822a5..dce38a3 100644
|
||||
--- a/src/libefiboot.map.in
|
||||
+++ b/src/libefiboot.map.in
|
||||
@@ -23,7 +23,13 @@ LIBEFIBOOT_0.0 {
|
||||
} libefiboot.so.0;
|
||||
|
||||
LIBEFIBOOT_0.24 {
|
||||
-};
|
||||
+} LIBEFIBOOT_0.0;
|
||||
+
|
||||
+LIBEFIBOOT_1.28 {
|
||||
+} LIBEFIBOOT_0.24;
|
||||
+
|
||||
+LIBEFIBOOT_1.29 {
|
||||
+} LIBEFIBOOT_1.28;
|
||||
|
||||
LIBEFIBOOT_1.@@VERSION@@ {
|
||||
-};
|
||||
+} LIBEFIBOOT_1.29;
|
||||
diff --git a/src/libefivar.map.in b/src/libefivar.map.in
|
||||
index 6b8f996..033eb8d 100644
|
||||
--- a/src/libefivar.map.in
|
||||
+++ b/src/libefivar.map.in
|
||||
@@ -99,8 +99,14 @@ LIBEFIVAR_0.24 {
|
||||
efi_guid_cmp;
|
||||
} LIBEFIVAR_0.0;
|
||||
|
||||
-LIBEFIVAR_1.@@VERSION@@ {
|
||||
+LIBEFIVAR_1.28 {
|
||||
global: efi_error_set;
|
||||
efi_error_get;
|
||||
efi_error_clear;
|
||||
-};
|
||||
+} LIBEFIVAR_0.24;
|
||||
+
|
||||
+LIBEFIVAR_1.29 {
|
||||
+} LIBEFIVAR_1.28;
|
||||
+
|
||||
+LIBEFIVAR_1.@@VERSION@@ {
|
||||
+} LIBEFIVAR_1.29;
|
||||
--
|
||||
2.7.4
|
||||
|
15
efivar.spec
15
efivar.spec
@ -1,6 +1,6 @@
|
||||
Name: efivar
|
||||
Version: 30
|
||||
Release: 5%{?dist}
|
||||
Version: 31
|
||||
Release: 0.1%{?dist}
|
||||
Summary: Tools to manage UEFI variables
|
||||
License: LGPLv2.1
|
||||
URL: https://github.com/rhinstaller/efivar
|
||||
@ -9,8 +9,6 @@ ExclusiveArch: %{ix86} x86_64 aarch64
|
||||
|
||||
BuildRequires: popt-devel popt-static git glibc-static
|
||||
Source0: https://github.com/rhinstaller/efivar/releases/download/efivar-%{version}/efivar-%{version}.tar.bz2
|
||||
Patch0001: 0001-lib-provide-LIBEFIVAR_1.28-etc.patch
|
||||
Patch0002: 0001-Check-for-the-NVMe-EUI-in-the-base-sysfs-dir-for-the.patch
|
||||
|
||||
%description
|
||||
efivar provides a simple command line interface to the UEFI variable facility.
|
||||
@ -71,6 +69,15 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_libdir}/*.so.*
|
||||
|
||||
%changelog
|
||||
* Mon Feb 06 2017 Peter Jones <pjones@redhat.com> - 31-0.1
|
||||
- Update to efivar 31
|
||||
- Work around NVMe EUI sysfs change
|
||||
- Provide some oldish version strings we should have kept.
|
||||
- lots of overflow checking on our pointer math in dp parsing
|
||||
- fix major/minor device number handling in the linux code
|
||||
- Do better formatting checks for MBR partitions
|
||||
- Fixes for gcc 7
|
||||
|
||||
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 30-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user