[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#799119: Regression in NVMe support caused by 7046795cdd0e9ca11789ffe0f5cedaa42217f6e0



Hi,

Mario Limonciello <mario_limonciello@dell.com> (2015-09-15):
> package: grub-installer
> version: 1.122
> 
> I've been trying to debug some problems related to installation on an
> NVMe drive and found that 7046795cdd0e9ca11789ffe0f5cedaa42217f6e0
> introduced a regression that is causing grub-installer to fail.
> 
> This commit was supposed to introduce support for multi-digit X and Y
> values of /dev/nvmeXnY but instead causes it to not match on systems
> with drives that are not multi-digit.  The [0-9][0-9] syntax is looking
> for drives that have multi digits explicitly.
> 
> On my system I see nodes for:
> 
> /dev/nvme0n1 which will not match in this syntax.
> 
> Dropping the second [0-9] from the introduced areas resolves the problem
> for me.

Sorry, this is entirely my fault. Mixing patterns in sed and case statements…

Hopefully the version I've just uploaded will fix this. I'm attaching
the patch just in case somebody wants to quickly review it.


And before anyone asks, I know this whole mess should get cleaned up.
Just a small matter of programming, and of somebody doing it…


Mraw,
KiBi.
From fa658f8a8fbd9179a5ae3abae14b6c906f6ee620 Mon Sep 17 00:00:00 2001
From: Cyril Brulebois <kibi@debian.org>
Date: Thu, 3 Dec 2015 00:26:01 +0100
Subject: [PATCH] Fix buggy /dev/nvme matching in the case statement to
 determine disc_offered_devfs (Closes: #799119).

Thanks, Mario Limonciello!

Because of course the patterns one uses in sed substitutions aren't
exactly the same one wants to be using in case statements.

This fixes the regression introduced in:
| commit 7046795cdd0e9ca11789ffe0f5cedaa42217f6e0
| Author: Cyril Brulebois <kibi@debian.org>
| Date:   Tue May 12 22:38:32 2015 +0200
|
|     Add support for multi-digit X and Y in /dev/nvmeXnY
---
 debian/changelog | 7 +++++++
 grub-installer   | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 994172b..00daa5b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+grub-installer (1.128) UNRELEASED; urgency=medium
+
+  * Fix buggy /dev/nvme matching in the case statement to determine
+    disc_offered_devfs (Closes: #799119). Thanks, Mario Limonciello!
+
+ -- Cyril Brulebois <kibi@debian.org>  Thu, 03 Dec 2015 00:22:10 +0100
+
 grub-installer (1.127) unstable; urgency=medium
 
   [ Updated translations ]
diff --git a/grub-installer b/grub-installer
index c407cd1..e43c197 100755
--- a/grub-installer
+++ b/grub-installer
@@ -252,7 +252,7 @@ case $prefix in
     /dev/mapper)
 	disc_offered_devfs="$bootfs"
 	;;
-    /dev/[hsv]d[a-z0-9]|/dev/xvd[a-z]|/dev/cciss/c[0-9]d[0-9]*|/dev/ida/c[0-9]d[0-9]*|/dev/rs/c[0-9]d[0-9]*|/dev/mmcblk[0-9]|/dev/nvme[0-9][0-9]*n[0-9][0-9]*|/dev/ad[0-9]*|/dev/da[0-9]*)
+    /dev/[hsv]d[a-z0-9]|/dev/xvd[a-z]|/dev/cciss/c[0-9]d[0-9]*|/dev/ida/c[0-9]d[0-9]*|/dev/rs/c[0-9]d[0-9]*|/dev/mmcblk[0-9]|/dev/nvme[0-9]*n[0-9]*|/dev/ad[0-9]*|/dev/da[0-9]*)
 	disc_offered_devfs="$prefix"
 	;;
     *)
-- 
2.1.4

Attachment: signature.asc
Description: Digital signature


Reply to: