golang: modification of spec
Signed-off-by: Grooooot <isula@huawei.com>
This commit is contained in:
parent
747b3d9598
commit
592bf09553
@ -1,88 +0,0 @@
|
|||||||
From edce31a2904846ae74e3c011f2cf5fddc963459e Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Jakub=20=C4=8Cajka?= <jcajka@redhat.com>
|
|
||||||
Date: Thu, 22 Mar 2018 12:07:32 +0100
|
|
||||||
Subject: [PATCH 1/3] Don't use the bundled tzdata at runtime, except for the
|
|
||||||
internal test suite
|
|
||||||
|
|
||||||
---
|
|
||||||
src/time/internal_test.go | 7 +++++--
|
|
||||||
src/time/zoneinfo_test.go | 3 ++-
|
|
||||||
src/time/zoneinfo_unix.go | 2 --
|
|
||||||
3 files changed, 7 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/time/internal_test.go b/src/time/internal_test.go
|
|
||||||
index 76d5524124..e81ace5f64 100644
|
|
||||||
--- a/src/time/internal_test.go
|
|
||||||
+++ b/src/time/internal_test.go
|
|
||||||
@@ -4,13 +4,15 @@
|
|
||||||
|
|
||||||
package time
|
|
||||||
|
|
||||||
+import "runtime"
|
|
||||||
+
|
|
||||||
func init() {
|
|
||||||
// force US/Pacific for time zone tests
|
|
||||||
ForceUSPacificForTesting()
|
|
||||||
}
|
|
||||||
|
|
||||||
func initTestingZone() {
|
|
||||||
- z, err := loadLocation("America/Los_Angeles", zoneSources[len(zoneSources)-1:])
|
|
||||||
+ z, err := loadLocation("America/Los_Angeles", zoneSources)
|
|
||||||
if err != nil {
|
|
||||||
panic("cannot load America/Los_Angeles for testing: " + err.Error())
|
|
||||||
}
|
|
||||||
@@ -21,8 +23,9 @@ func initTestingZone() {
|
|
||||||
var OrigZoneSources = zoneSources
|
|
||||||
|
|
||||||
func forceZipFileForTesting(zipOnly bool) {
|
|
||||||
- zoneSources = make([]string, len(OrigZoneSources))
|
|
||||||
+ zoneSources = make([]string, len(OrigZoneSources)+1)
|
|
||||||
copy(zoneSources, OrigZoneSources)
|
|
||||||
+ zoneSources = append(zoneSources, runtime.GOROOT()+"/lib/time/zoneinfo.zip")
|
|
||||||
if zipOnly {
|
|
||||||
zoneSources = zoneSources[len(zoneSources)-1:]
|
|
||||||
}
|
|
||||||
diff --git a/src/time/zoneinfo_test.go b/src/time/zoneinfo_test.go
|
|
||||||
index 7a55d4f618..6063ca1195 100644
|
|
||||||
--- a/src/time/zoneinfo_test.go
|
|
||||||
+++ b/src/time/zoneinfo_test.go
|
|
||||||
@@ -8,6 +8,7 @@ import (
|
|
||||||
"fmt"
|
|
||||||
"os"
|
|
||||||
"reflect"
|
|
||||||
+ "runtime"
|
|
||||||
"testing"
|
|
||||||
"time"
|
|
||||||
)
|
|
||||||
@@ -128,7 +129,7 @@ func TestLoadLocationFromTZData(t *testing.T) {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
- tzinfo, err := time.LoadTzinfo(locationName, time.OrigZoneSources[len(time.OrigZoneSources)-1])
|
|
||||||
+ tzinfo, err := time.LoadTzinfo(locationName, runtime.GOROOT()+"/lib/time/zoneinfo.zip")
|
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
diff --git a/src/time/zoneinfo_unix.go b/src/time/zoneinfo_unix.go
|
|
||||||
index 88313aa0ed..d9596115ef 100644
|
|
||||||
--- a/src/time/zoneinfo_unix.go
|
|
||||||
+++ b/src/time/zoneinfo_unix.go
|
|
||||||
@@ -12,7 +12,6 @@
|
|
||||||
package time
|
|
||||||
|
|
||||||
import (
|
|
||||||
- "runtime"
|
|
||||||
"syscall"
|
|
||||||
)
|
|
||||||
|
|
||||||
@@ -22,7 +21,6 @@ var zoneSources = []string{
|
|
||||||
"/usr/share/zoneinfo/",
|
|
||||||
"/usr/share/lib/zoneinfo/",
|
|
||||||
"/usr/lib/locale/TZ/",
|
|
||||||
- runtime.GOROOT() + "/lib/time/zoneinfo.zip",
|
|
||||||
}
|
|
||||||
|
|
||||||
func initLocal() {
|
|
||||||
--
|
|
||||||
2.14.3
|
|
||||||
|
|
||||||
@ -1 +0,0 @@
|
|||||||
add-auto-load-safe-path /usr/lib/golang/src/runtime/runtime-gdb.py
|
|
||||||
@ -62,7 +62,7 @@
|
|||||||
|
|
||||||
Name: golang
|
Name: golang
|
||||||
Version: 1.13
|
Version: 1.13
|
||||||
Release: 3.1
|
Release: 3.2
|
||||||
Summary: The Go Programming Language
|
Summary: The Go Programming Language
|
||||||
License: BSD and Public Domain
|
License: BSD and Public Domain
|
||||||
URL: http://golang.org/
|
URL: http://golang.org/
|
||||||
@ -150,7 +150,6 @@ Obsoletes: %{name}-vim < 1.4
|
|||||||
Obsoletes: emacs-%{name} < 1.4
|
Obsoletes: emacs-%{name} < 1.4
|
||||||
Requires: openEuler-rpm-config
|
Requires: openEuler-rpm-config
|
||||||
|
|
||||||
Patch6001: 0001-Don-t-use-the-bundled-tzdata-at-runtime-except-for-t.patch
|
|
||||||
Patch6002: 0002-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch
|
Patch6002: 0002-syscall-expose-IfInfomsg.X__ifi_pad-on-s390x.patch
|
||||||
Patch6003: 0003-golang-delete-pem-files.patch
|
Patch6003: 0003-golang-delete-pem-files.patch
|
||||||
Patch6004: 0004-syscall-implement-rawVforkSyscall-for-linux-arm64.patch
|
Patch6004: 0004-syscall-implement-rawVforkSyscall-for-linux-arm64.patch
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user