1
Fork 0
mirror of https://https.git.savannah.gnu.org/git/guix.git/ synced 2025-07-15 03:20:43 +02:00
Commit graph

162880 commits

Author SHA1 Message Date
jgart
e47e39f270
gnu: Add clasp-lorem-ipsum.
* gnu/packages/lisp-xyz.scm (clasp-lorem-ipsum): New variable.

Change-Id: I5555dcaa238e9d33f6f8c3e156802aa7a29ec8cb
Signed-off-by: jgart <jgart@dismail.de>
2025-06-25 15:23:16 -04:00
jgart
18bbf5f4ca
gnu: clasp-cl: Add native-search-paths
* gnu/packages/lisp.scm (clasp-cl): Update to Add native-search-paths.

Change-Id: I4d7f96d70f33684a337092110948c4af199057d0
Signed-off-by: jgart <jgart@dismail.de>
2025-06-25 15:23:16 -04:00
jgart
4aff859183
guix: asdf: Add asdf-build-system/clasp.
* guix/build-system/asdf.scm (asdf-build-system/clasp): New variable.
[native-search-paths]: Add search paths.

Change-Id: I3631fa0d55112fd6440d2b500dddc4d04ead78e6
Signed-off-by: jgart <jgart@dismail.de>
2025-06-25 15:23:16 -04:00
Josep Bigorra
3b12b3531f
gnu: Add iter-vitae.
* gnu/packages/web.scm (iter-vitae): New variable.

Signed-off-by: jgart <jgart@dismail.de>
2025-06-25 14:59:19 -04:00
cancername
14a81257cb
gnu: Add simdutf.
* gnu/packages/c.scm (simdutf): New variable.

Change-Id: I3e253617db4793e3bc2e4704106c4c42ef2f4f49
Signed-off-by: Greg Hogan <code@greghogan.com>
2025-06-25 16:31:28 +00:00
Ashish SHUKLA
43fd61dc26
gnu: simdjson: Update to 3.13.0.
* gnu/packages/cpp.scm (simdjson): Update to 3.13.0.

Change-Id: Id8cd95bd5c95adfea95fcc83aadbe16e569e0438
Signed-off-by: Greg Hogan <code@greghogan.com>
2025-06-25 15:26:29 +00:00
Florian Pelz
8dc0c8aa9f
news: Fix presumed mistaken change in news entry.
* etc/news.scm: Revert 'en' change.  Change 'de' translation.

Change-Id: I4174c4f6ad0e08dc61f33acc3064ed74d16c4f7e
2025-06-25 16:57:46 +02:00
Maxim Cournoyer
517e86d3c7
gnu: opensc: Build with OpenSSL 3.
* gnu/packages/security-token.scm (opensc)
[inputs]: Replace openssl-1.1 with openssl.

Change-Id: I89fb3cad73239b9870b34b2904fbdbb243b8f82b
2025-06-25 23:48:09 +09:00
Florian Pelz
59562d212a
news: Add 'de' translation.
* etc/news.scm: Add German translation of privilege escalation entry.

Change-Id: I9f39d27f64f3e550b72167d253ff1926dc1b9fc1
2025-06-25 16:34:57 +02:00
Maxim Cournoyer
9dacf91625
gnu: git: Build man pages.
* gnu/packages/version-control.scm (git) [phases] {install-info-manual}:
Rename to...
{install-doc}: ... this.  Add the 'install-man' target.
{install-man-pages}: Delete phase.

