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

Reply via email to