Commit graph

156576 commits

Author SHA1 Message Date
Ludovic Courtès
2f65438eba
tests: Run in a chroot and unprivileged user namespaces.
* build-aux/test-env.in: Pass ‘--disable-chroot’ only when unprivileged
user namespace support is lacking and warn in that case.
* tests/store.scm ("build-things, check mode"): Use ‘gettimeofday’
rather than a shared file as a source of entropy.
("symlink is symlink")
("isolated environment", "inputs are read-only")
("inputs cannot be remounted read-write")
("build root cannot be made world-readable")
("/tmp, store, and /dev/{null,full} are writable")
("network is unreachable"): New tests.
* tests/processes.scm ("client + lock"): Skip when
‘unprivileged-user-namespace-supported?’ returns true.

Change-Id: I3b3c3ebdf6db5fd36ee70251d07b893c17ca1b84
2025-03-26 17:57:44 +01:00
Ludovic Courtès
f854095b6f
tests: Add missing derivation inputs.
These missing inputs go unnoticed when running ‘guix-daemon
--disable-chroot’ but are immediately visible otherwise.

* tests/derivations.scm ("fixed-output derivation"): Add %BASH to #:sources.
("fixed-output derivation: output paths are equal"):
("fixed-output derivation, recursive"):
("derivation with a fixed-output input"):
("derivation with duplicate fixed-output inputs"):
("derivation with equivalent fixed-output inputs"):
("build derivation with coreutils"): Likewise.
* tests/packages.scm (bootstrap-binary): New procedure.
("package-source-derivation, origin, sha512"): Use it instead of
‘search-bootstrap-binary’ and add BASH to #:sources.
("package-source-derivation, origin, sha3-512"): Likewise.

Change-Id: I4c9087df23c47729a3aff15e9e1435b7266e36e2
2025-03-26 17:57:44 +01:00
Ludovic Courtès
29164192e9
linux-container: ‘unprivileged-user-namespace-supported?’ returns #f on non-Linux.
Previously this procedure would return #t on non-Linux systems.

* gnu/build/linux-container.scm (unprivileged-user-namespace-supported?):
When USERNS-FILE doesn’t exist, return (user-namespace-supported?).

Reported-by: Reepca Russelstein <reepca@russelstein.xyz>
Change-Id: I92050338b8b68bc3bd87100317eba69fcdf14a0a
2025-03-26 17:57:44 +01:00
Ludovic Courtès
bdd7b9a45d
daemon: Move comments where they belong.
* nix/libstore/build.cc (DerivationGoal::startBuilder): Shuffle
comments for clarity.

Change-Id: I6557c103ade4a3ab046354548ea193c68f8c9c05
2025-03-26 17:57:44 +01:00
Ludovic Courtès
0163c732a1
daemon: Drop Linux ambient capabilities before executing builder.
* config-daemon.ac: Check for <sys/prctl.h>.
* nix/libstore/build.cc (DerivationGoal::runChild): When ‘useChroot’ is
true, call ‘prctl’ to drop all ambient capabilities.

Change-Id: If34637fc508e5fb6d278167f5df7802fc595284f
2025-03-26 17:57:44 +01:00
Ludovic Courtès
a3d6f5ae70
daemon: Create /var/guix/profiles/per-user unconditionally.
* nix/libstore/local-store.cc (LocalStore::LocalStore): Create
‘perUserDir’ unconditionally.

Change-Id: I5188320f9630a81d16f79212d0fffabd55d94abe
2025-03-26 17:57:44 +01:00
Ludovic Courtès
ae18b3d9e6
daemon: Allow running as non-root with unprivileged user namespaces.
Many thanks to Reepca Russelstein for their review and guidance on these
changes.

