Commit graph

1089 commits

Author SHA1 Message Date
Noé Lopez
21f0be1aa3
etc: manifests: Add important packages manifest for release.
For now, the packages are from the online form sent in
<https://lists.gnu.org/archive/html/guix-devel/2025-10/msg00091.html>.

Going forwards, more packages can be added manually or if there are more
answers to the form.

* etc/manifests/release-user-packages.scm: New file.
* Makefile.am: Add it.

Change-Id: I2d619ab9d307a6ea216310d1c86a1dc71feb1523
Signed-off-by: Rutherther <rutherther@ditigal.xyz>
Signed-off-by: Andreas Enge <andreas@enge.fr>
2025-12-10 13:01:00 +01:00
Leo Famulari
14bb0192fd
gnu: Remove linux-libre 6.16.
* gnu/packages/linux.scm (linux-libre-6.16-version,
linux-libre-6.16-gnu-revision, deblob-scripts-6.16,
linux-libre-6.16-pristine-source, linux-libre-6.16-source,
linux-libre-headers-6.16, linux-libre-6.16, linux-libre-arm64-mnt-reform-6.16):
Remove variables.
* gnu/packages/aux-files/linux-libre/6.16-arm.conf,
gnu/packages/aux-files/linux-libre/6.16-arm64.conf,
gnu/packages/aux-files/linux-libre/6.16-i686.conf,
gnu/packages/aux-files/linux-libre/6.16-riscv.conf,
gnu/packages/aux-files/linux-libre/6.16-x86_64.conf: Delete files.
* Makefile.am (AUX_FILES): Remove them.

Change-Id: I20755e7f0622211879db0f6aa8f9d11cea0ba28c
2025-12-04 20:22:27 -05:00
Rutherther
48ca028511
manifests: Split release manifest to two.
As stated in the manifest, use two release manifests:
1. Minimal one
2. Full one with all the desktop services enabled.

* etc/manifests/release.scm: Move to etc/manifests/release-minimal.scm.
* etc/manifests/release-minimal.scm (%system-packages):
Add packages from default privileged-programs.
Add %base-firmware.
Add %base-packages.
Remove desktops.
Remove xorg modules.

* etc/teams.scm (release): Add new splitted manifests.
* Makefile.am
(EXTRA_DIST): Remove release manifest; Add manifests release-minimal and
release-desktop.
(assert-binaries-available): Use new splitted release manifest.
* etc/manifests/release-desktop.scm (%system-packages):
Add desktops.
Add xorg modules.
* CODEOWNERS: Regenerate file.

Change-Id: I40de8b5d0f9c8b630e8af7969d4c195dd9e2c3e2
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2025-11-23 10:52:25 +02:00
Lilah Tascheter
029c575fc1
guix: build-system: Add hare-build-system.
* guix/build-system/hare.scm: New file.
* guix/build/hare-build-system.scm: New file.
* Makefile.am (MODULES): Add above new files.

Change-Id: I5b760410f6cd2ede28b84e8d2db363ff968f16f6
Signed-off-by: jgart <jgart@dismail.de>
2025-10-31 13:38:02 -05:00
Maxim Cournoyer
3ae5c9f2a7
Revert "syscalls: Add mmap support."
This reverts commit e1994a0214.
2025-10-30 16:19:51 +09:00
Maxim Cournoyer
9d60fdf6a2
Revert "elf: Remove bundled Guile source."
This reverts commit 11cf5b2fe4.
2025-10-30 16:19:49 +09:00
Maxim Cournoyer
11cf5b2fe4
elf: Remove bundled Guile source.
This module has been included in Guile as (system vm elf) since around version
2.1.

