Accepting request 1230230 from devel:languages:rust

OBS-URL: https://build.opensuse.org/request/show/1230230
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rust1.82?expand=0&rev=4
This commit is contained in:
Ana Guerrero 2024-12-12 20:14:26 +00:00 committed by Git OBS Bridge
commit ca150a5615
3 changed files with 62 additions and 11 deletions

View File

@ -0,0 +1,34 @@
From 7c8e184e1f97d9bf4ebd16e32e57bfd26618308f 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,13 @@
-------------------------------------------------------------------
Tue Dec 10 04:53:57 UTC 2024 - William Brown <william.brown@suse.com>
- add patch: 0001-Disable-pidfs-tests-for-15SP3.patch
-------------------------------------------------------------------
Wed Nov 6 04:54:52 UTC 2024 - William Brown <william.brown@suse.com>
- bsc#1232667 - SLFO:Main requires changes for gcc version detection
-------------------------------------------------------------------
Tue Nov 5 03:41:46 UTC 2024 - William Brown <william.brown@suse.com>

View File

@ -21,13 +21,13 @@
%global version_current 1.82.0
%global version_previous 1.81.0
%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
@ -146,8 +146,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
@ -274,6 +274,13 @@ Patch1: ppc64le-float.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
@ -312,9 +319,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
@ -480,10 +487,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