~ruther/guix-local

d8b7259197aae7370cf7f72af74a6a0c0663737f — Ludovic Courtès 1 year, 5 months ago 2cb1b72
reconfigure: Do not pass KEXEC_FILE_DEBUG.

This flag is unsupported in Linux 6.6 and causes ‘kexec_file_load’ to
fail with EINVAL.

Fixes <https://issues.guix.gnu.org/75211>.

* guix/scripts/system/reconfigure.scm (kexec-loading-program): Remove
KEXEC_FILE_DEBUG.
* guix/build/syscalls.scm (KEXEC_FILE_DEBUG): Add comment.

Suggested-by: nathan <nathan_mail@nborghese.com>
Reported-by: Simen Endsjø <contact@simendsjo.me>
Change-Id: Ia48be7f4cfa9c6352908e4bea6472cd648f866ed
2 files changed, 4 insertions(+), 5 deletions(-)

M guix/build/syscalls.scm
M guix/scripts/system/reconfigure.scm
M guix/build/syscalls.scm => guix/build/syscalls.scm +2 -2
@@ 1,5 1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014-2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014-2025 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 David Thompson <davet@gnu.org>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>


@@ 783,7 783,7 @@ terminating nul character."
(define KEXEC_FILE_UNLOAD	#x00000001)
(define KEXEC_FILE_ON_CRASH	#x00000002)
(define KEXEC_FILE_NO_INITRAMFS	#x00000004)
(define KEXEC_FILE_DEBUG	#x00000008)
(define KEXEC_FILE_DEBUG	#x00000008)       ;missing from Linux 6.6

(define kexec-load-file
  (let* ((proc (syscall->procedure int "syscall"

M guix/scripts/system/reconfigure.scm => guix/scripts/system/reconfigure.scm +2 -3
@@ 1,5 1,5 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014-2022, 2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014-2022, 2024-2025 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
;;; Copyright © 2016, 2017, 2018 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>


@@ 198,8 198,7 @@ via 'kexec'."
             (kexec-load-file kernel initrd
                              (string-join
                               (list #$@(operating-system-kernel-arguments
                                         os root-device)))
                              KEXEC_FILE_DEBUG)))))))
                                         os root-device))))))))))

(define* (upgrade-shepherd-services eval os)
  "Using EVAL, a monadic procedure taking a single G-Expression as an argument,