Compare commits
166 Commits
Author | SHA1 | Date |
---|---|---|
Jakub Čajka | 27a8ad3859 | |
Jakub Čajka | c88a8dfff5 | |
Jakub Čajka | 61730a32f4 | |
Jakub Čajka | d7ab797463 | |
Jakub Čajka | fb39d90765 | |
Jakub Čajka | d3aa981e83 | |
Jakub Čajka | dac586c9c7 | |
Fedora Release Engineering | e8c1f5c4a2 | |
Jakub Čajka | 132cf34fe6 | |
Jakub Čajka | a3e201c572 | |
Jakub Čajka | 6db1c7a908 | |
Alejandro Sáez | 0cb15e561e | |
Jakub Čajka | 91d21a3bde | |
Jakub Čajka | ea99ebaff6 | |
Alejandro Sáez | ecf8f72447 | |
Jakub Čajka | fde02715d5 | |
Álex Sáez | 8716ef4de3 | |
Jakub Čajka | aa89c2b0f2 | |
Neal Gompa | 1f08860197 | |
Jakub Čajka | 4487a1b142 | |
Jakub Čajka | 9f5b8dce35 | |
Fedora Release Engineering | 4751ecad2f | |
Jakub Čajka | fd2a3fb06e | |
Jakub Čajka | fbfc80f071 | |
Jakub Čajka | 1524937377 | |
Neal Gompa | a522b09638 | |
Neal Gompa | 50defcc683 | |
Jakub Čajka | f445d76353 | |
Jakub Čajka | 069e0f1f5f | |
Jakub Čajka | 151fe9ed9a | |
Jakub Čajka | 25a05dd355 | |
Jakub Čajka | 8f7b389463 | |
Jakub Čajka | e45411af09 | |
Jakub Čajka | af8d391cb2 | |
Jakub Čajka | 081d5ff6f2 | |
Jakub Čajka | 0e633c63ed | |
Fedora Release Engineering | 140a7e1b44 | |
Jakub Čajka | 29d5602b19 | |
Jakub Čajka | f80e5ff991 | |
Jakub Čajka | a94ffe83e5 | |
Jakub Čajka | 6c0cf70db5 | |
Jakub Čajka | a562f38c65 | |
Jakub Čajka | f344d3da25 | |
Jakub Čajka | 9985c0a473 | |
Jakub Čajka | ef14b33215 | |
Tim Landscheidt | ff7ebd7613 | |
Jakub Čajka | c74b6b6cb8 | |
Jakub Čajka | 73766cf515 | |
Fedora Release Engineering | e3e1bdbf46 | |
Jakub Čajka | 8ae8c86871 | |
Jakub Čajka | bc69b83b00 | |
Jakub Čajka | 50b7643bf7 | |
Jakub Čajka | b86284b4f3 | |
Jakub Čajka | eb7ec5ddc1 | |
Jakub Čajka | 3014b94569 | |
Jakub Čajka | f1f6f5d515 | |
Jakub Čajka | a273a5236a | |
Jakub Čajka | c45c363337 | |
Jakub Čajka | 4043bb182d | |
Jakub Čajka | 62f2ae0511 | |
Jakub Čajka | 75f7f03cb6 | |
Fedora Release Engineering | 72a9f2e921 | |
Jakub Čajka | 19d1adeab4 | |
Jakub Čajka | c333e76e86 | |
Jakub Čajka | 6caa43c106 | |
Jakub Čajka | 66a92c4de7 | |
Jakub Čajka | 2389428bde | |
Jakub Čajka | e8abe4385f | |
Jakub Čajka | 639f9ab37f | |
Jakub Čajka | 5f45ed12c2 | |
Fedora Release Engineering | 13bb238b09 | |
Jakub Čajka | 63e3cb4201 | |
Jakub Čajka | 77baa559ba | |
Jakub Čajka | d37b3b5006 | |
Jakub Čajka | 4bc73c764a | |
Jakub Čajka | b65272222a | |
Jakub Čajka | 315b776905 | |
Jakub Čajka | 920ea39083 | |
Jakub Čajka | 387b897724 | |
Jakub Čajka | ceb83a748c | |
Jakub Čajka | 903219bc93 | |
Fedora Release Engineering | cb0891bb70 | |
Fedora Release Engineering | 494a6d19c3 | |
Jakub Čajka | 9941f71a57 | |
Jakub Čajka | c2d0ceffa4 | |
Jakub Čajka | 3cc854f423 | |
Petr Písař | c7375398e7 | |
Jakub Čajka | 5767354120 | |
Jakub Čajka | 45041c89fe | |
Jakub Čajka | 0a43a1cbaf | |
Jakub Čajka | 1344685ff3 | |
Jakub Čajka | 5706a3480e | |
Jakub Čajka | ab6ee497cb | |
Jakub Čajka | 29646808b3 | |
Vincent Batts | d83d5139a6 | |
Vincent Batts | 63fbc71112 | |
Jakub Čajka | 749ec62908 | |
Jakub Čajka | a1ca3c96e0 | |
Jakub Čajka | 1bf7308023 | |
Fedora Release Engineering | 7dabca5bf2 | |
Jakub Čajka | b881112930 | |
Jakub Čajka | 100fcef237 | |
Jakub Cajka | 0dbd49fdd7 | |
Jakub Čajka | 66c8bd8593 | |
Tom Callaway | 85dfe17917 | |
Jakub Čajka | 663103c2f1 | |
Jakub Čajka | d978616527 | |
Jakub Čajka | 8bda509c5f | |
Jakub Čajka | 1fe9869398 | |
Jakub Čajka | 6896a58aa3 | |
Jakub Čajka | cf2fb88587 | |
Fedora Release Engineering | 00c920284f | |
Jakub Čajka | d36359a723 | |
Jakub Čajka | 04b972ebf4 | |
Jakub Čajka | b2c2028475 | |
Jakub Čajka | 263126ff1b | |
Dennis Gilmore | 30a817d62b | |
Jakub Čajka | f031dfde9c | |
Jakub Čajka | d40cd88359 | |
Jakub Čajka | 672b8a1217 | |
Jakub Čajka | 85525165e1 | |
Jakub Čajka | 8b92652b24 | |
Jakub Čajka | c524af8454 | |
Vincent Batts | ee2b299486 | |
Vincent Batts | c127d6af98 | |
Vincent Batts | a68f1b0499 | |
Vincent Batts | 286f73c812 | |
Vincent Batts | 34fd651dfb | |
Vincent Batts | 418a760bf8 | |
Vincent Batts | 7782fc08ed | |
Vincent Batts | 12a31f1822 | |
Vincent Batts | 1a6adea6fb | |
Vincent Batts | 32abaed9de | |
Vincent Batts | baf0278ae3 | |
Vincent Batts | 3cb3b22c16 | |
Vincent Batts | 01341969cc | |
Vincent Batts | 9297305de1 | |
Peter Robinson | b869aad629 | |
Peter Robinson | 79fd860ddc | |
Peter Robinson | 19dca7ffd3 | |
Vincent Batts | 0d13e2d904 | |
Vincent Batts | 03b73e2ea5 | |
Vincent Batts | 831ba34f74 | |
Vincent Batts | f2f58b5244 | |
Vincent Batts | 9fc0bc41c8 | |
Vincent Batts | 78d9b3d3ac | |
Vincent Batts | c1bee09f56 | |
Vincent Batts | bb5db89cf5 | |
Vincent Batts | 6da96f9716 | |
Vincent Batts | 0eec149c76 | |
Vincent Batts | 2ecad653a5 | |
Vincent Batts | beda572475 | |
Vincent Batts | 8d165dfe19 | |
Dennis Gilmore | 7dc03d1101 | |
Vincent Batts | a8686d833c | |
Vincent Batts | b5c025475a | |
Vincent Batts | 4c424d4664 | |
Vincent Batts | 2ba9c52536 | |
Vincent Batts | 82982da132 | |
Vincent Batts | 5e609613fc | |
Vincent Batts | 0ad646d98d | |
Vincent Batts | 55020ead86 | |
Vincent Batts | 20cd634d14 | |
Vincent Batts | 84f93201d9 | |
Vincent Batts | c2c5dc1c66 | |
Vincent Batts | e0d801060b |
|
@ -1,3 +1,4 @@
|
|||
*.rpm
|
||||
/go1.1.1.src.tar.gz
|
||||
/go1.1.2.src.tar.gz
|
||||
/go1.2.1.src.tar.gz
|
||||
|
@ -6,8 +7,91 @@
|
|||
/go1.3.1.src.tar.gz
|
||||
/go1.3.2.src.tar.gz
|
||||
/go1.3.3.src.tar.gz
|
||||
/go1.3.src.tar.gz
|
||||
/go1.3beta2.src.tar.gz
|
||||
/go1.3rc1.src.tar.gz
|
||||
/go1.3rc2.src.tar.gz
|
||||
/go1.3.src.tar.gz
|
||||
/go1.4.1.src.tar.gz
|
||||
/go1.4.2.src.tar.gz
|
||||
/go1.4.src.tar.gz
|
||||
/go1.4beta1.src.tar.gz
|
||||
/go1.4rc1.src.tar.gz
|
||||
/go1.4rc2.src.tar.gz
|
||||
/go1.5beta1.src.tar.gz
|
||||
/golang-19087:a15f344a9efa-xattrs.tar
|
||||
/go1.5beta2.src.tar.gz
|
||||
/go1.5beta3.src.tar.gz
|
||||
/go1.5rc1.src.tar.gz
|
||||
/go1.5.src.tar.gz
|
||||
/go1.5.1.src.tar.gz
|
||||
/go1.5.2.src.tar.gz
|
||||
/Mark.Twain-Tom.Sawyer.txt.bz2
|
||||
/go1.5.3.src.tar.gz
|
||||
/go1.6rc1.src.tar.gz
|
||||
/go1.6.src.tar.gz
|
||||
/go1.6.1.src.tar.gz
|
||||
/go1.6.2.src.tar.gz
|
||||
/go1.7rc2.src.tar.gz
|
||||
/go1.7rc5.src.tar.gz
|
||||
/go1.7.src.tar.gz
|
||||
/go1.7.1.src.tar.gz
|
||||
/go1.7.3.src.tar.gz
|
||||
/go1.7.4.src.tar.gz
|
||||
/go1.8rc3.src.tar.gz
|
||||
/go1.8.src.tar.gz
|
||||
/go1.8.1.src.tar.gz
|
||||
/go1.8.3.src.tar.gz
|
||||
/go1.9beta2.src.tar.gz
|
||||
/go1.9.src.tar.gz
|
||||
/go1.9.1.src.tar.gz
|
||||
/go1.9.2.src.tar.gz
|
||||
/go1.10beta1.src.tar.gz
|
||||
/go1.10beta2.src.tar.gz
|
||||
/go1.10rc1.src.tar.gz
|
||||
/go1.10rc2.src.tar.gz
|
||||
/go1.10.src.tar.gz
|
||||
/go1.10.1.src.tar.gz
|
||||
/go1.10.2.src.tar.gz
|
||||
/go1.10.3.src.tar.gz
|
||||
/go1.11beta1.src.tar.gz
|
||||
/go1.11beta2.src.tar.gz
|
||||
/go1.11beta3.src.tar.gz
|
||||
/go1.11rc1.src.tar.gz
|
||||
/go1.11rc2.src.tar.gz
|
||||
/go1.11.src.tar.gz
|
||||
/go1.11.1.src.tar.gz
|
||||
/go1.11.2.src.tar.gz
|
||||
/go1.11.4.src.tar.gz
|
||||
/go1.12beta2.src.tar.gz
|
||||
/go1.12rc1.src.tar.gz
|
||||
/go1.12.src.tar.gz
|
||||
/go1.12.1.src.tar.gz
|
||||
/go1.12.2.src.tar.gz
|
||||
/go1.12.5.src.tar.gz
|
||||
/go1.12.6.src.tar.gz
|
||||
/go1.12.7.src.tar.gz
|
||||
/go1.13beta1.src.tar.gz
|
||||
/go1.13rc1.src.tar.gz
|
||||
/go1.13rc2.src.tar.gz
|
||||
/go1.13.src.tar.gz
|
||||
/go1.13.1.src.tar.gz
|
||||
/go1.13.3.src.tar.gz
|
||||
/go1.13.4.src.tar.gz
|
||||
/go1.13.5.src.tar.gz
|
||||
/go1.13.6.src.tar.gz
|
||||
/go1.14beta1.src.tar.gz
|
||||
/go1.14rc1.src.tar.gz
|
||||
/go1.14.src.tar.gz
|
||||
/go1.14.2.src.tar.gz
|
||||
/go1.14.3.src.tar.gz
|
||||
/go1.14.4.src.tar.gz
|
||||
/go1.14.6.src.tar.gz
|
||||
/go1.15beta1.src.tar.gz
|
||||
/go1.15rc1.src.tar.gz
|
||||
/go1.15rc2.src.tar.gz
|
||||
/go1.15.src.tar.gz
|
||||
/go1.15.1.src.tar.gz
|
||||
/go1.15.2.src.tar.gz
|
||||
/go1.15.3.src.tar.gz
|
||||
/go1.15.4.src.tar.gz
|
||||
/go1.15.5.src.tar.gz
|
||||
|
|
|
@ -0,0 +1,88 @@
|
|||
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
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
From 817407fc2d6a861e65086388766f58082d38bc0b Mon Sep 17 00:00:00 2001
|
||||
From: Michael Munday <munday@ca.ibm.com>
|
||||
Date: Tue, 17 Jan 2017 11:33:38 -0500
|
||||
Subject: [PATCH 2/3] syscall: expose IfInfomsg.X__ifi_pad on s390x
|
||||
|
||||
Exposing this field on s390x improves compatibility with the other
|
||||
linux architectures, all of which already expose it.
|
||||
|
||||
Fixes #18628 and updates #18632.
|
||||
|
||||
Change-Id: I08e8e1eb705f898cd8822f8bee0d61ce11d514b5
|
||||
---
|
||||
src/syscall/ztypes_linux_s390x.go | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/syscall/ztypes_linux_s390x.go b/src/syscall/ztypes_linux_s390x.go
|
||||
index 63c4a83b19..b5894255df 100644
|
||||
--- a/src/syscall/ztypes_linux_s390x.go
|
||||
+++ b/src/syscall/ztypes_linux_s390x.go
|
||||
@@ -449,12 +449,12 @@ type RtAttr struct {
|
||||
}
|
||||
|
||||
type IfInfomsg struct {
|
||||
- Family uint8
|
||||
- _ uint8
|
||||
- Type uint16
|
||||
- Index int32
|
||||
- Flags uint32
|
||||
- Change uint32
|
||||
+ Family uint8
|
||||
+ X__ifi_pad uint8
|
||||
+ Type uint16
|
||||
+ Index int32
|
||||
+ Flags uint32
|
||||
+ Change uint32
|
||||
}
|
||||
|
||||
type IfAddrmsg struct {
|
||||
--
|
||||
2.14.3
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
From b38cd2374c2395f5a77802ef8ea3d7ac5b8a86ad Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Jakub=20=C4=8Cajka?= <jcajka@redhat.com>
|
||||
Date: Mon, 27 May 2019 15:12:53 +0200
|
||||
Subject: [PATCH 3/3] cmd/go: disable Google's proxy and sumdb
|
||||
|
||||
---
|
||||
src/cmd/go/internal/cfg/cfg.go | 10 +++++-----
|
||||
src/cmd/go/testdata/script/mod_sumdb_golang.txt | 6 +++---
|
||||
2 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/cmd/go/internal/cfg/cfg.go b/src/cmd/go/internal/cfg/cfg.go
|
||||
index 61dc6bdda6..e8658dc56c 100644
|
||||
--- a/src/cmd/go/internal/cfg/cfg.go
|
||||
+++ b/src/cmd/go/internal/cfg/cfg.go
|
||||
@@ -245,11 +245,11 @@ var (
|
||||
GOPPC64 = envOr("GOPPC64", fmt.Sprintf("%s%d", "power", objabi.GOPPC64))
|
||||
GOWASM = envOr("GOWASM", fmt.Sprint(objabi.GOWASM))
|
||||
|
||||
- GOPROXY = envOr("GOPROXY", "https://proxy.golang.org,direct")
|
||||
- GOSUMDB = envOr("GOSUMDB", "sum.golang.org")
|
||||
- GOPRIVATE = Getenv("GOPRIVATE")
|
||||
- GONOPROXY = envOr("GONOPROXY", GOPRIVATE)
|
||||
- GONOSUMDB = envOr("GONOSUMDB", GOPRIVATE)
|
||||
+ GOPROXY = envOr("GOPROXY", "direct")
|
||||
+ GOSUMDB = envOr("GOSUMDB", "off")
|
||||
+ GOPRIVATE = Getenv("GOPRIVATE")
|
||||
+ GONOPROXY = envOr("GONOPROXY", GOPRIVATE)
|
||||
+ GONOSUMDB = envOr("GONOSUMDB", GOPRIVATE)
|
||||
GOINSECURE = Getenv("GOINSECURE")
|
||||
)
|
||||
|
||||
diff --git a/src/cmd/go/testdata/script/mod_sumdb_golang.txt b/src/cmd/go/testdata/script/mod_sumdb_golang.txt
|
||||
index 40a07fc7e9..50436e32d7 100644
|
||||
--- a/src/cmd/go/testdata/script/mod_sumdb_golang.txt
|
||||
+++ b/src/cmd/go/testdata/script/mod_sumdb_golang.txt
|
||||
@@ -2,12 +2,12 @@
|
||||
env GOPROXY=
|
||||
env GOSUMDB=
|
||||
go env GOPROXY
|
||||
-stdout '^https://proxy.golang.org,direct$'
|
||||
+stdout '^direct$'
|
||||
go env GOSUMDB
|
||||
-stdout '^sum.golang.org$'
|
||||
+stdout '^off$'
|
||||
env GOPROXY=https://proxy.golang.org
|
||||
go env GOSUMDB
|
||||
-stdout '^sum.golang.org$'
|
||||
+stdout '^off$'
|
||||
|
||||
# download direct from github
|
||||
[!net] skip
|
||||
--
|
||||
2.21.0
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
// +build rpm_crashtraceback
|
||||
|
||||
package runtime
|
||||
|
||||
func init() {
|
||||
setTraceback("crash")
|
||||
}
|
|
@ -1,110 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User Cristian Staretu <unclejacksons@gmail.com>
|
||||
# Date 1405555229 -36000
|
||||
# Thu Jul 17 10:00:29 2014 +1000
|
||||
# Node ID 1b17b3426e3c281a973d2d7bbf235b936d6a0942
|
||||
# Parent 278365dff593f027db6c6b2c0a89262490d6b676
|
||||
archive/tar: fix writing of pax headers
|
||||
|
||||
"archive/tar: reuse temporary buffer in writeHeader" introduced a
|
||||
change which was supposed to help lower the number of allocations from
|
||||
512 bytes for every call to writeHeader. This change broke the writing
|
||||
of PAX headers.
|
||||
|
||||
writeHeader calls writePAXHeader and writePAXHeader calls writeHeader
|
||||
again. writeHeader will end up writing the PAX header twice.
|
||||
|
||||
example broken header:
|
||||
PaxHeaders.4007/NetLock_Arany_=Class_Gold=_Ftanstvny.crt0000000000000000000000000000007112301216634021512 xustar0000000000000000
|
||||
PaxHeaders.4007/NetLock_Arany_=Class_Gold=_Ftanstvny.crt0000000000000000000000000000007112301216634021512 xustar0000000000000000
|
||||
|
||||
example correct header:
|
||||
PaxHeaders.4290/NetLock_Arany_=Class_Gold=_Ftanstvny.crt0000000000000000000000000000007112301216634021516 xustar0000000000000000
|
||||
0100644000000000000000000000270412301216634007250 0ustar0000000000000000
|
||||
|
||||
This commit adds a dedicated buffer for pax headers to the Writer
|
||||
struct. This change increases the size of the struct by 512 bytes, but
|
||||
allows tar/writer to avoid allocating 512 bytes for all written
|
||||
headers and it avoids allocating 512 more bytes for pax headers.
|
||||
|
||||
LGTM=dsymonds
|
||||
R=dsymonds, dave, iant
|
||||
CC=golang-codereviews
|
||||
https://codereview.appspot.com/110480043
|
||||
|
||||
Committer: David Symonds <dsymonds@golang.org>
|
||||
|
||||
diff -r 278365dff593 -r 1b17b3426e3c src/pkg/archive/tar/writer.go
|
||||
--- a/src/pkg/archive/tar/writer.go Wed Jul 16 16:29:51 2014 -0700
|
||||
+++ b/src/pkg/archive/tar/writer.go Thu Jul 17 10:00:29 2014 +1000
|
||||
@@ -39,7 +39,8 @@
|
||||
closed bool
|
||||
usedBinary bool // whether the binary numeric field extension was used
|
||||
preferPax bool // use pax header instead of binary numeric header
|
||||
- hdrBuff [blockSize]byte // buffer to use in writeHeader
|
||||
+ hdrBuff [blockSize]byte // buffer to use in writeHeader when writing a regular header
|
||||
+ paxHdrBuff [blockSize]byte // buffer to use in writeHeader when writing a pax header
|
||||
}
|
||||
|
||||
// NewWriter creates a new Writer writing to w.
|
||||
@@ -161,7 +162,17 @@
|
||||
// subsecond time resolution, but for now let's just capture
|
||||
// too long fields or non ascii characters
|
||||
|
||||
- header := tw.hdrBuff[:]
|
||||
+ var header []byte
|
||||
+
|
||||
+ // We need to select which scratch buffer to use carefully,
|
||||
+ // since this method is called recursively to write PAX headers.
|
||||
+ // If allowPax is true, this is the non-recursive call, and we will use hdrBuff.
|
||||
+ // If allowPax is false, we are being called by writePAXHeader, and hdrBuff is
|
||||
+ // already being used by the non-recursive call, so we must use paxHdrBuff.
|
||||
+ header = tw.hdrBuff[:]
|
||||
+ if !allowPax {
|
||||
+ header = tw.paxHdrBuff[:]
|
||||
+ }
|
||||
copy(header, zeroBlock)
|
||||
s := slicer(header)
|
||||
|
||||
diff -r 278365dff593 -r 1b17b3426e3c src/pkg/archive/tar/writer_test.go
|
||||
--- a/src/pkg/archive/tar/writer_test.go Wed Jul 16 16:29:51 2014 -0700
|
||||
+++ b/src/pkg/archive/tar/writer_test.go Thu Jul 17 10:00:29 2014 +1000
|
||||
@@ -454,3 +454,38 @@
|
||||
t.Fatal("Couldn't recover long name")
|
||||
}
|
||||
}
|
||||
+
|
||||
+func TestValidTypeflagWithPAXHeader(t *testing.T) {
|
||||
+ var buffer bytes.Buffer
|
||||
+ tw := NewWriter(&buffer)
|
||||
+
|
||||
+ fileName := strings.Repeat("ab", 100)
|
||||
+
|
||||
+ hdr := &Header{
|
||||
+ Name: fileName,
|
||||
+ Size: 4,
|
||||
+ Typeflag: 0,
|
||||
+ }
|
||||
+ if err := tw.WriteHeader(hdr); err != nil {
|
||||
+ t.Fatalf("Failed to write header: %s", err)
|
||||
+ }
|
||||
+ if _, err := tw.Write([]byte("fooo")); err != nil {
|
||||
+ t.Fatalf("Failed to write the file's data: %s", err)
|
||||
+ }
|
||||
+ tw.Close()
|
||||
+
|
||||
+ tr := NewReader(&buffer)
|
||||
+
|
||||
+ for {
|
||||
+ header, err := tr.Next()
|
||||
+ if err == io.EOF {
|
||||
+ break
|
||||
+ }
|
||||
+ if err != nil {
|
||||
+ t.Fatalf("Failed to read header: %s", err)
|
||||
+ }
|
||||
+ if header.Typeflag != 0 {
|
||||
+ t.Fatalf("Typeflag should've been 0, found %d", header.Typeflag)
|
||||
+ }
|
||||
+ }
|
||||
+}
|
|
@ -1,64 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User Cristian Staretu <unclejacksons@gmail.com>
|
||||
# Date 1404344479 -36000
|
||||
# Thu Jul 03 09:41:19 2014 +1000
|
||||
# Node ID 17404efd6b02d4b3acd17070e3f89de97a145877
|
||||
# Parent 837348e418f33fc7a242f56dbe2feff829532526
|
||||
archive/tar: reuse temporary buffer in readHeader
|
||||
|
||||
A temporary 512 bytes buffer is allocated for every call to
|
||||
readHeader. This buffer isn't returned to the caller and it could
|
||||
be reused to lower the number of memory allocations.
|
||||
|
||||
This CL improves it by using a pool and zeroing out the buffer before
|
||||
putting it back into the pool.
|
||||
|
||||
benchmark old ns/op new ns/op delta
|
||||
BenchmarkListFiles100k 545249903 538832687 -1.18%
|
||||
|
||||
benchmark old allocs new allocs delta
|
||||
BenchmarkListFiles100k 2105167 2005692 -4.73%
|
||||
|
||||
benchmark old bytes new bytes delta
|
||||
BenchmarkListFiles100k 105903472 54831527 -48.22%
|
||||
|
||||
This improvement is very important if your code has to deal with a lot
|
||||
of tarballs which contain a lot of files.
|
||||
|
||||
LGTM=dsymonds
|
||||
R=golang-codereviews, dave, dsymonds, bradfitz
|
||||
CC=golang-codereviews
|
||||
https://codereview.appspot.com/108240044
|
||||
|
||||
Committer: David Symonds <dsymonds@golang.org>
|
||||
|
||||
diff -r 837348e418f3 -r 17404efd6b02 src/pkg/archive/tar/reader.go
|
||||
--- a/src/pkg/archive/tar/reader.go Thu Jul 03 09:40:53 2014 +1000
|
||||
+++ b/src/pkg/archive/tar/reader.go Thu Jul 03 09:41:19 2014 +1000
|
||||
@@ -29,10 +29,11 @@
|
||||
// The Next method advances to the next file in the archive (including the first),
|
||||
// and then it can be treated as an io.Reader to access the file's data.
|
||||
type Reader struct {
|
||||
- r io.Reader
|
||||
- err error
|
||||
- pad int64 // amount of padding (ignored) after current file entry
|
||||
- curr numBytesReader // reader for current file entry
|
||||
+ r io.Reader
|
||||
+ err error
|
||||
+ pad int64 // amount of padding (ignored) after current file entry
|
||||
+ curr numBytesReader // reader for current file entry
|
||||
+ hdrBuff [blockSize]byte // buffer to use in readHeader
|
||||
}
|
||||
|
||||
// A numBytesReader is an io.Reader with a numBytes method, returning the number
|
||||
@@ -426,7 +427,9 @@
|
||||
}
|
||||
|
||||
func (tr *Reader) readHeader() *Header {
|
||||
- header := make([]byte, blockSize)
|
||||
+ header := tr.hdrBuff[:]
|
||||
+ copy(header, zeroBlock)
|
||||
+
|
||||
if _, tr.err = io.ReadFull(tr.r, header); tr.err != nil {
|
||||
return nil
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User Cristian Staretu <unclejacksons@gmail.com>
|
||||
# Date 1404344453 -36000
|
||||
# Thu Jul 03 09:40:53 2014 +1000
|
||||
# Node ID 837348e418f33fc7a242f56dbe2feff829532526
|
||||
# Parent c5f72a685e256457a0872f6587e2bb9500eac7c4
|
||||
archive/tar: reuse temporary buffer in writeHeader
|
||||
|
||||
A temporary 512 bytes buffer is allocated for every call to
|
||||
writeHeader. This buffer could be reused the lower the number
|
||||
of memory allocations.
|
||||
|
||||
benchmark old ns/op new ns/op delta
|
||||
BenchmarkWriteFiles100k 634622051 583810847 -8.01%
|
||||
|
||||
benchmark old allocs new allocs delta
|
||||
BenchmarkWriteFiles100k 2701920 2602621 -3.68%
|
||||
|
||||
benchmark old bytes new bytes delta
|
||||
BenchmarkWriteFiles100k 115383884 64349922 -44.23%
|
||||
|
||||
This change is very important if your code has to write a lot of
|
||||
tarballs with a lot of files.
|
||||
|
||||
LGTM=dsymonds
|
||||
R=golang-codereviews, dave, dsymonds
|
||||
CC=golang-codereviews
|
||||
https://codereview.appspot.com/107440043
|
||||
|
||||
Committer: David Symonds <dsymonds@golang.org>
|
||||
|
||||
diff -r c5f72a685e25 -r 837348e418f3 src/pkg/archive/tar/writer.go
|
||||
--- a/src/pkg/archive/tar/writer.go Wed Jul 02 15:28:57 2014 -0700
|
||||
+++ b/src/pkg/archive/tar/writer.go Thu Jul 03 09:40:53 2014 +1000
|
||||
@@ -37,8 +37,9 @@
|
||||
nb int64 // number of unwritten bytes for current file entry
|
||||
pad int64 // amount of padding to write after current file entry
|
||||
closed bool
|
||||
- usedBinary bool // whether the binary numeric field extension was used
|
||||
- preferPax bool // use pax header instead of binary numeric header
|
||||
+ usedBinary bool // whether the binary numeric field extension was used
|
||||
+ preferPax bool // use pax header instead of binary numeric header
|
||||
+ hdrBuff [blockSize]byte // buffer to use in writeHeader
|
||||
}
|
||||
|
||||
// NewWriter creates a new Writer writing to w.
|
||||
@@ -160,7 +161,8 @@
|
||||
// subsecond time resolution, but for now let's just capture
|
||||
// too long fields or non ascii characters
|
||||
|
||||
- header := make([]byte, blockSize)
|
||||
+ header := tw.hdrBuff[:]
|
||||
+ copy(header, zeroBlock)
|
||||
s := slicer(header)
|
||||
|
||||
// keep a reference to the filename to allow to overwrite it later if we detect that we can use ustar longnames instead of pax
|
|
@ -1,19 +0,0 @@
|
|||
Index: go/include/u.h
|
||||
===================================================================
|
||||
--- go.orig/include/u.h
|
||||
+++ go/include/u.h
|
||||
@@ -38,10 +38,13 @@ extern "C" {
|
||||
# define __MAKECONTEXT_V2_SOURCE 1
|
||||
# endif
|
||||
#endif
|
||||
+#if defined __linux__ || defined __GNU__ || defined __GLIBC__
|
||||
+#define _DEFAULT_SOURCE 1
|
||||
+#else
|
||||
#define _BSD_SOURCE 1
|
||||
#define _NETBSD_SOURCE 1 /* NetBSD */
|
||||
-#define _DEFAULT_SOURCE 1 /* glibc > 2.19 */
|
||||
#define _SVID_SOURCE 1
|
||||
+#endif
|
||||
#if !defined(__APPLE__) && !defined(__OpenBSD__)
|
||||
# define _XOPEN_SOURCE 1000
|
||||
# define _XOPEN_SOURCE_EXTENDED 1
|
|
@ -1,197 +0,0 @@
|
|||
# HG changeset patch
|
||||
# User Alexander Larsson <alexander.larsson@gmail.com>
|
||||
# Date 1392282510 -39600
|
||||
# Node ID a15f344a9efa35ef168c8feaa92a15a1cdc93db5
|
||||
# Parent 1a32fe60e0798d82bbff6c945001c7f0ba8de5ea
|
||||
archive/tar: support extended attributes
|
||||
|
||||
This adds support for archives with the SCHILY.xattr field in the
|
||||
pax header. This is what gnu tar and star generate.
|
||||
Fixes issue 7154.
|
||||
|
||||
LGTM=dsymonds
|
||||
R=golang-codereviews, gobot, dsymonds
|
||||
CC=golang-codereviews
|
||||
https://codereview.appspot.com/54570043
|
||||
|
||||
Committer: David Symonds <dsymonds@golang.org>
|
||||
|
||||
diff -r 1a32fe60e079 -r a15f344a9efa src/pkg/archive/tar/common.go
|
||||
--- a/src/pkg/archive/tar/common.go Thu Feb 13 03:09:03 2014 -0500
|
||||
+++ b/src/pkg/archive/tar/common.go Thu Feb 13 20:08:30 2014 +1100
|
||||
@@ -57,6 +57,7 @@
|
||||
Devminor int64 // minor number of character or block device
|
||||
AccessTime time.Time // access time
|
||||
ChangeTime time.Time // status change time
|
||||
+ Xattrs map[string]string
|
||||
}
|
||||
|
||||
// File name constants from the tar spec.
|
||||
@@ -189,6 +190,7 @@
|
||||
paxSize = "size"
|
||||
paxUid = "uid"
|
||||
paxUname = "uname"
|
||||
+ paxXattr = "SCHILY.xattr."
|
||||
paxNone = ""
|
||||
)
|
||||
|
||||
diff -r 1a32fe60e079 -r a15f344a9efa src/pkg/archive/tar/reader.go
|
||||
--- a/src/pkg/archive/tar/reader.go Thu Feb 13 03:09:03 2014 -0500
|
||||
+++ b/src/pkg/archive/tar/reader.go Thu Feb 13 20:08:30 2014 +1100
|
||||
@@ -139,8 +139,14 @@
|
||||
return err
|
||||
}
|
||||
hdr.Size = int64(size)
|
||||
+ default:
|
||||
+ if strings.HasPrefix(k, paxXattr) {
|
||||
+ if hdr.Xattrs == nil {
|
||||
+ hdr.Xattrs = make(map[string]string)
|
||||
+ }
|
||||
+ hdr.Xattrs[k[len(paxXattr):]] = v
|
||||
+ }
|
||||
}
|
||||
-
|
||||
}
|
||||
return nil
|
||||
}
|
||||
diff -r 1a32fe60e079 -r a15f344a9efa src/pkg/archive/tar/reader_test.go
|
||||
--- a/src/pkg/archive/tar/reader_test.go Thu Feb 13 03:09:03 2014 -0500
|
||||
+++ b/src/pkg/archive/tar/reader_test.go Thu Feb 13 20:08:30 2014 +1100
|
||||
@@ -161,6 +161,46 @@
|
||||
},
|
||||
},
|
||||
},
|
||||
+ {
|
||||
+ file: "testdata/xattrs.tar",
|
||||
+ headers: []*Header{
|
||||
+ {
|
||||
+ Name: "small.txt",
|
||||
+ Mode: 0644,
|
||||
+ Uid: 1000,
|
||||
+ Gid: 10,
|
||||
+ Size: 5,
|
||||
+ ModTime: time.Unix(1386065770, 448252320),
|
||||
+ Typeflag: '0',
|
||||
+ Uname: "alex",
|
||||
+ Gname: "wheel",
|
||||
+ AccessTime: time.Unix(1389782991, 419875220),
|
||||
+ ChangeTime: time.Unix(1389782956, 794414986),
|
||||
+ Xattrs: map[string]string{
|
||||
+ "user.key": "value",
|
||||
+ "user.key2": "value2",
|
||||
+ // Interestingly, selinux encodes the terminating null inside the xattr
|
||||
+ "security.selinux": "unconfined_u:object_r:default_t:s0\x00",
|
||||
+ },
|
||||
+ },
|
||||
+ {
|
||||
+ Name: "small2.txt",
|
||||
+ Mode: 0644,
|
||||
+ Uid: 1000,
|
||||
+ Gid: 10,
|
||||
+ Size: 11,
|
||||
+ ModTime: time.Unix(1386065770, 449252304),
|
||||
+ Typeflag: '0',
|
||||
+ Uname: "alex",
|
||||
+ Gname: "wheel",
|
||||
+ AccessTime: time.Unix(1389782991, 419875220),
|
||||
+ ChangeTime: time.Unix(1386065770, 449252304),
|
||||
+ Xattrs: map[string]string{
|
||||
+ "security.selinux": "unconfined_u:object_r:default_t:s0\x00",
|
||||
+ },
|
||||
+ },
|
||||
+ },
|
||||
+ },
|
||||
}
|
||||
|
||||
func TestReader(t *testing.T) {
|
||||
@@ -180,7 +220,7 @@
|
||||
f.Close()
|
||||
continue testLoop
|
||||
}
|
||||
- if *hdr != *header {
|
||||
+ if !reflect.DeepEqual(*hdr, *header) {
|
||||
t.Errorf("test %d, entry %d: Incorrect header:\nhave %+v\nwant %+v",
|
||||
i, j, *hdr, *header)
|
||||
}
|
||||
@@ -253,7 +293,7 @@
|
||||
}
|
||||
|
||||
// check the header
|
||||
- if *hdr != *headers[nread] {
|
||||
+ if !reflect.DeepEqual(*hdr, *headers[nread]) {
|
||||
t.Errorf("Incorrect header:\nhave %+v\nwant %+v",
|
||||
*hdr, headers[nread])
|
||||
}
|
||||
diff -r 1a32fe60e079 -r a15f344a9efa src/pkg/archive/tar/writer.go
|
||||
--- a/src/pkg/archive/tar/writer.go Thu Feb 13 03:09:03 2014 -0500
|
||||
+++ b/src/pkg/archive/tar/writer.go Thu Feb 13 20:08:30 2014 +1100
|
||||
@@ -236,6 +236,12 @@
|
||||
return tw.err
|
||||
}
|
||||
|
||||
+ if allowPax {
|
||||
+ for k, v := range hdr.Xattrs {
|
||||
+ paxHeaders[paxXattr+k] = v
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
if len(paxHeaders) > 0 {
|
||||
if !allowPax {
|
||||
return errInvalidHeader
|
||||
diff -r 1a32fe60e079 -r a15f344a9efa src/pkg/archive/tar/writer_test.go
|
||||
--- a/src/pkg/archive/tar/writer_test.go Thu Feb 13 03:09:03 2014 -0500
|
||||
+++ b/src/pkg/archive/tar/writer_test.go Thu Feb 13 20:08:30 2014 +1100
|
||||
@@ -10,6 +10,7 @@
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
+ "reflect"
|
||||
"strings"
|
||||
"testing"
|
||||
"testing/iotest"
|
||||
@@ -338,6 +339,45 @@
|
||||
}
|
||||
}
|
||||
|
||||
+func TestPaxXattrs(t *testing.T) {
|
||||
+ xattrs := map[string]string{
|
||||
+ "user.key": "value",
|
||||
+ }
|
||||
+
|
||||
+ // Create an archive with an xattr
|
||||
+ fileinfo, err := os.Stat("testdata/small.txt")
|
||||
+ if err != nil {
|
||||
+ t.Fatal(err)
|
||||
+ }
|
||||
+ hdr, err := FileInfoHeader(fileinfo, "")
|
||||
+ if err != nil {
|
||||
+ t.Fatalf("os.Stat: %v", err)
|
||||
+ }
|
||||
+ contents := "Kilts"
|
||||
+ hdr.Xattrs = xattrs
|
||||
+ var buf bytes.Buffer
|
||||
+ writer := NewWriter(&buf)
|
||||
+ if err := writer.WriteHeader(hdr); err != nil {
|
||||
+ t.Fatal(err)
|
||||
+ }
|
||||
+ if _, err = writer.Write([]byte(contents)); err != nil {
|
||||
+ t.Fatal(err)
|
||||
+ }
|
||||
+ if err := writer.Close(); err != nil {
|
||||
+ t.Fatal(err)
|
||||
+ }
|
||||
+ // Test that we can get the xattrs back out of the archive.
|
||||
+ reader := NewReader(&buf)
|
||||
+ hdr, err = reader.Next()
|
||||
+ if err != nil {
|
||||
+ t.Fatal(err)
|
||||
+ }
|
||||
+ if !reflect.DeepEqual(hdr.Xattrs, xattrs) {
|
||||
+ t.Fatalf("xattrs did not survive round trip: got %+v, want %+v",
|
||||
+ hdr.Xattrs, xattrs)
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
func TestPAXHeader(t *testing.T) {
|
||||
medName := strings.Repeat("CD", 50)
|
||||
longName := strings.Repeat("AB", 100)
|
|
@ -1,172 +0,0 @@
|
|||
Index: go/api/go1.txt
|
||||
===================================================================
|
||||
--- go.orig/api/go1.txt
|
||||
+++ go/api/go1.txt
|
||||
@@ -412,7 +412,6 @@ pkg crypto/ecdsa, type PublicKey struct,
|
||||
pkg crypto/ecdsa, type PublicKey struct, embedded elliptic.Curve
|
||||
pkg crypto/elliptic, func GenerateKey(Curve, io.Reader) ([]uint8, *big.Int, *big.Int, error)
|
||||
pkg crypto/elliptic, func Marshal(Curve, *big.Int, *big.Int) []uint8
|
||||
-pkg crypto/elliptic, func P224() Curve
|
||||
pkg crypto/elliptic, func P256() Curve
|
||||
pkg crypto/elliptic, func P384() Curve
|
||||
pkg crypto/elliptic, func P521() Curve
|
||||
Index: go/src/pkg/crypto/ecdsa/ecdsa_test.go
|
||||
===================================================================
|
||||
--- go.orig/src/pkg/crypto/ecdsa/ecdsa_test.go
|
||||
+++ go/src/pkg/crypto/ecdsa/ecdsa_test.go
|
||||
@@ -33,7 +33,6 @@ func testKeyGeneration(t *testing.T, c e
|
||||
}
|
||||
|
||||
func TestKeyGeneration(t *testing.T) {
|
||||
- testKeyGeneration(t, elliptic.P224(), "p224")
|
||||
if testing.Short() {
|
||||
return
|
||||
}
|
||||
@@ -63,7 +62,6 @@ func testSignAndVerify(t *testing.T, c e
|
||||
}
|
||||
|
||||
func TestSignAndVerify(t *testing.T) {
|
||||
- testSignAndVerify(t, elliptic.P224(), "p224")
|
||||
if testing.Short() {
|
||||
return
|
||||
}
|
||||
@@ -129,8 +127,6 @@ func TestVectors(t *testing.T) {
|
||||
parts := strings.SplitN(line, ",", 2)
|
||||
|
||||
switch parts[0] {
|
||||
- case "P-224":
|
||||
- pub.Curve = elliptic.P224()
|
||||
case "P-256":
|
||||
pub.Curve = elliptic.P256()
|
||||
case "P-384":
|
||||
Index: go/src/pkg/crypto/elliptic/bottombits.go
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ go/src/pkg/crypto/elliptic/bottombits.go
|
||||
@@ -0,0 +1,14 @@
|
||||
+
|
||||
+// Copyright 2012 The Go Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style
|
||||
+// license that can be found in the LICENSE file.
|
||||
+
|
||||
+package elliptic
|
||||
+
|
||||
+const bottom12Bits = 0xfff
|
||||
+const bottom28Bits = 0xfffffff
|
||||
+
|
||||
+const two31p3 = 1<<31 + 1<<3
|
||||
+const two31m3 = 1<<31 - 1<<3
|
||||
+const two31m15m3 = 1<<31 - 1<<15 - 1<<3
|
||||
+
|
||||
Index: go/src/pkg/crypto/elliptic/elliptic.go
|
||||
===================================================================
|
||||
--- go.orig/src/pkg/crypto/elliptic/elliptic.go
|
||||
+++ go/src/pkg/crypto/elliptic/elliptic.go
|
||||
@@ -326,7 +326,6 @@ var p384 *CurveParams
|
||||
var p521 *CurveParams
|
||||
|
||||
func initAll() {
|
||||
- initP224()
|
||||
initP256()
|
||||
initP384()
|
||||
initP521()
|
||||
Index: go/src/pkg/crypto/elliptic/elliptic_test.go
|
||||
===================================================================
|
||||
--- go.orig/src/pkg/crypto/elliptic/elliptic_test.go
|
||||
+++ go/src/pkg/crypto/elliptic/elliptic_test.go
|
||||
@@ -1,3 +1,5 @@
|
||||
+// +build ignore
|
||||
+
|
||||
// Copyright 2010 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
Index: go/src/pkg/crypto/elliptic/p224.go
|
||||
===================================================================
|
||||
--- go.orig/src/pkg/crypto/elliptic/p224.go
|
||||
+++ go/src/pkg/crypto/elliptic/p224.go
|
||||
@@ -1,3 +1,5 @@
|
||||
+// +build ignore
|
||||
+
|
||||
// Copyright 2012 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
@@ -183,10 +185,6 @@ func p224Add(out, a, b *p224FieldElement
|
||||
}
|
||||
}
|
||||
|
||||
-const two31p3 = 1<<31 + 1<<3
|
||||
-const two31m3 = 1<<31 - 1<<3
|
||||
-const two31m15m3 = 1<<31 - 1<<15 - 1<<3
|
||||
-
|
||||
// p224ZeroModP31 is 0 mod p where bit 31 is set in all limbs so that we can
|
||||
// subtract smaller amounts without underflow. See the section "Subtraction" in
|
||||
// [1] for reasoning.
|
||||
@@ -215,9 +213,6 @@ const two63m35m19 = 1<<63 - 1<<35 - 1<<1
|
||||
// "Subtraction" in [1] for why.
|
||||
var p224ZeroModP63 = [8]uint64{two63p35, two63m35, two63m35, two63m35, two63m35m19, two63m35, two63m35, two63m35}
|
||||
|
||||
-const bottom12Bits = 0xfff
|
||||
-const bottom28Bits = 0xfffffff
|
||||
-
|
||||
// p224Mul computes *out = a*b
|
||||
//
|
||||
// a[i] < 2**29, b[i] < 2**30 (or vice versa)
|
||||
Index: go/src/pkg/crypto/elliptic/p224_test.go
|
||||
===================================================================
|
||||
--- go.orig/src/pkg/crypto/elliptic/p224_test.go
|
||||
+++ go/src/pkg/crypto/elliptic/p224_test.go
|
||||
@@ -1,3 +1,5 @@
|
||||
+// +build ignore
|
||||
+
|
||||
// Copyright 2012 The Go Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
Index: go/src/pkg/crypto/x509/x509.go
|
||||
===================================================================
|
||||
--- go.orig/src/pkg/crypto/x509/x509.go
|
||||
+++ go/src/pkg/crypto/x509/x509.go
|
||||
@@ -306,9 +306,6 @@ func getPublicKeyAlgorithmFromOID(oid as
|
||||
|
||||
// RFC 5480, 2.1.1.1. Named Curve
|
||||
//
|
||||
-// secp224r1 OBJECT IDENTIFIER ::= {
|
||||
-// iso(1) identified-organization(3) certicom(132) curve(0) 33 }
|
||||
-//
|
||||
// secp256r1 OBJECT IDENTIFIER ::= {
|
||||
// iso(1) member-body(2) us(840) ansi-X9-62(10045) curves(3)
|
||||
// prime(1) 7 }
|
||||
@@ -321,7 +318,6 @@ func getPublicKeyAlgorithmFromOID(oid as
|
||||
//
|
||||
// NB: secp256r1 is equivalent to prime256v1
|
||||
var (
|
||||
- oidNamedCurveP224 = asn1.ObjectIdentifier{1, 3, 132, 0, 33}
|
||||
oidNamedCurveP256 = asn1.ObjectIdentifier{1, 2, 840, 10045, 3, 1, 7}
|
||||
oidNamedCurveP384 = asn1.ObjectIdentifier{1, 3, 132, 0, 34}
|
||||
oidNamedCurveP521 = asn1.ObjectIdentifier{1, 3, 132, 0, 35}
|
||||
@@ -329,8 +325,6 @@ var (
|
||||
|
||||
func namedCurveFromOID(oid asn1.ObjectIdentifier) elliptic.Curve {
|
||||
switch {
|
||||
- case oid.Equal(oidNamedCurveP224):
|
||||
- return elliptic.P224()
|
||||
case oid.Equal(oidNamedCurveP256):
|
||||
return elliptic.P256()
|
||||
case oid.Equal(oidNamedCurveP384):
|
||||
@@ -343,8 +337,6 @@ func namedCurveFromOID(oid asn1.ObjectId
|
||||
|
||||
func oidFromNamedCurve(curve elliptic.Curve) (asn1.ObjectIdentifier, bool) {
|
||||
switch curve {
|
||||
- case elliptic.P224():
|
||||
- return oidNamedCurveP224, true
|
||||
case elliptic.P256():
|
||||
return oidNamedCurveP256, true
|
||||
case elliptic.P384():
|
||||
@@ -1371,7 +1363,7 @@ func signingParamsForPrivateKey(priv int
|
||||
pubType = ECDSA
|
||||
|
||||
switch priv.Curve {
|
||||
- case elliptic.P224(), elliptic.P256():
|
||||
+ case elliptic.P256():
|
||||
hashFunc = crypto.SHA256
|
||||
sigAlgo.Algorithm = oidSignatureECDSAWithSHA256
|
||||
case elliptic.P384():
|
|
@ -1,12 +0,0 @@
|
|||
diff -r 87dea3f5ebe7 src/pkg/runtime/pprof/pprof_test.go
|
||||
--- a/src/pkg/runtime/pprof/pprof_test.go Fri Nov 29 08:32:31 2013 +1100
|
||||
+++ b/src/pkg/runtime/pprof/pprof_test.go Fri Jan 24 13:47:42 2014 -0500
|
||||
@@ -32,7 +32,7 @@
|
||||
})
|
||||
}
|
||||
|
||||
-func TestCPUProfileMultithreaded(t *testing.T) {
|
||||
+func testCPUProfileMultithreaded(t *testing.T) {
|
||||
buf := make([]byte, 100000)
|
||||
defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(2))
|
||||
testCPUProfile(t, []string{"crc32.ChecksumIEEE", "crc32.Update"}, func() {
|
|
@ -1,19 +0,0 @@
|
|||
Index: go/src/make.bash
|
||||
===================================================================
|
||||
--- go.orig/src/make.bash
|
||||
+++ go/src/make.bash
|
||||
@@ -161,12 +161,12 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOH
|
||||
# CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however,
|
||||
# use the host compiler, CC, from `cmd/dist/dist env` instead.
|
||||
CC=$CC GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH \
|
||||
- "$GOTOOLDIR"/go_bootstrap install -ccflags "$GO_CCFLAGS" -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std
|
||||
+ "$GOTOOLDIR"/go_bootstrap install -ccflags "$GO_CCFLAGS" -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v -x std
|
||||
echo
|
||||
fi
|
||||
|
||||
echo "# Building packages and commands for $GOOS/$GOARCH."
|
||||
-CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -ccflags "$GO_CCFLAGS" -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std
|
||||
+CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -ccflags "$GO_CCFLAGS" -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v -x std
|
||||
echo
|
||||
|
||||
rm -f "$GOTOOLDIR"/go_bootstrap
|
|
@ -1,11 +0,0 @@
|
|||
--- src/pkg/os/os_test.go.orig 2014-02-20 13:14:45.543644182 -0600
|
||||
+++ src/pkg/os/os_test.go 2014-02-20 13:14:55.934813622 -0600
|
||||
@@ -854,7 +854,7 @@
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer r.Close()
|
||||
- p, err := StartProcess("/bin/hostname", []string{"hostname"}, &ProcAttr{Files: []*File{nil, w, Stderr}})
|
||||
+ p, err := StartProcess("/usr/bin/hostname", []string{"hostname"}, &ProcAttr{Files: []*File{nil, w, Stderr}})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
|
@ -1 +1 @@
|
|||
add-auto-load-safe-path /usr/lib/golang/src/pkg/runtime/runtime-gdb.py
|
||||
add-auto-load-safe-path /usr/lib/golang/src/runtime/runtime-gdb.py
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
# there are ELF files in src which are testdata and shouldn't be modified
|
||||
-b /usr/lib/golang/src
|
||||
-b /usr/lib64/golang/src
|
1623
golang.spec
1623
golang.spec
File diff suppressed because it is too large
Load Diff
|
@ -1,8 +0,0 @@
|
|||
# Where to set GOPATH for builds. Like:
|
||||
# export GOPATH=$(pwd)/_build:%{gopath}
|
||||
%gopath %{_datadir}/gocode
|
||||
|
||||
# for use like:
|
||||
# ExclusiveArch: %{go_arches}
|
||||
%go_arches %{ix86} x86_64 %{arm}
|
||||
|
3
sources
3
sources
|
@ -1,2 +1 @@
|
|||
d76dc07e475b2905b5fec1cf319b6356 golang-19087:a15f344a9efa-xattrs.tar
|
||||
2cdbad6baefcf1007f3cf54a5bc878b7 go1.3.3.src.tar.gz
|
||||
SHA512 (go1.15.5.src.tar.gz) = 8e1d71f628d364b949b1e124af8950a563bbe9d9ae73b94c66af6ce029f67c26e2654556c0c118d0bc8566af52a7e9ed736b4667bbef7ccdab2bd338c43e6eb4
|
||||
|
|
Loading…
Reference in New Issue