Accepting request 797169 from home:Guillaume_G:branches:hardware
- Reenable LTO for powerpc and aarch64 - Fix PowerPC and aarch64 LTO: boo#1168865 and boo#1169668 * lshw-fix-segfault-in-apfs-volume-code.patch - Fix aarch64 SIGABRT: (boo#1169668) * lshw-fix-mmc.patch OBS-URL: https://build.opensuse.org/request/show/797169 OBS-URL: https://build.opensuse.org/package/show/hardware/lshw?expand=0&rev=44
This commit is contained in:
parent
1d5563bccd
commit
593d84b7aa
52
lshw-fix-mmc.patch
Normal file
52
lshw-fix-mmc.patch
Normal file
@ -0,0 +1,52 @@
|
||||
From 2524bb3def3009e53a78e600bbea2c4639dc1e99 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Liska <mliska@suse.cz>
|
||||
Date: Fri, 24 Apr 2020 15:02:44 +0200
|
||||
Subject: [PATCH] Fix type used for read to ssize_t.
|
||||
|
||||
Function declaration:
|
||||
ssize_t read(int fd, void *buf, size_t count);
|
||||
|
||||
With size_t the following expression is always true:
|
||||
while ((count = read(cpuinfo, buffer, sizeof(buffer))) > 0)
|
||||
|
||||
and bad things happen.
|
||||
---
|
||||
src/core/cpuinfo.cc | 2 +-
|
||||
src/core/osutils.cc | 4 ++--
|
||||
2 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/core/cpuinfo.cc b/src/core/cpuinfo.cc
|
||||
index eceb83a..3dbdd0c 100644
|
||||
--- a/src/core/cpuinfo.cc
|
||||
+++ b/src/core/cpuinfo.cc
|
||||
@@ -589,7 +589,7 @@ bool scan_cpuinfo(hwNode & n)
|
||||
if (core)
|
||||
{
|
||||
char buffer[1024];
|
||||
- size_t count;
|
||||
+ ssize_t count;
|
||||
string cpuinfo_str = "";
|
||||
string description = "", version = "";
|
||||
string plat = platform();
|
||||
diff --git a/src/core/osutils.cc b/src/core/osutils.cc
|
||||
index f023a46..a53ed89 100644
|
||||
--- a/src/core/osutils.cc
|
||||
+++ b/src/core/osutils.cc
|
||||
@@ -148,7 +148,7 @@ vector < string > &list)
|
||||
{
|
||||
char buffer[1024];
|
||||
string buffer_str = "";
|
||||
- size_t count = 0;
|
||||
+ ssize_t count = 0;
|
||||
data_file fd = file_open(file);
|
||||
|
||||
if (file_open_error(fd))
|
||||
@@ -174,7 +174,7 @@ const string & def)
|
||||
if (fd >= 0)
|
||||
{
|
||||
char buffer[1024];
|
||||
- size_t count = 0;
|
||||
+ ssize_t count = 0;
|
||||
|
||||
memset(buffer, 0, sizeof(buffer));
|
||||
result = "";
|
28
lshw-fix-segfault-in-apfs-volume-code.patch
Normal file
28
lshw-fix-segfault-in-apfs-volume-code.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From 82df4fa7d3705f2f61282ed5b22074d4e0a6efc4 Mon Sep 17 00:00:00 2001
|
||||
From: Harry Mallon <hjmallon@gmail.com>
|
||||
Date: Thu, 23 Apr 2020 21:18:47 +0100
|
||||
Subject: [PATCH] volumes: fix segfault in apfs volume code
|
||||
|
||||
---
|
||||
src/core/volumes.cc | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/volumes.cc b/src/core/volumes.cc
|
||||
index e703523..6fce2ee 100644
|
||||
--- a/src/core/volumes.cc
|
||||
+++ b/src/core/volumes.cc
|
||||
@@ -784,12 +784,13 @@ struct apfs_super_block {
|
||||
|
||||
static bool detect_apfs(hwNode & n, source & s)
|
||||
{
|
||||
- static char buffer[sizeof(apfs_super_block)];
|
||||
+ static char buffer[APFS_STANDARD_BLOCK_SIZE];
|
||||
source apfsvolume;
|
||||
apfs_super_block *sb = (apfs_super_block*)buffer;
|
||||
unsigned long block_size;
|
||||
|
||||
apfsvolume = s;
|
||||
+ apfsvolume.blocksize = APFS_STANDARD_BLOCK_SIZE;
|
||||
|
||||
if(readlogicalblocks(apfsvolume, buffer, 0, 1)!=1)
|
||||
return false;
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 24 13:15:19 UTC 2020 - Guillaume GARDET <guillaume.gardet@opensuse.org>
|
||||
|
||||
- Reenable LTO for powerpc and aarch64
|
||||
- Fix PowerPC and aarch64 LTO: boo#1168865 and boo#1169668
|
||||
* lshw-fix-segfault-in-apfs-volume-code.patch
|
||||
- Fix aarch64 SIGABRT: (boo#1169668)
|
||||
* lshw-fix-mmc.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Apr 23 12:16:28 UTC 2020 - Michel Normand <normand@linux.vnet.ibm.com>
|
||||
|
||||
|
11
lshw.spec
11
lshw.spec
@ -27,6 +27,10 @@ URL: https://www.ezix.org/project/wiki/HardwareLiSter
|
||||
Source: https://www.ezix.org/software/files/lshw-%{version}.tar.gz
|
||||
Source1: lshw.desktop.in
|
||||
Source2: lshw.png
|
||||
# PATCH-FIX-UPSTREAM - https://ezix.org/src/pkg/lshw/pulls/32 - boo#1168865 and boo#1169668
|
||||
Patch1: lshw-fix-segfault-in-apfs-volume-code.patch
|
||||
# PATCH-FIX-UPSTREAM - https://github.com/lyonel/lshw/pull/52 - boo#1169668
|
||||
Patch2: lshw-fix-mmc.patch
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: hicolor-icon-theme
|
||||
BuildRequires: libpng-devel
|
||||
@ -74,14 +78,9 @@ included documentation or go to the lshw Web page,
|
||||
http://www.ezix.org/software/lshw.html
|
||||
|
||||
%prep
|
||||
%autosetup
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%ifarch ppc64 ppc64le aarch64
|
||||
# Disable LTO for specified arches, bypass bug
|
||||
# https://bugzilla.opensuse.org/show_bug.cgi?id=1168865
|
||||
%define _lto_cflags %{nil}
|
||||
%endif
|
||||
|
||||
%make_build \
|
||||
SBINDIR="%{_sbindir}" \
|
||||
|
Loading…
x
Reference in New Issue
Block a user