mirror of
https://github.com/containers/skopeo.git
synced 2025-07-31 06:31:06 +00:00
RPM: cleanup gobuild macro for CentOS Stream
The default gobuild macro on CentOS Stream now accounts for `BUILDTAGS`, so we don't need to redefine the macro in rpm spec. The `libtrust_openssl` has been set in the spec for RHEL environments. Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
parent
54d235403a
commit
9764c99dbd
@ -7,15 +7,6 @@
|
||||
%global debug_package %{nil}
|
||||
%endif
|
||||
|
||||
# RHEL's default %%gobuild macro doesn't account for the BUILDTAGS variable, so we
|
||||
# set it separately here and do not depend on RHEL's go-[s]rpm-macros package
|
||||
# until that's fixed.
|
||||
# c9s bz: https://bugzilla.redhat.com/show_bug.cgi?id=2227328
|
||||
# c8s bz: https://bugzilla.redhat.com/show_bug.cgi?id=2227331
|
||||
%if %{defined rhel}
|
||||
%define gobuild(o:) go build -buildmode pie -compiler gc -tags="rpm_crashtraceback libtrust_openssl ${BUILDTAGS:-}" -ldflags "-linkmode=external -compressdwarf=false ${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**};
|
||||
%endif
|
||||
|
||||
%global gomodulesmode GO111MODULE=on
|
||||
|
||||
# No btrfs on RHEL
|
||||
@ -23,6 +14,10 @@
|
||||
%define build_with_btrfs 1
|
||||
%endif
|
||||
|
||||
%if %{defined rhel}
|
||||
%define fips 1
|
||||
%endif
|
||||
|
||||
# Only used in official koji builds
|
||||
# Copr builds set a separate epoch for all environments
|
||||
%if %{defined fedora}
|
||||
@ -127,6 +122,10 @@ export BUILDTAGS="$BASEBUILDTAGS $(hack/btrfs_tag.sh) $(hack/btrfs_installed_tag
|
||||
export BUILDTAGS="$BASEBUILDTAGS btrfs_noversion exclude_graphdriver_btrfs"
|
||||
%endif
|
||||
|
||||
%if %{defined fips}
|
||||
export BUILDTAGS="$BUILDTAGS libtrust_openssl"
|
||||
%endif
|
||||
|
||||
# unset LDFLAGS earlier set from set_build_flags
|
||||
LDFLAGS=''
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user