## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 3; 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 # https://github.com/go-delve/delve %global goipath github.com/go-delve/delve # Currently Delve only supports x86_64 and aarch64 %global golang_arches x86_64 aarch64 Version: 1.20.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.} %gometa -f Name: delve Release: %autorelease Summary: A debugger for the Go programming language # Detected licences # - Expat License at 'LICENSE' License: MIT URL: %{gourl} Source0: %{gosource} BuildRequires: golang(github.com/cilium/ebpf) BuildRequires: golang(github.com/cilium/ebpf/link) BuildRequires: golang(github.com/cilium/ebpf/ringbuf) BuildRequires: golang(github.com/cosiner/argv) BuildRequires: golang(github.com/creack/pty) BuildRequires: golang(github.com/derekparker/trie) BuildRequires: golang(github.com/go-delve/liner) BuildRequires: golang(github.com/google/go-dap) BuildRequires: golang(github.com/hashicorp/golang-lru/simplelru) BuildRequires: golang(github.com/mattn/go-isatty) BuildRequires: golang(github.com/sirupsen/logrus) BuildRequires: golang(github.com/spf13/cobra) BuildRequires: golang(github.com/spf13/cobra/doc) BuildRequires: golang(golang.org/x/arch/arm64/arm64asm) BuildRequires: golang(golang.org/x/arch/ppc64/ppc64asm) BuildRequires: golang(golang.org/x/arch/x86/x86asm) BuildRequires: golang(golang.org/x/sys/unix) BuildRequires: golang(golang.org/x/tools/go/packages) BuildRequires: golang(gopkg.in/yaml.v2) BuildRequires: golang(go.starlark.net/resolve) BuildRequires: golang(go.starlark.net/starlark) BuildRequires: golang(go.starlark.net/syntax) BuildRequires: lsof BuildRequires: git # This patch won't be necessary in future releases. # It makes 1.20.1 compatible with go-dap 0.7 instead of 0.6. Patch0001: 0001-Add-address-operator-to-make-it-compatible-with-go-d.patch %description %{common_description} %gopkg %prep echo "=== Start prep ===" %goprep %patch -P 0001 -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}:%{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 ===" # This files are not needed after the tests rm -rf $delvepath/_fixtures rm -rf $delvepath/pkg/dwarf/line/_testdata rm $delvepath/pkg/proc/internal/ebpf/bpf/dummy.go rm $delvepath/pkg/proc/internal/ebpf/bpf/include/dummy.go rm $delvepath/pkg/proc/internal/ebpf/bpf/include/function_vals.bpf.h rm $delvepath/pkg/proc/internal/ebpf/bpf/include/trace.bpf.h rm $delvepath/pkg/proc/internal/ebpf/bpf/include/vmlinux.h rm $delvepath/pkg/proc/internal/ebpf/bpf/trace.bpf.c rm $delvepath/pkg/proc/internal/ebpf/build/build-ebpf-builder-img.sh rm $delvepath/pkg/proc/internal/ebpf/build/build-ebpf-objects.sh rm $delvepath/pkg/proc/internal/ebpf/build/ebpf-Dockerfile rm $delvepath/pkg/proc/internal/ebpf/trace_bpfel_x86.o %ifarch aarch64 rm $delvepath/pkg/proc/internal/ebpf/testhelper/testhelper.go %endif popd %endif %files %license LICENSE %doc CONTRIBUTING.md CHANGELOG.md %doc Documentation/* %{_bindir}/dlv %gopkgfiles %changelog * Wed Mar 22 2023 Alejandro Sáez - 1.20.1-3 - Add go-dap 0.7 patch. * Wed Mar 01 2023 Alejandro Sáez - 1.20.1-2 - Remove globbing * Tue Dec 20 2022 Alejandro Sáez - 1.20.1-1 - Update to Delve 1.20.1 * Thu Jul 07 2022 Alejandro Sáez - 1.9.0-1 - Update to 1.9.0 * Wed Jun 29 2022 Alejandro Sáez - 1.8.3-1 - Update to 1.8.3 - Removes patches - Adds aarch64 - Adds 0001-Update-TestStarlarkVariable.patch * Mon Sep 06 2021 Alejandro Sáez - 1.7.1-3 - Update to 1.7.1 * Wed Jul 24 2019 Fedora Release Engineering - 1.2.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Fri Nov 2 2018 Derek Parker - 1.2.0-1 - First package for Fedora