aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2023-07-13 10:47:01 +0200
committerRicardo Wurmus <rekado@elephly.net>2023-07-15 10:01:58 +0200
commit5dc2a88f99e2e448f7e9ca842a4a0d072a8f8f20 (patch)
tree23234ea5143dedd98448b4f9647d1017661cbd18 /gnu
parent529d91de1efde94d00ba3c185dbccb741cc9939d (diff)
downloadguix-5dc2a88f99e2e448f7e9ca842a4a0d072a8f8f20.tar.gz
guix-5dc2a88f99e2e448f7e9ca842a4a0d072a8f8f20.zip
gnu: node-lts: Install files irrespective of number of hardlinks.
* gnu/packages/node.scm (node-lts)[arguments]: Add build phase 'ignore-number-of-hardlinks.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/node.scm31
1 files changed, 30 insertions, 1 deletions
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 @@ source files.")
(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
just to new 'static-networking' API. (%base-services): Likewise. * gnu/system/install.scm (%installation-services): Likewise. * gnu/system/hurd.scm (%base-services/hurd): Likewise, and separate 'loopback' from 'networking'. * gnu/build/hurd-boot.scm (set-hurd-device-translators): Remove "servers/socket/2". * gnu/tests/networking.scm (run-openvswitch-test)["networking has started on ovs0"]: Check for 'networking instead of 'networking-ovs0, which is no longer provided. * doc/guix.texi (Networking Setup): Document the new interface. Remove documentation of 'static-networking-service'. (Virtualization Services): Change Ganeti example to use the new interface. Ludovic Courtès 2021-10-18system: hurd: Add 'info-reader' to %BASE-PACKAGES/HURD....* gnu/system/hurd.scm (%base-packages/hurd): Add INFO-READER. Ludovic Courtès 2021-08-29Migrate to the new 'targets' field of bootloader-configuration....The old 'target' field is deprecated; adjust the sources to use the new 'targets' one instead. * doc/guix-cookbook.texi<target>: Replace by 'targets'. * gnu/bootloader/grub.scm: Likewise. * gnu/installer/parted.scm: Likewise. * gnu/machine/digital-ocean.scm: Likewise. * gnu/system/examples/asus-c201.tmpl: Likewise * gnu/system/examples/bare-bones.tmpl: Likewise * gnu/system/examples/bare-hurd.tmpl: Likewise * gnu/system/examples/beaglebone-black.tmpl: Likewise * gnu/system/examples/desktop.tmpl: Likewise * gnu/system/examples/docker-image.tmpl: Likewise * gnu/system/examples/lightweight-desktop.tmpl: Likewise * gnu/system/examples/vm-image.tmpl: Likewise * gnu/system/examples/yggdrasil.tmpl: Likewise * gnu/system/hurd.scm: Likewise * gnu/system/images/hurd.scm: Likewise * gnu/system/images/novena.scm: Likewise * gnu/system/images/pine64.scm: Likewise * gnu/system/images/pinebook-pro.scm: Likewise * gnu/system/images/rock64.scm: Likewise * gnu/system/install.scm: Likewise * gnu/system/vm.scm: Likewise * gnu/tests.scm: Likewise * gnu/tests/ganeti.scm: Likewise * gnu/tests/install.scm: Likewise * gnu/tests/nfs.scm: Likewise * gnu/tests/telephony.scm: Likewise * tests/boot-parameters.scm: Likewise * tests/system.scm: Likewise Maxim Cournoyer 2021-08-12system: install, hurd: Use 'setuid-programs'....This is a followup to a7ac19851baab3fbcc40c4b2cf5b00a6ac9cd2f3. * gnu/system/install.scm (installation-os)[setuid-programs]: Use 'setuid-program'. * gnu/system/hurd.scm (%setuid-programs/hurd): Use 'file-like->setuid-program'. Ludovic Courtès 2021-02-22system: hurd: Have the static networking provision 'networking....Some services require networking, I'm looking at the Guix Build Coordinator agent. Networking seems to work in the childhurd VM, so I think this change makes sense. * gnu/system/hurd.scm (%base-services/hurd): Add 'networking to the provision parameter for the static-networking service. Christopher Baines 2020-10-09system: hurd: Add diffutils, patch, gawk, tar, gzip, bzip2, xz, and lzip....* gnu/system/hurd.scm (%base-packages/hurd): Add diffutils, patch, gawk, tar, gzip, bzip2, xz, and lzip. Jan (janneke) Nieuwenhuizen 2020-10-09system: hurd: Include 'guile-3.0-latest' in '%base-packages/hurd'....* gnu/system/hurd.scm (%base-packages/hurd): Change GUILE-3.0 to GUILE-3.0-LATEST. Jan (janneke) Nieuwenhuizen 2020-10-09system: hurd: Add PAM support with shadow and sudo....* gnu/system.scm (hurd-default-essential-services): Add setuid-program-service-type. * gnu/system/hurd.scm (%base-packages/hurd): Add shadow, sudo. (%setuid-programs/hurd): New variable. (%hurd-default-operating-system)[setuid-program]: Use it. [pam-services, sudoers-file]: Remove overrides; enabling regular defaults. * gnu/system/examples/bare-hurd.tmpl (%hurd-os)[users]: New field. [services]: Do not disable PAM in SSH. Jan (janneke) Nieuwenhuizen 2020-06-30system: hurd: Oops, have 'initrd' default to #f....* gnu/system/hurd.scm (%hurd-default-operating-system)[initrd]: Oops, set to #f. Jan (janneke) Nieuwenhuizen 2020-06-18system: hurd: Add "/bin/sh" and "/usr/bin/env"....* gnu/system/hurd.scm (%base-services/hurd): Add extra-special-files "/bin/sh" and "/usr/bin/env". Jan (janneke) Nieuwenhuizen 2020-06-13system: hurd: Remove 'cross-hurd-image' hack....The initial guix build -f gnu/system/hurd.scm hack has been superseded by regular guix system (cross) build. * gnu/system/hurd.scm (compile-manifest, cross-hurd-image): Remove. Jan (janneke) Nieuwenhuizen 2020-06-08system: hurd: Populate services....* gnu/system/hurd.scm (%base-services/hurd): Add hurd-console-service, hurd-getty-services, guix-service. Also add sylog and loopback, needed for ... * gnu/system.scm (hurd-default-essential-services): ... add %shepherd-root-service with dependencies: %boot-service, %activation-service, user-processes, root-file-system-service, file-system-service, pam-root-service. Jan (janneke) Nieuwenhuizen 2020-06-08system: examples: Add bare-hurd.tmpl....* gnu/system/hurd.scm (%hurd-def%hurd-default-operating-system-kernel, %hurd-default-operating-system): New exported variables. * gnu/system/examples/bare-hurd.tmpl: New file. * Makefile.am (EXAMPLES): Add it. * tests/guix-system.sh: Add --target=i586-pc-gnu when testing it. Jan (janneke) Nieuwenhuizen 2020-05-28system: hurd: Remove custom <manifest> gexp compiler....This is superseded by <profile>, which was added in ef674a24c527eaf54801707d34dbf5d12ec139cb. * gnu/system/hurd.scm (compile-manifest): Remove. (cross-hurd-image)[system-profile]: Define using 'profile'. Ludovic Courtès 2020-05-01system: hurd: Add /etc/group....This allows download to run. * gnu/system/hurd.scm (cross-hurd-image): Add /etc/group with guixbuilder. Jan (janneke) Nieuwenhuizen 2020-05-01system: hurd: Add less, which to %base-packages/hurd....* gnu/system/hurd.scm (%base-packages/hurd): Add less, which. Efraim Flashner 2020-04-11system: hurd: Add guile-candy....* gnu/system/hurd.scm (%base-packages/hurd): Add GUILE-COLORIZED and GUILE-READLINE. (cross-hurd-image)[hurd-directives]: Add /root/.guile. Ludovic Courtès 2020-04-11system: hurd: Add net-base and inetutils, and /etc/{services,protocols}....This fixes In procedure getaddrinfo: Servname not supported for ai_socktype * gnu/system/hurd.scm (%base-packages/hurd): Add net-base, inetutils. (cross-hurd-image): Add /etc/{services,protocols} from net-base. Jan (janneke) Nieuwenhuizen 2020-04-11system: hurd: Create a proper profile....* gnu/system/hurd.scm (compile-manifest): New procedure. (cross-hurd-image)[for-hurd, hurd-os]: Remove. [cross-built, cross-built-entry]: New procedures. [system-profile]: New variable. [grub.cfg]: Use 'cross-built'. [profile]: Rename to... [etc-profile]: ... this, and adjust accordingly. [hurd-directives]: Create /run/current-system/profile and /etc/profile. Adjust arguments to 'qemu-image'. Ludovic Courtès 2020-04-11system: hurd: Add root profile....* gnu/system/hurd.scm (%base-packages/hurd): New variable. (cross-hurd-image)[for-hurd]: New function. (cross-hurd-image)[hurd-os]: Use them. (cross-hurd-image)[profile]: Hack'y .profile for root, only setting PATH. Jan (janneke) Nieuwenhuizen 2020-04-11system: hurd: Create /etc/{hostname,motd,login} and /root....* gnu/system/hurd.scm (cross-hurd-image): Add /etc/{hostname,motd,login} and /root. Ludovic Courtès 2020-04-11system: hurd: Add "/bin/sh" symlink....This allows login.c to succeed for root. * gnu/system/hurd.scm (cross-hurd-image): Link /bin/sh to full the full bash. Jan (janneke) Nieuwenhuizen 2020-04-11system: hurd: Add /etc/{passwd,shadow}....* gnu/system/hurd.scm: Generate hard-coded /etc/{passwd,shadow}, allows running chown in MAKEDEV and loggin in. Jan (janneke) Nieuwenhuizen 2020-04-11system: hurd: Add ttys symlink in "/etc/ttys"....* gnu/packages/hurd.scm (hurd): Substitute /libexec/. * gnu/system/hurd.scm (cross-hurd-image): Add symlink /etc/ttys => <hurd>/etc/ttys. Jan (janneke) Nieuwenhuizen 2020-04-11system: hurd: Add "/etc/fstab"....This allows running mount -o remount,rw / successfully. * gnu/system/hurd.scm (cross-hurd-image): Create a hard coded fstab and add it to hurd-os. Jan (janneke) Nieuwenhuizen 2020-04-11Add (gnu system hurd)....* gnu/system/hurd.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. Ludovic Courtès