* guix/elf.scm: Delete file.
* CODEOWNERS: De-register module.
* Makefile.am (MODULES): Likewise.
* etc/teams.scm (core): Likewise.
* gnu/build/linux-modules.scm: Adjust imports.
* gnu/packages/gnuzilla.scm (icecat-minimal) [modules]: Likewise.
* gnu/packages/librewolf.scm (librewolf): Likewise.
* gnu/packages/sequoia.scm (sequoia): Likewise.
* gnu/packages/tor-browsers.scm (make-torbrowser): Likewise.
* gnu/packages/version-control.scm (hg-commitsigs): Likewise.
* guix/build/debug-link.scm: Likewise.
* guix/build/gnu-build-system.scm: Likewise.
* guix/build/gremlin.scm: Likewise.
* guix/build/meson-build-system.scm: Likewise.
* guix/grafts.scm (graft-derivation/shallow): Likewise.
* guix/scripts/pack.scm (wrapped-package): Likewise.
* tests/debug-link.scm: ("elf-debuglink", "set-debuglink-crc"): Likewise.
* tests/gremlin.scm: Likewise.
* guix/build-system/gnu.scm (%default-gnu-imported-modules): Remove (guix elf).

Change-Id: I86ac4237fdd820a6b54dc0fe7a7d10403a290ef9
2025-10-30 16:13:03 +09:00
Maxim Cournoyer
e1994a0214
syscalls: Add mmap support.
* guix/build/syscalls.scm (PROT_NONE, PROT_READ, PROT_WRITE, PROT_EXEC)
(PROT_SEM, MAP_SHARED, MAP_PRIVATE, MAP_FAILED)
(MS_ASYNC, MS_INVALIDATE, MS_SYNC)
(%mmap-guardian, %unmapped-bytevectors): New variables.
(unmapped-bytevector?, pump-mmap-guardian, %mmap, mmap, %munmap, munmap)
(%msync, msync): New procedures.
* guix/build/io.scm: New file.
* Makefile.am: Register it.
* tests/syscalls.scm (strace-output): New variable.
("mmap and munmap", "file->bytevector, reading", "file->bytevector, writing")
("manual munmap does not lead to double free"): New tests.

Change-Id: I19ec687899eda635559e91200dd8d98669b0e35f
2025-10-30 16:13:03 +09:00
Maxim Cournoyer
79dcb79e1f
tests: New ld-wrapper test.
* tests/ld-wrapper.scm: New file.
* Makefile.am (SCM_TESTS): Register it.

Change-Id: I3cef5ff363226a3ceee2599d4906f107d6ae7151
Reviewed-by: Ludovic Courtès <ludo@gnu.org>
2025-10-29 11:51:24 +09:00
Leo Famulari
aeb2454a62
gnu: Add linux-libre 6.17.
* gnu/packages/linux.scm (linux-libre-6.17-version,
linux-libre-6.17-gnu-revision, deblob-scripts-6.17,
linux-libre-6.17-pristine-source, linux-libre-6.17-source,
linux-libre-headers-6.17): New variables.
(linux-libre-headers-latest): Use linux-libre-headers-6.17.
* gnu/packages/aux-files/linux-libre/6.17-arm64.conf,
gnu/packages/aux-files/linux-libre/6.17-i686.conf,
gnu/packages/aux-files/linux-libre/6.17-riscv.conf,
gnu/packages/aux-files/linux-libre/6.17-x86_64.conf: New files.
* Makefile.am (AUX_FILES): Add them.

Co-authored-by: Dariqq <dariqq@posteo.net>

Change-Id: I52d2bc9114a948d31726d2da2a5916fc607dcdd6
2025-10-28 20:01:06 -04:00
Nicolas Graves
41f478a900
guix: Fix guix-minimal tests.
* Makefile.am (SCM_TESTS): Add tests/machine/hetzner.scm and
tests/machine/hetzner/http.scm conditionally.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-12 22:22:00 +02:00
Alexey Abramov
925d10cc64
gnu: linux-libre-6.16: Add armhf-linux support.
* gnu/packages/aux-files/linux-libre/6.16-arm.conf: New file.
* gnu/packages/linux.scm (linux-libre-6.16): Add "armhf-linux" to
supported systems.
* Makefile.am (AUX_FILES): Add 6.16-arm.conf.

