From 2ca253e5c906d6c8406fd1782a49883d12523055 Mon Sep 17 00:00:00 2001
From: CentOS Sources <bugs@centos.org>
Date: Tue, 5 Nov 2019 13:48:41 -0500
Subject: [PATCH] import golang-1.12.8-2.module+el8.1.0+4089+be929cf8

---
 .gitignore            |  2 +-
 .golang.metadata      |  2 +-
 SOURCES/golang.macros | 18 ---------
 SPECS/golang.spec     | 85 +++++++++++++++++++++++++------------------
 4 files changed, 52 insertions(+), 55 deletions(-)
 delete mode 100644 SOURCES/golang.macros

diff --git a/.gitignore b/.gitignore
index 03dd2ae..12fb8a4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-SOURCES/go-go-1.11.13-2-openssl-fips.tar.gz
+SOURCES/go-go-1.12.8-2-openssl-fips.tar.gz
diff --git a/.golang.metadata b/.golang.metadata
index a3b773e..22c9e59 100644
--- a/.golang.metadata
+++ b/.golang.metadata
@@ -1 +1 @@
-0120364194243a58264be175fd2e15d7b89abace SOURCES/go-go-1.11.13-2-openssl-fips.tar.gz
+5681fc419b8dc6970efae39728893fe77359cde1 SOURCES/go-go-1.12.8-2-openssl-fips.tar.gz
diff --git a/SOURCES/golang.macros b/SOURCES/golang.macros
deleted file mode 100644
index 48f95db..0000000
--- a/SOURCES/golang.macros
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright (c) 2015 Jakub Cajka <jcajka@redhat.com>, Jan Chaloupka <jchaloup@redhat.com>
-# This file is distributed under the terms of GNU GPL license version 3, or
-# any later version.
-
-# This file contains macros for building projects in golang for packages
-# with golang compiler or gcc-go compiler based on an architecture.
-
-# Define commands for building
-# BUILD_ID can be generated for golang build no matter of debuginfo
-%gobuild(o:) \
-%ifnarch ppc64 \
-go build -buildmode pie -compiler gc -tags=rpm_crashtraceback -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**};\
-%else \
-go build -compiler gc -tags=rpm_crashtraceback -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n') -extldflags '%__global_ldflags'" -a -v -x %{?**};\
-%endif \
-
-# Define commands for testing
-%gotest() go test -compiler gc -ldflags "${LDFLAGS:-}" %{?**};
diff --git a/SPECS/golang.spec b/SPECS/golang.spec
index 59e4db6..d1d3c02 100644
--- a/SPECS/golang.spec
+++ b/SPECS/golang.spec
@@ -27,7 +27,7 @@
 # Define GOROOT macros
 %global goroot          %{_prefix}/lib/%{name}
 %global gopath          %{_datadir}/gocode
-%global golang_arches   %{ix86} x86_64 aarch64 ppc64le s390x %{arm}
+%global golang_arches   %{ix86} x86_64 aarch64 ppc64le s390x
 %global golibdir        %{_libdir}/%{name}
 
 # Golang build options.
@@ -54,7 +54,7 @@
 %endif
 
 # Controls what ever we fail on failed tests
-%ifarch %{ix86} x86_64 aarch64 ppc64le
+%ifarch %{ix86} x86_64 %{arm} aarch64 ppc64le
 %global fail_on_tests 1
 %else
 %global fail_on_tests 0
@@ -96,20 +96,20 @@
 %global gohostarch  s390x
 %endif
 
-%global go_api 1.11.13
-%global go_version 1.11.13
+%global go_api 1.12
+%global go_version 1.12.8
+%global pkg_release 2
 
 Name:           golang
-Version:        1.11.13
-Release:        2%{?dist}
+Version:        %{go_version}
+Release:        %{pkg_release}%{?dist}
 Summary:        The Go Programming Language
 # source tree includes several copies of Mark.Twain-Tom.Sawyer.txt under Public Domain
 License:        BSD and Public Domain
 URL:            http://golang.org/
-Source0:        https://pagure.io/go/archive/go-1.11.13-2-openssl-fips/go-go-1.11.13-2-openssl-fips.tar.gz 
+Source0:        https://pagure.io/go/archive/go-%{go_version}-%{pkg_release}-openssl-fips/go-go-%{go_version}-%{pkg_release}-openssl-fips.tar.gz
 # make possible to override default traceback level at build time by setting build tag rpm_crashtraceback
 Source1:        fedora.go
-Source2:        golang.macros
 
 # The compiler is written in Go. Needs go(1.4+) compiler for build.
 # Actual Go based bootstrap compiler provided by above source.
