Sync from SUSE:SLFO:Main rust1.81 revision 71f6bddcfe3775bc32c949a5ddfe5527

This commit is contained in:
Adrian Schröter 2024-12-20 16:12:04 +01:00
parent a1ea514cc1
commit 1a55163473
3 changed files with 67 additions and 14 deletions

View File

@ -0,0 +1,34 @@
From f965ed2f96fd846436345b4a952c77900c3a644b Mon Sep 17 00:00:00 2001
From: William <william@blackhats.net.au>
Date: Tue, 10 Dec 2024 12:57:45 +1000
Subject: [PATCH] Disable pidfs tests for 15SP3
SLE-15-SP3 has a kernel that is too old to correctly use pidfs. Disable
testing pidfs features for that platform.
---
library/std/src/sys/pal/unix/linux/pidfd/tests.rs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/library/std/src/sys/pal/unix/linux/pidfd/tests.rs b/library/std/src/sys/pal/unix/linux/pidfd/tests.rs
index fb928c76fbd..686d92c50be 100644
--- a/library/std/src/sys/pal/unix/linux/pidfd/tests.rs
+++ b/library/std/src/sys/pal/unix/linux/pidfd/tests.rs
@@ -5,6 +5,7 @@
use crate::process::Command;
#[test]
+#[ignore = "fails on 15-SP3"]
fn test_command_pidfd() {
let pidfd_open_available = probe_pidfd_support();
@@ -57,6 +58,7 @@ fn test_command_pidfd() {
}
#[test]
+#[ignore = "fails on 15-SP3"]
fn test_pidfd() {
if !probe_pidfd_support() {
return;
--
2.47.1

View File

@ -1,3 +1,14 @@
-------------------------------------------------------------------
Thu Dec 12 02:55:09 UTC 2024 - William Brown <william.brown@suse.com>
- add patch: 0001-Disable-pidfs-tests-for-15SP3.patch
- bsc#1232667 - SLFO:Main requires changes for gcc version detection
-------------------------------------------------------------------
Tue Sep 24 03:52:06 UTC 2024 - William Brown <william.brown@suse.com>
- Fix specification of cmake version for SLE15SP3 and SP4
-------------------------------------------------------------------
Tue Sep 10 05:44:36 UTC 2024 - William Brown <william.brown@suse.com>

View File

@ -23,13 +23,14 @@
# This has to be kept lock step to the rust version.
# -- will be 18 for 1.78
%global llvm_version 18
%if 0%{?sle_version} <= 150900 && 0%{?suse_version} < 1599
%if 0%{?gcc_version} < 13
# We may need a minimum gcc version for some linker flags
# This is especially true on leap/sle
#
# ⚠️ 11 or greater is required for a number of linker flags to be supported in sle.
# ⚠️ 13 or greater is required for a number of linker flags to be supported in sle.
#
%global gcc_version 13
%global need_gcc_version 13
%endif
#KEEP NOSOURCE DEBUGINFO
@ -153,8 +154,8 @@ Obsoletes: %{1}1.62%{?2:-%{2}}
%if %{with llvmtools}
%define rust_linker clang
%else
%if 0%{?gcc_version} != 0
%define rust_linker gcc-%{gcc_version}
%if 0%{?need_gcc_version} != 0
%define rust_linker gcc-%{need_gcc_version}
%else
%define rust_linker cc
%endif
@ -279,6 +280,13 @@ Patch0: ignore-Wstring-conversion.patch
# IMPORTANT - To generate patches for submodules in git so they apply relatively you can use
# git format-patch --text --dst-prefix=b/src/tools/cargo/ HEAD~2
# SLE 15 SP3 and lower do not support pidfs, but it's not possible to disable that
# test individually. As a result, we have to skip testing below 15.4.
%if 0%{?sle_version} <= 150400
Patch3: 0001-Disable-pidfs-tests-for-15SP3.patch
%endif
BuildRequires: chrpath
BuildRequires: curl
# BUG - fdupes on leap/sle causes issues with debug info
@ -317,9 +325,9 @@ BuildRequires: lld
Requires: clang
Requires: lld
%else
%if 0%{?gcc_version} != 0
BuildRequires: gcc%{gcc_version}-c++
Requires: gcc%{gcc_version}
%if 0%{?need_gcc_version} != 0
BuildRequires: gcc%{need_gcc_version}-c++
Requires: gcc%{need_gcc_version}
%else
BuildRequires: gcc-c++
Requires: gcc
@ -328,11 +336,11 @@ Requires: gcc
# CMake and Ninja required to drive the bundled llvm build.
# Cmake is also needed in tests.
%if 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 150200
%if 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 150300
# In these distros cmake is 2.x, or 3.X < 3.13, so we need cmake3 for building llvm.
BuildRequires: cmake3 > 3.13.4
BuildRequires: cmake3 >= 3.20.0
%else
BuildRequires: cmake > 3.13.4
BuildRequires: cmake >= 3.20.0
%endif
# To build rust-lld
@ -498,10 +506,10 @@ export CXX="/usr/bin/clang++"
EOF
%else
%if 0%{?gcc_version} != 0
%if 0%{?need_gcc_version} != 0
cat > .env.sh <<EOF
export CC="/usr/bin/gcc-%{gcc_version}"
export CXX="/usr/bin/g++-%{gcc_version}"
export CC="/usr/bin/gcc-%{need_gcc_version}"
export CXX="/usr/bin/g++-%{need_gcc_version}"
EOF
%else
cat > .env.sh <<EOF