From 85bb3e0439fb07342f54a334d2dc91ba108478a9 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 2 May 2018 11:51:35 +0200 Subject: [PATCH] tools: Build with a different Go toolset on rhel-8 Thanks to Tom Stellard . Closes #9084 --- tools/cockpit.spec | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/cockpit.spec b/tools/cockpit.spec index c00069cbf9ea..012cfa8a4f8d 100644 --- a/tools/cockpit.spec +++ b/tools/cockpit.spec @@ -50,6 +50,12 @@ %define libssh_version 0.6.0 %endif +%if 0%{?rhel} >= 8 +%global go_scl_prefix go-toolset-7- +%else +%global go_scl_prefix %{nil} +%endif + Name: cockpit Summary: A user interface for Linux servers @@ -340,6 +346,10 @@ rm %{buildroot}/usr/share/pixmaps/cockpit-sosreport.png Cockpit runs in a browser and can manage your network of GNU/Linux machines. +%if 0%{?rhel} >= 8 +%enable_gotoolset7 +%endif + %files %{_docdir}/%{name}/AUTHORS %{_docdir}/%{name}/COPYING @@ -736,8 +746,8 @@ Requires: /usr/bin/kubectl # Requires: Needs newer localization support Requires: %{name}-bridge >= %{required_base} Requires: %{name}-shell >= %{required_base} -BuildRequires: golang-bin -BuildRequires: golang-src +BuildRequires: %{go_scl_prefix}golang-bin +BuildRequires: %{go_scl_prefix}golang-src Provides: cockpit-stub = %{version}-%{release} %description kubernetes