lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 31 Mar 2022 15:23:01 -0300
From:   Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
To:     Andres Freund <andres@...razel.de>,
        Matthieu Baerts <matthieu.baerts@...sares.net>
CC:     Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        John Garry <john.garry@...wei.com>, mptcp@...ts.linux.dev,
        Arnaldo Carvalho de Melo <acme@...hat.com>,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH perf] perf tools: .git/ORIG_HEAD might not exist



On March 31, 2022 2:33:44 PM GMT-03:00, Andres Freund <andres@...razel.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