From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: Christian Stewart <christian@paral.in>
Cc: Anisse Astier <anisse@astier.eu>,
"Yann E . MORIN" <yann.morin.1998@free.fr>,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH-NEXT v3 1/6] support/download/dl-wrapper: add concept of download post-processing
Date: Mon, 11 Oct 2021 09:04:28 +0200 [thread overview]
Message-ID: <20211011090428.50e68324@windsurf> (raw)
In-Reply-To: <20211010234655.585526-1-christian@paral.in>
Hello Christian,
Thanks for your work on this topic! I didn't review the patches in
details, but here are a couple of comments on the form:
- The initial series also had support for Cargo, I think we want to
retain that as the idea was to solve both Go and Cargo at the same
time, to make sure we have a solution that works for both.
- PATCH-NEXT doesn't make any sense right now, there is no "next"
branch.
- Your patch series lacks a cover letter with a description of the
changes between versions. So of your commits have a v1 -> v2
changelog, but we don't know what changed in v3.
Best regards,
Thomas
On Sun, 10 Oct 2021 16:46:50 -0700
Christian Stewart <christian@paral.in> wrote:
> 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}"
>
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2021-10-11 7:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-10 23:46 [Buildroot] [PATCH-NEXT v3 1/6] support/download/dl-wrapper: add concept of download post-processing Christian Stewart via buildroot
2021-10-10 23:46 ` [Buildroot] [PATCH-NEXT v3 2/6] package/pkg-download.mk: add <pkg>_DOWNLOAD_POST_PROCESS variable Christian Stewart via buildroot
2021-10-10 23:46 ` [Buildroot] [PATCH-NEXT v3 3/6] support/download/post-process-helpers: add helper function for post process scripts Christian Stewart via buildroot
2021-10-10 23:46 ` [Buildroot] [PATCH-NEXT v3 4/6] support/download/go-post-process: implement Go vendoring support Christian Stewart via buildroot
2022-01-06 10:32 ` Thomas Petazzoni
2022-01-06 21:08 ` Thomas Petazzoni
2022-01-06 21:20 ` Christian Stewart via buildroot
2022-01-07 0:45 ` Christian Stewart via buildroot
2021-10-10 23:46 ` [Buildroot] [PATCH-NEXT v3 5/6] package/embiggen-disk: new package Christian Stewart via buildroot
2021-10-10 23:46 ` [Buildroot] [PATCH-NEXT v3 6/6] package/gocryptfs: " Christian Stewart via buildroot
2021-10-11 7:04 ` Thomas Petazzoni [this message]
2021-10-11 7:13 ` [Buildroot] [PATCH-NEXT v3 1/6] support/download/dl-wrapper: add concept of download post-processing Christian Stewart via buildroot
2021-10-14 21:15 ` Thomas Petazzoni
2022-01-06 21:05 ` Thomas Petazzoni
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=20211011090428.50e68324@windsurf \
--to=thomas.petazzoni@bootlin.com \
--cc=anisse@astier.eu \
--cc=buildroot@buildroot.org \
--cc=christian@paral.in \
--cc=yann.morin.1998@free.fr \
/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