[golang] update to go1.4beta1

Vincent Batts vbatts at fedoraproject.org
Tue Nov 4 15:56:31 UTC 2014


commit 20cd634d140da5286a8ce6f725fb7c2438ade241
Author: Vincent Batts <vbatts at hashbangbash.com>
Date:   Tue Nov 4 10:52:19 2014 -0500

    update to go1.4beta1

 .gitignore                                 |    1 +
 go1.3-tar-fix_writing_of_pax_headers.patch |  110 ----------------
 go1.3-tar_reuse_buffer_readHeader.patch    |   64 ---------
 go1.3-tar_reuse_buffer_writeHeader.patch   |   56 --------
 golang-1.2-archive_tar-xattr.patch         |  197 ----------------------------
 golang-1.2-remove-ECC-p224.patch           |   40 +++---
 golang-1.2-skipCpuProfileTest.patch        |   12 --
 golang-f21-hostname.patch                  |    4 +-
 golang.spec                                |  194 ++-------------------------
 sources                                    |    2 +-
 10 files changed, 38 insertions(+), 642 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 281e185..dee89c5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,4 +10,5 @@
 /go1.3rc1.src.tar.gz
 /go1.3rc2.src.tar.gz
 /go1.3.src.tar.gz
+/go1.4beta1.src.tar.gz
 /golang-19087:a15f344a9efa-xattrs.tar
diff --git a/golang-1.2-remove-ECC-p224.patch b/golang-1.2-remove-ECC-p224.patch
index 1b9e021..ef5a4a6 100644
--- a/golang-1.2-remove-ECC-p224.patch
+++ b/golang-1.2-remove-ECC-p224.patch
@@ -10,10 +10,10 @@ Index: go/api/go1.txt
  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
+Index: go/src/crypto/ecdsa/ecdsa_test.go
 ===================================================================
---- go.orig/src/pkg/crypto/ecdsa/ecdsa_test.go
-+++ go/src/pkg/crypto/ecdsa/ecdsa_test.go
+--- go.orig/src/crypto/ecdsa/ecdsa_test.go
++++ go/src/crypto/ecdsa/ecdsa_test.go
 @@ -33,7 +33,6 @@ func testKeyGeneration(t *testing.T, c e
  }
  
@@ -39,10 +39,10 @@ Index: go/src/pkg/crypto/ecdsa/ecdsa_test.go
  			case "P-256":
  				pub.Curve = elliptic.P256()
  			case "P-384":
-Index: go/src/pkg/crypto/elliptic/bottombits.go
+Index: go/src/crypto/elliptic/bottombits.go
 ===================================================================
 --- /dev/null
-+++ go/src/pkg/crypto/elliptic/bottombits.go
++++ go/src/crypto/elliptic/bottombits.go
 @@ -0,0 +1,14 @@
 +
 +// Copyright 2012 The Go Authors.  All rights reserved.
@@ -58,10 +58,10 @@ Index: go/src/pkg/crypto/elliptic/bottombits.go
 +const two31m3 = 1<<31 - 1<<3
 +const two31m15m3 = 1<<31 - 1<<15 - 1<<3
 +
-Index: go/src/pkg/crypto/elliptic/elliptic.go
+Index: go/src/crypto/elliptic/elliptic.go
 ===================================================================
---- go.orig/src/pkg/crypto/elliptic/elliptic.go
-+++ go/src/pkg/crypto/elliptic/elliptic.go
+--- go.orig/src/crypto/elliptic/elliptic.go
++++ go/src/crypto/elliptic/elliptic.go
 @@ -326,7 +326,6 @@ var p384 *CurveParams
  var p521 *CurveParams
  
@@ -70,20 +70,20 @@ Index: go/src/pkg/crypto/elliptic/elliptic.go
  	initP256()
  	initP384()
  	initP521()
-Index: go/src/pkg/crypto/elliptic/elliptic_test.go
+Index: go/src/crypto/elliptic/elliptic_test.go
 ===================================================================
---- go.orig/src/pkg/crypto/elliptic/elliptic_test.go
-+++ go/src/pkg/crypto/elliptic/elliptic_test.go
+--- go.orig/src/crypto/elliptic/elliptic_test.go
++++ go/src/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
+Index: go/src/crypto/elliptic/p224.go
 ===================================================================
