From nobody Tue Apr 30 19:28:46 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1565009676; cv=none; d=zoho.com; s=zohoarc; b=g0mLZnHGtEM26gQAFydvUDnvSAgQ3wjxS2AyDXUS9/UnXn4/0+S8aHRvtchuWJWcQMoBD3q1V7aPm+waBQchjZZIrY31z29lcXWk9fvNZM5N7yKBa+OCAD3l34VmY13WUl1izd20pBnbPOOlVI8WjF3fc/QzVgpdGHJXYA8ZLu4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565009676; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=mQvpMh9qUbzsujREsLpIm36aW6SfJxuyGj6kw2wHXaY=; b=QULyI9GZFexR0H7zVV1PgzkDZFz0E8QV3XEpGpaGjl95FvGY35Gix+kJhO3u0o5VD8dP0v0OVsC5I2jDYqbeHnYdV0vWhTIbCLZdv/iociCwQcSTB0IUT1eVdaZ8lu3j+GigQ3mP6YLDVi6cvF6+bs340xrcx+4nksVORotMnX0= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1565009676041920.094263673539; Mon, 5 Aug 2019 05:54:36 -0700 (PDT) Received: from localhost ([::1]:53524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hucVQ-00027i-Up for importer@patchew.org; Mon, 05 Aug 2019 08:54:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:49561) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hucV0-0001iH-2M for qemu-devel@nongnu.org; Mon, 05 Aug 2019 08:54:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hucUz-0000yC-49 for qemu-devel@nongnu.org; Mon, 05 Aug 2019 08:54:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53112) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hucUy-0000x2-VX for qemu-devel@nongnu.org; Mon, 05 Aug 2019 08:54:01 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B2D47308212F for ; Mon, 5 Aug 2019 12:53:58 +0000 (UTC) Received: from localhost.localdomain (ovpn-204-137.brq.redhat.com [10.40.204.137]) by smtp.corp.redhat.com (Postfix) with ESMTP id C1CEC600CC; Mon, 5 Aug 2019 12:53:52 +0000 (UTC) From: Michal Privoznik To: qemu-devel@nongnu.org Date: Mon, 5 Aug 2019 14:53:37 +0200 Message-Id: <350c3150b25e0c44e24e0a3bd15dacc7284684c9.1565009145.git.mprivozn@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 05 Aug 2019 12:53:58 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] Makefile: Drop $(DESTDIR) from generated FW paths X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: philmd@redhat.com, imammedo@redhat.com, lersek@redhat.com, mst@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" The way that generating firmware descriptor files work is that for every input file, every occurrence of @DATADIR@ within the file is replaced with $(DESTDIR)$(qemu_datadir). This works as long as DESTDIR is empty. But in some cases (e.g. on my Gentoo box), compilation is done in one dir, then the installation is done to another dir and then package manager copies over the installed files. It's obvious that $(DESTDIR) must be ignored otherwise the generated FW descriptor files will refer to old installation directory and ignore --prefix given to ./configure. Steps to reproduce: 1) qemu.git $ mkdir _build _install; cd _build && \ ../configure --prefix=3D/usr && make && \ make DESTDIR=3D../_install install 2) Observe wrong path: qemu.git/_build $ grep filename ../_install/usr/share/qemu/firmware/* Signed-off-by: Michal Privoznik --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index cfab1561b9..85862fb81a 100644 --- a/Makefile +++ b/Makefile @@ -881,7 +881,7 @@ ifneq ($(DESCS),) $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/firmware" set -e; tmpf=3D$$(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"; \ --=20 2.21.0