You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@bigtop.apache.org by Jagat Singh <ja...@gmail.com> on 2013/02/27 09:50:01 UTC

Building bigtop with patches

Hi,

I am looking at building bigtop with patches from few Jira under review at
apache.

I saw in

/home/jj/source/bigtop/bigtop*/package.mk*


# Untar and patch
$(BUILD_DIR)/%/.tar:
    -rm -rf $(PKG_BUILD_DIR)/tar/
    mkdir -p
$(PKG_BUILD_DIR)/tar/$($(PKG)_NAME)-$(PKG_PKG_VERSION)$(BIGTOP_BUILD_STAMP)
    if [ -n "$($(PKG)_TARBALL_SRC)" ]; then \
      cp $($(PKG)_DOWNLOAD_DST)
$(PKG_BUILD_DIR)/tar/$($(PKG)_PKG_NAME)_$(PKG_PKG_VERSION)$(BIGTOP_BUILD_STAMP).orig.tar.gz
;\
      tar -C
$(PKG_BUILD_DIR)/tar/$($(PKG)_NAME)-$(PKG_PKG_VERSION)$(BIGTOP_BUILD_STAMP)
\
              --strip-components 1 -xzvf
$(PKG_BUILD_DIR)/tar/$($(PKG)_PKG_NAME)_$(PKG_PKG_VERSION)$(BIGTOP_BUILD_STAMP).orig.tar.gz;
\
    fi
    if [ -f $(BASE_DIR)/bigtop-packages/src/common/$($(PKG)_NAME)/series ];
then    \
      PATCHES="`cat
