diff -Nru golang-1.5.1/debian/changelog golang-1.5.1/debian/changelog --- golang-1.5.1/debian/changelog 2015-11-24 11:09:15.000000000 +1300 +++ golang-1.5.1/debian/changelog 2015-12-15 16:03:41.000000000 +1300 @@ -1,3 +1,50 @@ +golang (2:1.5.1-4ubuntu1) xenial; urgency=low + + * Merge from Debian unstable. Remaining changes: + - d/patches/armhf-elf-header.patch (see upstream bug + https://github.com/golang/go/issues/7094) + - d/patches/qemu-compat.patch (see upstream bug + https://github.com/golang/go/issues/13024) + - Build empty golang-go and golang-src packages on architectures without + golang support and depend on gccgo instead (see Debian bug #780355) + - Do not distribute un-built from source race detector runtime files and + recommend golang-race-detector-runtime instead (see Debian bug #807455) + * Add patches to avoid build failures: + - d/patches/support-new-relocations.patch (see Debian bug #807136) + - d/patches/skip-userns-tests-when-chrooted.patch (see Debian bug #807303) + * Do not include race enabled packages in golang-go deb (see Debian bug + #807294) + + -- Michael Hudson-Doyle Wed, 09 Dec 2015 15:33:37 +1300 + +golang (2:1.5.1-4) unstable; urgency=medium + + * Add Conflicts to force newer golang-go.tools too (Closes: #803559) + + -- Tianon Gravi Tue, 03 Nov 2015 21:57:54 -0800 + +golang (2:1.5.1-3) unstable; urgency=medium + + * Remove architecture qualification on golang-go Build-Depend now that + golang-go is available for more architectures. + + -- Tianon Gravi Thu, 29 Oct 2015 07:40:38 -0700 + +golang (2:1.5.1-2) unstable; urgency=medium + + * Add Conflicts to force newer golang-golang-x-tools (Closes: #802945). + + -- Tianon Gravi Tue, 27 Oct 2015 13:28:56 -0700 + +golang (2:1.5.1-1) unstable; urgency=medium + + * Upload to unstable. + * Update to 1.5.1 upstream release (see notes from experimental uploads for + what's changed). + * Skip tests on architectures where the tests fail. + + -- Tianon Gravi Sat, 24 Oct 2015 10:22:02 -0700 + golang (2:1.5.1-0ubuntu4) xenial; urgency=medium * Add d/patches/support-new-relocations.patch to fix ftbfs on xenial. @@ -65,6 +112,69 @@ -- Michael Hudson-Doyle Tue, 18 Aug 2015 16:05:37 +1200 +golang (2:1.4.3-3) unstable; urgency=medium + + * Fix FTBFS for non-amd64 architectures due to handling of "-race". + + -- Tianon Gravi Mon, 05 Oct 2015 02:04:07 -0700 + +golang (2:1.5.1-1~exp2) experimental; urgency=medium + + * Upload to experimental. + * Add arch-qualifiers to "golang-go" build-depends to unblock the buildds + (Closes: #800479); thanks Tim! + + -- Tianon Gravi Wed, 30 Sep 2015 11:19:26 -0700 + +golang (2:1.4.3-2) unstable; urgency=medium + + * Update Recommends/Suggests, especially to add gcc, etc. + * Refactor "debian/rules" to utilize debhelper more effectively, especially + for arch vs indep building (mostly backported from the 1.5+ changes), which + fixes the "arch:all" FTBFS. + + -- Tianon Gravi Sun, 27 Sep 2015 22:06:07 -0700 + +golang (2:1.5.1-1~exp1) experimental; urgency=low + + * Upload to experimental. + * Update to 1.5.1 upstream release (Closes: #796150). + - Compiler and runtime written entirely in Go. + - Concurrent garbage collector. + - GOMAXPROCS=runtime.NumCPU() by default. + - "internal" packages for all, not just core. + - Experimental "vendoring" support. + - Cross-compilation no longer requires a complete rebuild of the stdlib in + GOROOT, and thus the golang-go-GOHOST-GOARCH packages are removed. + * Sync debian/copyright with the Ubuntu delta. (thanks doko!) + * Remove patches that no longer apply. + * Add more supported arches to "debian/rules" code for detecting + appropriate GOARCH/GOHOSTARCH values; thanks mwhudson and tpot! + (Closes: #799907) + * Refactor "debian/rules" to utilize debhelper more effectively, especially + for arch vs indep building. + * Move "dpkg-architecture" to "GOOS"/"GOARCH" code into a simple shell script + for easier maintenance. + + -- Tianon Gravi Fri, 25 Sep 2015 14:36:53 -0700 + +golang (2:1.4.3-1) unstable; urgency=medium + + * New upstream version (https://golang.org/doc/devel/release.html#go1.4.minor) + - includes previous CVE and non-CVE security fixes, especially + TEMP-0000000-1C4729 + + -- Tianon Gravi Fri, 25 Sep 2015 00:02:31 -0700 + +golang (2:1.4.2-4) unstable; urgency=high + + * Apply backported CVE fixes (Closes: #795106). + - CVE-2015-5739: Invalid headers are parsed as valid headers + - CVE-2015-5740: RFC 7230 3.3.3 4 violation + - CVE-2015-5741: other discoveries of security-relevant RFC 7230 violations + + -- Tianon Gravi Mon, 14 Sep 2015 12:27:57 -0700 + golang (2:1.4.2-3ubuntu2) wily; urgency=medium * Fix installation of fake golang-go package. diff -Nru golang-1.5.1/debian/control golang-1.5.1/debian/control --- golang-1.5.1/debian/control 2015-10-15 22:58:01.000000000 +1300 +++ golang-1.5.1/debian/control 2015-12-15 15:57:36.000000000 +1300 @@ -5,22 +5,26 @@ XSBC-Original-Maintainer: Go Compiler Team Uploaders: Michael Stapelberg , Paul Tagliamonte , - Tianon Gravi + Tianon Gravi Vcs-Browser: https://anonscm.debian.org/cgit/pkg-golang/golang.git Vcs-Git: git://anonscm.debian.org/pkg-golang/golang.git -Build-Depends: debhelper (>= 7.4.10), bison, ed, mawk | awk, perl, netbase, - golang (>= 1:1.4~) | gccgo-5 -Build-Depends-Indep: po-debconf +Build-Depends: bison, + debhelper (>= 7.4.10), + ed, + golang-go (>= 2:1.4.2-2~) | gccgo-5, + mawk | awk, + netbase, + perl Standards-Version: 3.9.6 Homepage: https://golang.org Package: golang-go Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, - golang-src (>= ${source:Version}), - gccgo [!armel !armhf !amd64 !i386 !arm64 !ppc64el] -Breaks: golang-golang-x-tools (<= 1:0.0~git20150716.0.87156cb+dfsg1-3), - golang-go.tools (<= 1:0.0~git20150716.0.87156cb+dfsg1-3) +Depends: gccgo [!armel !armhf !amd64 !i386 !arm64 !ppc64el], + golang-src (>= ${source:Version}), + ${misc:Depends}, + ${perl:Depends}, + ${shlibs:Depends} Replaces: golang-go-darwin-386, golang-go-darwin-amd64, golang-go-freebsd-386, @@ -32,11 +36,20 @@ golang-go-netbsd-386, golang-go-netbsd-amd64, golang-go-windows-386, - golang-go-windows-amd64, - golang-golang-x-tools (<= 1:0.0~git20150716.0.87156cb+dfsg1-3), - golang-go.tools (<= 1:0.0~git20150716.0.87156cb+dfsg1-3) -Recommends: golang-race-detector-runtime [amd64] -Suggests: bzr, git, golang-go.tools, mercurial, subversion + golang-go-windows-amd64 +Conflicts: golang-go.tools (<< 1:0.0~git20151026.0.0f9d71c-1~), + golang-golang-x-tools (<< 1:0.0~git20151026.0.0f9d71c-1~) +Recommends: g++, + gcc, + golang-race-detector-runtime [amd64], + libc6-dev, + pkg-config +Suggests: bzr, + ca-certificates, + git, + golang-golang-x-tools, + mercurial, + subversion Description: Go programming language compiler, linker, compiled stdlib The Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean, and efficient. Its concurrency @@ -54,10 +67,8 @@ pre-compile the standard library inside GOROOT for cross-compilation to work. Package: golang-src -Replaces: golang-go (<< 2:1-3~) -Breaks: golang-go (<< 2:1-3~) Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${misc:Depends}, ${shlibs:Depends} Description: Go programming language - source files The Go programming language is an open source project to make programmers more productive. Go is expressive, concise, clean, and efficient. Its concurrency @@ -72,7 +83,7 @@ cross-compilation. Package: golang-doc -Depends: ${misc:Depends}, golang-go +Depends: golang-go, ${misc:Depends} Architecture: all Section: doc Description: Go programming language - documentation @@ -91,10 +102,10 @@ --http=:6060", and then visiting http://localhost:6060/doc/install.html. Package: golang -Depends: ${misc:Depends}, - golang-go (>= ${source:Version}), - golang-src (>= ${source:Version}), - golang-doc (>= ${source:Version}) +Depends: golang-doc (>= ${source:Version}), + golang-go (>= ${source:Version}), + golang-src (>= ${source:Version}), + ${misc:Depends} Architecture: all Description: Go programming language compiler - metapackage The Go programming language is an open source project to make diff -Nru golang-1.5.1/debian/copyright golang-1.5.1/debian/copyright --- golang-1.5.1/debian/copyright 2015-09-09 21:10:20.000000000 +1200 +++ golang-1.5.1/debian/copyright 2015-12-15 15:56:06.000000000 +1300 @@ -104,7 +104,7 @@ Copyright: © 1998-2002 by Lucent Technologies. Portions © 2004 Google Inc. Portions © 2009 The Go Authors. All rights reserved. -License: MIT-Inspired +License: The authors of this software are Rob Pike and Ken Thompson, with contributions from Mike Burrows and Sean Dorward. Copyright (c) 1998-2006 by Lucent Technologies. @@ -179,7 +179,6 @@ Copyright: © 2010 The Go Authors. All rights reserved. Based on code © 1993 by Sun Microsystems, Inc. All rights reserved. License: Go -Comment: The original C code, the long comment, and the constants below are from FreeBSD's /usr/src/lib/msun/src/s_log1p.c and came with this notice. The go code is a simplified @@ -277,7 +276,6 @@ Files: lib/godoc/godoc.html Copyright: © 2009, 2010, The Go Authors. All rights reserved. License: CC-BY-3.0 -Comment: Except as noted, this content is licensed under Creative Commons Attribution 3.0 @@ -295,9 +293,8 @@ Files: favicon.ico doc/gopher/* -Copyright: Renée French +Author: Renée French License: CC-BY-3.0 -Comment: The mascot and logo were designed by Renée French , who also designed Glenda , @@ -311,7 +308,6 @@ Files: doc/* Copyright: © 2009, 2010, The Go Authors. All rights reserved. License: CC-BY-3.0 -Comment: Except as noted, this content is licensed under Creative Commons Attribution 3.0 @@ -334,7 +330,6 @@ Origin: http://www.w3.org/Talks/Tools/Slidy/ Copyright: © 2005 W3C (MIT, ERCIM, Keio), All Rights Reserved. License: W3C -Comment: W3C liability, trademark, document use and software licensing rules apply, see: . @@ -346,7 +341,7 @@ 2010 Ondřej Surý 2012 Michael Stapelberg 2014 Canonical Ltd - 2014 Tianon Gravi + 2014 Tianon Gravi License: Go License: Go diff -Nru golang-1.5.1/debian/golang-go.config golang-1.5.1/debian/golang-go.config --- golang-1.5.1/debian/golang-go.config 2015-08-21 11:54:56.000000000 +1200 +++ golang-1.5.1/debian/golang-go.config 1970-01-01 12:00:00.000000000 +1200 @@ -1,9 +0,0 @@ -#!/bin/sh - -set -e - -. /usr/share/debconf/confmodule - -# Cleanup old debconf dashboard question that was removed in golang-go 2:1.1 -# -- 2013-05-14 stapelberg -db_purge diff -Nru golang-1.5.1/debian/golang-go.postinst golang-1.5.1/debian/golang-go.postinst --- golang-1.5.1/debian/golang-go.postinst 2015-09-09 21:10:20.000000000 +1200 +++ golang-1.5.1/debian/golang-go.postinst 2015-12-09 14:58:46.000000000 +1300 @@ -1,24 +1,8 @@ #!/bin/sh - -confdir=/etc/golang -conffile=$confdir/goinstall.conf - set -e -. /usr/share/debconf/confmodule - -# Cleanup old debconf dashboard question that was removed in golang-go 2:1.1 -# -- 2013-05-14 stapelberg -db_purge - case "$1" in configure) - # Remove obsolete goinstall.conf. - # -- 2013-05-14 stapelberg - if [ -e $conffile ]; then - rm -f $conffile - rmdir /etc/golang || true - fi # Very ugly hack to set timestamps same as /usr/lib/go/bin/go find /usr/lib/go/pkg -exec touch -r /usr/lib/go/bin/go {} \; # Setup alternatives diff -Nru golang-1.5.1/debian/golang-go.postrm golang-1.5.1/debian/golang-go.postrm --- golang-1.5.1/debian/golang-go.postrm 2015-08-21 11:54:56.000000000 +1200 +++ golang-1.5.1/debian/golang-go.postrm 1970-01-01 12:00:00.000000000 +1200 @@ -1,19 +0,0 @@ -#!/bin/sh - -set -e - -# purge the config file which is created in the postinst script -if [ "$1" = purge ] ; then - rm -f /etc/golang/goinstall.conf - rmdir /etc/golang || true -fi - -if [ "$1" = "purge" ] && [ -e /usr/share/debconf/confmodule ]; then - # Source debconf library. - . /usr/share/debconf/confmodule - # Remove my changes to the db. - db_purge -fi - -#DEBHELPER# - diff -Nru golang-1.5.1/debian/helpers/goenv.sh golang-1.5.1/debian/helpers/goenv.sh --- golang-1.5.1/debian/helpers/goenv.sh 1970-01-01 12:00:00.000000000 +1200 +++ golang-1.5.1/debian/helpers/goenv.sh 2015-12-09 15:00:10.000000000 +1300 @@ -0,0 +1,54 @@ +#!/bin/sh +set -e + +__goos__deb_arch_os() { + case "$1" in + kfreebsd) echo freebsd ;; + linux) echo "$1" ;; + *) echo >&2 "error: unrecongized DEB_*_ARCH_OS: $1"; exit 1 ;; + esac +} + +__goarch__deb_arch_cpu() { + case "$1" in + amd64|arm|arm64|ppc64) echo "$1" ;; + i386) echo 386 ;; + ppc64el) echo ppc64le ;; + *) echo >&2 "error: unrecongized DEB_*_ARCH_CPU: $1"; exit 1 ;; + esac +} + +# build machine +# The machine the package is built on. +# +# host machine +# The machine the package is built for. + +export GOHOSTOS="$(__goos__deb_arch_os "$(dpkg-architecture -qDEB_BUILD_ARCH_OS 2>/dev/null)")" +export GOOS="$(__goos__deb_arch_os "$(dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null)")" + +export GOHOSTARCH="$(__goarch__deb_arch_cpu "$(dpkg-architecture -qDEB_BUILD_ARCH_CPU 2>/dev/null)")" +export GOARCH="$(__goarch__deb_arch_cpu "$(dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null)")" + +if [ -z "$GOHOSTOS" -o -z "$GOOS" -o -z "$GOHOSTARCH" -o -z "$GOARCH" ]; then + exit 1 +fi + +# Always use the 387 floating point unit instead of sse2. This is important to +# ensure that the binaries we build (both when compiling golang on the buildds +# and when users cross-compile for 386) can actually run on older CPUs (where +# old means e.g. an AMD Athlon XP 2400+). See http://bugs.debian.org/753160 and +# https://code.google.com/p/go/issues/detail?id=8152 +export GO386=387 + +unset GOARM +if [ "$GOARCH" = 'arm' ]; then + # start with GOARM=5 for maximum compatibility (see note about GO386 above) + GOARM=5 + case "$(dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null)" in + armhf) GOARM=6 ;; + esac +fi +export GOARM + +eval "$@" diff -Nru golang-1.5.1/debian/patches/series golang-1.5.1/debian/patches/series --- golang-1.5.1/debian/patches/series 2015-11-24 11:09:15.000000000 +1300 +++ golang-1.5.1/debian/patches/series 2015-12-09 14:21:23.000000000 +1300 @@ -1,3 +1,4 @@ armhf-elf-header.patch +skip-userns-tests-when-chrooted.patch qemu-compat.patch support-new-relocations.patch diff -Nru golang-1.5.1/debian/patches/skip-userns-tests-when-chrooted.patch golang-1.5.1/debian/patches/skip-userns-tests-when-chrooted.patch --- golang-1.5.1/debian/patches/skip-userns-tests-when-chrooted.patch 1970-01-01 12:00:00.000000000 +1200 +++ golang-1.5.1/debian/patches/skip-userns-tests-when-chrooted.patch 2015-12-09 14:17:04.000000000 +1300 @@ -0,0 +1,37 @@ +Description: skip tests that create a user namespace when chrooted +Origin: https://go.googlesource.com/go/+/21efa7b2bc872958bcb252f5ab4dc52b2b0abeae +Applied-Upstream: commit:21efa7b2bc872958bcb252f5ab4dc52b2b0abeae + +--- a/src/syscall/exec_linux_test.go ++++ b/src/syscall/exec_linux_test.go +@@ -17,6 +17,17 @@ + "testing" + ) + ++// Check if we are in a chroot by checking if the inode of / is ++// different from 2 (there is no better test available to non-root on ++// linux). ++func isChrooted(t *testing.T) bool { ++ root, err := os.Stat("/") ++ if err != nil { ++ t.Fatalf("cannot stat /: %v", err) ++ } ++ return root.Sys().(*syscall.Stat_t).Ino != 2 ++} ++ + func whoamiCmd(t *testing.T, uid, gid int, setgroups bool) *exec.Cmd { + if _, err := os.Stat("/proc/self/ns/user"); err != nil { + if os.IsNotExist(err) { +@@ -24,6 +35,12 @@ + } + t.Fatalf("Failed to stat /proc/self/ns/user: %v", err) + } ++ if isChrooted(t) { ++ // create_user_ns in the kernel (see ++ // https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/kernel/user_namespace.c) ++ // forbids the creation of user namespaces when chrooted. ++ t.Skip("cannot create user namespaces when chrooted") ++ } + cmd := exec.Command("whoami") + cmd.SysProcAttr = &syscall.SysProcAttr{ + Cloneflags: syscall.CLONE_NEWUSER, diff -Nru golang-1.5.1/debian/rules golang-1.5.1/debian/rules --- golang-1.5.1/debian/rules 2015-09-09 21:10:20.000000000 +1200 +++ golang-1.5.1/debian/rules 2015-12-15 15:58:21.000000000 +1300 @@ -2,62 +2,70 @@ # This file is in the public domain. # You may freely use, modify, distribute, and relicense it. -libexecdir := /usr/lib/go -datadir := /usr/share/go -bindir := /bin +export GOROOT := $(CURDIR) +export GOROOT_FINAL := /usr/lib/go + +DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null) +RUN_TESTS := true +ifeq (ppc64, $(DEB_HOST_ARCH_CPU)) + RUN_TESTS := false +endif DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) golang_archs = armel armhf amd64 i386 arm64 ppc64el +IS_GOLANG_ARCH := true +ifeq (,$(filter $(DEB_HOST_ARCH),$(golang_archs))) + IS_GOLANG_ARCH := false + RUN_TESTS := false +endif -build-arch build-indep build clean install binary-arch binary-indep binary: debian/control +%: +dh --parallel $(opt_no_act) $@ override_dh_auto_clean: + # remove autogenerated files + rm -f \ + src/cmd/cgo/zdefaultcc.go \ + src/cmd/go/zdefaultcc.go \ + src/cmd/internal/obj/zbootstrap.go \ + src/runtime/zversion.go + # remove built objects rm -rf bin pkg - rm -f debian/*+ - rm -f debian/build.stamp - rm -f test/pass.out test/run.out test/times.out - rm -f src/cmd/cgo/zdefaultcc.go src/cmd/go/zdefaultcc.go src/cmd/internal/obj/zbootstrap.go src/runtime/zversion.go - rm -rf debian/home - -override_dh_auto_build: debian/build.stamp - -override_dh_auto_test: -ifneq (,$(filter $(DEB_HOST_ARCH),$(golang_archs))) -ifeq ($(RUN_TEST), true) - cd $(CURDIR)/src && \ - $(CURDIR)/debian/test.bash + +override_dh_auto_test-arch: +ifeq (true, $(RUN_TESTS)) + set -ex; \ + cd src; \ + export PATH="$(GOROOT)/bin:$$PATH"; \ + eval "$$(go tool dist env)"; \ + bash run.bash --no-rebuild; + # On linux/amd64 run.bash installs some race enabled standard library + # packages. Delete them again to avoid accidentally including them in + # the package. + rm -rf "$(GOROOT)/pkg/linux_amd64_race/" else - : -endif + # skip the tests on platforms where they fail endif -override_dh_compress: +override_dh_compress-indep: dh_compress -Xusr/share/doc/golang-doc/html -Xusr/share/doc/golang-doc/godoc -override_dh_install: -ifneq (,$(filter $(DEB_HOST_ARCH),$(golang_archs))) - # Install the native runtime/cgo.a to the golang-go package. - # runtime/cgo is only built for the native architecture, but the - # golang-go-OS-ARCH packages are built on one particular buildd, which - # might either be i386 or amd64. - echo "listing of $$(pwd):"; ls -hlR . - echo "listing of GOBIN: ($(GOBIN))"; ls -hlR $(GOBIN) - for file in pkg/*/runtime/cgo.a; do \ - mkdir -p $(CURDIR)/debian/golang-go/usr/lib/go/$$(dirname $$file); \ - mv $$file $(CURDIR)/debian/golang-go/usr/lib/go/$$file; \ - done +override_dh_install-indep: + dh_install --fail-missing + +override_dh_install-arch: +ifeq (true, $(IS_GOLANG_ARCH)) dh_install --fail-missing # Remove .syso files of the race detector; they are binary files that # are not built from source in the go source distribution. find $(CURDIR)/debian/golang-src/usr/share/go/src/runtime/race -type f -name '*.syso' -delete # Remove Plan9 rc(1) scripts - find $(CURDIR)/debian/golang-src/usr/share/go/src -type f -name "*.rc" -delete + find debian/golang-src/usr/share/go/src -type f -name '*.rc' -delete # Remove empty /usr/share/go/src from golang-go, it is provided by golang-src - find $(CURDIR)/debian/golang-go/usr/share/go/src -type d -delete + find debian/golang-go/usr/share/go/src -type d -delete # Touch built and installed files and directories to have same timestamp - touch $(CURDIR)/debian/golang-go/usr/lib/go/pkg - find $(CURDIR)/debian/golang-go/usr/lib/go/pkg -exec touch -r $(CURDIR)/debian/golang-go/usr/lib/go/pkg {} \; + touch debian/golang-go/usr/lib/go/pkg + find debian/golang-go/usr/lib/go/pkg -exec touch -r $(CURDIR)/debian/golang-go/usr/lib/go/pkg {} \; endif override_dh_strip: @@ -66,7 +74,7 @@ override_dh_installdeb: dh_installdeb -ifeq (,$(filter $(DEB_HOST_ARCH),$(golang_archs))) +ifeq (false, $(IS_GOLANG_ARCH)) : # these are empty dependency packages rm -f debian/golang-go/DEBIAN/p* rm -rf debian/golang-go/usr/share/man @@ -75,108 +83,19 @@ install -d -m 755 debian/golang-src/usr/share/go/test endif -override_dh_builddeb: - dh_builddeb -- -Zxz - override_dh_shlibdeps: dh_shlibdeps -Xtestdata -Xtest -debian/build.stamp: -ifneq (,$(filter $(DEB_HOST_ARCH),$(golang_archs))) +override_dh_auto_build-arch: +ifeq (true, $(IS_GOLANG_ARCH)) [ -f VERSION ] || echo "debian snapshot +$$(dpkg-parsechangelog -SVersion)" > VERSION - rm -f debian/build.stamp - mkdir -p $(GOBIN) - export GOROOT_BOOTSTRAP=$$(env -i go env GOROOT) && cd src && bash ./make.bash --no-banner - >debian/build.stamp -else - touch debian/build.stamp -endif - -opt_no_act = -RUN_TEST := true - -ifneq (,$(filter noopt,$(DEB_BUILD_OPTIONS))) - $(warning no support for disabling optimization) + export GOROOT_BOOTSTRAP=$$(env -i go env GOROOT) \ + && cd src \ + && $(CURDIR)/debian/helpers/goenv.sh \ + bash ./make.bash --no-banner endif +opt_no_act := ifneq (,$(findstring n,$(MAKEFLAGS))) - opt_no_act = --no-act -endif - -ifneq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) - RUN_TEST := false -endif - -GOROOT := $(CURDIR) -GOROOT_FINAL := $(libexecdir) -GOBIN := $(CURDIR)$(bindir) -GOARM := - -DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH 2>/dev/null) -DEB_HOST_ARCH_OS := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS 2>/dev/null) -DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null) -DEB_BUILD_ARCH_OS := $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS 2>/dev/null) -DEB_BUILD_ARCH_CPU := $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU 2>/dev/null) - -ifeq ($(DEB_BUILD_ARCH_OS), kfreebsd) - RUN_TEST := false - GOHOSTOS := freebsd -else ifeq ($(DEB_BUILD_ARCH_OS), linux) - GOHOSTOS := linux -else - $(error unrecongized build host kernel $(DEB_BUILD_ARCH_OS)!) -endif - -ifeq ($(DEB_HOST_ARCH_OS), kfreebsd) - RUN_TEST := false - GOOS := freebsd -else ifeq ($(DEB_HOST_ARCH_OS), linux) - GOOS := linux -else - $(error unrecognized kernel $(DEB_HOST_ARCH_OS)!) -endif - -ifeq ($(DEB_BUILD_ARCH_CPU), i386) - GOHOSTARCH := 386 -else ifeq ($(DEB_BUILD_ARCH_CPU), amd64) - GOHOSTARCH := amd64 -else ifeq ($(DEB_BUILD_ARCH_CPU), arm) - GOHOSTARCH := arm -else ifeq ($(DEB_BUILD_ARCH_CPU), armhf) - GOHOSTARCH := arm -else ifeq ($(DEB_BUILD_ARCH_CPU), arm64) - GOHOSTARCH := arm64 -else ifeq ($(DEB_BUILD_ARCH_CPU), ppc64el) - GOHOSTARCH := ppc64le -else - #$(error unrecognized build host instruction set $(DEB_HOST_ARCH_CPU)!) -endif - -ifeq ($(DEB_HOST_ARCH_CPU), i386) - GOARCH := 386 - GOPREFIX := 8 -else ifeq ($(DEB_HOST_ARCH_CPU), amd64) - GOARCH := amd64 - GOPREFIX := 6 -else ifeq ($(DEB_HOST_ARCH_CPU), arm) - GOARCH := arm - GOPREFIX := 5 -ifeq ($(DEB_HOST_ARCH), armel) - RUN_TEST := false - GOARM := 5 -else ifeq ($(DEB_HOST_ARCH), armhf) - GOARM := 6 -else - $(error unrecognized arm architecture $(DEB_HOST_ARCH)!) + opt_no_act := --no-act endif -else ifeq ($(DEB_HOST_ARCH_CPU), arm64) - GOHOSTARCH := arm64 -else ifeq ($(DEB_HOST_ARCH_CPU), ppc64el) - GOHOSTARCH := ppc64le -else - #$(error unrecognized instruction set $(DEB_HOST_ARCH_CPU)!) -endif - -export GOROOT GOROOT_FINAL GOOS GOARCH GOARM GOBIN GOHOSTARCH GOHOSTOS GO386 - -.PHONY: build clean install binary-arch binary-indep binary diff -Nru golang-1.5.1/debian/source/lintian-overrides golang-1.5.1/debian/source/lintian-overrides --- golang-1.5.1/debian/source/lintian-overrides 2015-09-09 21:10:20.000000000 +1200 +++ golang-1.5.1/debian/source/lintian-overrides 2015-12-15 15:59:25.000000000 +1300 @@ -8,20 +8,3 @@ golang source: source-contains-prebuilt-binary src/debug/elf/testdata/go-relocation-test-gcc441-x86-64.obj golang source: source-contains-prebuilt-windows-binary src/debug/pe/testdata/gcc-386-mingw-obj golang source: source-contains-prebuilt-binary src/runtime/race/race_linux_amd64.syso -golang source: source-is-missing src/runtime/race/race_freebsd_amd64.syso -golang source: source-is-missing src/runtime/race/race_linux_amd64.syso -golang source: source-is-missing src/debug/dwarf/testdata/line-clang.elf -golang source: source-is-missing src/debug/dwarf/testdata/line-gcc.elf -golang source: source-is-missing src/debug/dwarf/testdata/typedef.elf4 -golang source: source-is-missing src/debug/elf/testdata/gcc-386-freebsd-exec -golang source: source-is-missing src/debug/elf/testdata/gcc-amd64-linux-exec -golang source: source-is-missing src/debug/elf/testdata/gcc-amd64-openbsd-debug-with-rela.obj -golang source: source-is-missing src/debug/elf/testdata/go-relocation-test-clang-arm.obj -golang source: source-is-missing src/debug/elf/testdata/go-relocation-test-clang-x86.obj -golang source: source-is-missing src/debug/elf/testdata/go-relocation-test-gcc424-x86-64.obj -golang source: source-is-missing src/debug/elf/testdata/go-relocation-test-gcc441-x86-64.obj -golang source: source-is-missing src/debug/elf/testdata/go-relocation-test-gcc441-x86.obj -golang source: source-is-missing src/debug/elf/testdata/go-relocation-test-gcc482-aarch64.obj -golang source: source-is-missing src/debug/elf/testdata/go-relocation-test-gcc482-ppc64le.obj -golang source: source-is-missing src/debug/elf/testdata/go-relocation-test-gcc492-arm.obj -golang source: source-is-missing src/debug/elf/testdata/go-relocation-test-gcc5-ppc.obj diff -Nru golang-1.5.1/debian/test.bash golang-1.5.1/debian/test.bash --- golang-1.5.1/debian/test.bash 2015-09-09 21:10:20.000000000 +1200 +++ golang-1.5.1/debian/test.bash 1970-01-01 12:00:00.000000000 +1200 @@ -1,4 +0,0 @@ -#!/usr/bin/env bash -set -e -eval $(./bin/go tool dist env -p) -bash run.bash --no-rebuild -banner ""