Compare commits

...

No commits in common. "c8-stream-rhel8" and "c10s" have entirely different histories.

15 changed files with 263 additions and 220 deletions

View File

@ -1 +0,0 @@
c8f99369a4bbf64032d480c11f416049c583069e SOURCES/delve-1.22.1.tar.gz

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

7
.gitignore vendored
View File

@ -1 +1,6 @@
SOURCES/delve-1.22.1.tar.gz
/delve-1.20.1.tar.gz
/delve-1.20.2.tar.gz
/delve-1.21.0.tar.gz
/delve-1.21.2.tar.gz
/delve-1.22.0.tar.gz
/delve-1.22.1.tar.gz

30
.packit.yml Normal file
View File

@ -0,0 +1,30 @@
specfile_path: delve.spec
files_to_sync:
- delve.spec
- .packit.yaml
upstream_package_name: delve
upstream_project_url: https://github.com/go-delve/delve
downstream_package_name: delve
upstream_tag_template: v{version}
jobs:
- job: pull_from_upstream
trigger: release
dist_git_branches:
- fedora-all
actions:
changelog-entry:
- bash -c 'echo "- New release ${PACKIT_PROJECT_VERSION}"'
- job: koji_build
trigger: commit
dist_git_branches:
- fedora-all
- job: bodhi_update
trigger: commit
dist_git_branches:
- fedora-all

View File

