Hello community, here is the log from the commit of package go1.10 for openSUSE:Factory checked in at 2018-05-29 10:29:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/go1.10 (Old) and /work/SRC/openSUSE:Factory/.go1.10.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "go1.10" Tue May 29 10:29:48 2018 rev:1 rq:610123 version:1.10.2 Changes: -------- New Changes file: --- /dev/null 2018-05-24 09:31:19.417470950 +0200 +++ /work/SRC/openSUSE:Factory/.go1.10.new/go1.10.changes 2018-05-29 10:29:51.057874919 +0200 @@ -0,0 +1,1737 @@ +------------------------------------------------------------------- +Thu May 17 11:26:15 UTC 2018 - [email protected] + +- Update to version 1.10.2: + * includes fixes to the compiler, linker, and go command. +- Changes in version 1.10.1: + * includes fixes to the compiler, runtime, and the archive/zip, + crypto/tls, crypto/x509, encoding/json, net, net/http, and net/http/pprof packages. + +------------------------------------------------------------------- +Sun Apr 15 02:29:02 UTC 2018 - [email protected] + +- Removed + * go-1.5-install-dont-reinstall-stdlibs.patch: patch no longer needed. +- Changed + * gcc7-go.patch: go1.10 source code changed, patch is no longer applies. + +------------------------------------------------------------------- +Sat Mar 3 14:53:51 UTC 2018 - [email protected] + +- Update to go1.10: + * Most of its changes are in the implementation of the toolchain, runtime, and + libraries. As always, the release maintains the Go 1 promise of compatibility. + We expect almost all Go programs to continue to compile and run as before. + * This release improves caching of built packages, adds caching of successful + test results, runs vet automatically during tests, and permits passing + string values directly between Go and C using cgo. A new compiler option + whitelist may cause unexpected invalid flag errors in code that built + successfully with older releases. + * For more details check: https://golang.org/doc/go1.10 +- Removed the following patches: + * verbose-build.patch: build system changed, patch is no longer applies + * go-1.5-install-dont-reinstall-stdlibs.patch: patch no longer needed + +------------------------------------------------------------------- +Fri Mar 2 23:30:03 UTC 2018 - [email protected] + +- Ensure go binaries are not stripped (eg: go tools trace), this cause + some of them to misbehave +- Ensure go trace html template is shipped as part of the installation, + otherwise the web UI won't work +- Fix license of go race + +------------------------------------------------------------------- +Wed Feb 28 10:47:34 UTC 2018 - [email protected] + +- update to go1.9.4 + + * go1.9.2 (released 2017/10/25) includes fixes to the compiler, + linker, runtime, documentation, go command, and the crypto/x509, + database/sql, log, and net/smtp packages. It includes a fix to a bug + introduced in Go 1.9.1 that broke go get of non-Git repositories + under certain conditions. + + * go1.9.3 (released 2018/01/22) includes fixes to the compiler, runtime, + and the database/sql, math/big, net/http, and net/url packages. + + * go1.9.4 (released 2018/02/07) includes a security fix to “go get”: + CVE-2018-6574 (bsc#1080006) + + +------------------------------------------------------------------- +Sat Feb 24 18:52:41 UTC 2018 - [email protected] + +- fix bsc#1082409: Review dependencies (requires, recommends and supports) + +------------------------------------------------------------------- +Thu Dec 21 15:12:24 UTC 2017 - [email protected] + +- Rename package to go1.9 + +------------------------------------------------------------------- +Thu Oct 26 13:53:05 UTC 2017 - [email protected] + +- Update to go1.9.2 + + go1.9.2 (released 2017/10/25) includes fixes to the compiler, + linker, runtime, documentation, go command, and the crypto/x509, + database/sql, log, and net/smtp packages. It includes a fix to a + bug introduced in Go 1.9.1 that broke go get of non-Git + repositories under certain conditions. See the Go 1.9.2 milestone + on our issue tracker for details. + +------------------------------------------------------------------- +Sat Oct 21 11:39:37 UTC 2017 - [email protected] + +- Install $GOROOT/lib packages, to include upstream files such as the timezone + database. bsc#1064522 + +------------------------------------------------------------------- +Thu Oct 5 07:09:54 UTC 2017 - [email protected] + +- Update to go1.9.1 + + go1.9.1 (released 2017/10/04) includes two security fixes. See + the Go 1.9.1 milestone on our issue tracker for details. + + Fixes included: + + * net/smtp: fix PlainAuth to refuse to send passwords to non-TLS + servers (CVE-2017-15042, bsc#1062087) + + * cmd/go: arbitrary code execution during “go get” or “go get -d” + (CVE-2017-15041, bsc#1062085) + +------------------------------------------------------------------- +Mon Sep 18 08:52:45 UTC 2017 - [email protected] + +- Update to go1.9 + + There are two changes to the language: adding support for type aliases and + defining when implementations may fuse floating point operations. Most of the + changes are in the implementation of the toolchain, runtime, and libraries. As + always, the release maintains the Go 1 promise of compatibility. We expect + almost all Go programs to continue to compile and run as before. + + The release adds transparent monotonic time support, parallelizes compilation + of functions within a package, better supports test helper functions, includes + a new bit manipulation package, and has a new concurrent map type. + + Remove patches: + - fix_certificates_lookup.patch + - runtime-bump-MaxGomaxprocs.patch + +------------------------------------------------------------------- +Tue Sep 5 15:38:19 UTC 2017 - [email protected] + +- Fixed incorrectly ghosted files + +------------------------------------------------------------------- +Thu Aug 31 18:46:47 UTC 2017 - [email protected] + +- add fix-sanitizer-build-against-latest-glibc.patch which fixes + the sanitizer built against certain glibc versions + +------------------------------------------------------------------- +Wed Aug 9 07:45:47 UTC 2017 - [email protected] + +- go-race: add compiler-rt TSAN binary, necessary for the race detector builds + to work. This requires building compiler-rt from source (becuase upstream Go + stores precompiled binaries in the tree, and we cannot use them). In + addition, a %check was added purely to ensure that we don't install the wrong + version of compiler-rt. boo#1052528 +- go-rpmlintrc: add some entries to address the .syso additions. + +------------------------------------------------------------------- +Fri Jul 21 18:51:29 UTC 2017 - [email protected] + +- Remove ruby requirement. golang-macros are not ruby anymore, plus + this requirement should have been in the golang-packaging package + +------------------------------------------------------------------- +Fri Jul 7 10:44:28 UTC 2017 - [email protected] + +- Simplify all the "ifdef suse_version" by removing versions which + have reach eol (13.* 42.1 sle11*) + +------------------------------------------------------------------- +Thu Jul 6 15:18:14 UTC 2017 - [email protected] + +- Add gcc6-go.patch for sle12 and leap42.x and use binutils-gold + except for s390x/s390 + Remove gcc5-go.patch cause we use gcc6 for sle12 and leap42.x and + gcc7 for newer versions (factory) + +------------------------------------------------------------------- +Sun Jun 18 21:08:10 UTC 2017 - [email protected] + +- build with binutils-gold on aarch64, which is hardcoded to + be used for shared linking due to bugs in BFD binutils + +------------------------------------------------------------------- +Fri Jun 2 13:08:56 UTC 2017 - [email protected] + +- Build with gcc-7 on Tumbleweed + + Add gcc7-go.patch + +------------------------------------------------------------------- +Mon May 29 07:32:53 UTC 2017 - [email protected] + +- Minor update to go1.8.3 + + Fixes included: + + * go1.8.2 (released 2017/05/23) includes a security fix to the + crypto/elliptic package (CVE-2017-8932, bsc#1040618). + + * go1.8.3 (released 2017/05/24) includes fixes to the compiler, runtime, + documentation, and the database/sql package. + +------------------------------------------------------------------- +Thu May 11 13:09:03 UTC 2017 - [email protected] + + +- Enable gccgo with gcc-6 for SLE12 +------------------------------------------------------------------- +Wed May 3 18:14:48 UTC 2017 - [email protected] ++++ 1540 more lines (skipped) ++++ between /dev/null ++++ and /work/SRC/openSUSE:Factory/.go1.10.new/go1.10.changes New: ---- README.SUSE _service allow-binary-only-packages.patch armv6l.patch compiler-rt-g68e1532492f9b3fce0e9024f3c31411105965b11.tar.xz fix-sanitizer-build-against-latest-glibc.patch gcc6-go.patch gcc7-go.patch go-rpmlintrc go.gdbinit go.sh go1.10.2.src.tar.gz go1.10.changes go1.10.spec tools-packaging.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ go1.10.spec ++++++ # # spec file for package go1.10 # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # nodebuginfo # strip will cause Go's .a archives to become invalid because strip appears to # reassemble the archive incorrectly. This is a known issue upstream # (https://github.com/golang/go/issues/17890), but we have to deal with it in # the meantime. %undefine _build_create_debug %define __arch_install_post export NO_BRP_STRIP_DEBUG=true # By default use go and not gccgo %define with_gccgo 0 # The fallback boostrap method via go1.4 does not work for Factory because # of a known bug with binutils 2.27 https://github.com/golang/go/issues/16906. # Leap will work but we don't have go1.4 in there. %if 0%{?suse_version} > 1320 # openSUSE Factory %define with_gccgo 1 %else %if 0%{?suse_version} == 1315 && 0%{?is_opensuse} # openSUSE Leap %define with_gccgo 1 %endif %endif # The fallback bootstrap method via go1.4 doesn't work # for aarch64 nor ppc64le because go 1.4 did not support that architecture. %ifarch aarch64 ppc64le ppc64 s390x %define with_gccgo 1 %endif # By default we don't include tsan. It's only supported on amd64. %define tsan_arch x86_64 # Go has precompiled versions of LLVM's compiler-rt inside their source code. # We cannot ship pre-compiled binaries so we have to recompile said source, # however they vendor specific commits from upstream. This value comes from # src/runtime/race/README (and we verify that it matches in check). # See boo#1052528 for more details. %define tsan_commit 68e1532492f9b3fce0e9024f3c31411105965b11 %define go_api 1.10 # shared library support %define shared_supported %(echo "%{go_api} >= 1.5" | bc -l) %if %{shared_supported} %if %{with_gccgo} %define with_shared 1 %else %ifarch %ix86 %arm x86_64 aarch64 %define with_shared 1 %else %define with_shared 0 %endif %endif %else %define with_shared 0 %endif %ifarch ppc64 %define with_shared 0 %endif Name: go1.10 Version: 1.10.2 Release: 0 Summary: A compiled, garbage-collected, concurrent programming language License: BSD-3-Clause Group: Development/Languages/Other Url: http://golang.org Source: http://golang.org/dl/go%{version}.src.tar.gz Source1: go-rpmlintrc Source2: go.sh Source4: README.SUSE Source6: go.gdbinit # We have to compile TSAN ourselves. boo#1052528 Source100: compiler-rt-g%{tsan_commit}.tar.xz # PATCH-FIX-OPENSUSE re-enable build binary only packages (we are binary distro) # see http://code.google.com/p/go/issues/detail?id=2775 & also issue 3268 Patch2: allow-binary-only-packages.patch # PATCH-FIX-OPENSUSE enable writing tools outside $GOROOT/pkg/tool for packaging Patch5: tools-packaging.patch # armv6l needs this patch for our build system # see https://groups.google.com/forum/#!topic/golang-nuts/MqKTX_XIOKE Patch6: armv6l.patch # PATCH-FIX-UPSTREAM [email protected] - find /usr/bin/go-5 when bootstrapping with gcc5-go Patch8: gcc6-go.patch Patch9: gcc7-go.patch # PATCH-FIX-UPSTREAM (compiler-rt): Fix sanitizer build against latest glibc Patch100: fix-sanitizer-build-against-latest-glibc.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # boostrap %if %{with_gccgo} %ifnarch s390 s390x BuildRequires: binutils-gold %endif %if 0%{?suse_version} == 1315 # SLE12 or Leap 42.x BuildRequires: gcc6-go %else BuildRequires: gcc7-go %endif %else # no gcc-go BuildRequires: go1.4 %endif BuildRequires: fdupes BuildRequires: systemd Recommends: %{name}-doc = %{version} %ifarch %{tsan_arch} # Needed to compile compiler-rt/TSAN. BuildRequires: gcc-c++ %endif #BNC#818502 debug edit tool of rpm fails on i586 builds BuildRequires: bc BuildRequires: rpm >= 4.11.1 # for go.gdbinit, directory ownership BuildRequires: gdb Requires(post): update-alternatives Requires(postun): update-alternatives Requires: gcc Provides: go = %{version} Provides: go-devel = go%{version} Provides: go-devel-static = go%{version} Provides: golang(API) = %{go_api} Obsoletes: go-devel < go%{version} # go-vim/emacs were separate projects starting from 1.4 Obsoletes: go-emacs <= 1.3.3 Obsoletes: go-vim <= 1.3.3 ExclusiveArch: %ix86 x86_64 aarch64 ppc64 ppc64le s390x %description Go is an expressive, concurrent, garbage collected systems programming language that is type safe and memory safe. It has pointers but no pointer arithmetic. Go has fast builds, clean syntax, garbage collection, methods for any type, and run-time reflection. It feels like a dynamic language but has the speed and safety of a static language. %package doc Summary: Go documentation Group: Documentation/Other Requires: %{name} = %{version} Provides: go-doc = %{version} %description doc Go examples and documentation. %ifarch %{tsan_arch} # boo#1052528 %package race Summary: Go runtime race detector Group: Development/Languages/Other Url: https://compiler-rt.llvm.org/ Requires: %{name} = %{version} Supplements: %{name} = %{version} ExclusiveArch: %{tsan_arch} %description race Go runtime race detector libraries. Install this package if you wish to use the -race option, in order to detect race conditions present in your Go programs. %endif %prep %ifarch %{tsan_arch} # compiler-rt %setup -q -T -b 100 -n compiler-rt-g%{tsan_commit} %patch100 -p1 %endif # go %setup -q -n go %patch2 -p1 %patch5 -p1 %ifarch armv6hl %patch6 -p1 %endif %if %{with_gccgo} %if 0%{?suse_version} == 1315 # SLE12 or Leap 42.x %patch8 -p1 %else %patch9 -p1 %endif %endif cp %{SOURCE4} . # setup go_arch (BSD-like scheme) %ifarch %ix86 %define go_arch 386 %endif %ifarch x86_64 %define go_arch amd64 %endif %ifarch aarch64 %define go_arch arm64 %endif %ifarch %arm %define go_arch arm %endif %ifarch ppc64 %define go_arch ppc64 %endif %ifarch ppc64le %define go_arch ppc64le %endif %ifarch s390x %define go_arch s390x %endif %build # Remove the pre-included .sysos, to avoid shipping things we didn't compile # (which is against the openSUSE guidelines for packaging). find . -type f -name '*.syso' -exec rm -vf {} \; # First, compile LLVM's TSAN, and replace the built-in with it. We can only do # this for amd64. %ifarch %{tsan_arch} pushd ../compiler-rt*/lib/tsan/go ./buildgo.sh popd cp ../compiler-rt*/lib/tsan/go/race_linux_%{go_arch}.syso src/runtime/race/race_linux_%{go_arch}.syso %endif # Now, compile Go. %if %{with_gccgo} export GOROOT_BOOTSTRAP=%{_prefix} %else export GOROOT_BOOTSTRAP=%{_libdir}/go1.4 %endif export GOROOT="`pwd`" export GOROOT_FINAL=%{_libdir}/go/%{go_api} export GOBIN="$GOROOT/bin" mkdir -p "$GOBIN" cd src HOST_EXTRA_CFLAGS="%{optflags} -Wno-error" ./make.bash -v cd ../ %ifarch %{tsan_arch} # Install TSAN-friendly version of the std libraries. bin/go install -race std %endif %if %{with_shared} bin/go install -buildmode=shared -linkshared std %endif %check %ifarch %{tsan_arch} # Make sure that we have the right TSAN checked out. grep "%{tsan_commit}" src/runtime/race/README %endif %install export GOROOT="%{buildroot}%{_libdir}/go/%{go_api}" install -Dm644 %{SOURCE2} $GOROOT/bin/profile.d/go.sh sed -i "s/\$go_api/%{go_api}/" $GOROOT/bin/profile.d/go.sh # locations for third party libraries, see README-openSUSE for info about locations. install -d %{buildroot}%{_datadir}/go/%{go_api}/contrib install -d $GOROOT/contrib/pkg/linux_%{go_arch} ln -s %{_libdir}/go/%{go_api}/contrib/pkg/ %{buildroot}%{_datadir}/go/%{go_api}/contrib/pkg install -d %{buildroot}%{_datadir}/go/%{go_api}/contrib/cmd install -d %{buildroot}%{_datadir}/go/%{go_api}/contrib/src ln -s %{_datadir}/go/%{go_api}/contrib/src/ %{buildroot}%{_libdir}/go/%{go_api}/contrib/src install -Dm644 README.SUSE $GOROOT/contrib/ ln -s %{_libdir}/go/%{go_api}/contrib/README.SUSE %{buildroot}%{_datadir}/go/%{go_api}/contrib/README.SUSE # source files for go install, godoc, etc install -d %{buildroot}%{_datadir}/go/%{go_api} for ext in *.{go,c,h,s,S,py,syso}; do find src -name ${ext} -exec install -Dm644 \{\} %{buildroot}%{_datadir}/go/%{go_api}/\{\} \; done mkdir -p $GOROOT/src for i in $(ls %{buildroot}/usr/share/go/%{go_api}/src);do ln -s /usr/share/go/%{go_api}/src/$i $GOROOT/src/$i done # add lib files that are needed (such as the timezone database). install -d $GOROOT/lib find lib -type f -exec install -D -m644 {} $GOROOT/{} \; # copy document templates, packages, obj libs and command utilities mkdir -p $GOROOT/bin # remove bootstrap rm -rf pkg/bootstrap mv pkg $GOROOT mv bin/* $GOROOT/bin mkdir -p $GOROOT/misc/trace mv misc/trace/*.html $GOROOT/misc/trace rm -f %{buildroot}%{_bindir}/{hgpatch,quietgcc} # gdbinit install -Dm644 %{SOURCE6} $GOROOT/bin/gdbinit.d/go.gdb %if "%{_lib}" == "lib64" sed -i "s/lib/lib64/" $GOROOT/bin/gdbinit.d/go.gdb sed -i "s/\$go_api/%{go_api}/" $GOROOT/bin/gdbinit.d/go.gdb %endif # update-alternatives mkdir -p %{buildroot}%{_sysconfdir}/alternatives mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_sysconfdir}/profile.d mkdir -p %{buildroot}%{_sysconfdir}/gdbinit.d touch %{buildroot}%{_sysconfdir}/alternatives/{go,gofmt,go.sh,go.gdb} ln -sf %{_sysconfdir}/alternatives/go %{buildroot}%{_bindir}/go ln -sf %{_sysconfdir}/alternatives/gofmt %{buildroot}%{_bindir}/gofmt ln -sf %{_sysconfdir}/alternatives/go.sh %{buildroot}%{_sysconfdir}/profile.d/go.sh ln -sf %{_sysconfdir}/alternatives/go.gdb %{buildroot}%{_sysconfdir}/gdbinit.d/go.gdb # documentation and examples # fix documetation permissions (rpmlint warning) find doc/ misc/ -type f -exec chmod 0644 '{}' \; # remove unwanted arch-dependant binaries (rpmlint warning) rm -rf misc/cgo/test/{_*,*.o,*.out,*.6,*.8} # prepare go-doc mkdir -p %{buildroot}%{_docdir}/go/%{go_api} cp -r AUTHORS CONTRIBUTORS CONTRIBUTING.md LICENSE PATENTS README.md README.SUSE %{buildroot}%{_docdir}/go/%{go_api} cp -r doc/* %{buildroot}%{_docdir}/go/%{go_api} %fdupes -s %{buildroot}%{_prefix} %post update-alternatives \ --install %{_bindir}/go go %{_libdir}/go/%{go_api}/bin/go 30 \ --slave %{_bindir}/gofmt gofmt %{_libdir}/go/%{go_api}/bin/gofmt \ --slave %{_sysconfdir}/gdbinit.d/go.gdb go.gdb %{_libdir}/go/%{go_api}/bin/gdbinit.d/go.gdb \ --slave %{_sysconfdir}/profile.d/go.sh go.sh %{_libdir}/go/%{go_api}/bin/profile.d/go.sh %postun if [ $1 -eq 0 ] ; then update-alternatives --remove go %{_libdir}/go/%{go_api}/bin/go fi %files %defattr(-,root,root,-) %{_bindir}/go %{_bindir}/gofmt %{_libdir}/go %{_libdir}/go/%{go_api} %{_datadir}/go %{_datadir}/go/%{go_api} %config %{_sysconfdir}/profile.d/go.sh %config %{_sysconfdir}/gdbinit.d/go.gdb %ghost %{_sysconfdir}/alternatives/go %ghost %{_sysconfdir}/alternatives/gofmt %ghost %{_sysconfdir}/alternatives/go.sh %ghost %{_sysconfdir}/alternatives/go.gdb %dir %{_docdir}/go %dir %{_docdir}/go/%{go_api} %doc %{_docdir}/go/%{go_api}/AUTHORS %doc %{_docdir}/go/%{go_api}/CONTRIBUTORS %doc %{_docdir}/go/%{go_api}/CONTRIBUTING.md %doc %{_docdir}/go/%{go_api}/LICENSE %doc %{_docdir}/go/%{go_api}/PATENTS %doc %{_docdir}/go/%{go_api}/README.md %doc %{_docdir}/go/%{go_api}/README.SUSE # We don't include TSAN in the main Go package. %ifarch %{tsan_arch} %exclude %{_datadir}/go/%{go_api}/src/runtime/race/race_linux_%{go_arch}.syso %endif %files doc %defattr(-,root,root,-) %doc %{_docdir}/go/%{go_api}/codewalk %doc %{_docdir}/go/%{go_api}/articles %doc %{_docdir}/go/%{go_api}/progs %doc %{_docdir}/go/%{go_api}/play %doc %{_docdir}/go/%{go_api}/gopher %doc %{_docdir}/go/%{go_api}/devel %doc %{_docdir}/go/%{go_api}/*.html %doc %{_docdir}/go/%{go_api}/*.css %doc %{_docdir}/go/%{go_api}/*.png %ifarch %{tsan_arch} %files race %defattr(-,root,root,-) %{_datadir}/go/%{go_api}/src/runtime/race/race_linux_%{go_arch}.syso %endif %changelog ++++++ README.SUSE ++++++ Updated: 05.05.2012 Authors: Graham Anderson, <[email protected]> PROJECT DETAILS --------------- OBS: https://build.opensuse.org/project/show?project=devel:languages:go Maintainers: Sascha Peilicke (saschpe), Graham Anderson (andtecheu) Wiki: http://en.opensuse.org/Go http://en.opensuse.org/openSUSE:Packaging_Go GENERAL NOTES ------------- Go toolchain environmental variables are configured via go.sh, which is installed to /etc/profile.d/go.sh Packaging guidelines and an RPM spec file recipe for packaging third party Go libraries can be found on the openSUSE wiki: http://en.opensuse.org/openSUSE:Packaging_Go The openSUSE go package uses the standard Go distribution toolchain, with a a small patchset to modify a few of the toolchain commands to suit our environment and packaging needs. This means that many of the standard go toolchain commands are not inside a users PATH, but rather are invoked and used via the "go" command. Should you wish to script or manually use the commands, the install location on a 64 bit system is /usr/lib64/go/pkg/tool/linux_amd64 The "go" tool, the "godoc" document server are inside a users PATH. We currently don't support the gccgo implementation, this is not for any other reason than contributer and maintainer time constraints. GO DOCUMENTATION ---------------- As of yet, there are no man pages for the standard Go distribution toolchain, please see the documentation provided by the "godoc" command. Man pages are slated to be included in the release in future. One of the diffs from the maintained patchset adds the distro specific doc and source file locations of the *-doc RPM packages to the virtual filesystem of the "godoc" documentation server. That is to say, as long as packages follow the Go packaging guidelines, API and other documentation should always be available via the godoc server if the packages "doc" RPM is installed. PACKAGE INSTALL LOCATIONS ------------------------- Go standard library packages are installed to a location in $GOROOT, which is defined as /usr/lib64/go on 64bit systems. Third party package binaries are installed to the default system wide $GOPATH entry. On 64bit systems the location /usr/lib64/go/contrib is used. This is specified in the macros.go RPM macro definition file that is part of the main Go package and is used for packaging most third party Go libraries. The reasons binary packages are installed to a GOPATH entry instead of GOROOT are mainly to do with how the Go toolchain prioritises and behaves with packages installed to the same location as the Go std library. By installing third party packages to a system-wide GOPATH entry location, we can ensure that no packages clobber the standard library namespace or file tree. Additionally we can support binary only packages, which as of Go 1.1 will only be supported outside of the $GOROOT. There are additional benefits to this location; such as allowing users and developers to prioritise linking from their own user defined GOPATH, which defaults to $HOME/go configured via /etc/profile.d/go.sh config. This has particular benefit for development workflows. For Go 1.1 and beyond, building and linking with binary only pacakges will only be supported with the following caveat. Package source code must not exist in the same GOPATH segment as the binary package .a archive file. If both the binary archive (.a) and the package source are installed to the same GOPATH segment, then the "go build" or "go install" command will prioritise building the software using package sources before using package binary archives. A side effect of this is that is actually possible to have source code only third party packages. To summarise the priority of binary package linking and building: 1. Any source files or binary packages in $GOROOT are considered first. Any binary packages in $GOROOT that are considered "stale" by the build tools are ignored in favour of the package source. 2. $GOPATH is considered next for import statements. GOPATH is a colon delimited list of paths. GOPATH segments are examined by the build tools in a FIFO manner, left to right. Both a system wide and a user GOPATH segment are configured by default, the user GOPATH segment takes priority over the system segment to allow flexibility for development workflows. The default user GOPATH is: GOPATH=$HOME/go:$GOROOT/contrib The default root user GOPATH is: GOPATH=$GOROOT/contrib 3. For Go < 1.1, If both the source and binary archive is available for a package import in the same GOPATH segment, the binary archive will take precedence and will be linked during compilation. For Go >= 1.1 If the package source is avaiable in the GOPATH segment, it will always be used in preference to the binary ++++++ _service ++++++ <services> <service name="tar_scm" mode="disabled"> <param name="url">https://git.llvm.org/git/compiler-rt.git</param> <param name="scm">git</param> <param name="exclude">.git</param> <!-- [boo#1052528] Always make sure this is kept up to date with src/runtime/race/README. --> <param name="versionformat">g%H</param> <param name="revision">68e1532492f9b3fce0e9024f3c31411105965b11</param> </service> <service name="download_files" mode="disabled"> <param name="changesgenerate">enable</param> </service> <service name="recompress" mode="disabled"> <param name="file">compiler-rt-*.tar</param> <param name="compression">xz</param> </service> </services> ++++++ allow-binary-only-packages.patch ++++++ Index: go/src/cmd/go/internal/load/pkg.go =================================================================== --- go.orig/src/cmd/go/internal/load/pkg.go +++ go/src/cmd/go/internal/load/pkg.go @@ -454,7 +454,7 @@ func LoadImport(path, srcDir string, par // Not vendoring, or we already found the vendored path. buildMode |= build.IgnoreVendor } - bp, err = cfg.BuildContext.Import(path, srcDir, buildMode) + bp, err = cfg.BuildContext.Import(path, srcDir, build.AllowBinary|buildMode) } bp.ImportPath = importPath if cfg.GOBIN != "" { ++++++ armv6l.patch ++++++ diff --git a/src/runtime/os_linux_generic.go b/src/runtime/os_linux_generic.go index a16d140..8351ffb 100644 --- a/src/runtime/os_linux_generic.go +++ b/src/runtime/os_linux_generic.go @@ -11,7 +11,7 @@ package runtime const ( _SS_DISABLE = 2 - _NSIG = 65 + _NSIG = 64 _SI_USER = 0 _SIG_BLOCK = 0 _SIG_UNBLOCK = 1 ++++++ fix-sanitizer-build-against-latest-glibc.patch ++++++ >From 8a5e425a68de4d2c80ff00a97bbcb3722a4716da Mon Sep 17 00:00:00 2001 From: Kostya Serebryany <[email protected]> Date: Thu, 13 Jul 2017 21:59:01 +0000 Subject: [PATCH] Fix sanitizer build against latest glibc Summary: libsanitizer doesn't build against latest glibc anymore, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81066 for details. One of the changes is that stack_t changed from typedef struct sigaltstack { ... } stack_t; to typedef struct { ... } stack_t; for conformance reasons. And the other change is that the glibc internal __need_res_state macro is now ignored, so when doing ``` #define __need_res_state #include <resolv.h> ``` the effect is now the same as just ``` #include <resolv.h> ``` and thus one doesn't get just the ``` struct __res_state { ... }; ``` definition, but newly also the ``` extern struct __res_state *__res_state(void) __attribute__ ((__const__)); ``` prototype. So __res_state is no longer a type, but a function. Reviewers: kcc, ygribov Reviewed By: kcc Subscribers: kubamracek Differential Revision: https://reviews.llvm.org/D35246 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@307969 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/sanitizer_common/sanitizer_linux.cc | 3 +-- lib/sanitizer_common/sanitizer_linux.h | 4 +--- lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc | 2 +- lib/tsan/rtl/tsan_platform_linux.cc | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/sanitizer_common/sanitizer_linux.cc b/lib/sanitizer_common/sanitizer_linux.cc index a79a2a155..8c3c1e5d6 100644 --- a/lib/sanitizer_common/sanitizer_linux.cc +++ b/lib/sanitizer_common/sanitizer_linux.cc @@ -629,8 +629,7 @@ uptr internal_prctl(int option, uptr arg2, uptr arg3, uptr arg4, uptr arg5) { } #endif -uptr internal_sigaltstack(const struct sigaltstack *ss, - struct sigaltstack *oss) { +uptr internal_sigaltstack(const void *ss, void *oss) { return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss); } diff --git a/lib/sanitizer_common/sanitizer_linux.h b/lib/sanitizer_common/sanitizer_linux.h index ee336f7dd..11cad6b80 100644 --- a/lib/sanitizer_common/sanitizer_linux.h +++ b/lib/sanitizer_common/sanitizer_linux.h @@ -21,7 +21,6 @@ #include "sanitizer_platform_limits_posix.h" struct link_map; // Opaque type returned by dlopen(). -struct sigaltstack; namespace __sanitizer { // Dirent structure for getdents(). Note that this structure is different from @@ -30,8 +29,7 @@ struct linux_dirent; // Syscall wrappers. uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count); -uptr internal_sigaltstack(const struct sigaltstack* ss, - struct sigaltstack* oss); +uptr internal_sigaltstack(const void* ss, void* oss); uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set, __sanitizer_sigset_t *oldset); diff --git a/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc b/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc index 03f73ae88..d7fa5f645 100644 --- a/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc +++ b/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc @@ -287,7 +287,7 @@ static int TracerThread(void* argument) { // Alternate stack for signal handling. InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize); - struct sigaltstack handler_stack; + stack_t handler_stack; internal_memset(&handler_stack, 0, sizeof(handler_stack)); handler_stack.ss_sp = handler_stack_memory.data(); handler_stack.ss_size = kHandlerStackSize; diff --git a/lib/tsan/rtl/tsan_platform_linux.cc b/lib/tsan/rtl/tsan_platform_linux.cc index 0ba01babe..ead1e5704 100644 --- a/lib/tsan/rtl/tsan_platform_linux.cc +++ b/lib/tsan/rtl/tsan_platform_linux.cc @@ -286,7 +286,7 @@ void InitializePlatform() { int ExtractResolvFDs(void *state, int *fds, int nfd) { #if SANITIZER_LINUX && !SANITIZER_ANDROID int cnt = 0; - __res_state *statp = (__res_state*)state; + struct __res_state *statp = (struct __res_state*)state; for (int i = 0; i < MAXNS && cnt < nfd; i++) { if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1) fds[cnt++] = statp->_u._ext.nssocks[i]; ++++++ gcc6-go.patch ++++++ Index: go/src/cmd/dist/buildtool.go =================================================================== --- go.orig/src/cmd/dist/buildtool.go +++ go/src/cmd/dist/buildtool.go @@ -183,7 +183,7 @@ func bootstrapBuildTools() { // only applies to the final cmd/go binary, but that's OK: if this is Go 1.10 // or later we don't need to disable inlining to work around bugs in the Go 1.4 compiler. cmd := []string{ - pathf("%s/bin/go", goroot_bootstrap), + pathf("%s/bin/go-6", goroot_bootstrap), "install", "-gcflags=-l", "-tags=math_big_pure_go compiler_bootstrap", Index: go/src/make.bash =================================================================== --- go.orig/src/make.bash +++ go/src/make.bash @@ -41,7 +41,7 @@ # This is used by cgo. Default is CC. # # CXX_FOR_TARGET: Command line to run to compile C++ code for GOARCH. -# This is used by cgo. Default is CXX, or, if that is not set, +# This is used by cgo. Default is CXX, or, if that is not set, # "g++" or "clang++". # # FC: Command line to run to compile Fortran code for GOARCH. @@ -151,8 +151,8 @@ echo "Building Go cmd/dist using $GOROOT if $verbose; then echo cmd/dist fi -if [ ! -x "$GOROOT_BOOTSTRAP/bin/go" ]; then - echo "ERROR: Cannot find $GOROOT_BOOTSTRAP/bin/go." >&2 +if [ ! -x "$GOROOT_BOOTSTRAP/bin/go-6" ]; then + echo "ERROR: Cannot find $GOROOT_BOOTSTRAP/bin/go-6." >&2 echo "Set \$GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4." >&2 exit 1 fi @@ -162,7 +162,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; exit 1 fi rm -f cmd/dist/dist -GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist +GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go-6" build -o cmd/dist/dist ./cmd/dist # -e doesn't propagate out of eval, so check success by hand. eval $(./cmd/dist/dist env -p || echo FAIL=true) Index: go/src/make.rc =================================================================== --- go.orig/src/make.rc +++ go/src/make.rc @@ -61,8 +61,8 @@ for(p in $path){ } } } -if(! test -x $GOROOT_BOOTSTRAP/bin/go){ - echo 'ERROR: Cannot find '$GOROOT_BOOTSTRAP'/bin/go.' >[1=2] +if(! test -x $GOROOT_BOOTSTRAP/bin/go-6){ + echo 'ERROR: Cannot find '$GOROOT_BOOTSTRAP'/bin/go-6.' >[1=2] echo 'Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4.' >[1=2] exit bootstrap } @@ -75,7 +75,7 @@ if(~ $GOROOT_BOOTSTRAP $GOROOT){ echo 'Building Go cmd/dist using '^$GOROOT_BOOTSTRAP if(~ $#vflag 1) echo cmd/dist -GOROOT=$GOROOT_BOOTSTRAP GOOS='' GOARCH='' $GOROOT_BOOTSTRAP/bin/go build -o cmd/dist/dist ./cmd/dist +GOROOT=$GOROOT_BOOTSTRAP GOOS='' GOARCH='' $GOROOT_BOOTSTRAP/bin/go-6 build -o cmd/dist/dist ./cmd/dist eval `{./cmd/dist/dist env -9} if(~ $#vflag 1) ++++++ gcc7-go.patch ++++++ diff --git a/src/cmd/dist/buildtool.go b/src/cmd/dist/buildtool.go index 24d2e1e7d6..24ce19bfd2 100644 --- a/src/cmd/dist/buildtool.go +++ b/src/cmd/dist/buildtool.go @@ -183,7 +183,7 @@ func bootstrapBuildTools() { // only applies to the final cmd/go binary, but that's OK: if this is Go 1.10 // or later we don't need to disable inlining to work around bugs in the Go 1.4 compiler. cmd := []string{ - pathf("%s/bin/go", goroot_bootstrap), + pathf("%s/bin/go-7", goroot_bootstrap), "install", "-gcflags=-l", "-tags=math_big_pure_go compiler_bootstrap", diff --git a/src/make.bash b/src/make.bash index 93a5c43d11..73a2445acf 100755 --- a/src/make.bash +++ b/src/make.bash @@ -41,7 +41,7 @@ # This is used by cgo. Default is CC. # # CXX_FOR_TARGET: Command line to run to compile C++ code for GOARCH. -# This is used by cgo. Default is CXX, or, if that is not set, +# This is used by cgo. Default is CXX, or, if that is not set, # "g++" or "clang++". # # FC: Command line to run to compile Fortran code for GOARCH. @@ -57,7 +57,7 @@ # time goes when these scripts run. # # GOROOT_BOOTSTRAP: A working Go tree >= Go 1.4 for bootstrap. -# If $GOROOT_BOOTSTRAP/bin/go is missing, $(go env GOROOT) is +# If $GOROOT_BOOTSTRAP/bin/go-7 is missing, $(go env GOROOT) is # tried for all "go" in $PATH. $HOME/go1.4 by default. set -e @@ -140,7 +140,7 @@ fi export GOROOT_BOOTSTRAP=${GOROOT_BOOTSTRAP:-$HOME/go1.4} export GOROOT="$(cd .. && pwd)" IFS=$'\n'; for go_exe in $(type -ap go); do - if [ ! -x "$GOROOT_BOOTSTRAP/bin/go" ]; then + if [ ! -x "$GOROOT_BOOTSTRAP/bin/go-7" ]; then goroot=$(GOROOT='' "$go_exe" env GOROOT) if [ "$goroot" != "$GOROOT" ]; then GOROOT_BOOTSTRAP=$goroot @@ -151,8 +151,8 @@ echo "Building Go cmd/dist using $GOROOT_BOOTSTRAP." if $verbose; then echo cmd/dist fi -if [ ! -x "$GOROOT_BOOTSTRAP/bin/go" ]; then - echo "ERROR: Cannot find $GOROOT_BOOTSTRAP/bin/go." >&2 +if [ ! -x "$GOROOT_BOOTSTRAP/bin/go-7" ]; then + echo "ERROR: Cannot find $GOROOT_BOOTSTRAP/bin/go-7." >&2 echo "Set \$GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4." >&2 exit 1 fi @@ -162,7 +162,7 @@ if [ "$GOROOT_BOOTSTRAP" = "$GOROOT" ]; then exit 1 fi rm -f cmd/dist/dist -GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go" build -o cmd/dist/dist ./cmd/dist +GOROOT="$GOROOT_BOOTSTRAP" GOOS="" GOARCH="" "$GOROOT_BOOTSTRAP/bin/go-7" build -o cmd/dist/dist ./cmd/dist # -e doesn't propagate out of eval, so check success by hand. eval $(./cmd/dist/dist env -p || echo FAIL=true) diff --git a/src/make.rc b/src/make.rc index 7ae6221b38..1250f535e3 100755 --- a/src/make.rc +++ b/src/make.rc @@ -52,7 +52,7 @@ GOROOT = `{cd .. && pwd} if(! ~ $#GOROOT_BOOTSTRAP 1) GOROOT_BOOTSTRAP = $home/go1.4 for(p in $path){ - if(! test -x $GOROOT_BOOTSTRAP/bin/go){ + if(! test -x $GOROOT_BOOTSTRAP/bin/go-7){ if(go_exe = `{path=$p whatis go}){ goroot = `{GOROOT='' $go_exe env GOROOT} if(! ~ $goroot $GOROOT){ @@ -61,7 +61,7 @@ for(p in $path){ } } } -if(! test -x $GOROOT_BOOTSTRAP/bin/go){ +if(! test -x $GOROOT_BOOTSTRAP/bin/go-7){ echo 'ERROR: Cannot find '$GOROOT_BOOTSTRAP'/bin/go.' >[1=2] echo 'Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4.' >[1=2] exit bootstrap @@ -75,7 +75,7 @@ if(~ $GOROOT_BOOTSTRAP $GOROOT){ echo 'Building Go cmd/dist using '^$GOROOT_BOOTSTRAP if(~ $#vflag 1) echo cmd/dist -GOROOT=$GOROOT_BOOTSTRAP GOOS='' GOARCH='' $GOROOT_BOOTSTRAP/bin/go build -o cmd/dist/dist ./cmd/dist +GOROOT=$GOROOT_BOOTSTRAP GOOS='' GOARCH='' $GOROOT_BOOTSTRAP/bin/go-7 build -o cmd/dist/dist ./cmd/dist eval `{./cmd/dist/dist env -9} if(~ $#vflag 1) ++++++ go-rpmlintrc ++++++ addFilter("binaryinfo-readelf-failed") # go binaries are suposedly ELF-compliant addFilter("statically-linked-binary") # go doesn't yet support dynamic linking # .syso files are special. Note that while they are architecture-dependent, # they are named to avoid conflicts (and we make sure of that in the RPM # through go_arch). addFilter("unstripped-binary-or-object.*\.syso$") addFilter("arch-dependent-file-in-usr-share.*\.syso$") addFilter("W: position-independent-executable-suggested") ++++++ go.gdbinit ++++++ add-auto-load-safe-path /usr/lib/go/$go_api/src/runtime/runtime-gdb.py ++++++ go.sh ++++++ # go toolchain env paths export GOOS="linux" case "$(uname -m)" in *86) export GOARCH=386 libdir=lib ;; aarch64) export GOARCH=arm64 libdir=lib64 ;; x86_64) export GOARCH=amd64 libdir=lib64 ;; ppc64) export GOARCH=ppc64 libdir=lib64 ;; ppc64le) export GOARCH=ppc64le libdir=lib64 ;; arm*) export GOARCH=arm libdir=lib ;; s390x) export GOARCH=s390x libdir=lib64 ;; esac export GOROOT=/usr/$libdir/go/$go_api export GOBIN=/usr/bin export GOPATH=/usr/share/go/$go_api/contrib if [ `id -u` != 0 ]; then export GOPATH=$HOME/go:/usr/share/go/$go_api/contrib unset GOBIN fi ++++++ tools-packaging.patch ++++++ Index: go/src/cmd/go/internal/load/pkg.go =================================================================== --- go.orig/src/cmd/go/internal/load/pkg.go +++ go/src/cmd/go/internal/load/pkg.go @@ -964,7 +964,13 @@ func (p *Package) load(stk *ImportStack, if InstallTargetDir(p) == ToTool { // This is for 'go tool'. // Override all the usual logic and force it into the tool directory. - p.Target = filepath.Join(cfg.GOROOTpkg, "tool", full) + // If GOROOT_TARGET is set, then write to it for packaging purpose + gorootTarget := os.Getenv("GOROOT_TARGET") + if gorootTarget == "" { + p.Target = filepath.Join(cfg.GOROOTpkg, "tool", full) + } else { + p.Target = filepath.Join(gorootTarget, "pkg/tool", full) + } } if p.Target != "" && cfg.BuildContext.GOOS == "windows" { p.Target += ".exe"
