Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Richter Simon <simon.richter@ptwdosimetry.com>
Cc: "buildroot@buildroot.org" <buildroot@buildroot.org>
Subject: Re: [Buildroot] [PATCH 1/1] support/download/cargo-post-process: use cargo output for vendor config
Date: Fri, 21 Oct 2022 18:31:33 +0200	[thread overview]
Message-ID: <20221021163133.GO2503@scaer> (raw)
In-Reply-To: <AM0PR09MB34116058D25F14D6FEE90F058B2D9@AM0PR09MB3411.eurprd09.prod.outlook.com>

Simon, All,

On 2022-10-21 12:10 +0000, Richter Simon spake thusly:
> Am 20.10.22 um 22:25 schrieb Yann E. MORIN:
> > I see all the above use git repositories directly, so I suspect this is
> > going to cause explicit git-clone + build (that's OK). However, I was
> > also wondering if one could have a "registry" like crates.io, either
> > internal to a company, or another public resource elsewhere, and how
> > that would work...
> 
> It is possible to use an own registry, yes, but i did not use that yet.

OK, that's fine!

> > Yes, I was wondering if there was a publicly visible package that we
> > could cary in Buildroot, so that we know the feature would be regularly
> > exercised. You pointed to conduit: it wouldbe good to have it packaged
> > in Buildrooot.
> I can try to do that. But that should be done in a different patch i think?

Yes, as a followup patch, that way you provide the new feature, and you
show how it is used. And we get a new interesting package! :-)

> > Please, also note that this has the potential to generate different
> > hashes, so please check existing cargo packages to see what breaks.
> I did, and with my last suggestion (using cargo and tee) those packages 
> broke. The problem is that `cargo vendor` outputs a preceding newline
> that must be removed.
> I came up with this:
> 
>     cargo vendor \
>         --manifest-path ${BR_CARGO_MANIFEST_PATH-Cargo.toml} \
>         --locked VENDOR \
>     | tail --lines=+2 | tee .cargo/config

Now, one last issue: if the 'cargo' call fails, the script won't fail,
because cargo is part of a pipe.

The script is already "set -e", but we also need "set -o pipefail".

> This removes the first (and empty) line. 
> 
> With this, all packages i checked were fine.

OK, so don't forget to mention that in your new commit log.

Also, the rationale that we can change it, is that it produces the exact
same output that we do, and if for some package it would not generate
the same output, that package was not working anyway because it was
missing parts of its vendored sources anyway. So, that can't regress.

> These were:
>  - bat
>  - dust
>  - hyperfine
>  - ripgrep
>  - tealdeer
>  - python-rtoml
>  - python-orjson
>  - python-cryptography
>  - host-python-maturin
> 
> I hope i've got all.

You missed: host-sentry-cli (is a host-cargo-package).

> If you agree so far, I would send the new version of the patch.

Yes, with all we discussed, it looks in good way.

Regards,
Yann E. MORIN.

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

  reply	other threads:[~2022-10-21 16:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20221019161513.994988-1-simon.richter@ptwdosimetry.com>
2022-10-19 20:52 ` [Buildroot] [PATCH 1/1] support/download/cargo-post-process: use cargo output for vendor config Yann E. MORIN
2022-10-20 18:16   ` Richter Simon
2022-10-20 20:25     ` Yann E. MORIN
2022-10-21 12:10       ` Richter Simon
2022-10-21 16:31         ` Yann E. MORIN [this message]
2022-10-25 10:02           ` [Buildroot] [PATCH v2] support/download/cargo-post-process: " Simon Richter
2022-10-31  9:08             ` Yann E. MORIN

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=20221021163133.GO2503@scaer \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@buildroot.org \
    --cc=simon.richter@ptwdosimetry.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