From 5d2c2fd78637502a7f5769db7013ef42ee7a5d27 Mon Sep 17 00:00:00 2001 From: Ivan Markin Date: Sat, 17 Mar 2018 22:36:13 +0000 Subject: [PATCH 1/3] Remove obsolete no-pic.patch from alpine images --- 1.10/alpine3.7/no-pic.patch | 16 ---------------- 1.9/alpine3.6/no-pic.patch | 16 ---------------- 1.9/alpine3.7/no-pic.patch | 16 ---------------- 3 files changed, 48 deletions(-) delete mode 100644 1.10/alpine3.7/no-pic.patch delete mode 100644 1.9/alpine3.6/no-pic.patch delete mode 100644 1.9/alpine3.7/no-pic.patch diff --git a/1.10/alpine3.7/no-pic.patch b/1.10/alpine3.7/no-pic.patch deleted file mode 100644 index 2a1d215b..00000000 --- a/1.10/alpine3.7/no-pic.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go -index 6252871..94ef43c 100644 ---- a/src/cmd/link/internal/ld/lib.go -+++ b/src/cmd/link/internal/ld/lib.go -@@ -1293,6 +1293,11 @@ func (l *Link) hostlink() { - argv = append(argv, peimporteddlls()...) - } - -+ // The Go linker does not currently support building PIE -+ // executables when using the external linker. See: -+ // https://github.com/golang/go/issues/6940 -+ argv = append(argv, "-fno-PIC") -+ - if ctxt.Debugvlog != 0 { - ctxt.Logf("%5.2f host link:", Cputime()) - for _, v := range argv { diff --git a/1.9/alpine3.6/no-pic.patch b/1.9/alpine3.6/no-pic.patch deleted file mode 100644 index 4e81cd92..00000000 --- a/1.9/alpine3.6/no-pic.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go -index 6252871..94ef43c 100644 ---- a/src/cmd/link/internal/ld/lib.go -+++ b/src/cmd/link/internal/ld/lib.go -@@ -1293,6 +1293,11 @@ func (l *Link) hostlink() { - argv = append(argv, peimporteddlls()...) - } - -+ // The Go linker does not currently support building PIE -+ // executables when using the external linker. See: -+ // https://github.com/golang/go/issues/6940 -+ argv = append(argv, "-fno-PIC") -+ - if l.Debugvlog != 0 { - l.Logf("%5.2f host link:", Cputime()) - for _, v := range argv { diff --git a/1.9/alpine3.7/no-pic.patch b/1.9/alpine3.7/no-pic.patch deleted file mode 100644 index 4e81cd92..00000000 --- a/1.9/alpine3.7/no-pic.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/src/cmd/link/internal/ld/lib.go b/src/cmd/link/internal/ld/lib.go -index 6252871..94ef43c 100644 ---- a/src/cmd/link/internal/ld/lib.go -+++ b/src/cmd/link/internal/ld/lib.go -@@ -1293,6 +1293,11 @@ func (l *Link) hostlink() { - argv = append(argv, peimporteddlls()...) - } - -+ // The Go linker does not currently support building PIE -+ // executables when using the external linker. See: -+ // https://github.com/golang/go/issues/6940 -+ argv = append(argv, "-fno-PIC") -+ - if l.Debugvlog != 0 { - l.Logf("%5.2f host link:", Cputime()) - for _, v := range argv { From 55fafc610efe9d3a9e70f994b41fd54b26ef10dc Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 9 Apr 2018 10:41:40 -0700 Subject: [PATCH 2/3] Update 1.10 Dockerfile so build works --- 1.10/alpine3.7/Dockerfile | 2 +- update.sh | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/1.10/alpine3.7/Dockerfile b/1.10/alpine3.7/Dockerfile index 5ebd7718..713cde60 100644 --- a/1.10/alpine3.7/Dockerfile +++ b/1.10/alpine3.7/Dockerfile @@ -5,7 +5,7 @@ RUN apk add --no-cache ca-certificates ENV GOLANG_VERSION 1.10.1 # no-pic.patch: https://golang.org/issue/14851 (Go 1.8 & 1.7) -COPY *.patch /go-alpine-patches/ +#COPY *.patch /go-alpine-patches/ RUN set -eux; \ apk add --no-cache --virtual .build-deps \ diff --git a/update.sh b/update.sh index 4c5b158c..845b34b3 100755 --- a/update.sh +++ b/update.sh @@ -112,6 +112,14 @@ for version in "${versions[@]}"; do ;; esac + ( + shopt -s nullglob + variantPatches=( "$version/$variant/"*.patch ) + if [ "${#variantPatches[@]}" -eq 0 ]; then + sed -ri 's/^COPY.*patch/#&/' "$version/$variant/Dockerfile" + fi + ) + travisEnv='\n - VERSION='"$version VARIANT=$variant$travisEnv" fi done From 8dca7d74ac8797db0525fd4efa4c59fc3c0c5675 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 9 Apr 2018 10:43:52 -0700 Subject: [PATCH 3/3] Update patch comment --- 1.10/alpine3.7/Dockerfile | 2 +- 1.9/alpine3.6/Dockerfile | 2 +- 1.9/alpine3.7/Dockerfile | 2 +- Dockerfile-alpine.template | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/1.10/alpine3.7/Dockerfile b/1.10/alpine3.7/Dockerfile index 713cde60..d20a917f 100644 --- a/1.10/alpine3.7/Dockerfile +++ b/1.10/alpine3.7/Dockerfile @@ -4,7 +4,7 @@ RUN apk add --no-cache ca-certificates ENV GOLANG_VERSION 1.10.1 -# no-pic.patch: https://golang.org/issue/14851 (Go 1.8 & 1.7) +# make-sure-R0-is-zero-before-main-on-ppc64le.patch: https://github.com/golang/go/commit/9aea0e89b6df032c29d0add8d69ba2c95f1106d9 (Go 1.9) #COPY *.patch /go-alpine-patches/ RUN set -eux; \ diff --git a/1.9/alpine3.6/Dockerfile b/1.9/alpine3.6/Dockerfile index a109df64..b1354654 100644 --- a/1.9/alpine3.6/Dockerfile +++ b/1.9/alpine3.6/Dockerfile @@ -4,7 +4,7 @@ RUN apk add --no-cache ca-certificates ENV GOLANG_VERSION 1.9.5 -# no-pic.patch: https://golang.org/issue/14851 (Go 1.8 & 1.7) +# make-sure-R0-is-zero-before-main-on-ppc64le.patch: https://github.com/golang/go/commit/9aea0e89b6df032c29d0add8d69ba2c95f1106d9 (Go 1.9) COPY *.patch /go-alpine-patches/ RUN set -eux; \ diff --git a/1.9/alpine3.7/Dockerfile b/1.9/alpine3.7/Dockerfile index 66a72618..ac87051a 100644 --- a/1.9/alpine3.7/Dockerfile +++ b/1.9/alpine3.7/Dockerfile @@ -4,7 +4,7 @@ RUN apk add --no-cache ca-certificates ENV GOLANG_VERSION 1.9.5 -# no-pic.patch: https://golang.org/issue/14851 (Go 1.8 & 1.7) +# make-sure-R0-is-zero-before-main-on-ppc64le.patch: https://github.com/golang/go/commit/9aea0e89b6df032c29d0add8d69ba2c95f1106d9 (Go 1.9) COPY *.patch /go-alpine-patches/ RUN set -eux; \ diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index c7fc9bff..e9f7b72f 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -4,7 +4,7 @@ RUN apk add --no-cache ca-certificates ENV GOLANG_VERSION %%VERSION%% -# no-pic.patch: https://golang.org/issue/14851 (Go 1.8 & 1.7) +# make-sure-R0-is-zero-before-main-on-ppc64le.patch: https://github.com/golang/go/commit/9aea0e89b6df032c29d0add8d69ba2c95f1106d9 (Go 1.9) COPY *.patch /go-alpine-patches/ RUN set -eux; \