From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] support/download: protect from custom commands with spaces in args
Date: Sun, 24 Jan 2016 16:49:21 +0100 [thread overview]
Message-ID: <20160124154921.GC3405@free.fr> (raw)
In-Reply-To: <20160124020636.GA1387@jack.zhora.eu>
Andi, All,
On 2016-01-24 11:06 +0900, Andi Shyti spake thusly:
> > Some users may provide custom download commands with spaces in their
> > arguments, like so:
> > BR2_HG="hg --config foo.bar='some space-separated value'"
>
> this patch is breaking the build. With configs like this:
>
> BR2_LINUX_KERNEL=y
> BR2_LINUX_KERNEL_CUSTOM_GIT=y
> BR2_LINUX_KERNEL_CUSTOM_REPO_URL="git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"
> BR2_LINUX_KERNEL_DEFCONFIG="exynos"
> BR2_LINUX_KERNEL_DTS_SUPPORT=y
> BR2_LINUX_KERNEL_INTREE_DTS_NAME="exynos5422-odroidxu4"
You forgot to specify a kernel version here, which is the ultimate
reason for the failure.
It does not make sense to use a git tree without specifying either a tag
or a sha1 to checkout.
> the command sent is:
>
> git clone --mirror 'git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git' ''
>
> git dosn't like empty strngs and provides this output:
>
> fatal: The empty string is not a valid path
>
> Besides, I have never seen spaces in branch name, repositories
> names and it is quite a corner case. I think this patch should be
> reverted (at least) in the case of git.
No, the patch is correct. What we should however check is that the
version string is not empty, and bail out on that error instead.
Somehow, when the user forgets to specify a version string, we call the
download scripts with no basename, and the empty string you see in the
git call above should have been the basename of the directory to clone
into, i.e. something like: linux-VERSION/
Care to have a look into that? ;-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2016-01-24 15:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-07 9:26 [Buildroot] [PATCH] support/download: protect from custom commands with spaces in args Yann E. MORIN
2015-12-11 10:06 ` Thomas De Schampheleire
2015-12-12 16:01 ` Thomas Petazzoni
[not found] ` <20160124020636.GA1387@jack.zhora.eu>
2016-01-24 15:49 ` Yann E. MORIN [this message]
2016-01-25 12:45 ` Andi Shyti
2016-01-25 13:19 ` Thomas De Schampheleire
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160124154921.GC3405@free.fr \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox