[LEDE-DEV] uboot-envtools: Change download to git.

Message ID 20180226212553.3861-1-rosenp@gmail.com
State Superseded
Delegated to: John Crispin
Headers show
Series
  • [LEDE-DEV] uboot-envtools: Change download to git.
Related show

Commit Message

Rosen Penev Feb. 26, 2018, 9:25 p.m.
Currently, the build system uses an openwrt mirror which does not currently workand FTP can be unreliable under several circumstances (Ubuntu 16.04 WSL being an example). This change implicitly allows using all the mirrors to download.

Changing this to git also allows using .tar.xz archives which are smaller.

Size difference:

10416503 u-boot-2015.10.tar.bz2
8351456 u-boot-2015.10.tar.xz

Signed-off-by: Rosen Penev <rosenp@gmail.com>

v2: Change git URL from GitHub to official mirror.
---
 package/boot/uboot-envtools/Makefile | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

Comments

Alexandru Ardelean Feb. 28, 2018, 8:03 a.m. | #1
On Mon, Feb 26, 2018 at 11:25 PM, Rosen Penev <rosenp@gmail.com> wrote:
> Currently, the build system uses an openwrt mirror which does not currently workand FTP can be unreliable under several circumstances (Ubuntu 16.04 WSL being an example). This change implicitly allows using all the mirrors to download.
>
> Changing this to git also allows using .tar.xz archives which are smaller.
>
> Size difference:
>
> 10416503 u-boot-2015.10.tar.bz2
> 8351456 u-boot-2015.10.tar.xz
>

this is still not worth mentioning if you are switching to a git repo ;
due to the traffic generated by downloading from a git repo ;

> Signed-off-by: Rosen Penev <rosenp@gmail.com>
>
> v2: Change git URL from GitHub to official mirror.
> ---
>  package/boot/uboot-envtools/Makefile | 13 +++++++------
>  1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile
> index 57a2ec5393..ba6bae6cfe 100644
> --- a/package/boot/uboot-envtools/Makefile
> +++ b/package/boot/uboot-envtools/Makefile
> @@ -12,12 +12,13 @@ PKG_DISTNAME:=u-boot
>  PKG_VERSION:=2015.10
>  PKG_RELEASE:=1
>
> -PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION)
> -PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
> -PKG_SOURCE_URL:=\
> -       http://mirror2.openwrt.org/sources \
> -       ftp://ftp.denx.de/pub/u-boot
> -PKG_HASH:=bdc68d5f9455ad933b059c735d983f2c8b6b552dafb062e5ff1444f623021955
> +PKG_SOURCE_PROTO:=git
> +PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.xz
> +PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION)
> +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION)
> +PKG_SOURCE_URL:=git://git.denx.de/u-boot.git

this would not work for people behind a firewall that allows only
HTTP(S) traffic;
HTTPS/HTTP is nicer for that, or git over HTTP(S) if available;

My preference is still towards using HTTP(S) over using git ;
especially if there is an official HTTP(S) mirror available.
For downloading tarballs it's a less-complicated protocol than cloning
a git repo.

> +PKG_SOURCE_VERSION:=5ec0003b19cbdf06ccd6941237cbc0d1c3468e2d
> +PKG_MIRROR_HASH:=e207d996ebfff7335eed99789e3dcb9da071499f347fcdd86725b9d4dac5a5bb
>
>  PKG_BUILD_DEPENDS:=fstools
>
> --
> 2.14.3
>
>
> _______________________________________________
> Lede-dev mailing list
> Lede-dev@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/lede-dev

Patch

diff --git a/package/boot/uboot-envtools/Makefile b/package/boot/uboot-envtools/Makefile
index 57a2ec5393..ba6bae6cfe 100644
--- a/package/boot/uboot-envtools/Makefile
+++ b/package/boot/uboot-envtools/Makefile
@@ -12,12 +12,13 @@  PKG_DISTNAME:=u-boot
 PKG_VERSION:=2015.10
 PKG_RELEASE:=1
 
-PKG_BUILD_DIR:=$(BUILD_DIR)/u-boot-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.bz2
-PKG_SOURCE_URL:=\
-	http://mirror2.openwrt.org/sources \
-	ftp://ftp.denx.de/pub/u-boot
-PKG_HASH:=bdc68d5f9455ad933b059c735d983f2c8b6b552dafb062e5ff1444f623021955
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE:=$(PKG_DISTNAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE_SUBDIR:=$(PKG_DISTNAME)-$(PKG_VERSION)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_DISTNAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=git://git.denx.de/u-boot.git
+PKG_SOURCE_VERSION:=5ec0003b19cbdf06ccd6941237cbc0d1c3468e2d
+PKG_MIRROR_HASH:=e207d996ebfff7335eed99789e3dcb9da071499f347fcdd86725b9d4dac5a5bb
 
 PKG_BUILD_DEPENDS:=fstools