Use local proxy and sumdb for speed up
This commit is contained in:
parent
e10a8672a7
commit
cf15318291
31
0003-cmd-go-use-local-proxy-and-sumdb.patch
Normal file
31
0003-cmd-go-use-local-proxy-and-sumdb.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
--- go/src/cmd/go/internal/cfg/cfg.go.orig 2023-07-30 20:09:07.754216000 +0800
|
||||||
|
+++ go/src/cmd/go/internal/cfg/cfg.go 2023-07-30 20:09:46.037239800 +0800
|
||||||
|
@@ -383,8 +383,8 @@
|
||||||
|
GOPPC64 = envOr("GOPPC64", fmt.Sprintf("%s%d", "power", buildcfg.GOPPC64))
|
||||||
|
GOWASM = envOr("GOWASM", fmt.Sprint(buildcfg.GOWASM))
|
||||||
|
|
||||||
|
- GOPROXY = envOr("GOPROXY", "https://proxy.golang.org,direct")
|
||||||
|
- GOSUMDB = envOr("GOSUMDB", "sum.golang.org")
|
||||||
|
+ GOPROXY = envOr("GOPROXY", "https://repo.huaweicloud.com/repository/goproxy/,direct")
|
||||||
|
+ GOSUMDB = envOr("GOSUMDB", "sum.golang.google.cn")
|
||||||
|
GOPRIVATE = Getenv("GOPRIVATE")
|
||||||
|
GONOPROXY = envOr("GONOPROXY", GOPRIVATE)
|
||||||
|
GONOSUMDB = envOr("GONOSUMDB", GOPRIVATE)
|
||||||
|
--- go/src/cmd/go/testdata/script/mod_sumdb_golang.txt.orig 2023-07-30 20:09:55.992971800 +0800
|
||||||
|
+++ go/src/cmd/go/testdata/script/mod_sumdb_golang.txt 2023-07-30 20:10:32.184846600 +0800
|
||||||
|
@@ -2,12 +2,12 @@
|
||||||
|
env GOPROXY=
|
||||||
|
env GOSUMDB=
|
||||||
|
go env GOPROXY
|
||||||
|
-stdout '^https://proxy.golang.org,direct$'
|
||||||
|
+stdout '^https://repo.huaweicloud.com/repository/goproxy/,direct$'
|
||||||
|
go env GOSUMDB
|
||||||
|
-stdout '^sum.golang.org$'
|
||||||
|
+stdout '^sum.golang.google.cn$'
|
||||||
|
env GOPROXY=https://proxy.golang.org
|
||||||
|
go env GOSUMDB
|
||||||
|
-stdout '^sum.golang.org$'
|
||||||
|
+stdout '^sum.golang.google.cn$'
|
||||||
|
|
||||||
|
# Download direct from github.
|
||||||
|
|
||||||
@ -60,11 +60,11 @@
|
|||||||
|
|
||||||
Name: golang
|
Name: golang
|
||||||
Version: 1.20.5
|
Version: 1.20.5
|
||||||
Release: 2
|
Release: 3
|
||||||
Summary: The Go Programming Language
|
Summary: The Go Programming Language
|
||||||
License: BSD and Public Domain
|
License: BSD and Public Domain
|
||||||
URL: https://golang.org/
|
URL: https://golang.org/
|
||||||
Source0: https://dl.google.com/go/go1.20.5.src.tar.gz
|
Source0: https://dl.google.com/go/go%{version}.src.tar.gz
|
||||||
|
|
||||||
%if !%{golang_bootstrap}
|
%if !%{golang_bootstrap}
|
||||||
BuildRequires: gcc-go >= 5
|
BuildRequires: gcc-go >= 5
|
||||||
@ -148,6 +148,7 @@ Requires: %{vendor}-rpm-config
|
|||||||
|
|
||||||
Patch6001: 0001-Enable-go-plugin-support-for-riscv64-based-on-work-b.patch
|
Patch6001: 0001-Enable-go-plugin-support-for-riscv64-based-on-work-b.patch
|
||||||
Patch6002: 0002-release-branch.go1.19-net-http-validate-Host-header-.patch
|
Patch6002: 0002-release-branch.go1.19-net-http-validate-Host-header-.patch
|
||||||
|
Patch6003: 0003-cmd-go-use-local-proxy-and-sumdb.patch
|
||||||
ExclusiveArch: %{golang_arches}
|
ExclusiveArch: %{golang_arches}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -385,6 +386,9 @@ fi
|
|||||||
%files devel -f go-tests.list -f go-misc.list -f go-src.list
|
%files devel -f go-tests.list -f go-misc.list -f go-src.list
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Jul 30 2023 Funda Wang <fundawang@yeah.net> - 1.20.5-3
|
||||||
|
- Use local proxy and sumdb for speed up
|
||||||
|
|
||||||
* Tue Jul 11 2023 hanchao <sunchendong@xfusion.com> - 1.20.5-2
|
* Tue Jul 11 2023 hanchao <sunchendong@xfusion.com> - 1.20.5-2
|
||||||
- fix CVE-2023-29406
|
- fix CVE-2023-29406
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user