[EPEL-devel] Re: Trouble rebuilding perl-Moose

2017-09-28 Thread Digimer
On 2017-09-28 11:31 AM, Digimer wrote:
> On 2017-09-28 05:04 AM, Paul Howarth wrote:
>> On 2017-09-28 08:42, Digimer wrote:
>>> Hi all,
>>>
>>>   This is my first post, apologies if I am off-topic;
>>>
>>>   I'm trying to build perl-Moose, which depends on perl-Data-Visitor,
>>> but perl-Data-Visitor depends on perl-Moose;
>>>
>>> 
>>> [digimer@el7-builder-test1 SPECS]$ rpmbuild -ba perl-Moose.spec
>>> error: Failed build dependencies:
>>> perl(Data::Visitor) is needed by
>>> perl-Moose-2.1005-1.el7.centos.x86_64
>>> [digimer@el7-builder-test1 SPECS]$ rpmbuild -ba perl-Data-Visitor.spec
>>> error: Failed build dependencies:
>>> perl(Moose) >= 0.89 is needed by
>>> perl-Data-Visitor-0.30-1.el7.centos.noarch
>>> 
>>>
>>>   I am wondering how EPEL repos solved this problem... I grabbed the
>>> source for both from EPEL. Now, I know I could install perl-Data-Visitor
>>> from EPEL, then build perl-Moose, install that, then rebuild
>>> perl-Data-Visitor but I am trying to learn more about package
>>> management, which is why I am asking here to find out what is the proper
>>> way to solve this.
>>
>> A bootstrapping process is used to resolve this issue.
>>
>> First, the perl-Moose package is built with the %perl_bootstrap rpm
>> macro set to 1. This could be set in the build system, or by editing the
>> perl-Moose spec file to set it (which is what's done in EPEL). This
>> allows perl-Moose to be built without perl-Data-Visitor or any other
>> module that would result in circular build dependencies.
>>
>> Once perl-Moose has been built, the %perl_bootstrap rpm macro can be
>> removed, either from the build system or the spec file as necessary.
>>
>> It's then possible to build perl-Data-Visitor etc.
>>
>> Finally, perl-Moose is rebuilt without %perl_bootstrap, which improves
>> test coverage by pulling in all of the build requirements that were
>> omitted for the bootstrap build.
>>
>> You can see the bootstrapping process by looking at the commit history
>> for the epel7 branch:
>> https://src.fedoraproject.org/rpms/perl-Moose/commits/epel7
>>
>> Paul.
> 
> Excellent, thanks!
> 
> Can I ask another question? (Ya, I'm new...), is there a doc you
> recommend on using macros? I assume you mean the .spec option is to
> comment out the requires line for perl-Data-Visitor?

To answer my own question, and for the archives...

rpmbuild -ba --define 'perl_bootstrap 1' perl-Moose.spec

Thanks again!


-- 
Digimer
Papers and Projects: https://alteeve.com/w/
"I am, somehow, less interested in the weight and convolutions of
Einstein’s brain than in the near certainty that people of equal talent
have lived and died in cotton fields and sweatshops." - Stephen Jay Gould
___
epel-devel mailing list -- epel-devel@lists.fedoraproject.org
To unsubscribe send an email to epel-devel-le...@lists.fedoraproject.org


[EPEL-devel] Re: Trouble rebuilding perl-Moose

2017-09-28 Thread Digimer
On 2017-09-28 05:04 AM, Paul Howarth wrote:
> On 2017-09-28 08:42, Digimer wrote:
>> Hi all,
>>
>>   This is my first post, apologies if I am off-topic;
>>
>>   I'm trying to build perl-Moose, which depends on perl-Data-Visitor,
>> but perl-Data-Visitor depends on perl-Moose;
>>
>> 
>> [digimer@el7-builder-test1 SPECS]$ rpmbuild -ba perl-Moose.spec
>> error: Failed build dependencies:
>> perl(Data::Visitor) is needed by
>> perl-Moose-2.1005-1.el7.centos.x86_64
>> [digimer@el7-builder-test1 SPECS]$ rpmbuild -ba perl-Data-Visitor.spec
>> error: Failed build dependencies:
>> perl(Moose) >= 0.89 is needed by
>> perl-Data-Visitor-0.30-1.el7.centos.noarch
>> 
>>
>>   I am wondering how EPEL repos solved this problem... I grabbed the
>> source for both from EPEL. Now, I know I could install perl-Data-Visitor
>> from EPEL, then build perl-Moose, install that, then rebuild
>> perl-Data-Visitor but I am trying to learn more about package
>> management, which is why I am asking here to find out what is the proper
>> way to solve this.
> 
> A bootstrapping process is used to resolve this issue.
> 
> First, the perl-Moose package is built with the %perl_bootstrap rpm
> macro set to 1. This could be set in the build system, or by editing the
> perl-Moose spec file to set it (which is what's done in EPEL). This
> allows perl-Moose to be built without perl-Data-Visitor or any other
> module that would result in circular build dependencies.
> 
> Once perl-Moose has been built, the %perl_bootstrap rpm macro can be
> removed, either from the build system or the spec file as necessary.
> 
> It's then possible to build perl-Data-Visitor etc.
> 
> Finally, perl-Moose is rebuilt without %perl_bootstrap, which improves
> test coverage by pulling in all of the build requirements that were
> omitted for the bootstrap build.
> 
> You can see the bootstrapping process by looking at the commit history
> for the epel7 branch:
> https://src.fedoraproject.org/rpms/perl-Moose/commits/epel7
> 
> Paul.

Excellent, thanks!

Can I ask another question? (Ya, I'm new...), is there a doc you
recommend on using macros? I assume you mean the .spec option is to
comment out the requires line for perl-Data-Visitor?

-- 
Digimer
Papers and Projects: https://alteeve.com/w/
"I am, somehow, less interested in the weight and convolutions of
Einstein’s brain than in the near certainty that people of equal talent
have lived and died in cotton fields and sweatshops." - Stephen Jay Gould
___
epel-devel mailing list -- epel-devel@lists.fedoraproject.org
To unsubscribe send an email to epel-devel-le...@lists.fedoraproject.org


[EPEL-devel] Re: Trouble rebuilding perl-Moose

2017-09-28 Thread Matěj Cepl
On 2017-09-28, 09:04 GMT, Paul Howarth wrote:
> A bootstrapping process is used to resolve this issue.
>
> First, the perl-Moose package is built with the %perl_bootstrap rpm 
> macro set to 1. This could be set in the build system, or by editing the 
> perl-Moose spec file to set it (which is what's done in EPEL). This 
> allows perl-Moose to be built without perl-Data-Visitor or any other 
> module that would result in circular build dependencies.

And I have alrady went through the pain and the result is 
somewhere among 88 packages at 
https://copr.fedorainfracloud.org/coprs/mcepl/openQA-EPEL7/

Best,

Matěj
-- 
http://matej.ceplovi.cz/blog/, Jabber: mceplceplovi.cz
GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
 
Our lives are spectacles of powerlessness.
-- Richard Rohr

___
epel-devel mailing list -- epel-devel@lists.fedoraproject.org
To unsubscribe send an email to epel-devel-le...@lists.fedoraproject.org


[EPEL-devel] Re: Trouble rebuilding perl-Moose

2017-09-28 Thread Paul Howarth

On 2017-09-28 08:42, Digimer wrote:

Hi all,

  This is my first post, apologies if I am off-topic;

  I'm trying to build perl-Moose, which depends on perl-Data-Visitor,
but perl-Data-Visitor depends on perl-Moose;


[digimer@el7-builder-test1 SPECS]$ rpmbuild -ba perl-Moose.spec
error: Failed build dependencies:
perl(Data::Visitor) is needed by perl-Moose-2.1005-1.el7.centos.x86_64
[digimer@el7-builder-test1 SPECS]$ rpmbuild -ba perl-Data-Visitor.spec
error: Failed build dependencies:
	perl(Moose) >= 0.89 is needed by 
perl-Data-Visitor-0.30-1.el7.centos.noarch



  I am wondering how EPEL repos solved this problem... I grabbed the
source for both from EPEL. Now, I know I could install 
perl-Data-Visitor

from EPEL, then build perl-Moose, install that, then rebuild
perl-Data-Visitor but I am trying to learn more about package
management, which is why I am asking here to find out what is the 
proper

way to solve this.


A bootstrapping process is used to resolve this issue.

First, the perl-Moose package is built with the %perl_bootstrap rpm 
macro set to 1. This could be set in the build system, or by editing the 
perl-Moose spec file to set it (which is what's done in EPEL). This 
allows perl-Moose to be built without perl-Data-Visitor or any other 
module that would result in circular build dependencies.


Once perl-Moose has been built, the %perl_bootstrap rpm macro can be 
removed, either from the build system or the spec file as necessary.


It's then possible to build perl-Data-Visitor etc.

Finally, perl-Moose is rebuilt without %perl_bootstrap, which improves 
test coverage by pulling in all of the build requirements that were 
omitted for the bootstrap build.


You can see the bootstrapping process by looking at the commit history 
for the epel7 branch:

https://src.fedoraproject.org/rpms/perl-Moose/commits/epel7

Paul.
___
epel-devel mailing list -- epel-devel@lists.fedoraproject.org
To unsubscribe send an email to epel-devel-le...@lists.fedoraproject.org