mirror of
https://github.com/containers/skopeo.git
synced 2025-06-20 03:52:51 +00:00
Merge pull request #2501 from lsm5/rpm-go-macro-cleanup
RPM: cleanup gobuild macro for CentOS Stream
This commit is contained in:
commit
0eb4ad2f54
@ -7,15 +7,6 @@
|
|||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
%endif
|
%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
|
%global gomodulesmode GO111MODULE=on
|
||||||
|
|
||||||
# No btrfs on RHEL
|
# No btrfs on RHEL
|
||||||
@ -23,6 +14,10 @@
|
|||||||
%define build_with_btrfs 1
|
%define build_with_btrfs 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{defined rhel}
|
||||||
|
%define fips 1
|
||||||
|
%endif
|
||||||
|
|
||||||
# Only used in official koji builds
|
# Only used in official koji builds
|
||||||
# Copr builds set a separate epoch for all environments
|
# Copr builds set a separate epoch for all environments
|
||||||
%if %{defined fedora}
|
%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"
|
export BUILDTAGS="$BASEBUILDTAGS btrfs_noversion exclude_graphdriver_btrfs"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{defined fips}
|
||||||
|
export BUILDTAGS="$BUILDTAGS libtrust_openssl"
|
||||||
|
%endif
|
||||||
|
|
||||||
# unset LDFLAGS earlier set from set_build_flags
|
# unset LDFLAGS earlier set from set_build_flags
|
||||||
LDFLAGS=''
|
LDFLAGS=''
|
||||||
|
|
||||||
@ -146,6 +145,10 @@ cp -pav systemtest/* %{buildroot}/%{_datadir}/%{name}/test/system/
|
|||||||
#define license tag if not already defined
|
#define license tag if not already defined
|
||||||
%{!?_licensedir:%global license %doc}
|
%{!?_licensedir:%global license %doc}
|
||||||
|
|
||||||
|
# Include this to silence rpmlint.
|
||||||
|
# Especially annoying if you use syntastic vim plugin.
|
||||||
|
%check
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.md
|
%doc README.md
|
||||||
|
Loading…
Reference in New Issue
Block a user