From nobody Mon Feb 9 23:40:40 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1487258440630285.5362158462077; Thu, 16 Feb 2017 07:20:40 -0800 (PST) Received: from localhost ([::1]:47285 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceNrK-0001Dx-Ah for importer@patchew.org; Thu, 16 Feb 2017 10:20:38 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52051) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ceN6u-00044A-P9 for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:32:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ceN6t-0008L1-U5 for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:32:40 -0500 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]:34892) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ceN6t-0008KX-NP for qemu-devel@nongnu.org; Thu, 16 Feb 2017 09:32:39 -0500 Received: by mail-wm0-x243.google.com with SMTP id u63so3409230wmu.2 for ; Thu, 16 Feb 2017 06:32:39 -0800 (PST) Received: from 640k.lan (94-39-187-56.adsl-ull.clienti.tiscali.it. [94.39.187.56]) by smtp.gmail.com with ESMTPSA id g5sm9203365wrd.0.2017.02.16.06.32.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Feb 2017 06:32:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=WqWt2+WsBYgajzpc+FDTaEgMXoDMLboYilzeRqdo1Mk=; b=dY+amUZfWJE9JFGf4U1ye1EYVTH4WlfGF6UqUJLMKJG4UXDCMEQTb5fg6jzlI2VRyH PWXMXIBVLxW0OdhnwaXDleCxJyrVmd7hP9oWYCGhjUHQQVTxryIbCZ8nROpq74kGwFSn xcy6w9f+LWZCXE1UJvjRdns7xiDyed7AFy4miaRIDGHfeY5iTxNI4uLwWF7NKNlj7h2L F6BjkOzgXYWlFU5WidZZT47kYOMZIY5IM/H/ywAjnggbqZRdJ4evoxPVMbdEnchRa/6Y 2m1Acr+SHOGxIioh4asoGi/qCIrmUTTYXm8TTbQZugtxsI3mzBJF+OAtGr62RSL16aus hwCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=WqWt2+WsBYgajzpc+FDTaEgMXoDMLboYilzeRqdo1Mk=; b=rIusJgXg4YsoyLSr/r9CJFv4/hwquoFyDfSkaTvWLoqVaEh9LUv6g/1sa1We4m44j2 /GdKoDeNqPFgU3OTz77hEVFU6HrutdZr0q62YNK0/UEJzZFxgNDmJL/hbjwRt1i0dYnD vQn1UNN9xJNdIoj4m9PeTWqQ71Jqr+yKyV2hZosZIZp81jqIedoRFbP9RhQGGax4V2h5 qVQEp0TFx65xWH6AEpg+Fq7ST7ZTVf1rvur1HcqbB1yNS78eZCNZx3PmWzY1d5QN+aNS hBMAEdyXAOe4u8EKWo/ico+pDfX9J1H9X6JPyCo0wYnol6tfem12Wk2Al/g11bn2llha Oe4Q== X-Gm-Message-State: AMke39nP4sov3qQvdpyTFDWfdHu9dqMe9d90HDAX5hfbl+9goaZqiK9IdZsccFQm3ZbRlg== X-Received: by 10.28.6.78 with SMTP id 75mr2889349wmg.81.1487255558578; Thu, 16 Feb 2017 06:32:38 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Thu, 16 Feb 2017 15:31:43 +0100 Message-Id: <1487255507-106654-20-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1487255507-106654-1-git-send-email-pbonzini@redhat.com> References: <1487255507-106654-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::243 Subject: [Qemu-devel] [PULL 19/23] Makefile: avoid leaving the temporary QEMU_PKGVERSION header file X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lin Ma Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Lin Ma By commit 67a1de0d, When we perform 'git pull && make && sudo make install', In 'make' stage a qemu-version.h.tmp will be generated. If the content of qemu-version.h.tmp and qemu-version.h aren't consistent, The qemu-version.h= .tmp will be renamed to qemu-version.h. Because of the target FORCE, The same ac= tion will be do again in 'make install' stage. In 'make install' stage, If there is no qemu-version.h.tmp exists and we run 'make install' with sudo, The owner and group of new qemu-version.h.tmp wil= l be privileged user/group. When we run 'make' next time, qemu-version.h.tmp can= 't be overwritten because of permission issue. This patch removed qemu-version.h.tmp after build to fix this issue. Signed-off-by: Lin Ma Message-Id: <20170215024030.23895-1-lma@suse.com> Reviewed-by: Fam Zheng Signed-off-by: Paolo Bonzini --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b993741..830fa5a 100644 --- a/Makefile +++ b/Makefile @@ -299,7 +299,11 @@ qemu-version.h: FORCE printf '""\n'; \ fi; \ fi) > $@.tmp) - $(call quiet-command, cmp -s $@ $@.tmp || mv $@.tmp $@) + $(call quiet-command, if ! cmp -s $@ $@.tmp; then \ + mv $@.tmp $@; \ + else \ + rm $@.tmp; \ + fi) =20 config-host.h: config-host.h-timestamp config-host.h-timestamp: config-host.mak --=20 1.8.3.1