From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 14 12:01:21 2017 Received: (at submit) by debbugs.gnu.org; 14 Nov 2017 17:01:22 +0000 Received: from localhost ([127.0.0.1]:40452 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEeaP-0003uM-Lh for submit@debbugs.gnu.org; Tue, 14 Nov 2017 12:01:21 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54229) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEeaO-0003uB-5i for submit@debbugs.gnu.org; Tue, 14 Nov 2017 12:01:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eEeaE-0002mk-Ok for submit@debbugs.gnu.org; Tue, 14 Nov 2017 12:01:14 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:33013) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eEeaE-0002mT-Lw for submit@debbugs.gnu.org; Tue, 14 Nov 2017 12:01:10 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eEea8-00033b-7S for guix-patches@gnu.org; Tue, 14 Nov 2017 12:01:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eEea2-0002ZE-01 for guix-patches@gnu.org; Tue, 14 Nov 2017 12:01:04 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:45045) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eEea1-0002WX-Lk for guix-patches@gnu.org; Tue, 14 Nov 2017 12:00:57 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 030DA20D7D; Tue, 14 Nov 2017 12:00:54 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Tue, 14 Nov 2017 12:00:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=date:from:message-id:subject:to:x-me-sender:x-me-sender :x-sasl-enc; s=mesmtp; bh=NZcOLxpwoQ+0XCa491Bc5Lh8BTYrqD4QjsbKID sjX5g=; b=hYoYQqaGsGNz2kYbk0TcpZ8SLa7qfVw64nUtFY2CMCw3avVk2pTYIV I8KjyurH+vBOFtxyVnnfMwyZso4sZMZ3IyPVUTDgbS0Sz0Q4xzFSmuvvD/tX+Rqd 8v013X9Qn72bCQCsQr/5ZqT59oTJ46esane7vZbgYUfpwlqvnnFNI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=date:from:message-id:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=NZcOLxpwoQ+0XCa49 1Bc5Lh8BTYrqD4QjsbKIDsjX5g=; b=OlFVj3dj11i7V2RAiZ9HQ3TtBHdNl3Bah TjrW1dIUNc/D5pkg/r01APlxi7D6UU6vOPM3vOXhiuIlEI2BRcQZwanhGyvBfIoZ ykg2LMVkGX+kYlhA7ZcXYb6DwAqQQb6AnThFXik77Gum+TRLgpbxdwNIrVvONt49 Vq6G2aATFlED01wDDvRldnMDS/IShGJ2peCKR/evx4Ipgz4or+kQK+hbzGQVU3U0 Lrx2Jls69p/PgJ/6Gq3EsGTYwrpz7oIotoAB9RulY6vfwxbFXpn3jOyz0wle9t63 lEJ/xVjIScMtT3KUwNhHNDfhLhOHa/DnzJwfFITqV6cWLe+em0QEw== X-ME-Sender: Received: from jasmine.lan (96-90-63-214-static.hfc.comcastbusiness.net [96.90.63.214]) by mail.messagingengine.com (Postfix) with ESMTPA id 831B024A6B for ; Tue, 14 Nov 2017 12:00:54 -0500 (EST) From: Leo Famulari To: guix-patches@gnu.org Subject: [PATCH] build-system/go: Don't let Go executables refer to the Go compiler. Date: Tue, 14 Nov 2017 12:00:36 -0500 Message-Id: <5669d4a6fba88e2dd1e048fd2ba292cf5a7c8d15.1510678556.git.leo@famulari.name> X-Mailer: git-send-email 2.15.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) This is a naive adaptation of ((guix build utils) remove-store-references). It takes ~55 seconds to remove the references from Syncthing's executables (96 MiB) on an SSD. Any ideas about how to speed it up? * guix/build/go-build-system.scm (remove-store-reference, remove-go-references): New variables. (%standard-phases): Add 'remove-go-references' phase. * guix/build/go.scm (go-build): Add allow-go-reference? key. --- guix/build-system/go.scm | 2 ++ guix/build/go-build-system.scm | 52 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 53 insertions(+), 1 deletion(-) diff --git a/guix/build-system/go.scm b/guix/build-system/go.scm index ec447d2a2..cf9116327 100644 --- a/guix/build-system/go.scm +++ b/guix/build-system/go.scm @@ -82,6 +82,7 @@ (import-path "") (unpack-path "") (tests? #t) + (allow-go-reference? #f) (system (%current-system)) (guile #f) (imported-modules %go-build-system-modules) @@ -107,6 +108,7 @@ #:import-path ,import-path #:unpack-path ,unpack-path #:tests? ,tests? + #:allow-go-reference? ,allow-go-reference? #:inputs %build-inputs))) (define guile-for-build diff --git a/guix/build/go-build-system.scm b/guix/build/go-build-system.scm index d175f3b76..05fc2d8ae 100644 --- a/guix/build/go-build-system.scm +++ b/guix/build/go-build-system.scm @@ -22,6 +22,8 @@ #:use-module (guix build utils) #:use-module (ice-9 match) #:use-module (srfi srfi-1) + #:use-module (rnrs io ports) + #:use-module (rnrs bytevectors) #:export (%standard-phases go-build)) @@ -204,6 +206,53 @@ on $GOBIN in the build phase." (copy-recursively "pkg" (string-append (assoc-ref outputs "out") "/pkg"))) #t) +(define* (remove-store-reference file file-name + #:optional (store (%store-directory))) + "Remove from FILE occurrences of FILE-NAME in STORE; return #t when FILE-NAME +is encountered in FILE, #f otherwise." + (define pattern + (string-take file-name + (+ 34 (string-length (%store-directory))))) + + (with-fluids ((%default-port-encoding #f)) + (with-atomic-file-replacement file + (lambda (in out) + ;; We cannot use `regexp-exec' here because it cannot deal with + ;; strings containing NUL characters. + (format #t "removing references to `~a' from `~a'...~%" file-name file) + (setvbuf in 'block 65536) + (setvbuf out 'block 65536) + (fold-port-matches (lambda (match result) + (put-bytevector out (string->utf8 store)) + (put-u8 out (char->integer #\/)) + (put-bytevector out + (string->utf8 + "eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-")) + #t) + #f + pattern + in + (lambda (char result) + (put-u8 out (char->integer char)) + result)))))) + +(define* (remove-go-references #:key allow-go-reference? + inputs outputs #:allow-other-keys) + "Remove any references to the Go compiler from the compiled Go executable +files in OUTPUTS." + (if allow-go-reference? + #t + (let ((go (assoc-ref inputs "go")) + (bin "/bin")) + (for-each (lambda (output) + (when (file-exists? (string-append (cdr output) + bin)) + (for-each (lambda (file) + (remove-store-reference file go)) + (find-files (string-append (cdr output) bin))))) + outputs) + #t))) + (define %standard-phases (modify-phases gnu:%standard-phases (delete 'configure) @@ -213,7 +262,8 @@ on $GOBIN in the build phase." (add-before 'build 'setup-environment setup-environment) (replace 'build build) (replace 'check check) - (replace 'install install))) + (replace 'install install) + (add-after 'install 'remove-go-references remove-go-references))) (define* (go-build #:key inputs (phases %standard-phases) #:allow-other-keys #:rest args) -- 2.15.0 From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 14 13:58:14 2017 Received: (at 29299) by debbugs.gnu.org; 14 Nov 2017 18:58:14 +0000 Received: from localhost ([127.0.0.1]:40545 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEgPW-00009D-0A for submit@debbugs.gnu.org; Tue, 14 Nov 2017 13:58:14 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:33277) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEgPU-000095-14 for 29299@debbugs.gnu.org; Tue, 14 Nov 2017 13:58:12 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 8E36420FFF; Tue, 14 Nov 2017 13:58:11 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Tue, 14 Nov 2017 13:58:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= mesmtp; bh=OUJDf3ArK0ka4RBPlvf450o7m+sr71f6rhqnUsyKr+8=; b=rizXF +mRO4sz4CEO8CloJoQttAubPu+bwa+bsixak8H52TWs3e8NBm2b2DWqeaqXdEjRn K36DVeTPdINuBFRf4FnF1GRqFjhLGbga9T3nEG6xGyciaEx6U3X+wqo8rZGAzPh9 uj7dl/IgMMCgOoODGivhH3ZGmXH4kFulB+OaDg= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=OUJDf3ArK0ka4RBPlvf450o7m+sr7 1f6rhqnUsyKr+8=; b=MRpPr+HezrYW9OnSX8UFscXJ0rDy1ld4Q16ZuyYpCu+zI b94fzWgWdLmObCyf0i4teqqtEy7ZRudlLQtoigNsEm6mBgkIINUni9rjK/J3iqxK zgl4QpEVgGWXlxoIb+bfvSgxoy7opGOVEDf05chw++TkDfgG6WLO9n+Bt7ZWg/kU wGl75y/BtFO8c37XxwgKNeDUkh1V0vdSzRXlrebkqQ2cpFdxm17EvQjFGXhhlBgM BhFRlkq+TMVLB3KEpCBPjoC6Ip44VzxiNbEcCxX+PBvpASNtXuXqnOWqLzlWLqK1 VXFXbfrwnlJIiJ5KELH5LfhusSsyS438XxnGc1nTg== X-ME-Sender: Received: from localhost (96-90-63-214-static.hfc.comcastbusiness.net [96.90.63.214]) by mail.messagingengine.com (Postfix) with ESMTPA id 1ADBC24A6B for <29299@debbugs.gnu.org>; Tue, 14 Nov 2017 13:58:09 -0500 (EST) Date: Tue, 14 Nov 2017 13:57:38 -0500 From: Leo Famulari To: 29299@debbugs.gnu.org Subject: Re: [PATCH] build-system/go: Don't let Go executables refer to the Go compiler. Message-ID: <20171114185738.GA11015@jasmine.lan> References: <5669d4a6fba88e2dd1e048fd2ba292cf5a7c8d15.1510678556.git.leo@famulari.name> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline In-Reply-To: <5669d4a6fba88e2dd1e048fd2ba292cf5a7c8d15.1510678556.git.leo@famulari.name> User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 29299 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 14, 2017 at 12:00:36PM -0500, Leo Famulari wrote: > This is a naive adaptation of ((guix build utils) > remove-store-references).=20 >=20 > It takes ~55 seconds to remove the references from Syncthing's > executables (96 MiB) on an SSD. Any ideas about how to speed it up? I checked, and remove-store-references (aka nuke-refs) takes the same amount of time. --x+6KMIRAuhnl3hBn Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAloLPJ4ACgkQJkb6MLrK fwisKBAAlAxx9tPJ80WeptONBr830DQw/UcVFt8yE8ejbYuS3gUGrAs3uEgsSsHh kG40T1BCzDHFootj1h5Vnb61JsigFQCtqPjO/bVB2Bdc4GUUm5+QyHsXHJW4MNO6 d4k8qVJcldtpaOexs/j5oM9t4e3cd7lis6C9Wfy9Drh/7FLQJQ0P8hInzpLlb26O 7p5fat8qyT5CUyzt875XHmXSTtnAtUoPM6/DzOTr0uld2isSMCljJ7ndPwFk9lb+ lztGs0Xgy/IX+BZ3GVs4D5c9GGfI/Vr2mVase2EGzfnu9L1fKiJOf8Asj8m8pIvN N5oIAb7PkJGkxIVwLycoRlJWC2iW5InMDXidi73vBSYPR6uWvi8U3TugWMmjlaob atcDxMFQPiDBxal2+IhSaYwtP5yqk4wk6aZP1KMaPRDFvaYF1nQG8yvuKiJSoBSM 9E1hsMVjtsh7giunQLxNvcxXvf8aj2SiG+DPyn0prcR79YfXGishP66kImYommx4 9VNiUddwU2UI3IwvlQXCHyiuADtxjh0/rzrtY5cMcWWZudQxuNLYmkKQrfNh1ZFR L+d+tKV1b9ZLjz2eYbMP6G7K0RsDnQuy/Y6v3rAsynMqdoiPl3iuAOIRQzS1ukDS uAIohZFk4MZLyw0TnpRMtcKGdKCmPIMrVeSZlX+IA1knPGsELOY= =1znh -----END PGP SIGNATURE----- --x+6KMIRAuhnl3hBn-- From debbugs-submit-bounces@debbugs.gnu.org Tue Nov 14 15:48:54 2017 Received: (at 29299) by debbugs.gnu.org; 14 Nov 2017 20:48:54 +0000 Received: from localhost ([127.0.0.1]:40615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEi8c-0002po-HW for submit@debbugs.gnu.org; Tue, 14 Nov 2017 15:48:54 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:53517) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eEi8a-0002pf-Oo for 29299@debbugs.gnu.org; Tue, 14 Nov 2017 15:48:53 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id EAA5B20CA3; Tue, 14 Nov 2017 15:48:51 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Tue, 14 Nov 2017 15:48:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= mesmtp; bh=rQErzgY0zVNgBgYmZzKslHT3Rzb5j0LoQ2MT4ybKjYI=; b=sHSFP 0DT3B7IXw+tfl3FhAl/wnGJ6bhCYwJSetTpGf5BBsvMa7uhC9pBn74zg0B5DyxoN FGvVD6kPM4rwZs3bmtX3HaC+TfrspYXjngEtlOBosHem8q/aASI8bR7oMhKurTSG upRIO6/HAQNAhP9NcG8YrjlXe0ZfKtlNgSL6K4= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=rQErzgY0zVNgBgYmZzKslHT3Rzb5j 0LoQ2MT4ybKjYI=; b=eJX/yTAD8AeM5Vzr+DJby5uMoeNtYDHiy/8s4+3KUzSgf 056CeIoE5mEiFXHZ0AoT43TIoVC1Ihgaw36W59ZljHGkhtA7oObZJCJYgTAEVm0h su495va3Ep6lmbmuBmQQf3bw0UIy641WkJfEyjvEh0LanuXiG6h4ERILgwO071XN KTYFeWywksOwhYLShvkYEWsl/IUXXQ8zypr/Fn0v2Ah3jjz61JRqaPTt7yDm2Ox4 ac8OZrEvVyUcB6pnQ3bMf6Z/z8nXv5nZaLcMD6LhcbZg3gcUQdsVeJ7oUc1Kehif u5rYfYv1qo/zw9+AzTrWTXp+7ELWTR5TaAsjDkzxw== X-ME-Sender: Received: from localhost (96-90-63-214-static.hfc.comcastbusiness.net [96.90.63.214]) by mail.messagingengine.com (Postfix) with ESMTPA id 9D70A7FAF1 for <29299@debbugs.gnu.org>; Tue, 14 Nov 2017 15:48:51 -0500 (EST) Date: Tue, 14 Nov 2017 15:48:17 -0500 From: Leo Famulari To: 29299@debbugs.gnu.org Subject: Re: [PATCH] build-system/go: Don't let Go executables refer to the Go compiler. Message-ID: <20171114204817.GA9307@jasmine.lan> References: <5669d4a6fba88e2dd1e048fd2ba292cf5a7c8d15.1510678556.git.leo@famulari.name> <20171114185738.GA11015@jasmine.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0OAP2g/MAC+5xKAE" Content-Disposition: inline In-Reply-To: <20171114185738.GA11015@jasmine.lan> User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 29299 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --0OAP2g/MAC+5xKAE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 14, 2017 at 01:57:38PM -0500, Leo Famulari wrote: > On Tue, Nov 14, 2017 at 12:00:36PM -0500, Leo Famulari wrote: > > This is a naive adaptation of ((guix build utils) > > remove-store-references).=20 > >=20 > > It takes ~55 seconds to remove the references from Syncthing's > > executables (96 MiB) on an SSD. Any ideas about how to speed it up? >=20 > I checked, and remove-store-references (aka nuke-refs) takes the same > amount of time. So, fold-port-matches reads the port one character at a time, IIUC (I don't really understand it). I think we don't need to do that in this case. We could instead do Boyer-Moore and skip 34 bytes + the length of %store-directory, which could speed things up a lot. But, I don't think we should wait for that in order to push this patch :) --0OAP2g/MAC+5xKAE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAloLVo0ACgkQJkb6MLrK fwjwPxAAqqKRHMkpC2xpx0oqdCAE61eZHsi4WXheiZF+sAGOxcVefkqF1qlAwzF2 3gw9vc0jWE8SZFOCrN7If+jb2DQjTXYKzUxtaWBHiqCejCQmPTxMtfPiG9HsJFTG H1MiI9Jnl+m+Z+4ADlX30altx/4sbubuPx/0M4OxW36YlkKnJZou9bQlNYPeUZxS OsbIdfqkYM90ZjQCEz4bSz04RxWHkZbsVYeG08Vl9QQPHLvxI+KJnkD6F1/n/yf/ dQYyhrgWAPbdhxpEDFilx1+b94owXtH84i55Ah3jThHrQ60mQzJDHnP44p60gPEK EwuvQlOMWtc7v5N/CvzWL3ox13XcUIJ5toYTCxxOP/7jNQd2NcM31GeYoGBZwLhq +kgk/1J+gStQUbUgHg+85YsLHGHSVqT6Wt1GaFXyzNxrPbaVatXkW9zkt9zSTcxD uq/F4L8i0w0n884haCXsfu64Ci8d8pfM+2alyXl3kb4/qrxurs/+Pkyn7XaPUI9Z zzoReYvagmM2/b6iuUuDNXEfyi3F7Z4ZYezDqjZmB9k6EIICNkc0Z6wVcUsDHh0O 5Ns/5SLQ6HyIUPBMf6r+2gWP1u4BICOZ1oP0hAsJElzigZmx6oPAa2UtKSHL5zpV DdUlVYyFrI9vFQlZhJzC4tcfLuiqk3ckybRyIl0JOeDw1lJRifg= =kc94 -----END PGP SIGNATURE----- --0OAP2g/MAC+5xKAE-- From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 16 05:50:28 2017 Received: (at 29299) by debbugs.gnu.org; 16 Nov 2017 10:50:28 +0000 Received: from localhost ([127.0.0.1]:42653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFHka-0001pj-Ix for submit@debbugs.gnu.org; Thu, 16 Nov 2017 05:50:28 -0500 Received: from hera.aquilenet.fr ([141.255.128.1]:45596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFHkY-0001pa-1B for 29299@debbugs.gnu.org; Thu, 16 Nov 2017 05:50:26 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id D60D4F8AF; Thu, 16 Nov 2017 11:50:26 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xAXcba_i7ebv; Thu, 16 Nov 2017 11:50:26 +0100 (CET) Received: from ribbon (unknown [193.50.110.175]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 212B49A5E; Thu, 16 Nov 2017 11:50:26 +0100 (CET) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Leo Famulari Subject: Re: [bug#29299] [PATCH] build-system/go: Don't let Go executables refer to the Go compiler. References: <5669d4a6fba88e2dd1e048fd2ba292cf5a7c8d15.1510678556.git.leo@famulari.name> <20171114185738.GA11015@jasmine.lan> <20171114204817.GA9307@jasmine.lan> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 26 Brumaire an 226 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 16 Nov 2017 11:50:23 +0100 In-Reply-To: <20171114204817.GA9307@jasmine.lan> (Leo Famulari's message of "Tue, 14 Nov 2017 15:48:17 -0500") Message-ID: <87wp2qfqfk.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 29299 Cc: 29299@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Heya, Leo Famulari skribis: > On Tue, Nov 14, 2017 at 01:57:38PM -0500, Leo Famulari wrote: >> On Tue, Nov 14, 2017 at 12:00:36PM -0500, Leo Famulari wrote: >> > This is a naive adaptation of ((guix build utils) >> > remove-store-references).=20 >> >=20 >> > It takes ~55 seconds to remove the references from Syncthing's >> > executables (96 MiB) on an SSD. Any ideas about how to speed it up? >>=20 >> I checked, and remove-store-references (aka nuke-refs) takes the same >> amount of time. > > So, fold-port-matches reads the port one character at a time, IIUC (I > don't really understand it). > > I think we don't need to do that in this case. We could instead do > Boyer-Moore and skip 34 bytes + the length of %store-directory, which > could speed things up a lot. Indeed. Mark=E2=80=99s code in (guix build grafts) does this, perhaps that would be a better source of inspiration. But yeah, no need to wait for that optimization. :-) Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Nov 16 05:52:59 2017 Received: (at 29299) by debbugs.gnu.org; 16 Nov 2017 10:52:59 +0000 Received: from localhost ([127.0.0.1]:42657 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFHn1-0001tB-1I for submit@debbugs.gnu.org; Thu, 16 Nov 2017 05:52:59 -0500 Received: from hera.aquilenet.fr ([141.255.128.1]:45601) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFHmz-0001t4-Eh for 29299@debbugs.gnu.org; Thu, 16 Nov 2017 05:52:57 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id F2287E7AE; Thu, 16 Nov 2017 11:52:58 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YelfB-0x8CH4; Thu, 16 Nov 2017 11:52:58 +0100 (CET) Received: from ribbon (unknown [193.50.110.175]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 41CEB9A5E; Thu, 16 Nov 2017 11:52:58 +0100 (CET) From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Leo Famulari Subject: Re: [bug#29299] [PATCH] build-system/go: Don't let Go executables refer to the Go compiler. References: <5669d4a6fba88e2dd1e048fd2ba292cf5a7c8d15.1510678556.git.leo@famulari.name> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 26 Brumaire an 226 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 16 Nov 2017 11:52:55 +0100 In-Reply-To: <5669d4a6fba88e2dd1e048fd2ba292cf5a7c8d15.1510678556.git.leo@famulari.name> (Leo Famulari's message of "Tue, 14 Nov 2017 12:00:36 -0500") Message-ID: <87shdefqbc.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 29299 Cc: 29299@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Hello, Leo Famulari skribis: > This is a naive adaptation of ((guix build utils) > remove-store-references).=20 > > It takes ~55 seconds to remove the references from Syncthing's > executables (96 MiB) on an SSD. Any ideas about how to speed it up? > > * guix/build/go-build-system.scm (remove-store-reference, remove-go-refer= ences): > New variables. > (%standard-phases): Add 'remove-go-references' phase. > * guix/build/go.scm (go-build): Add allow-go-reference? key. [...] > +(define* (remove-store-reference file file-name > + #:optional (store (%store-directory))) > + "Remove from FILE occurrences of FILE-NAME in STORE; return #t when FI= LE-NAME > +is encountered in FILE, #f otherwise." Maybe leave a note about the optimization opportunity. > +(define* (remove-go-references #:key allow-go-reference? > + inputs outputs #:allow-other-keys) > + "Remove any references to the Go compiler from the compiled Go executa= ble > +files in OUTPUTS." =E2=80=A6 and here a comment as to why we=E2=80=99re doing this, possibly l= inking to previous discussions. Otherwise LGTM, thank you! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 17 18:27:10 2017 Received: (at control) by debbugs.gnu.org; 17 Nov 2017 23:27:10 +0000 Received: from localhost ([127.0.0.1]:45425 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFq2O-0008HW-Vm for submit@debbugs.gnu.org; Fri, 17 Nov 2017 18:27:09 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:59033) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eFq2N-0008HO-BB for control@debbugs.gnu.org; Fri, 17 Nov 2017 18:27:07 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id EC18F20AEF; Fri, 17 Nov 2017 18:27:05 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Fri, 17 Nov 2017 18:27:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=famulari.name; h=content-type:date:from:message-id:mime-version:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=6EL0I0Rk3AMMQs5LXVotI7Axx7 pmMyakoc2L9u/BKRI=; b=vIHgYWRPBXYJlnpwCQgECuw1AUP9KdYFDXw9krd/99 bmohzWWdS9hJG8jZxZXoyEIhLTTSxGJ7GRuBYDv08vuoIhgXxvVSLLw9DCBao3lu dtjMnENRh6OGAlyfOFW29XIqTnS9LOCMEXK8BK63u2uqEVVf8869Pgx6HtRGNWJm 0= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=6 EL0I0Rk3AMMQs5LXVotI7Axx7pmMyakoc2L9u/BKRI=; b=hhi+BW4rxiCN/TGRz gLc7IuR+vmHLeqPfiitkK5io/dFdU6mumOtTtqX3c7gmYteZxARWV+K29a6cCbLo XdP5TIM8d6xDpcqIh6BzDWfe0OirZnmz21Bh8dc49Eam12soAeqCH55DbAHAQpxl 6blBRxmFb9NAIssUgt8F0V87ikgMKFxUFJ68gB3phwc4LLsYeOYD6Ikt3eBpyOmW DPFmLE97aaEm6WU5yQHMO3kSGKQnYLEgYTrZmwIWPLHFqdyrA3WLeHrAXTybwOd/ meKWyMfuMBFVCcERMcBNrc0f2MNYmoXaN2k4XZIBkimSK2H6ROBZ1UfOUxVzxSPl lVPkA== X-ME-Sender: Received: from localhost (c-73-165-108-70.hsd1.pa.comcast.net [73.165.108.70]) by mail.messagingengine.com (Postfix) with ESMTPA id B0CC4246D5 for ; Fri, 17 Nov 2017 18:27:05 -0500 (EST) Date: Fri, 17 Nov 2017 18:27:00 -0500 From: Leo Famulari To: control@debbugs.gnu.org Message-ID: <20171117232700.GA25044@jasmine.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.9.1 (2017-09-22) X-Spam-Score: 1.3 (+) 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: close 29299 [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [66.111.4.28 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [66.111.4.28 listed in wl.mailspike.net] 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.3 (+) 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: close 29299 [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [66.111.4.28 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [66.111.4.28 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid 0.0 TVD_SPACE_RATIO No description available. 1.8 MISSING_SUBJECT Missing Subject: header 0.2 NO_SUBJECT Extra score for no subject -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders close 29299 From unknown Tue Sep 23 03:23:54 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 16 Dec 2017 12:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator