GNU bug report logs - #50493
Update go-build-system to use Go 1.17.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Sarah Morgensen <iskarian@HIDDEN>; Keywords: patch; dated Thu, 9 Sep 2021 22:16:02 UTC; Maintainer for guix is bug-guix@HIDDEN.
Added tag(s) patch. Request was from Sarah Morgensen <iskarian@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 50493 <at> debbugs.gnu.org:


Received: (at 50493) by debbugs.gnu.org; 20 Sep 2021 05:28:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 20 01:28:40 2021
Received: from localhost ([127.0.0.1]:40590 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mSBr5-0007hh-Vj
	for submit <at> debbugs.gnu.org; Mon, 20 Sep 2021 01:28:40 -0400
Received: from out1.migadu.com ([91.121.223.63]:22572)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1mSBr4-0007ha-Md
 for 50493 <at> debbugs.gnu.org; Mon, 20 Sep 2021 01:28:39 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1632115714;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=FohsNRAknG1yE9U6VKykheS6z0vK/BRPlJxQH0TajFw=;
 b=dqN43KoIwmBQ8+nQfBfphoLFYnTZqy9T1bakhjdPVjzZM7e4xno3ahYjcM1i0al6iBDG3O
 lTiKca9LEJIVAB9swc+WFGt/OvFbMB6Xvr/4vO1UT7MsyIiEC7eymxYDIe52hNcn43ino0
 LyUvzZzC9PIAL+1Zeioqi92qPOhsUdQ=
From: Sarah Morgensen <iskarian@HIDDEN>
To: Leo Famulari <leo@HIDDEN>
Subject: Re: bug#50493: Update go-build-system to use Go 1.17.
References: <865yv9mm5a.fsf@HIDDEN> <YTqMsUO8pzTgiifZ@HIDDEN>
Date: Sun, 19 Sep 2021 22:28:33 -0700
In-Reply-To: <YTqMsUO8pzTgiifZ@HIDDEN> (Leo Famulari's message of "Thu, 9
 Sep 2021 18:37:37 -0400 (1 week, 3 days, 6 hours ago)")
Message-ID: <86bl4nhl32.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50493
Cc: 50493 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hello,

Apologies it's taken so long for a proper response!

>> 2. Make some much-needed improvements to go-build-system [2]:
>> 
>> * replace the *slow* phase 'remove-go-references with -trimpath option
>> 
>> * avoid building a directory union of Go inputs (and then copying it!)
>
> Are these required to use 1.17? I agree they are important problems to
> fix but we shouldn't let them block the upgrade.

You're right.  I've gone ahead and sent a patch series to this bug which
rolls the cache, docker, and the update all together.

I've added one more blocker: #50688 [0], which is a dependency of chezmoi.

This should just leave #49921, the aarch64 issue, then this is patch is
ready to go.  With the patch from #50688, I was to build out all
dependents listed by `guix refresh -l go' (about 900).

Thanks for sticking with this! :)

[0] https://issues.guix.gnu.org/50688

--
Sarah




Information forwarded to bug-guix@HIDDEN:
bug#50493; Package guix. Full text available.

Message received at 50493 <at> debbugs.gnu.org:


Received: (at 50493) by debbugs.gnu.org; 20 Sep 2021 05:21:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 20 01:21:03 2021
Received: from localhost ([127.0.0.1]:40583 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mSBjj-0007WO-1F
	for submit <at> debbugs.gnu.org; Mon, 20 Sep 2021 01:21:03 -0400
Received: from out2.migadu.com ([188.165.223.204]:41712)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1mSBjb-0007VH-70
 for 50493 <at> debbugs.gnu.org; Mon, 20 Sep 2021 01:21:00 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1632115254;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=GZ5iPxFRLyQRvT+3cDSGw0gcN+tlNQkzqXDpVDuawZY=;
 b=NCH4WtlvGy0FITnjxq+MZaqp5h0zS9lefCR6AtHTEJN09xWCJ23St3+t0X67zkFrZ+soW7
 FUKeqmXaAhcNdpnMwLL8eX1chDFeodSokTJIsXhb6OPu3PYH2EZ5nmftZUtVpZUsGXHoew
 QqqPpkMh73Bz7XKueAzR9MK+KFO7+Is=
From: Sarah Morgensen <iskarian@HIDDEN>
To: 50493 <at> debbugs.gnu.org
Subject: [PATCH 2/4] build-system/go: Initialize build cache from input
 packages.
Date: Sun, 19 Sep 2021 22:20:49 -0700
Message-Id: <a40a0ea216c02e45f140f964552347d8ef64b4be.1632099301.git.iskarian@HIDDEN>
In-Reply-To: <cover.1632099301.git.iskarian@HIDDEN>
References: <cover.1632099301.git.iskarian@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50493
Cc: leo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* guix/build/go-build-system.com (setup-go-environment): Set GOCACHE to
a location within the build directory.  Union "/var/cache/go/build"
input directories to initialize the cache.  Generate "trim.txt" within
the cache, with the current time.
---
 guix/build/go-build-system.scm | 26 +++++++++++++++++++++++---
 1 file changed, 23 insertions(+), 3 deletions(-)

diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm
index 645d2fe680..9f249b0777 100644
--- a/guix/build/go-build-system.scm
+++ b/guix/build/go-build-system.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2020 Jack Hill <jackhill@HIDDEN>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@HIDDEN>
 ;;; Copyright © 2020, 2021 Efraim Flashner <efraim@HIDDEN>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -138,9 +139,28 @@ (define* (setup-go-environment #:key inputs outputs goos goarch #:allow-other-ke
 where executables (\"commands\") are installed to.  This phase is sometimes used
 by packages that use (guix build-system gnu) but have a handful of Go
 dependencies, so it should be self-contained."
-  ;; The Go cache is required starting in Go 1.12.  We don't actually use it but
-  ;; we need it to be a writable directory.
-  (setenv "GOCACHE" "/tmp/go-cache")
+  (define (search-input-directories dir)
+    (filter directory-exists?
+            (map (match-lambda
+                   ((name . directory)
+                    (string-append directory "/" dir)))
+                 inputs)))
+
+  ;; Seed the Go build cache with the build caches from input packages.
+  (let ((cache (string-append (getcwd) "/go-build")))
+    (setenv "GOCACHE" cache)
+    (union-build cache
+                 (search-input-directories "/var/cache/go/build")
+                 ;; Creating all directories isn't that bad, because there are
+                 ;; only ever 256 of them.
+                 #:create-all-directories? #t
+                 #:log-port (%make-void-port "w"))
+
+    ;; Tell Go that the cache was recently trimmed, so it doesn't try to.
+    (call-with-output-file (string-append cache "/trim.txt")
+      (lambda (port)
+        (format port "~a" (current-time)))))
+
   ;; Using the current working directory as GOPATH makes it easier for packagers
   ;; who need to manipulate the unpacked source code.
   (setenv "GOPATH" (getcwd))
-- 
2.33.0





Information forwarded to bug-guix@HIDDEN:
bug#50493; Package guix. Full text available.

Message received at 50493 <at> debbugs.gnu.org:


Received: (at 50493) by debbugs.gnu.org; 20 Sep 2021 05:21:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 20 01:21:02 2021
Received: from localhost ([127.0.0.1]:40581 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mSBjh-0007W7-Kh
	for submit <at> debbugs.gnu.org; Mon, 20 Sep 2021 01:21:02 -0400
Received: from out0.migadu.com ([94.23.1.103]:19597)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1mSBjf-0007Vb-Jy
 for 50493 <at> debbugs.gnu.org; Mon, 20 Sep 2021 01:21:00 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1632115259;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=ywqrWM6o0T01lBOE4Gy7ZDiHUUkTzfN5szsLxX791nI=;
 b=N9EhDRxuNXNMqBBjfsEH6iV2Rbie4bXm25CB/Pw1zFmsgnYD/v+xo4XO3raIYg9cLSpe2f
 FSW2uHxcxq/tm+F/uo8XLDJ+Fz7h+Cz8GrTfCYE7Gfk0CzjgCq+NC1YfikIoX75ysOnkLi
 UFEF6ceLshBplbAuPTJGvGW5ksgsRa0=
From: Sarah Morgensen <iskarian@HIDDEN>
To: 50493 <at> debbugs.gnu.org
Subject: [PATCH 4/4] build-system/go: Use go-1.17 by default.
Date: Sun, 19 Sep 2021 22:20:51 -0700
Message-Id: <2db7749e36277825f029a3b059ca8d4daaa82cbc.1632099301.git.iskarian@HIDDEN>
In-Reply-To: <cover.1632099301.git.iskarian@HIDDEN>
References: <cover.1632099301.git.iskarian@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50493
Cc: leo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Build all Go packages with go-1.17 by default.  Explicitly specify an
older Go version in packages which cannot build with go-1.17.

* gnu/packages/golang.scm (go): Update from 'go-1.14' to 'go-1.17'.
* gnu/packages/docker.scm (docker)[native-inputs]: Explicitly use
'go-1.14'.
* gnu/packages/ipfs.scm (go-ipfs)[arguments]: Set #:go to 'go-1.16'.
(go-github-com-ipfs-go-ipfs-cmdkit-files)[arguments]: Likewise.
---
 gnu/packages/docker.scm | 2 +-
 gnu/packages/golang.scm | 2 +-
 gnu/packages/ipfs.scm   | 6 ++++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm
index 8bac1b89ce..fa666cbb04 100644
--- a/gnu/packages/docker.scm
+++ b/gnu/packages/docker.scm
@@ -594,7 +594,7 @@ (define-public docker
        ("xz" ,xz)))
     (native-inputs
      `(("eudev" ,eudev)      ; TODO: Should be propagated by lvm2 (.pc -> .pc)
-       ("go" ,go)
+       ("go" ,go-1.14)
        ("gotestsum" ,gotestsum)
        ("pkg-config" ,pkg-config)))
     (synopsis "Docker container component library, and daemon")
diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 19f1ef37d5..d1ed30455c 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -790,7 +790,7 @@ (define-public go-1.17
                   "README.md" "SECURITY.md"))))))))
     (inputs (alist-delete "gcc:lib" (package-inputs go-1.16)))))
 
