[Freeipa-devel] [PATCH] Define all needed rpmbuild dirs

Rob Crittenden rcritten at redhat.com
Wed Mar 27 03:56:09 UTC 2013


Orion Poplawski wrote:
> On 03/26/2013 05:25 PM, Rob Crittenden wrote:
>> Orion Poplawski wrote:
>>> On 03/26/2013 05:02 PM, Rob Crittenden wrote:
>>>> Orion Poplawski wrote:
>>>>> The current makefile make assumptions about people not redefining
>>>>> _specdir/_rpmdir/_srpmdir.  This patch gets around that by specifying
>>>>> all needed directories.
>>>>
>>>> Don't we force RPMBUILD to be the local build directory? Why would you
>>>> want to
>>>> specify the files to be written elsewhere?
>>>>
>>>> rob
>>>
>>> You are assuming that by defining _topdir it is enough.  But some people
>>> (like myself) redefine _specdir, etc.  e.g.:
>>>
>>> %_rpmtopdir             %{_topdir}/%{name}-%{version}
>>> %_builddir              %{_rpmtopdir}
>>> %_rpmdir                %{_topdir}/RPMS
>>> %_sourcedir             %{_rpmtopdir}
>>> %_specdir               %{_rpmtopdir}
>>> %_srcrpmdir             %{_rpmtopdir}
>>>
>>> So the patch makes sure to actually define the macros you need to point
>>> to the locations you want.
>>>
>>
>> But why would you want to? We do this specifically to keep everything
>> within the development tree.
>>
>> rob
>
> Because this is how I like to organize my *personal* rpm development
> tree (and is what is in my ~/.rpmmacros).  But when I did a make srpm in
> the freeipa directory it looked for the spec in
> freeipa/rpmbuild/freeipa-3.1.99GIT.../ instead of
> freeipa/rpmbuild/SPECS, merging my definition of _specdir with freeipa's
> _topdir.  Adding the needed --defines overrides my ~/.rpmmacros.
>

But why would you do it that way vs make rpms? What is the work flow?

As I said, this was an intentional change *because* it was interfering 
with those that had custom rpm configurations.

What is the need to build an srpm and then rpms from that when you are 
working inside a git tree? There is no need to snapshot the source 
because git does that for you. That was our reasoning anyway.

rob




More information about the Freeipa-devel mailing list