@ -0,0 +1,37 @@
From 73c738dcddaf9771c1ef5ab48b34c259cac4653c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=81lex=20S=C3=A1ez?= <asm@redhat.com>
Date: Fri, 2 Feb 2024 14:14:34 +0100
Subject: [PATCH] Skipping due issues with the go version in Fedora
If the Go package gets an update, Koschei will trigger a Delve build
that will fail because Delve is not supporting the newer version of Go.
Skipping these tests is not ideal but gore returns an error if the go
version is missing.
---
pkg/proc/proc_test.go | 2 ++
1 file changed, 2 insertions(+)
diff --git a/pkg/proc/proc_test.go b/pkg/proc/proc_test.go
index d39d516b..5992e9e8 100644
--- a/pkg/proc/proc_test.go
+++ b/pkg/proc/proc_test.go
@@ -3188,6 +3188,7 @@ func TestShadowedFlag(t *testing.T) {
func TestDebugStripped(t *testing.T) {
// Currently only implemented for Linux ELF and macOS Mach-O executables.
// TODO(derekparker): Add support for PE.
+ skipOn(t, "not working on Fedora CI", "linux")
skipOn(t, "not working on windows", "windows")
skipOn(t, "not working on freebsd", "freebsd")
skipOn(t, "not working on linux/386", "linux", "386")
@@ -3205,6 +3206,7 @@ func TestDebugStripped(t *testing.T) {
func TestDebugStripped2(t *testing.T) {
// Currently only implemented for Linux ELF executables.
// TODO(derekparker): Add support for PE.
+ skipOn(t, "not working on Fedora CI", "linux")
skipOn(t, "not working on windows", "windows")
skipOn(t, "not working on freebsd", "freebsd")
skipOn(t, "not working on linux/386", "linux", "386")
--
2.43.0

View File

@ -0,0 +1,12 @@
diff --git a/pkg/terminal/command_test.go b/pkg/terminal/command_test.go
index d97d0bc..a71e34b 100644
--- a/pkg/terminal/command_test.go
+++ b/pkg/terminal/command_test.go
@@ -690,6 +690,7 @@ func TestRestart(t *testing.T) {
}
func TestIssue827(t *testing.T) {
+ t.Skip("port 8888 might already be in use")
// switching goroutines when the current thread isn't running any goroutine
// causes nil pointer dereference.
withTestTerminal("notify-v2", t, func(term *FakeTerminal) {

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# delve
The delve package

3
README.packit Normal file
View File

@ -0,0 +1,3 @@
This repository is maintained by packit.
https://packit.dev/
The file was generated using packit 0.87.1.post1.dev11+gd1f7091b.

View File

@ -1,68 +0,0 @@
From 0d8ba2001ceacd67a8861f470399f695cabc8802 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=81lex=20S=C3=A1ez?= <asm@redhat.com>
Date: Wed, 24 Jan 2024 13:10:29 +0100
Subject: [PATCH] Modify tests
Some tests are not working properly with the build system so we need to
adapt them, like changing the ports they used.
---
_fixtures/notify-v2.go | 2 +-
pkg/proc/proc_test.go | 3 +++
pkg/terminal/command_test.go | 2 +-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/_fixtures/notify-v2.go b/_fixtures/notify-v2.go
index eb80526b..0f562c27 100644
--- a/_fixtures/notify-v2.go
+++ b/_fixtures/notify-v2.go
@@ -19,5 +19,5 @@ func main() {
}()
})
- log.Fatalln(http.ListenAndServe("127.0.0.1:8888", nil))
+ log.Fatalln(http.ListenAndServe("127.0.0.1:8889", nil))
}
diff --git a/pkg/proc/proc_test.go b/pkg/proc/proc_test.go
index 714a4d1d..ea1d94a9 100644
--- a/pkg/proc/proc_test.go
+++ b/pkg/proc/proc_test.go
@@ -2512,6 +2512,7 @@ func TestStepConcurrentDirect(t *testing.T) {
}
func TestStepConcurrentPtr(t *testing.T) {
+ t.Skipf("Skipping due to CI issues")
protest.AllowRecording(t)
withTestProcess("teststepconcurrent", t, func(p *proc.Target, grp *proc.TargetGroup, fixture protest.Fixture) {
setFileBreakpoint(p, t, fixture.Source, 24)
@@ -5491,6 +5492,7 @@ func TestWatchpointCounts(t *testing.T) {
skipOn(t, "not implemented", "386")
skipOn(t, "see https://github.com/go-delve/delve/issues/2768", "windows")
skipOn(t, "not implemented", "ppc64le")
+ skipOn(t, "fails on CI", "arm64")
protest.AllowRecording(t)
withTestProcess("databpcountstest", t, func(p *proc.Target, grp *proc.TargetGroup, fixture protest.Fixture) {
@@ -6080,6 +6082,7 @@ func TestEscapeCheckUnreadable(t *testing.T) {
}
func TestStepShadowConcurrentBreakpoint(t *testing.T) {
+ t.Skipf("Skipping due to CI issues")
// Checks that a StepBreakpoint can not shadow a concurrently hit user breakpoint
withTestProcess("stepshadow", t, func(p *proc.Target, grp *proc.TargetGroup, fixture protest.Fixture) {
break2 := setFunctionBreakpoint(p, t, "main.stacktraceme2")
diff --git a/pkg/terminal/command_test.go b/pkg/terminal/command_test.go
index 57b62105..f6e3a3d9 100644
--- a/pkg/terminal/command_test.go
+++ b/pkg/terminal/command_test.go
@@ -695,7 +695,7 @@ func TestIssue827(t *testing.T) {
withTestTerminal("notify-v2", t, func(term *FakeTerminal) {
go func() {
time.Sleep(1 * time.Second)
- resp, err := http.Get("http://127.0.0.1:8888/test")
+ resp, err := http.Get("http://127.0.0.1:8889/test")
if err == nil {
resp.Body.Close()
}
--
2.43.0

View File

@ -1,150 +0,0 @@
%ifarch ppc64le
%global exp "-tags=exp.linuxppc64le"
%endif
Name: delve
Version: 1.22.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}
Patch0001: modify-tests.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 Aug 16 2024 Alejandro Sáez <asm@redhat.com> - 1.22.1-1
- Rebase to 1.22.1
- Resolves: RHEL-54307
* Wed Jan 31 2024 Alejandro Sáez <asm@redhat.com> - 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 <asm@redhat.com> - 1.21.2-2
- Fix: Remove architectures from exclude ExcludeArch
- Resolves: RHEL-22820
* Fri Jan 26 2024 Alejandro Sáez <asm@redhat.com> - 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 <asm@redhat.com> - 1.20.2-1
- Rebase to 1.20.2
- Resolves: rhbz#2186495
* Fri Sep 30 2022 Alejandro Sáez <asm@redhat.com> - 1.9.1-1
- Rebase to 1.9.1
- Related: rhbz#2131026
* Wed Apr 27 2022 Alejandro Sáez <asm@redhat.com> - 1.8.3-1
- Rebase to 1.8.3
- Resolves: rhbz#2077956
- Resolves: rhbz#2076501
* Thu Oct 14 2021 Alejandro Sáez <asm@redhat.com> - 1.7.2-1
- Rebase to 1.7.2
- Related: rhbz#2014088
* Wed Mar 17 2021 Alejandro Sáez <asm@redhat.com> - 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 <dbenoit@redhat.com> - 1.5.0-2
- Add golang-1.15.4 related patch
- Resolves: rhbz#1901189
* Wed Sep 09 2020 Alejandro Sáez <asm@redhat.com> - 1.5.0-1
- Rebase to 1.5.0
- Related: rhbz#1870531
* Mon May 25 2020 Alejandro Sáez <asm@redhat.com> - 1.4.1-1
- Rebase to 1.4.1
- Resolves: rhbz#1821281
- Related: rhbz#1820596
* Fri May 22 2020 Alejandro Sáez <asm@redhat.com> - 1.4.0-2
- Change i686 to a better macro
- Related: rhbz#1820596
* Tue Apr 28 2020 Alejandro Sáez <asm@redhat.com> - 1.4.0-1
- Rebase to 1.4.0
- Remove Patch1781
- Related: rhbz#1820596
* Thu Jan 16 2020 Alejandro Sáez <asm@redhat.com> - 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 <asm@redhat.com> - 1.3.2-2
- Added tests
- Related: rhbz#1758612
* Wed Nov 27 2019 Alejandro Sáez <asm@redhat.com> - 1.3.2-1
- First package for RHEL
- Related: rhbz#1758612

22
bundled-deps.sh Executable file
View File

@ -0,0 +1,22 @@
#! /bin/bash
# Copyright (C) 2021 Jakub Čajka jcajka@redhat.com
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
provides=""
for bundle in $(find -name modules.txt); do
provides="$provides\n$(cat "$bundle" | grep "^# " | grep -v "# explicit" | sed -r s/"^#.* => "// | sed -r "s/# //" | sed -r "s:(.*) v(.*):Provides\: bundled(golang(\1)) = \2:")"
done
echo -e "$provides" | sed 's/-/./g' | sort -u

115
delve.spec Normal file
View File

@ -0,0 +1,115 @@
# 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.22.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.2
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.11.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/sirupsen/logrus)) = 1.9.3
Provides: bundled(golang(github.com/spf13/cobra)) = 1.7.0
Provides: bundled(golang(github.com/spf13/pflag)) = 1.0.5
Provides: bundled(golang(github.com/stretchr/testify)) = 1.8.4
Provides: bundled(golang(golang.org/x/arch)) = 0.6.0
Provides: bundled(golang(golang.org/x/exp)) = 0.0.0.20230224173230.c95f2b4c22f2
Provides: bundled(golang(golang.org/x/mod)) = 0.14.0
Provides: bundled(golang(golang.org/x/sys)) = 0.13.0
Provides: bundled(golang(golang.org/x/tools)) = 0.14.0
Provides: bundled(golang(gopkg.in/yaml.v2)) = 2.4.0
Provides: bundled(golang(gopkg.in/yaml.v3)) = 3.0.1
Provides: bundled(golang(go.starlark.net)) = 0.0.0.20231101134539.556fd59b42f6
Patch0001: 0001-Skipping-due-issues-with-the-go-version-in-Fedora.patch
Patch0002: 0002-Skipping-due-issues-with-network-access.patch
%description
%{common_description}
%prep
echo "=== Start prep ==="
%goprep -k
# unpack vendored dependencies to GOPATH
tar c -C vendor/ . | tar x -C %{gobuilddir}/src
%autopatch -v -p1
%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}
done
rm -rf $delvepath
popd
%endif
%files
%license LICENSE vendor/modules.txt
%doc CONTRIBUTING.md CHANGELOG.md
%doc Documentation/*
%{_bindir}/dlv
%changelog
%autochangelog

27
gating.yaml Normal file
View File

@ -0,0 +1,27 @@
--- !Policy
product_versions:
- fedora-*
decision_context: bodhi_update_push_stable
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
--- !Policy
product_versions:
- rhel-8
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
--- !Policy
product_versions:
- rhel-9
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional}
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1-tmt-aarch64.functional}
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1-tmt-ppc64le.functional}
- !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1-tmt-x86_64.functional}

6
plans/ci.fmf Normal file
View File

@ -0,0 +1,6 @@
summary: CI Gating Plan
discover:
how: fmf
url: https://gitlab.com/redhat/centos-stream/tests/delve.git
execute:
how: tmt

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (delve-1.22.1.tar.gz) = 73b6e7f5c88ffe3c3197a33106c2d10349bb622f10ec54e3dd0b045ed5717a341d48c5415f6b56b3a927afa6d994ff30dced802f82ed14d149f202f46c7a6b44