mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-03 21:01:15 +02:00
dev-lang/rust: fix build issues with rust 1.67.0
Configure with --without=rust-docs-json-preview to avoid failures. Remove unnecessary checks for package versions like upstream. Clean up unnecessary patch, add new patch for 1.67.0.
This commit is contained in:
parent
012215aeae
commit
26510029ea
@ -1,60 +0,0 @@
|
|||||||
From 3fd653f3978e5ec2249c37eb08934bfe343e9198 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Georgy Yakovlev <gyakovlev@gentoo.org>
|
|
||||||
Date: Sat, 24 Sep 2022 23:09:38 -0700
|
|
||||||
Subject: [PATCH] vendor/rustix: sparc has no SIGSTKFLT
|
|
||||||
|
|
||||||
gyakovlev: removed checkum HUNK
|
|
||||||
|
|
||||||
---
|
|
||||||
vendor/rustix/.cargo-checksum.json | 2 +-
|
|
||||||
vendor/rustix/src/imp/libc/process/types.rs | 4 ++++
|
|
||||||
vendor/rustix/src/imp/linux_raw/process/types.rs | 4 ++--
|
|
||||||
3 files changed, 7 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/vendor/rustix/src/imp/libc/process/types.rs b/vendor/rustix/src/imp/libc/process/types.rs
|
|
||||||
index 60d629d..1278cee 100644
|
|
||||||
--- a/vendor/rustix/src/imp/libc/process/types.rs
|
|
||||||
+++ b/vendor/rustix/src/imp/libc/process/types.rs
|
|
||||||
@@ -197,6 +197,8 @@ pub enum Signal {
|
|
||||||
target_os = "macos",
|
|
||||||
target_os = "netbsd",
|
|
||||||
target_os = "openbsd",
|
|
||||||
+ target_arch = "sparc",
|
|
||||||
+ target_arch = "sparc64",
|
|
||||||
all(
|
|
||||||
any(target_os = "android", target_os = "linux"),
|
|
||||||
any(target_arch = "mips", target_arch = "mips64"),
|
|
||||||
@@ -274,6 +276,8 @@ impl Signal {
|
|
||||||
target_os = "macos",
|
|
||||||
target_os = "netbsd",
|
|
||||||
target_os = "openbsd",
|
|
||||||
+ target_arch = "sparc",
|
|
||||||
+ target_arch = "sparc64",
|
|
||||||
all(
|
|
||||||
any(target_os = "android", target_os = "linux"),
|
|
||||||
any(target_arch = "mips", target_arch = "mips64"),
|
|
||||||
diff --git a/vendor/rustix/src/imp/linux_raw/process/types.rs b/vendor/rustix/src/imp/linux_raw/process/types.rs
|
|
||||||
index 53e2c7d..859a108 100644
|
|
||||||
--- a/vendor/rustix/src/imp/linux_raw/process/types.rs
|
|
||||||
+++ b/vendor/rustix/src/imp/linux_raw/process/types.rs
|
|
||||||
@@ -119,7 +119,7 @@ pub enum Signal {
|
|
||||||
/// `SIGTERM`
|
|
||||||
Term = linux_raw_sys::general::SIGTERM,
|
|
||||||
/// `SIGSTKFLT`
|
|
||||||
- #[cfg(not(any(target_arch = "mips", target_arch = "mips64")))]
|
|
||||||
+ #[cfg(not(any(target_arch = "mips", target_arch = "mips64", target_arch = "sparc", target_arch = "sparc64")))]
|
|
||||||
Stkflt = linux_raw_sys::general::SIGSTKFLT,
|
|
||||||
/// `SIGCHLD`
|
|
||||||
#[doc(alias = "Chld")]
|
|
||||||
@@ -179,7 +179,7 @@ impl Signal {
|
|
||||||
linux_raw_sys::general::SIGPIPE => Some(Self::Pipe),
|
|
||||||
linux_raw_sys::general::SIGALRM => Some(Self::Alarm),
|
|
||||||
linux_raw_sys::general::SIGTERM => Some(Self::Term),
|
|
||||||
- #[cfg(not(any(target_arch = "mips", target_arch = "mips64")))]
|
|
||||||
+ #[cfg(not(any(target_arch = "mips", target_arch = "mips64", target_arch = "sparc", target_arch = "sparc64")))]
|
|
||||||
linux_raw_sys::general::SIGSTKFLT => Some(Self::Stkflt),
|
|
||||||
linux_raw_sys::general::SIGCHLD => Some(Self::Child),
|
|
||||||
linux_raw_sys::general::SIGCONT => Some(Self::Cont),
|
|
||||||
--
|
|
||||||
2.37.3
|
|
||||||
|
|
38
sdk_container/src/third_party/coreos-overlay/dev-lang/rust/files/1.67.0-bootstrap.patch
vendored
Normal file
38
sdk_container/src/third_party/coreos-overlay/dev-lang/rust/files/1.67.0-bootstrap.patch
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
From 675fa0b3dd5fe14b43ad5b7862f4528df7322468 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michael Goulet <michael@errs.io>
|
||||||
|
Date: Mon, 12 Dec 2022 18:29:33 +0000
|
||||||
|
Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8=20fix=20unsoundness=20in=20bootstr?=
|
||||||
|
=?UTF-8?q?ap=20cache=20code?=
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
---
|
||||||
|
src/bootstrap/cache.rs | 8 ++++----
|
||||||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/bootstrap/cache.rs b/src/bootstrap/cache.rs
|
||||||
|
index be5c9bb078808..05f25af68ea8f 100644
|
||||||
|
--- a/src/bootstrap/cache.rs
|
||||||
|
+++ b/src/bootstrap/cache.rs
|
||||||
|
@@ -89,16 +89,16 @@ impl<T: Internable + Hash> Hash for Interned<T> {
|
||||||
|
|
||||||
|
impl<T: Internable + Deref> Deref for Interned<T> {
|
||||||
|
type Target = T::Target;
|
||||||
|
- fn deref(&self) -> &'static Self::Target {
|
||||||
|
+ fn deref(&self) -> &Self::Target {
|
||||||
|
let l = T::intern_cache().lock().unwrap();
|
||||||
|
- unsafe { mem::transmute::<&Self::Target, &'static Self::Target>(l.get(*self)) }
|
||||||
|
+ unsafe { mem::transmute::<&Self::Target, &Self::Target>(l.get(*self)) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<T: Internable + AsRef<U>, U: ?Sized> AsRef<U> for Interned<T> {
|
||||||
|
- fn as_ref(&self) -> &'static U {
|
||||||
|
+ fn as_ref(&self) -> &U {
|
||||||
|
let l = T::intern_cache().lock().unwrap();
|
||||||
|
- unsafe { mem::transmute::<&U, &'static U>(l.get(*self).as_ref()) }
|
||||||
|
+ unsafe { mem::transmute::<&U, &U>(l.get(*self).as_ref()) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -23,7 +23,7 @@ else
|
|||||||
KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc64 ~riscv ~sparc ~x86"
|
KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc64 ~riscv ~sparc ~x86"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
|
RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).1"
|
||||||
|
|
||||||
DESCRIPTION="Systems programming language from Mozilla"
|
DESCRIPTION="Systems programming language from Mozilla"
|
||||||
HOMEPAGE="https://www.rust-lang.org/"
|
HOMEPAGE="https://www.rust-lang.org/"
|
||||||
@ -166,7 +166,7 @@ VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
|
|||||||
PATCHES=(
|
PATCHES=(
|
||||||
"${FILESDIR}"/1.65.0-ignore-broken-and-non-applicable-tests.patch
|
"${FILESDIR}"/1.65.0-ignore-broken-and-non-applicable-tests.patch
|
||||||
"${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
|
"${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
|
||||||
"${FILESDIR}"/1.64.0-vendor-rustix-sparc-has-no-SIGSTKFLT.patch
|
"${FILESDIR}"/1.67.0-bootstrap.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
S="${WORKDIR}/${MY_P}-src"
|
S="${WORKDIR}/${MY_P}-src"
|
||||||
@ -285,23 +285,13 @@ esetup_unwind_hack() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
# this supidity is needed because patch is too large to be in filesdir
|
|
||||||
# and if we move it to devspace - it lacks checksum for sig verification
|
|
||||||
if [[ "${PV}" == 1.67.0 ]]; then
|
|
||||||
sed -i \
|
|
||||||
-e 's/516ba32a547b46a8e80ad20d4a17bf24a00bff0b69b74f56df119f770f3dfff6/fc7eb88c2f5104865379128b76767d36ce5b5fdb9f3483e683d150e514ebc3a3/' \
|
|
||||||
-e 's/fba10dc8ca9eaf4d481cb82bd1540cf5c05620533c44f917c09a22ea55ef408c/9cc4d1b4511a1f0d91231eb0f11c67ae5e8e38e4becd0bf5eb9e26d043796056/' \
|
|
||||||
vendor/rustix/.cargo-checksum.json || die
|
|
||||||
else
|
|
||||||
die "remove sed mr forgetful maintainer"
|
|
||||||
fi
|
|
||||||
if ! use system-bootstrap; then
|
if ! use system-bootstrap; then
|
||||||
has_version sys-devel/gcc || esetup_unwind_hack
|
has_version sys-devel/gcc || esetup_unwind_hack
|
||||||
local rust_stage0_root="${WORKDIR}"/rust-stage0
|
local rust_stage0_root="${WORKDIR}"/rust-stage0
|
||||||
local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
|
local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
|
||||||
|
|
||||||
"${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
|
"${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
|
||||||
--without=rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
|
--without=rust-docs-json-preview,rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
|
||||||
fi
|
fi
|
||||||
|
|
||||||
default
|
default
|
||||||
|
Loading…
x
Reference in New Issue
Block a user