From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45777) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2Tav-0004ec-KR for guix-patches@gnu.org; Tue, 18 Sep 2018 23:56:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g2Tas-0000Wg-BO for guix-patches@gnu.org; Tue, 18 Sep 2018 23:56:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:40735) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g2Tas-0000WS-7E for guix-patches@gnu.org; Tue, 18 Sep 2018 23:56:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1g2Tas-0000Dp-2B for guix-patches@gnu.org; Tue, 18 Sep 2018 23:56:02 -0400 Subject: [bug#32768] [PATCH] gnu: go-1.11: Add New Version Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58175) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g2Sbz-0003aD-FV for guix-patches@gnu.org; Tue, 18 Sep 2018 22:53:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g2Sbv-00086m-IW for guix-patches@gnu.org; Tue, 18 Sep 2018 22:53:07 -0400 Received: from mail-io1-xd2d.google.com ([2607:f8b0:4864:20::d2d]:40146) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g2Sbv-000849-Bd for guix-patches@gnu.org; Tue, 18 Sep 2018 22:53:03 -0400 Received: by mail-io1-xd2d.google.com with SMTP id l14-v6so3272767iob.7 for ; Tue, 18 Sep 2018 19:53:02 -0700 (PDT) Received: from gazelle-pro (172-221-246-205.dhcp.chtrptr.net. [172.221.246.205]) by smtp.gmail.com with ESMTPSA id m123-v6sm5409407itg.29.2018.09.18.19.52.59 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Sep 2018 19:52:59 -0700 (PDT) From: Katherine Cox-Buday Date: Tue, 18 Sep 2018 21:52:58 -0500 Message-ID: <877ejinqph.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 32768@debbugs.gnu.org --- gnu/packages/golang.scm | 128 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index b4a088a05..be404cc16 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -12,6 +12,7 @@ ;;; Copyright =C2=A9 2018 Tom=C3=A1=C5=A1 =C4=8Cech ;;; Copyright =C2=A9 2018 Pierre-Antoine Rouby ;;; Copyright =C2=A9 2018 Pierre Neidhardt +;;; Copyright @ 2018 Katherine Cox-Buday ;;; ;;; This file is part of GNU Guix. ;;; @@ -499,6 +500,133 @@ in the style of communicating sequential processes (@= dfn{CSP}).") (setenv "HOME" "/tmp") #t))))))))) =20 +(define-public go-1.11 + (package + (inherit go-1.10) + (name "go") + (version "1.11") + (source + (origin + (method url-fetch) + (uri (string-append "https://storage.googleapis.com/golang/" + name version ".src.tar.gz")) + (sha256 + (base32 + "1ysj04jzds6xa8kdflkdsgyv3mg9fdn90zdf78g4g6p4bwpy3hdg")))) + (arguments + (substitute-keyword-arguments (package-arguments go-1.10) + ((#:phases phases) + `(modify-phases ,phases + (replace 'prebuild + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") = "/lib")) + (ld (string-append (assoc-ref inputs "libc") "/lib")) + (loader (car (find-files ld "^ld-linux.+"))) + (net-base (assoc-ref inputs "net-base")) + (tzdata-path + (string-append (assoc-ref inputs "tzdata") "/share/= zoneinfo")) + (output (assoc-ref outputs "out"))) + + (for-each delete-file + ;; Removing net/ tests, which fail when attempt= ing to access + ;; network resources not present in the build c= ontainer. + '("net/listen_test.go" + "net/parse_test.go" + "net/cgo_unix_test.go" + ;; A side affect of these test scripts is tes= ting + ;; cgo. Attempts at using cgo flags and + ;; directives with these scripts as specified + ;; here (https://golang.org/cmd/cgo/) have not + ;; worked. The tests continue to state that t= hey + ;; can not find crt1.o despite being present. + "cmd/go/testdata/script/list_compiled_imports= .txt" + "cmd/go/testdata/script/mod_case_cgo.txt" + ;; https://github.com/golang/go/issues/24884 + "os/user/user_test.go")) + + (substitute* "os/os_test.go" + (("/usr/bin") (getcwd)) + (("/bin/pwd") (which "pwd")) + (("/bin/sh") (which "sh"))) + + (substitute* "cmd/vendor/golang.org/x/sys/unix/syscall_un= ix_test.go" + (("/usr/bin") "/tmp")) + + ;; Add libgcc to runpath + (substitute* "cmd/link/internal/ld/lib.go" + (("!rpath.set") "true")) + (substitute* "cmd/go/internal/work/gccgo.go" + (("cgoldflags :=3D \\[\\]string\\{\\}") + (string-append "cgoldflags :=3D []string{" + "\"-rpath=3D" gcclib "\"" + "}")) + (("\"-lgcc_s\", ") + (string-append + "\"-Wl,-rpath=3D" gcclib "\", \"-lgcc_s\", "))) + (substitute* "cmd/go/internal/work/gc.go" + (("ldflags =3D setextld\\(ldflags, compiler\\)") + (string-append + "ldflags =3D setextld(ldflags, compiler)\n" + "ldflags =3D append(ldflags, \"-r\")\n" + "ldflags =3D append(ldflags, \"" gcclib "\")\n"))) + + ;; Disable failing tests: these tests attempt to access + ;; commands or network resources which are neither availa= ble + ;; nor necessary for the build to succeed. + (for-each + (match-lambda + ((file regex) + (substitute* file + ((regex all before test_name) + (string-append before "Disabled" test_name))))) + '(("net/net_test.go" "(.+)(TestShutdownUnix.+)") + ("net/dial_test.go" "(.+)(TestDialTimeout.+)") + ("os/os_test.go" "(.+)(TestHostname.+)") + ("time/format_test.go" "(.+)(TestParseInSydney.+)") + ("time/format_test.go" "(.+)(TestParseInLocation.+)") + ("os/exec/exec_test.go" "(.+)(TestEcho.+)") + ("os/exec/exec_test.go" "(.+)(TestCommandRelativeName.= +)") + ("os/exec/exec_test.go" "(.+)(TestCatStdin.+)") + ("os/exec/exec_test.go" "(.+)(TestCatGoodAndBadFile.+)= ") + ("os/exec/exec_test.go" "(.+)(TestExitStatus.+)") + ("os/exec/exec_test.go" "(.+)(TestPipes.+)") + ("os/exec/exec_test.go" "(.+)(TestStdinClose.+)") + ("os/exec/exec_test.go" "(.+)(TestIgnorePipeErrorOnSuc= cess.+)") + ("syscall/syscall_unix_test.go" "(.+)(TestPassFD\\(.+)= ") + ("os/exec/exec_test.go" "(.+)(TestExtraFiles/areturn.+= )") + ("cmd/go/go_test.go" "(.+)(TestCoverageWithCgo.+)") + ("cmd/go/go_test.go" "(.+)(TestTwoPkgConfigs.+)") + ("os/exec/exec_test.go" "(.+)(TestOutputStderrCapture.= +)") + ("os/exec/exec_test.go" "(.+)(TestExtraFiles.+)") + ("os/exec/exec_test.go" "(.+)(TestExtraFilesRace.+)") + ("net/lookup_test.go" "(.+)(TestLookupPort.+)") + ("syscall/exec_linux_test.go" + "(.+)(TestCloneNEWUSERAndRemapNoRootDisableSetgroups.= +)"))) + + ;; fix shebang for testar script + ;; note the target script is generated at build time. + (substitute* "../misc/cgo/testcarchive/carchive_test.go" + (("#!/usr/bin/env") (string-append "#!" (which "env")))) + + (substitute* "net/lookup_unix.go" + (("/etc/protocols") (string-append net-base "/etc/proto= cols"))) + (substitute* "net/port_unix.go" + (("/etc/services") (string-append net-base "/etc/servic= es"))) + (substitute* "time/zoneinfo_unix.go" + (("/usr/share/zoneinfo/") tzdata-path)) + (substitute* (find-files "cmd" "\\.go") + (("/lib(64)?/ld-linux.*\\.so\\.[0-9]") loader)) + #t))) + (replace 'set-bootstrap-variables + (lambda* (#:key outputs inputs #:allow-other-keys) + ;; Tell the build system where to find the bootstrap Go. + (let ((go (assoc-ref inputs "go"))) + (setenv "GOROOT_BOOTSTRAP" go) + (setenv "GOGC" "400") + ;; Go 1.10 tries to write to $HOME in a test + (setenv "HOME" "/tmp") + #t))))))))) + (define-public go go-1.9) =20 (define-public go-github-com-alsm-ioprogress --=20 2.17.1