From ed9f1bfd7079c1ddf21b32fbadf360921fc3894a Mon Sep 17 00:00:00 2001 From: eabdullin Date: Thu, 10 Apr 2025 02:38:54 +0000 Subject: [PATCH] import UBI delve-1.24.1-2.el9_5 --- .delve.metadata | 2 +- .gitignore | 2 +- SOURCES/fix-rhel-83939.patch | 63 ++++++++++++++++++++++++++++++++++++ SOURCES/fix-rhel-83958.patch | 30 +++++++++++++++++ SPECS/delve.spec | 20 ++++++++++-- 5 files changed, 112 insertions(+), 5 deletions(-) create mode 100644 SOURCES/fix-rhel-83939.patch create mode 100644 SOURCES/fix-rhel-83958.patch diff --git a/.delve.metadata b/.delve.metadata index e30cd18..feb49e0 100644 --- a/.delve.metadata +++ b/.delve.metadata @@ -1 +1 @@ -c8f99369a4bbf64032d480c11f416049c583069e SOURCES/delve-1.22.1.tar.gz +d5ab14fa3057236314ab9e1973773c01425060a1 SOURCES/delve-1.24.1.tar.gz diff --git a/.gitignore b/.gitignore index 8e8ad70..43bffb1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/delve-1.22.1.tar.gz +SOURCES/delve-1.24.1.tar.gz diff --git a/SOURCES/fix-rhel-83939.patch b/SOURCES/fix-rhel-83939.patch new file mode 100644 index 0000000..b42e401 --- /dev/null +++ b/SOURCES/fix-rhel-83939.patch @@ -0,0 +1,63 @@ +diff --git a/pkg/proc/core/core_test.go b/pkg/proc/core/core_test.go +index dddc1d3e7..52b210b6f 100644 +--- a/pkg/proc/core/core_test.go ++++ b/pkg/proc/core/core_test.go +@@ -249,15 +249,8 @@ func logRegisters(t *testing.T, regs proc.Registers, arch *proc.Arch) { + } + + func TestCore(t *testing.T) { +- if runtime.GOOS != "linux" || runtime.GOARCH == "386" { +- t.Skip("unsupported") +- } +- if runtime.GOOS != "linux" || runtime.GOARCH == "loong64" { +- t.Skip("could not read runtime.sigtrampgo context") +- } +- if runtime.GOOS == "linux" && os.Getenv("CI") == "true" && buildMode == "pie" { +- t.Skip("disabled on linux, Github Actions, with PIE buildmode") +- } ++ mustSupportCore(t) ++ + grp := withCoreFile(t, "panic", "") + p := grp.Selected + +@@ -412,15 +405,8 @@ func TestCoreFpRegisters(t *testing.T) { + } + + func TestCoreWithEmptyString(t *testing.T) { +- if runtime.GOOS != "linux" || runtime.GOARCH == "386" { +- t.Skip("unsupported") +- } +- if runtime.GOOS != "linux" || runtime.GOARCH == "loong64" { +- t.Skip("could not read runtime.sigtrampgo context") +- } +- if runtime.GOOS == "linux" && os.Getenv("CI") == "true" && buildMode == "pie" { +- t.Skip("disabled on linux, Github Actions, with PIE buildmode") +- } ++ mustSupportCore(t) ++ + grp := withCoreFile(t, "coreemptystring", "") + p := grp.Selected + +@@ -536,3 +522,22 @@ func procdump(t *testing.T, exePath string) string { + t.Fatalf("could not find dump file") + return "" + } ++ ++func mustSupportCore(t *testing.T) { ++ t.Helper() ++ ++ if runtime.GOOS != "linux" { ++ t.Skip("test must be run on linux") ++ } ++ ++ switch runtime.GOARCH { ++ case "386", "ppc64le": ++ t.Skip("unsupported") ++ case "loong64": ++ t.Skip("could not read runtime.sigtrampgo context") ++ } ++ ++ if os.Getenv("CI") == "true" && buildMode == "pie" { ++ t.Skip("disabled on linux, Github Actions, with PIE buildmode") ++ } ++} diff --git a/SOURCES/fix-rhel-83958.patch b/SOURCES/fix-rhel-83958.patch new file mode 100644 index 0000000..18665a0 --- /dev/null +++ b/SOURCES/fix-rhel-83958.patch @@ -0,0 +1,30 @@ +diff --git a/pkg/proc/test/support.go b/pkg/proc/test/support.go +index d1f25bd49..c8efea360 100644 +--- a/pkg/proc/test/support.go ++++ b/pkg/proc/test/support.go +@@ -392,6 +392,12 @@ func MustHaveCgo(t *testing.T) { + } + } + ++func MustHaveModules(t *testing.T) { ++ if os.Getenv("GO111MODULE") == "off" { ++ t.Skip("skipping test which requires go modules") ++ } ++} ++ + func RegabiSupported() bool { + // Tracks regabiSupported variable in ParseGOEXPERIMENT internal/buildcfg/exp.go + switch { +diff --git a/service/test/integration2_test.go b/service/test/integration2_test.go +index 9ef131a3e..2e3928fb8 100644 +--- a/service/test/integration2_test.go ++++ b/service/test/integration2_test.go +@@ -3157,6 +3157,8 @@ func TestBreakpointVariablesWithoutG(t *testing.T) { + } + + func TestGuessSubstitutePath(t *testing.T) { ++ protest.MustHaveModules(t) ++ + t.Setenv("NOCERT", "1") + ver, _ := goversion.Parse(runtime.Version()) + if ver.IsDevelBuild() && os.Getenv("CI") != "" && runtime.GOOS == "linux" { diff --git a/SPECS/delve.spec b/SPECS/delve.spec index b0762c7..6579a97 100644 --- a/SPECS/delve.spec +++ b/SPECS/delve.spec @@ -3,8 +3,8 @@ %endif Name: delve -Version: 1.22.1 -Release: 1%{?dist} +Version: 1.24.1 +Release: 2%{?dist} Summary: A debugger for the Go programming language License: MIT @@ -21,6 +21,10 @@ Provides: dlv = %{version} Patch0001: modify-ports.patch +# TODO: remove these once version 1.24.2 is released. +Patch0002: fix-rhel-83939.patch +Patch0003: fix-rhel-83958.patch + %description Delve is a debugger for the Go programming language. The goal of the project @@ -59,7 +63,7 @@ export GO111MODULE=off export GOPATH="%{_builddir}/%{name}-%{version}/_build" cd "_build/src/github.com/go-delve/%{name}" for d in $(go list %{?exp} ./... | grep -v cmd | grep -v scripts); do - go test %{?exp} ${d} + go test %{?exp} ${d} -skip 'TestGuessSubstitutePath' done @@ -71,6 +75,16 @@ done %changelog +* Thu Mar 20 2025 Derek Parker - 1.24.1-2 +- Fix 3 test failures +- Resolves: RHEL-83939 +- Resolves: RHEL-83958 +- Resolves: RHEL-7373 + +* Thu Mar 13 2025 David Benoit - 1.24.1-1 +- Rebase to Delve 1.24.1 +- Resolves: RHEL-64445 + * Fri Aug 16 2024 Alejandro Sáez - 1.22.1-1 - Rebase to Delve 1.22.1 - Resolves: RHEL-50840