Compare commits
No commits in common. 'c9' and 'i9-beta' have entirely different histories.
@ -1,2 +1,2 @@
|
||||
SOURCES/go-rpm-macros-3.2.0.tar.gz
|
||||
SOURCES/golist-0.10.1.tar.gz
|
||||
SOURCES/go-rpm-macros-3.6.0.tar.gz
|
||||
SOURCES/golist-0.10.4.tar.gz
|
||||
|
@ -1,2 +1,2 @@
|
||||
0d0704c603edceb886cb94c588ed61179a5760e6 SOURCES/go-rpm-macros-3.2.0.tar.gz
|
||||
bf428b2ba15f68df39e3da7647ccfdeb8beedd3b SOURCES/golist-0.10.1.tar.gz
|
||||
9db262bd1b5acd1c3490d55b839819a878e6659c SOURCES/go-rpm-macros-3.6.0.tar.gz
|
||||
4a105131658d029fe0b2d312b078a056748af2b4 SOURCES/golist-0.10.4.tar.gz
|
||||
|
@ -0,0 +1,52 @@
|
||||
From 948c86d17904abf5d9d9c42c55ab78f6b970b972 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Robert-Andr=C3=A9=20Mauchin?= <zebob.m@gmail.com>
|
||||
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 <action> [ [-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 <action> [ [-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
|
||||
|
@ -0,0 +1,27 @@
|
||||
From 75a528c97a3960e993d378ab3bedd37be3620975 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= <asm@redhat.com>
|
||||
Date: Tue, 30 Jul 2024 17:05:39 +0200
|
||||
Subject: [PATCH] Avoid using rpm.isdefined function
|
||||
|
||||
isdefined is in rpm >= 4.17.0 but RHEL 9.5 is a little bit behind that
|
||||
version so if fails. This should behave similar.
|
||||
---
|
||||
rpm/lua/srpm/go.lua | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/rpm/lua/srpm/go.lua b/rpm/lua/srpm/go.lua
|
||||
index 01a43a1..4f8011b 100644
|
||||
--- a/rpm/lua/srpm/go.lua
|
||||
+++ b/rpm/lua/srpm/go.lua
|
||||
@@ -69,7 +69,7 @@ local function rpmname(goipath, compatid)
|
||||
-- numbers on top of it, keep a - prefix before version strings
|
||||
result = string.gsub(result, "%-v([%.%d]+)$", "-%1")
|
||||
result = string.gsub(result, "%-v([%.%d]+%-)", "-%1")
|
||||
- if rpm.isdefined('go_use_new_versioning') then
|
||||
+ if rpm.expand("%{?go_use_new_versioning}") ~= "" then
|
||||
-- according to the guidelines, if the base package name does not end with
|
||||
-- a digit, the version MUST be directly appended to the package name with
|
||||
-- no intervening separator.
|
||||
--
|
||||
2.45.2
|
||||
|
@ -1,64 +0,0 @@
|
||||
From c05378a9d5d7ceb0fef2a915df9b88750685a3a9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Alejandro=20S=C3=A1ez?= <asm@redhat.com>
|
||||
Date: Thu, 24 Nov 2022 15:05:06 +0100
|
||||
Subject: [PATCH] Update default gobuild args
|
||||
|
||||
---
|
||||
rpm/macros.d/macros.go-compilers-golang | 17 ++++++++++++-----
|
||||
1 file changed, 12 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/rpm/macros.d/macros.go-compilers-golang b/rpm/macros.d/macros.go-compilers-golang
|
||||
index 74428a3..8cee8e2 100644
|
||||
--- a/rpm/macros.d/macros.go-compilers-golang
|
||||
+++ b/rpm/macros.d/macros.go-compilers-golang
|
||||
@@ -20,6 +20,8 @@
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
+%gocompilerflags -buildmode pie -compiler gc
|
||||
+
|
||||
# This *must* be all on one line, as it will be used in shell
|
||||
# assignments. eg
|
||||
#
|
||||
@@ -29,13 +31,16 @@
|
||||
#
|
||||
# %make GOBUILDFLAGS="%gobuildflags"
|
||||
#
|
||||
-%gobuildflags() %{expand:%{gocompilerflags} -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} %{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -compressdwarf=false -linkmode=external -extldflags '%{build_ldflags} %{?__golang_extldflags}'" -a -v -x}
|
||||
+%gobuildflags() %{expand:%{gocompilerflags} -tags=\\"rpm_crashtraceback ${BUILDTAGS:-} libtrust_openssl\\" -ldflags \\"-linkmode=external -compressdwarf=false ${LDFLAGS:-} %{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags %{?__golang_extldflags}'\\" -a -v -x}
|
||||
+%_gobuildflags_internal() %{expand:%{gocompilerflags} -tags="rpm_crashtraceback ${BUILDTAGS:-} libtrust_openssl" -ldflags "-linkmode=external -compressdwarf=false ${LDFLAGS:-} %{?currentgoldflags} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags %{?__golang_extldflags}'" -a -v -x}
|
||||
|
||||
# Turn off Go modules
|
||||
%gomodulesmode GO111MODULE=off
|
||||
|
||||
# Define commands for building
|
||||
# BUILD_ID can be generated for golang build no matter of debuginfo
|
||||
+%_gobuild_cmd CGO_CPPFLAGS="-D_FORTIFY_SOURCE=2 -fstack-protector-all" go build %{_gobuildflags_internal}
|
||||
+%gobuild_compat_el8(o:) %{expand:%{_gobuild_cmd} %{?**};}
|
||||
%gobuild(o:) %{expand:
|
||||
# https://pagure.io/go-rpm-macros/pull-request/38
|
||||
# Most of the default LDFLAGS for Fedora are not supported so we don't want
|
||||
@@ -44,14 +49,16 @@
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=995136#c12
|
||||
%global _dwz_low_mem_die_limit 0
|
||||
%{?gobuilddir:GOPATH="%{gobuilddir}:${GOPATH:+${GOPATH}:}%{?gopath}"} %{?gomodulesmode} \\
|
||||
- go build %{gobuildflags} %{?**};
|
||||
+ %{_gobuild_cmd} %{?**};
|
||||
}
|
||||
${workroot}${GOPATH:+:${GOPATH}}
|
||||
|
||||
# Define commands for testing
|
||||
%gotestflags %{gocompilerflags}
|
||||
%gotestextldflags %{build_ldflags} %{?__golang_extldflags}
|
||||
-%gotest() %{expand:
|
||||
- %undefine _auto_set_build_flags
|
||||
- %{?gomodulesmode} go test %{gotestflags} -ldflags "${LDFLAGS:-} %{?currentgoldflags} -extldflags '%{gotestextldflags}'" %{?**};
|
||||
+%_gotest_cmd %{?gomodulesmode} go test %{gotestflags} -ldflags "${LDFLAGS:-} %{?currentgoldflags} -extldflags '%{gotestextldflags}'"
|
||||
+%gotest_compat_el8(o:) %{expand:%{_gotest_cmd} %{?**};}
|
||||
+%gotest(o:) %{expand:
|
||||
+ %{?gobuilddir:GOPATH="%{gobuilddir}:${GOPATH:+${GOPATH}:}%{?gopath}"} %{?gomodulesmode} \\
|
||||
+ %{_gotest_cmd} %{?**};
|
||||
}
|
||||
--
|
||||
2.38.1
|
||||
|
Loading…
Reference in new issue