From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Matt Weber <Matthew.Weber@rockwellcollins.com>,
Patrick Havelange <patrick.havelange@essensium.com>,
James Hilliard <james.hilliard1@gmail.com>,
Buildroot List <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH v3 01/11] support/download/dl-wrapper: add concept of download post-processing
Date: Fri, 7 Jan 2022 11:28:19 +0100 [thread overview]
Message-ID: <20220107102819.GA1268635@scaer> (raw)
In-Reply-To: <20220106210000.397694-2-thomas.petazzoni@bootlin.com>
Thomas, All,
On 2022-01-06 21:59 +0100, Thomas Petazzoni spake thusly:
> 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>
> ---
> 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..e6509e5671 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 \
I added double-quotes when expanding those variables.
Applied to master, thanks.
Regards,
Yann E. MORIN.
> + -o "${tmpf}" \
> + -n "${raw_base_name}"
> + fi
> +
> # cd back to free the temp-dir, so we can remove it later
> cd "${OLDPWD}"
>
> --
> 2.33.1
>
--
.-----------------.--------------------.------------------.--------------------.
| 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@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-01-07 10:28 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-06 20:59 [Buildroot] [PATCH v3 00/11] Support for Cargo and Go vendoring Thomas Petazzoni
2022-01-06 20:59 ` [Buildroot] [PATCH v3 01/11] support/download/dl-wrapper: add concept of download post-processing Thomas Petazzoni
2022-01-07 10:28 ` Yann E. MORIN [this message]
2022-01-06 20:59 ` [Buildroot] [PATCH v3 02/11] package/pkg-download.mk: add <pkg>_DOWNLOAD_POST_PROCESS variable Thomas Petazzoni
2022-01-07 10:35 ` Yann E. MORIN
2022-01-06 20:59 ` [Buildroot] [PATCH v3 03/11] support/download/post-process-helpers: add helper function for post process scripts Thomas Petazzoni
2022-01-07 10:36 ` Yann E. MORIN
2022-01-06 20:59 ` [Buildroot] [PATCH v3 04/11] package/pkg-golang.mk: implement Go vendoring support Thomas Petazzoni
2022-01-09 11:49 ` Romain Naour
2022-01-06 20:59 ` [Buildroot] [PATCH v3 05/11] package/pkg-cargo.mk: introduce the cargo package infrastructure Thomas Petazzoni
2022-01-07 1:12 ` James Hilliard
2022-01-07 9:52 ` Thomas Petazzoni
2022-01-07 22:30 ` James Hilliard
2022-01-07 22:59 ` Thomas Petazzoni
2022-01-08 3:21 ` James Hilliard
2022-01-08 13:52 ` Juergen Stuber
2022-01-07 10:05 ` Romain Naour
2022-01-07 10:26 ` Romain Naour
2022-01-07 10:44 ` Yann E. MORIN
2022-01-07 11:03 ` Romain Naour
2022-01-07 21:07 ` Romain Naour
2022-01-07 21:53 ` Thomas Petazzoni
2022-01-09 10:04 ` Thomas Petazzoni
2022-01-06 20:59 ` [Buildroot] [PATCH v3 06/11] docs/manual/cargo: document the cargo-package infrastructure Thomas Petazzoni
2022-01-06 20:59 ` [Buildroot] [PATCH v3 07/11] package/ripgrep: convert to cargo infrastructure Thomas Petazzoni
2022-01-06 20:59 ` [Buildroot] [PATCH v3 08/11] package/sentry-cli: re-add package Thomas Petazzoni
2022-01-06 22:04 ` Christian Stewart via buildroot
2022-01-06 22:29 ` Thomas Petazzoni
2022-01-06 22:38 ` Christian Stewart via buildroot
2022-01-06 22:59 ` Thomas Petazzoni
2022-01-06 20:59 ` [Buildroot] [PATCH v3 09/11] package/tinifier: new package Thomas Petazzoni
2022-01-06 22:30 ` Christian Stewart via buildroot
2022-01-06 20:59 ` [Buildroot] [PATCH v3 10/11] package/embiggen-disk: " Thomas Petazzoni
2022-01-06 22:11 ` Christian Stewart via buildroot
2022-01-06 20:59 ` [Buildroot] [PATCH v3 11/11] package/gocryptfs: " Thomas Petazzoni
2022-01-06 22:26 ` [Buildroot] [PATCH v3 00/11] Support for Cargo and Go vendoring Christian Stewart via buildroot
2022-01-06 22:29 ` Thomas Petazzoni
2022-01-08 22:39 ` 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=20220107102819.GA1268635@scaer \
--to=yann.morin.1998@free.fr \
--cc=Matthew.Weber@rockwellcollins.com \
--cc=buildroot@buildroot.org \
--cc=james.hilliard1@gmail.com \
--cc=patrick.havelange@essensium.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).