qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gitlab: Escape git-describe match pattern on Windows hosts


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH] gitlab: Escape git-describe match pattern on Windows hosts
Date: Wed, 1 Sep 2021 18:51:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 9/1/21 6:47 PM, Daniel P. Berrangé wrote:
> On Wed, Sep 01, 2021 at 06:27:37PM +0200, Cédric Le Goater wrote:
>> On 9/1/21 6:24 PM, Philippe Mathieu-Daudé wrote:
>>> On 9/1/21 5:53 PM, Daniel P. Berrangé wrote:
>>>> On Wed, Sep 01, 2021 at 05:35:42PM +0200, Philippe Mathieu-Daudé wrote:
>>>>> On 9/1/21 5:21 PM, Daniel P. Berrangé wrote:
>>>>>> On Wed, Sep 01, 2021 at 04:17:48PM +0100, Peter Maydell wrote:
>>>>>>> On Wed, 1 Sept 2021 at 15:59, Daniel P. Berrangé <berrange@redhat.com> 
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> On Wed, Sep 01, 2021 at 04:52:29PM +0200, Philippe Mathieu-Daudé wrote:
>>>>>>>>> Properly escape git-describe 'match' pattern to avoid (MinGW):
>>>>>>>>>
>>>>>>>>>   $ if grep -q "EXESUF=.exe" config-host.mak; then make installer;
>>>>>>>>>     version="$(git describe --match v[0-9]*)";
>>>>>>>>>     mv -v qemu-setup*.exe qemu-setup-${version}.exe; fi
>>>>>>>>>   fatal: No names found, cannot describe anything.
>>>>>>>>>   ERROR: Job failed: exit code 1
>>>>>>>>>
>>>>>>>>> Reported-by: Cédric Le Goater <clg@kaod.org>
>>>>>>>>> Fixes: 8619b5ddb56 ("ci: build & store windows installer")
>>>>>>>>> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/591
>>>>>>>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>>>>>>>> ---
>>>>>>>>>  .gitlab-ci.d/crossbuild-template.yml | 2 +-
>>>>>>>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>>>>>
>>>>>>>>> diff --git a/.gitlab-ci.d/crossbuild-template.yml 
>>>>>>>>> b/.gitlab-ci.d/crossbuild-template.yml
>>>>>>>>> index 10d22dcf6c1..62d33e6661d 100644
>>>>>>>>> --- a/.gitlab-ci.d/crossbuild-template.yml
>>>>>>>>> +++ b/.gitlab-ci.d/crossbuild-template.yml
>>>>>>>>> @@ -14,7 +14,7 @@
>>>>>>>>>      - make -j$(expr $(nproc) + 1) all check-build $MAKE_CHECK_ARGS
>>>>>>>>>      - if grep -q "EXESUF=.exe" config-host.mak;
>>>>>>>>>        then make installer;
>>>>>>>>> -      version="$(git describe --match v[0-9]*)";
>>>>>>>>> +      version="$(git describe --match 'v[0-9]*')";
>>>>>>>>
>>>>>>>> Do you have a pointer to a pipeline showing this fix works ?
>>>>>
>>>>> It worked on my fork but I have some versioned tag:
>>>>> https://gitlab.com/philmd_rh/qemu/-/jobs/1553450025
>>>>
>>>> I can reproduce the error msg if I do a shallow clone with no history
>>>>
>>>> $ cd qemu
>>>> $ git describe --match v[0-9]*
>>>> v6.1.0-171-g5e8c1a0c90
>>>>
>>>> $ cd ..
>>>> $ git clone --depth 1 https://gitlab.com/qemu-project/qemu/ qemu.new
>>>> $ cd qemu.new/
>>>> $ git describe --match v[0-9]*
>>>> fatal: No names found, cannot describe anything.
>>>>
>>>> but the odd thing is that I think we should have been hitting the
>>>> problem frequently if it was related to git depth. This job passes
>>>> fine in current CI pipelines and my own fork.
>>>
>>> FYI it didn't work out on Cédric fork:
>>> https://gitlab.com/legoater/qemu/-/jobs/1553492082
>>>
>>
>> Indeed.
> 
> I'm curious if you go to
> 
>   https://gitlab.com/legoater/qemu/-/settings/ci_cd
> 
> and expand "General pipelines", what value is set for the
> 
>   "Git shallow clone"
> 
> setting.  In my fork it is 0 which means unlimited depth, but in
> gitlab docs I see reference to repos getting this set to 50
> since a particular gitlab release.
> 
> Likewise same question for Phil in ?
> 
>   https://gitlab.com/philmd_rh/qemu/-/settings/ci_cd

0 too.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]