From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id SP1BFFK2r2TgbgAASxT56A (envelope-from ) for ; Thu, 13 Jul 2023 10:31:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id EH8gFFK2r2QZPAEAauVa8A (envelope-from ) for ; Thu, 13 Jul 2023 10:31:14 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 32BE73A32B for ; Thu, 13 Jul 2023 10:31:13 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=elephly.net header.s=zoho header.b=gajKvSqZ; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1689237074; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=A1pVJh1z+Og8xzJbOj5hYiiWHnsQ7PWcLACwxNi9gI4=; b=SsgHZxFBFaZ+r8tZf+K02UcD6oBKCDV4WevDQXPijUtORsQfXhP2sIpPj/txjjRmI2QDkA vUwR91vSlxGWD0gMU6w0kXlzm5HvGEg34hKR5q52+mbwGE4PyAWySWW8t04vpiGV81oBqC OpQyCKgc25rvRJAobB7Eva3hkF/sCAE9HQNl86LTGLBJOZa8pypx4F5CZOX1wydQYGon3T gpSEctO631H2TZKKxqYNAIPaLwmy0Qo8JxoNa5xJKL1hqMTMyX92rd2UFclYIM4EpwihwG aa2SJI4usVlrluZ65ZxIxF6eKSucMyOwvh/9YqJwZ+0+OLO9hBRaN2i/u/o7lw== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=elephly.net header.s=zoho header.b=gajKvSqZ; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; arc=reject ("signature check failed: fail, {[1] = sig:zohomail.com:reject}") ARC-Seal: i=2; s=key1; d=yhetil.org; t=1689237074; a=rsa-sha256; cv=fail; b=UetAozK/O/G47KQgr9m/Wt1+3Ote0mjrxqL0REJ0/hh10frNUjwn1hu0gLLFm0d8d5NDog HwCvT1nhOzctmQKEKDE+DAAtuOKd+mM6CRVQyCInDb35H0KcXI5djekpxjBfJpYE7uL1eV 1z4KPicRV2onUmU49USNQ+jwlIoH4qvxgjr3K7hMGzRzLOp9raS+lBUr1OTJxyCFTElc5L FsxUh3dSjmR+ZlLoif5ERMyv90BD1rX8676WyK7HVr2jbs8kH05jB61FQij6Ww2bEvPOiG MFv3h9/NkDKGJTuXRlQgrSFtZiBvKKkpKE2fnptqgnBB5mtQZlFPceQKgf3qCQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qJrj7-0004FD-7a; Thu, 13 Jul 2023 04:31:05 -0400 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 ) id 1qJrj5-0004Ex-Mx for guix-patches@gnu.org; Thu, 13 Jul 2023 04:31:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qJrj5-0000RT-Eh for guix-patches@gnu.org; Thu, 13 Jul 2023 04:31:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qJrj4-0002y5-7g; Thu, 13 Jul 2023 04:31:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64591] [PATCH 2/2] gnu: node-lts: Install files irrespective of number of hardlinks. Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: jlicht@fsfe.org, guix-patches@gnu.org Resent-Date: Thu, 13 Jul 2023 08:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 64591 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 64591@debbugs.gnu.org Cc: Ricardo Wurmus , Jelle Licht X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Jelle Licht Received: via spool by submit@debbugs.gnu.org id=B.168923703711362 (code B ref -1); Thu, 13 Jul 2023 08:31:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Jul 2023 08:30:37 +0000 Received: from localhost ([127.0.0.1]:53328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJrif-0002xC-16 for submit@debbugs.gnu.org; Thu, 13 Jul 2023 04:30:37 -0400 Received: from lists.gnu.org ([209.51.188.17]:40782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qJrid-0002x4-8O for submit@debbugs.gnu.org; Thu, 13 Jul 2023 04:30:35 -0400 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 ) id 1qJrid-0004Cc-2P for guix-patches@gnu.org; Thu, 13 Jul 2023 04:30:35 -0400 Received: from sender3-of-o58.zoho.com ([136.143.184.58]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qJrib-0000NF-CF for guix-patches@gnu.org; Thu, 13 Jul 2023 04:30:34 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1689237028; cv=none; d=zohomail.com; s=zohoarc; b=l/bbiLFxCd+duwPIswkYYxuC995drEa7spw9T3yNnToAttcpowvmM58YBWwcyy0nKVKaLMalsGmnXiVIbiMV3vVilVlqfTOs0OX2uvdob/oQJwHi9IYKu1YaYRqi7i+F+EcJTdpx+z0U3KoE/sMnLAJlAktsJ8Zj2Gwh7gFA/kk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1689237028; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=A1pVJh1z+Og8xzJbOj5hYiiWHnsQ7PWcLACwxNi9gI4=; b=O0StJ1BSwsUe2vOy6cKyDmUZItmNU2QVIq8rVOojb6KaaUprTWiymPIPpzfdbay6DleNS0m2NrIrSf7n4vn+y1vVr/cXUubrHJGdRRr3lJ4S+6XcBmibonpge1sU/08UVRERiibihOxRI4g/MYAOUfgr3tuLneVZs3VlarR3myY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=elephly.net; spf=pass smtp.mailfrom=rekado@elephly.net; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1689237028; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To; bh=A1pVJh1z+Og8xzJbOj5hYiiWHnsQ7PWcLACwxNi9gI4=; b=gajKvSqZPgNDzJe7lNwpuWU815B5hnsZ9HeyI9XHDM2nUbfHxFhOH7YzPNnyi6PY Rjh3dPrDPuiz9nMDhUieQpk7wOLJov4xzyqktn3rUm+MFnD/inoYKr2En40Lt2jbC6s 2OOBw+XyGfFXEpUj/zwHAins8IG9L/lOZ+hhWveM= Received: from localhost (215-111-142-46.pool.kielnet.net [46.142.111.215]) by mx.zohomail.com with SMTPS id 1689237026531302.7942123395153; Thu, 13 Jul 2023 01:30:26 -0700 (PDT) From: Ricardo Wurmus Date: Thu, 13 Jul 2023 10:30:15 +0200 Message-Id: X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.184.58; envelope-from=rekado@elephly.net; helo=sender3-of-o58.zoho.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_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -3.02 X-Migadu-Queue-Id: 32BE73A32B X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -3.02 X-TUID: AQkzGactK8Gv * gnu/packages/node.scm (node-lts)[arguments]: Add build phase 'ignore-number-of-hardlinks. --- gnu/packages/node.scm | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/gnu/packages/node.scm b/gnu/packages/node.scm index c0bb4f2342..8ba57dd4e0 100644 --- a/gnu/packages/node.scm +++ b/gnu/packages/node.scm @@ -874,7 +874,36 @@ (define-public node-lts (copy-file (string-append llhttp "/src/http.c") "deps/llhttp/src/http.c") (copy-file (string-append llhttp "/include/llhttp.h") - "deps/llhttp/include/llhttp.h")))))))) + "deps/llhttp/include/llhttp.h")))) + ;; npm installs dependencies by copying their files over a tar + ;; stream. A file with more than one hardlink is marked as a + ;; "Link". pacote/lib/fetcher.js calls node-tar's extractor with a + ;; filter that ignores any "Link" entries. This means that + ;; dependending on the number of hardlinks on files in a node-* + ;; package *some* of its files may not be installed when generating + ;; another package's "node_modules" directory. The build output + ;; would differ depending on irrelevant file system state. + ;; + ;; To avoid this, we patch node-tar to treat files with hardlinks + ;; the same as any other file, so that node-tar has no choice but + ;; to extract all of them --- independent of pacote's filter. + ;; + ;; Why not patch pacote's filter instead? This has led to subtle + ;; differences in where the files are installed, so it's easier to + ;; just ensure that files with hardlinks are always treated as + ;; regular files. + ;; + ;; Discussion: + ;; https://lists.gnu.org/archive/html/guix-devel/2023-07/msg00040.html + ;; Upstream bug report: + ;; https://github.com/npm/pacote/issues/285 + (add-after 'install 'ignore-number-of-hardlinks + (lambda* (#:key outputs #:allow-other-keys) + (let ((file (string-append (assoc-ref outputs "out") + "/lib/node_modules/npm/node_modules" + "/tar/lib/write-entry.js"))) + (substitute* file + (("this.stat.nlink > 1") "false"))))))))) (native-inputs (list ;; Runtime dependencies for binaries used as a bootstrap. c-ares-for-node -- 2.40.1