GNU bug report logs - #34280
[PATCH] gnu: Remove Go 1.9.

Previous Next

Package: guix-patches;

Reported by: Leo Famulari <leo <at> famulari.name>

Date: Fri, 1 Feb 2019 16:40:02 UTC

Severity: normal

Tags: patch

Done: "Alex Griffin" <a <at> ajgrf.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34280 in the body.
You can then email your comments to 34280 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#34280; Package guix-patches. (Fri, 01 Feb 2019 16:40:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo Famulari <leo <at> famulari.name>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 01 Feb 2019 16:40:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Remove Go 1.9.
Date: Fri,  1 Feb 2019 17:39:17 +0100
We can wait to push this patch until there is another reason to change
the Go compiler, but I am submitting it now in case anyone else is
working on Go in Guix.

* gnu/packages/golang.scm (go-1.9): Remove variable.
(go-1.11): Inherit from go-1.4 and consolidate the inherited build
phases from go-1.9.

Go 1.11 should be essentially unchanged with this commit, although the
derivation is different.
---
 gnu/packages/golang.scm | 224 ++++++++--------------------------------
 1 file changed, 43 insertions(+), 181 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index cedfabe5bf..6947ec39f9 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -223,11 +223,11 @@ in the style of communicating sequential processes (@dfn{CSP}).")
     (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux"))
     (license license:bsd-3)))
 
