* [Buildroot] [PATCH] core/pkg-generic: sanitise FOO_OVERRIDE_SRCDIR
@ 2015-06-28 12:27 Yann E. MORIN
2015-07-04 13:33 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Yann E. MORIN @ 2015-06-28 12:27 UTC (permalink / raw)
To: buildroot
In case FOO_OVERRIDE_SRCDIR has trailing spaces, like so:
FOO_OVERRIDE_SRCDIR = /path/to/sources\x20
we would end up with a rsync command like so:
rsync -au /path/to/sources / /path/to/build/foo
which would effectively rsync the whole vfs, eventually filling the
whole disk... :-(
So, just qstrip the variable before use.
Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
package/pkg-generic.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index d5b29f0..9fe01b8 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -102,7 +102,7 @@ $(BUILD_DIR)/%/.stamp_rsynced:
@$(call MESSAGE,"Syncing from source dir $(SRCDIR)")
@test -d $(SRCDIR) || (echo "ERROR: $(SRCDIR) does not exist" ; exit 1)
$(foreach hook,$($(PKG)_PRE_RSYNC_HOOKS),$(call $(hook))$(sep))
- rsync -au $(RSYNC_VCS_EXCLUSIONS) $(SRCDIR)/ $(@D)
+ rsync -au $(RSYNC_VCS_EXCLUSIONS) $(call qstrip,$(SRCDIR))/ $(@D)
$(foreach hook,$($(PKG)_POST_RSYNC_HOOKS),$(call $(hook))$(sep))
$(Q)touch $@
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] core/pkg-generic: sanitise FOO_OVERRIDE_SRCDIR
2015-06-28 12:27 [Buildroot] [PATCH] core/pkg-generic: sanitise FOO_OVERRIDE_SRCDIR Yann E. MORIN
@ 2015-07-04 13:33 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2015-07-04 13:33 UTC (permalink / raw)
To: buildroot
Dear Yann E. MORIN,
On Sun, 28 Jun 2015 14:27:29 +0200, Yann E. MORIN wrote:
> In case FOO_OVERRIDE_SRCDIR has trailing spaces, like so:
> FOO_OVERRIDE_SRCDIR = /path/to/sources\x20
>
> we would end up with a rsync command like so:
> rsync -au /path/to/sources / /path/to/build/foo
>
> which would effectively rsync the whole vfs, eventually filling the
> whole disk... :-(
>
> So, just qstrip the variable before use.
>
> Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> ---
> package/pkg-generic.mk | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-04 13:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-28 12:27 [Buildroot] [PATCH] core/pkg-generic: sanitise FOO_OVERRIDE_SRCDIR Yann E. MORIN
2015-07-04 13:33 ` Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox