From: kangie@gentoo.org
To: gentoo-dev@lists.gentoo.org
Cc: Matt Jolly <kangie@gentoo.org>
Subject: [gentoo-dev] [PATCH 0/3] cargo.eclass: Trivial crate replacements
Date: Mon, 25 Nov 2024 13:35:27 +1000 [thread overview]
Message-ID: <20241125033530.115757-1-kangie@gentoo.org> (raw)
From: Matt Jolly <kangie@gentoo.org>
Updating vulnerable or outdated crates in Rust ebuilds is not easy.
This patchset aims to reduce the developer effort and knowledge
required to substitute crates into a Rust build process.
We do this by:
- Enabling `paths = ['/foo/bar/baz']` style global replacements.
This useful for ebuilds that vendor their crates but has some
substantial limitations. This is required to (e.g.) build an
older dev-lang/rust against a modern system with OpenSSL 3.
- Providing a helper function that takes advantage of the eclass
replacing crates.io with an offline repository to run
`cargo update --offline` and update the Lockfile and crate
metadata to include provided crate updates.
There is some room for additional work to arbitrarily patch dependency
crates (including checksum updates) and ensure that they are suitable
for dependency resolution, however where a vulnerable (or otherwise
broken) crate needs to be replaced with an updated version from
crates.io this should prove suitable for most use cases.
The following GitHub Pull Request has been opened for review
feedback: https://github.com/gentoo/gentoo/pull/39464
Matt Jolly (3):
cargo.eclass: add trivial crate overrides
dev-lang/rust{,-bin}: Add 1.54.0
app-antivirus/clamav: example of trivial crate replacement
app-antivirus/clamav/Manifest | 2 +-
...1.0.7-r1.ebuild => clamav-1.0.7-r2.ebuild} | 8 +-
dev-lang/rust-bin/Manifest | 34 ++
dev-lang/rust-bin/rust-bin-1.54.0.ebuild | 188 ++++++
dev-lang/rust/Manifest | 4 +
...nore-broken-and-non-applicable-tests.patch | 75 +++
.../1.49.0-gentoo-musl-target-specs.patch | 164 +++++
.../rust/files/1.53.0-rustversion-1.0.5.patch | 234 ++++++++
.../rust/files/1.54.0-parallel-miri.patch | 43 ++
.../files/llvm/12/cstdint-signals-h.patch | 24 +
dev-lang/rust/rust-1.54.0.ebuild | 560 ++++++++++++++++++
eclass/cargo.eclass | 115 +++-
eclass/rust.eclass | 2 +
13 files changed, 1445 insertions(+), 8 deletions(-)
rename app-antivirus/clamav/{clamav-1.0.7-r1.ebuild => clamav-1.0.7-r2.ebuild} (99%)
create mode 100644 dev-lang/rust-bin/rust-bin-1.54.0.ebuild
create mode 100644 dev-lang/rust/files/1.47.0-ignore-broken-and-non-applicable-tests.patch
create mode 100644 dev-lang/rust/files/1.49.0-gentoo-musl-target-specs.patch
create mode 100644 dev-lang/rust/files/1.53.0-rustversion-1.0.5.patch
create mode 100644 dev-lang/rust/files/1.54.0-parallel-miri.patch
create mode 100644 dev-lang/rust/files/llvm/12/cstdint-signals-h.patch
create mode 100644 dev-lang/rust/rust-1.54.0.ebuild
--
2.47.0
next reply other threads:[~2024-11-25 3:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-25 3:35 kangie [this message]
2024-11-25 3:35 ` [gentoo-dev] [PATCH 1/3] cargo.eclass: add trivial crate overrides kangie
2024-11-25 3:35 ` [gentoo-dev] [PATCH 2/3] dev-lang/rust{,-bin}: Add 1.54.0 kangie
2024-11-25 20:13 ` James Le Cuirot
2024-11-25 21:36 ` Matt Jolly
2024-11-25 22:31 ` James Le Cuirot
2024-11-25 3:35 ` [gentoo-dev] [PATCH 3/3] app-antivirus/clamav: example of trivial crate replacement kangie
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=20241125033530.115757-1-kangie@gentoo.org \
--to=kangie@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/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