From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Andres Freund <andres@anarazel.de>,
Matthieu Baerts <matthieu.baerts@tessares.net>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
John Garry <john.garry@huawei.com>,
mptcp@lists.linux.dev, Arnaldo Carvalho de Melo <acme@redhat.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH perf] perf tools: .git/ORIG_HEAD might not exist
Date: Thu, 31 Mar 2022 15:23:01 -0300 [thread overview]
Message-ID: <5B37F7F6-CDFD-49B9-9BF6-CEA726E5F0CF@gmail.com> (raw)
In-Reply-To: <20220331173344.xvhp4yi67fv6p6t5@alap3.anarazel.de>
On March 31, 2022 2:33:44 PM GMT-03:00, Andres Freund <andres@anarazel.de> wrote:
>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.
I merged the patch that stops looking for .git files, as soon as I fix a libperl feature test with CC=clang I'll send a pull req to Linus to get rid of this .git perf --version related regression.
- Arnaldo
>
>Greetings,
>
>Andres Freund
prev parent reply other threads:[~2022-03-31 18:24 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-29 9:31 Matthieu Baerts
2022-03-29 10:32 ` John Garry
2022-03-29 15:12 ` Matthieu Baerts
2022-03-31 17:33 ` Andres Freund
2022-03-31 18:23 ` Arnaldo Carvalho de Melo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5B37F7F6-CDFD-49B9-9BF6-CEA726E5F0CF@gmail.com \
--to=arnaldo.melo@gmail.com \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=andres@anarazel.de \
--cc=john.garry@huawei.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=matthieu.baerts@tessares.net \
--cc=mingo@redhat.com \
--cc=mptcp@lists.linux.dev \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®