From cd441832fb62cd9a05cf55d214ad72320add10c3 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 20:04:06 +0000 Subject: [PATCH 1/8] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From a76768011b5294fc63566b1016aec02ea6f0bd0a Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Fri, 15 Aug 2025 18:44:42 -0500 Subject: [PATCH 2/8] Rebuild for golang-1.25.0 From a86f36a4923178b37297e962dd8a14fe2f43740c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= Date: Fri, 10 Oct 2025 15:14:45 +0200 Subject: [PATCH 3/8] rebuild From 7e9d9f80ecb5c681b6b24ad5751feeee6135c04f Mon Sep 17 00:00:00 2001 From: Carl George Date: Wed, 22 Oct 2025 22:09:30 -0500 Subject: [PATCH 4/8] Rebuild for CVE-2025-47906 From 5652affca38a38fbb123b4412bd7346485a883ca Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 17 Jan 2026 19:53:23 +0000 Subject: [PATCH 5/8] Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild From 19223e0e66252638b13b79c745df336116dcb538 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Mon, 2 Feb 2026 20:02:45 -0600 Subject: [PATCH 6/8] Rebuild for https://fedoraproject.org/wiki/Changes/golang1.26 From 7c11e4c98a6f62c635d490489adfc21ea6978a96 Mon Sep 17 00:00:00 2001 From: Carl George Date: Thu, 19 Mar 2026 18:45:28 -0500 Subject: [PATCH 7/8] Port to new golang packaging guidelines - Use vendor tarball for build dependencies - Remove golang-github-vrothberg-vgrep-devel subpackage rhbz#2446694 --- .gitignore | 3 +- sources | 1 + vgrep.spec | 83 +++++++++++++++++++++++++++++------------------------- 3 files changed, 48 insertions(+), 39 deletions(-) diff --git a/.gitignore b/.gitignore index e7267fb..7a2de98 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -vgrep-*.tar.gz +/vgrep-*.tar.gz +/vgrep-*-vendor.tar.bz2 diff --git a/sources b/sources index d6d31f5..e798e83 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (vgrep-2.8.0.tar.gz) = 1fbd674a7fddffede70a9d0715bf09359d48abf5c238cace43996a222e3e34ec73a7911f62b8476a2dcef40485ce192476067fd99d52b7fa0e7e3fe9297f461e +SHA512 (vgrep-2.8.0-vendor.tar.bz2) = 56eb03889e68439eb108124175708dc1b90ef9bd0d03a317baf1aade8bfc1a35c643d7d4c8a4108da50ea8ae3a4a9aeedcf9aa482bdf1cdfcdfde18bc095fb70 diff --git a/vgrep.spec b/vgrep.spec index f964bb4..77008c5 100644 --- a/vgrep.spec +++ b/vgrep.spec @@ -1,62 +1,69 @@ -# https://github.com/vrothberg/vgrep -%global goipath github.com/vrothberg/vgrep -Version: 2.8.0 +%bcond check 1 -%gometa -f +Name: vgrep +Version: 2.8.0 +Release: %autorelease +ExclusiveArch: %{golang_arches_future} +Summary: User-friendly pager for grep +License: Apache-2.0 AND BSD-3-Clause AND GPL-3.0-only AND MIT +URL: https://github.com/vrothberg/vgrep +Source0: %{url}/archive/v%{version}/vgrep-%{version}.tar.gz +Source1: vgrep-%{version}-vendor.tar.bz2 -%global common_description %{expand: +BuildRequires: go-rpm-macros +BuildRequires: go-vendor-tools +BuildRequires: askalono-cli +BuildRequires: go-md2man + + +%description vgrep is a pager for grep, git-grep, ripgrep and similar grep implementations, and allows for opening the indexed file locations in a user-specified editor such as vim or emacs. vgrep is inspired by the ancient cgvg scripts but extended to perform further operations such as listing statistics of files and -directory trees or showing the context lines before and after the matches.} +directory trees or showing the context lines before and after the matches. -%global golicenses LICENSE -%global godocs README.md - -%bcond_without check - -Name: vgrep -Release: %autorelease -Summary: User-friendly pager for grep -License: GPL-3.0-only -URL: %{gourl} -Source: %{gosource} - -BuildRequires: go-md2man - -%description %{common_description} - -%gopkg %prep -%goprep +%autosetup -a 1 -%generate_buildrequires -%go_generate_buildrequires %build -export LDFLAGS="-X main.version=%{version} " -%gobuild -o %{gobuilddir}/bin/vgrep %{goipath} +# command +%global gomodulesmode GO111MODULE=on +export GO_LDFLAGS="-X main.version=%{version} " +%gobuild -o bin/vgrep . + +# manpage go-md2man -in docs/vgrep.1.md -out docs/vgrep.1 -%install -%gopkginstall -install -D -p -m 0755 %{gobuilddir}/bin/vgrep %{buildroot}%{_bindir}/vgrep -install -D -p -m 0644 docs/vgrep.1 %{buildroot}%{_mandir}/man1/vgrep.1 -%if %{with check} +%install +# licenses +%go_vendor_license_install + +# command +install -D -p -m 0755 -t %{buildroot}%{_bindir} bin/vgrep + +# manpage +install -D -p -m 0644 -t %{buildroot}%{_mandir}/man1 docs/vgrep.1 + + %check -%gocheck +# license validation +%go_vendor_license_check + +# upstream tests +%if %{with check} +%gocheck2 %endif -%files -%license %{golicenses} -%doc %{godocs} + +%files -f %{go_vendor_license_filelist} +%doc README.md %{_bindir}/vgrep %{_mandir}/man1/vgrep.1* -%gopkgfiles %changelog %autochangelog From 28071ef5f71d16bd6737a2decbe356ce59a5b817 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jul 2026 08:28:02 +0000 Subject: [PATCH 8/8] Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild