From e158cd3e4ab2b5ca1066c86664908a228ccf4583 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Wed, 14 May 2025 18:01:50 +0000 Subject: [PATCH] import UBI delve-1.24.1-1.el10_0 --- .delve.metadata | 1 - .gitignore | 2 +- SOURCES/skip-coredump-test.patch | 78 -------- SOURCES/skip-substitute-path-test.patch | 42 ----- SPECS/delve.spec | 155 ---------------- delve.spec | 229 ++++++++++++++++++++++++ sources | 1 + 7 files changed, 231 insertions(+), 277 deletions(-) delete mode 100644 .delve.metadata delete mode 100644 SOURCES/skip-coredump-test.patch delete mode 100644 SOURCES/skip-substitute-path-test.patch delete mode 100644 SPECS/delve.spec create mode 100644 delve.spec create mode 100644 sources diff --git a/.delve.metadata b/.delve.metadata deleted file mode 100644 index feb49e0..0000000 --- a/.delve.metadata +++ /dev/null @@ -1 +0,0 @@ -d5ab14fa3057236314ab9e1973773c01425060a1 SOURCES/delve-1.24.1.tar.gz diff --git a/.gitignore b/.gitignore index 43bffb1..fde03f4 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/delve-1.24.1.tar.gz +delve-1.24.1.tar.gz diff --git a/SOURCES/skip-coredump-test.patch b/SOURCES/skip-coredump-test.patch deleted file mode 100644 index 03f5d36..0000000 --- a/SOURCES/skip-coredump-test.patch +++ /dev/null @@ -1,78 +0,0 @@ -From d5fb3bee427202f0d4b1683bf743bfd2adb41757 Mon Sep 17 00:00:00 2001 -From: Derek Parker -Date: Thu, 20 Mar 2025 01:15:19 -0700 -Subject: [PATCH] proc/core: skip tests on ppc64le (#3954) - -These tests have been somewhat silently failing on our CI because the -test ends up being skipped [due to the lack of coredumpctl](https://delve.teamcity.com/buildConfiguration/Delve_linux_ppc64le_1_24/66766?buildTab=tests&focusLine=NaN&name=testcore&suite=github.com%2Fgo-delve%2Fdelve%2Fpkg%2Fproc%2Fcore%3A+&expandedTest=build%3A%28id%3A66766%29%2Cid%3A2000000704&showLog=66766_20670_112.20612.20670&logFilter=debug&logView=flowAware). - -When `coredumpctl` is present, the test [fails -anyways](https://issues.redhat.com/browse/RHEL-83939), so let's just -skip it on ppc64le for now. ---- - pkg/proc/core/core_test.go | 41 +++++++++++++++++++++----------------- - 1 file changed, 23 insertions(+), 18 deletions(-) - -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/skip-substitute-path-test.patch b/SOURCES/skip-substitute-path-test.patch deleted file mode 100644 index f234e60..0000000 --- a/SOURCES/skip-substitute-path-test.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 55486fbab43420d67323cd3e79cda115e7e687c6 Mon Sep 17 00:00:00 2001 -From: Derek Parker -Date: Thu, 20 Mar 2025 01:14:20 -0700 -Subject: [PATCH] service/test: skip substitutepath test when modules disabled - (#3955) - -See: https://issues.redhat.com/browse/RHEL-83958 ---- - pkg/proc/test/support.go | 6 ++++++ - service/test/integration2_test.go | 2 ++ - 2 files changed, 8 insertions(+) - -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 deleted file mode 100644 index 11ce26c..0000000 --- a/SPECS/delve.spec +++ /dev/null @@ -1,155 +0,0 @@ -%ifarch ppc64le -%global exp "-tags=exp.linuxppc64le" -%endif - -Name: delve -Version: 1.24.1 -Release: 1%{?dist} -Summary: A debugger for the Go programming language - -License: MIT -URL: https://github.com/go-delve/delve -Source0: https://github.com/go-delve/delve/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz - -ExcludeArch: s390x %{ix86} armv7hl - -BuildRequires: compiler(go-compiler) -BuildRequires: git -BuildRequires: lsof - -Provides: dlv = %{version} -Patch1: skip-coredump-test.patch -Patch2: skip-substitute-path-test.patch - - -%description -Delve is a debugger for the Go programming language. The goal of the project -is to provide a simple, full featured debugging tool for Go. Delve should be -easy to invoke and easy to use. Chances are if you're using a debugger, things -aren't going your way. With that in mind, Delve should stay out of your way as -much as possible. - - -%prep -%setup -q -%autopatch -p1 - -rm -rf go.mod -mv vendor %{_builddir}/src -mkdir -p "%{_builddir}/src/github.com/go-delve/" -cp -r %{_builddir}/%{name}-%{version} %{_builddir}/src/github.com/go-delve/%{name} -mkdir -p %{_builddir}/%{name}-%{version}/_build -mv %{_builddir}/src %{_builddir}/%{name}-%{version}/_build/src - - -%build -export GO111MODULE=off -export GOPATH="%{_builddir}/%{name}-%{version}/_build" -%gobuild %{?exp} -o bin/dlv github.com/go-delve/delve/cmd/dlv - - -%install -export GO111MODULE=off -export GOPATH="%{_builddir}/%{name}-%{version}/_build" -install -Dpm 0755 bin/dlv %{buildroot}%{_bindir}/dlv - - -%check -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} -done - - -%files -%license LICENSE -%doc CONTRIBUTING.md CHANGELOG.md -%doc Documentation/* -%{_bindir}/dlv - - -%changelog -* Fri Mar 14 2025 David Benoit - 1.24.1-1 -- Rebase to 1.24.1 -- Skip unsupported tests -- Resolves: RHEL-83451 - -* Fri Aug 16 2024 Alejandro Sáez - 1.22.1-1 -- Rebase to 1.22.1 -- Resolves: RHEL-54307 - -* Wed Jan 31 2024 Alejandro Sáez - 1.21.2-3 -- Skip an additional test as it's breaking in the CI system. -- Modify the name of the patch. -- Resolves: RHEL-22820 - -* Fri Jan 26 2024 Alejandro Sáez - 1.21.2-2 -- Fix: Remove architectures from exclude ExcludeArch -- Resolves: RHEL-22820 - -* Fri Jan 26 2024 Alejandro Sáez - 1.21.2-1 -- Rebase to 1.21.2 -- Add support for ppc64le and aarch64 -- Enable the test suite -- Modify ports: Some CI systems complain about the usage of the 8888 port. -- Improve the way PPC64LE support is enabled. -- Resolves: RHEL-22820 - -* Fri May 26 2023 Alejandro Sáez - 1.20.2-1 -- Rebase to 1.20.2 -- Resolves: rhbz#2186495 - -* Fri Sep 30 2022 Alejandro Sáez - 1.9.1-1 -- Rebase to 1.9.1 -- Related: rhbz#2131026 - -* Wed Apr 27 2022 Alejandro Sáez - 1.8.3-1 -- Rebase to 1.8.3 -- Resolves: rhbz#2077956 -- Resolves: rhbz#2076501 - -* Thu Oct 14 2021 Alejandro Sáez - 1.7.2-1 -- Rebase to 1.7.2 -- Related: rhbz#2014088 - -* Wed Mar 17 2021 Alejandro Sáez - 1.6.0-1 -- Rebase to 1.6.0 -- Resolves: rhbz#1938071 -- Removes golang-1.15.4-TestStepIntoWrapperForEmbeddedPointer.patch - -* Tue Nov 24 2020 David Benoit - 1.5.0-2 -- Add golang-1.15.4 related patch -- Resolves: rhbz#1901189 - -* Wed Sep 09 2020 Alejandro Sáez - 1.5.0-1 -- Rebase to 1.5.0 -- Related: rhbz#1870531 - -* Mon May 25 2020 Alejandro Sáez - 1.4.1-1 -- Rebase to 1.4.1 -- Resolves: rhbz#1821281 -- Related: rhbz#1820596 - -* Fri May 22 2020 Alejandro Sáez - 1.4.0-2 -- Change i686 to a better macro -- Related: rhbz#1820596 - -* Tue Apr 28 2020 Alejandro Sáez - 1.4.0-1 -- Rebase to 1.4.0 -- Remove Patch1781 -- Related: rhbz#1820596 - -* Thu Jan 16 2020 Alejandro Sáez - 1.3.2-3 -- Resolves: rhbz#1758612 -- Resolves: rhbz#1780554 -- Add patch: 1781-pkg-terminal-Fix-exit-status.patch - -* Wed Jan 15 2020 Alejandro Sáez - 1.3.2-2 -- Added tests -- Related: rhbz#1758612 - -* Wed Nov 27 2019 Alejandro Sáez - 1.3.2-1 -- First package for RHEL -- Related: rhbz#1758612 diff --git a/delve.spec b/delve.spec new file mode 100644 index 0000000..b2b6454 --- /dev/null +++ b/delve.spec @@ -0,0 +1,229 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.6.5) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 1; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} +## END: Set by rpmautospec + +# Run tests in check section +%bcond_without check + +%ifarch ppc64le +%global exp "-tags=exp.linuxppc64le" +%endif + + +# https://github.com/go-delve/delve +%global goipath github.com/go-delve/delve +Version: 1.24.1 + +%global common_description %{expand: +Delve is a debugger for the Go programming language. The goal of the project +is to provide a simple, full featured debugging tool for Go. Delve should be +easy to invoke and easy to use. Chances are if you're using a debugger, things +aren't going your way. With that in mind, Delve should stay out of your way as +much as possible.} + +# Currently Delve only supports x86_64, aarch64, and ppc64le +%global golang_arches x86_64 aarch64 ppc64le + +%gometa + +Name: delve +Release: %autorelease +Summary: A debugger for the Go programming language +# Detected licences +# - Expat License at 'LICENSE' +# It is a SPDX license already +License: MIT +URL: %{gourl} +Source0: %{gosource} + +BuildRequires: lsof +BuildRequires: git + +# Bundled/Vendored provides generated by bundled-deps.sh based on the in tree module data +# - in version filed substituted with . per versioning guidelines +Provides: bundled(golang(github.com/cilium/ebpf)) = 0.11.0 +Provides: bundled(golang(github.com/cosiner/argv)) = 0.1.0 +Provides: bundled(golang(github.com/cpuguy83/go.md2man/v2)) = 2.0.6 +Provides: bundled(golang(github.com/creack/pty)) = 1.1.20 +Provides: bundled(golang(github.com/derekparker/trie)) = 0.0.0.20230829180723.39f4de51ef7d +Provides: bundled(golang(github.com/go.delve/liner)) = 1.2.3.0.20231231155935.4726ab1d7f62 +Provides: bundled(golang(github.com/google/go.dap)) = 0.12.0 +Provides: bundled(golang(github.com/hashicorp/golang.lru)) = 1.0.2 +Provides: bundled(golang(github.com/inconshreveable/mousetrap)) = 1.1.0 +Provides: bundled(golang(github.com/mattn/go.colorable)) = 0.1.13 +Provides: bundled(golang(github.com/mattn/go.isatty)) = 0.0.20 +Provides: bundled(golang(github.com/mattn/go.runewidth)) = 0.0.13 +Provides: bundled(golang(github.com/rivo/uniseg)) = 0.2.0 +Provides: bundled(golang(github.com/russross/blackfriday/v2)) = 2.1.0 +Provides: bundled(golang(github.com/spf13/cobra)) = 1.9.1 +Provides: bundled(golang(github.com/spf13/pflag)) = 1.0.6 +Provides: bundled(golang(golang.org/x/arch)) = 0.11.0 +Provides: bundled(golang(golang.org/x/exp)) = 0.0.0.20230224173230.c95f2b4c22f2 +Provides: bundled(golang(golang.org/x/mod)) = 0.20.0 +Provides: bundled(golang(golang.org/x/sync)) = 0.8.0 +Provides: bundled(golang(golang.org/x/sys)) = 0.26.0 +Provides: bundled(golang(golang.org/x/telemetry)) = 0.0.0.20241106142447.58a1122356f5 +Provides: bundled(golang(golang.org/x/tools)) = 0.14.0 +Provides: bundled(golang(gopkg.in/yaml.v3)) = 3.0.1 +Provides: bundled(golang(go.starlark.net)) = 0.0.0.20231101134539.556fd59b42f6 + +%description +%{common_description} + +%prep +echo "=== Start prep ===" +%goprep -k +# unpack vendored dependencies to GOPATH +tar c -C vendor/ . | tar x -C %{gobuilddir}/src + +%build +%gobuild %{?exp} -o %{gobuilddir}/bin/dlv %{goipath}/cmd/dlv + +%install +install -m 0755 -vd %{buildroot}%{_bindir} +install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ + +%if %{with check} +%check +export GO111MODULE=off +export GOPATH=%{buildroot}/%{gopath}:%{gobuilddir}:%{gopath} +delvepath=%{buildroot}/%{gopath}/src/%{goipath} +mkdir -p $delvepath +mkdir -p $delvepath/pkg/dwarf/line +mkdir -p $delvepath/pkg/proc/internal +cp -r _fixtures $delvepath +cp -r pkg/dwarf $delvepath/pkg/ +cp -r pkg/dwarf/line/_testdata $delvepath/pkg/dwarf/line +cp -r pkg/proc/internal/ebpf $delvepath/pkg/proc/internal/ + +pushd $delvepath +for d in $(go list %{?exp} ./... | grep -v cmd | grep -v scripts); do + go test %{?exp} ${d} -skip TestGuessSubstitutePath +done +rm -rf $delvepath +popd +%endif + +%files +%license LICENSE vendor/modules.txt +%doc CONTRIBUTING.md CHANGELOG.md +%doc Documentation/* +%{_bindir}/dlv + +%changelog +## START: Generated by rpmautospec +* Fri Mar 14 2025 David Benoit - 1.24.1-1 +- Update Delve to 1.24.1 + +* Fri Nov 29 2024 Edjunior Machado - 1.22.1-6 +- plans/ci.fmf: Update repo + +* Tue Oct 29 2024 Troy Dawson - 1.22.1-5 +- Bump release for October 2024 mass rebuild: + +* Thu Aug 22 2024 Alejandro Sáez - 1.22.1-4 +- Remove macro and tidy up + +* Fri Aug 16 2024 Alejandro Sáez - 1.22.1-3 +- Enable ppc64le + +* Mon Jun 24 2024 Troy Dawson - 1.22.1-2 +- Bump release for June 2024 mass rebuild + +* Wed May 22 2024 Alejandro Sáez - 1.22.1-1 +- Bump up to Delve 1.22.1 + +* Fri May 03 2024 Edjunior Machado - 1.22.0-6 +- gating.yaml: Add gating config for rhel-10 + +* Wed Feb 14 2024 Yaakov Selkowitz - 1.22.0-5 +- Skip tests failing due to network configuration + +* Fri Feb 02 2024 Alejandro Sáez - 1.22.0-4 +- Skip tests due to version issues + +* Wed Jan 24 2024 Fedora Release Engineering - 1.22.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 1.22.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Dec 31 2023 Packit - 1.22.0-1 +- [packit] 1.22.0 upstream release +- Resolves rhbz#2242098 + +* Thu Dec 14 2023 Yaakov Selkowitz - 1.21.2-2 +- Drop dynamic buildrequires + +* Wed Dec 13 2023 Alejandro Sáez - 1.21.2-1 +- Update to 1.21.2 + +* Fri Nov 17 2023 Alejandro Sáez - 1.21.0-4 +- Set up Packit integration + +* Fri Nov 17 2023 Edjunior Machado - 1.21.0-3 +- Introduce CI gating + +* Fri Sep 29 2023 Alejandro Sáez - 1.21.0-2 +- Migrated to SPDX license + +* Mon Jul 31 2023 Alejandro Sáez - 1.21.0-1 +- Update to delve-1.21.0 + +* Wed Jul 19 2023 Fedora Release Engineering - 1.20.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jun 29 2023 Yaakov Selkowitz - 1.20.2-2 +- Use vendored dependencies for RHEL builds + +* Mon Apr 17 2023 Alejandro Sáez - 1.20.2-1 +- Update to Delve 1.20.2 + +* Thu Mar 30 2023 Alejandro Sáez - 1.20.1-1 +- Update to 1.20.1 + +* Tue Mar 28 2023 Tomas Hrcka - 1.2.0-11 +- Unretirement request: https://pagure.io/releng/issue/11359 + +* Wed Jul 24 2019 Fedora Release Engineering - 1.2.0-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Wed Feb 27 2019 Derek Parker - 1.2.0-9 +- Use custom check section + +* Mon Feb 25 2019 Derek Parker - 1.2.0-8 +- Exclude armv7hl + +* Mon Feb 25 2019 Derek Parker - 1.2.0-7 +- Exclude non-supported arches + +* Fri Feb 22 2019 Derek Parker - 1.2.0-6 +- Add ExclusiveArch + +* Fri Feb 22 2019 Derek Parker - 1.2.0-5 +- Add sources file + +* Fri Feb 22 2019 Derek Parker - 1.2.0-4 +- Add patch to remove empty doc file + +* Fri Feb 22 2019 Derek Parker - 1.2.0-3 +- Switch back to using gochecks + +* Fri Feb 22 2019 Derek Parker - 1.2.0-2 +- Fix spec file and patch tests to run in package build + +* Fri Feb 22 2019 Derek Parker - 1.2.0-1 +- Update spec for v1.2.0 + +* Fri Feb 22 2019 Derek Parker - 1.1.0-2 +- Update doc location output, cleanup spec + +* Fri Feb 22 2019 Derek Parker - 1.1.0-1 +- Initial spec file +## END: Generated by rpmautospec diff --git a/sources b/sources new file mode 100644 index 0000000..b71893d --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (delve-1.24.1.tar.gz) = 7308339af2ef0da14b3d1860d99a602f6fdf3861afd12fd25930c2587bec3099905d3c74ae3d93a193d9aebc77bea4eb4fe3878e3a84c45616ea9926d6b6ba27