-(define-public go go-1.14)
+(define-public go go-1.17)
 
 (define-public (make-go-std go)
   "Return a package which builds the standard library for Go compiler GO."
diff --git a/gnu/packages/ipfs.scm b/gnu/packages/ipfs.scm
index 57701991e3..8d5b4f1767 100644
--- a/gnu/packages/ipfs.scm
+++ b/gnu/packages/ipfs.scm
@@ -46,7 +46,8 @@ (define-public go-github-com-ipfs-go-ipfs-cmdkit-files
               "0qk6fshgdmhp8dip2ksm13j6nywi41m9mn0czkvmw6b697z85l2r"))))
       (build-system go-build-system)
       (arguments
-       '(#:unpack-path "github.com/ipfs/go-ipfs-cmdkit"
+       `(#:go ,go-1.16
+         #:unpack-path "github.com/ipfs/go-ipfs-cmdkit"
          #:import-path "github.com/ipfs/go-ipfs-cmdkit/files"))
       (home-page "https://github.com/ipfs/go-ipfs-cmdkit")
       (synopsis "Shared types, functions and values for go-ipfs")
@@ -226,7 +227,8 @@ (define-public go-ipfs
        (file-name (string-append name "-" version "-source"))))
     (build-system go-build-system)
     (arguments
-     '(#:unpack-path "github.com/ipfs/go-ipfs"
+     `(#:go ,go-1.16
+       #:unpack-path "github.com/ipfs/go-ipfs"
        #:import-path "github.com/ipfs/go-ipfs/cmd/ipfs"
        #:phases (modify-phases %standard-phases
                   (add-before 'reset-gzip-timestamps 'make-files-writable
-- 
2.33.0





Information forwarded to bug-guix@HIDDEN:
bug#50493; Package guix. Full text available.

Message received at 50493 <at> debbugs.gnu.org:


Received: (at 50493) by debbugs.gnu.org; 20 Sep 2021 05:21:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 20 01:21:01 2021
Received: from localhost ([127.0.0.1]:40579 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mSBjh-0007Vv-7E
	for submit <at> debbugs.gnu.org; Mon, 20 Sep 2021 01:21:01 -0400
Received: from out1.migadu.com ([91.121.223.63]:20574)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1mSBje-0007VY-Sr
 for 50493 <at> debbugs.gnu.org; Mon, 20 Sep 2021 01:20:59 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1632115257;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=n1MhkWHxf2MGqQvKmtMdO7XKu38ptsalVmfg5r3MLa4=;
 b=fphj8nCZ1k7ZyFD3xzhMkyCVJUHmXRDo5UwDNl0tOERFvWGvypL0uEE8jkiT1A2NhQjZCA
 ZGNnQqItMnCUz/8RalZnlfP6Oidy97j+rGojlcmbt/35t9R7a/zWQLMEilWYjizhsfFeMg
 A27Ov4X4yiN2OGzsgF9aI6FViuLjBGg=
From: Sarah Morgensen <iskarian@HIDDEN>
To: 50493 <at> debbugs.gnu.org
Subject: [PATCH 3/4] build-system/go: Add pre-built standard library as
 implicit input.
Date: Sun, 19 Sep 2021 22:20:50 -0700
Message-Id: <b617c44a652424a5b2024963eb988a876dadf92a.1632099301.git.iskarian@HIDDEN>
In-Reply-To: <cover.1632099301.git.iskarian@HIDDEN>
References: <cover.1632099301.git.iskarian@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50493
Cc: leo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* gnu/packages/golang.scm (make-go-std): New procedure.
* guix/build-system/go.scm (make-go-std): New procedure.
(lower): Use it.  Add pre-built standard library to inputs.
---
 gnu/packages/golang.scm  | 30 ++++++++++++++++++++++++++++++
 guix/build-system/go.scm | 16 ++++++++++++++--
 2 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index f02d0aa9df..19f1ef37d5 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -792,6 +792,36 @@ (define-public go-1.17
 
 (define-public go go-1.14)
 
+(define-public (make-go-std go)
+  "Return a package which builds the standard library for Go compiler GO."
+  (package
+    (name (string-append (package-name go) "-std"))
+    (version (package-version go))
+    (source #f)
+    (build-system go-build-system)
+    (arguments
+     `(#:import-path "std"
+       #:build-flags `("-pkgdir" "pkg") ; "Install" to build directory.
+       #:allow-go-reference? #t
+       #:substitutable? #f ; Faster to build than download.
+       #:tests? #f ; Already tested in the main Go build.
+       #:go ,go
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'unpack)
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (out-cache (string-append out "/var/cache/go/build")))
+               (copy-recursively (getenv "GOCACHE") out-cache)
+               (delete-file (string-append out-cache "/trim.txt"))
+               (delete-file (string-append out-cache "/README")))))
+         (delete 'install-license-files))))
+    (home-page (package-home-page go))
+    (synopsis "Cached standard library build for Go")
+    (description (package-description go))
+    (license (package-license go))))
+
 (define-public go-0xacab-org-leap-shapeshifter
   (let ((commit "0aa6226582efb8e563540ec1d3c5cfcd19200474")
         (revision "12"))
diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm
index 8aa065c4ff..a579477500 100644
--- a/guix/build-system/go.scm
+++ b/guix/build-system/go.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2017 Leo Famulari <leo@HIDDEN>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@HIDDEN>
 ;;; Copyright © 2021 Efraim Flashner <efraim@HIDDEN>
+;;; Copyright © 2021 Sarah Morgensen <iskarian@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -109,6 +110,9 @@ (define (default-go)
   (let ((go (resolve-interface '(gnu packages golang))))
     (module-ref go 'go)))
 
+(define (make-go-std)
+  (module-ref (resolve-interface '(gnu packages golang)) 'make-go-std))
+
 (define* (lower name
                 #:key source inputs native-inputs outputs system target
                 (go (default-go))
@@ -118,6 +122,14 @@ (define* (lower name
   (define private-keywords
     '(#:source #:target #:go #:inputs #:native-inputs))
 
+  (define inputs-with-cache
+    ;; XXX: Avoid a circular dependency.  This should be rewritten with
+    ;; 'package-mapping' or similar.
+    (let ((go-std-name (string-append (package-name go) "-std")))
+      (if (string-prefix? go-std-name name)
+          inputs
+          (cons `(,go-std-name ,((make-go-std) go)) inputs))))
+
   (bag
     (name name)
     (system system)
@@ -127,7 +139,7 @@ (define* (lower name
                         '())
                      ,@`(("go" ,go))
                      ,@native-inputs
-                     ,@(if target '() inputs)
+                     ,@(if target '() inputs-with-cache)
                      ,@(if target
                          ;; Use the standard cross inputs of
                          ;; 'gnu-build-system'.
@@ -135,7 +147,7 @@ (define* (lower name
                          '())
                      ;; Keep the standard inputs of 'gnu-build-system'.
                      ,@(standard-packages)))
-    (host-inputs (if target inputs '()))
+    (host-inputs (if target inputs-with-cache '()))
 
     ;; The cross-libc is really a target package, but for bootstrapping
     ;; reasons, we can't put it in 'host-inputs'.  Namely, 'cross-gcc' is a
-- 
2.33.0





Information forwarded to bug-guix@HIDDEN:
bug#50493; Package guix. Full text available.

Message received at 50493 <at> debbugs.gnu.org:


Received: (at 50493) by debbugs.gnu.org; 20 Sep 2021 05:20:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 20 01:20:56 2021
Received: from localhost ([127.0.0.1]:40575 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mSBjc-0007VQ-08
	for submit <at> debbugs.gnu.org; Mon, 20 Sep 2021 01:20:56 -0400
Received: from out2.migadu.com ([188.165.223.204]:41697)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1mSBja-0007VD-CH
 for 50493 <at> debbugs.gnu.org; Mon, 20 Sep 2021 01:20:55 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1632115252;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=nMQlPJvjS2emZsZbcef7yAzP8j24x1MdddyrjNR17kQ=;
 b=XFAmua7rKqbxEYwgNbU71X6Zvl3qA00ID6zSjbld2rprnIQRxTMQ6AllRSfc8T3pVEul05
 Ecx8lC8UQawGCZRbKajKWwScCk+wX5t9UCS7+U7Ktc6AQ3V1QDFLZokKnvWgZXn8t0uDN3
 HCfRbF6SaBaNSzr90xtJ6m+tBUx55Is=
From: Sarah Morgensen <iskarian@HIDDEN>
To: 50493 <at> debbugs.gnu.org
Subject: [PATCH 1/4] build-system/go: Add #:substitutable? argument.
Date: Sun, 19 Sep 2021 22:20:48 -0700
Message-Id: <886cdf3621d5a9592e833be510d549484f558970.1632099301.git.iskarian@HIDDEN>
In-Reply-To: <cover.1632099301.git.iskarian@HIDDEN>
References: <cover.1632099301.git.iskarian@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50493
Cc: leo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

* guix/build-system/go.scm (go-build): Add 'substitutable?' argument.
(go-cross-build): Likewise.
---
 guix/build-system/go.scm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm
index 4c1a732107..8aa065c4ff 100644
--- a/guix/build-system/go.scm
+++ b/guix/build-system/go.scm
@@ -169,7 +169,8 @@ (define* (go-build store name inputs
                    (imported-modules %go-build-system-modules)
                    (modules '((guix build go-build-system)
                               (guix build union)
-                              (guix build utils))))
+                              (guix build utils)))
+                   (substitutable? #t))
   (define builder
    `(begin
       (use-modules ,@modules)
@@ -211,6 +212,7 @@ (define* (go-build store name inputs
                                 #:system system
                                 #:modules imported-modules
                                 #:outputs outputs
+                                #:substitutable? substitutable?
                                 #:guile-for-build guile-for-build))
 
 (define* (go-cross-build store name
@@ -234,7 +236,8 @@ (define* (go-cross-build store name
                          (imported-modules %go-build-system-modules)
                          (modules '((guix build go-build-system)
                                     (guix build union)
-                                    (guix build utils))))
+                                    (guix build utils)))
+                         (substitutable? #t))
   "Cross-build NAME using GO, where TARGET is a GNU triplet and with INPUTS."
   (define builder
     `(begin
@@ -303,6 +306,7 @@ (define* (go-cross-build store name
                                   #:inputs (append native-drvs target-drvs)
                                   #:outputs outputs
                                   #:modules imported-modules
+                                  #:substitutable? substitutable?
                                   #:guile-for-build guile-for-build))
 
 (define go-build-system
-- 
2.33.0





Information forwarded to bug-guix@HIDDEN:
bug#50493; Package guix. Full text available.

Message received at 50493 <at> debbugs.gnu.org:


Received: (at 50493) by debbugs.gnu.org; 20 Sep 2021 05:19:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 20 01:19:39 2021
Received: from localhost ([127.0.0.1]:40569 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mSBiN-0007TF-Lg
	for submit <at> debbugs.gnu.org; Mon, 20 Sep 2021 01:19:39 -0400
Received: from out0.migadu.com ([94.23.1.103]:19221)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1mSBiI-0007Sr-QP
 for 50493 <at> debbugs.gnu.org; Mon, 20 Sep 2021 01:19:36 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1632115172;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=dDyUnt0a8QkynD+pKs9Nz0ouxlJz5vL8j03OxDqWwfI=;
 b=iktL3ZC4RJdFZDfF8fdMR4/T93ZPHsUy5hh3sATTG3kKpndLJz4+3EdrPEBiU3lecIgM9u
 CF5gZKPJ7qVeiYPgcPeaCRM+1AWtU+GWK8/ULVxHIc0jJ90sPLXGmKANQqqLHh1lRDg966
 RMji9GtAHA2qXWvnl1hQzqiY+FKCtsQ=
From: Sarah Morgensen <iskarian@HIDDEN>
To: 50493 <at> debbugs.gnu.org
Subject: [PATCH staging 0/4] build-system/go: Use go-1.17 by default.
Date: Sun, 19 Sep 2021 22:19:30 -0700
Message-Id: <cover.1632099301.git.iskarian@HIDDEN>
In-Reply-To: <865yv9mm5a.fsf@HIDDEN>
References: <865yv9mm5a.fsf@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50493
Cc: leo@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hello Guix,

This patch series updates the Go build system to use Go 1.17 by default.

As a necessity, because go-1.17 no longer contains its own pre-compiled
standard library, an implicit input is added to the build system which
contains the build cache from building the standard library with the
go-build-system.  (This way, we can always guarantee that the cache is valid
because it's built with the same flags as the build system.)  The build system
is also modified to make use of this cache.

(We use the build cache rather than archives because the Go project is moving
away from archives towards an authoritative build cache.)

Three packages are modified to keep using an older Go:

* docker now explicitly uses go-1.14

* go-ipfs and go-github-com-go-ipfs-cmdkit-files now explitly use go-1.16
(go-ipfs and gx badly need to be upgraded!)

There are about 900 dependent packages according to `guix refresh -l go', but
I don't know how many are leaf packages, so I marked this for staging.  The
actual series is based on master because go-1.17 is only present in master.

I have built them all out successfully on x86_64.

Sarah Morgensen (4):
  build-system/go: Add #:substitutable? argument.
  build-system/go: Initialize build cache from input packages.
  build-system/go: Add pre-built standard library as implicit input.
  build-system/go: Use go-1.17 by default.

 gnu/packages/docker.scm        |  2 +-
 gnu/packages/golang.scm        | 32 +++++++++++++++++++++++++++++++-
 gnu/packages/ipfs.scm          |  6 ++++--
 guix/build-system/go.scm       | 24 ++++++++++++++++++++----
 guix/build/go-build-system.scm | 26 +++++++++++++++++++++++---
 5 files changed, 79 insertions(+), 11 deletions(-)


base-commit: a640ee7da3311e4fa560c7163d2dd7d24a25585a
-- 
2.33.0





Information forwarded to bug-guix@HIDDEN:
bug#50493; Package guix. Full text available.
Removed blocking bug(s) 50227 Request was from Sarah Morgensen <iskarian@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added blocking bug(s) 50688 Request was from Sarah Morgensen <iskarian@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added blocking bug(s) 49921, 50227, and 50495 Request was from Sarah Morgensen <iskarian@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 50493 <at> debbugs.gnu.org:


Received: (at 50493) by debbugs.gnu.org; 9 Sep 2021 22:37:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 09 18:37:51 2021
Received: from localhost ([127.0.0.1]:36410 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mOSg3-00024F-EV
	for submit <at> debbugs.gnu.org; Thu, 09 Sep 2021 18:37:51 -0400
Received: from out1-smtp.messagingengine.com ([66.111.4.25]:41793)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo@HIDDEN>) id 1mOSg1-00023v-I8
 for 50493 <at> debbugs.gnu.org; Thu, 09 Sep 2021 18:37:50 -0400
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42])
 by mailout.nyi.internal (Postfix) with ESMTP id DA3A05C006D;
 Thu,  9 Sep 2021 18:37:43 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163])
 by compute2.internal (MEProxy); Thu, 09 Sep 2021 18:37:43 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name;
 h=date:from:to:cc:subject:message-id:references:mime-version
 :content-type:in-reply-to; s=mesmtp; bh=GrMUsP1OEHuR4em7TzDSWHJl
 bmte+Id5jZjahvlZ7CY=; b=a4DkSSG13RxDwfOItE/GIockKTarz9fuInPQgXe3
 DPN/W9A/c9jZAbVrdvd6nkmmY/i8FzjamxoAzl4atEgqcm9/zUoq1Z7ElxSF7uCl
 cJEUi7uPPP7fbJaj58VIHrkSvIi2W1CnO6dKG/a22yel0resxGwkBK4OEgBReTMt
 zz4=
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to:x-me-proxy
 :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=GrMUsP
 1OEHuR4em7TzDSWHJlbmte+Id5jZjahvlZ7CY=; b=L9yqjwLcfETKwRyFkXrb69
 wntb34A6PJC4vGK60nLUI617N8tg0FAoTHmJS205nP7YMeaRGiOM7J3Q2Hx+w60+
 7+bsZ6nA0STUjrZBnKcbI1zr2g12C3YTqjULhk+A6PtY6cfF8wG3ZXxMTh5w43k3
 o9HZw38Rg4ywLkkqxDMNT0dIVebC2cLfW7efrgopeWWTSy5HJIe6o2L4TLb2X1Yb
 vaUtEhqC/3N2+49HPnnP31jZi7M6p9DnV2sHPkPHhmHNso30pMeX1IdjI/Qb9IJn
 tY4+KZ86cqlEQqxjACGzfluobAKnLr5Lx/WYykp33pjGsnYD0Lpsdpb6eEdqJ7Zw
 ==
X-ME-Sender: <xms:t4w6Yd-lS7XBisiMjijcoE1i6z1QrxAlGkrb6TX2Yfi9ofjUpOu0Qw>
 <xme:t4w6YRsWxrs_4OfmIg5wGWWwzSOPo5grYIkV2w67f35OPrAjurECCA8kwR_2eEzkQ
 Sw7chEaJdGIqX8ttQ>
X-ME-Received: <xmr:t4w6YbADeK193ozUP3Yq1nr1WiqDcUygYHj5L2Nq13-tLRPzGJQ96Dze6B2iYNAdp8f0KEIEGrMTrNSxufX2GGwlJnBUbB4wyIWfQ6XpY3x7>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrudegtddgudduucetufdoteggodetrfdotf
 fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen
 uceurghilhhouhhtmecufedttdenucenucfjughrpeffhffvuffkfhggtggujgesthdtre
 dttddtvdenucfhrhhomhepnfgvohcuhfgrmhhulhgrrhhiuceolhgvohesfhgrmhhulhgr
 rhhirdhnrghmvgeqnecuggftrfgrthhtvghrnhephefgleevhfdttdefheeitdfgheffff
 ffledvlefhgfektdethefguefgheegtefhnecuffhomhgrihhnpehgihhthhhusgdrtgho
 mhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlvg
 hosehfrghmuhhlrghrihdrnhgrmhgv
X-ME-Proxy: <xmx:t4w6YRcejfr9ReXRGVBNKTIOA0tCyaM2ibnDHrVuAOfYkmJD24EnGg>
 <xmx:t4w6YSM-lmL_QRIjhEA62x9JWhtLo31NKEW9vR3-z7qMT2Fa6tltfg>
 <xmx:t4w6YTmD9hhFW8Hdr1DVp3YhNDRR0jOL13KWpG1Cis8E0dyKfL45Bg>
 <xmx:t4w6YcXmf-eFmqnba_QZRTBAZIlCKccMstwyd1u0zOQUxDWJ_96a3Q>
Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu,
 9 Sep 2021 18:37:43 -0400 (EDT)
Date: Thu, 9 Sep 2021 18:37:37 -0400
From: Leo Famulari <leo@HIDDEN>
To: Sarah Morgensen <iskarian@HIDDEN>
Subject: Re: bug#50493: Update go-build-system to use Go 1.17.
Message-ID: <YTqMsUO8pzTgiifZ@HIDDEN>
References: <865yv9mm5a.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <865yv9mm5a.fsf@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50493
Cc: 50493 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Thu, Sep 09, 2021 at 03:14:57PM -0700, Sarah Morgensen wrote:
> This is intended to be a tracking issue for updating go-build-system to
> use Go 1.17 by default.  The build system currently uses Go 1.14, which
> no longer receives security updates [0].

Thanks for putting this together.

> Here's what needs to be done:
> 
> 1. Address the aarch64 bug [1], either by verifying that it only happens
> on emulated systems, or by fixing it if not.

It looks like there was a patch for this issue:

https://github.com/golang/go/issues/20763#issuecomment-314627882

And it was apparently added to Go, but maybe it was not sufficient, did
not make it into a release, or we are seeing a different bug.

> 2. Make some much-needed improvements to go-build-system [2]:
> 
> * replace the *slow* phase 'remove-go-references with -trimpath option
> 
> * avoid building a directory union of Go inputs (and then copying it!)

Are these required to use 1.17? I agree they are important problems to
fix but we shouldn't let them block the upgrade.

> * add a "go-std-cache-for-build" package (hidden; name to be
> bikeshedded), which will be an implicit input in go-build-system (needed
> since we removed the pre-built standard library in go-1.17)

Okay. Feel free to choose the name. I think it's your shed.


> 3. Some/all Docker packages still require Go 1.14; make them use go-1.14
> explicitly.  Alternatively, update Docker (significant effort involved).

Okay.

> 4. Update or patch broken packages.  I've got patches for four so far:
> 
> go-github-com-urfave-cli
> go-github-com-urfave-cli-v2
> go-github-com-sevlyar-go-daemon
> go-github-com-keybase-go-ps
>
> I'll submit them as a separate patch and block this with it.  If anyone
> else would like to see if their favorite package works with Go 1.17, you
> can build it with:

Okay, great.
  
>   go build --with-input=go@HIDDEN=go@HIDDEN <package>

Syncthing builds! That's great.




Information forwarded to bug-guix@HIDDEN:
bug#50493; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 9 Sep 2021 22:15:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Sep 09 18:15:07 2021
Received: from localhost ([127.0.0.1]:36385 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mOSK3-0001Sj-1Q
	for submit <at> debbugs.gnu.org; Thu, 09 Sep 2021 18:15:07 -0400
Received: from lists.gnu.org ([209.51.188.17]:35678)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <iskarian@HIDDEN>) id 1mOSK1-0001Sa-Im
 for submit <at> debbugs.gnu.org; Thu, 09 Sep 2021 18:15:06 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:37586)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <iskarian@HIDDEN>) id 1mOSK1-0008Ii-Bz
 for bug-guix@HIDDEN; Thu, 09 Sep 2021 18:15:05 -0400
Received: from out2.migadu.com ([188.165.223.204]:62880)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <iskarian@HIDDEN>) id 1mOSJy-0001Mg-Uw
 for bug-guix@HIDDEN; Thu, 09 Sep 2021 18:15:05 -0400
X-Report-Abuse: Please report any abuse attempt to abuse@HIDDEN and
 include these headers.
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1;
 t=1631225699;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:mime-version:mime-version:content-type:content-type;
 bh=L9CHN/5FJXotSjfgjtHxbbq0I/HUr78AYTMqACApnAw=;
 b=AZ08EMt6vpMj0VYT5Ch7+k3X3uVZ1bOeBqKOpZK4ZB692T4RSjl/uFTTXG9tjTG96SXBj2
 i/4piEDFjGYNIms7vPKTzfuOrDfqbOLKluirtPZli4eJWednXEGC4tiTJcXa3CUgODyCo5
 9R3M32XJld8BGm0Oq63rzpCx3EkKC44=
From: Sarah Morgensen <iskarian@HIDDEN>
To: bug-guix@HIDDEN
Subject: Update go-build-system to use Go 1.17.
X-Debbugs-CC: Leo Famulari <leo@HIDDEN>
Date: Thu, 09 Sep 2021 15:14:57 -0700
Message-ID: <865yv9mm5a.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Migadu-Flow: FLOW_OUT
X-Migadu-Auth-User: iskarian@HIDDEN
Received-SPF: pass client-ip=188.165.223.204; envelope-from=iskarian@HIDDEN;
 helo=out2.migadu.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

Hello Guix,

This is intended to be a tracking issue for updating go-build-system to
use Go 1.17 by default.  The build system currently uses Go 1.14, which
no longer receives security updates [0].

Here's what needs to be done:

1. Address the aarch64 bug [1], either by verifying that it only happens
on emulated systems, or by fixing it if not.

2. Make some much-needed improvements to go-build-system [2]:

* replace the *slow* phase 'remove-go-references with -trimpath option

* avoid building a directory union of Go inputs (and then copying it!)

* add a "go-std-cache-for-build" package (hidden; name to be
bikeshedded), which will be an implicit input in go-build-system (needed
since we removed the pre-built standard library in go-1.17)

3. Some/all Docker packages still require Go 1.14; make them use go-1.14
explicitly.  Alternatively, update Docker (significant effort involved).

4. Update or patch broken packages.  I've got patches for four so far:

go-github-com-urfave-cli
go-github-com-urfave-cli-v2
go-github-com-sevlyar-go-daemon
go-github-com-keybase-go-ps

I'll submit them as a separate patch and block this with it.  If anyone
else would like to see if their favorite package works with Go 1.17, you
can build it with:

  go build --with-input=go@HIDDEN=go@HIDDEN <package>

[0] https://github.com/golang/go/wiki/Go-Release-Cycle#release-maintenance
[1] https://issues.guix.gnu.org/49921
[2] https://issues.guix.gnu.org/50227#10

--
Sarah




Acknowledgement sent to Sarah Morgensen <iskarian@HIDDEN>:
New bug report received and forwarded. Copy sent to leo@HIDDEN, bug-guix@HIDDEN. Full text available.
Report forwarded to leo@HIDDEN, bug-guix@HIDDEN:
bug#50493; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 20 Sep 2021 05:45:01 UTC

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