@@ -140,7 +140,6 @@ Patch215:       ./go1.5-zoneinfo_testing_only.patch
 # Proposed patch by jcajka https://golang.org/cl/86541
 Patch221: fix_TestScript_list_std.patch
 
-
 # Having documentation separate was broken
 Obsoletes:      %{name}-docs < 1.1-4
 
@@ -228,8 +227,7 @@ Requires:       %{name} = %{version}-%{release}
 %endif
 
 %prep
-%setup -q -n go-go-1.11.13-2-openssl-fips
-
+%setup -q -n go-go-%{go_version}-%{pkg_release}-openssl-fips
 
 %patch215 -p1
 
@@ -392,12 +390,6 @@ cp -av %{SOURCE100} $RPM_BUILD_ROOT%{_sysconfdir}/gdbinit.d/golang.gdb
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/prelink.conf.d
 cp -av %{SOURCE101} $RPM_BUILD_ROOT%{_sysconfdir}/prelink.conf.d/golang.conf
 
-# macros
-mkdir -p $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d
-cp -av %{SOURCE2} $RPM_BUILD_ROOT%{_rpmconfigdir}/macros.d/golang.macros
-
-
-
 %check
 export GOROOT=$(pwd -P)
 export PATH="$GOROOT"/bin:"$PATH"
@@ -478,9 +470,6 @@ cd ..
 %dir %{gopath}/src/golang.org
 %dir %{gopath}/src/golang.org/x
 
-# macros
-%{_rpmconfigdir}/macros.d
-
 # gdbinit (for gdb debugging)
 %{_sysconfdir}/gdbinit.d
 
@@ -509,24 +498,50 @@ cd ..
 %endif
 
 %changelog
-* Thu Aug 22 2019 Tom Stellard <tstellar@redhat.com> - 1.11.13-2
-- Improve error message when using non-FIPS API in FIPS mode.
-- Fixes CVE-2019-9512.
-- Fixes CVE-2019-9514.
-- Resolves: rhbz#1745711
-- Resolves: rhbz#1745705
-
-* Thu Aug 1 2019 Derek Parker <deparker@redhat.com> - 1.11.6-3
+* Wed Aug 28 2019 Tom Stellard <tstellar@redhat.com> - 1.12.8-2
+- Rebase to 1.12.8
+- Resolves: rhbz#1745706
+- Resolves: rhbz#1745712
+
+* Mon Aug 5 2019 Derek Parker <deparker@redhat.com> - 1.12.6-3
+- Add README for more documentation
+- Resolves: rhbz#1734788
+
+* Fri Aug 2 2019 Derek Parker <deparker@redhat.com> - 1.12.6-3
+- Revert some TLS FIPS changes for now
+- Resolves: rhbz#1734788
+
+* Thu Aug 1 2019 Derek Parker <deparker@redhat.com> - 1.12.6-2
 - Updates to be less strict on key size in FIPS mode
-- Resolves: rhbz#1731550
+- Resolves: rhbz#1734788
+
+* Thu Jun 13 2019 Derek Parker <deparker@redhat.com> - 1.12.6-1
+- Rebase to 1.12.6
+- Resolves: rhbz#1677819
+
+* Thu Jun 13 2019 Derek Parker <deparker@redhat.com> - 1.12.5-2
+- Remove macros present in go-compiler
+- Resolves: rhbz#1700109
+
+* Wed Jun 12 2019 Derek Parker <deparker@redhat.com> - 1.12.5-1
+- Rebase to 1.12.5
+- Resolves: rhbz#1677819
+
+* Wed May 29 2019 Derek Parker <deparker@redhat.com> - 1.12.1-2
+- Lock OpenSSL to specific built version and include more initialization.
+- Resolves: rhbz#1709603
+
+* Fri May 10 2019 Derek Parker <deparker@redhat.com> - 1.12.1-1
+- Rebase to 1.12.1
+- Include FIPS compliance updates
+- Resolves: rhbz#1709603
 
-* Wed May 29 2019 Derek Parker <deparker@redhat.com> - 1.11.6-2
-- Lock to specific OpenSSL version on build
-- Resolves: rhbz#1709606
+* Thu Apr 4 2019 Derek Parker <deparker@redhat.com> - 1.11.5-2
+- Include patch to fix CVE-2019-9741
+- Resolves: rhbz#1690443
 
-* Fri May 17 2019 Derek Parker <deparker@redhat.com> - 1.11.6-1
-- Rebase to Go 1.11.6 and include FIPS lab feedback
-- Resolves: rhbz#1709606
+* Mon Feb 18 2019 Derek Parker <deparker@redhat.com> - 1.11.5-2
+- Switch to pagure fork for Go FIPS
 
 * Thu Feb 7 2019 Derek Parker <deparker@redhat.com> - 1.11.5-1
 - Rebase to Go 1.11.5
-- 
GitLab