2b207cbf27
Switch to bundled dependencies to simplify the process. Add bundle-deps.sh like rpms/golang has. Remove 0001-Skip-TestCgoStacktrace2.patch
111 lines
3.9 KiB
RPMSpec
111 lines
3.9 KiB
RPMSpec
# Run tests in check section
|
|
%bcond_without check
|
|
|
|
# https://github.com/go-delve/delve
|
|
%global goipath github.com/go-delve/delve
|
|
Version: 1.21.2
|
|
|
|
%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 and aarch64
|
|
%global golang_arches x86_64 aarch64
|
|
|
|
%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.0
|
|
Provides: bundled(golang(github.com/creack/pty)) = 1.1.9
|
|
Provides: bundled(golang(github.com/derekparker/trie)) = 0.0.0.20221213183930.4c74548207f4
|
|
Provides: bundled(golang(github.com/go.delve/liner)) = 1.2.3.0.20220127212407.d32d89dd2a5d
|
|
Provides: bundled(golang(github.com/google/go.dap)) = 0.9.1
|
|
Provides: bundled(golang(github.com/hashicorp/golang.lru)) = 0.5.4
|
|
Provides: bundled(golang(github.com/inconshreveable/mousetrap)) = 1.0.0
|
|
Provides: bundled(golang(github.com/konsorten/go.windows.terminal.sequences)) = 1.0.3
|
|
Provides: bundled(golang(github.com/mattn/go.colorable)) = 0.0.9
|
|
Provides: bundled(golang(github.com/mattn/go.isatty)) = 0.0.3
|
|
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.0.1
|
|
Provides: bundled(golang(github.com/shurcooL/sanitized_anchor_name)) = 1.0.0
|
|
Provides: bundled(golang(github.com/sirupsen/logrus)) = 1.6.0
|
|
Provides: bundled(golang(github.com/spf13/cobra)) = 1.1.3
|
|
Provides: bundled(golang(github.com/spf13/pflag)) = 1.0.5
|
|
Provides: bundled(golang(github.com/stretchr/testify)) = 1.7.0
|
|
Provides: bundled(golang(golang.org/x/arch)) = 0.0.0.20190927153633.4e8777c89be4
|
|
Provides: bundled(golang(golang.org/x/exp)) = 0.0.0.20230224173230.c95f2b4c22f2
|
|
Provides: bundled(golang(golang.org/x/mod)) = 0.12.0
|
|
Provides: bundled(golang(golang.org/x/sys)) = 0.12.0
|
|
Provides: bundled(golang(golang.org/x/tools)) = 0.13.0
|
|
Provides: bundled(golang(gopkg.in/yaml.v2)) = 2.4.0
|
|
Provides: bundled(golang(go.starlark.net)) = 0.0.0.20220816155156.cfacd8902214
|
|
|
|
%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
|
|
|
|
%generate_buildrequires
|
|
%go_generate_buildrequires
|
|
|
|
%build
|
|
echo "=== Start build ==="
|
|
%gobuild -o %{gobuilddir}/bin/dlv %{goipath}/cmd/dlv
|
|
echo "=== End build ==="
|
|
|
|
%install
|
|
%gopkginstall
|
|
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}
|
|
cp -r _fixtures $delvepath
|
|
cp -r pkg/dwarf/line/_testdata $delvepath/pkg/dwarf/line
|
|
cp -r pkg/proc/internal/ebpf $delvepath/pkg/proc/internal/
|
|
|
|
pushd $delvepath
|
|
echo "=== Start tests ==="
|
|
%gotest $(go list ./... | awk '!/(cmd|scripts)/ {print $1}')
|
|
echo "=== End tests ==="
|
|
rm -rf $delvepath
|
|
popd
|
|
%endif
|
|
|
|
%files
|
|
%license LICENSE vendor/modules.txt
|
|
%doc CONTRIBUTING.md CHANGELOG.md
|
|
%doc Documentation/*
|
|
%{_bindir}/dlv
|
|
|
|
%changelog
|
|
%autochangelog
|