From fdbe4a5d502467ae68cf97929d3f9d1c7bdaf15f Mon Sep 17 00:00:00 2001 From: Christopher Schmitt Date: Fri, 27 Oct 2017 08:55:28 -0600 Subject: [PATCH] Add support for Go 1.9.2 --- docker/Dockerfile.build.ubuntu | 19 ++++---- docker/files/go-wrapper | 87 ---------------------------------- 2 files changed, 9 insertions(+), 97 deletions(-) delete mode 100755 docker/files/go-wrapper diff --git a/docker/Dockerfile.build.ubuntu b/docker/Dockerfile.build.ubuntu index cddc48f..ea1a71a 100755 --- a/docker/Dockerfile.build.ubuntu +++ b/docker/Dockerfile.build.ubuntu @@ -21,20 +21,21 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ ocl-icd-opencl-dev \ && rm -rf /var/lib/apt/lists/* -ENV GOLANG_VERSION 1.9 +ENV GOLANG_VERSION 1.9.2 +# There is no golang ubuntu image for ubuntu:xenial :( https://github.com/docker-library/golang RUN set -eux; \ \ # this "case" statement is generated via "update.sh" dpkgArch="$(dpkg --print-architecture)"; \ case "${dpkgArch##*-}" in \ - amd64) goRelArch='linux-amd64'; goRelSha256='d70eadefce8e160638a9a6db97f7192d8463069ab33138893ad3bf31b0650a79' ;; \ - armhf) goRelArch='linux-armv6l'; goRelSha256='f52ca5933f7a8de2daf7a3172b0406353622c6a39e67dd08bbbeb84c6496f487' ;; \ - arm64) goRelArch='linux-arm64'; goRelSha256='0958dcf454f7f26d7acc1a4ddc34220d499df845bc2051c14ff8efdf1e3c29a6' ;; \ - i386) goRelArch='linux-386'; goRelSha256='7cccff99dacf59162cd67f5b11070d667691397fd421b0a9ad287da019debc4f' ;; \ - ppc64el) goRelArch='linux-ppc64le'; goRelSha256='10b66dae326b32a56d4c295747df564616ec46ed0079553e88e39d4f1b2ae985' ;; \ - s390x) goRelArch='linux-s390x'; goRelSha256='e06231e4918528e2eba1d3cff9bc4310b777971e5d8985f9772c6018694a3af8' ;; \ - *) goRelArch='src'; goRelSha256='a4ab229028ed167ba1986825751463605264e44868362ca8e7accc8be057e993'; \ + amd64) goRelArch='linux-amd64'; goRelSha256='de874549d9a8d8d8062be05808509c09a88a248e77ec14eb77453530829ac02b' ;; \ + armhf) goRelArch='linux-armv6l'; goRelSha256='8a6758c8d390e28ef2bcea511f62dcb43056f38c1addc06a8bc996741987e7bb' ;; \ + arm64) goRelArch='linux-arm64'; goRelSha256='0016ac65ad8340c84f51bc11dbb24ee8265b0a4597dbfdf8d91776fc187456fa' ;; \ + i386) goRelArch='linux-386'; goRelSha256='574b2c4b1a248e58ef7d1f825beda15429610a2316d9cbd3096d8d3fa8c0bc1a' ;; \ + ppc64el) goRelArch='linux-ppc64le'; goRelSha256='adb440b2b6ae9e448c253a20836d8e8aa4236f731d87717d9c7b241998dc7f9d' ;; \ + s390x) goRelArch='linux-s390x'; goRelSha256='a7137b4fbdec126823a12a4b696eeee2f04ec616e9fb8a54654c51d5884c1345' ;; \ + *) goRelArch='src'; goRelSha256='665f184bf8ac89986cfd5a4460736976f60b57df6b320ad71ad4cef53bb143dc'; \ echo >&2; echo >&2 "warning: current architecture ($dpkgArch) does not have a corresponding Go binary release; will be building from source"; echo >&2 ;; \ esac; \ \ @@ -70,8 +71,6 @@ ENV LD_LIBRARY_PATH /usr/local/nvidia/lib:/usr/local/nvidia/lib64 ENV GOPATH /go ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH -COPY files/go-wrapper /usr/local/bin/ - COPY external/hashcat/deps/OpenCL-Headers/CL /usr/local/include/CL COPY external/hashcat/include /usr/local/include/hashcat COPY dist/hashcat/lib/libhashcat.so /usr/local/lib/ diff --git a/docker/files/go-wrapper b/docker/files/go-wrapper deleted file mode 100755 index abe0537..0000000 --- a/docker/files/go-wrapper +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/sh -set -e - -usage() { - base="$(basename "$0")" - cat <&2 - exit 1 -fi -# "shift" so that "$@" becomes the remaining arguments and can be passed along to other "go" subcommands easily -cmd="$1" -shift - -goDir="$(go list -e -f '{{.ImportComment}}' 2>/dev/null || true)" - -if [ -z "$goDir" -a -s .godir ]; then - goDir="$(cat .godir)" -fi - -dir="$(pwd -P)" -if [ "$goDir" ]; then - goPath="${GOPATH%%:*}" # this just grabs the first path listed in GOPATH, if there are multiple (which is the detection logic "go get" itself uses, too) - goDirPath="$goPath/src/$goDir" - mkdir -p "$(dirname "$goDirPath")" - if [ ! -e "$goDirPath" ]; then - ln -sfv "$dir" "$goDirPath" - elif [ ! -L "$goDirPath" ]; then - echo >&2 "error: $goDirPath already exists but is unexpectedly not a symlink!" - exit 1 - fi - goBin="$goPath/bin/$(basename "$goDir")" -else - goBin="$(basename "$dir")" # likely "app" -fi - -case "$cmd" in - download) - set -- go get -v -d "$@" - if [ "$goDir" ]; then set -- "$@" "$goDir"; fi - set -x; exec "$@" - ;; - - install) - set -- go install -v "$@" - if [ "$goDir" ]; then set -- "$@" "$goDir"; fi - set -x; exec "$@" - ;; - - run) - set -x; exec "$goBin" "$@" - ;; - - *) - echo >&2 'error: unknown command:' "$cmd" - usage >&2 - exit 1 - ;; -esac \ No newline at end of file