$(BASE_DIR)/bigtop-packages/src/common/$($(PKG)_NAME)/series`" ;\
    elif [ -f $(BASE_DIR)/bigtop-packages/src/common/$($(PKG)_NAME)/*patch*];
then   \

PATCHES="patch"
;\
    else


My question is if i create patch named directory under bigtop at following
locations for hadoop , then would bigtop apply all patches in patch
directory to build ?

/home/jj/source/bigtop/bigtop/bigtop-packages/src/common/hadoop/*patch*

I created manually the patch directory and copied the patch from Apache
jira to this directory/

Second question

If i want to build without downloading new tar from net , how can i tell
bigtop to not to download and use existing.

Thanks in advance.

Re: Building bigtop with patches

Posted by Roman Shaposhnik <rv...@apache.org>.
To pile on. There's also a somewhat related JIRA over here:
    https://issues.apache.org/jira/browse/BIGTOP-848

Thanks,
Roman.

On Wed, Mar 6, 2013 at 10:56 PM, Bruno Mahé <bm...@apache.org> wrote:
> On 03/01/2013 05:34 PM, Jagat Singh wrote:
>>
>> Hello Roman,
>>
>> Thank you for your answers.
>>
>> I was trying to make hadoop deb with few patches and was wondering why
>> its not working :)
>>
>> And now i know that with dep , rpm packages patches wont be picked from
>> patch folder. However if i want tar then i would get patches applied.
>>
>> Any suggestions for making patched deb ?
>>
>> Thanks once again.
>>
>>
>
> Hi Jagat,
>
> Sorry for the late reply and hope you fixed your issue by now, but in case
> you still need an answer, you can look at
> https://github.com/apache/bigtop/commit/d2d1df918406774ae3ad2489de4e2eccf8e54634
>
> This coommit *remove* a patch to build. So the interested parts are in red.
>
> Feel free to let us know if you need more information.
>
> Thanks,
> Bruno
>

Re: Building bigtop with patches

Posted by Bruno Mahé <bm...@apache.org>.
On 03/01/2013 05:34 PM, Jagat Singh wrote:
> Hello Roman,
>
> Thank you for your answers.
>
> I was trying to make hadoop deb with few patches and was wondering why
> its not working :)
>
> And now i know that with dep , rpm packages patches wont be picked from
> patch folder. However if i want tar then i would get patches applied.
>
> Any suggestions for making patched deb ?
>
> Thanks once again.
>
>

Hi Jagat,

Sorry for the late reply and hope you fixed your issue by now, but in 
case you still need an answer, you can look at 
https://github.com/apache/bigtop/commit/d2d1df918406774ae3ad2489de4e2eccf8e54634

This coommit *remove* a patch to build. So the interested parts are in red.

Feel free to let us know if you need more information.

Thanks,
Bruno


Re: Building bigtop with patches

Posted by Jagat Singh <ja...@gmail.com>.
Hello Roman,

Thank you for your answers.

I was trying to make hadoop deb with few patches and was wondering why its
not working :)

And now i know that with dep , rpm packages patches wont be picked from
patch folder. However if i want tar then i would get patches applied.

Any suggestions for making patched deb ?

Thanks once again.



On Sat, Mar 2, 2013 at 11:54 AM, Roman Shaposhnik <ro...@shaposhnik.org>wrote:

> Hi Jagat!
>
> On Wed, Feb 27, 2013 at 12:50 AM, Jagat Singh <ja...@gmail.com>
> wrote:
> > Hi,
> >
> > I am looking at building bigtop with patches from few Jira under review
> at
> > apache.
> >
> > I saw in
> >
> > /home/jj/source/bigtop/bigtop/package.mk
> >
> >
> > # Untar and patch
> > $(BUILD_DIR)/%/.tar:
> >     -rm -rf $(PKG_BUILD_DIR)/tar/
> >     mkdir -p
> >
> $(PKG_BUILD_DIR)/tar/$($(PKG)_NAME)-$(PKG_PKG_VERSION)$(BIGTOP_BUILD_STAMP)
> >     if [ -n "$($(PKG)_TARBALL_SRC)" ]; then \
> >       cp $($(PKG)_DOWNLOAD_DST)
> >
> $(PKG_BUILD_DIR)/tar/$($(PKG)_PKG_NAME)_$(PKG_PKG_VERSION)$(BIGTOP_BUILD_STAMP).orig.tar.gz
> > ;\
> >       tar -C
> >
> $(PKG_BUILD_DIR)/tar/$($(PKG)_NAME)-$(PKG_PKG_VERSION)$(BIGTOP_BUILD_STAMP)
> > \
> >               --strip-components 1 -xzvf
> >
> $(PKG_BUILD_DIR)/tar/$($(PKG)_PKG_NAME)_$(PKG_PKG_VERSION)$(BIGTOP_BUILD_STAMP).orig.tar.gz;
> > \
> >     fi
> >     if [ -f $(BASE_DIR)/bigtop-packages/src/common/$($(PKG)_NAME)/series
> ];
> > then    \
> >       PATCHES="`cat
> > $(BASE_DIR)/bigtop-packages/src/common/$($(PKG)_NAME)/series`" ;\
> >     elif [ -f
> $(BASE_DIR)/bigtop-packages/src/common/$($(PKG)_NAME)/patch ];
> > then   \
> >       PATCHES="patch"
> > ;\
> >     else
> >
> >
> > My question is if i create patch named directory under bigtop at
> following
> > locations for hadoop , then would bigtop apply all patches in patch
> > directory to build ?
>
> It will, but those patches won't get pull into the packages. What you
> see in the makefile was a quick hack to enable us building patched
> tarballs. IOW, if you type:
>      $ make [component]-tar
> you'll get a build of a patched tarball, but if you type:
>      $ maek foo-rpm
> you will NOT get those patches into the RPM.
>
> The reason for that is that it would be nice to tie-in into the
> package specific patch management systems (quilt, etc)
> but we haven't had time for that.
>
> Would love to receive the patches though!
>
> > Second question
> >
> > If i want to build without downloading new tar from net , how can i tell
> > bigtop to not to download and use existing.
>
> It actually caches everything in the dl subdirectory. Make pays attention
> to the file called .download which means if you touch it -- it would assume
> that the tarball is already in place. E.g.:
>     $ touch build/[component]/.download
>
> Thanks,
> Roman.
>

Re: Building bigtop with patches

Posted by Roman Shaposhnik <ro...@shaposhnik.org>.
Hi Jagat!

On Wed, Feb 27, 2013 at 12:50 AM, Jagat Singh <ja...@gmail.com> wrote:
> Hi,
>
> I am looking at building bigtop with patches from few Jira under review at
> apache.
>
> I saw in
>
> /home/jj/source/bigtop/bigtop/package.mk
>
>
> # Untar and patch
> $(BUILD_DIR)/%/.tar:
>     -rm -rf $(PKG_BUILD_DIR)/tar/
>     mkdir -p
> $(PKG_BUILD_DIR)/tar/$($(PKG)_NAME)-$(PKG_PKG_VERSION)$(BIGTOP_BUILD_STAMP)
>     if [ -n "$($(PKG)_TARBALL_SRC)" ]; then \
>       cp $($(PKG)_DOWNLOAD_DST)
> $(PKG_BUILD_DIR)/tar/$($(PKG)_PKG_NAME)_$(PKG_PKG_VERSION)$(BIGTOP_BUILD_STAMP).orig.tar.gz
> ;\
>       tar -C
> $(PKG_BUILD_DIR)/tar/$($(PKG)_NAME)-$(PKG_PKG_VERSION)$(BIGTOP_BUILD_STAMP)
> \
>               --strip-components 1 -xzvf
> $(PKG_BUILD_DIR)/tar/$($(PKG)_PKG_NAME)_$(PKG_PKG_VERSION)$(BIGTOP_BUILD_STAMP).orig.tar.gz;
> \
>     fi
>     if [ -f $(BASE_DIR)/bigtop-packages/src/common/$($(PKG)_NAME)/series ];
> then    \
>       PATCHES="`cat
> $(BASE_DIR)/bigtop-packages/src/common/$($(PKG)_NAME)/series`" ;\
>     elif [ -f $(BASE_DIR)/bigtop-packages/src/common/$($(PKG)_NAME)/patch ];
> then   \
>       PATCHES="patch"
> ;\
>     else
>
>
> My question is if i create patch named directory under bigtop at following
> locations for hadoop , then would bigtop apply all patches in patch
> directory to build ?

It will, but those patches won't get pull into the packages. What you
see in the makefile was a quick hack to enable us building patched
tarballs. IOW, if you type:
     $ make [component]-tar
you'll get a build of a patched tarball, but if you type:
     $ maek foo-rpm
you will NOT get those patches into the RPM.

The reason for that is that it would be nice to tie-in into the
package specific patch management systems (quilt, etc)
but we haven't had time for that.

Would love to receive the patches though!

> Second question
>
> If i want to build without downloading new tar from net , how can i tell
> bigtop to not to download and use existing.

It actually caches everything in the dl subdirectory. Make pays attention
to the file called .download which means if you touch it -- it would assume
that the tarball is already in place. E.g.:
    $ touch build/[component]/.download

Thanks,
Roman.