Change-Id: I2e4208bac0539c09d0f7ced1d5c978cef6534f06
2025-10-09 00:21:58 -04:00
Nicolas Graves
1dab0f01bb
import: utils: Move tests to tests/import/utils.scm.
* tests/utils.scm: Move to tests/import/utils.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:17 +02:00
Nicolas Graves
12e6d3b48f
import: npm-binary: Move tests to tests/import/npm-binary.scm.
* tests/npm-binary.scm: Move to tests/import/npm-binary.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:17 +02:00
Nicolas Graves
a14df09097
import: composer: Move tests to tests/import/composer.scm.
* tests/composer.scm: Move to tests/import/composer.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:17 +02:00
Nicolas Graves
a34376aa71
import: texlive: Move tests to tests/import/texlive.scm.
* tests/texlive.scm: Move to tests/import/texlive.scm.
* Makefile.am: Refresh it.
* CODEOWNERS: Refresh it.
* etc/teams.scm: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:16 +02:00
Nicolas Graves
0dba512d86
import: luanti: Move tests to tests/import/luanti.scm.
* tests/luanti.scm: Move to tests/import/luanti.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:16 +02:00
Nicolas Graves
15b351691e
import: github: Move tests to tests/import/github.scm.
* tests/import-github.scm: Move to tests/import/github.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:16 +02:00
Nicolas Graves
16c08ac5d8
import: print: Move tests to tests/import/print.scm.
* tests/print.scm: Move to tests/import/print.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:16 +02:00
Nicolas Graves
090d574dbf
import: hexpm: Move tests to tests/import/hexpm.scm.
* tests/hexpm.scm: Move to tests/import/hexpm.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:16 +02:00
Nicolas Graves
5507b1bfc0
import: opam: Move tests to tests/import/opam.scm.
* tests/opam.scm: Move to tests/import/opam.scm.
* Makefile.am: Refresh it.
* CODEOWNERS: Refresh it.
* etc/teams.scm: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:16 +02:00
Nicolas Graves
fc905a5a69
import: elpa: Move tests to tests/import/elpa.scm.
* tests/elpa.scm: Move to tests/import/elpa.scm.
* Makefile.am: Refresh it.
* CODEOWNERS: Refresh it.
* etc/teams.scm: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:16 +02:00
Nicolas Graves
7a41349bed
import: cran: Move tests to tests/import/cran.scm.
* tests/cran.scm: Move to tests/import/cran.scm.
* Makefile.am: Refresh it.
* CODEOWNERS: Refresh it.
* etc/teams.scm: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:16 +02:00
Nicolas Graves
02f1ff69c6
import: git: Move tests to tests/import/git.scm.
* tests/import-git.scm: Move to tests/import/git.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:15 +02:00
Nicolas Graves
94df3e6f28
import: gem: Move tests to tests/import/gem.scm.
* tests/gem.scm: Move to tests/import/gem.scm.
* Makefile.am: Refresh it.
* CODEOWNERS: Update.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:04:05 +02:00
Nicolas Graves
9bf4e572df
import: elm: Move tests to tests/import/elm.scm.
* tests/elm.scm: Move to tests/import/elm.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:00:36 +02:00
Nicolas Graves
bf468f4b70
import: egg: Move tests to tests/import/egg.scm.
* tests/egg.scm: Move to tests/import/egg.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:00:36 +02:00
Nicolas Graves
d4fda72d8f
import: go: Move tests to tests/import/go.scm.
* tests/go.scm: Move to tests/import/go.scm.
* Makefile.am: Refresh it.
* CODEOWNERS: Refresh it.
* etc/teams.scm: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:00:36 +02:00
Nicolas Graves
fbc1da99ea
import: crate: Move tests to tests/import/crate.scm.
* tests/crate.scm: Move to tests/import/crate.scm.
* Makefile.am: Refresh it.
* CODEOWNERS: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:00:36 +02:00
Nicolas Graves
d950c929e9
import: cpan: Move tests to tests/import/cpan.scm.
* tests/cpan.scm: Move to tests/import/cpan.scm.
* gnu/packages/admin.scm (ansible): Update comment.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:00:36 +02:00
Nicolas Graves
5cf0daa657
import: hackage: Move tests to tests/import/hackage.scm.
* tests/hackage.scm: Move to tests/import/hackage.scm.
* Makefile.am: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:00:35 +02:00
Nicolas Graves
f1a3bf940c
import: pypi: Move tests to tests/import/pypi.scm
* tests/pypi.scm: Move to tests/import/pypi.scm
* CODEOWNERS: Refresh it.
* Makefile.am: Refresh it.
* etc/teams.scm: Refresh it.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-10-01 11:00:35 +02:00
Florian Pelz
b5054a85c1
nls: Minify translation PO files.
To save a lot of disk space, keep only actually translated messages in
Gettext PO files.  Ignore the guix domain, which is more complicated
and is tiny.

* build-aux/keep-only-translated.scm: New file.
* Makefile.am (download-po): Run it.

Change-Id: I6442ce0ef8d62f7e48e667c766b86d0ebf9c5415
2025-09-30 10:37:34 +02:00
Florian Pelz
0509bc4cba
nls: Avoid call to slow msgfilter program.
* Makefile.am (download-po): Replace msgfilter by msgconv.

Change-Id: Ic60af4cd605708a7152dd674182adde212ab0fd0
2025-09-30 10:37:18 +02:00
Oscar Chevalier
2738209b5d
gnu: neovim: Add support for guix neovim packages.
Enables the use of guix as a package manager for neovim, compatible with
the outputs of `vim-build-system`.

* gnu/packages/vim.scm (neovim)[arguments]: Added another phase to
install the system init file to the correct place.
* gnu/packages/aux-files/guix-nvim.vim: New file.
* Makefile.am (AUX_FILES): Register file.

Change-Id: I375e3e0d051da27d065dff5456cb298a01bc90b1
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2025-09-25 12:38:47 +03:00
Maxim Cournoyer
10482f731e
Reapply "Update Maxim's email address."
This reverts commit a7db92d9b3, this time with
the more careful command, to avoid a world rebuild:

grep -rl --exclude-dir=build --exclude-dir=patches --exclude=ld-wrapper.in \
  --exclude=sitecustomize.py --exclude=guix-emacs.el maxim.cournoyer@gmail.com |
  xargs sed -i 's/maxim.cournoyer@gmail.com/maxim@guixotic.coop/g'

Change-Id: I0871f5cf9ace79e34e78e24154d0da6ea95a3a91
2025-09-18 13:44:12 +09:00
Maxim Cournoyer
a7db92d9b3
Revert "Update Maxim's email address."
This reverts commit d0d87a744d. Oops! This
caused a world rebuild.

Change-Id: I25fff644b2b61d0ee93d69b457b04c72b5b74d15
2025-09-18 12:07:31 +09:00
Maxim Cournoyer
d0d87a744d
Update Maxim's email address.
The change was automated via:

  git grep -l maxim.cournoyer@gmail.com |
    xargs sed -i 's/maxim.cournoyer@gmail.com/maxim@guixotic.coop/g'

* .mailmap: New entry.

Change-Id: Iaa88b1e51c94159c49138fb43910badb990eb169
2025-09-18 08:05:19 +09:00
Leo Famulari
03fbb4850f
gnu: Remove linux-libre 6.15.
The 6.15 kernel series is no longer supported upstream.

* gnu/packages/linux.scm (linux-libre-6.15-version,
linux-libre-6.15-gnu-revision, deblob-scripts-6.15,
linux-libre-6.15-pristine-source, linux-libre-6.15-source,
linux-libre-headers-6.15, linux-libre-6.15): Remove variables.
* gnu/packages/aux-files/linux-libre/6.15-arm.conf,
gnu/packages/aux-files/linux-libre/6.15-arm64.conf,
gnu/packages/aux-files/linux-libre/6.15-i686.conf,
gnu/packages/aux-files/linux-libre/6.15-riscv.conf,
gnu/packages/aux-files/linux-libre/6.15-x86_64.conf: Delete files.
* Makefile.am (AUX_FILES): Remove them.

Change-Id: I89fb56d4153589da7205d55458e1c4d8ab53c206
2025-09-13 14:57:19 -04:00
Leo Famulari
6e57701013
gnu: Add linux-libre 6.16.
* gnu/packages/linux.scm (linux-libre-6.16-version,
linux-libre-6.16-gnu-revision, deblob-scripts-6.16,
linux-libre-6.16-pristine-source, linux-libre-6.16-source,
linux-libre-headers-6.16, linux-libre-6.16): New variables.
(linux-libre-headers-latest): Use linux-libre-headers-6.16.
* gnu/packages/aux-files/linux-libre/6.16-arm64.conf,
gnu/packages/aux-files/linux-libre/6.16-i686.conf,
gnu/packages/aux-files/linux-libre/6.16-riscv.conf,
gnu/packages/aux-files/linux-libre/6.16-x86_64.conf: New files.
* Makefile.am (AUX_FILES): Add them.

Co-authored-by: Dariqq <dariqq@posteo.net>

Change-Id: I2ec0b54aa3b6ba509cb80daaf8175ddc822da382
2025-09-01 21:51:07 -04:00
Hilton Chain
f27fb840c2
import: crate: Add Cargo.lock parser.
* guix/import/crate/cargo-lock.scm: New file.
* Makefile.am (MODULES): Regisiter it.
* etc/teams.scm (rust)[#:scope]: Add it.
* CODEOWNERS: Add it.
* guix/import/crate.scm (cargo-lock->expressions): New procedure.
* tests/crate.scm (temp-file): New variable.
("crate-lockfile-import"): New test.

Co-authored-by: Murilo <murilo@disroot.org>
Co-authored-by: Luis Guilherme Coelho <lgcoelho@disroot.org>
Change-Id: I95421e9e2ba11a671b4bc4e1323c6d31a1b012c5
2025-08-21 19:08:21 +08:00
Leo Famulari
f726b84d22
gnu: Remove linux-libre 6.14.
This kernel series is no longer supported upstream.

* gnu/packages/linux.scm (linux-libre-6.14-version,
linux-libre-6.14-gnu-revision, deblob-scripts-6.14,
linux-libre-6.14-pristine-source, linux-libre-6.14-source,
linux-libre-headers-6.14, linux-libre-6.14): Remove variables.
* gnu/packages/aux-files/linux-libre/6.14-arm.conf,
  gnu/packages/aux-files/linux-libre/6.14-arm64.conf,
gnu/packages/aux-files/linux-libre/6.14-i686.conf,
gnu/packages/aux-files/linux-libre/6.14-riscv.conf,
gnu/packages/aux-files/linux-libre/6.14-x86_64.conf: Delete files.
* Makefile.am (AUX_FILES): Remove them.

Change-Id: I59b84296f21c6204990442a817ec3727403169de
2025-08-20 19:33:21 -04:00
Liliana Marie Prikler
abbdfbb775
gnu: Rename minetest to luanti.
* gnu/packages/luanti.scm: New file.
(luanti, luanti-server, luanti-topic, luanti-moreores, luanti-sound-api-core)
(luanti-basic-materials, luanti-coloredwood, luanti-ethereal)
(luanti-homedecor-modpack, luanti-mesecons, luanti-mineclone, luanti-mobs)
(luanti-mobs-animal, luanti-mobs-monster, luanti-pipeworks, luanti-technic)
(luanti-throwing, luanti-throwing-arrows, luanti-worldedit)
(luanti-unifieddyes, luanti-unified-inventory, luanti-advtrains)
(luanti-basic-trains, luanti-oneblock, luanti-wielded-light): New variables.
* gnu/packages/minetest.scm:
(minetest, minetest-server, minetest-topic, minetest-moreores)
(minetest-sound-api-core, minetest-basic-materials, minetest-coloredwood)
(minetest-ethereal, minetest-homedecor-modpack, minetest-mesecons)
(minetest-mineclone, minetest-mobs, minetest-mobs-animal)
(minetest-mobs-monster, minetest-pipeworks, minetest-technic)
(minetest-throwing, minetest-throwing-arrows, minetest-worldedit)
(minetest-unifieddyes, minetest-unified-inventory, minetest-advtrains)
(minetest-basic-trains, minetest-oneblock, minetest-wielded-light): Deprecate
in favor of the above.
(minetest-game): Move to…
* gnu/packages/luanti.scm (minetest-game): … here.
* gnu/local.mk (GNU_SYSTEM_MODULES): Register luanti.scm.
* guix/build-system/luanti.scm: New file.
(luanti-mod-build-system): New public variable.
* guix/build-system/minetest.scm (minetest-mod-build-system): Deprecate in
favor of luanti-mod-build-system.
* guix/build/luanti-build-system.scm: New file, renamed from…
* guix/build/minetest-build-system.scm: … this. Deprecate in favor of
luanti-build-system.
* guix/import/luanti.scm: New file, renamed from guix/import/minetest.scm.
(%contentdb-api): Switch to “https://content.luanti.org/api/”.
(luanti-package?, latest-luanti-release, luanti->guix-package)
(luanti-recursive-import, %luanti-updater): New public variables.
* guix/import/minetest.scm (minetest-package?, latest-minetest-release)
(minetest->guix-package, minetest-recursive-import, %minetest-updater):
Deprecate in favor of the luanti variants above.
* guix/scripts/import/luanti.scm: New file, renamed from
guix/scripts/import/minetest.scm.
(guix-import-luanti): New public variable.
* guix/scripts/import/minetest.scm (guix-import-minetest): Deprecate in favor
of guix-import-luanti.
* tests/minetest.scm: Rename to…
* tests/luanti.scm: … this.
* Makefile.am (MODULES, SCM_TESTS): Adjust accordingly.
* etc/teams.scm (games): Adjust accordingly.
* CODEOWNERS: Adjust accordingly.
2025-07-13 13:54:01 +02:00
Florian Pelz
eb0acce967
nls: Switch Weblate repo URL to Codeberg.
* Makefile.am (WEBLATE_REPO): Update.

Change-Id: I93b97fa296c3b7a393bdff3cbc3357a24c660154
2025-07-10 18:43:08 +02:00
Leo Famulari
c28e0407f1
gnu: Add linux-libre 6.15.4.
* gnu/packages/linux.scm (linux-libre-6.15-version,
linux-libre-6.15-gnu-revision, deblob-scripts-6.15,
linux-libre-6.15-pristine-source, linux-libre-6.15-source,
linux-libre-headers-6.15, linux-libre-6.15): New variables.
(linux-libre-headers-latest): Use linux-libre-headers-6.15
* gnu/packages/aux-files/linux-libre/6.15-arm.conf,
gnu/packages/aux-files/linux-libre/6.15-arm64.conf,
gnu/packages/aux-files/linux-libre/6.15-i686.conf,
gnu/packages/aux-files/linux-libre/6.15-riscv.conf,
gnu/packages/aux-files/linux-libre/6.15-x86_64.conf: New files.
* Makefile.am (AUX_FILES): Add them.

Change-Id: I7edd9dc48744065785a5e84cdf6c404b956b03fd
2025-07-02 12:07:06 -04:00
Brice Waegeneire
c6b4fe16f4
build: Create .git/hooks/.
* Makefile.am (.git/hooks/): Add.
(.git/hooks/%, .git/hooks/commit-msg): Depend on .git/hooks/.

Change-Id: I5e027d22ec71b8cb080dca2971fabb85c593cb35
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-06-30 14:30:40 +02:00
Tomas Volf
8a5a983241
Makefile: Register nuget importer.
* Makefile.am (MODULES): Add guix/import/nuget.scm.

Change-Id: I4a96f81c1ecd34a82e015889868bb0559259165f
Signed-off-by: Zheng Junjie <z572@z572.online>
2025-06-28 10:16:25 +08:00
Zheng Junjie
10ffc93325
build: Do not generate 'CODEOWNERS' when cross-compiling.
Fixes: guix/guix#812

* Makefile.am (CODEOWNERS): wrap it with in_git_p and !CROSS_COMPILING.

Change-Id: I65389947d3065d470739ca1a12398551be2178c1
2025-06-27 15:36:41 +08: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
Yelninei
b68c4c03d5
build: Compile guix/build/po.go for the build triplet.
guix/build/po.go is not installed and this speeds up convert-xref.scm when
cross-compiling for a host with incompatible guile bytecode.

Fixes: guix/guix#141

* Makefile.am (guile-compilation-rule): Parameterize the host variable.
(make-core-go,make-packages*-go, make-system-go,make-cli-go): Compile for the
host triplet.
(guix/build/po.go): Compile for the build triplet.

Change-Id: I9bad5f7743dd736a2958fb8ae8dd0ee8efc190ec
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2025-06-16 23:11:11 +02:00