All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Christian Stewart <christian@paral.in>
Cc: Anisse Astier <anisse@astier.eu>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH-NEXT v2 1/5] support/download/dl-wrapper: add concept of download post-processing
Date: Sun, 19 Sep 2021 11:37:09 +0200	[thread overview]
Message-ID: <20210919093709.GO1053080@scaer> (raw)
In-Reply-To: <20210919071016.3339939-1-christian@paral.in>

Christian, All,

Can you fixup the patches as you already noticed, and respin a fixed
up series, please? In the meantime., I've marked this one Changes
REquested in Patchwork.

Also, what was still preventing applying this to Buildroot, was a few
still open questions, the most prominent one I can remember is about
BR2_PRIMARY_SITE and BR2_BACKUP_SITE.

Indeed, what we download from the main site is an un-vendored source,
but what we will get in primary or backup sites are vendored sources.

Downloading vendored sources from primary or mirror also means that no
vendoring should be applied afterward, i.e. vendoring should only occur
on sources downloaded from the main site.

Did you try that? Can you report on how that eventually played out?

Regards,
Yann E. MORIN.

On 2021-09-19 00:10 -0700, Christian Stewart via buildroot spake thusly:
> From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> 
> In order to support package managers such as Cargo (Rust) or Go, we
> want to run some custom logic after the main download, but before
> packing the tarball and checking the hash.
> 
> To implement this, this commit introduces a concept of download
> post-processing: if -p <something> is passed to the dl-wrapper, then
> support/download/<something>-post-process will be called.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Signed-off-by: Christian Stewart <christian@paral.in>
> ---
>  support/download/dl-wrapper | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/support/download/dl-wrapper b/support/download/dl-wrapper
> index 3315bd410e..2d74554213 100755
> --- a/support/download/dl-wrapper
> +++ b/support/download/dl-wrapper
> @@ -25,7 +25,7 @@ main() {
>      local -a uris
>  
>      # Parse our options; anything after '--' is for the backend
> -    while getopts ":c:d:D:o:n:N:H:rf:u:q" OPT; do
> +    while getopts ":c:d:D:o:n:N:H:rf:u:qp:" OPT; do
>          case "${OPT}" in
>          c)  cset="${OPTARG}";;
>          d)  dl_dir="${OPTARG}";;
> @@ -37,6 +37,7 @@ main() {
>          r)  recurse="-r";;
>          f)  filename="${OPTARG}";;
>          u)  uris+=( "${OPTARG}" );;
> +        p)  post_process="${OPTARG}";;
>          q)  quiet="-q";;
>          :)  error "option '%s' expects a mandatory argument\n" "${OPTARG}";;
>          \?) error "unknown option '%s'\n" "${OPTARG}";;
> @@ -135,6 +136,12 @@ main() {
>              continue
>          fi
>  
> +        if [ -n "${post_process}" ] ; then
> +                ${OLDPWD}/support/download/${post_process}-post-process \
> +                         -o "${tmpf}" \
> +                         -n "${raw_base_name}"
> +        fi
> +
>          # cd back to free the temp-dir, so we can remove it later
>          cd "${OLDPWD}"
>  
> -- 
> 2.33.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@lists.buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@lists.buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  parent reply	other threads:[~2021-09-19  9:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-19  7:10 [Buildroot] [PATCH-NEXT v2 1/5] support/download/dl-wrapper: add concept of download post-processing Christian Stewart via buildroot
2021-09-19  7:10 ` [Buildroot] [PATCH-NEXT v2 2/5] package/pkg-download.mk: add <pkg>_DOWNLOAD_POST_PROCESS variable Christian Stewart via buildroot
2021-09-19  7:10 ` [Buildroot] [PATCH-NEXT v2 3/5] support/download/post-process-helpers: add helper function for post process scripts Christian Stewart via buildroot
2021-09-19  7:10 ` [Buildroot] [PATCH-NEXT v2 4/5] support/download/go-post-process: implement Go vendoring support Christian Stewart via buildroot
2021-09-19  7:13   ` Christian Stewart via buildroot
2021-09-19  7:10 ` [Buildroot] [PATCH-NEXT v2 5/5] package/embiggen-disk: new package Christian Stewart via buildroot
2021-09-19  7:17   ` Christian Stewart via buildroot
2021-09-19  9:37 ` Yann E. MORIN [this message]
2021-09-19 11:55   ` [Buildroot] [PATCH-NEXT v2 1/5] support/download/dl-wrapper: add concept of download post-processing Arnout Vandecappelle
2021-10-01 22:53     ` Christian Stewart via buildroot

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=20210919093709.GO1053080@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=anisse@astier.eu \
    --cc=buildroot@buildroot.org \
    --cc=christian@paral.in \
    --cc=thomas.petazzoni@bootlin.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.