[CI:BUILD] copr: fix el8 build and enable debuginfo

Fedora 35 builds are disabled, so remove fedora 35
conditionals while we're at it.

Bump containers-common dependency to match with that in
podman.spec.rpkg.

TODO: fix debuginfo for rhel8

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
Lokesh Mandvekar
2023-02-01 19:25:58 +05:30
parent ce16b5b007
commit 036bf59885

View File

@@ -10,7 +10,16 @@
# Only intended to build and test the latest unreleased changes. # Only intended to build and test the latest unreleased changes.
%global gomodulesmode GO111MODULE=on %global gomodulesmode GO111MODULE=on
# RHEL 8's default %%gobuild macro doesn't account for the BUILDTAGS variable, so we
# set it separately here and do not depend on RHEL 8's go-srpm-macros package.
# TODO: fix debuginfo for RHEL 8
%if !0%{?fedora} && 0%{?rhel} <= 8
%define gobuild(o:) %{gomodulesmode} go build -buildmode pie -compiler gc -tags="rpm_crashtraceback libtrust_openssl ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" -a -v -x %{?**};
%global with_debug 0
%else
%global with_debug 1 %global with_debug 1
%endif
%if 0%{?with_debug} %if 0%{?with_debug}
%global _find_debuginfo_dwz_opts %{nil} %global _find_debuginfo_dwz_opts %{nil}
@@ -19,10 +28,6 @@
%global debug_package %{nil} %global debug_package %{nil}
%endif %endif
%if ! 0%{?gobuild:1}
%define gobuild(o:) go build -buildmode pie -compiler gc -tags="rpm_crashtraceback ${BUILDTAGS:-}" -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '-Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld '" -a -v -x %{?**};
%endif
Name: {{{ git_dir_name }}} Name: {{{ git_dir_name }}}
Epoch: 101 Epoch: 101
Version: {{{ git_dir_version }}} Version: {{{ git_dir_version }}}
@@ -48,11 +53,7 @@ BuildRequires: libassuan-devel
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: make BuildRequires: make
BuildRequires: ostree-devel BuildRequires: ostree-devel
%if 0%{?fedora} <= 35 Requires: containers-common >= 4:1-78
Requires: containers-common >= 4:1-39
%else
Requires: containers-common >= 4:1-46
%endif
%description %description
Command line utility to inspect images and repositories directly on Docker Command line utility to inspect images and repositories directly on Docker
@@ -95,11 +96,7 @@ export CGO_CFLAGS+=" -m64 -mtune=generic -fcf-protection=full"
LDFLAGS="" LDFLAGS=""
export BUILDTAGS="$(hack/libdm_tag.sh)" export BUILDTAGS="$(hack/libdm_tag.sh) $(hack/btrfs_installed_tag.sh) $(hack/btrfs_tag.sh)"
%if 0%{?rhel}
export BUILDTAGS="$BUILDTAGS exclude_graphdriver_btrfs btrfs_noversion"
%endif
%gobuild -o bin/%{name} ./cmd/%{name} %gobuild -o bin/%{name} ./cmd/%{name}
%install %install