Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock

Please unblock package efivar


(Some issues have been raised that will affect compatibility with NVMe drives
that will make stretch less supportable as NVMe HW is made more prevalent.

It's prudent to fix these issues now to avoid difficulties with installer
media later.

unblock efivar/30-2

-- System Information:
Debian Release: stretch/sid
  APT prefers xenial-updates
  APT policy: (500, 'xenial-updates'), (500, 'xenial'), (100, 
'xenial-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.4.0-59-generic (SMP w/16 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
diff -Nru efivar-30/debian/changelog efivar-30/debian/changelog
--- efivar-30/debian/changelog	2016-09-23 15:00:08.000000000 -0500
+++ efivar-30/debian/changelog	2017-04-14 09:43:21.000000000 -0500
@@ -1,3 +1,14 @@
+efivar (30-2) unstable; urgency=medium
+
+  * Correct NEWS format to satisfy lintian warnings
+  * Backport a patch to fix builds that fail from multiple definitions
+  * Backport a patch from upstream to fix NVMe sysfs support after
+    kernel 4.5
+  * Backport patch from upsteram to fix major/minor device handling
+    (Closes: #844237)
+
+ -- Mario Limonciello <mario.limoncie...@dell.com>  Fri, 14 Apr 2017 09:43:21 -0500
+
 efivar (30-1) unstable; urgency=medium
 
   * new upstream version (30)
diff -Nru efivar-30/debian/NEWS efivar-30/debian/NEWS
--- efivar-30/debian/NEWS	2016-09-23 15:00:08.000000000 -0500
+++ efivar-30/debian/NEWS	2016-10-27 10:24:50.000000000 -0500
@@ -1,11 +1,14 @@
-Version 30-1
-------------
-Upstream screwed up previously with the approach used in version 27 
-and included was making the ABI in the SONAME.  They've fixed this
-in version 28. 
-More can be seen in upstream commit b729026.
+efivar (30-1) unstable; urgency=medium
+
+    Upstream screwed up previously with the approach used in version 27 
+    and included was making the ABI in the SONAME.  They've fixed this
+    in version 28. 
+    More can be seen in upstream commit b729026.
+
+    Consequently it will look a little odd to upgrade from
+    libefivar0 -> libefivar27 -> libefivar1
+    but this is expected.  *27 binary packages shouldn't remain in the
+    Debian archive after 30-1 transitions to testing.
+
+ -- Mario Limonciello <mario.limoncie...@dell.com>  Fri, 23 Sep 2016 15:00:08 -0500
 
-Consequently it will look a little odd to upgrade from
-libefivar0 -> libefivar27 -> libefivar1
-but this is expected.  *27 binary packages shouldn't remain in the
-Debian archive after 30-1 transitions to testing.
diff -Nru efivar-30/debian/patches/0001-Check-for-the-NVMe-EUI-in-the-base-sysfs-dir-for-the.patch efivar-30/debian/patches/0001-Check-for-the-NVMe-EUI-in-the-base-sysfs-dir-for-the.patch
--- efivar-30/debian/patches/0001-Check-for-the-NVMe-EUI-in-the-base-sysfs-dir-for-the.patch	1969-12-31 18:00:00.000000000 -0600
+++ efivar-30/debian/patches/0001-Check-for-the-NVMe-EUI-in-the-base-sysfs-dir-for-the.patch	2017-04-14 09:38:02.000000000 -0500
@@ -0,0 +1,40 @@
+From c950dfce4a04b66e5efde770d82540e5d737f458 Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjo...@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 <pjo...@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.7.4
+
diff -Nru efivar-30/debian/patches/0001-linux-fix-device-major-minor-handling.patch efivar-30/debian/patches/0001-linux-fix-device-major-minor-handling.patch
--- efivar-30/debian/patches/0001-linux-fix-device-major-minor-handling.patch	1969-12-31 18:00:00.000000000 -0600
+++ efivar-30/debian/patches/0001-linux-fix-device-major-minor-handling.patch	2017-04-14 09:38:24.000000000 -0500
@@ -0,0 +1,59 @@
+From 9d8ed784455f73593143e8316f7ca156986dae37 Mon Sep 17 00:00:00 2001
+From: Nicolas George <geo...@nsup.org>
+Date: Sun, 13 Nov 2016 19:04:30 +0100
+Subject: [PATCH] linux: fix device major/minor handling.
+
+The current code fails when minor >= 256 because the higher
+bits are kept in major.
+
+Fix: Debian bug #844237
+---
+ src/linux.c | 10 +++++-----
+ src/linux.h |  2 +-
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/src/linux.c b/src/linux.c
+index b995887..68e93fd 100644
+--- a/src/linux.c
++++ b/src/linux.c
+@@ -55,7 +55,7 @@ set_disk_and_part_name(struct disk_info *info)
+ 	char *linkbuf;
+ 	ssize_t rc;
+ 
+-	rc = sysfs_readlink(&linkbuf, "/sys/dev/block/%"PRIu64":%hhu",
++	rc = sysfs_readlink(&linkbuf, "/sys/dev/block/%"PRIu64":%"PRIu32,
+ 		      info->major, info->minor);
+ 	if (rc < 0)
+ 		return -1;
+@@ -918,11 +918,11 @@ eb_disk_info_from_fd(int fd, struct disk_info *info)
+ 		return 1;
+ 	}
+ 	if (S_ISBLK(buf.st_mode)) {
+-		info->major = buf.st_rdev >> 8;
+-		info->minor = buf.st_rdev & 0xFF;
++		info->major = major(buf.st_rdev);
++		info->minor = minor(buf.st_rdev);
+ 	} else if (S_ISREG(buf.st_mode)) {
+-		info->major = buf.st_dev >> 8;
+-		info->minor = buf.st_dev & 0xFF;
++		info->major = major(buf.st_dev);
++		info->minor = minor(buf.st_dev);
+ 	} else {
+ 		printf("Cannot stat non-block or non-regular file\n");
+ 		return 1;
+diff --git a/src/linux.h b/src/linux.h
+index c9d0f2b..7f7bc86 100644
+--- a/src/linux.h
++++ b/src/linux.h
+@@ -75,7 +75,7 @@ struct disk_info {
+ 	unsigned int disknum;
+ 	unsigned char part;
+ 	uint64_t major;
+-	unsigned char minor;
++	uint32_t minor;
+ 	uint32_t edd10_devicenum;
+ 
+ 	struct pci_root_info pci_root;
+-- 
+2.7.4
+
diff -Nru efivar-30/debian/patches/0001-Use-z-muldefs-to-avoid-the-multiple-definitions-bug-.patch efivar-30/debian/patches/0001-Use-z-muldefs-to-avoid-the-multiple-definitions-bug-.patch
--- efivar-30/debian/patches/0001-Use-z-muldefs-to-avoid-the-multiple-definitions-bug-.patch	1969-12-31 18:00:00.000000000 -0600
+++ efivar-30/debian/patches/0001-Use-z-muldefs-to-avoid-the-multiple-definitions-bug-.patch	2016-10-27 10:49:05.000000000 -0500
@@ -0,0 +1,28 @@
+From 3e9fca7cce221581e8c4db0e94e27480a0d05916 Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjo...@redhat.com>
+Date: Thu, 27 Oct 2016 09:19:18 -0400
+Subject: [PATCH] Use -z muldefs to avoid the multiple definitions bug without
+ -flto
+
+This fixes github issue #64
+
+Signed-off-by: Peter Jones <pjo...@redhat.com>
+---
+ Make.defaults | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Make.defaults b/Make.defaults
+index aa974d9..c9d599f 100644
+--- a/Make.defaults
++++ b/Make.defaults
+@@ -32,6 +32,7 @@ cflags	= $(CFLAGS) -I${TOPDIR}/src/include/efivar/ \
+ clang_ccldflags =
+ gcc_ccldflags =
+ ccldflags = $(cflags) -L. $(CCLDFLAGS) $(LDFLAGS) \
++	-Wl,-z,muldefs \
+ 	$(if $(findstring clang,$(CCLD)),$(clang_ccldflags),) \
+ 	$(if $(findstring gcc,$(CCLD)),$(gcc_ccldflags),) \
+ 	$(call pkg-config-ccldflags)
+-- 
+2.7.4
+
diff -Nru efivar-30/debian/patches/series efivar-30/debian/patches/series
--- efivar-30/debian/patches/series	1969-12-31 18:00:00.000000000 -0600
+++ efivar-30/debian/patches/series	2017-04-14 09:41:26.000000000 -0500
@@ -0,0 +1,3 @@
+0001-Check-for-the-NVMe-EUI-in-the-base-sysfs-dir-for-the.patch
+0001-linux-fix-device-major-minor-handling.patch
+0001-Use-z-muldefs-to-avoid-the-multiple-definitions-bug-.patch

Reply via email to