Thanks to all the involved people that helped on getting a softer upgrade path
from older glib versions.
Closes: https://bugs.gentoo.org/937616
Signed-off-by: Pacho Ramos <pacho@gentoo.org>
These are the the old ebuilds, updated to be slotted.
Other changes:
- `USE=rls` was dropped at some point, this is now
hard-enabled.
- As the LLVM is far too old for Gentoo we are using the bundled LLVM
exclusively.
In particular, dev-lang/rust:1.54.0 forms an important part of the
upcoming 'bootstrap Rust without Rust binaries' path.
Bug: https://bugs.gentoo.org/943706
Closes: https://github.com/gentoo/gentoo/pull/39464
Signed-off-by: Matt Jolly <kangie@gentoo.org>
Updating vulnerable (or otherwise outdated) crates in Rust ebuilds
is painful. Generally speaking, there are 5 options:
- Run `cargo update` to fetch new versions from the web.
This is obviously not suitable for use in Portage.
- Patch the software via Portage to accept a non-vulnerable crate.
This is a reasonable option when the package is not too complex
but still requires significant developer effort and some familiarity
with Cargo. In the case of complex patches this may not be feasible,
or require the generation of a dependency tarball.
- [patch] the source (repository) in Cargo.toml. This enables the
targeting of specific crates, but does not allow the replacement
of only a specific version in the depgraph.
- [replace] a particular crate:version in the Cargo.toml. This
enables the targeting of a particular version with an arbitrary
path however the replacement crate must *have the same version*
as the one being overridden.
- `paths = [...]` overrides: pass an array of paths to directories that
contain a Cargo.toml. Cargo will override any crate with the same package name
arbitrarily, ignoring the lock file and versions; typically used for testing.
Is applied via ${CARGO_HOME}/config.toml (i.e. globally)
This commit:
- Implements the `paths` overrides, which will work even when
Cargo is configured to use a vendored directory. This is not a 'smart'
replacement and care must be taken to ensure that all versions of
the crate in use are compatible (`cargo tree` will help).
- Provides a helper which runs `cargo --update --offline` against
${ECARGO_VENDOR} (where ${CRATES} are unpacked). This enables the
replacement of vulnerable versions in ${CRATES}. It is up to the
consumer to ensure that only the desired crates are being replaced
and that package behaviour does not change.
Resources:
- https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html
- https://github.com/rust-lang/cargo/issues/3308
Signed-off-by: Matt Jolly <kangie@gentoo.org>
This variable enables ebuilds to tell the eclass to ignore
the minimum Rust/Cargo version reqirement. It is intended
for use when bootstrapping older Rust, consumers who are
not dev-lang/rust should have a good reason for using this.
Signed-off-by: Matt Jolly <kangie@gentoo.org>
We would previously `die` if there was only one file found matching
libraries in ${old_rust_libs} after the fingerprint was stripped.
It turns out that it's not uncommon for fingerprints to match, and
it is entirely possible for one (or most!) libraries to actually
be overridden.
Keep the existing duplicate handling but log the `expected 2 but found
1` case just in case we need to track this down.
Since all -r100 ebuild are having `pkg_postinst` updated, be consistent
about `optfeature` usage.
Signed-off-by: Matt Jolly <kangie@gentoo.org>