---- go.orig/src/pkg/crypto/elliptic/p224.go
-+++ go/src/pkg/crypto/elliptic/p224.go
+--- go.orig/src/crypto/elliptic/p224.go
++++ go/src/crypto/elliptic/p224.go
 @@ -1,3 +1,5 @@
 +// +build ignore
 +
@@ -111,20 +111,20 @@ Index: go/src/pkg/crypto/elliptic/p224.go
  // 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
+Index: go/src/crypto/elliptic/p224_test.go
 ===================================================================
---- go.orig/src/pkg/crypto/elliptic/p224_test.go
-+++ go/src/pkg/crypto/elliptic/p224_test.go
+--- go.orig/src/crypto/elliptic/p224_test.go
++++ go/src/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
+Index: go/src/crypto/x509/x509.go
 ===================================================================
---- go.orig/src/pkg/crypto/x509/x509.go
-+++ go/src/pkg/crypto/x509/x509.go
+--- go.orig/src/crypto/x509/x509.go
++++ go/src/crypto/x509/x509.go
 @@ -306,9 +306,6 @@ func getPublicKeyAlgorithmFromOID(oid as
  
  // RFC 5480, 2.1.1.1. Named Curve
diff --git a/golang-f21-hostname.patch b/golang-f21-hostname.patch
index 6025ecb..730e8a8 100644
--- a/golang-f21-hostname.patch
+++ b/golang-f21-hostname.patch
@@ -1,5 +1,5 @@
---- 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
+--- src/os/os_test.go.orig	2014-02-20 13:14:45.543644182 -0600
++++ src/os/os_test.go	2014-02-20 13:14:55.934813622 -0600
 @@ -854,7 +854,7 @@
  		t.Fatal(err)
  	}
diff --git a/golang.spec b/golang.spec
index 8d84865..eb03d9e 100644
--- a/golang.spec
+++ b/golang.spec
@@ -36,16 +36,17 @@
 %global gohostarch  arm
 %endif
 
-%global go_api 1.3.3
+%global go_api 1.4
+%global go_version 1.4beta1
 
 Name:           golang
-Version:        1.3.3
-Release:        3%{?dist}
+Version:        1.3.99
+Release:        1.%{go_version}%{?dist}
 Summary:        The Go Programming Language
 
 License:        BSD
 URL:            http://golang.org/
-Source0:        https://storage.googleapis.com/golang/go%{version}.src.tar.gz
+Source0:        https://storage.googleapis.com/golang/go%{go_version}.src.tar.gz
 
 # this command moved places
 %if 0%{?fedora} >= 21
@@ -63,24 +64,11 @@ Provides:       go = %{version}-%{release}
 Requires:       golang-bin
 Requires:       golang-src = %{version}-%{release}
 
-BuildRequires:  emacs
-
 Patch0:         golang-1.2-verbose-build.patch
 
 # https://bugzilla.redhat.com/show_bug.cgi?id=1038683
 Patch1:         golang-1.2-remove-ECC-p224.patch
 
-# disable flaky test for now
-# http://code.google.com/p/go/issues/detail?id=6522
-Patch2:         ./golang-1.2-skipCpuProfileTest.patch
-
-# these patches can be dropped for go1.4
-# discovered working here https://github.com/dotcloud/docker/pull/6829
-Patch3:         ./go1.3-tar_reuse_buffer_readHeader.patch
-Patch4:         ./go1.3-tar_reuse_buffer_writeHeader.patch
-# https://code.google.com/p/go/source/detail?r=1b17b3426e3c
-Patch5:         ./go1.3-tar-fix_writing_of_pax_headers.patch
-
 # Having documentation separate was broken
 Obsoletes:      %{name}-docs < 1.1-4
 
@@ -109,27 +97,6 @@ Source102:      macros.golang
 #%{summary}.
 
 
-%package        vim
-Summary:        Vim plugins for Go
-# fedora only
-%if 0%{?fedora}
-Requires:       vim-filesystem
-%endif
-BuildArch:      noarch
-
-%description    vim
-%{summary}.
-
-
-%package -n    emacs-%{name}
-Summary:       Emacs add-on package for Go
-Requires:      emacs(bin) >= %{_emacs_version}
-BuildArch:     noarch
-
-%description -n emacs-%{name}
-%{summary}.
-
-
 ##
 # the source tree
 %package        src
