diff --git a/.fmf/version b/.fmf/version deleted file mode 100644 index d00491f..0000000 --- a/.fmf/version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/.gitignore b/.gitignore index e23e7a5..9cdee55 100644 --- a/.gitignore +++ b/.gitignore @@ -1,15 +1 @@ -/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 -/delve-1.23.0.tar.gz -/delve-1.23.1.tar.gz -/delve-1.24.0.tar.gz -/delve-1.24.1.tar.gz -/delve-1.24.2.tar.gz -/delve-1.25.0.tar.gz -/delve-1.25.1.tar.gz -/delve-1.25.2.tar.gz -/delve-1.26.0.tar.gz +/delve-1.2.0.tar.gz diff --git a/.packit.yml b/.packit.yml deleted file mode 100644 index 44c2dbe..0000000 --- a/.packit.yml +++ /dev/null @@ -1,27 +0,0 @@ -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} - -actions: - changelog-entry: - - bash -c "echo - New release ${PACKIT_PROJECT_VERSION}" - -jobs: -- job: pull_from_upstream - trigger: release - dist_git_branches: - rawhide: - fast_forward_merge_into: [fedora-branched] - -- job: koji_build - trigger: commit - dist_git_branches: fedora-all - -- job: bodhi_update - trigger: commit - dist_git_branches: fedora-all diff --git a/0001-Skipping-due-issues-with-the-go-version-in-Fedora.patch b/0001-Skipping-due-issues-with-the-go-version-in-Fedora.patch deleted file mode 100644 index 943fee4..0000000 --- a/0001-Skipping-due-issues-with-the-go-version-in-Fedora.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 70a9601e1b6e4d97c2c34e1989eba5726df97131 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?=C3=81lex=20S=C3=A1ez?= -Date: Wed, 31 Jul 2024 16:54:34 +0200 -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 3437a2a4..a602dbcb 100644 ---- a/pkg/proc/proc_test.go -+++ b/pkg/proc/proc_test.go -@@ -3236,6 +3236,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") -@@ -3265,6 +3266,7 @@ func TestDebugStripped(t *testing.T) { - - func TestDebugStripped2(t *testing.T) { - // 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.45.2 - diff --git a/README.packit b/README.packit deleted file mode 100644 index 9bb65f0..0000000 --- a/README.packit +++ /dev/null @@ -1,3 +0,0 @@ -This repository is maintained by packit. -https://packit.dev/ -The file was generated using packit 1.13.0.post1.dev2+g84134016c. diff --git a/bundled-deps.sh b/bundled-deps.sh deleted file mode 100755 index 51dd446..0000000 --- a/bundled-deps.sh +++ /dev/null @@ -1,22 +0,0 @@ -#! /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 diff --git a/clean-empty-doc.patch b/clean-empty-doc.patch new file mode 100644 index 0000000..4c12416 --- /dev/null +++ b/clean-empty-doc.patch @@ -0,0 +1,16 @@ +From 9cb76893334154001489fb1bbd19fe926f0249e7 Mon Sep 17 00:00:00 2001 +From: Derek Parker +Date: Thu, 21 Feb 2019 12:15:37 -0800 +Subject: [PATCH] Documentation: Remove empty doc file + +--- + Documentation/usage/commands.md | 0 + 1 file changed, 0 insertions(+), 0 deletions(-) + delete mode 100644 Documentation/usage/commands.md + +diff --git a/Documentation/usage/commands.md b/Documentation/usage/commands.md +deleted file mode 100644 +index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 +-- +2.16.5 + diff --git a/delve.spec b/delve.spec index baac82f..bf6dbd8 100644 --- a/delve.spec +++ b/delve.spec @@ -1,116 +1,114 @@ # 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.26.0 +Version: 1.2.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 +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 +Release: 2%{?dist} 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 +# Currently Delve only supports x86_64 +ExcludeArch: ppc64le +ExcludeArch: s390x +ExcludeArch: aarch64 +ExcludeArch: i686 +ExcludeArch: armv7hl -# 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.12.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.17.0 -Provides: bundled(golang(golang.org/x/tools)) = 0.14.0 -Provides: bundled(golang(gopkg.in/yaml.v3)) = 3.0.1 -Provides: bundled(golang(go.starlark.net)) = 0.0.0.20231101134539.556fd59b42f6 +Patch1: ./disable-default-compression-dwz-test.patch +Patch2: ./integration-test-symlinks.patch +Patch3: ./clean-empty-doc.patch -Patch0001: 0001-Skipping-due-issues-with-the-go-version-in-Fedora.patch +BuildRequires: golang(github.com/cosiner/argv) +BuildRequires: golang(github.com/mattn/go-isatty) +BuildRequires: golang(github.com/peterh/liner) +BuildRequires: golang(github.com/pkg/profile) +BuildRequires: golang(github.com/sirupsen/logrus) +BuildRequires: golang(github.com/spf13/cobra) +BuildRequires: golang(golang.org/x/arch/x86/x86asm) +BuildRequires: golang(golang.org/x/sys/unix) +BuildRequires: golang(golang.org/x/sys/windows) +BuildRequires: golang(gopkg.in/yaml.v2) %description %{common_description} + +%package -n %{goname}-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{goname}-devel +%{common_description} + +This package contains library source intended for +building other packages which use import path with +%{goipath} prefix. + + %prep -echo "=== Start prep ===" -%goprep -k -# unpack vendored dependencies to GOPATH -tar c -C vendor/ . | tar x -C %{gobuilddir}/src -%autopatch -v -p1 +%forgeautosetup -p1 + +rm -rf vendor/ + %build -echo "=== Start build ===" -%gobuild %{?exp} -o %{gobuilddir}/bin/dlv %{goipath}/cmd/dlv -echo "=== End build ===" +%gobuildroot +%gobuild -o _bin/dlv %{goipath}/cmd/dlv + %install -install -m 0755 -vd %{buildroot}%{_bindir} -install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ +%goinstall +install -Dpm 0755 _bin/dlv %{buildroot}%{_bindir}/dlv + %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/ +export GOPATH=%{buildroot}/%{gopath}:%{gopath} +delvepath=%{buildroot}/%{gopath}/src/%{goipath} +cp -r _fixtures $delvepath +cp -r pkg/dwarf/line/_testdata $delvepath/pkg/dwarf/line pushd $delvepath -echo "=== Start tests ===" -for d in $(go list %{?exp} ./... | grep -v cmd | grep -v scripts); do - go test %{?exp} ${d} -skip TestGuessSubstitutePath +for d in $(go list ./... | grep -v cmd | grep -v scripts); do + %gotest ${d} done -echo "=== End tests ===" -rm -rf $delvepath +rm -rf $delvepath/_fixtures +rm -rf $delvepath/pkg/dwarf/line/_testdata popd %endif + %files -%license LICENSE vendor/modules.txt +%license LICENSE %doc CONTRIBUTING.md CHANGELOG.md %doc Documentation/* %{_bindir}/dlv + +%files -n %{goname}-devel -f devel.file-list +%license LICENSE + + %changelog -%autochangelog +* 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 diff --git a/disable-default-compression-dwz-test.patch b/disable-default-compression-dwz-test.patch new file mode 100644 index 0000000..244e4c8 --- /dev/null +++ b/disable-default-compression-dwz-test.patch @@ -0,0 +1,36 @@ +From 1f9597d3ca2e7d3497f9d28046bbae5522742306 Mon Sep 17 00:00:00 2001 +From: Derek Parker +Date: Wed, 20 Feb 2019 13:26:18 -0800 +Subject: [PATCH] pkg/proc: Disable default compression on DWZ test + +When compression is applied by default running the DWZ tool on the +resulting binary will crash. + +The actual default compression code will look and see if compression +makes any difference and if so replace the normal `.debug_*` section +with `.zdebug_*`. This is why it may not have been hit before. On one of +my workstations I build with 1.12rc1 and no compression happens, but on +a Fedora VM I build and the binary results in compressed DWARF sections. + +Adding this flag will make this test more consistent overall. +--- + pkg/proc/test/support.go | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/pkg/proc/test/support.go b/pkg/proc/test/support.go +index 9e09da861ec53657bfa0fb9cf76620a4fcd485dc..ccfc1c4939ef6e9c8abbbc67f4fbeaaf0e623de1 100644 +--- a/pkg/proc/test/support.go ++++ b/pkg/proc/test/support.go +@@ -125,6 +125,9 @@ func BuildFixture(name string, flags BuildFlags) Fixture { + if flags&BuildModePIE != 0 { + buildFlags = append(buildFlags, "-buildmode=pie") + } ++ if flags&EnableDWZCompression != 0 { ++ buildFlags = append(buildFlags, "-ldflags=-compressdwarf=false") ++ } + if path != "" { + buildFlags = append(buildFlags, name+".go") + } +-- +2.16.5 + diff --git a/gating.yaml b/gating.yaml deleted file mode 100644 index ce3cdc1..0000000 --- a/gating.yaml +++ /dev/null @@ -1,19 +0,0 @@ ---- !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} diff --git a/integration-test-symlinks.patch b/integration-test-symlinks.patch new file mode 100644 index 0000000..94e2545 --- /dev/null +++ b/integration-test-symlinks.patch @@ -0,0 +1,27 @@ +From c4a4e442e2eee35bc26674cb1d2cb28336780891 Mon Sep 17 00:00:00 2001 +From: Derek Parker +Date: Wed, 20 Feb 2019 14:01:13 -0800 +Subject: [PATCH] service/test: Follow symlinks in integration tests + +--- + service/test/common_test.go | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/service/test/common_test.go b/service/test/common_test.go +index 2b58e371a12472c71beaad0790b001cf4258934c..ee56a53350a45ab790229dd359c472f2c9a952b0 100644 +--- a/service/test/common_test.go ++++ b/service/test/common_test.go +@@ -52,6 +52,10 @@ func testProgPath(t *testing.T, name string) string { + t.Fatal(err) + } + } ++ sympath, err := filepath.EvalSymlinks(fp) ++ if err == nil { ++ fp = strings.Replace(sympath, "\\", "/", -1) ++ } + return fp + } + +-- +2.16.5 + diff --git a/plans/ci.fmf b/plans/ci.fmf deleted file mode 100644 index eaa8bdf..0000000 --- a/plans/ci.fmf +++ /dev/null @@ -1,6 +0,0 @@ -summary: CI Gating Plan -discover: - how: fmf - url: https://src.fedoraproject.org/tests/delve -execute: - how: tmt diff --git a/sources b/sources index dd76784..e33a23b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (delve-1.26.0.tar.gz) = 1b9d5c7b91bbf1df47c1fdb3553893497defe7a71ae9c7cef160cf15afac391fe77f66b748e028b29aa3456c21cfc079c2751afb788cb065ee8580501d21ad0e +SHA512 (delve-1.2.0.tar.gz) = 8a19decbb47952671e5b73f6ec1707e318259376b02268509374e101cd9ee54c279fac0655885be6095e7cc82bfb09082cfe557f763475a2cd2f1f572f1a300e