linux/linux.mk: added https:// pattern for kernel patches
PATCH 1/2 linux/linux.mk: added https:// pattern for kernel patches
Patches located at https:// scheme URL were threated as directories, causing build failures.
Fixed by adding https:// pattern.
--- linux/linux.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
linux/linux.mk +2 -2
@@ -147,7 +147,7 @@ endif # BR2_LINUX_KERNEL_VMLINUX define LINUX_DOWNLOAD_PATCHES $(if $(LINUX_PATCHES), @$(call MESSAGE,"Download additional patches")) - $(foreach patch,$(filter ftp://% http://%,$(LINUX_PATCHES)),\ + $(foreach patch,$(filter ftp://% http://% https://%,$(LINUX_PATCHES)),\ $(call DOWNLOAD,$(patch))$(sep)) endef
@@ -155,7 +155,7 @@ LINUX_POST_DOWNLOAD_HOOKS += LINUX_DOWNLOAD_PATCHES define LINUX_APPLY_PATCHES for p in $(LINUX_PATCHES) ; do \ - if echo $$p | grep -q -E "^ftp://|^http://" ; then \ + if echo $$p | grep -q -E "^ftp://|^http://|^https://" ; then \ $(APPLY_PATCHES) $(@D) $(DL_DIR) `basename $$p` ; \ elif test -d $$p ; then \ $(APPLY_PATCHES) $(@D) $$p linux-\*.patch ; \
Signature · 1 line
1.7.10.4
PATCH 2/2 linux/linux.mk: fixed downloading kernel patches
Patches located at ftp or http(s) URLs were downloaded using DOWNLOAD macro. For example, if linux source was located at external git repository, DOWNLOAD macro uses git scheme as well and buildroot tried to downlod a path using DOWNLOAD_GIT macro. As a result, nothing was downloaded and build siletly passes.
Patches located at mentioned URLs is now downloaded directly with DOWNLOAD_WGET macro.
--- linux/linux.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
linux/linux.mk +1 -1
@@ -148,7 +148,7 @@ define LINUX_DOWNLOAD_PATCHES $(if $(LINUX_PATCHES), @$(call MESSAGE,"Download additional patches")) $(foreach patch,$(filter ftp://% http://% https://%,$(LINUX_PATCHES)),\ - $(call DOWNLOAD,$(patch))$(sep)) + $(call DOWNLOAD_WGET,$(patch),$(notdir $(patch)))$(sep)) endef LINUX_POST_DOWNLOAD_HOOKS += LINUX_DOWNLOAD_PATCHES
Signature · 1 line
1.7.10.4
PATCH 2/2 linux/linux.mk: fixed downloading kernel patches
Ivo, All,
On 2015-01-12 17:37 +0100, Ivo Slanina spake thusly:
Quoted 5 lines
Patches located at ftp or http(s) URLs were downloaded using DOWNLOAD macro. For example, if linux source was located at external git repository, DOWNLOAD macro uses git scheme as well and buildroot tried to downlod a path using
DOWNLOAD_GITmacro. As a result, nothing was downloaded and build siletly passes.
I had a hard time understanding how that would be possible. So I'll write it here so we're sure we're speaking about the same thing. If you set your options to:
BR2_LINUX_KERNEL_CUSTOM_GIT=y
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="http://foo/bar/buz.git"
BR2_LINUX_KERNEL_PATCH="http://foo/bar/buz.patch"Then this is translated in the code as:
[linux/linux.mk]
else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y)
LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL))
LINUX_SITE_METHOD = git
else [...]which means _SITE_METHOD is set to git, and thus our DOWNLOAD_INNER macro relies on this to decide how to do the download:
[package/pkg-download]
if test -z "$($(PKG)_SITE_METHOD)" ; then \
scheme="$(call geturischeme,$(1))" ; \
else \
scheme="$($(PKG)_SITE_METHOD)" ; \
fi ; \So, this sounds legit, indeed.
However, I'm not too fond that we directly use the internal download macros. But I guess since we ecplicitly filter on schemes wget understands, that's pretty OK.
Which still prompts a question: what if the user has patches he want to download via scp? We do not handle this case for now, right. Should we?
Regards,
Yann E. MORIN.
Quoted 28 lines
Patches located at mentioned URLs is now downloaded directly with
DOWNLOAD_WGETmacro.Signed-off-by Ivo Slanina <[email protected]>--- linux/linux.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)linux/linux.mk +1
-1@@ -148,7 +148,7 @@ define LINUX_DOWNLOAD_PATCHES $(if $(LINUX_PATCHES), @$(call MESSAGE,"Download additional patches")) $(foreach patch,$(filter ftp://% http://% https://%,$(LINUX_PATCHES)),\ - $(call DOWNLOAD,$(patch))$(sep)) + $(call DOWNLOAD_WGET,$(patch),$(notdir $(patch)))$(sep)) endef LINUX_POST_DOWNLOAD_HOOKS += LINUX_DOWNLOAD_PATCHESSignature · 6 lines
1.7.10.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 2/2 linux/linux.mk: fixed downloading kernel patches
Dear Yann Morin,
Quoted 34 lines · Yann E. MORIN
Ivo, All,
On 2015-01-12 17:37 +0100, Ivo Slanina spake thusly:Quoted 5 lines
Patches located at ftp or http(s) URLs were downloaded using DOWNLOAD macro. For example, if linux source was located at external git repository, DOWNLOAD macro uses git scheme as well and buildroot tried to downlod a path using
DOWNLOAD_GITmacro. As a result, nothing was downloaded and build siletly passes.I had a hard time understanding how that would be possible. So I'll write it here so we're sure we're speaking about the same thing. If you set your options to:
BR2_LINUX_KERNEL_CUSTOM_GIT=y BR2_LINUX_KERNEL_CUSTOM_REPO_URL="http://foo/bar/buz.git" BR2_LINUX_KERNEL_PATCH="http://foo/bar/buz.patch"Then this is translated in the code as:
[linux/linux.mk] else ifeq ($(BR2_LINUX_KERNEL_CUSTOM_GIT),y) LINUX_SITE = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_REPO_URL)) LINUX_SITE_METHOD = git else [...]which means
_SITE_METHODis set to git, and thus ourDOWNLOAD_INNERmacro relies on this to decide how to do the download:[package/pkg-download] if test -z "$($(PKG)_SITE_METHOD)" ; then \ scheme="$(call geturischeme,$(1))" ; \ else \ scheme="$($(PKG)_SITE_METHOD)" ; \ fi ; \
Quoted 8 lines
So, this sounds legit, indeed.
However, I'm not too fond that we directly use the internal download macros. But I guess since we ecplicitly filter on schemes wget understands, that's pretty OK.
Which still prompts a question: what if the user has patches he want to download via scp? We do not handle this case for now, right. Should we?
Yes, this is true. Another solution would be to add optional parameter to DOWNLOAD macro in order to force execute scheme="$(call geturischeme,$(1))".
When I get back from my work, I'll send another patch version :)
Regards,
Ivo Slanina
Quoted 35 lines
Acked-by "Yann E. MORIN" <[email protected]>Regards,
Yann E. MORIN.Quoted 28 lines
Patches located at mentioned URLs is now downloaded directly with
DOWNLOAD_WGETmacro.Signed-off-by Ivo Slanina <[email protected]>--- linux/linux.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)linux/linux.mk +1
-1@@ -148,7 +148,7 @@ define LINUX_DOWNLOAD_PATCHES $(if $(LINUX_PATCHES), @$(call MESSAGE,"Download additional patches")) $(foreach patch,$(filter ftp://% http://% https://%,$(LINUX_PATCHES)),\ - $(call DOWNLOAD,$(patch))$(sep)) + $(call DOWNLOAD_WGET,$(patch),$(notdir $(patch)))$(sep)) endef LINUX_POST_DOWNLOAD_HOOKS += LINUX_DOWNLOAD_PATCHESSignature · 6 lines
1.7.10.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
PATCH 2/2 linux/linux.mk: fixed downloading kernel patches
Ivo, All,
On 2015-01-13 11:32 +0100, Ivo Slanina spake thusly:
Quoted 8 lines · Yann E. MORIN
Quoted 7 lines
Ivo, All,
On 2015-01-12 17:37 +0100, Ivo Slanina spake thusly:Quoted 5 lines
Patches located at ftp or http(s) URLs were downloaded using DOWNLOAD macro. For example, if linux source was located at external git repository, DOWNLOAD macro uses git scheme as well and buildroot tried to downlod a path using
DOWNLOAD_GITmacro. As a result, nothing was downloaded and build siletly passes.
[--SNIP--]
Quoted 7 lines
Quoted 2 lines
Which still prompts a question: what if the user has patches he want to download via scp? We do not handle this case for now, right. Should we?
Yes, this is true. Another solution would be to add optional parameter to DOWNLOAD macro in order to force execute scheme="$(call geturischeme,$(1))".
When I get back from my work, I'll send another patch version :)
No need to "fix" your patch: it is just correct, that's why I replied with:
Quoted 1 line
Quoted 1 line
Acked-by "Yann E. MORIN" <[email protected]>
Supporting scp would be a new feature, so shouold be done in a separate patch. You are welcome to provide such another patch if you want, of course! ;-)
Thanks! :-)
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 1/2 linux/linux.mk: added https:// pattern for kernel patches
In reply to Ivo SlaninaIvo, All,
On 2015-01-12 17:37 +0100, Ivo Slanina spake thusly:
Quoted 6 lines
Patches located at https:// scheme URL were threated as directories, causing build failures.
Fixed by adding https:// pattern.
Signed-off-by Ivo Slanina <[email protected]>
Yep, sounds legit. ;-)
Regards,
Yann E. MORIN.
Quoted 33 lines
--- linux/linux.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)linux/linux.mk +2
-2@@ -147,7 +147,7 @@ endif # BR2_LINUX_KERNEL_VMLINUX define LINUX_DOWNLOAD_PATCHES $(if $(LINUX_PATCHES), @$(call MESSAGE,"Download additional patches")) - $(foreach patch,$(filter ftp://% http://%,$(LINUX_PATCHES)),\ + $(foreach patch,$(filter ftp://% http://% https://%,$(LINUX_PATCHES)),\ $(call DOWNLOAD,$(patch))$(sep)) endef@@ -155,7 +155,7 @@ LINUX_POST_DOWNLOAD_HOOKS += LINUX_DOWNLOAD_PATCHES define LINUX_APPLY_PATCHES for p in $(LINUX_PATCHES) ; do \ - if echo $$p | grep -q -E "^ftp://|^http://" ; then \ + if echo $$p | grep -q -E "^ftp://|^http://|^https://" ; then \ $(APPLY_PATCHES) $(@D) $(DL_DIR) `basename $$p` ; \ elif test -d $$p ; then \ $(APPLY_PATCHES) $(@D) $$p linux-\*.patch ; \Signature · 6 lines
1.7.10.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | 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. | '------------------------------^-------^------------------^--------------------'
PATCH 1/2 linux/linux.mk: added https:// pattern for kernel patches
In reply to Ivo SlaninaDear Ivo Slanina,
Quoted 9 lines · Ivo Slanina
Patches located at https:// scheme URL were threated as directories, causing build failures.
Fixed by adding https:// pattern.
Signed-off-by Ivo Slanina <[email protected]>--- linux/linux.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Both patches applied, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com