Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 2/6] pkg-download: Allow packages to pass generic options to download methods
Date: Fri, 15 Jul 2016 17:56:44 +0200	[thread overview]
Message-ID: <20160715155644.GD3692@free.fr> (raw)
In-Reply-To: <1468315820-9341-3-git-send-email-romain.perier@free-electrons.com>

Romain, All,

On 2016-07-12 11:30 +0200, Romain Perier spake thusly:
> Introduce a new package variable $(PKG)_DL_OPTS. When this variable
> is defined, its value is passed to the downloader as options to
> the underlying command. Packages can now retrieve archives from server
> expecting logins and passwords, use referer url, proxy or specific
> options for cloning a repository.
> 
> Signed-off-by: Romain Perier <romain.perier@free-electrons.com>

On principle:
    Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

... which you can add when you respin after the download backends are
changed to accept options, of course.

Regards,
Yann E. MORIN.

> ---
> 
> Changes in v2:
>  - Replaced $(PKG)_DL_REFERER by $(PKG)_DL_OPTS
>  - Add support for this options to all downloaders
> 
> 
>  package/pkg-download.mk | 24 ++++++++++++++++--------
>  1 file changed, 16 insertions(+), 8 deletions(-)
> 
> diff --git a/package/pkg-download.mk b/package/pkg-download.mk
> index a0f694d..00fbe6c 100644
> --- a/package/pkg-download.mk
> +++ b/package/pkg-download.mk
> @@ -80,7 +80,8 @@ define DOWNLOAD_GIT
>  		-- \
>  		$($(PKG)_SITE) \
>  		$($(PKG)_DL_VERSION) \
> -		$($(PKG)_BASE_NAME)
> +		$($(PKG)_BASE_NAME) \
> +		$($(PKG)_DL_OPTS)
>  endef
>  
>  # TODO: improve to check that the given PKG_DL_VERSION exists on the remote
> @@ -96,7 +97,8 @@ define DOWNLOAD_BZR
>  		-- \
>  		$($(PKG)_SITE) \
>  		$($(PKG)_DL_VERSION) \
> -		$($(PKG)_BASE_NAME)
> +		$($(PKG)_BASE_NAME) \
> +		$($(PKG)_DL_OPTS)
>  endef
>  
>  define SOURCE_CHECK_BZR
> @@ -111,7 +113,8 @@ define DOWNLOAD_CVS
>  		$(call stripurischeme,$(call qstrip,$($(PKG)_SITE))) \
>  		$($(PKG)_DL_VERSION) \
>  		$($(PKG)_RAWNAME) \
> -		$($(PKG)_BASE_NAME)
> +		$($(PKG)_BASE_NAME) \
> +		$($(PKG)_DL_OPTS)
>  endef
>  
>  # Not all CVS servers support ls/rls, use login to see if we can connect
> @@ -126,7 +129,8 @@ define DOWNLOAD_SVN
>  		-- \
>  		$($(PKG)_SITE) \
>  		$($(PKG)_DL_VERSION) \
> -		$($(PKG)_BASE_NAME)
> +		$($(PKG)_BASE_NAME) \
> +		$($(PKG)_DL_OPTS)
>  endef
>  
>  define SOURCE_CHECK_SVN
> @@ -142,7 +146,8 @@ define DOWNLOAD_SCP
>  		-H $(PKGDIR)/$($(PKG)_RAWNAME).hash \
>  		$(QUIET) \
>  		-- \
> -		'$(call stripurischeme,$(call qstrip,$(1)))'
> +		'$(call stripurischeme,$(call qstrip,$(1)))' \
> +		$($(PKG)_DL_OPTS)
>  endef
>  
>  define SOURCE_CHECK_SCP
> @@ -156,7 +161,8 @@ define DOWNLOAD_HG
>  		-- \
>  		$($(PKG)_SITE) \
>  		$($(PKG)_DL_VERSION) \
> -		$($(PKG)_BASE_NAME)
> +		$($(PKG)_BASE_NAME) \
> +		$($(PKG)_DL_OPTS)
>  endef
>  
>  # TODO: improve to check that the given PKG_DL_VERSION exists on the remote
> @@ -171,7 +177,8 @@ define DOWNLOAD_WGET
>  		-H $(PKGDIR)/$($(PKG)_RAWNAME).hash \
>  		$(QUIET) \
>  		-- \
> -		'$(call qstrip,$(1))'
> +		'$(call qstrip,$(1))' \
> +		$($(PKG)_DL_OPTS)
>  endef
>  
>  define SOURCE_CHECK_WGET
> @@ -184,7 +191,8 @@ define DOWNLOAD_LOCALFILES
>  		-H $(PKGDIR)/$($(PKG)_RAWNAME).hash \
>  		$(QUIET) \
>  		-- \
> -		$(call stripurischeme,$(call qstrip,$(1)))
> +		$(call stripurischeme,$(call qstrip,$(1))) \
> +		$($(PKG)_DL_OPTS)
>  endef
>  
>  define SOURCE_CHECK_LOCALFILES
> -- 
> 2.8.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  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.  |
'------------------------------^-------^------------------^--------------------'

  reply	other threads:[~2016-07-15 15:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-12  9:30 [Buildroot] [PATCH v2 0/6] Add support for AMD Catalyst graphics driver Romain Perier
2016-07-12  9:30 ` [Buildroot] [PATCH v2 1/6] support/download: Add support to pass options directly to downloaders Romain Perier
2016-07-15 15:54   ` Yann E. MORIN
2016-07-15 17:21     ` Thomas Petazzoni
2016-07-15 20:47   ` Yann E. MORIN
2016-07-24 14:00     ` Thomas Petazzoni
2016-07-24 14:04       ` Yann E. MORIN
2016-07-24 14:05         ` Thomas Petazzoni
2016-07-26  7:31           ` Romain Perier
2016-07-12  9:30 ` [Buildroot] [PATCH v2 2/6] pkg-download: Allow packages to pass generic options to download methods Romain Perier
2016-07-15 15:56   ` Yann E. MORIN [this message]
2016-07-12  9:30 ` [Buildroot] [PATCH v2 3/6] docs/manual: Document the variable $(PKG)_DL_OPTS Romain Perier
2016-07-15 16:00   ` Yann E. MORIN
2016-07-26  7:30     ` Romain Perier
2016-07-12  9:30 ` [Buildroot] [PATCH v2 4/6] package/xserver_xorg-server: add version 1.17.4 Romain Perier
2016-07-15 13:23   ` Thomas Petazzoni
2016-07-12  9:30 ` [Buildroot] [PATCH v2 5/6] qt: Add option for enabling the accessibility support Romain Perier
2016-07-15 13:23   ` Thomas Petazzoni
2016-07-12  9:30 ` [Buildroot] [PATCH v2 6/6] package/amd-catalyst-driver: Add AMD proprietary graphic stack support Romain Perier

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=20160715155644.GD3692@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