* nix/libstore/build.cc (guestUID, guestGID): New variables.
(DerivationGoal)[readiness]: New field.
(initializeUserNamespace): New function.
(DerivationGoal::runChild): When ‘readiness.readSide’ is positive, read
from it.
(DerivationGoal::startBuilder): Call ‘chown’
only when ‘buildUser.enabled()’ is true.  Pass CLONE_NEWUSER to ‘clone’
when ‘buildUser.enabled()’ is false or not running as root.  Retry
‘clone’ without CLONE_NEWUSER upon EPERM.
(DerivationGoal::registerOutputs): Make ‘actualPath’ writable before
‘rename’.
(DerivationGoal::deleteTmpDir): Catch ‘SysError’ around ‘_chown’ call.
* nix/libstore/local-store.cc (LocalStore::createUser): Do nothing if
‘dirs’ already exists.  Warn instead of failing when failing to chown
‘dir’.
* guix/substitutes.scm (%narinfo-cache-directory): Check for
‘_NIX_OPTIONS’ rather than getuid() == 0 to determine the cache
location.
* doc/guix.texi (Build Environment Setup): Reorganize a bit.  Add
section headings “Daemon Running as Root” and “The Isolated Build
Environment”.  Add “Daemon Running Without Privileges” subsection.
Remove paragraph about ‘--disable-chroot’.
(Invoking guix-daemon): Warn against ‘--disable-chroot’ and explain why.
* tests/derivations.scm ("builder is outside the store"): New test.

Reviewed-by: Reepca Russelstein <reepca@russelstein.xyz>
2025-03-26 17:57:43 +01:00
Ludovic Courtès
40f69b586a
daemon: Remount root directory as read-only.
* nix/libstore/build.cc (DerivationGoal::runChild): Bind-mount the store
and /tmp under ‘chrootRootDir’ to themselves as read-write.
Remount / as read-only.

Change-Id: I79565094c8ec8448401897c720aad75304fd1948
2025-03-26 17:57:43 +01:00
Ludovic Courtès
93474f9288
daemon: Remount inputs as read-only.
* nix/libstore/build.cc (DerivationGoal::runChild): Remount ‘target’ as
read-only.

Reported-by: Reepca Russelstein <reepca@russelstein.xyz>
Change-Id: Ib7201bcf4363be566f205d23d17fe2f55d3ad666
2025-03-26 17:57:43 +01:00
Ludovic Courtès
550ca89744
daemon: Bind-mount all the inputs, not just directories.
* nix/libstore/build.cc (DerivationGoal::startBuilder): Add all of
‘inputPaths’ to ‘dirsInChroot’ instead of hard-linking regular files.
Special-case symlinks.
(DerivationGoal)[regularInputPaths]: Remove.

Reported-by: Reepca Russelstein <reepca@russelstein.xyz>
Change-Id: I070987f92d73f187f7826a975bee9ee309d67f56
2025-03-26 17:57:43 +01:00
Ludovic Courtès
5c0b93b244
daemon: Bind-mount /etc/nsswitch.conf & co. only if it exists.
Those files may be missing in some contexts, for instance within the
build environment.

* nix/libstore/build.cc (DerivationGoal::runChild): Add /etc/resolv.conf
and related files to ‘ss’ only if they exist.

Change-Id: Ie19664a86c8101a1dc82cf39ad4b7abb10f8250a
2025-03-26 17:57:43 +01:00
Ludovic Courtès
7bad04fac0
daemon: Close the read end of the logging pipe.
* nix/libutil/util.cc (commonChildInit): Close ‘logPipe.readSide’.

Reported-by: Reepca Russelstein <reepca@russelstein.xyz>
Change-Id: Ia9e48d1afb85d7af52770e016f2b6832792044dd
2025-03-26 17:57:43 +01:00
Ludovic Courtès
f03e6eff2f
daemon: Use ‘close_range’ where available.
* nix/libutil/util.cc (closeMostFDs) [HAVE_CLOSE_RANGE]: Use
‘close_range’ when ‘exceptions’ is empty.
* config-daemon.ac: Check for <linux/close_range.h> and the
‘close_range’ symbol.

Change-Id: I12fa3bde58b003fcce5ea5a1fee1dcf9a92c0359
2025-03-26 17:57:42 +01:00
Ludovic Courtès
92205bab4d
services: unattended-upgrade: Exit with non-zero upon failure.
Until now, the service would always exit with 0, which makes failures
harder to distinguish in the output of ‘herd status’, for instance.

* gnu/services/admin.scm (unattended-upgrade-shepherd-services)[code]:
Call ‘exit’ after ‘report-invoke-error’.

Change-Id: Idfc74a48a6a798e813db96d5770a897595b27240
2025-03-26 17:55:50 +01:00
David Thompson
80651b8899
gnu: guile-goblins: Update to 0.15.1.
* gnu/packages/guile-xyz.scm (guile-goblins): Update to 0.15.1.

