Skip to contentSkip to conversation

Makefile: remove DESTDIR from firmware file content

PATCH In review Olaf Hering 4 participants 5 messages May 30, 2019 – Jun 5, 2019 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: remove DESTDIR from firmware file content

The resulting firmware files should only contain the runtime path. Fixes commit 26ce90fde5c ("Makefile: install the edk2 firmware images and their descriptors")

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +1 -1
index f0be624f47..61267bf1a4 100644
@@ -844,7 +844,7 @@ ifneq ($(DESCS),)
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/firmware"
 	set -e; tmpf=$$(mktemp); trap 'rm -f -- "$$tmpf"' EXIT; \
 	for x in $(DESCS); do \
-		sed -e 's,@DATADIR@,$(DESTDIR)$(qemu_datadir),' \
+		sed -e 's,@DATADIR@,$(qemu_datadir),' \
 			"$(SRC_PATH)/pc-bios/descriptors/$$x" > "$$tmpf"; \
 		$(INSTALL_DATA) "$$tmpf" \
 			"$(DESTDIR)$(qemu_datadir)/firmware/$$x"; \
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Olaf Hering

The resulting firmware files should only contain the runtime path. Fixes commit 26ce90fde5c ("Makefile: install the edk2 firmware images and their descriptors")

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +0 -0
index f0be624f47..61267bf1a4 100644

Makefile ifneq ($(DESCS),) · line 850

Quoted 8 lines
Makefile +1 -1
@@ -844,7 +844,7 @@ ifneq ($(DESCS),)
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/firmware"
 	set -e; tmpf=$$(mktemp); trap 'rm -f -- "$$tmpf"' EXIT; \
 	for x in $(DESCS); do \
-		sed -e 's,@DATADIR@,$(DESTDIR)$(qemu_datadir),' \
+		sed -e 's,@DATADIR@,$(qemu_datadir),' \
 			"$(SRC_PATH)/pc-bios/descriptors/$$x" > "$$tmpf"; \
 		$(INSTALL_DATA) "$$tmpf" \
 			"$(DESTDIR)$(qemu_datadir)/firmware/$$x"; \

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
Reviewed-by on v1 1/1
#2 lore raw
In reply to Olaf Hering

[Odd, I'm pretty sure I replied to this last week but can't find it, so again]
Cc'ing Laszlo since he wrote this.

Quoted 14 lines · Olaf Hering

The resulting firmware files should only contain the runtime path. Fixes commit 26ce90fde5c ("Makefile: install the edk2 firmware images and their descriptors")

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +0 -0
index f0be624f47..61267bf1a4 100644

Makefile ifneq ($(DESCS),) · line 847

Quoted 5 lines
Makefile +1 -1
@@ -844,7 +844,7 @@ ifneq ($(DESCS),)
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/firmware"
 	set -e; tmpf=$$(mktemp); trap 'rm -f -- "$$tmpf"' EXIT; \
 	for x in $(DESCS); do \
-		sed -e 's,@DATADIR@,$(DESTDIR)$(qemu_datadir),' \
+		sed -e 's,@DATADIR@,$(qemu_datadir),' \

I'm fine with this patch.

Laszlo, did you use the full path for a particular reason?

Quoted 4 lines
Makefile +0 -0
 			"$(SRC_PATH)/pc-bios/descriptors/$$x" > "$$tmpf"; \
 		$(INSTALL_DATA) "$$tmpf" \
 			"$(DESTDIR)$(qemu_datadir)/firmware/$$x"; \
Reviewed-by
#3 lore raw
Quoted 26 lines · Philippe Mathieu-Daudé

[Odd, I'm pretty sure I replied to this last week but can't find it, so again]
Cc'ing Laszlo since he wrote this.

Quoted 14 lines · Olaf Hering

The resulting firmware files should only contain the runtime path. Fixes commit 26ce90fde5c ("Makefile: install the edk2 firmware images and their descriptors")

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +0 -0
index f0be624f47..61267bf1a4 100644

Makefile ifneq ($(DESCS),) · line 847

Quoted 5 lines
Makefile +1 -1
@@ -844,7 +844,7 @@ ifneq ($(DESCS),)
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/firmware"
 	set -e; tmpf=$$(mktemp); trap 'rm -f -- "$$tmpf"' EXIT; \
 	for x in $(DESCS); do \
-		sed -e 's,@DATADIR@,$(DESTDIR)$(qemu_datadir),' \
+		sed -e 's,@DATADIR@,$(qemu_datadir),' \

I'm fine with this patch.

Quoted 3 lines

Laszlo, did you use the full path for a particular reason?

Yes. The reason was that I had no idea what DESTDIR stood for. After grepping the QEMU source tree for DESTDIR, I *still* have no idea what it stands for.

DESTDIR seems to be an installation prefix that is not controlled through

  ./configre --prefix=...

Based on memories from other projects -- with better documentation -- though, DESTDIR looks like an install-time-only pre-prefix. In that sense, the patch looks correct (and the vague expression "runtime path" in the commit message starts to make some sense). Presumably DESTDIR is used in package build scripts... Yup, the RHEL spec files use it too, for "make install".

So, the patch is correct IMO:

Too bad QEMU is chronically under-documented (and the commit message on the patch doesn't help much in that regard).

Thanks
Laszlo

Quoted 4 lines
Quoted 4 lines
Makefile +0 -0
 			"$(SRC_PATH)/pc-bios/descriptors/$$x" > "$$tmpf"; \
 		$(INSTALL_DATA) "$$tmpf" \
 			"$(DESTDIR)$(qemu_datadir)/firmware/$$x"; \
#4 lore raw
Quoted 46 lines · Laszlo Ersek
Quoted 26 lines · Philippe Mathieu-Daudé

[Odd, I'm pretty sure I replied to this last week but can't find it, so again]
Cc'ing Laszlo since he wrote this.

Quoted 14 lines · Olaf Hering

The resulting firmware files should only contain the runtime path. Fixes commit 26ce90fde5c ("Makefile: install the edk2 firmware images and their descriptors")

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Makefile +0 -0
index f0be624f47..61267bf1a4 100644

Makefile ifneq ($(DESCS),) · line 847

Quoted 5 lines
Makefile +1 -1
@@ -844,7 +844,7 @@ ifneq ($(DESCS),)
 	$(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/firmware"
 	set -e; tmpf=$$(mktemp); trap 'rm -f -- "$$tmpf"' EXIT; \
 	for x in $(DESCS); do \
-		sed -e 's,@DATADIR@,$(DESTDIR)$(qemu_datadir),' \
+		sed -e 's,@DATADIR@,$(qemu_datadir),' \

I'm fine with this patch.

Quoted 3 lines

Laszlo, did you use the full path for a particular reason?

Yes. The reason was that I had no idea what DESTDIR stood for. After grepping the QEMU source tree for DESTDIR, I *still* have no idea what it stands for.

DESTDIR seems to be an installation prefix that is not controlled through

  ./configre --prefix=...

Based on memories from other projects -- with better documentation -- though, DESTDIR looks like an install-time-only pre-prefix. In that sense, the patch looks correct (and the vague expression "runtime path" in the commit message starts to make some sense). Presumably DESTDIR is used in package build scripts... Yup, the RHEL spec files use it too, for "make install".

Quoted 6 lines

So, the patch is correct IMO:

Too bad QEMU is chronically under-documented (and the commit message on the patch doesn't help much in that regard).

At least the git history is public :)