## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 5; 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 Version: 1.21.0 %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} # RHEL builds with vendored dependencies %if %{undefined rhel} # This dependencies are only in use in x86_64 %ifarch x86_64 BuildRequires: golang(github.com/cilium/ebpf) BuildRequires: golang(github.com/cilium/ebpf/link) BuildRequires: golang(github.com/cilium/ebpf/ringbuf) %endif 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) %endif BuildRequires: lsof BuildRequires: git BuildRequires: golang <= 1.21.3 Patch1: 0001-Skip-TestCgoStacktrace2.patch %description %{common_description} %prep echo "=== Start prep ===" %if %{defined rhel} %goprep -k # unpack vendored dependencies to GOPATH tar c -C vendor/ . | tar x -C %{gobuilddir}/src %autopatch -v -p1 %else %goprep %autopatch -v -p1 %generate_buildrequires %go_generate_buildrequires %endif %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 %{?rhel:vendor/modules.txt} %doc CONTRIBUTING.md CHANGELOG.md %doc Documentation/* %{_bindir}/dlv %changelog * Wed Nov 22 2023 Alejandro Sáez - 1.21.0-5 - Uncommitted changes * 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