@@ -320,7 +287,7 @@ BuildArch:      noarch
 %description    pkg-openbsd-amd64
 %{summary}
 
-## missing ./go/src/pkg/runtime/defs_openbsd_arm.h
+## missing ./go/src/runtime/defs_openbsd_arm.h
 ## we'll skip this bundle for now
 #%package        pkg-openbsd-arm
 #Summary:        Golang compiler toolchain to compile for openbsd arm
@@ -354,24 +321,6 @@ end
 # remove the P224 curve
 %patch1 -p1
 
-# skip flaky test
-%patch2 -p1
-
-# performance for archive/tar
-%patch3 -p1
-%patch4 -p1
-# buffer the PAX header
-%patch5 -p1
-
-# create a [dirty] gcc wrapper to allow us to build with our own flags
-# (dirty because it is spoofing 'gcc' since CC value is stored in the go tool)
-# TODO: remove this and just set CFLAGS/LDFLAGS once upstream supports it
-# https://code.google.com/p/go/issues/detail?id=6882
-# UPDATE: this is fixed in trunk, and will be in go1.3
-mkdir -p zz
-echo -e "#!/bin/sh\n/usr/bin/gcc $RPM_OPT_FLAGS $RPM_LD_FLAGS \"\$@\"" > ./zz/gcc
-chmod +x ./zz/gcc
-
 %build
 # set up final install location
 export GOROOT_FINAL=%{goroot}
@@ -392,8 +341,9 @@ pushd src
 					continue
 				fi
 			fi
-			# use our gcc wrapper
-			PATH="$(pwd -P)/../zz:$PATH" CC="gcc" \
+			# use our gcc options for this build, but store gcc as default for compiler
+			CC="gcc $RPM_OPT_FLAGS $RPM_LD_FLAGS" \
+			CC_FOR_TARGET="gcc" \
 				GOOS=${goos} \
 				GOARCH=${goarch} \
 				./make.bash --no-clean
@@ -401,13 +351,6 @@ pushd src
 	done
 popd
 
-# compile for emacs
-cd misc
-mv emacs/go-mode-load.el emacs/%{name}-init.el
-%{_emacs_bytecompile} emacs/go-mode.el
-cd ..
-
-
 %install
 rm -rf $RPM_BUILD_ROOT
 
@@ -488,28 +431,6 @@ ln -sf /etc/alternatives/go $RPM_BUILD_ROOT%{_bindir}/go
 rm -f $RPM_BUILD_ROOT%{_bindir}/gofmt
 ln -sf /etc/alternatives/gofmt $RPM_BUILD_ROOT%{_bindir}/gofmt
 
