Attempt to fix debian 11 and ubuntu 18.04, 20.04

Doesn't work yet :(

Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
This commit is contained in:
Lokesh Mandvekar 2022-08-19 16:13:59 -04:00
parent db835ca70a
commit 8a2abf2a29

View File

@ -1,6 +1,11 @@
%if "%{_vendor}" == "debbuild"
# Older distros don't work yet
%if (0%{?debian} && 0%{?debian} <= 11) || (0%{?ubuntu} && 0%{?ubuntu} < 2204)
%define gobuild(o:) GO111MODULE=off %{_prefix}/lib/go-1.16/bin/go build -buildmode pie -tags=" ${BUILDTAGS:-}" -a -v -x %{?**};
%else
%define gobuild(o:) GO111MODULE=off go build -buildmode pie -tags=" ${BUILDTAGS:-}" -a -v -x %{?**};
%endif
%endif
%global with_debug 1
@ -54,7 +59,6 @@ Source1: %{git_plugins}/archive/%{commit_plugins}/%{repo_plugins}-%{commit_plugi
Source2: %{git_gvproxy}/archive/%{commit_gvproxy}/%{repo_gvproxy}-%{commit_gvproxy}.tar.gz
Provides: %{name}-manpages = %{epoch}:%{version}-%{release}
BuildRequires: go-md2man
BuildRequires: golang
Requires: catatonit
Requires: iptables
Requires: nftables
@ -67,6 +71,13 @@ BuildRequires: libgpgme-dev
BuildRequires: libseccomp-dev
BuildRequires: libsystemd-dev
BuildRequires: pkg-config
%if (0%{?debian} && 0%{?debian} <= 11) || (0%{?ubuntu} && 0%{?ubuntu} < 2204)
BuildRequires: golang-1.16
BuildRequires: libc6 < 2.32
%else
BuildRequires: golang
BuildRequires: libc6
%endif
Requires: conmon >= 2:2.0.30
Requires: containers-common >= 4:1
Requires: uidmap
@ -78,6 +89,7 @@ BuildRequires: gcc
BuildRequires: glib2-devel
BuildRequires: glibc-devel
BuildRequires: glibc-static
BuildRequires: golang
BuildRequires: git-core
%if 0%{?fedora} || 0%{?rhel} >= 9
BuildRequires: go-rpm-macros