Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] <pkg>-rsync: exclude version control files
@ 2013-03-01 20:26 Thomas De Schampheleire
  2013-03-04 20:04 ` Peter Korsgaard
  2013-03-17 13:41 ` Peter Korsgaard
  0 siblings, 2 replies; 7+ messages in thread
From: Thomas De Schampheleire @ 2013-03-01 20:26 UTC (permalink / raw)
  To: buildroot

When using rsync to import package sources (typically with
PKG_OVERRIDE_SRCDIR), it often happens that these external sources
are under version control, and contain directories like .git,
.hg, etc.

Depending on the project, these directories can become pretty large
and typically have a lot of files. Moreover, they are not necessary
in the context of building the package. Therefore, this commit adds
the --cvs-exclude option to the rsync call, saving both disk space
and sync time.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

---
 package/pkg-generic.mk |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -62,7 +62,7 @@ endif
 $(BUILD_DIR)/%/.stamp_rsynced:
 	@$(call MESSAGE,"Syncing from source dir $(SRCDIR)")
 	@test -d $(SRCDIR) || (echo "ERROR: $(SRCDIR) does not exist" ; exit 1)
-	rsync -au $(SRCDIR)/ $(@D)
+	rsync -au --cvs-exclude $(SRCDIR)/ $(@D)
 	$(Q)touch $@
 
 # Handle the SOURCE_CHECK and SHOW_EXTERNAL_DEPS cases for rsynced

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

* [Buildroot] [PATCH] <pkg>-rsync: exclude version control files
  2013-03-01 20:26 [Buildroot] [PATCH] <pkg>-rsync: exclude version control files Thomas De Schampheleire
@ 2013-03-04 20:04 ` Peter Korsgaard
  2013-03-04 20:15   ` Thomas De Schampheleire
  2013-03-06 17:47   ` Arnout Vandecappelle
  2013-03-17 13:41 ` Peter Korsgaard
  1 sibling, 2 replies; 7+ messages in thread
From: Peter Korsgaard @ 2013-03-04 20:04 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> writes:

 Thomas> When using rsync to import package sources (typically with
 Thomas> PKG_OVERRIDE_SRCDIR), it often happens that these external sources
 Thomas> are under version control, and contain directories like .git,
 Thomas> .hg, etc.

 Thomas> Depending on the project, these directories can become pretty large
 Thomas> and typically have a lot of files. Moreover, they are not necessary
 Thomas> in the context of building the package. Therefore, this commit adds
 Thomas> the --cvs-exclude option to the rsync call, saving both disk space
 Thomas> and sync time.

I don't personally use this, but doesn't that break stuff using the
version info (like E.G. the kernel storing the git id)?


 Thomas> Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>

 Thomas> ---
 Thomas>  package/pkg-generic.mk |  2 +-
 Thomas>  1 files changed, 1 insertions(+), 1 deletions(-)

 Thomas> diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
 Thomas> --- a/package/pkg-generic.mk
 Thomas> +++ b/package/pkg-generic.mk
 Thomas> @@ -62,7 +62,7 @@ endif
 Thomas>  $(BUILD_DIR)/%/.stamp_rsynced:
 Thomas>  	@$(call MESSAGE,"Syncing from source dir $(SRCDIR)")
 Thomas>  	@test -d $(SRCDIR) || (echo "ERROR: $(SRCDIR) does not exist" ; exit 1)
 Thomas> -	rsync -au $(SRCDIR)/ $(@D)
 Thomas> +	rsync -au --cvs-exclude $(SRCDIR)/ $(@D)
 Thomas>  	$(Q)touch $@
 
 Thomas>  # Handle the SOURCE_CHECK and SHOW_EXTERNAL_DEPS cases for rsynced
 Thomas> _______________________________________________
 Thomas> buildroot mailing list
 Thomas> buildroot at busybox.net
 Thomas> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH] <pkg>-rsync: exclude version control files
  2013-03-04 20:04 ` Peter Korsgaard
@ 2013-03-04 20:15   ` Thomas De Schampheleire
  2013-03-06 17:47   ` Arnout Vandecappelle
  1 sibling, 0 replies; 7+ messages in thread
From: Thomas De Schampheleire @ 2013-03-04 20:15 UTC (permalink / raw)
  To: buildroot

On Mon, Mar 4, 2013 at 9:04 PM, Peter Korsgaard <jacmet@uclibc.org> wrote:
>>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> writes:
>
>  Thomas> When using rsync to import package sources (typically with
>  Thomas> PKG_OVERRIDE_SRCDIR), it often happens that these external sources
>  Thomas> are under version control, and contain directories like .git,
>  Thomas> .hg, etc.
>
>  Thomas> Depending on the project, these directories can become pretty large
>  Thomas> and typically have a lot of files. Moreover, they are not necessary
>  Thomas> in the context of building the package. Therefore, this commit adds
>  Thomas> the --cvs-exclude option to the rsync call, saving both disk space
>  Thomas> and sync time.
>
> I don't personally use this, but doesn't that break stuff using the
> version info (like E.G. the kernel storing the git id)?

Hmm, it probably will. Are people actually relying on this when using local.mk?
I have always thought of local.mk to be a personal developer way of
working, not something you'd rely on for a real project. In these
cases, I'd define the version number in the defconfig.

Input from other users could be welcome here.
If needed, we can make this a configurable option?

Best regards,
Thomas

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

* [Buildroot] [PATCH] <pkg>-rsync: exclude version control files
  2013-03-04 20:04 ` Peter Korsgaard
  2013-03-04 20:15   ` Thomas De Schampheleire
@ 2013-03-06 17:47   ` Arnout Vandecappelle
  2013-03-10 22:45     ` Peter Korsgaard
  1 sibling, 1 reply; 7+ messages in thread
From: Arnout Vandecappelle @ 2013-03-06 17:47 UTC (permalink / raw)
  To: buildroot

On 03/04/13 21:04, Peter Korsgaard wrote:
>>>>>> >>>>>"Thomas" == Thomas De Schampheleire<patrickdepinguin+buildroot@gmail.com>  writes:
>   Thomas> When using rsync to import package sources (typically with
>   Thomas> PKG_OVERRIDE_SRCDIR), it often happens that these external sources
>   Thomas> are under version control, and contain directories like .git,
>   Thomas> .hg, etc.
>
>   Thomas> Depending on the project, these directories can become pretty large
>   Thomas> and typically have a lot of files. Moreover, they are not necessary
>   Thomas> in the context of building the package. Therefore, this commit adds
>   Thomas> the --cvs-exclude option to the rsync call, saving both disk space
>   Thomas> and sync time.
>
> I don't personally use this, but doesn't that break stuff using the
> version info (like E.G. the kernel storing the git id)?

  Depends on what you call breaking. The kernel will find buildroot's git 
ID, which is fine by me (that's of course assuming the output directory 
is a subdirectory of the buildroot directory). Or failing that, it will 
use the plain version number. The latter is actually what I prefer, 
because it means I can easily exchange modules with the non-OVERRIDE'n 
kernel.

  Regards,
  Arnout

-- 
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:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

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

* [Buildroot] [PATCH] <pkg>-rsync: exclude version control files
  2013-03-06 17:47   ` Arnout Vandecappelle