-# misc/bash
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions
-cp -av misc/bash/go $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions
-for z in 8l 6l 5l 8g 6g 5g gofmt gccgo
-  do ln -s go $RPM_BUILD_ROOT%{_datadir}/bash-completion/completions/$z
-done
-
-# misc/emacs
-mkdir -p $RPM_BUILD_ROOT%{_emacs_sitelispdir}/%{name}
-mkdir -p $RPM_BUILD_ROOT%{_emacs_sitestartdir}
-cp -av misc/emacs/go-mode.* $RPM_BUILD_ROOT%{_emacs_sitelispdir}/%{name}
-cp -av misc/emacs/%{name}-init.el $RPM_BUILD_ROOT%{_emacs_sitestartdir}
-
-# misc/vim
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles
-cp -av misc/vim/* $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles
-rm $RPM_BUILD_ROOT%{_datadir}/vim/vimfiles/readme.txt
-
-# misc/zsh
-mkdir -p $RPM_BUILD_ROOT%{_datadir}/zsh/site-functions
-cp -av misc/zsh/go $RPM_BUILD_ROOT%{_datadir}/zsh/site-functions
-
 # gdbinit
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/gdbinit.d
 cp -av %{SOURCE100} $RPM_BUILD_ROOT%{_sysconfdir}/gdbinit.d/golang.gdb
@@ -596,9 +517,6 @@ fi
 %endif
 
 
-#%post pkg-openbsd-arm
-#GOROOT=%{goroot} GOOS=openbsd GOARCH=arm go install std
-
 %files
 %doc AUTHORS CONTRIBUTORS LICENSE PATENTS
 # VERSION has to be present in the GOROOT, for `go install std` to work
@@ -607,6 +525,7 @@ fi
 # go files
 %dir %{goroot}
 %{goroot}/*
+%exclude %{goroot}/VERSION
 %exclude %{goroot}/bin/
 %exclude %{goroot}/pkg/
 %exclude %{goroot}/src/
@@ -620,10 +539,6 @@ fi
 %dir %{gopath}/src/code.google.com/p/
 
 
-# autocomplete
-%{_datadir}/bash-completion
-%{_datadir}/zsh
-
 # gdbinit (for gdb debugging)
 %{_sysconfdir}/gdbinit.d
 
@@ -637,19 +552,8 @@ fi
 %endif
 
 
-%files vim
-%doc AUTHORS CONTRIBUTORS LICENSE PATENTS
-%{_datadir}/vim/vimfiles/*
-
-
-%files -n emacs-%{name}
-%doc AUTHORS CONTRIBUTORS LICENSE PATENTS
-%{_emacs_sitelispdir}/%{name}
-%{_emacs_sitestartdir}/*.el
-
-
 %files -f go-src.list src
-%{goroot}/src/
+
 
 %ifarch %{ix86}
 %files pkg-bin-linux-386
@@ -679,30 +583,6 @@ fi
 %{goroot}/pkg/tool/linux_386/objdump
 %{goroot}/pkg/tool/linux_386/pack
 %{goroot}/pkg/tool/linux_386/pprof
-
-# arch dependent generated files, used by cgo
-%{goroot}/src/pkg/runtime/zasm_linux_386.h
-%{goroot}/src/pkg/runtime/zgoarch_386.go
-%{goroot}/src/pkg/runtime/zmalloc_linux_386.c
-%{goroot}/src/pkg/runtime/zmprof_linux_386.c
-%{goroot}/src/pkg/runtime/znetpoll_linux_386.c
-%{goroot}/src/pkg/runtime/zruntime1_linux_386.c
-%{goroot}/src/pkg/runtime/zruntime_defs_linux_386.go
-%{goroot}/src/pkg/runtime/zsema_linux_386.c
-%{goroot}/src/pkg/runtime/zsigqueue_linux_386.c
-%{goroot}/src/pkg/runtime/zstring_linux_386.c
-%{goroot}/src/pkg/runtime/zsys_linux_386.s
-%{goroot}/src/pkg/runtime/ztime_linux_386.c
-%{goroot}/src/pkg/runtime/zalg_linux_386.c
-%{goroot}/src/pkg/runtime/zchan_linux_386.c
-%{goroot}/src/pkg/runtime/zcomplex_linux_386.c
-%{goroot}/src/pkg/runtime/zcpuprof_linux_386.c
-%{goroot}/src/pkg/runtime/zhashmap_linux_386.c
-%{goroot}/src/pkg/runtime/ziface_linux_386.c
-%{goroot}/src/pkg/runtime/zlfstack_linux_386.c
-%{goroot}/src/pkg/runtime/zrdebug_linux_386.c
-%{goroot}/src/pkg/runtime/zslice_linux_386.c
-%{goroot}/src/pkg/runtime/zsymtab_linux_386.c
 %endif
 
 %ifarch x86_64
@@ -733,30 +613,6 @@ fi
 %{goroot}/pkg/tool/linux_amd64/objdump
 %{goroot}/pkg/tool/linux_amd64/pack
 %{goroot}/pkg/tool/linux_amd64/pprof
-
-# arch dependent generated files, used by cgo
-%{goroot}/src/pkg/runtime/zasm_linux_amd64.h
-%{goroot}/src/pkg/runtime/zgoarch_amd64.go
-%{goroot}/src/pkg/runtime/zmalloc_linux_amd64.c
-%{goroot}/src/pkg/runtime/zmprof_linux_amd64.c
-%{goroot}/src/pkg/runtime/znetpoll_linux_amd64.c
-%{goroot}/src/pkg/runtime/zruntime1_linux_amd64.c
-%{goroot}/src/pkg/runtime/zruntime_defs_linux_amd64.go
-%{goroot}/src/pkg/runtime/zsema_linux_amd64.c
-%{goroot}/src/pkg/runtime/zsigqueue_linux_amd64.c
-%{goroot}/src/pkg/runtime/zstring_linux_amd64.c
-%{goroot}/src/pkg/runtime/zsys_linux_amd64.s
-%{goroot}/src/pkg/runtime/ztime_linux_amd64.c
-%{goroot}/src/pkg/runtime/zalg_linux_amd64.c
-%{goroot}/src/pkg/runtime/zchan_linux_amd64.c
-%{goroot}/src/pkg/runtime/zcomplex_linux_amd64.c
-%{goroot}/src/pkg/runtime/zcpuprof_linux_amd64.c
-%{goroot}/src/pkg/runtime/zhashmap_linux_amd64.c
-%{goroot}/src/pkg/runtime/ziface_linux_amd64.c
-%{goroot}/src/pkg/runtime/zlfstack_linux_amd64.c
-%{goroot}/src/pkg/runtime/zrdebug_linux_amd64.c
-%{goroot}/src/pkg/runtime/zslice_linux_amd64.c
-%{goroot}/src/pkg/runtime/zsymtab_linux_amd64.c
 %endif
 
 %ifarch %{arm}
@@ -787,31 +643,6 @@ fi
 %{goroot}/pkg/tool/linux_arm/objdump
 %{goroot}/pkg/tool/linux_arm/pack
 %{goroot}/pkg/tool/linux_arm/pprof
-
-# arch dependent generated files, used by cgo
-%{goroot}/src/pkg/runtime/zasm_linux_arm.h
-%{goroot}/src/pkg/runtime/zgoarch_arm.go
-%{goroot}/src/pkg/runtime/zmalloc_linux_arm.c
-%{goroot}/src/pkg/runtime/zmprof_linux_arm.c
-%{goroot}/src/pkg/runtime/znetpoll_linux_arm.c
-%{goroot}/src/pkg/runtime/znoasm_arm_linux_arm.c
-%{goroot}/src/pkg/runtime/zruntime1_linux_arm.c
-%{goroot}/src/pkg/runtime/zruntime_defs_linux_arm.go
-%{goroot}/src/pkg/runtime/zsema_linux_arm.c
-%{goroot}/src/pkg/runtime/zsigqueue_linux_arm.c
-%{goroot}/src/pkg/runtime/zstring_linux_arm.c
-%{goroot}/src/pkg/runtime/zsys_linux_arm.s
-%{goroot}/src/pkg/runtime/ztime_linux_arm.c
-%{goroot}/src/pkg/runtime/zalg_linux_arm.c
-%{goroot}/src/pkg/runtime/zchan_linux_arm.c
-%{goroot}/src/pkg/runtime/zcomplex_linux_arm.c
-%{goroot}/src/pkg/runtime/zcpuprof_linux_arm.c
-%{goroot}/src/pkg/runtime/zhashmap_linux_arm.c
-%{goroot}/src/pkg/runtime/ziface_linux_arm.c
-%{goroot}/src/pkg/runtime/zlfstack_linux_arm.c
-%{goroot}/src/pkg/runtime/zrdebug_linux_arm.c
-%{goroot}/src/pkg/runtime/zslice_linux_arm.c
-%{goroot}/src/pkg/runtime/zsymtab_linux_arm.c
 %endif
 
 %files pkg-linux-386 -f pkg-linux-386.list
@@ -904,6 +735,9 @@ fi
 
 
 %changelog
+* Thu Oct 30 2014 Vincent Batts <vbatts at fedoraproject.org> - 1.3.99-1.1.4beta1
+- update to go1.4beta1
+
 * Thu Oct 30 2014 Vincent Batts <vbatts at fedoraproject.org> - 1.3.3-3
 - macros will need to be in their own rpm
 
diff --git a/sources b/sources
index 66155c8..6a3976d 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
 d76dc07e475b2905b5fec1cf319b6356  golang-19087:a15f344a9efa-xattrs.tar
-2cdbad6baefcf1007f3cf54a5bc878b7  go1.3.3.src.tar.gz
+0e58d3b4fa02110f65426f9cb297f41c  go1.4beta1.src.tar.gz


More information about the scm-commits mailing list