From 185ca27650f6b411b221e9fa8fb4deb7257c0edf Mon Sep 17 00:00:00 2001 From: Zhao Hang Date: Thu, 7 Jul 2022 15:31:36 +0800 Subject: [PATCH] update to golang-1.17.10-1.module+el8.6.0+15486+6d4da7db Signed-off-by: Zhao Hang --- download | 2 +- fix_TestScript_list_std.patch | 2 +- go1.5-zoneinfo_testing_only.patch | 29 +++++----- golang.spec | 95 ++++++------------------------- skip_test_rhbz1939923.patch | 2 +- 5 files changed, 37 insertions(+), 93 deletions(-) diff --git a/download b/download index 756c91f..6ce8d24 100644 --- a/download +++ b/download @@ -1 +1 @@ -17410e2ec2dbfe34d042ca0bbec189da go-go-1.17.7-1-openssl-fips.tar.gz +462bb173624bc2858b904e29ab0463e4 go1.17.10-1-openssl-fips.tar.gz diff --git a/fix_TestScript_list_std.patch b/fix_TestScript_list_std.patch index 1387cb7..ade3711 100644 --- a/fix_TestScript_list_std.patch +++ b/fix_TestScript_list_std.patch @@ -1,5 +1,5 @@ diff --git a/src/cmd/go/testdata/script/list_std.txt b/src/cmd/go/testdata/script/list_std.txt -index 6ab1bd1674..4a00e436fd 100644 +index 6ab1bd1..4a00e43 100644 --- a/src/cmd/go/testdata/script/list_std.txt +++ b/src/cmd/go/testdata/script/list_std.txt @@ -6,7 +6,7 @@ env GO111MODULE=off diff --git a/go1.5-zoneinfo_testing_only.patch b/go1.5-zoneinfo_testing_only.patch index 581cb94..d6abe20 100644 --- a/go1.5-zoneinfo_testing_only.patch +++ b/go1.5-zoneinfo_testing_only.patch @@ -1,6 +1,7 @@ -diff -up go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/internal_test.go.time go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/internal_test.go ---- go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/internal_test.go.time 2017-12-05 01:10:10.000000000 +0100 -+++ go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/internal_test.go 2017-12-05 14:55:10.574637475 +0100 +diff --git a/src/time/internal_test.go b/src/time/internal_test.go +index 87a4208..0923e75 100644 +--- a/src/time/internal_test.go ++++ b/src/time/internal_test.go @@ -4,13 +4,15 @@ package time @@ -29,10 +30,11 @@ diff -up go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/internal_test.go.t if zipOnly { zoneSources = zoneSources[len(zoneSources)-1:] } -diff -up go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_test.go.time go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_test.go ---- go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_test.go.time 2017-12-05 01:10:10.000000000 +0100 -+++ go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_test.go 2017-12-05 14:58:09.823109248 +0100 -@@ -8,6 +8,7 @@ import ( +diff --git a/src/time/zoneinfo_test.go b/src/time/zoneinfo_test.go +index f032aa7..e3e5547 100644 +--- a/src/time/zoneinfo_test.go ++++ b/src/time/zoneinfo_test.go +@@ -9,6 +9,7 @@ import ( "fmt" "os" "reflect" @@ -40,7 +42,7 @@ diff -up go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_test.go.t "testing" "time" ) -@@ -128,7 +129,7 @@ func TestLoadLocationFromTZData(t *testi +@@ -137,7 +138,7 @@ func TestLoadLocationFromTZData(t *testing.T) { t.Fatal(err) } @@ -49,10 +51,11 @@ diff -up go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_test.go.t if err != nil { t.Fatal(err) } -diff -up go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_unix.go.time go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_unix.go ---- go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_unix.go.time 2017-12-05 01:10:10.000000000 +0100 -+++ go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_unix.go 2017-12-05 14:55:10.574637475 +0100 -@@ -12,7 +12,6 @@ +diff --git a/src/time/zoneinfo_unix.go b/src/time/zoneinfo_unix.go +index 4ea029d..e887769 100644 +--- a/src/time/zoneinfo_unix.go ++++ b/src/time/zoneinfo_unix.go +@@ -13,7 +13,6 @@ package time import ( @@ -60,7 +63,7 @@ diff -up go-dd7cbf3a846c2cb125ac65173abaf6a8b9f903ff/src/time/zoneinfo_unix.go.t "syscall" ) -@@ -22,7 +21,6 @@ var zoneSources = []string{ +@@ -23,7 +22,6 @@ var zoneSources = []string{ "/usr/share/zoneinfo/", "/usr/share/lib/zoneinfo/", "/usr/lib/locale/TZ/", diff --git a/golang.spec b/golang.spec index d589258..c62da57 100644 --- a/golang.spec +++ b/golang.spec @@ -29,20 +29,20 @@ # Define GOROOT macros %global goroot %{_prefix}/lib/%{name} %global gopath %{_datadir}/gocode -%global golang_arches x86_64 aarch64 ppc64le s390x loongarch64 +%global golang_arches x86_64 aarch64 ppc64le s390x %global golibdir %{_libdir}/%{name} # Golang build options. # Build golang using external/internal(close to cgo disabled) linking. -%ifarch x86_64 ppc64le %{arm} aarch64 s390x loongarch64 +%ifarch x86_64 ppc64le %{arm} aarch64 s390x %global external_linker 1 %else %global external_linker 0 %endif # Build golang with cgo enabled/disabled(later equals more or less to internal linking). -%ifarch x86_64 ppc64le %{arm} aarch64 s390x loongarch64 +%ifarch x86_64 ppc64le %{arm} aarch64 s390x %global cgo_enabled 1 %else %global cgo_enabled 0 @@ -56,7 +56,7 @@ %endif # Controls what ever we fail on failed tests -%ifarch x86_64 %{arm} aarch64 ppc64le loongarch64 +%ifarch x86_64 %{arm} aarch64 ppc64le %global fail_on_tests 1 %else %global fail_on_tests 0 @@ -94,24 +94,21 @@ %ifarch s390x %global gohostarch s390x %endif -%ifarch loongarch64 -%global gohostarch loong64 -%endif %global go_api 1.17 -%global go_version 1.17.7 +%global go_version 1.17.10 %global pkg_release 1 -%global anolis_release .0.1 Name: golang Version: %{go_version} -Release: 1%{anolis_release}%{?dist} +Release: 1%{?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-%{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 +Source0: https://github.com/golang-fips/go/archive/refs/tags/go%{go_version}-%{pkg_release}-openssl-fips.tar.gz + Source1: fedora.go # The compiler is written in Go. Needs go(1.4+) compiler for build. @@ -146,69 +143,6 @@ Patch221: fix_TestScript_list_std.patch Patch1939923: skip_test_rhbz1939923.patch -# These tests has been removed upstream due to -# nondeterministic flakiness -# https://bugzilla.redhat.com/show_bug.cgi?id=2028662 -Patch2028662: remove_waitgroup_misuse_tests.patch - -# Port to loongarch64 patches -Patch0001: 0001-cmd-internal-sys-declare-loong64-arch.patch -Patch0002: 0002-cmd-internal-sys-fix-placement-of-loong64-definition.patch -Patch0003: 0003-internal-add-loong64-constant-definition.patch -Patch0004: 0004-cmd-go-internal-configure-go-tool-workflow-for-loong.patch -Patch0005: 0005-cmd-compile-register-loong64.Init-function-for-compi.patch -Patch0006: 0006-cmd-compile-internal-loong64-implement-Init-function.patch -Patch0007: 0007-cmd-compile-internal-ssa-config-lower-pass-function-.patch -Patch0008: 0008-cmd-compile-internal-ssa-increase-the-bit-width-of-B.patch -Patch0009: 0009-cmd-compile-internal-ssa-gen-define-rules-and-operat.patch -Patch0010: 0010-cmd-compile-internal-ssa-inline-memmove-with-known-s.patch -Patch0011: 0011-cmd-compile-internal-ssa-add-support-on-loong64-for-.patch -Patch0012: 0012-cmd-compile-internal-ssagen-enable-intrinsic-operati.patch -Patch0013: 0013-cmd-compile-internal-fix-test-error-on-loong64.patch -Patch0014: 0014-cmd-internal-obj-instructions-and-registers-for-loon.patch -Patch0015: 0015-cmd-asm-internal-helper-function-and-end-to-end-test.patch -Patch0016: 0016-cmd-internal-objabi-cmd-link-support-linker-for-linu.patch -Patch0017: 0017-runtime-bootstrap-for-linux-loong64-and-implement-ru.patch -Patch0018: 0018-runtime-load-save-TLS-variable-g-on-loong64.patch -Patch0019: 0019-runtime-implement-signal-for-linux-loong64.patch -Patch0020: 0020-runtime-support-vdso-for-linux-loong64.patch -Patch0021: 0021-runtime-implement-duffzero-duffcopy-for-linux-loong6.patch -Patch0022: 0022-runtime-implement-asyncPreempt-for-linux-loong64.patch -Patch0023: 0023-runtime-support-memclr-memmove-for-linux-loong64.patch -Patch0024: 0024-runtime-implement-syscalls-for-runtime-bootstrap-on-.patch -Patch0025: 0025-runtime-add-build-tag-for-common-support-on-linux-lo.patch -Patch0026: 0026-runtime-fix-runtime-test-error-for-loong64.patch -Patch0027: 0027-runtime-internal-add-atomic-support-for-loong64.patch -Patch0028: 0028-cmd-cgo-configure-cgo-tool-for-loong64.patch -Patch0029: 0029-runtime-cgo-add-cgo-function-call-support-for-loong6.patch -Patch0030: 0030-cmd-nm-cmd-objdump-cmd-pprof-disassembly-is-not-supp.patch -Patch0031: 0031-cmd-dist-support-dist-tool-for-loong64.patch -Patch0032: 0032-cmd-vendor-update-vendored-golang.org-x-sys-to-suppo.patch -Patch0033: 0033-cmd-vendor-update-vendored-golang.org-x-tools-to-sup.patch -Patch0034: 0034-internal-bytealg-support-basic-byte-operation-on-loo.patch -Patch0035: 0035-debug-go-math-os-reflect-vendor-support-standard-lib.patch -Patch0036: 0036-syscall-add-syscall-support-for-linux-loong64.patch -Patch0037: 0037-internal-syscall-unix-loong64-use-generic-syscall.patch -Patch0038: 0038-misc-test-fix-test-error-for-loong64.patch -Patch0039: 0039-copyright-add-Loongson-into-AUTHORS.patch -Patch0040: 0040-api-fix-check-errors-for-loong64.patch -Patch0041: 0041-fixup-fix-misc-cgo-test-sigaltstack-size-on-loong64.patch -Patch0042: 0042-fixup-fix-mabi-to-lp64-for-loong64.patch -Patch0043: 0043-fixup-fix-runtime-defs_linux_loong64.patch -Patch0044: 0044-fixup-fix-test-issue11656-for-loong64.patch -Patch0045: 0045-runtime-fixed-func-breakpoint-implementation-on-loon.patch -Patch0046: 0046-update-vendor-golang.org-x-sys-for-byteorder-fix.patch -Patch0047: 0047-cmd-compile-remove-atomic-Cas-Xchg-and-Xadd-intrinsi.patch -Patch0048: 0048-runtime-fix-asyncPreempt-implementation-for-errors-o.patch -Patch0049: 0049-cmd-internal-obj-add-FuncInfo-SPWRITE-flag-for-linux.patch -Patch0050: 0050-runtime-add-missing-TOPFRAME-NOFRAME-flag-for-linux-.patch -Patch0051: 0051-cmd-compile-fix-loong64-constant-folding-in-division.patch -Patch0052: 0052-runtime-fix-the-vDSO-symbol-version-on-loong64.patch -Patch0053: 0053-internal-cpu-fix-cpu-cacheLineSize-for-loong64.patch -Patch0054: 0054-syscall-runtime-internal-syscall-always-zero-the-hig.patch -Patch0055: 0055-runtime-clean-up-unused-function-gosave-on-loong64.patch -Patch0056: 0056-debug-pe-add-IMAGE_FILE_MACHINE_LOONGARCH-64-32.patch - # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4 @@ -296,7 +230,13 @@ Requires: %{name} = %{version}-%{release} %endif %prep -%autosetup -p1 -n go-go-%{go_version}-%{pkg_release}-openssl-fips +%setup -q -n go-go%{go_version}-%{pkg_release}-openssl-fips + +%patch215 -p1 + +%patch221 -p1 + +%patch1939923 -p1 cp %{SOURCE1} ./src/runtime/ @@ -571,8 +511,9 @@ cd .. %endif %changelog -* Tue Jun 28 2022 Guoqi Chen - 1.17.7-1.0.1 -- Add loongarch support. +* Fri May 27 2022 David Benoit - 1.17.10-1 +- Rebase to Go 1.17.10 +- Resolves: rhbz#2091077 * Thu Feb 17 2022 David Benoit - 1.17.7-1 - Rebase to Go 1.17.7 diff --git a/skip_test_rhbz1939923.patch b/skip_test_rhbz1939923.patch index 80302d0..c9ff600 100644 --- a/skip_test_rhbz1939923.patch +++ b/skip_test_rhbz1939923.patch @@ -1,5 +1,5 @@ diff --git a/src/crypto/x509/x509_test.go b/src/crypto/x509/x509_test.go -index 51dda16815..2d1e1b1e6e 100644 +index f32dc7d..54db97c 100644 --- a/src/crypto/x509/x509_test.go +++ b/src/crypto/x509/x509_test.go @@ -2880,6 +2880,7 @@ func (bs *brokenSigner) Sign(_ io.Reader, _ []byte, _ crypto.SignerOpts) ([]byte -- Gitee