Prevent regression on update from f25 to rawhide

The following fix is on the f25 branch (in the f25 build), but it hasn't made it
to neither upstream nor any rawhide build yet. Thus it needs to be added here in
order to prevent regression when updating from f25 to rawhide.

- Fix "unknown" SAS device sysfs parsing. (#1394026) (awilliam)
This commit is contained in:
Vratislav Podzimek 2016-11-21 12:09:50 +01:00
parent a9d7906d31
commit 23923c4630
2 changed files with 41 additions and 1 deletions

View File

@ -0,0 +1,34 @@
From 7a9697eae467fc0ed44022d948f70f30d156d69e Mon Sep 17 00:00:00 2001
From: Adam Williamson <adamw@fedoraproject.org>
Date: Fri, 11 Nov 2016 12:36:12 -0500
Subject: [PATCH] Fix "unknown" SAS device sysfs parsing.
Since the regexp matches the device type as well as the identifying
numbers, we need to pull the numbers from match groups 2 and 3, not 1
and 2.
Resolves: rhbz#1394026
Signed-off-by: Peter Jones <pjones@redhat.com>
---
blivet/devicelibs/edd.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/blivet/devicelibs/edd.py b/blivet/devicelibs/edd.py
index 7a1a1e2..51b7ed8 100644
--- a/blivet/devicelibs/edd.py
+++ b/blivet/devicelibs/edd.py
@@ -316,8 +316,8 @@ class EddEntry(object):
self.sas_address = int(sas_match.group(1), base=16)
self.sas_lun = int(sas_match.group(2), base=16)
elif unknown_match:
- self.sas_address = int(unknown_match.group(1), base=16)
- self.sas_lun = int(unknown_match.group(2), base=16)
+ self.sas_address = int(unknown_match.group(2), base=16)
+ self.sas_lun = int(unknown_match.group(3), base=16)
else:
log.warning("edd: can not match interface for %s: %s",
self.sysfspath, interface)
--
2.7.4

View File

@ -5,7 +5,7 @@ Version: 2.1.7
#%%global prerelease .b1
# prerelease, if defined, should be something like .a1, .b1, .b2.dev1, or .c2
Release: 1%{?prerelease}%{?dist}
Release: 2%{?prerelease}%{?dist}
Epoch: 1
License: LGPLv2+
Group: System Environment/Libraries
@ -13,6 +13,8 @@ Group: System Environment/Libraries
%global realversion %{version}%{?prerelease}
Source0: http://github.com/rhinstaller/blivet/archive/%{realname}-%{realversion}.tar.gz
Patch0: 0001-Fix-unknown-SAS-device-sysfs-parsing.patch
# Versions of required components (done so we make sure the buildrequires
# match the requires versions of things).
%global pykickstartver 1.99.22
@ -61,6 +63,7 @@ configuration.
%prep
%setup -q -n %{realname}-%{realversion}
%patch0 -p1
rm -rf %{py3dir}
cp -a . %{py3dir}
@ -80,6 +83,9 @@ make PYTHON=%{__python3} DESTDIR=%{buildroot} install
%{python3_sitelib}/*
%changelog
* Mon Nov 21 2016 Vratislav Podzimek <vpodzime@redhat.com> - 2.1.7-2
- Fix "unknown" SAS device sysfs parsing. (#1394026) (awilliam)
* Mon Nov 21 2016 Vratislav Podzimek <vpodzime@redhat.com> - 2.1.7-1
- Require BlockDev 2.0 in the gi.require_version() call (vpodzime)
- Fix detection of 'macefi' partitions (#1393846) (awilliam)