Change-Id: I6bb3b6ac2a4d1ffa3f9ab9fae5820b82a0fdd49c
2025-03-26 11:44:22 -04:00
Danny Milosavljevic
ea41557c9f
gnu: Add perl-math-interpolate.
* gnu/packages/perl-maths.scm (perl-math-interpolate): New variable.

Change-Id: I4b5b9585e53845fb1ec226a0e350fe38ec859916
2025-03-26 15:42:44 +01:00
Andy Tai
261f179c74
gnu: mtools: Update to 4.0.48.
* gnu/packages/mtools.scm (mtools): Update to 4.0.48.

Change-Id: Ia4cbe13dfcba65b0c301c34559721da24dc815c7
Signed-off-by: Danny Milosavljevic <dannym@friendly-machines.com>
2025-03-26 15:42:44 +01:00
Leo Famulari
df439ebce9
gnu: linux-libre 6.6: Update to 6.6.84.
* gnu/packages/linux.scm (linux-libre-6.6-version): Update to 6.6.84.
(linux-libre-6.6-pristine-source): Update hash.

Change-Id: Ie7d7ff328aa3a6e4c66b52a06326ebd3f77b064e
2025-03-26 08:41:35 -04:00
Leo Famulari
9d73c8105f
gnu: linux-libre 6.12: Update to 6.12.20.
* gnu/packages/linux.scm (linux-libre-6.12-version): Update to 6.12.20.
(linux-libre-6.12-pristine-source): Update hash.

Change-Id: I5e056e4fc42be3de24d25597e6af754f420b9692
2025-03-26 08:41:35 -04:00
Leo Famulari
af1210b098
gnu: linux-libre: Update to 6.13.8.
* gnu/packages/linux.scm (linux-libre-6.13-version): Update to 6.13.8.
(linux-libre-6.13-pristine-source): Update hash.

Change-Id: I11e59be49416352b1de797c55a318c1a8756a1a8
2025-03-26 08:41:31 -04:00
Vinicius Monego
0c83bcfa81
gnu: opencv: Remove unused input.
* gnu/packages/image-processing.scm (opencv)[inputs]: Remove gtkglext.

Change-Id: I9444e4d9eaf36d56051bfbc54d7039c120405f03
Signed-off-by: Andreas Enge <andreas@enge.fr>
2025-03-26 10:07:20 +01:00
André Batista
24effa5fc2
gnu: mozjs: Remove version 91.
No packages depend on this version anymore.

* gnu/packages/gnuzilla.scm (mozjs-91): Delete variable.

Change-Id: Icc4efd0fc8b3728e4e6c6953fe3266262358d193
Signed-off-by: Andreas Enge <andreas@enge.fr>
2025-03-26 10:00:06 +01:00
Nguyễn Gia Phong
a8fa0ccaa9
gnu: mepo: Update to 1.3.4.
* gnu/packages/geo.scm (mepo): Update to 1.3.4.
[arguments]<zig>: Specify Zig 0.14.
<phases>: Add patch-geoclue-demos-path.
[inputs]: Add geoclue.

Change-Id: Ibb9020dcb8202becced1c70ac2a616502dec466e
Signed-off-by: Andreas Enge <andreas@enge.fr>
2025-03-26 09:36:39 +01:00
Efraim Flashner
24440a299c
gnu: python-numpy: Skip another test on armhf-linux.
* gnu/packages/python-xyz.scm (python-numpy)[arguments]: When building
for armhf-linux skip another test.

Change-Id: Iccd691affca928061becc183db14009544c0e163
2025-03-26 07:44:33 +02:00
Zheng Junjie
d6a9fc6c95
gnu: Add python-flake8-import-order.
* gnu/packages/python-xyz.scm (python-flake8-import-order): New variable.

Change-Id: I2f6a0a71c39d2b8112c66116b8a880d570b8b950
2025-03-26 12:19:24 +08:00
Zheng Junjie
19905aaf83
gnu: Add python-flake8-class-newline.
* gnu/packages/python-xyz.scm (python-flake8-class-newline): New variable.

Change-Id: I4cf791c6e075094ba0be02daec8de06bd5cf2619
2025-03-26 12:19:24 +08:00
Zheng Junjie
7127a51490
gnu: Add python-flake8-docstrings.
* gnu/packages/python-xyz.scm (python-flake8-docstrings): New variable.

