Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Why not perform a shallow clone?
@ 2016-02-24 19:30 Patrick Doyle
  2016-02-24 19:36 ` Baruch Siach
  2016-02-24 19:41 ` Samuel Martin
  0 siblings, 2 replies; 7+ messages in thread
From: Patrick Doyle @ 2016-02-24 19:30 UTC (permalink / raw)
  To: buildroot

So I'm sitting here watching my buildroot make do a complete clone of
the Linux kernel, where I have told it that I want a specific sha1
commit and I started wondering...

Why not do a shallow clone?

Has it been tried?  Is it a bad idea?

--wpd

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

* [Buildroot] Why not perform a shallow clone?
  2016-02-24 19:30 [Buildroot] Why not perform a shallow clone? Patrick Doyle
@ 2016-02-24 19:36 ` Baruch Siach
  2016-02-24 19:41 ` Samuel Martin
  1 sibling, 0 replies; 7+ messages in thread
From: Baruch Siach @ 2016-02-24 19:36 UTC (permalink / raw)
  To: buildroot

Hi Patrick,

On Wed, Feb 24, 2016 at 02:30:58PM -0500, Patrick Doyle wrote:
> So I'm sitting here watching my buildroot make do a complete clone of
> the Linux kernel, where I have told it that I want a specific sha1
> commit and I started wondering...
> 
> Why not do a shallow clone?
> 
> Has it been tried?  Is it a bad idea?

Quoting the support/download/git script:

# Try a shallow clone, since it is faster than a full clone - but that only
# works if the version is a ref (tag or branch). Before trying to do a shallow
# clone we check if ${cset} is in the list provided by git ls-remote. If not
# we fall back on a full clone.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

* [Buildroot] Why not perform a shallow clone?
  2016-02-24 19:30 [Buildroot] Why not perform a shallow clone? Patrick Doyle
  2016-02-24 19:36 ` Baruch Siach
@ 2016-02-24 19:41 ` Samuel Martin
  2016-02-24 19:50   ` Patrick Doyle
  1 sibling, 1 reply; 7+ messages in thread
From: Samuel Martin @ 2016-02-24 19:41 UTC (permalink / raw)
  To: buildroot

Hi,

On Wed, Feb 24, 2016 at 8:30 PM, Patrick Doyle <wpdster@gmail.com> wrote:
> So I'm sitting here watching my buildroot make do a complete clone of
> the Linux kernel, where I have told it that I want a specific sha1
> commit and I started wondering...
>
> Why not do a shallow clone?
It tries, but cannot (see
https://git.buildroot.org/buildroot/tree/support/download/git#n34)

>
> Has it been tried?  Is it a bad idea?
Yes, and no ;-)

Regards,

-- 
Samuel

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

* [Buildroot] Why not perform a shallow clone?
  2016-02-24 19:41 ` Samuel Martin
@ 2016-02-24 19:50   ` Patrick Doyle
  2016-02-24 20:18     ` Patrick Doyle
  0 siblings, 1 reply; 7+ messages in thread
From: Patrick Doyle @ 2016-02-24 19:50 UTC (permalink / raw)
  To: buildroot

