Skip to contentSkip to conversation

<pkg>-rsync: exclude version control files

PATCH New Thomas De Schampheleire 4 participants 7 messages Mar 1, 2013 – Mar 17, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 <pkg>-rsync: exclude version control files

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.

---
 package/pkg-generic.mk |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
package/pkg-generic.mk +1 -1
@@ -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
#1 lore raw

PATCH 1/1 <pkg>-rsync: exclude version control files

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas De Schampheleire <[email protected]> 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 <[email protected]>

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

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw

PATCH 1/1 <pkg>-rsync: exclude version control files

Quoted 7 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas De Schampheleire <[email protected]> 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.

Quoted 8 lines

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

#3 lore raw

PATCH 1/1 <pkg>-rsync: exclude version control files

In reply to Peter Korsgaard
Quoted 6 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas De Schampheleire<[email protected]> 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.

Quoted 8 lines

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

Signature · 6 lines
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
#4 lore raw

PATCH 1/1 <pkg>-rsync: exclude version control files

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle <[email protected]> writes:

Hi,

Quoted 2 lines
Quoted 2 lines

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?

Signature · 1 line
Bye, Peter Korsgaard
#5 lore raw

PATCH 1/1 <pkg>-rsync: exclude version control files

Dear Peter Korsgaard,

Quoted 4 lines · Peter Korsgaard

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

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#6 lore raw

PATCH 1/1 <pkg>-rsync: exclude version control files

In reply to Thomas De Schampheleire
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas De Schampheleire <[email protected]> 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.

Signature · 1 line
Bye, Peter Korsgaard