Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp749349pxb; Thu, 31 Mar 2022 16:57:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwH60aa+AGowb2Bq6w2imYuvHWswmFGf2gc1yWzmsgzFCwU3IbaWNurvDCino44gShIMHra X-Received: by 2002:a05:6a00:22cb:b0:4fa:ad77:1510 with SMTP id f11-20020a056a0022cb00b004faad771510mr8110446pfj.80.1648771078527; Thu, 31 Mar 2022 16:57:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648771078; cv=none; d=google.com; s=arc-20160816; b=B+HPaCD3eHDug/p7CHzNEotM6xepVrso0fPCfAbcsFlqRAvCDRckwRpqKJV5IGpE8K JvhE5ygAJfWkrmYRtNdhvKAOQL8RhKJd0kbj2aC/bt9micGfFHz/sNjab8Yg4JjBP1nw qwjiEERLEKIxwzuD2Diay64XTdZTagwqaRbQDHwaA1cfBrs7UcUk9GGkxPgSc4bsQ2/t oZnTITpQNxp217N41cPfY+iPU6QNQG5RtwbLYhe3JnPXMeJspGFTnzFnWIl96wBbFi+T NydlYrXBKG2p7emTkDQd5YzKWp9fK8PcDD19xl+KfWQE1GgoqNgAVk3xEg8gZE5904w8 iBww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=PwYhrtBILCwKQQwACdj9E0hN1reoXLuXM4GNYp6BBNo=; b=rGNdSIOvwG3Gi8UOwxWNjwmKn4YofioxHipTKXndJ6kV/AfpxD2QpoHe1orPH5RG1v KGgiJXO6X5kQKeXxnCNBu1tcf3Vkhwns3BFD1HODnKeuGy87+irdHDmIs0keU4n4gKEj CWEQ0MunQsOOQflmuvwmP+x1wuMv20kTlFE5FKTJd+c9TQPxMzdFykCnptfrJSzKrEyP 0qDhGm7XgPFQuwrXES31CtGf4evx9N9eLZemojjQKKejDGAWQszK+vWnH9Gpteux05QG XOEhSJazw3KpAfHdrfpVe6KQrkEsbuEwVz16HdEK9JqKQrjXkygTtmNpslYyT5xVioip zIBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@anarazel.de header.s=fm1 header.b=Kihow+nh; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=I9t3BZvZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h9-20020a056a00170900b004fa5a577b93si935068pfc.51.2022.03.31.16.57.42; Thu, 31 Mar 2022 16:57:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@anarazel.de header.s=fm1 header.b=Kihow+nh; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=I9t3BZvZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231264AbiCaRfj (ORCPT + 99 others); Thu, 31 Mar 2022 13:35:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231313AbiCaRfi (ORCPT ); Thu, 31 Mar 2022 13:35:38 -0400 Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3532656C12; Thu, 31 Mar 2022 10:33:48 -0700 (PDT) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 4CEC65C01F0; Thu, 31 Mar 2022 13:33:46 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Thu, 31 Mar 2022 13:33:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; bh=PwYhrtBILCwKQQwACdj9E0hN1reoXLuXM4GNYp 6BBNo=; b=Kihow+nh39VTZ8m+1FkTo3bI0iKf0P0sA0MNJIWMMGl3xLjqUpSDPH +VSpuSHvl9iaUNdkaX/5IFd81r84sXwnihB0wr5lB6uJ207cOGQciJUyWfkJwjOd mrCPfLezNjqUBXtx6ZOA6Rx7BKN05SzY6EcRAAKHKBlFHzS8vKF+RypMiSJUY3O6 rOrgzvmnCqNNcWZP2ubD4pEcfkk695iqm4GbCtZIXniIyN+BQ5ITlAyj65YZSlul gFckzfhP8XLMDmFIrZuwYYp0DzcnYBVFnz2vdM8em6UEbnczr916DJcmAIwoh6qf 70D5JXnSz8Mw6lxWEEPfgOjKFcoADGeg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=PwYhrtBILCwKQQwAC dj9E0hN1reoXLuXM4GNYp6BBNo=; b=I9t3BZvZRa21JcYXNNDhqhLcgTBJ7tFpg hPPZXri+kPIMBBdu1BL8FJLATM+RknWGo1df5RO5tlJomcAxa4OCSU2XEgzFbEmM VKr0x2tNIvVSCcBQpB+UkUyJa7P4iKuMeZtZ0hET0js1fGgj/JTljUK9nyW1R9cr vmJrYHuYA2WL8n16ArlgPQe87Vh4kQnV9YseEwA3GPybiFcORZD0TXgsbuwicg1K EHBHLPp3ugnZ31oO6whI+DYZpTV3wcKnPXAyjrmtN/xKfNyXiKLCiyLK6uMy8LWe SXYTvJkhZWQ/zjdp4ClqTdDgNXD5omTRrimtP0L4d1dBpOhy+zpjw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudeigedguddugecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepvdfhieejvdevheehjeegvefhheektefhleeihfeuheelgfdtjeeludei hfeuudejnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghdptghirhhruhhsqdgtihdrtg homhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegr nhgurhgvshesrghnrghrrgiivghlrdguvg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 31 Mar 2022 13:33:45 -0400 (EDT) Date: Thu, 31 Mar 2022 10:33:44 -0700 From: Andres Freund To: Matthieu Baerts Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , John Garry , mptcp@lists.linux.dev, Arnaldo Carvalho de Melo , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH perf] perf tools: .git/ORIG_HEAD might not exist Message-ID: <20220331173344.xvhp4yi67fv6p6t5@alap3.anarazel.de> References: <20220329093120.4173283-1-matthieu.baerts@tessares.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220329093120.4173283-1-matthieu.baerts@tessares.net> X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 2022-03-29 11:31:20 +0200, Matthieu Baerts wrote: > It seems it cannot be assumed .git/ORIG_HEAD exists if .git/HEAD is > there. > > Indeed, recently our public CI reported[1] the following error when > compiling Perf tool: > > $ cd tools/perf > $ make -j4 -l4 O=/tmp/(...)/perf DESTDIR=/usr install > (...) > make[2]: *** No rule to make target '../../.git/ORIG_HEAD', needed by '/tmp/(...)/perf/PERF-VERSION-FILE'. > > This is because apparently[2] Cirrus Ci uses a Git client implemented > purely in Go[3] to perform a clone. Most likely, this tool doesn't > create any .git/ORIG_HEAD file but .git/HEAD is there. The error can > indeed be reproduced by renaming this .git/ORIG_HEAD file while keeping > .git/HEAD. In other words, it means it is not enough to check the > presence of .git/HEAD to assume .git/ORIG_HEAD exists as well. FWIW, It's not just custom git implementations, stock git doesn't ensure it's there either. I build a nightly VM image with Linus' kernel for postgres testing, and as part of that I do a minimal clone: git clone --single-branch --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git /usr/src/linux and then build the kernel. The build recently started failing like this: https://cirrus-ci.com/task/4648999113195520?logs=build_image#L3121 It's not a question of "--single-branch --depth 1" - ORIG_HEAD just isn't there in a new clone. Which makes sense, because there's no previous value for HEAD. Greetings, Andres Freund