On Wed, Feb 24, 2016 at 2:41 PM, Samuel Martin <s.martin49@gmail.com> wrote:
> Hi,
>
> On Wed, Feb 24, 2016 at 8:30 PM, Patrick Doyle <wpdster@gmail.com> wrote:
>> So I'm sitting here watching my buildroot make do a complete clone of
>> the Linux kernel, where I have told it that I want a specific sha1
>> commit and I started wondering...
>>
>> Why not do a shallow clone?
> It tries, but cannot (see
> https://git.buildroot.org/buildroot/tree/support/download/git#n34)
>
Oh bummer...

I wonder why git-clone -b doesn't accept a sha1sum.  Oh well.


So how do you folks handle pinning a revision of, for example, the
kernel?  I naively assumed that I would specify
BR2_LINUX_KERNEL_CUSTOM_REPO_URL and
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION, which appears to do what I want,
but it seems wasteful to have to clone the whole Linux repo just to
get that one clone.

I suppose I could tell menuconfig that the (Atmel) kernel I am cloning
is available on github somehow and have the magic "fetch a sha1sum
from github" work.  I'll go think about that for a bit.

--wpd

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

* [Buildroot] Why not perform a shallow clone?
  2016-02-24 19:50   ` Patrick Doyle
@ 2016-02-24 20:18     ` Patrick Doyle
  2016-02-24 21:25       ` Arnout Vandecappelle
  0 siblings, 1 reply; 7+ messages in thread
From: Patrick Doyle @ 2016-02-24 20:18 UTC (permalink / raw)
  To: buildroot

On Wed, Feb 24, 2016 at 2:50 PM, Patrick Doyle <wpdster@gmail.com> wrote:
> On Wed, Feb 24, 2016 at 2:41 PM, Samuel Martin <s.martin49@gmail.com> wrote:
>> Hi,
>>
>> On Wed, Feb 24, 2016 at 8:30 PM, Patrick Doyle <wpdster@gmail.com> wrote:
>>> So I'm sitting here watching my buildroot make do a complete clone of
>>> the Linux kernel, where I have told it that I want a specific sha1
>>> commit and I started wondering...
>>>
>>> Why not do a shallow clone?
>> It tries, but cannot (see
>> https://git.buildroot.org/buildroot/tree/support/download/git#n34)
>>
> Oh bummer...
>
> I wonder why git-clone -b doesn't accept a sha1sum.  Oh well.
Oh, here's the answer (from
http://thread.gmane.org/gmane.comp.version-control.git/115811):

> Is there a way to fetch based on SHA id's instead of named references?

No, out of security concerns;  imagine you included some proprietary
source code by mistake, and undo the damage by forcing a push with a
branch that does not have the incriminating code.  Usually you do not
control the garbage-collection on the server, yet you still do not want
other people to fetch "by SHA-1".

Oh well.

>
>
> So how do you folks handle pinning a revision of, for example, the
> kernel?  I naively assumed that I would specify
> BR2_LINUX_KERNEL_CUSTOM_REPO_URL and
> BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION, which appears to do what I want,
> but it seems wasteful to have to clone the whole Linux repo just to
> get that one clone.
>
> I suppose I could tell menuconfig that the (Atmel) kernel I am cloning
> is available on github somehow and have the magic "fetch a sha1sum
> from github" work.  I'll go think about that for a bit.

No, that doesn't seem to work either.  linux.mk doesn't use $(call
github).  Oh well.

I suppose I could add support for that... does that seem useful to
folks other than I?

--wpd

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

* [Buildroot] Why not perform a shallow clone?
  2016-02-24 20:18     ` Patrick Doyle
@ 2016-02-24 21:25       ` Arnout Vandecappelle
  2016-02-24 21:35         ` Patrick Doyle
  0 siblings, 1 reply; 7+ messages in thread
From: Arnout Vandecappelle @ 2016-02-24 21:25 UTC (permalink / raw)
  To: buildroot

On 02/24/16 21:18, Patrick Doyle wrote:
> On Wed, Feb 24, 2016 at 2:50 PM, Patrick Doyle <wpdster@gmail.com> wrote:
[snip]
>> I suppose I could tell menuconfig that the (Atmel) kernel I am cloning
>> is available on github somehow and have the magic "fetch a sha1sum
>> from github" work.  I'll go think about that for a bit.
> 
> No, that doesn't seem to work either.  linux.mk doesn't use $(call
> github).  Oh well.

 $(call github) is not really needed, you can just use the actual URL in your
config: https://github.com/<project>/<repo>/archive/<version>/<version>.tar.gz


 Regards,
 Arnout

> 
> I suppose I could add support for that... does that seem useful to
> folks other than I?
> 
> --wpd
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
> 


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] Why not perform a shallow clone?
  2016-02-24 21:25       ` Arnout Vandecappelle
@ 2016-02-24 21:35         ` Patrick Doyle
  0 siblings, 0 replies; 7+ messages in thread
From: Patrick Doyle @ 2016-02-24 21:35 UTC (permalink / raw)
  To: buildroot

On Wed, Feb 24, 2016 at 4:25 PM, Arnout Vandecappelle <arnout@mind.be> wrote:
> On 02/24/16 21:18, Patrick Doyle wrote:
>> On Wed, Feb 24, 2016 at 2:50 PM, Patrick Doyle <wpdster@gmail.com> wrote:
>> No, that doesn't seem to work either.  linux.mk doesn't use $(call
>> github).  Oh well.
>
>  $(call github) is not really needed, you can just use the actual URL in your
> config: https://github.com/<project>/<repo>/archive/<version>/<version>.tar.gz
>
Oh, that's clever!  Thank you very much!

--wpd

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

end of thread, other threads:[~2016-02-24 21:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-24 19:30 [Buildroot] Why not perform a shallow clone? Patrick Doyle
2016-02-24 19:36 ` Baruch Siach
2016-02-24 19:41 ` Samuel Martin
2016-02-24 19:50   ` Patrick Doyle
2016-02-24 20:18     ` Patrick Doyle
2016-02-24 21:25       ` Arnout Vandecappelle
2016-02-24 21:35         ` Patrick Doyle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox