GNU bug report logs - #68300
[PATCH] gnu: Remove go-1.14.

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-patches; Reported by: Efraim Flashner <efraim@HIDDEN>; Keywords: patch; dated Sun, 7 Jan 2024 10:41:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

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


Received: (at 68300) by debbugs.gnu.org; 10 Jan 2024 14:34:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jan 10 09:34:52 2024
Received: from localhost ([127.0.0.1]:39443 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rNZfQ-00049M-2s
	for submit <at> debbugs.gnu.org; Wed, 10 Jan 2024 09:34:52 -0500
Received: from mail-qk1-x729.google.com ([2607:f8b0:4864:20::729]:51617)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maxim.cournoyer@HIDDEN>) id 1rNZfN-00048p-Hm
 for 68300 <at> debbugs.gnu.org; Wed, 10 Jan 2024 09:34:50 -0500
Received: by mail-qk1-x729.google.com with SMTP id
 af79cd13be357-7831aacdaffso336269685a.3
 for <68300 <at> debbugs.gnu.org>; Wed, 10 Jan 2024 06:34:50 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1704897285; x=1705502085; darn=debbugs.gnu.org;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to;
 bh=LCAbQLSZTn+a+Ki7SzBUSCyqNCyVeJvqzwrlvOOf7TM=;
 b=BonYNKiBt+/iLDJ3HWgePXp1ghqhd+2RVzbDisuVh2vxITVr86U7gDhLiXvEH1Apsp
 RwzpnJHTp0N5YK0kWBo8gvSInJFjgmnjgMjnKA8Q7Le6RoL85eKLgFrDn/XA7rqLGfUO
 O0I97C9kVuCjyc/15N379b6HENSm3xL1RwmB2JyWlSYNTUqes3YwENnpZlPbvqMWm/Sf
 MXPXC83qr7kh13+zKiM8KxiLEHaHlFz9uSVnk77iU1uxnUhb1anvCQjoLt5RF2QtJ90/
 16E4idKpFLW5c+038Zh+ofEaSrXaRT9BkdxDgAziDJ+An9d/NsNSeTluqKPP4F4d/6H+
 OzyQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1704897285; x=1705502085;
 h=mime-version:user-agent:message-id:date:references:in-reply-to
 :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=LCAbQLSZTn+a+Ki7SzBUSCyqNCyVeJvqzwrlvOOf7TM=;
 b=nS6er/hWu9utCYwafNLHCFYYO3DMN+kj8MaD3+K5KFQYr+BA+jqp8vIdtDEqxAHf/q
 VrjwLo3okAYfGxe1A4FCASXFXTDXoJi9SXTQp/pKLtmZQK32YUR0D0Bu7VLgK/uSQtKK
 DfLnLTdDvArHJuo989vPS45famBZdha71YftWQeLXq5+EjIQUGqExsv7EYu1qLBqY1UA
 1a1p8F8qW+CorhqCqu7sR4XJPDYLYQkqqBq48fBLmeIfzbpnZLmsS1admdTJGs8HtAX+
 z9BznDnKBC2SQAhJn25A5NUvzd/1e8MC6NOY8l7I09gl8fTro3hQJFHBWohUu3gy4CBq
 +YGg==
X-Gm-Message-State: AOJu0YxiNO54q7m1LR9OBElf8meFHVye0l78T5WHrIJv18dj449sWZzp
 vueg+ESCHJju1gwyTy+Ewc4=
X-Google-Smtp-Source: AGHT+IEGghCdzBziU0ofQaQe275cguEvh2BC8DqM3gV7WHjnKUnBRB+9ZdgQ0ERWkf7lud+gWsZk4Q==
X-Received: by 2002:a05:620a:15b3:b0:783:37fa:cd06 with SMTP id
 f19-20020a05620a15b300b0078337facd06mr702758qkk.92.1704897285203; 
 Wed, 10 Jan 2024 06:34:45 -0800 (PST)
Received: from hurd (dsl-10-148-203.b2b2c.ca. [72.10.148.203])
 by smtp.gmail.com with ESMTPSA id
 o15-20020ae9f50f000000b0078329049342sm1622906qkg.73.2024.01.10.06.34.44
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Wed, 10 Jan 2024 06:34:44 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: Efraim Flashner <efraim@HIDDEN>
Subject: Re: [bug#68300] [PATCH] gnu: Remove go-1.14.
In-Reply-To: <6dd5f6b5e031333fcfb06b666d4344389a9db595.1704623488.git.efraim@HIDDEN>
 (Efraim Flashner's message of "Sun, 7 Jan 2024 12:39:34 +0200")
References: <6dd5f6b5e031333fcfb06b666d4344389a9db595.1704623488.git.efraim@HIDDEN>
Date: Wed, 10 Jan 2024 09:34:43 -0500
Message-ID: <87sf35s1do.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 68300
Cc: 68300 <at> debbugs.gnu.org, Katherine Cox-Buday <cox.katherine.e+guix@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 (-)

Hello,

Efraim Flashner <efraim@HIDDEN> writes:

> * gnu/packages/golang.scm (go-1.14, go-std-1.14): Remove variables.
> (go-1.16): Inherit from go-1.4.
>
> Change-Id: Ie92019e3aa733a8c6f12dfefbc7b140eb1b76c5c

Casually reviewed, but LGTM!  I don't think it's a big deal to rebuild
all go packages; these are quick to build.

Reviewed-by: Maxim Cournoyer <maxim.cournoyer@gmail>

-- 
Thanks,
Maxim




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

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


Received: (at submit) by debbugs.gnu.org; 7 Jan 2024 10:40:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jan 07 05:40:15 2024
Received: from localhost ([127.0.0.1]:60687 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1rMQZi-0001NB-J4
	for submit <at> debbugs.gnu.org; Sun, 07 Jan 2024 05:40:15 -0500
Received: from lists.gnu.org ([2001:470:142::17]:55370)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <efraim.flashner@HIDDEN>) id 1rMQZg-0001Mu-JS
 for submit <at> debbugs.gnu.org; Sun, 07 Jan 2024 05:40:13 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <efraim.flashner@HIDDEN>)
 id 1rMQZT-0006Vq-M1
 for guix-patches@HIDDEN; Sun, 07 Jan 2024 05:39:59 -0500
Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <efraim.flashner@HIDDEN>)
 id 1rMQZQ-0007hZ-U3
 for guix-patches@HIDDEN; Sun, 07 Jan 2024 05:39:59 -0500
Received: by mail-wm1-x336.google.com with SMTP id
 5b1f17b1804b1-40d76fefd6bso10579625e9.2
 for <guix-patches@HIDDEN>; Sun, 07 Jan 2024 02:39:56 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1704623994; x=1705228794; darn=gnu.org;
 h=content-transfer-encoding:mime-version:message-id:date:subject:cc
 :to:from:sender:from:to:cc:subject:date:message-id:reply-to;
 bh=EH45Tx84lpvccPOCdq3oRJwmf9ZUrNsXj8v++aBuzQc=;
 b=Q62rfscT7a5xvg8niIP8K3jhVYh3JMPR8k8JkQncFz3wpXtwim8LHrbJp2nwwl+tjq
 PDMcUUvIhFkG+OsFYpq8OXy3nIXtbRxsFpO4wVMhudCHUID/lAXBKcivelwWEPJ/SlGF
 8WpnXDM/4Tf2bEZ0dkSbVyonWLq3hK1omGyM9eR0G1QkbQyM8xPxFENQXIUNSpp/NACa
 skDknZgQ1ZO9YlEs2ep/xgcg0s/jmXI0eflPpaEIHco61FlPOffUQBcWSFoOiOUTGnEC
 P7rtR66EjCdkPJ3eNSHSH9D++aB8RpRV6suhnjfH2ltkUrPfJ5Rxyt+Bp5rQS/KggOq9
 QCnQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1704623994; x=1705228794;
 h=content-transfer-encoding:mime-version:message-id:date:subject:cc
 :to:from:sender:x-gm-message-state:from:to:cc:subject:date
 :message-id:reply-to;
 bh=EH45Tx84lpvccPOCdq3oRJwmf9ZUrNsXj8v++aBuzQc=;
 b=THxOGHlG18DNhR/R0vNP3TJHaK1zn963BQoIo6YbU4J98sJZjMsaRqk+BysU1e3rBY
 UXWHu9aSEWMS7ah6Qz69rRR0TquX4iQIe4bqPI/zJ7fJmrk3u12N7ijjojSJPTiUnMxn
 0h3FMjQCmxydSoSXEg+Tbd2ermw3tCvXMbUrQi4kHiOGoK+m9KEm0ghxblBkCOuPs9GB
 W7Ad0o9LgcEIKVqO5hFYUF+fwHSEFC4YyqQX5JFJv/C33dhqZnPB+W4wJqrFXK2aDNtU
 1SDTu9C0/a7h132yckzaEAU5Ijp8i9rh4wfaVJzhVujt5g9ksTavyGkhLnNAXLQBng5q
 +zQw==