Change-Id: I758db70b11394134221d795e38a049527aa87da8
2025-03-26 12:19:24 +08:00
Cayetano Santos
5d2f5d1761
gnu: nvc: Update to 1.15.2.
* gnu/packages/fpga.scm (nvc): Update to 1.15.2.

Change-Id: I160e0927b28efc980e9b7ce4aae9466dbabb1666
Signed-off-by: Zheng Junjie <z572@z572.online>
2025-03-26 12:19:20 +08:00
Danny Milosavljevic
4d655e4883
gnu: Add dualsensectl.
* gnu/packages/linux.scm (dualsensectl): New variable.

Change-Id: I59e20c816198da2f29d374395a5e3b4d21376b1d
2025-03-26 02:10:19 +01:00
Danny Milosavljevic
e4ca2ae095
gnu: Add lean4.
* gnu/packages/lean.scm (lean4): New variable.

Change-Id: I9f51b7475eabdecd98fb05378a2cf91ed516c5ed
2025-03-26 02:08:08 +01:00
Danny Milosavljevic
169894151f
gnu: Add emacs-lean4-mode.
* gnu/packages/emacs-xyz.scm (emacs-lean4-mode): New variable.

Change-Id: I787e4debe890f1f18c2bbdf8ee4334c4e46433eb
2025-03-26 01:05:01 +01:00
Danny Milosavljevic
e548e4c4f9
gnu: Add emacs-doctest.
* gnu/packages/emacs-xyz.scm (emacs-doctest): New variable.

Change-Id: I159da3e999f3b5c31a196f3af97ca96ca66959ff
2025-03-25 23:49:57 +01:00
Christopher Baines
dbef60edb3
gnu: guile-knots: Update to 0-16.e1858df.
* gnu/packages/guile-xyz.scm (guile-knots): Update to 0-16.e1858df.

Change-Id: I75c4b194bb0f46c7300c4049b9bb531f2622a7cd
2025-03-25 18:40:30 +00:00
Christopher Baines
fc72db645c
gnu: guix-build-coordinator: Update to 0-125.4cf3b58.
* gnu/packages/package-management.scm (guix-build-coordinator): Update to
0-125.4cf3b58.

Change-Id: If6f9bc8d378083d2f5dbe8e48ecc5a689db9bc2e
2025-03-25 18:35:56 +00:00
Christopher Baines
302bf18569
gnu: guix-data-service: Update to 0.0.1-66.d60a8a4.
* gnu/packages/web.scm (guix-data-service): Update to 0.0.1-66.d60a8a4.

Change-Id: Iced3d73d24b4e1148c527fde9801a969514a6449
2025-03-25 18:34:15 +00:00
Christopher Baines
632fc47d93
gnu: python-pytest-mypy: Fix tests on powerpc64le-linux.
As a test was timing out, so apply the same workaround as used for riscv64.

* gnu/packages/check.scm (python-pytest-mypy)[arguments]: Patch the test
timeout for powerpc64le-linux, as well as for riscv64-linux.

Change-Id: I6d771a092f0fb50c9870446a152d14c98d6f96e6
2025-03-25 18:22:37 +00:00
Christopher Baines
0807035449
build-system: go: Support parallel options for cross builds.
Since these options were added for normal builds, those packages that used
these options couldn't be cross built.  Supporting these options in
go-cross-build restores this functionality.

* guix/build-system/go.scm (go-cross-build): Support the #:parallel-build? and
 #:parallel-tests? keyword arguments.

Change-Id: I9768c9562246b61c2ea875a3d5a42809924f3a7d
2025-03-25 18:20:53 +00:00
Andreas Enge
744cf07005
gnu: texlive: Update to 20250308.
* gnu/packages/texlive.scm (%texlive-date, texlive-extra-src,
texlive-texmf-src, texlivebin): Update to 20250308.

Change-Id: Ic0fdfefd6a82ae0ae34eb1d3e0b9cbe1043f8ca6
2025-03-25 12:37:49 +01:00
Noé Lopez
ff01962902
gnu: discover: Add missing runtime dependencies.
qtsvg for icons and the rest for the page with package details.

* gnu/packages/kde-plasma.scm (discover): Add missing runtime
dependencies.

Change-Id: I93598a474c0799ed57234f57f74e216beaf2618b
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-03-25 11:37:02 +01:00
Skylar Hill
29f52eed72
gnu: Add guile-oauth.
* gnu/packages/guile-xyz.scm (guile-oauth): New variable.

