* [Buildroot] [PATCH 1/2] package/nvme: add optional util-linux dependency
@ 2019-04-07 13:36 Fabrice Fontaine
2019-04-07 13:36 ` [Buildroot] [PATCH 2/2] package/nvme: bump to version 1.7 Fabrice Fontaine
2019-04-07 14:13 ` [Buildroot] [PATCH 1/2] package/nvme: add optional util-linux dependency Thomas Petazzoni
0 siblings, 2 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2019-04-07 13:36 UTC (permalink / raw)
To: buildroot
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/nvme/nvme.mk | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/package/nvme/nvme.mk b/package/nvme/nvme.mk
index 8eab1dacfa..513720becb 100644
--- a/package/nvme/nvme.mk
+++ b/package/nvme/nvme.mk
@@ -9,13 +9,23 @@ NVME_SITE = $(call github,linux-nvme,nvme-cli,$(NVME_VERSION))
NVME_LICENSE = GPL-2.0+
NVME_LICENSE_FILES = LICENSE
+# Yes, LIBUUID=0 means libuuid support enabled.
+# LIBUUID=1 means libuuid support disabled.
+ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBUUID),y)
+NVME_DEPENDENCIES += util-linux
+NVME_MAKE_OPTS += LIBUUID=0
+else
+NVME_MAKE_OPTS += LIBUUID=1
+endif
+
define NVME_BUILD_CMDS
- $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)
+ $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) \
+ $(NVME_MAKE_OPTS) -C $(@D)
endef
define NVME_INSTALL_TARGET_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) \
- PREFIX=/usr install-bin
+ $(TARGET_MAKE_ENV) $(MAKE) $(NVME_MAKE_OPTS) -C $(@D) \
+ DESTDIR=$(TARGET_DIR) PREFIX=/usr install-bin
endef
$(eval $(generic-package))
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 2/2] package/nvme: bump to version 1.7
2019-04-07 13:36 [Buildroot] [PATCH 1/2] package/nvme: add optional util-linux dependency Fabrice Fontaine
@ 2019-04-07 13:36 ` Fabrice Fontaine
2019-04-07 14:13 ` [Buildroot] [PATCH 1/2] package/nvme: add optional util-linux dependency Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Fabrice Fontaine @ 2019-04-07 13:36 UTC (permalink / raw)
To: buildroot
- Remove patch (already in version)
- Add upstream patch to fix build
- Add hash for license file
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/nvme/0001-Fix-CFLAGS-parameter.patch | 39 +++++++++++++++++++
...-linker-override-for-cross-uuid-test.patch | 34 ----------------
package/nvme/nvme.hash | 3 +-
package/nvme/nvme.mk | 2 +-
4 files changed, 42 insertions(+), 36 deletions(-)
create mode 100644 package/nvme/0001-Fix-CFLAGS-parameter.patch
delete mode 100644 package/nvme/0001-Makefile-allow-linker-override-for-cross-uuid-test.patch
diff --git a/package/nvme/0001-Fix-CFLAGS-parameter.patch b/package/nvme/0001-Fix-CFLAGS-parameter.patch
new file mode 100644
index 0000000000..1d762b5be0
--- /dev/null
+++ b/package/nvme/0001-Fix-CFLAGS-parameter.patch
@@ -0,0 +1,39 @@
+From 254bcd6b23436fd929e18c935322410b541ca121 Mon Sep 17 00:00:00 2001
+From: Breno Leitao <leitao@debian.org>
+Date: Mon, 21 Jan 2019 07:03:24 -0500
+Subject: [PATCH] Fix CFLAGS parameter
+
+Currently nvme-cli 1.7 is not compiling on Debian because the Debian helper
+(compilation toolkit) does pass a CFLAGS variable, thus, avoiding the
+initial definition (CFLAGS ?= -O2 -g -Wall -Werror -I.)
+
+The problem is that -I should not be removed, otherwise the code does not
+compile, with the following bug:
+
+ cc -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -D__CHECK_ENDIAN__ -g -O2 -fdebug-prefix-map=/home/breno/nvme/nvme-cli-1.7=. -fstack-protector-strong -Wformat -Werror=format-security -std=gnu99 -DLIBUUID -DNVME_VERSION='"1.7"' -o plugins/intel/intel-nvme.o -c plugins/intel/intel-nvme.c
+ plugins/intel/intel-nvme.c:10:18: fatal error: nvme.h: No such file or directory
+ compilation terminated.
+
+This patch just moves the -I parameter to part of the CFLAGS that is not
+replaced by dh's CFLAGS.
+
+Signed-off-by: Breno Leitao <leitao@debian.org>
+[Retrieved from:
+https://github.com/linux-nvme/nvme-cli/commit/254bcd6b23436fd929e18c935322410b541ca121]
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 525616af..3a4e2239 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,5 +1,5 @@
+-CFLAGS ?= -O2 -g -Wall -Werror -I.
+-CFLAGS += -std=gnu99
++CFLAGS ?= -O2 -g -Wall -Werror
++CFLAGS += -std=gnu99 -I.
+ CPPFLAGS += -D_GNU_SOURCE -D__CHECK_ENDIAN__
+ LIBUUID = $(shell $(LD) -o /dev/null -luuid >/dev/null 2>&1; echo $$?)
+ NVME = nvme
diff --git a/package/nvme/0001-Makefile-allow-linker-override-for-cross-uuid-test.patch b/package/nvme/0001-Makefile-allow-linker-override-for-cross-uuid-test.patch
deleted file mode 100644
index dc1c01a888..0000000000
--- a/package/nvme/0001-Makefile-allow-linker-override-for-cross-uuid-test.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From f926559acd1beb74dc5dc9b0e414b087110a251f Mon Sep 17 00:00:00 2001
-From: Baruch Siach <baruch@tkos.co.il>
-Date: Wed, 9 Aug 2017 09:43:12 +0300
-Subject: [PATCH] Makefile: allow linker override for cross uuid test
-
-The test to determine whether libuuid is installed uses the host 'ld' utility.
-This breaks when cross compiling, since target libraries are often different
-than host libraries.
-
-Use $(LD) instead. This allows to easily use the cross compiler linker.
-
-Signed-off-by: Baruch Siach <baruch@tkos.co.il>
----
-Upstream status: https://github.com/linux-nvme/nvme-cli/pull/216
-
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Makefile b/Makefile
-index 3f1d9aaa890d..cc74bdd6c3e6 100644
---- a/Makefile
-+++ b/Makefile
-@@ -1,7 +1,7 @@
- CFLAGS ?= -O2 -g -Wall -Werror
- CFLAGS += -std=gnu99
- CPPFLAGS += -D_GNU_SOURCE -D__CHECK_ENDIAN__
--LIBUUID = $(shell ld -o /dev/null -luuid >/dev/null 2>&1; echo $$?)
-+LIBUUID = $(shell $(LD) -o /dev/null -luuid >/dev/null 2>&1; echo $$?)
- NVME = nvme
- INSTALL ?= install
- DESTDIR =
---
-2.13.2
-
diff --git a/package/nvme/nvme.hash b/package/nvme/nvme.hash
index 92e2bc0acb..1f7be5aef9 100644
--- a/package/nvme/nvme.hash
+++ b/package/nvme/nvme.hash
@@ -1,2 +1,3 @@
# Locally computed:
-sha256 52eb45c9ef5a529580a3f6f9e02c067695675ac01b8ab8b8e0398c62e8a8646d nvme-v1.3.tar.gz
+sha256 3a139d40ffff48d2f0b06339fd3be3ed219241ce6838f0ea173d7459c9984ea2 nvme-v1.7.tar.gz
+sha256 a45d0bb572ed792ed34627a72621834b3ba92aab6e2cc4e04301dee7a728d753 LICENSE
diff --git a/package/nvme/nvme.mk b/package/nvme/nvme.mk
index 513720becb..1762a756c6 100644
--- a/package/nvme/nvme.mk
+++ b/package/nvme/nvme.mk
@@ -4,7 +4,7 @@
#
################################################################################
-NVME_VERSION = v1.3
+NVME_VERSION = v1.7
NVME_SITE = $(call github,linux-nvme,nvme-cli,$(NVME_VERSION))
NVME_LICENSE = GPL-2.0+
NVME_LICENSE_FILES = LICENSE
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/2] package/nvme: add optional util-linux dependency
2019-04-07 13:36 [Buildroot] [PATCH 1/2] package/nvme: add optional util-linux dependency Fabrice Fontaine
2019-04-07 13:36 ` [Buildroot] [PATCH 2/2] package/nvme: bump to version 1.7 Fabrice Fontaine
@ 2019-04-07 14:13 ` Thomas Petazzoni
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2019-04-07 14:13 UTC (permalink / raw)
To: buildroot
On Sun, 7 Apr 2019 15:36:42 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/nvme/nvme.mk | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
Both applied. Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-04-07 14:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-07 13:36 [Buildroot] [PATCH 1/2] package/nvme: add optional util-linux dependency Fabrice Fontaine
2019-04-07 13:36 ` [Buildroot] [PATCH 2/2] package/nvme: bump to version 1.7 Fabrice Fontaine
2019-04-07 14:13 ` [Buildroot] [PATCH 1/2] package/nvme: add optional util-linux dependency Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox