commit 5a84c902e737ee06c64d68b2d52e903b962925da Author: Vincent Batts <vba...@redhat.com> Date: Tue Dec 3 16:28:52 2013 -0500
updating to upstream go1.2, with notes on two upstream issues This builds fine for f19, f20 and el6 too, and should be tested now that go.tools is packaged bz#1022983 .gitignore | 1 + golang-1.1.2-long-links.patch | 510 -------------------- golang-1.1.2-ustar-split.patch | 62 --- ...e-build.patch => golang-1.2-verbose-build.patch | 14 +- golang.spec | 57 +-- sources | 2 +- 6 files changed, 27 insertions(+), 619 deletions(-) --- diff --git a/.gitignore b/.gitignore index a0adaef..b049d62 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /go1.1.1.src.tar.gz /go1.1.2.src.tar.gz +/go1.2.src.tar.gz diff --git a/golang-1.1-verbose-build.patch b/golang-1.2-verbose-build.patch similarity index 74% rename from golang-1.1-verbose-build.patch rename to golang-1.2-verbose-build.patch index d8e8052..d6e2da4 100644 --- a/golang-1.1-verbose-build.patch +++ b/golang-1.2-verbose-build.patch @@ -1,16 +1,16 @@ -diff -ur go~/src/make.bash go/src/make.bash ---- go~/src/make.bash 2013-05-13 16:07:18.000000000 -0400 -+++ go/src/make.bash 2013-05-23 21:20:56.804544307 -0400 -@@ -135,7 +135,7 @@ +diff -r 7326da92ff4d src/make.bash +--- a/src/make.bash Mon Dec 02 09:06:41 2013 +1100 ++++ b/src/make.bash Tue Dec 03 15:29:09 2013 -0500 +@@ -145,7 +145,7 @@ if [ "$1" = "--no-clean" ]; then buildall="" fi --./cmd/dist/dist bootstrap $buildall -v # builds go_bootstrap -+./cmd/dist/dist bootstrap $buildall -vv # builds go_bootstrap +-./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -v # builds go_bootstrap ++./cmd/dist/dist bootstrap $buildall $GO_DISTFLAGS -vv # builds go_bootstrap # Delay move of dist tool to now, because bootstrap may clear tool directory. mv cmd/dist/dist "$GOTOOLDIR"/dist "$GOTOOLDIR"/go_bootstrap clean -i std -@@ -144,12 +144,12 @@ +@@ -154,12 +154,12 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then echo "# Building packages and commands for host, $GOHOSTOS/$GOHOSTARCH." GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH \ diff --git a/golang.spec b/golang.spec index 813474c..2af2b6a 100644 --- a/golang.spec +++ b/golang.spec @@ -24,8 +24,8 @@ /usr/lib/rpm/brp-compress Name: golang -Version: 1.1.2 -Release: 8%{?dist} +Version: 1.2 +Release: 1%{?dist} Summary: The Go Programming Language License: BSD @@ -50,14 +50,9 @@ BuildRequires: xemacs xemacs-packages-extra # This is an odd issue, still looking for a better fix. Requires: glibc -# `go doc ...` calls out to godoc in $PATH -# while godoc is in go1.1, it is moved to go.tools in go1.2 Requires: /usr/bin/godoc -Patch0: golang-1.1-verbose-build.patch - -Patch10: golang-1.1.2-long-links.patch -Patch11: golang-1.1.2-ustar-split.patch +Patch0: golang-1.2-verbose-build.patch # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4 @@ -74,11 +69,6 @@ Source101: golang-prelink.conf %{summary}. -%package godoc -Summary: The Go Programming Language documentation tool -%description godoc -%{summary}. - # Restore this package if RPM gets fixed (bug #975909) #%package data #Summary: Required architecture-independent files for Go @@ -141,23 +131,15 @@ end # increase verbosity of build %patch0 -p1 -%if 0%{?fedora} >= 21 -%patch1 -p1 -%endif - -# Fix BZ#1010271 -%patch10 -p1 -%patch11 -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 +mkdir -p zz +echo -e "#!/bin/sh\n/usr/bin/gcc $RPM_OPT_FLAGS $RPM_LD_FLAGS \"\$@\"" > ./zz/gcc +chmod +x ./zz/gcc %build -# create a gcc wrapper to allow us to build with our own flags -mkdir zz -cd zz -echo -e "#!/bin/sh\n/usr/bin/gcc $RPM_OPT_FLAGS $RPM_LD_FLAGS \"\$@\"" > mygcc -chmod +x mygcc -export CC="$(pwd -P)/mygcc" -cd .. - # set up final install location export GOROOT_FINAL=%{_libdir}/%{name} @@ -167,14 +149,8 @@ export GOROOT_FINAL=%{_libdir}/%{name} # build cd src -./make.bash -cd .. - -# build static version of documentation -export GOROOT=$(pwd -P) -export PATH="$PATH":"$GOROOT"/bin -cd doc -make +# use our gcc wrapper +PATH="$(pwd -P)/../zz:$PATH" CC="gcc" ./make.bash cd .. # compile for emacs and xemacs @@ -193,6 +169,8 @@ cd .. export GOROOT=$(pwd -P) export PATH="$PATH":"$GOROOT"/bin cd src +# not using our 'gcc' since the CFLAGS fails crash_cgo_test.go due to unused variables +# https://code.google.com/p/go/issues/detail?id=6883 ./run.bash --no-rebuild cd .. @@ -262,9 +240,6 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/prelink.conf.d cp -av %{SOURCE101} $RPM_BUILD_ROOT%{_sysconfdir}/prelink.conf.d/golang.conf -%files godoc -%{_bindir}/godoc - %files %doc AUTHORS CONTRIBUTORS LICENSE PATENTS VERSION @@ -307,6 +282,10 @@ cp -av %{SOURCE101} $RPM_BUILD_ROOT%{_sysconfdir}/prelink.conf.d/golang.conf %changelog +* Mon Dec 2 2013 Vincent Batts <vba...@fedoraproject.org> - 1.2-1 +- Update to upstream 1.2 release +- remove the pax tar patches + * Tue Nov 26 2013 Vincent Batts <vba...@redhat.com> - 1.1.2-8 - fix the rpmspec conditional for rhel and fedora diff --git a/sources b/sources index 60683d5..f14eee7 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -705feb2246c8ddaf820d7e171f1430c5 go1.1.2.src.tar.gz +c2ace56f6b6413a5c6318b9527a8b763 go1.2.src.tar.gz _______________________________________________ golang mailing list golang@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/golang