X-Gm-Message-State: AOJu0YzOVbcmlFVdY3L4+Mka2GD7wERGmMLu6XbLYFzKTjEfVA+ofnhq
 Us1GCtjBAx9Lq4JqNXfgljJulIyh8MZ4ew==
X-Google-Smtp-Source: AGHT+IEWgmbGS4Fa0+2mqfI45wkmqIyddPdwbtMABN4EmRRJZyyHxAVa0tOyH2SsYBLRecZIu34ITA==
X-Received: by 2002:a05:600c:3d98:b0:40e:4660:48f1 with SMTP id
 bi24-20020a05600c3d9800b0040e466048f1mr80076wmb.356.1704623993593; 
 Sun, 07 Jan 2024 02:39:53 -0800 (PST)
Received: from localhost ([141.226.15.142]) by smtp.gmail.com with ESMTPSA id
 d3-20020a05600c34c300b0040c3953cda5sm7331142wmq.45.2024.01.07.02.39.52
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sun, 07 Jan 2024 02:39:53 -0800 (PST)
From: Efraim Flashner <efraim@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] gnu: Remove go-1.14.
Date: Sun,  7 Jan 2024 12:39:34 +0200
Message-ID: <6dd5f6b5e031333fcfb06b666d4344389a9db595.1704623488.git.efraim@HIDDEN>
X-Mailer: git-send-email 2.41.0
MIME-Version: 1.0
X-Debbugs-Cc: Katherine Cox-Buday <cox.katherine.e+guix@HIDDEN>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Received-SPF: pass client-ip=2a00:1450:4864:20::336;
 envelope-from=efraim.flashner@HIDDEN; helo=mail-wm1-x336.google.com