Change-Id: I2ba7152a282334adb38e6cbd485b09bc69b340b9
2025-06-25 23:00:59 +09:00
Maxim Cournoyer
45ec6e0e0a
gnu: git: Remove extraneous git-submodule wrapper.
This wrapper was first added in commit 2a5e15c6e1 ("gnu: git: 'git-submodule'
works even if Perl is not in $PATH.") in 2014; it no longer appears to be
needed.

Reported-by: Nicolas Graves <ngraves@ngraves.fr>
Reported-by: Ian Eure <ian@retrospec.tv>
Change-Id: I926e94cc01ba7fa24cfa5bdb94b8918d9f103e80
2025-06-25 23:00:59 +09:00
Maxim Cournoyer
cc15236a45
gnu: git-minimal: Update to 2.50.0.
* gnu/packages/version-control.scm (git-minimal): Update to 2.50.0.
(git) [phases] {install-man-pages}: Adjust hash.

Change-Id: Ia8df361ad38c5ee9d00e4acbd553abac2c6f1af9
2025-06-25 23:00:59 +09:00
Maxim Cournoyer
9f0ae51ce5
Refine regexp in update-guix-package.scm script.
* build-aux/update-guix-package.scm (%guix-git-repo-push-url-regexp): Refine
regexp.

Change-Id: I562bad8f654fb797a6f0ddc5bf94feba203cb732
2025-06-25 23:00:59 +09:00
Maxim Cournoyer
2a345b89f0
gnu: emacs-dtrt-indent: Update to 1.24.
* gnu/packages/emacs-xyz.scm (emacs-dtrt-indent): Update to 1.24.

Change-Id: If61a0116a7b685bc1b5ce83e220fa63eef8d0715
2025-06-25 23:00:59 +09:00
Maxim Cournoyer
4664ab4641
gnu: emacs-gnus-desktop-notify: Update to latest commit.
* gnu/packages/emacs-xyz.scm (emacs-gnus-desktop-notify): Update to latest
commit.
[description]: Fix typo.
* gnu/packages/patches/emacs-gnus-desktop-notify-fix-notifications.patch:
Delete file.
* gnu/packages/patches/emacs-gnus-desktop-notify-rescan.patch: Likewise.
* gnu/local.mk (dist_patch_DATA): De-register them.

Change-Id: I7f25870949411f8f1326871d67bdbdbe59feef6b
2025-06-25 23:00:59 +09:00
Maxim Cournoyer
59a166d5d6
gnu: perl-eval-withlexicals: Enable readline support for tinyrepl.
* gnu/packages/perl.scm (perl-eval-withlexicals)
[phases]: Use gexps.  Strip trailing #t.
[inputs]: Remove labels.  Add perl-term-readline-gnu.

Change-Id: Ic42ec13e398e88d085a19a1bab39d6c08debb3f1
2025-06-25 23:00:59 +09:00
Noé Lopez
ec64e64f56
teams: Add entry for Nicolas Graves.
* etc/teams.scm ("Nicolas Graves"): New member.

Change-Id: I156ea8bfe8351cd900ef1c2c7a3aba012cca21f1
Signed-off-by: Andreas Enge <andreas@enge.fr>
2025-06-25 14:43:45 +02:00
Andreas Enge
3eb03534e6
daemon: Fix build with gcc-14.
* nix/libutil/seccomp.hh: Include cstdint.

Change-Id: I454c7abd56abbe4cf03a5bc8ebc402678e07a0f0
2025-06-25 14:33:26 +02:00
Cayetano Santos
b2e473f934
gnu: emacs-bqn-mode: Update to 2025-04-10.
* gnu/packages/emacs-xyz.scm (emacs-bqn-mode): Update to 2025-04-10.
[arguments]: Drop #:phases.
[propagated-inputs]: Add emacs-eros.

Change-Id: Id4f832052d21ab969c529e2e846339ef78bad7c4
2025-06-25 10:07:06 +02:00
gemmaro
a75e644d2f
gnu: emacs-flymake-perlcritic: Update to 1.0.3-1.311743e.
* gnu/packages/emacs-xyz.scm (emacs-flymake-perlcritic):
Update to 1.0.3-1.311743e.
[arguments]: Add #:test-command.

Change-Id: Ib0e87af7fe1b73092d7b1ca96188ea20118c19f0
2025-06-25 10:06:16 +02:00
Cayetano Santos
e5062b9337
gnu: emacs-ebib: Update to 2.50.1.
* gnu/packages/emacs-xyz.scm (emacs-ebib): Update to 2.50.1.

Change-Id: I8335d42b669effa6ed20d1cdb565ed09786f2170
2025-06-25 10:06:16 +02:00
Adam Quandour
7aa412d877
gnu: Add melonds.
* gnu/packages/emulators.scm (melonds): New variable.
2025-06-25 10:06:11 +02:00
Ian Eure
ee8be37297
gnu: librewolf: Update to 139.0.4-1 [security-fixes].
Librewolf 139.0.4 contains fixes for:
CVE-2025-49709: Memory corruption in canvas surfaces
CVE-2025-49710: Integer overflow in OrderedHashTable

* gnu/packages/librewolf.scm (librewolf): Update to 139.0.4-1.

Change-Id: I622465bb1e0ba29dac6c3ede29a64f92f76946c1
2025-06-24 16:00:50 -07:00
Ian Eure
1e05cb54b2
gnu: firefox-l10n: Update to 0d3843540cfd7d38f8a60831fbfae996b6fe2efc.
* gnu/packages/librewolf.scm (firefox-l10n): Update to 0d3843540cfd7d38f8a60831fbfae996b6fe2efc.

Change-Id: I655b500492552ca98e4b622a092f093da5bc8c11
2025-06-24 16:00:46 -07:00
Danny Milosavljevic
419aac56c9
gnu: emacs-combobulate: Update to 0.2.
* gnu/packages/emacs-xyz.scm (emacs-combobulate): New variable.

Change-Id: Iad5108a5c625a107072f1e82f38d09e4cb186f9e
2025-06-24 22:41:34 +02:00
Noé Lopez
2539949ba2
gnu: Add gapless.
* gnu/packages/gnome-xyz.scm (gapless): New variable.

Change-Id: I57f7059aa64f55dd510cc74459b3065b46f8f1d4
Signed-off-by: Andreas Enge <andreas@enge.fr>
2025-06-24 22:08:29 +02:00
Andy Tai
41177bea2c
gnu: parallel: Update to 20250622.
* gnu/packages/parallel.scm (parallel): Update to 20250622.

Change-Id: I6dc2947c7f1cf62b78bb61812913bd2c44a830ad
Signed-off-by: Andreas Enge <andreas@enge.fr>
2025-06-24 21:36:17 +02:00
Andy Tai
0fbb9e7672
gnu: xpra: Update to 6.3.1.
* gnu/packages/xorg.scm (xpra): Update to 6.3.1.

Change-Id: Ief95dbec2eb62491e2277af410d079640e4b26f0
Signed-off-by: Andreas Enge <andreas@enge.fr>
2025-06-24 21:30:40 +02:00
Hilton Chain
01e577e7a0
gnu: zoxide: Reference ‘zoxide’ executable by store path.
* gnu/packages/rust-apps.scm (zoxide)[arguments]<#:phases>: Patch references
of ‘zoxide’ executable.

Change-Id: I45e51d538904f5b9fbebacd1ece13c01bf076d1e
2025-06-25 03:13:04 +08:00
Josep Bigorra
d1a04765ba
gnu: Add ggg.
* gnu/packages/image.scm (ggg): New variable.

Signed-off-by: jgart <jgart@dismail.de>
2025-06-24 14:14:56 -04:00
Ashish SHUKLA
31164bc488
gnu: janet: Update to 1.38.0.
* gnu/packages/lisp.scm (janet): Update to 1.38.0.

Change-Id: I94c8eeabb943d2786effb94893840cf31662dd00
Signed-off-by: jgart <jgart@dismail.de>
2025-06-24 13:56:32 -04:00
Ludovic Courtès
fbdf9d4ba9
news: Add entry for ‘guix-daemon’ vulnerability fix.
* etc/news.scm: Add entry.

Change-Id: I7f143c268070a6fbcc1a343374ee4443add60bc2
Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
2025-06-24 11:53:31 -04:00
John Kehayias
30a5d140aa
gnu: guix: Update to 1.4.0-38.0e79d5b [security fixes].
Fixes CVE-2025-46415, CVE-2025-46416, CVE-2025-52991, CVE-2025-52992, and
CVE-2025-52993.

* gnu/packages/package-management.scm (guix): Update to 1.4.0-38.0e79d5b.

Change-Id: Ifa601149c5e737cc97fefaf21db36bfcf4d4f026
2025-06-24 11:35:29 -04:00
Mark H Weaver
c51a40b0c8
gnu: icecat: Update to 128.12.0-gnu1 [security fixes].
Includes fixes for CVE-2025-6424, CVE-2025-6425, CVE-2025-6426,
CVE-2025-6429, and CVE-2025-6430.

* gnu/packages/gnuzilla.scm (mozilla-115-compare-locales)
(mozilla-115-locale, mozilla-115-locales, update-mozilla-115-locales)
(all-mozilla-115-locales, %icecat-115-base-version)
(%icecat-115-version %icecat-115-build-id, icecat-115-source): New
bindings, retaining the previous meanings (before this commit) of
mozilla-compare-locales, mozilla-locale, mozilla-locales,
update-mozilla-locales, all-mozilla-locales, %icecat-base-version,
%icecat-version, %icecat-build-id, and icecat-source, respectively.
(mozilla-locale, mozilla-locales, update-mozilla-locales)
(all-mozilla-locales): Remove bindings.
(mozilla-compare-locales): Switch to new Github URL.
(mozilla-l10n): New variable.
(%icecat-locales): Move definition above "%icecat-base-version".
Add new locales "sat" and "skr".
(%icecat-base-version, %icecat-version, %icecat-build-id): Update.
(icecat-source): Update 'gnuzilla-commit' and hashes.
Remove 'upstream-icecat-base-version' local variable
and associated comments.  Modify the code
within (with-directory-excursion "l10n" ...) to adapt to new
upstream handling of locales.
(icecat-minimal) [inputs]: Switch from 'ffmpeg-5' to 'ffmpeg'.
Update the comment on why we are still using the bundled NSS.
[native-inputs]: Switch from 'rust-cbindgen-0.24' to 'rust-cbindgen'.
[arguments]: Add "--enable-rust-simd" to configure-flags.
Adapt 'remove-cargo-frozen-flag' phase to work on IceCat 128.
(comm-source->locales+changeset): Use 'update-mozilla-115-locales'.
(icedove-source): Use 'icecat-115-source'.
* gnu/packages/patches/icecat-use-system-wide-dir.patch,
gnu/packages/patches/icecat-compare-paths.patch: Adapt to IceCat 128.
* gnu/packages/patches/icecat-102-makeicecat.patch: Delete file
* gnu/local.mk (dist_patch_DATA): Remove it.
2025-06-24 11:12:49 -04:00
Christopher Baines
4b4d281ad0
gnu: bffe: Update to 0-14.f9a5b55.
* gnu/packages/package-management.scm (bffe): Update to 0-14.f9a5b55.
[source,home-page]: Update URL.

Change-Id: Ie7a9dbd4f686b9fcbc62867c6da8e372a4df0c06
2025-06-24 16:35:28 +02:00
Christopher Baines
ccd5b52c64
gnu: nar-herder: Update to 0-41.8bfd36f.
* gnu/packages/package-management.scm (nar-herder): Update to 0-41.8bfd36f.

Change-Id: Ia1586eb8b34f0ffd309a9b07f3ca332bcf69cf30
2025-06-24 16:35:28 +02:00
Christopher Baines
3123a35a83
gnu: guile-knots: Update to 0-21.34ee8bb.
* gnu/packages/guile-xyz.scm (guile-knots): Update to 0-21.34ee8bb.
[source,home-page]: Update URL.

Change-Id: I6007cf790a7c824d0940cd6779fe317ff293d471
2025-06-24 16:35:28 +02:00
Christopher Baines
ae1a1d3727
gnu: guix-data-service: Update to 0.0.1-69.9b79543.
* gnu/packages/web.scm (guix-data-service): Update to 0.0.1-69.9b79543.

Change-Id: I7eeade55c30543da5b98ca82bb69d1f25dc1bad1
2025-06-24 16:35:28 +02:00
Christopher Baines
86eb2ca792
gnu: guile-documenta: Update to 0.3.0.
* gnu/packages/guile-xyz.scm (guile-documenta): Update to 0.3.0.

Change-Id: Ia843bbcdc3460b6bb60eedecccde92c66b19b611
2025-06-24 16:35:25 +02:00
Ludovic Courtès
0e79d5b655
daemon: Protect ‘copyFileRecursively’ from race conditions.
Previously, if an attacker managed to introduce a hard link or a symlink
on one of the destination file names before it is opened,
‘copyFileRecursively’ would overwrite the symlink’s target or the hard
link’s content.

This kind of attack could be carried out while guix-daemon is copying
the output or the chroot directory of a failed fixed-output derivation
build, possibly allowing the attacker to escalate to the privileges of
the build user.

* nix/libutil/util.cc (copyFileRecursively): In the ‘S_ISREG’ case, open
‘destination’ with O_NOFOLLOW | O_EXCL.  In the ‘S_ISDIR’ case, open
‘destination’ with O_NOFOLLOW.

Reported-by: Reepca Russelstein <reepca@russelstein.xyz>
Change-Id: I94273efe4e92c1a4270a98c5ec47bd098e9227c9
Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
2025-06-24 10:07:59 -04:00
Reepca Russelstein
c659f977bb
daemon: add seccomp filter for slirp4netns.
The container that slirp4netns runs in should already be quite difficult to do
anything malicious in beyond basic denial of service or sending of network
traffic.  There is, however, one hole remaining in the case in which there is
an adversary able to run code locally: abstract unix sockets.  Because these
are governed by network namespaces, not IPC namespaces, and slirp4netns is in
the root network namespace, any process in the root network namespace can
cooperate with the slirp4netns process to take over its user.

To close this, we use seccomp to block the creation of unix-domain sockets by
slirp4netns.  This requires some finesse, since slirp4netns absolutely needs
to be able to create other types of sockets - at minimum AF_INET and AF_INET6

Seccomp has many, many pitfalls.  To name a few:

1. Seccomp provides you with an "arch" field, but this does not uniquely
   determine the ABI being used; the actual meaning of a system call number
   depends on both the number (which is often the result of ORing a related
   system call with a flag for an alternate ABI) and the architecture.

2. Seccomp provides no direct way of knowing what the native value for the
   arch field should be; the user must do configure/compile-time testing for
   every architecture+ABI combination they want to support.  Amusingly enough,
   the linux-internal header files have this exact information
   (SECCOMP_ARCH_NATIVE), but they aren't sharing it.

3. The only system call numbers we naturally have are the native ones in
   asm/unistd.h.  __NR_socket will always refer to the system call number for
   the target system's ABI.

4. Seccomp can only manipulate 32-bit words, but represents every system call
   argument as a uint64.

5. New system call numbers with as-yet-unknown semantics can be added to the
   kernel at any time.

6. Based on this comment in arch/x86/entry/syscalls/syscall_32.tbl:

   # 251 is available for reuse (was briefly sys_set_zone_reclaim)

   previously-invalid system call numbers may later be reused for new system
   calls.

7. Most architecture+ABI combinations have system call tables with many gaps
   in them.  arm-eabi, for example, has 35 such gaps (note: this is just the
   number of distinct gaps, not the number of system call numbers contained in
   those gaps).

8. Seccomp's BPF filters require a fully-acyclic control flow graph.
   Any operation on a data structure must therefore first be fully
   unrolled before it can be run.

9. Seccomp cannot dereference pointers.  Only the raw bits provided to the
   system calls can be inspected.

10. Some architecture+ABI combos have multiplexer system calls.  For example,
    socketcall can perform any socket-related system call.  The arguments to
    the multiplexed system call are passed indirectly, via a pointer to user
    memory.  They therefore cannot be inspected by seccomp.

11. Some valid system calls are not listed in any table in the kernel source.
    For example, __ARM_NR_cacheflush is an "ARM private" system call.  It does
    not appear in any *.tbl file.

12. Conditional branches are limited to relative jumps of at most 256
    instructions forward.

13. Prior to Linux 4.8, any process able to spawn another process and call
    ptrace could bypass seccomp restrictions.

To address (1), (2), and (3), we include preprocessor checks to identify the
native architecture value, and reject all system calls that don't use the
native architecture.

To address (4), we use the AC_C_BIGENDIAN autoconf check to conditionally
define WORDS_BIGENDIAN, and match up the proper portions of any uint64 we test
for with the value in the accumulator being tested against.

To address (5) and (6), we use system call pinning.  That is, we hardcode a
snapshot of all the valid system call numbers at the time of writing, and
reject any system call numbers not in the recorded set.  A set is recorded for
every architecture+ABI combo, and the native one is chosen at compile-time.
This ensures that not only are non-native architectures rejected, but so are
non-native ABIs.  For the sake of conciseness, we represent these sets as sets
of disjoint ranges.  Due to (7), checking each range in turn could add a lot
of overhead to each system call, so we instead binary search through the
ranges.  Due to (8), this binary search has to be fully unrolled, so we do
that too.

It can be tedious and error-prone to manually produce the syscall ranges by
looking at linux's *.tbl files, since the gaps are often small and
uncommented.  To address this, a script, build-aux/extract-syscall-ranges.sh,
is added that will produce them given a *.tbl filename and an ABI regex (some
tables seem to abuse the ABI field with strange values like "memfd_secret").
Note that producing the final values still requires looking at the proper
asm/unistd.h file to find any private numbers and to identify any offsets and
ABI variants used.

(10) used to have no good solution, but in the past decade most architectures
have gained dedicated system call alternatives to at least socketcall, so we
can (hopefully) just block it entirely.

To address (13), we block ptrace also.

* build-aux/extract-syscall-ranges.sh: new script.
* Makefile.am (EXTRA_DIST): register it.
* config-daemon.ac: use AC_C_BIGENDIAN.
* nix/libutil/spawn.cc (setNoNewPrivsAction, addSeccompFilterAction): new
  functions.
* nix/libutil/spawn.hh (setNoNewPrivsAction, addSeccompFilterAction): new
  declarations.
  (SpawnContext)[setNoNewPrivs, addSeccompFilter]: new fields.
* nix/libutil/seccomp.hh: new header file.
* nix/libutil/seccomp.cc: new file.
* nix/local.mk (libutil_a_SOURCES, libutil_headers): register them.
* nix/libstore/build.cc (slirpSeccompFilter, writeSeccompFilterDot):
  new functions.
  (spawnSlirp4netns): use them, set seccomp filter for slirp4netns.

Change-Id: Ic92c7f564ab12596b87ed0801b22f88fbb543b95
Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
2025-06-24 10:07:58 -04:00
Reepca Russelstein
fb42611b8f
daemon: Use slirp4netns to provide networking to fixed-output derivations.
Previously, the builder of a fixed-output derivation could communicate with an
external process via an abstract Unix-domain socket.  In particular, it could
send an open file descriptor to the store, granting write access to some of
its output files in the store provided the derivation build fails—the fix for
CVE-2024-27297 did not address this specific case.  It could also send an open
file descriptor to a setuid program, which could then be executed using
execveat to gain the privileges of the build user.

With this change, fixed-output derivations other than “builtin:download”
and “builtin:git-download” always run in a separate network namespace
and have network access provided by a TAP device backed by slirp4netns,
thereby closing the abstract Unix-domain socket channel.

* nix/libstore/globals.hh (Settings)[useHostLoopback, slirp4netns]: new
fields.
* config-daemon.ac (SLIRP4NETNS): new C preprocessor definition.
* nix/libstore/globals.cc (Settings::Settings): initialize them to defaults.
* nix/nix-daemon/guix-daemon.cc (options): add --isolate-host-loopback option.
* doc/guix.texi: document it.
* nix/libstore/build.cc (DerivationGoal)[slirp]: New field.
(setupTap, setupTapAction, waitForSlirpReadyAction, enableRouteLocalnetAction,
 prepareSlirpChrootAction, spawnSlirp4netns, haveGlobalIPv6Address,
 remapIdsTo0Action): New functions.
(initializeUserNamespace): allow the guest UID and GID to be specified.
(DerivationGoal::killChild): When ‘slirp’ is not -1, call ‘kill’.
(DerivationGoal::startBuilder): Unconditionally add CLONE_NEWNET to FLAGS.
When ‘fixedOutput’ is true, spawn ‘slirp4netns’.
When ‘fixedOutput’ and ‘useChroot’ are true, add setupTapAction,
waitForSlirpReadyAction, and enableRouteLocalnetAction to builder setup
phases.
Create a /etc/resolv.conf for fixed-output derivations that directs them to
slirp4netns's dns address.
When settings.useHostLoopback is true, supply fixed-output derivations with a
/etc/hosts that resolves "localhost" to slirp4netns's address for accessing
the host loopback.
* nix/libutil/util.cc (keepOnExec, decodeOctalEscaped, sendFD, receiveFD,
  findProgram): New functions.
* nix/libutil/util.hh (keepOnExec, decodeOctalEscaped, sendFD, receiveFD,
  findProgram): New declarations.
* gnu/packages/package-management.scm (guix): add slirp4netns input for linux
  targets.
* tests/derivations.scm (builder-network-isolated?): new variable.
  ("fixed-output derivation, network access, localhost", "fixed-output
  derivation, network access, external host"):
  skip test case if fixed output derivations are isolated from the network.

Change-Id: Ia3fea2ab7add56df66800071cf15cdafe7bfab96
Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
2025-06-24 10:07:57 -04:00
Reepca Russelstein
be8aca0651
daemon: add and use spawn.cc and spawn.hh.
This adds a mechanism for manipulating and running "spawn phases" similarly to
how builder-side code manipulates "build phases".  The main difference is that
spawn phases take a (reference to a) single structure that they can both read
from and write to, with their writes being visible to subsequent phases.  The
base structure type for this is SpawnContext.

It also adds some predefined phase sequences, namely basicSpawnPhases and
cloneSpawnPhases, and exposes each of the actions performed by these phases.

Finally, it modifies build.cc to replace runChild() with use of this new code.

* nix/libutil/util.cc (keepOnExec, waitForMessage): new functions.
* nix/libutil.util.hh (keepOnExec, waitForMessage): add prototypes.
* nix/libutil/spawn.cc, nix/libutil/spawn.hh: new files.
  (addPhaseAfter, addPhaseBefore, prependPhase, appendPhase, deletePhase,
  replacePhase, reset_writeToStderrAction, restoreAffinityAction,
  setsidAction, earlyIOSetupAction, dropAmbientCapabilitiesAction,
  chrootAction, chdirAction, closeMostFDsAction, setPersonalityAction,
  oomSacrificeAction, setIDsAction, restoreSIGPIPEAction, setupSuccessAction,
  execAction, getBasicSpawnPhases, usernsInitSyncAction, usernsSetIDsAction,
  initLoopbackAction, setHostAndDomainAction, makeFilesystemsPrivateAction,
  makeChrootSeparateFilesystemAction, statfsToMountFlags, bindMount,
  mountIntoChroot, mountIntoChrootAction, mountProcAction, mountDevshmAction,
  mountDevptsAction, pivotRootAction, lockMountsAction, getCloneSpawnPhases,
  runChildSetup, runChildSetupEntry, cloneChild, idMapToIdentityMap,
  unshareAndInitUserns): new procedures.
* nix/local.mk (libutil_a_SOURCES): add spawn.cc.
  (libutil_headers): add spawn.hh.
* nix/libstore/build.cc (restoreSIGPIPE, DerivationGoal::runChild,
  childEntry): removed procedures.
  (DerivationGoal::{dirsInChroot,env,readiness}): removed.
  (execBuilderOrBuiltin, execBuilderOrBuiltinAction,
  clearRootWritePermsAction): new procedures.
  (DerivationGoal::startBuilder): modified to use a CloneSpawnContext if
  chroot builds are available, otherwise a SpawnContext.

Change-Id: Ifd50110de077378ee151502eda62b99973d083bf

Change-Id: I76e10d3f928cc30566e1e6ca79077196972349f8

spawn.cc, util.cc, util.hh changes

Change-Id: I287320e63197cb4f65665ee5b3fdb3a0e125ebac
Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
2025-06-24 10:07:56 -04:00
Reepca Russelstein
7173c2c0ca
daemon: Implement ‘deletePath’ in terms of the *at functions.
deletePath needs to be able to operate securely in unfriendly environments,
where adversaries may be concurrently modifying the files being operated on.
For example, directories that we are currently recursing through may be
replaced with symbolic links.

We err on the side of early failure here: if a file or directory is
concurrently modified in a way that causes one of the system calls to fail, we
throw an exception immediately instead of trying to adapt to the change.

Note that we use fstat instead of fstatat for verifying the directory's
st_mode field because AT_EMPTY_PATH is linux-specific.

* nix/libutil/util.cc (_deletePathAt): new procedure.
(_deletePath): use it.

Change-Id: I7ccfe6f1f74dbab95617b24034494e0f63030582
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
2025-06-24 10:07:55 -04:00
Ludovic Courtès
a183afa8e2
tests: Test network access from fixed-output derivations.
* tests/derivations.scm ("fixed-output derivation, network access, localhost")
("fixed-output derivation, network access, external host"): New tests.

Change-Id: Iec164981a12ffef1bcb6a63ed9c2f1f363c53d80
Signed-off-by: John Kehayias <john.kehayias@protonmail.com>
2025-06-24 10:07:52 -04:00
Yelninei
6f1c5aed8a
gnu: screen: Fix build with gcc-14.
* gnu/packages/screen.scm (screen):
[#:configure-flags]: Add -Wno-error=int-conversions and
-Wno-error=incompatible-pointer-types to CFLAGS.

Change-Id: I14166477ff104ed1e64b9deebb89e032b50f69f9
Signed-off-by: Zheng Junjie <z572@z572.online>
2025-06-24 21:42:16 +08:00
fanquake
8e874ded5c
gnu: mingw-w64-tools: Update to 13.0.0.
* gnu/packages/mingw.scm (mingw-w64-tools): Update to 13.0.0.

Change-Id: Ie83c32f24eb6028864c96267b48a795a266269cf
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2025-06-24 12:54:25 +01:00
fanquake
a1d2015184
gnu: mingw-w64: Update to 13.0.0.
* gnu/packages/mingw.scm (make-mingw-w64): Update to 13.0.0.

Change-Id: I5d4f639c20828202eca82a396588fcde6d79511d
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2025-06-24 12:54:21 +01:00
Dariqq
141f96127e
gnu: power-profiles-daemon: Update to 0.30.
Fixing #506.

* gnu/packages/freedesktop.scm (power-profiles-daemon): Update to 0.30.
[#:phases]: In 'wrap-program add GI_TYPELIB_PATH to the wrapper.

Change-Id: Ie5d45a8326d8925a5fb790c8effb6365a82e1b71
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2025-06-24 12:48:39 +01:00
Ashish SHUKLA
63405dce98
gnu: libcgroup: Update to 3.2.0.
* gnu/packages/linux.scm (libcgroup): Update to 3.2.0.

Change-Id: Ib92d482f15af39d6e908414c345b3677479c3288
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2025-06-24 12:44:52 +01:00