public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH 0/3] cargo.eclass: Trivial crate replacements
@ 2024-11-25  3:35 kangie
  2024-11-25  3:35 ` [gentoo-dev] [PATCH 1/3] cargo.eclass: add trivial crate overrides kangie
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: kangie @ 2024-11-25  3:35 UTC (permalink / raw
  To: gentoo-dev; +Cc: Matt Jolly

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-11-25 22:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-25  3:35 [gentoo-dev] [PATCH 0/3] cargo.eclass: Trivial crate replacements kangie
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox