From: Yann E. MORIN Date: Sun, 28 Jun 2015 12:27:29 +0000 (+0200) Subject: core/pkg-generic: sanitise FOO_OVERRIDE_SRCDIR X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ee435eb3f36999dbe55af8dd6aeb82d0abc517b6;p=buildroot.git core/pkg-generic: sanitise FOO_OVERRIDE_SRCDIR 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 Signed-off-by: "Yann E. MORIN" Signed-off-by: Thomas Petazzoni --- diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index d5b29f0821..9fe01b8d4d 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 $@