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 sO0YK2+op2RjRAAASxT56A (envelope-from ) for ; Fri, 07 Jul 2023 07:53:51 +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 uBsfK2+op2TtdwEA9RJhRA (envelope-from ) for ; Fri, 07 Jul 2023 07:53:51 +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 3236F32705 for ; Fri, 7 Jul 2023 07:53:51 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qHeP5-0002U8-UU; Fri, 07 Jul 2023 01:53:15 -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 1qHeP4-0002Tz-2E for guix-devel@gnu.org; Fri, 07 Jul 2023 01:53:14 -0400 Received: from sender3-of-o59.zoho.com ([136.143.184.59]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qHeP1-0001P0-Bd for guix-devel@gnu.org; Fri, 07 Jul 2023 01:53:13 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1688709176; cv=none; d=zohomail.com; s=zohoarc; b=AFyGIqlW/R0r5AD2YX36tBUHxGF9RLLU6F2iy/rga3tiLF3s+Ba6uBV7mhAt4lg10qzEL7Nze9khI0KBpLO77OJBPl58RzP7cUov/bXG8hZRyeBo0f/Y0cNV5vxX3H+/K9Mzs/W/4TSbgbcaDhykqYE2ZrNrE2WoFb0XD5Hf7So= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1688709176; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=8lQYkoz7nKxyZWEJ0QLkLTVvmSYZMd91iLt5dydHfcU=; b=fUNhEdd8tpncvulJLbrkKi4Li8cRSxEht4lWXmfQ15kN6TkRHF38/CwwzDK+P9kmMi1mhuEJTCdRx7ugW0sWnPV5fdsOcsOj95isHUWGCAYI8bK0h4V3Ada/ADu2DuSl5k77DAQOxLx4dqS4qbBQE25RYniRTXqG70jVpOqjXLo= 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=1688709176; s=zoho; d=elephly.net; i=rekado@elephly.net; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=8lQYkoz7nKxyZWEJ0QLkLTVvmSYZMd91iLt5dydHfcU=; b=HJ/efZLNC/7p8SOaXRiPdwbWCAS3Um1yNd7vA3m20a9VVXb6rgk3jFflYwQcGUj5 6RxL6BsoZN3Zg0hZ0lR71YGPFg9i2cWou6aKybb7KOId/7z3EdOZN8uKLCyOw6vl8p6 By3WQAed1I76ZTeJzoLMs/gCvJLXyHpsJ6hoftQ4= Received: from localhost (92-108-142-46.pool.kielnet.net [46.142.108.92]) by mx.zohomail.com with SMTPS id 1688709175820644.5069553581441; Thu, 6 Jul 2023 22:52:55 -0700 (PDT) User-agent: mu4e 1.10.3; emacs 28.2 From: Ricardo Wurmus To: guix-devel@gnu.org Cc: Jelle Licht Subject: npm has irreproducible install behavior Date: Fri, 07 Jul 2023 07:47:12 +0200 Message-ID: <873520tgi4.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.184.59; envelope-from=rekado@elephly.net; helo=sender3-of-o59.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: 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=2; s=key1; d=yhetil.org; t=1688709231; a=rsa-sha256; cv=pass; b=J3lcP38rcV311b8V6lNereoK89d3MfMdepy1S1Zh9mhnE9LZzJWgvx13YvoqdcULZyXUzi cPXL9SE+B8qkb+t+o5pHBbhqnRK2TYT/m3LrXKei0t0t++GpTfjgfAZS+SfEu7lMat2PwH /pLv5VzbC6nH/T27295WxVnbuFrVo5XLpodfvuHxUj0QDMRZRvK9OfpBndLg2AnfsX7q1w +m9JWbKaxGKugdJjEU8CSpuZ5R71XbTMT/0XyCwFEI8J/Zq2Q29nmKxcgpofgejDiDwfsa AD4J0PrCIsAKGJ9WYrrg58lsAyKSlkvaITcIb87RD7+3kO7sRPwDwfp6C8XyjQ== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b="HJ/efZLN"; dmarc=none; arc=pass ("zohomail.com:s=zohoarc:i=1"); 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=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1688709231; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=8lQYkoz7nKxyZWEJ0QLkLTVvmSYZMd91iLt5dydHfcU=; b=s3icqtkqx99tPOuQRGnFxr2HL3gYmig10MUSB2f9EQ5YADXNIs5IyeiPamrt51OZsK16Bq bEJDC+CWSy36Kgl7FwLIyFxF9UMwndWGjSoAhawNYk2O5bvbvFaz9Sif0juPpQut2LKxJ+ UWIC1eM172PReTD93y2P+4kA7Gyua3XNUmwj3dN+SuM9hIaNWrwS2GIs5wJThU/XIzKseq Jx8q3lw8massZsvFe5ruyMdlU4zAY1njFg9+NEt6IKVjcGdTWRFgSOQF0Kj8FHxkFt+C43 28XrDwEhyYiFagB8JqiYuwnrNAfis94uUrMb+Z0WRTovjG02hB0+7INrlJZ1zQ== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=elephly.net header.s=zoho header.b="HJ/efZLN"; dmarc=none; arc=pass ("zohomail.com:s=zohoarc:i=1"); 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: -6.73 X-Spam-Score: -6.73 X-Migadu-Queue-Id: 3236F32705 X-TUID: xmUIwqD5RA0/ 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 The result is that =E2=80=9Cnpm install=E2=80=9D will not install *all* fil= es 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 t= o not skip files that have the =E2=80=9CLink=E2=80=9D type. 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\\)") "fals= e") (("\\/File\\$\\/.test\\(entry.type\\)") "/(File|Link)$/.test(entry.type)")) --8<---------------cut here---------------end--------------->8--- What do you think? --=20 Ricardo