All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Is it possible to override a package from git?
@ 2014-07-09  7:13 Marco Pastorelli
  2014-07-09  7:33 ` Luca Ceresoli
  0 siblings, 1 reply; 4+ messages in thread
From: Marco Pastorelli @ 2014-07-09  7:13 UTC (permalink / raw)
  To: buildroot

Hi everybody,

I fetch my personal packages from my git repo specifying the tag.
Now I would like to set up a nightly build system, so I need to download
the HEAD of my packages repo instead of a specific tag.

Is there a way to override the tag?

Thanks,
Best regards.

Marco.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140709/8565ea17/attachment.html>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] Is it possible to override a package from git?
  2014-07-09  7:13 [Buildroot] Is it possible to override a package from git? Marco Pastorelli
@ 2014-07-09  7:33 ` Luca Ceresoli
  2014-07-09  9:05   ` Jérôme Pouiller
  0 siblings, 1 reply; 4+ messages in thread
From: Luca Ceresoli @ 2014-07-09  7:33 UTC (permalink / raw)
  To: buildroot

Dear Marco,

Marco Pastorelli wrote:
> Hi everybody,
>
> I fetch my personal packages from my git repo specifying the tag.
> Now I would like to set up a nightly build system, so I need to download
> the HEAD of my packages repo instead of a specific tag.
>
> Is there a way to override the tag?

You can, although this requires some manual tweaking because it is not
typical.

It is not typical because Buildroot is generally meant to perform
reproducible builds. So it is usual to fetch a tag or SHA-1 from git
repos.

However in a nightly build system it can make sense.

To do that, you should set <MYPKG>_VERSION to a branch name. For
example <MYPKG>_VERSION=master.

You can do it also on the command line, without touching your source
code:
   make my_defconfig
   make <MYPKG>_VERSION=master

This will fetch the top of the master branch, not a specific tag.

However, when you build the next time, Buildroot will already find
<mypkg>-master.tar.gz in the downloaded sourced directory and will not
download it again. So before building you have to remove that archive
(or the whole download directory).

You'll also need to remove the output/build/<mypkg>-master/ directory,
or Buildroot will think it already has the sources for the "master"
version extracted and won't extract them again.

In a nutshell, if you're building in-tree:
   rm -f <my_download_dir>/<mypkg>-master.tar.gz            [*]
   make my_defconfig
   make <MYPKG>_VERSION=master <mypkg>-dirclean all

-- 
Luca

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] Is it possible to override a package from git?
  2014-07-09  7:33 ` Luca Ceresoli
@ 2014-07-09  9:05   ` Jérôme Pouiller
  2014-07-09 14:55     ` Marco Pastorelli
  0 siblings, 1 reply; 4+ messages in thread
From: Jérôme Pouiller @ 2014-07-09  9:05 UTC (permalink / raw)
  To: buildroot

Hello Luca, Marco,

On Wednesday 09 July 2014 09:33:07 Luca Ceresoli wrote:
[...]
> However, when you build the next time, Buildroot will already find
> <mypkg>-master.tar.gz in the downloaded sourced directory and will not
> download it again. So before building you have to remove that archive
> (or the whole download directory).
> 
> You'll also need to remove the output/build/<mypkg>-master/ directory,
> or Buildroot will think it already has the sources for the "master"
> version extracted and won't extract them again.
> 
> In a nutshell, if you're building in-tree:
>    rm -f <my_download_dir>/<mypkg>-master.tar.gz            [*]
>    make my_defconfig
>    make <MYPKG>_VERSION=master <mypkg>-dirclean all
You may avoid ths complexity by retreiving commit id of HEAD (also work for 
branches):

  ID=$(git ls-remote <GIT_REPO> HEAD | cut -f 1)
  make my_defconfig
  make <MYPKG>_VERSION=$ID all




-- 
J?r?me Pouiller, Sysmic
Embedded Linux specialist
http://www.sysmic.fr

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] Is it possible to override a package from git?
  2014-07-09  9:05   ` Jérôme Pouiller
@ 2014-07-09 14:55     ` Marco Pastorelli
  0 siblings, 0 replies; 4+ messages in thread
From: Marco Pastorelli @ 2014-07-09 14:55 UTC (permalink / raw)
  To: buildroot

Luca, J?r?me,

this is a graceful solution,
thank you so much!

Marco.


2014-07-09 11:05 GMT+02:00 J?r?me Pouiller <jezz@sysmic.org>:

> Hello Luca, Marco,
>
> On Wednesday 09 July 2014 09:33:07 Luca Ceresoli wrote:
> [...]
> > However, when you build the next time, Buildroot will already find
> > <mypkg>-master.tar.gz in the downloaded sourced directory and will not
> > download it again. So before building you have to remove that archive
> > (or the whole download directory).
> >
> > You'll also need to remove the output/build/<mypkg>-master/ directory,
> > or Buildroot will think it already has the sources for the "master"
> > version extracted and won't extract them again.
> >
> > In a nutshell, if you're building in-tree:
> >    rm -f <my_download_dir>/<mypkg>-master.tar.gz            [*]
> >    make my_defconfig
> >    make <MYPKG>_VERSION=master <mypkg>-dirclean all
> You may avoid ths complexity by retreiving commit id of HEAD (also work for
> branches):
>
>   ID=$(git ls-remote <GIT_REPO> HEAD | cut -f 1)
>   make my_defconfig
>   make <MYPKG>_VERSION=$ID all
>
>
>
>
> --
> J?r?me Pouiller, Sysmic
> Embedded Linux specialist
> http://www.sysmic.fr
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140709/334de696/attachment.html>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-09 14:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-09  7:13 [Buildroot] Is it possible to override a package from git? Marco Pastorelli
2014-07-09  7:33 ` Luca Ceresoli
2014-07-09  9:05   ` Jérôme Pouiller
2014-07-09 14:55     ` Marco Pastorelli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.