-(define-public go-1.9
+(define-public go-1.11
   (package
     (inherit go-1.4)
     (name "go")
-    (version "1.9.7")
+    (version "1.11.5")
     (source
      (origin
        (method url-fetch)
@@ -235,13 +235,24 @@ in the style of communicating sequential processes (@dfn{CSP}).")
                            name version ".src.tar.gz"))
        (sha256
         (base32
-         "08kpy874x0rx43zpyv5kwd8xj2ma91xm33i0ka2v1v788px18a2q"))))
+         "0gllmbjvp12iszwils8id78mvjxwviwf98lh2gdkb236n4mz07mw"))))
     (arguments
      (substitute-keyword-arguments (package-arguments go-1.4)
        ((#:phases phases)
         `(modify-phases ,phases
+           ;; XXX Work around the Go 1.11.5 tarbomb.
+           ;; <https://github.com/golang/go/issues/29906>
+           (add-after 'unpack 'tarbomb-workaround
+             (lambda _
+               (chdir "..")
+               (delete-file-recursively "gocache")
+               (delete-file-recursively "tmp")
+               #t))
+           (replace 'chdir
+             (lambda _
+               (chdir "go/src")
+               #t))
            (replace 'prebuild
-             ;; TODO: Most of this could be factorized with Go 1.4.
              (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"))
@@ -251,43 +262,48 @@ in the style of communicating sequential processes (@dfn{CSP}).")
                        (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))
                       (output (assoc-ref outputs "out")))
 
-                 ;; Removing net/ tests, which fail when attempting to access
-                 ;; network resources not present in the build container.
                  (for-each delete-file
+                           ;; Removing net/ tests, which fail when attempting to access
+                           ;; network resources not present in the build container.
                            '("net/listen_test.go"
                              "net/parse_test.go"
-                             "net/cgo_unix_test.go"))
+                             "net/cgo_unix_test.go"
+                             ;; A side effect of these test scripts is testing
+                             ;; 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 they
+                             ;; 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_unix_test.go"
+                   (("/usr/bin") "/tmp"))
+
                  ;; Add libgcc to runpath
                  (substitute* "cmd/link/internal/ld/lib.go"
                    (("!rpath.set") "true"))
-                 (substitute* "cmd/go/internal/work/build.go"
+                 (substitute* "cmd/go/internal/work/gccgo.go"
                    (("cgoldflags := \\[\\]string\\{\\}")
                     (string-append "cgoldflags := []string{"
                                    "\"-rpath=" gcclib "\""
                                    "}"))
+                   (("\"-lgcc_s\", ")
+                    (string-append
+                     "\"-Wl,-rpath=" gcclib "\", \"-lgcc_s\", ")))
+                 (substitute* "cmd/go/internal/work/gc.go"
                    (("ldflags = setextld\\(ldflags, compiler\\)")
                     (string-append
                      "ldflags = setextld(ldflags, compiler)\n"
                      "ldflags = append(ldflags, \"-r\")\n"
-                     "ldflags = append(ldflags, \"" gcclib "\")\n"))
-                   (("\"-lgcc_s\", ")
-                    (string-append
-                     "\"-Wl,-rpath=" gcclib "\", \"-lgcc_s\", ")))
-
-                 ;; XXX Commit 65fa2b615b72c1fa61a7 in the Go repo.  We do this
-                 ;; without a patch because ((guix packages) patch-and-repack)
-                 ;; resets file mtimes, and parts of Go's test suite rely on
-                 ;; those timestamps.
-                 ;; <https://github.com/golang/go/issues/26369>
-                 (substitute* "cmd/internal/objfile/elf.go"
-                   (("PT_LOAD")
-                     "PT_LOAD && p.Flags&elf.PF_X != 0"))
+                     "ldflags = append(ldflags, \"" gcclib "\")\n")))
 
                  ;; Disable failing tests: these tests attempt to access
                  ;; commands or network resources which are neither available
@@ -322,9 +338,6 @@ in the style of communicating sequential processes (@dfn{CSP}).")
                     ("syscall/exec_linux_test.go"
                      "(.+)(TestCloneNEWUSERAndRemapNoRootDisableSetgroups.+)")))
 
-                 (substitute* "../misc/cgo/testsanitizers/test.bash"
-                   (("(CC=)cc" all var) (string-append var "gcc")))
-
                  ;; fix shebang for testar script
                  ;; note the target script is generated at build time.
                  (substitute* "../misc/cgo/testcarchive/carchive_test.go"
@@ -342,19 +355,10 @@ in the style of communicating sequential processes (@dfn{CSP}).")
            (add-before 'build '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"))
-                     (out (assoc-ref outputs "out")))
+               (let ((go  (assoc-ref inputs "go")))
                  (setenv "GOROOT_BOOTSTRAP" go)
-                 (setenv "PATH"
-                         (string-append out "/bin:"
-                                        (dirname (getcwd)) "/bin:"
-                                        (getenv "PATH")))
-
-                 ;; XXX: The following variables seem unrelated.
                  (setenv "GOGC" "400")
-                 (setenv "GO_TEST_TIMEOUT_SCALE" "9999")
                  #t)))
-
            (replace 'build
              (lambda* (#:key inputs outputs #:allow-other-keys)
                ;; FIXME: Some of the .a files are not bit-reproducible.
@@ -375,6 +379,11 @@ in the style of communicating sequential processes (@dfn{CSP}).")
                       (src (string-append
                             (assoc-ref outputs "tests") "/share/" ,name "-" ,version)))
                  (delete-file-recursively "../pkg/bootstrap")
+                 ;; Prevent installation of the build cache, which contains
+                 ;; store references to most of the tools used to build Go and
+                 ;; would unnecessarily increase the size of Go's closure if it
+                 ;; was installed.
+                 (delete-file-recursively "../pkg/obj")
 
                  (mkdir-p src)
                  (copy-recursively "../test" (string-append src "/test"))
@@ -402,153 +411,6 @@ in the style of communicating sequential processes (@dfn{CSP}).")
        ,@(package-native-inputs go-1.4)))
     (supported-systems %supported-systems)))
 
-(define-public go-1.11
-  (package
-    (inherit go-1.9)
-    (name "go")
-    (version "1.11.5")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "https://storage.googleapis.com/golang/"
-                           name version ".src.tar.gz"))
-       (sha256
-        (base32
-         "0gllmbjvp12iszwils8id78mvjxwviwf98lh2gdkb236n4mz07mw"))))
-    (arguments
-     (substitute-keyword-arguments (package-arguments go-1.9)
-       ((#:phases phases)
-        `(modify-phases ,phases
-           ;; XXX Work around the Go 1.11.5 tarbomb.
-           ;; <https://github.com/golang/go/issues/29906>
-           (add-after 'unpack 'tarbomb-workaround
-             (lambda _
-               (chdir "..")
-               (delete-file-recursively "gocache")
-               (delete-file-recursively "tmp")
-               #t))
-           (replace 'chdir
-             (lambda _
-               (chdir "go/src")
-               #t))
-           (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 attempting to access
-                           ;; network resources not present in the build container.
-                           '("net/listen_test.go"
-                             "net/parse_test.go"
-                             "net/cgo_unix_test.go"
-                             ;; A side effect of these test scripts is testing
-                             ;; 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 they
-                             ;; 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_unix_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 := \\[\\]string\\{\\}")
-                    (string-append "cgoldflags := []string{"
-                                   "\"-rpath=" gcclib "\""
-                                   "}"))
-                   (("\"-lgcc_s\", ")
-                    (string-append
-                     "\"-Wl,-rpath=" gcclib "\", \"-lgcc_s\", ")))
-                 (substitute* "cmd/go/internal/work/gc.go"
-                   (("ldflags = setextld\\(ldflags, compiler\\)")
-                    (string-append
-                     "ldflags = setextld(ldflags, compiler)\n"
-                     "ldflags = append(ldflags, \"-r\")\n"
-                     "ldflags = append(ldflags, \"" gcclib "\")\n")))
-
-                 ;; Disable failing tests: these tests attempt to access
-                 ;; commands or network resources which are neither available
-                 ;; 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" "(.+)(TestIgnorePipeErrorOnSuccess.+)")
-                    ("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/protocols")))
-                 (substitute* "net/port_unix.go"
-                   (("/etc/services") (string-append net-base "/etc/services")))
-                 (substitute* "time/zoneinfo_unix.go"
-                   (("/usr/share/zoneinfo/") tzdata-path))
-                 (substitute* (find-files "cmd" "\\.go")
-                   (("/lib(64)?/ld-linux.*\\.so\\.[0-9]") loader))
-                 #t)))
-           ;; Prevent installation of the build cache, which contains store
-           ;; references to most of the tools used to build Go and would
-           ;; unnecessarily increase the size of Go's closure if it was
-           ;; installed.
-           ;; TODO This should be moved into the 'install' phase when Go 1.9 is
-           ;; removed.
-           (add-before 'install 'delete-extraneous-files
-             (lambda _
-               (delete-file-recursively "../pkg/obj")
-               #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")
-                 #t)))))))))
-
 (define-public go go-1.11)
 
 (define-public go-github-com-alsm-ioprogress
-- 
2.20.1





Information forwarded to guix-patches <at> gnu.org:
bug#34280; Package guix-patches. (Mon, 04 Mar 2019 19:20:02 GMT) Full text and rfc822 format available.

Message #8 received at 34280 <at> debbugs.gnu.org (full text, mbox):

From: Efraim Flashner <efraim <at> flashner.co.il>
To: Leo Famulari <leo <at> famulari.name>
Cc: 34280 <at> debbugs.gnu.org
Subject: Re: [bug#34280] [PATCH] gnu: Remove Go 1.9.
Date: Mon, 4 Mar 2019 21:19:37 +0200
[Message part 1 (text/plain, inline)]
On Fri, Feb 01, 2019 at 05:39:17PM +0100, Leo Famulari wrote:
> We can wait to push this patch until there is another reason to change
> the Go compiler, but I am submitting it now in case anyone else is
> working on Go in Guix.
> 
> * gnu/packages/golang.scm (go-1.9): Remove variable.
> (go-1.11): Inherit from go-1.4 and consolidate the inherited build
> phases from go-1.9.
> 
> Go 1.11 should be essentially unchanged with this commit, although the
> derivation is different.
> 

There's been no nay saying for a month, I think if nothing's using
go <at> 1.9 it's safe to remove

-- 
Efraim Flashner   <efraim <at> flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#34280; Package guix-patches. (Mon, 04 Mar 2019 19:38:02 GMT) Full text and rfc822 format available.

Message #11 received at 34280 <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Efraim Flashner <efraim <at> flashner.co.il>
Cc: 34280 <at> debbugs.gnu.org
Subject: Re: [bug#34280] [PATCH] gnu: Remove Go 1.9.
Date: Mon, 4 Mar 2019 14:37:13 -0500
[Message part 1 (text/plain, inline)]
On Mon, Mar 04, 2019 at 09:19:37PM +0200, Efraim Flashner wrote:
> There's been no nay saying for a month, I think if nothing's using
> go <at> 1.9 it's safe to remove

Thanks, I've been waiting until we had another reason to rebuild all the
Go packages. For example, an update to Go 1.12. I'm trying that now.
[signature.asc (application/pgp-signature, inline)]

Reply sent to "Alex Griffin" <a <at> ajgrf.com>:
You have taken responsibility. (Sat, 20 Apr 2019 21:37:02 GMT) Full text and rfc822 format available.

Notification sent to Leo Famulari <leo <at> famulari.name>:
bug acknowledged by developer. (Sat, 20 Apr 2019 21:37:02 GMT) Full text and rfc822 format available.

Message #16 received at 34280-done <at> debbugs.gnu.org (full text, mbox):

From: "Alex Griffin" <a <at> ajgrf.com>
To: 34280-done <at> debbugs.gnu.org
Subject: [PATCH] gnu: Remove Go 1.9.
Date: Sat, 20 Apr 2019 17:35:44 -0400
It looks to me like this was done in 5a14b913ad8513202077471539d41c51d9f271ee.

-- 
Alex Griffin




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 19 May 2019 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 344 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.