diff --git a/.gitignore b/.gitignore index e69de29..61e599a 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,3 @@ +/delve-1.4.0.tar.gz +/delve-1.4.1.tar.gz +/delve-1.5.0.tar.gz diff --git a/README.md b/README.md new file mode 100644 index 0000000..9cbfcbf --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# delve + +The delve package diff --git a/delve.spec b/delve.spec new file mode 100644 index 0000000..2dfacb3 --- /dev/null +++ b/delve.spec @@ -0,0 +1,104 @@ +Name: delve +Version: 1.5.0 +Release: 2%{?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: ppc64le s390x aarch64 %{ix86} armv7hl + +BuildRequires: compiler(go-compiler) +BuildRequires: git +BuildRequires: lsof + +Provides: dlv = %{version} + +# https://github.com/go-delve/delve/pull/2223 +Patch0: golang-1.15.4-TestStepIntoWrapperForEmbeddedPointer.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 + +%patch0 -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 -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 ./... | grep -v cmd | grep -v scripts); do + go test ${d} +done + + +%files +%license LICENSE +%doc CONTRIBUTING.md CHANGELOG.md +%doc Documentation/* +%{_bindir}/dlv + + +%changelog +* Mon Nov 16 2020 David Benoit - 1.5.0-2 +- Resolves: rhbz#1898257 + +* 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/golang-1.15.4-TestStepIntoWrapperForEmbeddedPointer.patch b/golang-1.15.4-TestStepIntoWrapperForEmbeddedPointer.patch new file mode 100644 index 0000000..abf3292 --- /dev/null +++ b/golang-1.15.4-TestStepIntoWrapperForEmbeddedPointer.patch @@ -0,0 +1,38 @@ +diff --git a/pkg/goversion/go_version.go b/pkg/goversion/go_version.go +index 5caf1b9bb..88a2d4e5c 100644 +--- a/pkg/goversion/go_version.go ++++ b/pkg/goversion/go_version.go +@@ -155,11 +155,18 @@ func Installed() (GoVersion, bool) { + // or go version) is major.minor or a later version, or a development + // version. + func VersionAfterOrEqual(version string, major, minor int) bool { ++ return VersionAfterOrEqualRev(version, major, minor, -1) ++} ++ ++// VersionAfterOrEqualRev checks that version (as returned by runtime.Version() ++// or go version) is major.minor or a later version, or a development ++// version. ++func VersionAfterOrEqualRev(version string, major, minor, rev int) bool { + ver, _ := Parse(version) + if ver.IsDevel() { + return true + } +- return ver.AfterOrEqual(GoVersion{major, minor, -1, 0, 0, ""}) ++ return ver.AfterOrEqual(GoVersion{major, minor, rev, 0, 0, ""}) + } + + const producerVersionPrefix = "Go cmd/compile " +diff --git a/pkg/proc/proc_test.go b/pkg/proc/proc_test.go +index f33ddac37..92e6e38db 100644 +--- a/pkg/proc/proc_test.go ++++ b/pkg/proc/proc_test.go +@@ -4804,7 +4804,8 @@ func TestStepIntoWrapperForEmbeddedPointer(t *testing.T) { + {contStepout, 29}}) + + // same test but with next instead of stepout +- if goversion.VersionAfterOrEqual(runtime.Version(), 1, 14) && runtime.GOARCH != "386" { ++ if goversion.VersionAfterOrEqual(runtime.Version(), 1, 14) && runtime.GOARCH != "386" && !goversion.VersionAfterOrEqualRev(runtime.Version(), 1, 15, 4) { ++ // Line numbers generated for versions 1.14 through 1.15.3 on any system except linux/386 + testseq2(t, "ifaceembcall", "", []seqTest{ + {contContinue, 28}, // main.main, the line calling iface.PtrReceiver() + {contStep, 18}, // main.(*A).PtrReceiver diff --git a/sources b/sources new file mode 100644 index 0000000..f611eaf --- /dev/null +++ b/sources @@ -0,0 +1 @@ +9eaae5b29dc4d7cd1187934e9c2498f6 delve-1.5.0.tar.gz