Subject: [alpine-aports] [PATCH v2] community/go: upgrade to 1.8

From: Keegan Carruthers-Smith <[email-masked]>
Date: Sun, 19 Mar 2017 22:19:12 +0200

---
Changes v1 -> v2:
 - Removed default-buildmode-pie.patch since `abuild -r` fails with it applied.
 - reset pkgrel back to 0

 community/go/APKBUILD                    | 12 +++++-------
 community/go/default-buildmode-pie.patch | 12 ------------
 2 files changed, 5 insertions(+), 19 deletions(-)
 delete mode 100644 community/go/default-buildmode-pie.patch

diff --git a/community/go/APKBUILD b/community/go/APKBUILD
index afdaa0cbc5..601942e61a 100644
--- a/community/go/APKBUILD
+++ b/community/go/APKBUILD
@@ -1,10 +1,10 @@
 # Contributor: Sören Tempel <[email-masked]>
 # Maintainer: Eivind Uggedal <[email-masked]>
 pkgname=go
-pkgver=1.7.4
+pkgver=1.8
 # This should be the latest commit on the corresponding release branch
-_toolsver="26c35b4dcf6dfcb924e26828ed9f4d028c5ce05a"
-pkgrel=2
+_toolsver="5682db0e919ed9cfc6f52ac32e170511a106eb3b"
+pkgrel=0
 pkgdesc="Go programming language compiler"
 url="http://www.golang.org/"
 arch="all"
@@ -18,7 +18,6 @@ install=""
 subpackages="$pkgname-doc"
 source="http://golang.org/dl/go${pkgver/_/}.src.tar.gz
 	go-tools-${pkgver/_/}.tar.gz::https://github.com/golang/tools/archive/${_toolsver}.tar.gz
-	default-buildmode-pie.patch
 	"
 
 # NOTE: building go for x86 with grsec kernel requires:
@@ -164,6 +163,5 @@ _crosspkg() {
 		"$subpkgdir"/usr/lib/go/pkg/ || return 1
 }
 
-sha512sums="dc9950c3ea7100e536ad58fd93505d584276b7c50d4b8fe2ba7f20fd043dcf0d315b735c48945302055e91517594cc2b0061ccec9478a8ab48f1f2836c20afb3  go1.7.4.src.tar.gz
-553be713d03f1a53605c41f67822c75d86dacf9ccba9f2329e111b4178287aee1ddccd3ccc4ab76b9dbcff34f11aeddebce5deac47e715ea75d032bc9ab0355c  go-tools-1.7.4.tar.gz
-13cd386c38875b951da4057586007f3c67503dc79ddf57befbf763af85ec2cd2a2e6b00614450c179c93f1f8747ee7456ee412adccd08a5f115b33812598a148  default-buildmode-pie.patch"
+sha512sums="343fca47f250278b22df1c1cd92cce91e01009043d05d8ccce095e4386fa0f5ca8ccaa58232635332c7288ceca9d2a240f774f8bb3b08129a681a582cba60248  go-tools-1.8.tar.gz
+9742dd8ec0364793e44a55207238c7339236a4da3a6e7cbb3b4eca45e957c7c0cb725e7d7430b9a04630285468d32dac686facfc57f3f58885b80bbb3d333ada  go1.8.src.tar.gz"
diff --git a/community/go/default-buildmode-pie.patch b/community/go/default-buildmode-pie.patch
deleted file mode 100644
index 034692a098..0000000000
--- a/community/go/default-buildmode-pie.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- go/src/cmd/go/build.go.orig	2016-07-07 11:52:03.315793199 +0300
-+++ go/src/cmd/go/build.go	2016-04-20 02:50:07.000000000 +0300
-@@ -363,7 +363,8 @@
- 		ldBuildmode = "c-shared"
- 	case "default":
- 		switch platform {
-+		case "linux/386", "linux/amd64", "linux/arm", "linux/arm64", "linux/ppc64le",
-+			"android/amd64", "android/arm", "android/arm64", "android/386":
--		case "android/arm", "android/arm64", "android/amd64", "android/386":
- 			codegenArg = "-shared"
- 			ldBuildmode = "pie"
- 		default:
-- 
2.11.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Timo Teras <[email-masked]>
Date: Fri, 28 Apr 2017 09:05:18 +0300

On Sun, 19 Mar 2017 22:19:12 +0200

>  - Removed default-buildmode-pie.patch since `abuild -r` fails with

Thanks for the effort. And sorry for the latency.

But removing the PIE patch is not acceptable. It is alpine policy to
ship PIE builds where possible.

We asked how to do it properly on golang-nuts lists.

There is also https://github.com/alpinelinux/aports/pull/983 active.
We'll try to have the Go upgrade related discussion in it.

/Timo

---