diff --git a/SOURCES/disable-flanky-CPU-profile-test.patch b/SOURCES/disable-flanky-CPU-profile-test.patch new file mode 100644 index 0000000..e723c6e --- /dev/null +++ b/SOURCES/disable-flanky-CPU-profile-test.patch @@ -0,0 +1,25 @@ +From d7e20439aec69dbcdd01a0c71fd8e40b285bfbe5 Mon Sep 17 00:00:00 2001 +From: Tomas Hrcka +Date: Tue, 30 Jun 2015 09:12:26 +0200 +Subject: [PATCH] Disable flanky CPU profile test + +--- + src/runtime/pprof/pprof_test.go | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/runtime/pprof/pprof_test.go b/src/runtime/pprof/pprof_test.go +index 8677cb3..8f3c7df 100644 +--- a/src/runtime/pprof/pprof_test.go ++++ b/src/runtime/pprof/pprof_test.go +@@ -71,7 +71,7 @@ func TestCPUProfile(t *testing.T) { + }) + } + +-func TestCPUProfileMultithreaded(t *testing.T) { ++func testCPUProfileMultithreaded(t *testing.T) { + defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(2)) + testCPUProfile(t, []string{"runtime/pprof_test.cpuHog1", "runtime/pprof_test.cpuHog2"}, func() { + c := make(chan int) +-- +1.8.3.1 + diff --git a/SPECS/golang.spec b/SPECS/golang.spec index 7913b37..33222d3 100644 --- a/SPECS/golang.spec +++ b/SPECS/golang.spec @@ -25,7 +25,8 @@ # let this match the macros in macros.golang %global goroot /usr/lib/%{name} %global gopath %{_datadir}/gocode -%global go_arches %{ix86} x86_64 %{arm} +#%global go_arches %{ix86} x86_64 %{arm} +%global go_arches x86_64 %ifarch x86_64 %global gohostarch amd64 %endif @@ -40,7 +41,7 @@ Name: golang Version: 1.4.2 -Release: 4%{?dist} +Release: 9%{?dist} Summary: The Go Programming Language License: BSD @@ -68,6 +69,8 @@ Patch0: golang-1.2-verbose-build.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1038683 Patch1: golang-1.2-remove-ECC-p224.patch +# https://github.com/golang/go/issues/9605 +Patch2: disable-flanky-CPU-profile-test.patch # Having documentation separate was broken Obsoletes: %{name}-docs < 1.1-4 @@ -78,6 +81,18 @@ Obsoletes: %{name}-data < 1.1.1-4 Obsoletes: emacs-%{name} <= 1.3.3-3 Obsoletes: %{name}-vim <= 1.3.3 +# obsoletes *BSD sub packages +Obsoletes: pkg-plan9-386 <= 1.4.2 +Obsoletes: pkg-plan9-amd64 <= 1.4.2 +Obsoletes: pkg-freebsd-386 <= 1.4.2 +Obsoletes: pkg-freebsd-amd64 <= 1.4.2 +Obsoletes: pkg-freebsd-arm <= 1.4.2 +Obsoletes: pkg-netbsd-386 <= 1.4.2 +Obsoletes: pkg-netbsd-amd64 <= 1.4.2 +Obsoletes: pkg-netbsd-arm <= 1.4.2 +Obsoletes: pkg-openbsd-386 <= 1.4.2 +Obsoletes: pkg-openbsd-amd64 <= 1.4.2 + # These are the only RHEL/Fedora architectures that we compile this package for ExclusiveArch: %{go_arches} @@ -220,75 +235,75 @@ BuildArch: noarch %description pkg-windows-amd64 %{summary} -%package pkg-plan9-386 -Summary: Golang compiler toolchain to compile for plan9 386 -Requires: go = %{version}-%{release} -BuildArch: noarch -%description pkg-plan9-386 -%{summary} +#%package pkg-plan9-386 +#Summary: Golang compiler toolchain to compile for plan9 386 +#Requires: go = %{version}-%{release} +#BuildArch: noarch +#%description pkg-plan9-386 +#%{summary} -%package pkg-plan9-amd64 -Summary: Golang compiler toolchain to compile for plan9 amd64 -Requires: go = %{version}-%{release} -BuildArch: noarch -%description pkg-plan9-amd64 -%{summary} +#%package pkg-plan9-amd64 +#Summary: Golang compiler toolchain to compile for plan9 amd64 +#Requires: go = %{version}-%{release} +#BuildArch: noarch +#%description pkg-plan9-amd64 +#%{summary} -%package pkg-freebsd-386 -Summary: Golang compiler toolchain to compile for freebsd 386 -Requires: go = %{version}-%{release} -BuildArch: noarch -%description pkg-freebsd-386 -%{summary} +#%package pkg-freebsd-386 +#Summary: Golang compiler toolchain to compile for freebsd 386 +#Requires: go = %{version}-%{release} +#BuildArch: noarch +#%description pkg-freebsd-386 +#%{summary} -%package pkg-freebsd-amd64 -Summary: Golang compiler toolchain to compile for freebsd amd64 -Requires: go = %{version}-%{release} -BuildArch: noarch -%description pkg-freebsd-amd64 -%{summary} +#%package pkg-freebsd-amd64 +#Summary: Golang compiler toolchain to compile for freebsd amd64 +#Requires: go = %{version}-%{release} +#BuildArch: noarch +#%description pkg-freebsd-amd64 +#%{summary} -%package pkg-freebsd-arm -Summary: Golang compiler toolchain to compile for freebsd arm -Requires: go = %{version}-%{release} -BuildArch: noarch -%description pkg-freebsd-arm -%{summary} +#%package pkg-freebsd-arm +#Summary: Golang compiler toolchain to compile for freebsd arm +#Requires: go = %{version}-%{release} +#BuildArch: noarch +#%description pkg-freebsd-arm +#%{summary} -%package pkg-netbsd-386 -Summary: Golang compiler toolchain to compile for netbsd 386 -Requires: go = %{version}-%{release} -BuildArch: noarch -%description pkg-netbsd-386 -%{summary} +#%package pkg-netbsd-386 +#Summary: Golang compiler toolchain to compile for netbsd 386 +#Requires: go = %{version}-%{release} +#BuildArch: noarch +#%description pkg-netbsd-386 +#%{summary} -%package pkg-netbsd-amd64 -Summary: Golang compiler toolchain to compile for netbsd amd64 -Requires: go = %{version}-%{release} -BuildArch: noarch -%description pkg-netbsd-amd64 -%{summary} +#%package pkg-netbsd-amd64 +#Summary: Golang compiler toolchain to compile for netbsd amd64 +#Requires: go = %{version}-%{release} +#BuildArch: noarch +#%description pkg-netbsd-amd64 +#%{summary} -%package pkg-netbsd-arm -Summary: Golang compiler toolchain to compile for netbsd arm -Requires: go = %{version}-%{release} -BuildArch: noarch -%description pkg-netbsd-arm -%{summary} +#%package pkg-netbsd-arm +#Summary: Golang compiler toolchain to compile for netbsd arm +#Requires: go = %{version}-%{release} +#BuildArch: noarch +#%description pkg-netbsd-arm +#%{summary} -%package pkg-openbsd-386 -Summary: Golang compiler toolchain to compile for openbsd 386 -Requires: go = %{version}-%{release} -BuildArch: noarch -%description pkg-openbsd-386 -%{summary} +#%package pkg-openbsd-386 +#Summary: Golang compiler toolchain to compile for openbsd 386 +#Requires: go = %{version}-%{release} +#BuildArch: noarch +#%description pkg-openbsd-386 +#%{summary} -%package pkg-openbsd-amd64 -Summary: Golang compiler toolchain to compile for openbsd amd64 -Requires: go = %{version}-%{release} -BuildArch: noarch -%description pkg-openbsd-amd64 -%{summary} +#%package pkg-openbsd-amd64 +#Summary: Golang compiler toolchain to compile for openbsd amd64 +#Requires: go = %{version}-%{release} +#BuildArch: noarch +#%description pkg-openbsd-amd64 +#%{summary} ## missing ./go/src/runtime/defs_openbsd_arm.h ## we'll skip this bundle for now @@ -324,6 +339,8 @@ end # remove the P224 curve %patch1 -p1 +# disable flanky test +%patch2 -p1 %build # set up final install location export GOROOT_FINAL=%{goroot} @@ -337,7 +354,7 @@ export GOHOSTARCH=%{gohostarch} # build for all (see http://golang.org/doc/install/source#environment) pushd src - for goos in darwin freebsd linux netbsd openbsd plan9 windows ; do + for goos in darwin linux windows ; do for goarch in 386 amd64 arm ; do if [ "${goarch}" = "arm" ] ; then if [ "${goos}" = "darwin" -o "${goos}" = "windows" -o "${goos}" = "plan9" -o "${goos}" = "openbsd" ] ;then @@ -381,10 +398,10 @@ pushd $RPM_BUILD_ROOT%{goroot} find src/ ! -type d -printf '%{goroot}/%p\n' >> $src_list - for goos in darwin freebsd linux netbsd openbsd plan9 windows ; do + for goos in darwin linux windows ; do for goarch in 386 amd64 arm ; do if [ "${goarch}" = "arm" ] ; then - if [ "${goos}" = "darwin" -o "${goos}" = "windows" -o "${goos}" = "plan9" -o "${goos}" = "openbsd" ] ;then + if [ "${goos}" = "darwin" -o "${goos}" = "windows" ] ;then continue fi fi @@ -454,9 +471,9 @@ cp -av %{SOURCE102} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.golang %check -#export GOROOT=$(pwd -P) -#export PATH="$PATH":"$GOROOT"/bin -#cd src +export GOROOT=$(pwd -P) +export PATH="$PATH":"$GOROOT"/bin +cd src # skip using CGO for test. causes a SIGABRT on fc21 (bz1086900) # until this test/issue is fixed # https://bugzilla.redhat.com/show_bug.cgi?id=1086900 @@ -465,13 +482,13 @@ cp -av %{SOURCE102} $RPM_BUILD_ROOT%{_sysconfdir}/rpm/macros.golang # 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 -#CGO_ENABLED=0 ./run.bash --no-rebuild -#cd .. +CGO_ENABLED=0 ./run.bash --no-rebuild +cd .. -#if [ $(go list -json std | grep Stale | wc -l) -gt 2 ] ; then -# # cmd/go and cmd/gofmt show like they are stale. we can ignore -# exit 1 -#fi +if [ $(go list -json std | grep Stale | wc -l) -gt 2 ] ; then + # cmd/go and cmd/gofmt show like they are stale. we can ignore + exit 1 +fi %ifarch %{ix86} @@ -501,6 +518,8 @@ touch -r %{goroot}/pkg/linux_amd64/runtime.a %{goroot}/pkg/linux_amd64/runtime/c %preun pkg-bin-linux-amd64 if [ $1 = 0 ]; then %{_sbindir}/update-alternatives --remove go %{goroot}/bin/linux_amd64/go + touch /usr/bin/go + touch /usr/bin/gofmt fi %endif @@ -557,7 +576,9 @@ fi %files -f go-src.list src - +%exclude %{goroot}/src/debug/elf/testdata/go-relocation-test-gcc482-aarch64.obj +%exclude %{goroot}/src/debug/elf/testdata/gcc-386-freebsd-exec +%exclude %{goroot}/src/debug/elf/testdata/gcc-amd64-openbsd-debug-with-rela.obj %ifarch %{ix86} %files pkg-bin-linux-386 @@ -692,45 +713,45 @@ fi %{goroot}/pkg/windows_amd64/ %{goroot}/pkg/tool/windows_amd64/ -%files pkg-plan9-386 -f pkg-plan9-386.list -%{goroot}/pkg/plan9_386/ -%{goroot}/pkg/tool/plan9_386/ +#%files pkg-plan9-386 -f pkg-plan9-386.list +#%{goroot}/pkg/plan9_386/ +#%{goroot}/pkg/tool/plan9_386/ -%files pkg-plan9-amd64 -f pkg-plan9-amd64.list -%{goroot}/pkg/plan9_amd64/ -%{goroot}/pkg/tool/plan9_amd64/ +#%files pkg-plan9-amd64 -f pkg-plan9-amd64.list +#%{goroot}/pkg/plan9_amd64/ +#%{goroot}/pkg/tool/plan9_amd64/ -%files pkg-freebsd-386 -f pkg-freebsd-386.list -%{goroot}/pkg/freebsd_386/ -%{goroot}/pkg/tool/freebsd_386/ +#%files pkg-freebsd-386 -f pkg-freebsd-386.list +#%{goroot}/pkg/freebsd_386/ +#%{goroot}/pkg/tool/freebsd_386/ -%files pkg-freebsd-amd64 -f pkg-freebsd-amd64.list -%{goroot}/pkg/freebsd_amd64/ -%{goroot}/pkg/tool/freebsd_amd64/ +#%files pkg-freebsd-amd64 -f pkg-freebsd-amd64.list +#%{goroot}/pkg/freebsd_amd64/ +#%{goroot}/pkg/tool/freebsd_amd64/ -%files pkg-freebsd-arm -f pkg-freebsd-arm.list -%{goroot}/pkg/freebsd_arm/ -%{goroot}/pkg/tool/freebsd_arm/ +#%files pkg-freebsd-arm -f pkg-freebsd-arm.list +#%{goroot}/pkg/freebsd_arm/ +#%{goroot}/pkg/tool/freebsd_arm/ -%files pkg-netbsd-386 -f pkg-netbsd-386.list -%{goroot}/pkg/netbsd_386/ -%{goroot}/pkg/tool/netbsd_386/ +#%files pkg-netbsd-386 -f pkg-netbsd-386.list +#%{goroot}/pkg/netbsd_386/ +#%{goroot}/pkg/tool/netbsd_386/ -%files pkg-netbsd-amd64 -f pkg-netbsd-amd64.list -%{goroot}/pkg/netbsd_amd64/ -%{goroot}/pkg/tool/netbsd_amd64/ +#%files pkg-netbsd-amd64 -f pkg-netbsd-amd64.list +#%{goroot}/pkg/netbsd_amd64/ +#%{goroot}/pkg/tool/netbsd_amd64/ -%files pkg-netbsd-arm -f pkg-netbsd-arm.list -%{goroot}/pkg/netbsd_arm/ -%{goroot}/pkg/tool/netbsd_arm/ +#%files pkg-netbsd-arm -f pkg-netbsd-arm.list +#%{goroot}/pkg/netbsd_arm/ +#%{goroot}/pkg/tool/netbsd_arm/ -%files pkg-openbsd-386 -f pkg-openbsd-386.list -%{goroot}/pkg/openbsd_386/ -%{goroot}/pkg/tool/openbsd_386/ +#%files pkg-openbsd-386 -f pkg-openbsd-386.list +#%{goroot}/pkg/openbsd_386/ +#%{goroot}/pkg/tool/openbsd_386/ -%files pkg-openbsd-amd64 -f pkg-openbsd-amd64.list -%{goroot}/pkg/openbsd_amd64/ -%{goroot}/pkg/tool/openbsd_amd64/ +#%files pkg-openbsd-amd64 -f pkg-openbsd-amd64.list +#%{goroot}/pkg/openbsd_amd64/ +#%{goroot}/pkg/tool/openbsd_amd64/ ## skipping for now #%files pkg-openbsd-arm @@ -739,8 +760,15 @@ fi %changelog +* Tue Jun 30 2015 Tomas Hrcka - 1.4.2-9 +- Enable tests during build time +- Disable building of *BSD sub packages + +* Fri Jun 12 2015 Tomas Hrcka - 1.4.2-6 +- Resolves: rhbz#1206063 + * Fri May 08 2015 Lokesh Mandvekar - 1.4.2-4 -- Resolves: rhbz#1212982 - Revert previous build +- Revert previous build - bring back non-linux and non-x86_64 subpackages * Mon May 04 2015 Lokesh Mandvekar - 1.4.2-3