diff --git a/0001-Add-libexec-to-path-for-EPEL9-golist.patch b/0001-Add-libexec-to-path-for-EPEL9-golist.patch new file mode 100644 index 0000000000000000000000000000000000000000..6e0d7f90b4f1c37d582acfb23d07656d5e31d5a0 --- /dev/null +++ b/0001-Add-libexec-to-path-for-EPEL9-golist.patch @@ -0,0 +1,52 @@ +From 948c86d17904abf5d9d9c42c55ab78f6b970b972 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= +Date: Tue, 5 Jul 2022 19:50:30 +0200 +Subject: [PATCH] Add libexec to path for EPEL9 golist + +--- + bin/go-rpm-integration | 2 ++ + rpm/gosymlink.deps | 2 ++ + rpm/macros.d/macros.go-rpm | 3 ++- + 3 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/bin/go-rpm-integration b/bin/go-rpm-integration +index 8a0f6b2..d460a61 100755 +--- a/bin/go-rpm-integration ++++ b/bin/go-rpm-integration +@@ -17,6 +17,8 @@ + # + # SPDX-License-Identifier: GPL-3.0-or-later + ++export PATH="${PATH}:/usr/libexec/go-rpm-macros" ++ + usage() { + cat >&2 << EOF_USAGE + Usage: $0 [ [-h] ] +diff --git a/rpm/gosymlink.deps b/rpm/gosymlink.deps +index d7f2866..a6d6538 100755 +--- a/rpm/gosymlink.deps ++++ b/rpm/gosymlink.deps +@@ -16,6 +16,8 @@ + # + # SPDX-License-Identifier: GPL-3.0-or-later + ++export PATH="${PATH}:/usr/libexec/go-rpm-macros" ++ + usage() { + cat >&2 << EOF_USAGE + Usage: $0 [ [-h] ] +diff --git a/rpm/macros.d/macros.go-rpm b/rpm/macros.d/macros.go-rpm +index f773f34..9cad4df 100644 +--- a/rpm/macros.d/macros.go-rpm ++++ b/rpm/macros.d/macros.go-rpm +@@ -186,6 +186,7 @@ else + end + print(rpm.expand('GOPATH="%{?gobuilddir:%{gobuilddir}:}${GOPATH:+${GOPATH}:}%{?gopath}" ' .. + 'GO111MODULE=off ' .. ++ 'PATH="${PATH}:%{_libexecdir}/go-rpm-macros" ' .. + "golist --imported " .. golistargs .. + " --template 'golang({{.}})\\\\n'" .. + " --with-tests --skip-self\\n")) +-- +2.36.1 + diff --git a/go-rpm-macros.spec b/go-rpm-macros.spec index 6c68c609b69c964fbed01a85eb0d80f1e9e4918e..57eda6b03133dee0b08f5a4295afcd644d29a431 100644 --- a/go-rpm-macros.spec +++ b/go-rpm-macros.spec @@ -9,14 +9,18 @@ ExclusiveArch: %{golang_arches} Name: go-rpm-macros +BuildRequires: golang Version: 3.6.0 Release: %{anolis_release}%{?dist} Summary: Build-stage rpm automation for Go packages License: GPLv3+ URL: https://pagure.io/%{name} -Source: https://pagure.io/%{name}/archive/%{version}/%{name}-%{version}.tar.gz +Source0: https://pagure.io/go-rpm-macros/archive/3.6.0/go-rpm-macros-3.6.0.tar.gz +Source1: https://pagure.io/golist/archive/v0.10.4/golist-0.10.4.tar.gz +Source2: golist-0.10.4-vendor.tar.xz Patch1: 1001-modify-for-anolis.patch +Patch2: 0001-Add-libexec-to-path-for-EPEL9-golist.patch Requires: go-srpm-macros = %{version}-%{release} go-filesystem = %{version}-%{release} %if %{with golist} @@ -133,6 +137,8 @@ install -m 0644 -vp rpm/macros.d/macros.go-compilers-golang \ %doc README.md %changelog +* Fri Nov 21 2025 wenyuzifang - 3.6.0-4 +- Add /usr/libexec/go-rpm-macros to PATH to ensure golist and helpers are found during EPEL9 builds * Thu Aug 14 2025 Yang Cheng - 3.6.0-3 - add support for sw_64 build diff --git a/golist-0.10.4-vendor.tar.xz b/golist-0.10.4-vendor.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..3bbcee2b053254ca6cc6c96a3f3c2cd7e3483f23 Binary files /dev/null and b/golist-0.10.4-vendor.tar.xz differ diff --git a/golist-0.10.4.tar.gz b/golist-0.10.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..a1ed64baeb0c4c838ced18459f4d44baa30943ad Binary files /dev/null and b/golist-0.10.4.tar.gz differ