From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id GNrJAokHqGRpagAASxT56A (envelope-from ) for ; Fri, 07 Jul 2023 14:39:37 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 2OeDAokHqGQlTAAA9RJhRA (envelope-from ) for ; Fri, 07 Jul 2023 14:39:37 +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 70C413B3AB for ; Fri, 7 Jul 2023 14:39:36 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qHkji-0008M9-0k; Fri, 07 Jul 2023 08:38:58 -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 1qHkjf-0008Lf-IY for guix-devel@gnu.org; Fri, 07 Jul 2023 08:38:55 -0400 Received: from mail1.fsfe.org ([217.69.89.151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qHkjd-00047P-4d for guix-devel@gnu.org; Fri, 07 Jul 2023 08:38:55 -0400 From: Jelle Licht DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fsfe.org; s=2021100501; t=1688733527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ffOHxqId9Y9jedg9XOp2vlNvLFlP3mX8pI8usSjHCGE=; b=ld0y4TjTGMZlGD007m//CneQzTFb044e0vd2yRgxfXJGvL9FojEjUzFbWJknY28QH6b+x8 tNFlSgl7dgvXfze3dWpF8+66+myjdrZAHuTOWL3JQl9vCnKScJFZpaOw1id3Qu4zSbKHJ8 d7DP65s8acDIYnQmYrFtRgfrRpE+PM0= To: Ricardo Wurmus , guix-devel@gnu.org Subject: Re: npm has irreproducible install behavior In-Reply-To: <873520tgi4.fsf@elephly.net> References: <873520tgi4.fsf@elephly.net> Date: Fri, 07 Jul 2023 14:38:46 +0200 Message-ID: <87sf9z5221.fsf@fsfe.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=217.69.89.151; envelope-from=jlicht@fsfe.org; helo=mail1.fsfe.org 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, 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: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1688733576; a=rsa-sha256; cv=none; b=JYGz0/KXFc9Qz695Z/U6u0Rk4pu4AAMSXg3lH4i/u1RJFUNdMbr0SbVsw7R5m38BOZxreL f7QE0cQZsxDEziCMuFv5n1wT7cnlNu8jdydZDYVxb7+LpVOu20ykxwu34RO85rM2g4FqVg +SvRL1rZ02kwHIi586rm/RTuAaGIRHw17vqTXCQvn+w7A+eM8+pJvKX/sDtW0n0ExoKTiM +xS2IlQTxSSGjlB9u2hAnlVY0yFGh9qmINJXNOTBJ3yB/ttZ9Ki+MTyEYh1CjQRHlEJlc0 9YIvfH2RL51gSfZ+8x1lQOnzTvCyTwPDJO4DOhwZyhn3wK1c7bOdIPVzIPo7QA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=fsfe.org header.s=2021100501 header.b=ld0y4TjT; dmarc=pass (policy=none) header.from=fsfe.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1688733576; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=ffOHxqId9Y9jedg9XOp2vlNvLFlP3mX8pI8usSjHCGE=; b=dSCuu8ATxxdouZa/vMgUzENjYbXrsxKfpSjp/juueW3WzJGkSwc1QCrfiuhmyyFWMVmDAG AHPlFvAkVm7cRBUIIexak/eISFQiIGuPcSVkfhZxnPHwUSO/8UnjvrpCnHyOkJwa7NJaLi z3f/lRfM2ysTdFrsnyOO49DmAup7IWJBz3LxwtnHg3qXO7SfOxkZ85nJTfO63h4mApGFMn KkM8Rx3xQdmC2qdaXj8M0iINtoFIQxNoGcf/pNV3IwJcPPzXe6Xjy8czHFXYrH0A7+v3n1 TiMEhSGB+HhxrkeSYElXmN993zVKU41h8sUwanMGaPgOzCDT32oRaUer0ie2Cg== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=fsfe.org header.s=2021100501 header.b=ld0y4TjT; dmarc=pass (policy=none) header.from=fsfe.org; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -8.61 X-Spam-Score: -8.61 X-Migadu-Queue-Id: 70C413B3AB X-TUID: IdOE/Fz5pl06 Hi Ricardo, Ricardo Wurmus writes: > Hi Guix, > > after a few days of frustrating investigation I found a bug in one of > the libraries used by npm: > > https://github.com/npm/pacote/issues/285 Props on finding the root cause, I hope it didn't cost you much sanity :). > The result is that =E2=80=9Cnpm install=E2=80=9D will not install *all* f= iles dependent > on whether a file is deduplicated in the store. This causes > irreproducible output and build failures down the line on different > systems depending on the state of the file system. > > We should patch this ourselves. We can either tell node-tar not to mark > up hardlinks with the =E2=80=9CLink=E2=80=9D type, or we can patch pacote= to not skip > files that have the =E2=80=9CLink=E2=80=9D type. The first option makes more sense to me at first glance. Wouldn't the proposed solution change behavior w.r.t. softlinks as well? OTOH, deciding where to address this particular issue and which color the bikeshed should be seems like a job for upstream to figure out. > I=E2=80=99ve tested this little addition to the build phases of node-lts = on an > affected system: > > --8<---------------cut here---------------start------------->8--- > (add-after 'install 'do-not-ignore-links > (lambda* (#:key outputs #:allow-other-keys) > (with-directory-excursion > (string-append (assoc-ref outputs "out") > "/lib/node_modules/npm/node_modules") > (substitute* "pacote/lib/fetcher.js" > (("\\/Link\\$\\/.test\\(entry.type\\)") "fa= lse") > (("\\/File\\$\\/.test\\(entry.type\\)") > "/(File|Link)$/.test(entry.type)")) > --8<---------------cut here---------------end--------------->8--- The proposed change seems fine to me, provided our QA shows a pretty green button at some point. Could you send a patch that also includes a comment referencing the upstream bug report? Thanks, - Jelle