@ 2013-03-10 22:45     ` Peter Korsgaard
  2013-03-11 17:51       ` Thomas Petazzoni
  0 siblings, 1 reply; 7+ messages in thread
From: Peter Korsgaard @ 2013-03-10 22:45 UTC (permalink / raw)
  To: buildroot

>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

Hi,

 >> I don't personally use this, but doesn't that break stuff using the
 >> version info (like E.G. the kernel storing the git id)?

 Arnout>  Depends on what you call breaking. The kernel will find
 Arnout> buildroot's git ID, which is fine by me (that's of course
 Arnout> assuming the output directory is a subdirectory of the
 Arnout> buildroot directory). Or failing that, it will use the plain
 Arnout> version number. The latter is actually what I prefer, because
 Arnout> it means I can easily exchange modules with the non-OVERRIDE'n
 Arnout> kernel.

Ok, but it will atleast change the current behaviour, which people might
rely on..

What do others say?

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH] <pkg>-rsync: exclude version control files
  2013-03-10 22:45     ` Peter Korsgaard
@ 2013-03-11 17:51       ` Thomas Petazzoni
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2013-03-11 17:51 UTC (permalink / raw)
  To: buildroot

Dear Peter Korsgaard,

On Sun, 10 Mar 2013 23:45:13 +0100, Peter Korsgaard wrote:

> Ok, but it will atleast change the current behaviour, which people might
> rely on..
> 
> What do others say?

If the per-package out-of-tree stuff is merged, then in most cases,
it will no longer be needed to do this rsync, except for packages that
don't support out-of-tree build.

As far as the actual code goes, I would find it ok that the .git/.svn
stuff is not copied. It's pretty big, and 'breaks' only this very
specific 'commit ID' thing, so I would tend to agree with Thomas's
patch.

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

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

* [Buildroot] [PATCH] <pkg>-rsync: exclude version control files
  2013-03-01 20:26 [Buildroot] [PATCH] <pkg>-rsync: exclude version control files Thomas De Schampheleire
  2013-03-04 20:04 ` Peter Korsgaard
@ 2013-03-17 13:41 ` Peter Korsgaard
  1 sibling, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2013-03-17 13:41 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> writes:

 Thomas> When using rsync to import package sources (typically with
 Thomas> PKG_OVERRIDE_SRCDIR), it often happens that these external sources
 Thomas> are under version control, and contain directories like .git,
 Thomas> .hg, etc.

 Thomas> Depending on the project, these directories can become pretty large
 Thomas> and typically have a lot of files. Moreover, they are not necessary
 Thomas> in the context of building the package. Therefore, this commit adds
 Thomas> the --cvs-exclude option to the rsync call, saving both disk space
 Thomas> and sync time.

It seems the agreement is that people don't mind the missing
.git/.svn/.. files, so committed - Thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2013-03-17 13:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-01 20:26 [Buildroot] [PATCH] <pkg>-rsync: exclude version control files Thomas De Schampheleire
2013-03-04 20:04 ` Peter Korsgaard
2013-03-04 20:15   ` Thomas De Schampheleire
2013-03-06 17:47   ` Arnout Vandecappelle
2013-03-10 22:45     ` Peter Korsgaard
2013-03-11 17:51       ` Thomas Petazzoni
2013-03-17 13:41 ` Peter Korsgaard

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