From 8a2abf2a294efd6958f7075fa39deb2bb1fc8544 Mon Sep 17 00:00:00 2001 From: Lokesh Mandvekar Date: Fri, 19 Aug 2022 16:13:59 -0400 Subject: [PATCH] Attempt to fix debian 11 and ubuntu 18.04, 20.04 Doesn't work yet :( Signed-off-by: Lokesh Mandvekar --- podman.spec | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/podman.spec b/podman.spec index 046e98c..1c6f8ef 100644 --- a/podman.spec +++ b/podman.spec @@ -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