X-Spam_score_int: -14
X-Spam_score: -1.5
X-Spam_bar: -
X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248,
 FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
 T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.5 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  * gnu/packages/golang.scm (go-1.14,
 go-std-1.14): Remove variables.
 (go-1.16): Inherit from go-1.4. Change-Id:
 Ie92019e3aa733a8c6f12dfefbc7b140eb1b76c5c
 --- gnu/packages/golang.scm | 250 +++++++ 1 file changed, 41 insertions(+),
 209 deletions(-) 
 Content analysis details:   (1.5 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail
 provider (efraim.flashner[at]gmail.com)
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 -0.0 SPF_HELO_PASS          SPF: HELO matches SPF record
 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
 mail domains are different
 0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and
 EnvelopeFrom freemail headers are different
 -0.0 T_SCC_BODY_TEXT_LINE   No description available.
X-Debbugs-Envelope-To: submit
Cc: Efraim Flashner <efraim@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: 0.5 (/)

* gnu/packages/golang.scm (go-1.14, go-std-1.14): Remove variables.
(go-1.16): Inherit from go-1.4.

Change-Id: Ie92019e3aa733a8c6f12dfefbc7b140eb1b76c5c
---
 gnu/packages/golang.scm | 250 +++++++---------------------------------
 1 file changed, 41 insertions(+), 209 deletions(-)

diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm
index 36e2c4b23e..f84389427c 100644
--- a/gnu/packages/golang.scm
+++ b/gnu/packages/golang.scm
@@ -259,11 +259,11 @@ (define-public go-1.4
     (supported-systems '("x86_64-linux" "i686-linux" "armhf-linux" "aarch64-linux"))
     (license license:bsd-3)))
 
-(define-public go-1.14
+(define-public go-1.16
   (package
     (inherit go-1.4)
     (name "go")
-    (version "1.14.15")
+    (version "1.16.15")
     (source
      (origin
        (method git-fetch)
@@ -273,63 +273,39 @@ (define-public go-1.14
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "1crh90qkvhlx23hwsi4wxy3l3h8973lr18135y6h1nnzzwr3n3ps"))))
+         "0vlk0r4600ah9fg5apdd93g7i369k0rkzcgn7cs8h6qq2k6hpxjl"))))
     (arguments
-     (substitute-keyword-arguments (package-arguments go-1.4)
-       ((#:system system)
-        (if (string-prefix? "aarch64-linux" (or (%current-system)
-                                                (%current-target-system)))
-          "aarch64-linux"
-          system))
+     (substitute-keyword-arguments
+       (strip-keyword-arguments '(#:tests? #:system) (package-arguments go-1.4))
        ((#:phases phases)
         `(modify-phases ,phases
+           (add-after 'unpack 'remove-unused-sourcecode-generators
+             (lambda _
+               ;; Prevent perl from inclusion in closure through unused files
+               (for-each delete-file (find-files "src" "\\.pl$"))))
            (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 (append (find-files ld "^ld-linux.+")
-                                           (find-files ld "^ld(64)?\\.so.+"))))
                       (net-base (assoc-ref inputs "net-base"))
                       (tzdata-path
-                       (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo"))
-                      (output (assoc-ref outputs "out")))
+                       (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo")))
 
                  ;; Having the patch in the 'patches' field of <origin> breaks
                  ;; the 'TestServeContent' test due to the fact that
                  ;; timestamps are reset.  Thus, apply it from here.
                  (invoke "patch" "-p2" "--force" "-i"
                          (assoc-ref inputs "go-skip-gc-test.patch"))
-
-                 ;; 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 object files/headers despite being present.
-                 (for-each
-                  delete-file
-                  '("cmd/go/testdata/script/mod_case_cgo.txt"
-                    "cmd/go/testdata/script/list_find.txt"
-                    "cmd/go/testdata/script/list_compiled_imports.txt"
-                    "cmd/go/testdata/script/cgo_syso_issue29253.txt"
-                    "cmd/go/testdata/script/cover_cgo.txt"
-                    "cmd/go/testdata/script/cover_cgo_xtest.txt"
-                    "cmd/go/testdata/script/cover_cgo_extra_test.txt"
-                    "cmd/go/testdata/script/cover_cgo_extra_file.txt"
-                    "cmd/go/testdata/script/cgo_path_space.txt"
-                    "cmd/go/testdata/script/ldflag.txt"
-                    "cmd/go/testdata/script/cgo_path.txt"))
+                 (invoke "patch" "-p2" "--force" "-i"
+                         (assoc-ref inputs "go-fix-script-tests.patch"))
 
                  (for-each make-file-writable (find-files "."))
 
                  (substitute* "os/os_test.go"
                    (("/usr/bin") (getcwd))
-                   (("/bin/pwd") (which "pwd"))
                    (("/bin/sh") (which "sh")))
 
-                 ;; Backport fix for go-1.14 with GCC 9+
-                 ;; https://github.com/golang/go/issues/39157
-                 (substitute* "cmd/go/note_test.go"
-                   (("cannot find 'ld'") "cannot find [‘']ld[’']"))
+                 (substitute* "cmd/go/testdata/script/cgo_path_space.txt"
+                   (("/bin/sh") (which "sh")))
 
                  ;; Add libgcc to runpath
                  (substitute* "cmd/link/internal/ld/lib.go"
@@ -337,7 +313,7 @@ (define-public go-1.14
                  (substitute* "cmd/go/internal/work/gccgo.go"
                    (("cgoldflags := \\[\\]string\\{\\}")
                     (string-append "cgoldflags := []string{"
-                                   "\"-rpath=" gcclib "\""
+                                   "\"-Wl,-rpath=" gcclib "\""
                                    "}"))
                    (("\"-lgcc_s\", ")
                     (string-append
@@ -406,28 +382,42 @@ (define-public go-1.14
                  (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)))
+                   (("/usr/share/zoneinfo/") tzdata-path)))))
            (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")))
                  (setenv "GOROOT_BOOTSTRAP" go)
-                 (setenv "GOGC" "400")
-                 #t)))
+                 (setenv "GOGC" "400"))))
            (replace 'build
-             (lambda* (#:key inputs outputs #:allow-other-keys)
+             (lambda* (#:key inputs outputs (parallel-build? #t)
+                       #:allow-other-keys)
                ;; FIXME: Some of the .a files are not bit-reproducible.
-               (let* ((output (assoc-ref outputs "out")))
+               ;; (Is this still true?)
+               (let* ((njobs (if parallel-build? (parallel-job-count) 1))
+                      (output (assoc-ref outputs "out"))
+                      (loader (string-append (assoc-ref inputs "libc")
+                                             ,(glibc-dynamic-linker))))
                  (setenv "CC" (which "gcc"))
+                 (setenv "GO_LDSO" loader)
                  (setenv "GOOS" "linux")
                  (setenv "GOROOT" (dirname (getcwd)))
                  (setenv "GOROOT_FINAL" output)
                  (setenv "GOCACHE" "/tmp/go-cache")
-                 (setenv "CGO_ENABLED" "1")
-                 (invoke "sh" "all.bash"))))
+                 (setenv "GOMAXPROCS" (number->string njobs))
+                 (invoke "sh" "make.bash" "--no-banner"))))
+           (replace 'check
+             (lambda* (#:key target (tests? (not target)) (parallel-tests? #t)
+                       #:allow-other-keys)
+               (let* ((njobs (if parallel-tests? (parallel-job-count) 1)))
+                 (when tests?
+                   (setenv "GOMAXPROCS" (number->string njobs))
+                   (invoke "sh" "run.bash" "--no-rebuild")))))
+           (add-before 'install 'unpatch-perl-shebangs
+             (lambda _
+               ;; Rewrite references to perl input in test scripts
+               (substitute* "net/http/cgi/testdata/test.cgi"
+                 (("^#!.*") "#!/usr/bin/env perl\n"))))
            (replace 'install
              ;; TODO: Most of this could be factorized with Go 1.4.
              (lambda* (#:key outputs #:allow-other-keys)
@@ -461,8 +451,7 @@ (define-public go-1.14
                   '("README.md" "CONTRIBUTORS" "AUTHORS" "PATENTS"
                     "LICENSE" "VERSION" "CONTRIBUTING.md" "robots.txt"))
 
-                 (copy-recursively "../" output)
-                 #t)))))))
+                 (copy-recursively "../" output))))))))
     (native-inputs
      `(,@(if (member (%current-system) (package-supported-systems go-1.4))
            `(("go" ,go-1.4))
@@ -472,167 +461,11 @@ (define-public go-1.14
            ((or "armhf-linux" "aarch64-linux")
             `(("gold" ,binutils-gold)))
            (_ `()))
+       ("go-fix-script-tests.patch" ,(search-patch "go-fix-script-tests.patch"))
        ,@(package-native-inputs go-1.4)))
     (supported-systems (fold delete %supported-systems
                              (list "powerpc-linux" "i586-gnu")))))
 
-(define-public go-1.16
-  (package
-    (inherit go-1.14)
-    (name "go")
-    (version "1.16.15")
-    (source
-     (origin
-       (method git-fetch)
-       (uri (git-reference
-             (url "https://github.com/golang/go")
-             (commit (string-append "go" version))))
-       (file-name (git-file-name name version))
-       (sha256
-        (base32
-         "0vlk0r4600ah9fg5apdd93g7i369k0rkzcgn7cs8h6qq2k6hpxjl"))))
-    (arguments
-     (substitute-keyword-arguments
-         (strip-keyword-arguments '(#:tests?) (package-arguments go-1.14))
-       ((#:phases phases)
-        `(modify-phases ,phases
-           (add-after 'unpack 'remove-unused-sourcecode-generators
-             (lambda _
-               ;; Prevent perl from inclusion in closure through unused files
-               (for-each delete-file (find-files "src" "\\.pl$"))))
-           (replace 'prebuild
-             (lambda* (#:key inputs outputs #:allow-other-keys)
-               (let* ((gcclib (string-append (assoc-ref inputs "gcc:lib") "/lib"))
-                      (net-base (assoc-ref inputs "net-base"))
-                      (tzdata-path
-                       (string-append (assoc-ref inputs "tzdata") "/share/zoneinfo")))
-
-                 ;; Having the patch in the 'patches' field of <origin> breaks
-                 ;; the 'TestServeContent' test due to the fact that
-                 ;; timestamps are reset.  Thus, apply it from here.
-                 (invoke "patch" "-p2" "--force" "-i"
-                         (assoc-ref inputs "go-skip-gc-test.patch"))
-                 (invoke "patch" "-p2" "--force" "-i"
-                         (assoc-ref inputs "go-fix-script-tests.patch"))
-
-                 (for-each make-file-writable (find-files "."))
-
-                 (substitute* "os/os_test.go"
-                   (("/usr/bin") (getcwd))
-                   (("/bin/sh") (which "sh")))
-
-                 (substitute* "cmd/go/testdata/script/cgo_path_space.txt"
-                   (("/bin/sh") (which "sh")))
-
-                 ;; 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{"
-                                   "\"-Wl,-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.+)")
-                    ("net/cgo_unix_test.go" "(.+)(TestCgoLookupPort.+)")
-                    ("net/cgo_unix_test.go" "(.+)(TestCgoLookupPortWithCancel.+)")
-                    ;; 127.0.0.1 doesn't exist
-                    ("net/cgo_unix_test.go" "(.+)(TestCgoLookupPTR.+)")
-                    ;; 127.0.0.1 doesn't exist
-                    ("net/cgo_unix_test.go" "(.+)(TestCgoLookupPTRWithCancel.+)")
-                    ;; /etc/services doesn't exist
-                    ("net/parse_test.go" "(.+)(TestReadLine.+)")
-                    ("os/os_test.go" "(.+)(TestHostname.+)")
-                    ;; The user's directory doesn't exist
-                    ("os/os_test.go" "(.+)(TestUserHomeDir.+)")
-                    ("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.+)")))
-
-                 ;; These tests fail on aarch64-linux
-                 (substitute* "cmd/dist/test.go"
-                   (("t.registerHostTest\\(\"testsanitizers/msan.*") ""))
-
-                 ;; 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)))))
-           (replace 'build
-             (lambda* (#:key inputs outputs (parallel-build? #t)
-                       #:allow-other-keys)
-               ;; FIXME: Some of the .a files are not bit-reproducible.
-               ;; (Is this still true?)
-               (let* ((njobs (if parallel-build? (parallel-job-count) 1))
-                      (output (assoc-ref outputs "out"))
-                      (loader (string-append (assoc-ref inputs "libc")
-                                             ,(glibc-dynamic-linker))))
-                 (setenv "CC" (which "gcc"))
-                 (setenv "GO_LDSO" loader)
-                 (setenv "GOOS" "linux")
-                 (setenv "GOROOT" (dirname (getcwd)))
-                 (setenv "GOROOT_FINAL" output)
-                 (setenv "GOCACHE" "/tmp/go-cache")
-                 (setenv "GOMAXPROCS" (number->string njobs))
-                 (invoke "sh" "make.bash" "--no-banner"))))
-           (replace 'check
-             (lambda* (#:key target (tests? (not target)) (parallel-tests? #t)
-                       #:allow-other-keys)
-               (let* ((njobs (if parallel-tests? (parallel-job-count) 1)))
-                 (when tests?
-                   (setenv "GOMAXPROCS" (number->string njobs))
-                   (invoke "sh" "run.bash" "--no-rebuild")))))
-           (add-before 'install 'unpatch-perl-shebangs
-             (lambda _
-               ;; Rewrite references to perl input in test scripts
-               (substitute* "net/http/cgi/testdata/test.cgi"
-                 (("^#!.*") "#!/usr/bin/env perl\n"))))))))
-    (native-inputs
-     `(("go-fix-script-tests.patch" ,(search-patch "go-fix-script-tests.patch"))
-       ,@(package-native-inputs go-1.14)))))
-
 ;; https://github.com/golang/go/wiki/MinimumRequirements#microarchitecture-support
 (define %go-1.17-arm-micro-architectures
   (list "armv5" "armv6" "armv7"))
@@ -1142,7 +975,6 @@ (define make-go-std
 (export make-go-std)
 
 ;; Make those public so they have a corresponding Cuirass job.
-(define-public go-std-1.14 (make-go-std go-1.14))
 (define-public go-std-1.16 (make-go-std go-1.16))
 (define-public go-std-1.17 (make-go-std go-1.17))
 (define-public go-std-1.18 (make-go-std go-1.18))

base-commit: 25bcf4eda05b501758b11a53823867dc500ac7d1
-- 
Efraim Flashner   <efraim@HIDDEN>   רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted





Acknowledgement sent to Efraim Flashner <efraim@HIDDEN>:
New bug report received and forwarded. Copy sent to cox.katherine.e+guix@HIDDEN, guix-patches@HIDDEN. Full text available.
Report forwarded to cox.katherine.e+guix@HIDDEN, guix-patches@HIDDEN:
bug#68300; Package guix-patches. 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: Sat, 20 Jan 2024 12:30:02 UTC

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