You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bigtop.apache.org by Andrew Bayer <an...@gmail.com> on 2011/09/16 22:12:47 UTC

Abstracting the build logic in rules/spec files

So we already abstract away copying the bits into place for the packages via
bigtop-packages/src/common/foo/install_foo.sh. But we're not as of yet
abstracting the build logic - as a result, we're duplicating the build calls
in both the Debian rules files and the RPM spec files. I don't like
duplication. =) So I'd like to propose moving the build logic for the
components into shell scripts akin to the install_foo.sh scripts, in the
common area, which would then be called in the rules/specs. Does this sound
reasonable to everyone?

A.

Re: Abstracting the build logic in rules/spec files

Posted by Roman Shaposhnik <rv...@apache.org>.
On Fri, Sep 16, 2011 at 1:32 PM, Bruno Mahé <bm...@apache.org> wrote:
> On 09/16/2011 01:12 PM, Andrew Bayer wrote:
>> So we already abstract away copying the bits into place for the packages via
>> bigtop-packages/src/common/foo/install_foo.sh. But we're not as of yet
>> abstracting the build logic - as a result, we're duplicating the build calls
>> in both the Debian rules files and the RPM spec files. I don't like
>> duplication. =) So I'd like to propose moving the build logic for the
>> components into shell scripts akin to the install_foo.sh scripts, in the
>> common area, which would then be called in the rules/specs. Does this sound
>> reasonable to everyone?
>
> It works for me.
> Generalizing a template would also be most helpful.

+1. Lets file a JIRA and do it. It would also be nice to have hooks for some
common steps that we might want to execute during the build cycle (like
pushing Maven artifcats to a certain place, etc.).

Thanks,
Roman.

Re: Abstracting the build logic in rules/spec files

Posted by Bruno Mahé <bm...@apache.org>.
On 09/16/2011 01:12 PM, Andrew Bayer wrote:
> So we already abstract away copying the bits into place for the packages via
> bigtop-packages/src/common/foo/install_foo.sh. But we're not as of yet
> abstracting the build logic - as a result, we're duplicating the build calls
> in both the Debian rules files and the RPM spec files. I don't like
> duplication. =) So I'd like to propose moving the build logic for the
> components into shell scripts akin to the install_foo.sh scripts, in the
> common area, which would then be called in the rules/specs. Does this sound
> reasonable to everyone?
>
> A.
>

It works for me.
Generalizing a template would also be most helpful.