Change-Id: Ie5e8e15a35e2e71171ef6b8ea2e4b86e339152d3
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-03-25 11:37:02 +01:00
Ludovic Courtès
281a616d72
doc: Remove incorrect ‘kbxutil’ example.
Fixes <https://issues.guix.gnu.org/71918>.

* doc/guix.texi (Invoking guix refresh): Remove ‘kbxutil’ example.

Reported-by: Attila Lendvai <attila@lendvai.name>
Change-Id: If185740731bf29462caba8be31c07f296d0bddd0
2025-03-25 11:37:02 +01:00
Sughosha
cfe68843a8
services: readymedia: Change cache and log directory permissions to 755.
Create cache directory and log directory with 755 permission, which passes
run-readymedia-test.

* gnu/services/upnp.scm (readymedia-activation): Change directory permissions
of cache-directory and log-directory to 755.

Change-Id: Iff30040c3fd52564510f66d3568dab0ef89e0449
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-03-25 11:37:02 +01:00
Meredith Oleander
265d4f33dc
gnu: Add zig-zls-0.14.
* gnu/packages/zig-xyz.scm (zig-zls-0.14): New variable.

Change-Id: I83611bdc850a4f51b6d412595b7ff5afe6464bf9
Signed-off-by: Hilton Chain <hako@ultrarare.space>
Modified-by: Hilton Chain <hako@ultrarare.space>
2025-03-25 16:58:42 +08:00
Meredith Oleander
69b9d96400
gnu: Add zig-lsp-codegen.
* gnu/packages/zig-xyz.scm (zig-lsp-codegen): New variable.

Change-Id: I2ab0c3bcb944bd75489b369a7d45496e9b7af913
Signed-off-by: Hilton Chain <hako@ultrarare.space>
Modified-by: Hilton Chain <hako@ultrarare.space>
2025-03-25 16:49:20 +08:00
Hilton Chain
12a20dc2e7
gnu: Add zig-known-folders-for-zig-zls-0.14.
* gnu/packages/zig-xyz.scm (zig-known-folders-for-zig-0.14): New variable.

Change-Id: Ib284f1f600dab56ddf64df5fe024fe8f35f1ac53
2025-03-25 16:28:41 +08:00
Hilton Chain
386138b587
gnu: Add zig-diffz-for-zig-zls-0.14.
* gnu/packages/zig-xyz.scm (zig-diffz-for-zig-zls-0.14): New variable.

Change-Id: Ie60e7f34aa802663fb484961e879784b26717bf9
2025-03-25 16:27:51 +08:00
Ashvith Shetty
14d7fe42b8
gnu: Add beanbag.
* gnu/packages/zig-xyz.scm (beanbag): New variable.

Change-Id: I1ffb34dd771e4cb0938f1c471573e6bbe1ff5046
Signed-off-by: Hilton Chain <hako@ultrarare.space>
Modified-by: Hilton Chain <hako@ultrarare.space>
2025-03-25 15:56:45 +08:00
Ashvith Shetty
82619151c7
gnu: Add zig-zigimg.
* gnu/packages/zig-xyz.scm (zig-zigimg): New variable.

Change-Id: If87e1f65d3aa544b30ea3fb0da4e292bcec5e567
Signed-off-by: Hilton Chain <hako@ultrarare.space>
Modified-by: Hilton Chain <hako@ultrarare.space>
2025-03-25 15:38:51 +08:00
Ashvith Shetty
3be752259d
gnu: Add zig-clap.
* gnu/packages/zig-xyz.scm (zig-clap): New variable.

Change-Id: Iae01f44bd9ddb312b51cf899c24f6b56a808d026
Signed-off-by: Hilton Chain <hako@ultrarare.space>
Modified-by: Hilton Chain <hako@ultrarare.space>
2025-03-25 15:38:48 +08:00
Guillaume Le Vaillant
ce086e31f0
gnu: cl-gtk4: Update to 1.0.0-2.c05d03e.
* gnu/packages/lisp-xyz.scm (sbcl-cl-gtk4): Update to 1.0.0-2.c05d03e.

Change-Id: Ib3ab88defc3fdf53e014869e667c262da5541e4f
2025-03-24 18:54:23 +01:00