[PATCH STABLE] buildrpm: move creation of RPM directories from dockerrpm
Anton Shestakov
engored at ya.ru
Tue Jan 12 18:19:53 UTC 2016
13.01.2016, 01:27, "Anton Shestakov" <engored at ya.ru>:
> 13.01.2016, 00:25, "Mathias De Mar" <mathias.demare at gmail.com>:
>> # HG changeset patch
>> # User Mathias De Maré <mathias.demare at gmail.com>
>> # Date 1452145477 -3600
>> # Thu Jan 07 06:44:37 2016 +0100
>> # Branch stable
>> # Node ID e505b8864dd50b333edb14a7c37baa0cff9a8aba
>> # Parent 6c7d26cef0cda4752c02b7478f1270a84393510b
>> buildrpm: move creation of RPM directories from dockerrpm
>>
>> Handling the creation of the RPM directories in buildrpm
>> is more consistent and takes care of non-docker builds as well.
>>
>> diff --git a/contrib/buildrpm b/contrib/buildrpm
>> --- a/contrib/buildrpm
>> +++ b/contrib/buildrpm
>> @@ -68,7 +68,7 @@
>> RPMPYTHONVER=%{nil}
>> fi
>>
>> -mkdir -p $RPMBUILDDIR/SOURCES
>> +mkdir -p $RPMBUILDDIR/{SOURCES,BUILD,SRPMS,RPMS}
>
> Turns out {x,y} is a bashism, so sh creates a literal {SOURCES,BUILD,SRPMS,RPMS} directory.
>
> This is frustrating, but I've just tried buildrpm (via `make fedora21`) on a fedora 21 box in vagrant and packages/ looks like this:
>
> packages/
> └── fedora21
> ├── mercurial-3.6.3-1+6c7d26cef0cd.src.rpm
> ├── mercurial-3.6.3-1+6c7d26cef0cd.x86_64.rpm
> └── mercurial-debuginfo-3.6.3-1+6c7d26cef0cd.x86_64.rpm
>
> So there's a chance we don't even need all these mkdir -p in buildrpm? Not sure, I'll try and find a usable centos5 image.
Er, I should've been looking at rpmbuild/, it does have all the RPMS/, SRPMS/, etc. But I suspect everything newer than centos5 can create these directories on its own.
So, I didn't manage to build the packages on centos5 due to either me never really it being an rpm-distro user or it being an awful derelict. Although `make docker-centos5` works.
All in all, I think if you want to do a V2 without that bashism, go ahead, but considering that packages on centos6, 7 and fedora 21 already build fine (tried just now), I can't tell when the supposed positive effect of this patch would be noticeable. I feel kinda bad now about suggesting to move mkdir -p calls to buildrpm before me doing the research.
More information about the Mercurial-devel
mailing list