diff options
| -rw-r--r-- | debian/patches/001-allow_IPv4_on_IPv6_sockets.patch | 25 | ||||
| -rw-r--r-- | debian/patches/003-set_correct_runpath.patch | 11 | ||||
| -rw-r--r-- | debian/patches/006-fix_kfreebsd_build.patch | 79 | ||||
| -rw-r--r-- | debian/patches/007-use_native_dynamic_linker_on_kfreebsd.patch | 22 | ||||
| -rw-r--r-- | debian/patches/008-emacs-mode-key-literal-indent.patch | 19 | ||||
| -rw-r--r-- | debian/patches/011-__FreeBSD_kernel__.patch | 33 | ||||
| -rw-r--r-- | debian/patches/012-sigfillset_kFreeBSD.patch | 22 | ||||
| -rw-r--r-- | debian/patches/013-kFreeBSD-AI_MASK.patch | 9 | ||||
| -rw-r--r-- | debian/patches/014-dont_fail_test_with_missing_homedir.patch | 26 | ||||
| -rw-r--r-- | debian/patches/15-net-http-connection-close.patch | 164 | ||||
| -rw-r--r-- | debian/patches/series | 9 | 
11 files changed, 0 insertions, 419 deletions
| diff --git a/debian/patches/001-allow_IPv4_on_IPv6_sockets.patch b/debian/patches/001-allow_IPv4_on_IPv6_sockets.patch deleted file mode 100644 index b8571ab4a..000000000 --- a/debian/patches/001-allow_IPv4_on_IPv6_sockets.patch +++ /dev/null @@ -1,25 +0,0 @@ -# HG changeset patch -# User fw@deneb.enyo.de -# Date 1282471319 -7200 -# Node ID d68478aa6899b45b119c044ed8f819fe5cb8bd30 -# Parent  c6b2f56925705655af802e6093072b63bbf86486 -Allow IPv4 on IPv6 sockets - ---- a/src/pkg/net/sock.go -+++ b/src/pkg/net/sock.go -@@ -33,6 +33,15 @@ func socket(net string, f, t, p int, la, - 		return nil, err - 	} -  -+	// Allow IPv4 on IPv6 sockets. -+	if f == syscall.AF_INET6 { -+		err = syscall.SetsockoptInt(s, syscall.IPPROTO_IPV6, syscall.IPV6_V6ONLY, 0) -+		if err != nil { -+			closesocket(s) -+			return nil, err -+		} -+	} -+ - 	var bla syscall.Sockaddr - 	if la != nil { - 		bla, err = listenerSockaddr(s, f, la, toAddr) diff --git a/debian/patches/003-set_correct_runpath.patch b/debian/patches/003-set_correct_runpath.patch deleted file mode 100644 index 47219c4c6..000000000 --- a/debian/patches/003-set_correct_runpath.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/Make.cmd -+++ b/src/Make.cmd -@@ -17,7 +17,7 @@ include $(QUOTED_GOROOT)/src/Make.common - PREREQ+=$(patsubst %,%.make,$(DEPS)) -  - $(TARG): _go_.$O --	$(LD) $(LDIMPORTS) -o $@ _go_.$O -+	$(LD) $(LDIMPORTS) -o $@ -r $(QUOTED_GOROOT_FINAL)/pkg/$(GOOS)_$(GOARCH) _go_.$O -  - _go_.$O: $(GOFILES) $(PREREQ) - 	$(GC) $(GCFLAGS) $(GCIMPORTS) -o $@ $(GOFILES) diff --git a/debian/patches/006-fix_kfreebsd_build.patch b/debian/patches/006-fix_kfreebsd_build.patch deleted file mode 100644 index 981aa0613..000000000 --- a/debian/patches/006-fix_kfreebsd_build.patch +++ /dev/null @@ -1,79 +0,0 @@ ---- a/src/cmd/cov/Makefile -+++ b/src/cmd/cov/Makefile -@@ -20,11 +20,7 @@ HFILES=\ - NOINSTALL=1 - include ../../Make.ccmd -  --ifeq ($(GOOS),windows) --NAME=windows --else --NAME=$(shell uname | tr A-Z a-z) --endif -+NAME=$(GOOS) -  - install: install-$(NAME) - install-linux: install-default ---- a/src/cmd/prof/Makefile -+++ b/src/cmd/prof/Makefile -@@ -16,11 +16,7 @@ OFILES=\ - NOINSTALL=1 - include ../../Make.ccmd -  --ifeq ($(GOOS),windows) --NAME=windows --else --NAME=$(shell uname | tr A-Z a-z) --endif -+NAME=$(GOOS) -  - install: install-$(NAME) install-pprof - install-linux: install-default ---- a/src/pkg/syscall/mkerrors.sh -+++ b/src/pkg/syscall/mkerrors.sh -@@ -15,7 +15,7 @@ GCC=gcc -  - uname=$(uname) -  --includes_Darwin=' -+includes_darwin=' - #define _DARWIN_C_SOURCE - #define KERNEL - #define _DARWIN_USE_64_BIT_INODE -@@ -37,7 +37,7 @@ includes_Darwin=' - #include <termios.h> - ' -  --includes_FreeBSD=' -+includes_freebsd=' - #include <sys/types.h> - #include <sys/event.h> - #include <sys/socket.h> -@@ -55,7 +55,7 @@ includes_FreeBSD=' - #include <netinet/ip_mroute.h> - ' -  --includes_Linux=' -+includes_linux=' - #define _LARGEFILE_SOURCE - #define _LARGEFILE64_SOURCE - #define _FILE_OFFSET_BITS 64 -@@ -151,7 +151,7 @@ ccflags="$@" - 	echo package syscall - 	echo - 	echo '/*' --	indirect="includes_$(uname)" -+	indirect="includes_$(GOOS)" - 	echo "${!indirect} $includes" - 	echo '*/' - 	echo 'import "C"' ---- a/src/pkg/net/Makefile -+++ b/src/pkg/net/Makefile -@@ -82,7 +82,7 @@ GOFILES_freebsd=\ -  - ifeq ($(CGO_ENABLED),1) - CGOFILES_freebsd=\ --	cgo_bsd.go\ -+	cgo_linux.go\ - 	cgo_unix.go - else - GOFILES_freebsd+=cgo_stub.go diff --git a/debian/patches/007-use_native_dynamic_linker_on_kfreebsd.patch b/debian/patches/007-use_native_dynamic_linker_on_kfreebsd.patch deleted file mode 100644 index 04bf8b820..000000000 --- a/debian/patches/007-use_native_dynamic_linker_on_kfreebsd.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/src/cmd/8l/asm.c -+++ b/src/cmd/8l/asm.c -@@ -38,7 +38,7 @@ - #include	"../ld/pe.h" -  - char linuxdynld[] = "/lib/ld-linux.so.2"; --char freebsddynld[] = "/usr/libexec/ld-elf.so.1"; -+char freebsddynld[] = "/lib/ld.so.1"; - char openbsddynld[] = "/usr/libexec/ld.so"; - char netbsddynld[] = "/usr/libexec/ld.elf_so"; -  ---- a/src/cmd/6l/asm.c -+++ b/src/cmd/6l/asm.c -@@ -40,7 +40,7 @@ - #define PADDR(a)	((uint32)(a) & ~0x80000000) -  - char linuxdynld[] = "/lib64/ld-linux-x86-64.so.2"; --char freebsddynld[] = "/libexec/ld-elf.so.1"; -+char freebsddynld[] = "/lib/ld-kfreebsd-x86-64.so.1"; - char openbsddynld[] = "/usr/libexec/ld.so"; - char netbsddynld[] = "/libexec/ld.elf_so"; -  diff --git a/debian/patches/008-emacs-mode-key-literal-indent.patch b/debian/patches/008-emacs-mode-key-literal-indent.patch deleted file mode 100644 index 6f11ed7ac..000000000 --- a/debian/patches/008-emacs-mode-key-literal-indent.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/misc/emacs/go-mode.el -+++ b/misc/emacs/go-mode.el -@@ -7,7 +7,6 @@ - ;;; To do: -  - ;; * Indentation is *almost* identical to gofmt --;; ** We think struct literal keys are labels and outdent them - ;; ** We disagree on the indentation of function literals in arguments - ;; ** There are bugs with the close brace of struct literals - ;; * Highlight identifiers according to their syntactic context: type, -@@ -401,7 +400,7 @@ indented one level." -                 (setq first nil)))) -  -           ;; case, default, and labels are outdented 1 level --          (when (looking-at "\\<case\\>\\|\\<default\\>\\|\\w+\\s *:\\(\\S.\\|$\\)") -+          (when (looking-at "\\<case\\>\\|\\<default\\>\\|\\w+[:space:]*:[:space:]**$") -             (decf indent tab-width)) -  -           ;; Continuation lines are indented 1 level diff --git a/debian/patches/011-__FreeBSD_kernel__.patch b/debian/patches/011-__FreeBSD_kernel__.patch deleted file mode 100644 index 45be34f12..000000000 --- a/debian/patches/011-__FreeBSD_kernel__.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- a/include/u.h -+++ b/include/u.h -@@ -45,7 +45,7 @@ extern "C" { - #	define _XOPEN_SOURCE 1000 - #	define _XOPEN_SOURCE_EXTENDED 1 - #endif --#if defined(__FreeBSD__) -+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) - #	include <sys/cdefs.h> - 	/* for strtoll */ - #	undef __ISO_C_VISIBLE ---- a/src/cmd/dist/unix.c -+++ b/src/cmd/dist/unix.c -@@ -653,7 +653,7 @@ main(int argc, char **argv) - 		gohostarch = "amd64"; - #elif defined(__linux__) - 	gohostos = "linux"; --#elif defined(__FreeBSD__) -+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) - 	gohostos = "freebsd"; - #elif defined(__OpenBSD__) - 	gohostos = "openbsd"; ---- a/src/lib9/dirfwstat.c -+++ b/src/lib9/dirfwstat.c -@@ -29,7 +29,7 @@ THE SOFTWARE. - #include <sys/time.h> - #include <sys/stat.h> -  --#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__linux__) -+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__linux__) - /* do nothing -- futimes exists and is fine */ -  - #elif defined(__SunOS5_9__) diff --git a/debian/patches/012-sigfillset_kFreeBSD.patch b/debian/patches/012-sigfillset_kFreeBSD.patch deleted file mode 100644 index 40f01fb42..000000000 --- a/debian/patches/012-sigfillset_kFreeBSD.patch +++ /dev/null @@ -1,22 +0,0 @@ ---- a/src/pkg/runtime/cgo/gcc_freebsd_386.c -+++ b/src/pkg/runtime/cgo/gcc_freebsd_386.c -@@ -33,7 +33,7 @@ libcgo_sys_thread_start(ThreadStart *ts) - 	size_t size; - 	int err; -  --	SIGFILLSET(ign); -+	sigfillset(&ign); - 	sigprocmask(SIG_SETMASK, &ign, &oset); -  - 	pthread_attr_init(&attr); ---- a/src/pkg/runtime/cgo/gcc_freebsd_amd64.c -+++ b/src/pkg/runtime/cgo/gcc_freebsd_amd64.c -@@ -33,7 +33,7 @@ libcgo_sys_thread_start(ThreadStart *ts) - 	size_t size; - 	int err; -  --	SIGFILLSET(ign); -+	sigfillset(&ign); - 	sigprocmask(SIG_SETMASK, &ign, &oset); -  - 	pthread_attr_init(&attr); diff --git a/debian/patches/013-kFreeBSD-AI_MASK.patch b/debian/patches/013-kFreeBSD-AI_MASK.patch deleted file mode 100644 index e67a34058..000000000 --- a/debian/patches/013-kFreeBSD-AI_MASK.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/src/pkg/net/cgo_bsd.go -+++ b/src/pkg/net/cgo_bsd.go -@@ -12,5 +12,5 @@ package net - import "C" -  - func cgoAddrInfoMask() C.int { --	return C.AI_MASK -+	return C.AI_CANONNAME | C.AI_V4MAPPED | C.AI_ALL - } diff --git a/debian/patches/014-dont_fail_test_with_missing_homedir.patch b/debian/patches/014-dont_fail_test_with_missing_homedir.patch deleted file mode 100644 index ac81dd199..000000000 --- a/debian/patches/014-dont_fail_test_with_missing_homedir.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/src/pkg/os/user/user_test.go -+++ b/src/pkg/os/user/user_test.go -@@ -5,7 +5,6 @@ - package user -  - import ( --	"os" - 	"runtime" - 	"testing" - ) -@@ -34,12 +33,11 @@ func TestCurrent(t *testing.T) { - 	if err != nil { - 		t.Fatalf("Current: %v", err) - 	} --	fi, err := os.Stat(u.HomeDir) --	if err != nil || !fi.IsDir() { --		t.Errorf("expected a valid HomeDir; stat(%q): err=%v", u.HomeDir, err) -+	if u.HomeDir == "" { -+		t.Errorf("didn't get a HomeDir") - 	} - 	if u.Username == "" { --		t.Fatalf("didn't get a username") -+		t.Errorf("didn't get a username") - 	} - } -  diff --git a/debian/patches/15-net-http-connection-close.patch b/debian/patches/15-net-http-connection-close.patch deleted file mode 100644 index 847a9f9bc..000000000 --- a/debian/patches/15-net-http-connection-close.patch +++ /dev/null @@ -1,164 +0,0 @@ -Description: net/http: non-keepalive connections close successfully - Connections did not close if Request.Close or Response.Close was true. This - meant that if the user wanted the connection to close, or if the server - requested it via "Connection: close", the connection would not be closed. -Author: James Gray <james@james4k.com> -Bug-Debian: http://bugs.debian.org/683421 -Origin: upstream, http://code.google.com/p/go/source/detail?r=820ffde8c396 -Forwarded: not-needed -Last-Update: 2012-08-01 - ---- - ---- golang-1.0.2.orig/src/pkg/net/http/transport.go -+++ golang-1.0.2/src/pkg/net/http/transport.go -@@ -603,6 +603,10 @@ func (pc *persistConn) readLoop() { - 		// before we race and peek on the underlying bufio reader. - 		if waitForBodyRead != nil { - 			<-waitForBodyRead -+		} else if !alive { -+			// If waitForBodyRead is nil, and we're not alive, we -+			// must close the connection before we leave the loop. -+			pc.close() - 		} - 	} - } ---- golang-1.0.2.orig/src/pkg/net/http/transport_test.go -+++ golang-1.0.2/src/pkg/net/http/transport_test.go -@@ -13,6 +13,7 @@ import ( - 	"fmt" - 	"io" - 	"io/ioutil" -+	"net" - 	. "net/http" - 	"net/http/httptest" - 	"net/url" -@@ -20,6 +21,7 @@ import ( - 	"runtime" - 	"strconv" - 	"strings" -+	"sync" - 	"testing" - 	"time" - ) -@@ -35,6 +37,64 @@ var hostPortHandler = HandlerFunc(func(w - 	w.Write([]byte(r.RemoteAddr)) - }) -  -+type testCloseConn struct { -+	net.Conn -+	set *testConnSet -+} -+ -+func (conn *testCloseConn) Close() error { -+	conn.set.remove(conn) -+	return conn.Conn.Close() -+} -+ -+type testConnSet struct { -+	set   map[net.Conn]bool -+	mutex sync.Mutex -+} -+ -+func (tcs *testConnSet) insert(c net.Conn) { -+	tcs.mutex.Lock() -+	defer tcs.mutex.Unlock() -+	tcs.set[c] = true -+} -+ -+func (tcs *testConnSet) remove(c net.Conn) { -+	tcs.mutex.Lock() -+	defer tcs.mutex.Unlock() -+	// just change to false, so we have a full set of opened connections -+	tcs.set[c] = false -+} -+ -+// some tests use this to manage raw tcp connections for later inspection -+func makeTestDial() (*testConnSet, func(n, addr string) (net.Conn, error)) { -+	connSet := &testConnSet{ -+		set: make(map[net.Conn]bool), -+	} -+	dial := func(n, addr string) (net.Conn, error) { -+		c, err := net.Dial(n, addr) -+		if err != nil { -+			return nil, err -+		} -+		tc := &testCloseConn{c, connSet} -+		connSet.insert(tc) -+		return tc, nil -+	} -+	return connSet, dial -+} -+ -+func (tcs *testConnSet) countClosed() (closed, total int) { -+	tcs.mutex.Lock() -+	defer tcs.mutex.Unlock() -+ -+	total = len(tcs.set) -+	for _, open := range tcs.set { -+		if !open { -+			closed += 1 -+		} -+	} -+	return -+} -+ - // Two subsequent requests and verify their response is the same. - // The response from the server is our own IP:port - func TestTransportKeepAlives(t *testing.T) { -@@ -72,8 +132,12 @@ func TestTransportConnectionCloseOnRespo - 	ts := httptest.NewServer(hostPortHandler) - 	defer ts.Close() -  -+	connSet, testDial := makeTestDial() -+ - 	for _, connectionClose := range []bool{false, true} { --		tr := &Transport{} -+		tr := &Transport{ -+			Dial: testDial, -+		} - 		c := &Client{Transport: tr} -  - 		fetch := func(n int) string { -@@ -107,6 +171,13 @@ func TestTransportConnectionCloseOnRespo - 			t.Errorf("error in connectionClose=%v. unexpected bodiesDiffer=%v; body1=%q; body2=%q", - 				connectionClose, bodiesDiffer, body1, body2) - 		} -+ -+		tr.CloseIdleConnections() -+	} -+ -+	closed, total := connSet.countClosed() -+	if closed < total { -+		t.Errorf("%d out of %d tcp connections were not closed", total-closed, total) - 	} - } -  -@@ -114,8 +185,12 @@ func TestTransportConnectionCloseOnReque - 	ts := httptest.NewServer(hostPortHandler) - 	defer ts.Close() -  -+	connSet, testDial := makeTestDial() -+ - 	for _, connectionClose := range []bool{false, true} { --		tr := &Transport{} -+		tr := &Transport{ -+			Dial: testDial, -+		} - 		c := &Client{Transport: tr} -  - 		fetch := func(n int) string { -@@ -149,6 +224,13 @@ func TestTransportConnectionCloseOnReque - 			t.Errorf("error in connectionClose=%v. unexpected bodiesDiffer=%v; body1=%q; body2=%q", - 				connectionClose, bodiesDiffer, body1, body2) - 		} -+ -+		tr.CloseIdleConnections() -+	} -+ -+	closed, total := connSet.countClosed() -+	if closed < total { -+		t.Errorf("%d out of %d tcp connections were not closed", total-closed, total) - 	} - } -  diff --git a/debian/patches/series b/debian/patches/series index f8377bd57..1e30fe0be 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,10 +1 @@ -# commented out because i don’t precisely know what it’s for: -# 001-allow_IPv4_on_IPv6_sockets.patch -# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574371#46 -#003-set_correct_runpath.patch -#006-fix_kfreebsd_build.patch -#007-use_native_dynamic_linker_on_kfreebsd.patch -#011-__FreeBSD_kernel__.patch -#012-sigfillset_kFreeBSD.patch -#013-kFreeBSD-AI_MASK.patch  godoc-symlinks.diff | 
