diff options
| author | Maxim Cournoyer <maxim@guixotic.coop> | 2026-01-05 13:45:44 +0900 |
|---|---|---|
| committer | Maxim Cournoyer <maxim@guixotic.coop> | 2026-01-27 11:16:12 +0900 |
| commit | 5b1f7552e2df9b718420da31017e319b067bddf1 (patch) | |
| tree | be44732de09dd004921ecce8fc34c68f84c86486 /gnu | |
| parent | 476e0818c15f538297af724443e25faa77b08022 (diff) | |
gnu: qemu: Update to 10.2.0.
* gnu/packages/virtualization.scm (qemu): Update to 10.2.0.
* gnu/packages/patches/qemu-fix-agent-paths.patch: Update patch.
* gnu/packages/patches/qemu-fix-test-virtio-version.patch: Adjust for file
name change.
Relates-to: #2447
Change-Id: I26034baf660af802cf4a4646d3b303f949bb1f3f
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/packages/patches/qemu-fix-agent-paths.patch | 53 | ||||
| -rw-r--r-- | gnu/packages/patches/qemu-fix-test-virtio-version.patch | 4 | ||||
| -rw-r--r-- | gnu/packages/virtualization.scm | 6 |
3 files changed, 19 insertions, 44 deletions
diff --git a/gnu/packages/patches/qemu-fix-agent-paths.patch b/gnu/packages/patches/qemu-fix-agent-paths.patch index 91572fb664c..9ace7000251 100644 --- a/gnu/packages/patches/qemu-fix-agent-paths.patch +++ b/gnu/packages/patches/qemu-fix-agent-paths.patch | |||
| @@ -1,46 +1,21 @@ | |||
| 1 | Allow a QEMU host to set the time and shutdown Guix guests. Styled | ||
| 2 | after the patch from the Nix package: | ||
| 3 | |||
| 4 | https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/virtualization/qemu/fix-qemu-ga.patch | ||
| 5 | |||
| 6 | diff --git a/qga/commands-posix.c b/qga/commands-posix.c | 1 | diff --git a/qga/commands-posix.c b/qga/commands-posix.c |
| 7 | index 6e3c15f539..eaef900b6e 100644 | 2 | index 837be51c40..d0d4d99b5e 100644 |
| 8 | --- a/qga/commands-posix.c | 3 | --- a/qga/commands-posix.c |
| 9 | +++ b/qga/commands-posix.c | 4 | +++ b/qga/commands-posix.c |
| 10 | @@ -216,6 +216,7 @@ out: | 5 | @@ -216,9 +216,9 @@ out: |
| 11 | void qmp_guest_shutdown(const char *mode, Error **errp) | 6 | return retcode; |
| 12 | { | 7 | } |
| 13 | const char *shutdown_flag; | ||
| 14 | + const char *command; | ||
| 15 | Error *local_err = NULL; | ||
| 16 | 8 | ||
| 17 | #ifdef CONFIG_SOLARIS | 9 | -#define POWEROFF_CMD_PATH "/sbin/poweroff" |
| 18 | @@ -235,16 +236,24 @@ void qmp_guest_shutdown(const char *mode, Error **errp) | 10 | -#define HALT_CMD_PATH "/sbin/halt" |
| 19 | slog("guest-shutdown called, mode: %s", mode); | 11 | -#define REBOOT_CMD_PATH "/sbin/reboot" |
| 20 | if (!mode || strcmp(mode, "powerdown") == 0) { | 12 | +#define POWEROFF_CMD_PATH "/run/current-system/profile/sbin/shutdown" |
| 21 | shutdown_flag = powerdown_flag; | 13 | +#define HALT_CMD_PATH "/run/current-system/profile/sbin/halt" |
| 22 | + command = "shutdown"; | 14 | +#define REBOOT_CMD_PATH "/run/current-system/profile/sbin/reboot" |
| 23 | } else if (strcmp(mode, "halt") == 0) { | ||
| 24 | shutdown_flag = halt_flag; | ||
| 25 | + command = "halt"; | ||
| 26 | } else if (strcmp(mode, "reboot") == 0) { | ||
| 27 | shutdown_flag = reboot_flag; | ||
| 28 | + command = "reboot"; | ||
| 29 | } else { | ||
| 30 | error_setg(errp, | ||
| 31 | "mode is invalid (valid values are: halt|powerdown|reboot"); | ||
| 32 | return; | ||
| 33 | } | ||
| 34 | 15 | ||
| 35 | + /* Try Guix’s shutdown/halt/reboot first. */ | 16 | void qmp_guest_shutdown(const char *mode, Error **errp) |
| 36 | + char *path = g_strdup_printf("/run/current-system/profile/sbin/%s", command); | 17 | { |
| 37 | + execl(path, command, (char *) NULL); | 18 | @@ -295,7 +295,7 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp) |
| 38 | + g_free(path); | ||
| 39 | + | ||
| 40 | const char *argv[] = {"/sbin/shutdown", | ||
| 41 | #ifdef CONFIG_SOLARIS | ||
| 42 | shutdown_flag, "-g0", "-y", | ||
| 43 | @@ -269,7 +278,7 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp) | ||
| 44 | int ret; | 19 | int ret; |
| 45 | Error *local_err = NULL; | 20 | Error *local_err = NULL; |
| 46 | struct timeval tv; | 21 | struct timeval tv; |
| @@ -49,7 +24,7 @@ index 6e3c15f539..eaef900b6e 100644 | |||
| 49 | 24 | ||
| 50 | /* If user has passed a time, validate and set it. */ | 25 | /* If user has passed a time, validate and set it. */ |
| 51 | if (has_time) { | 26 | if (has_time) { |
| 52 | @@ -302,6 +311,11 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp) | 27 | @@ -328,6 +328,11 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp) |
| 53 | * hardware clock (RTC). */ | 28 | * hardware clock (RTC). */ |
| 54 | ga_run_command(argv, NULL, "set hardware clock to system time", | 29 | ga_run_command(argv, NULL, "set hardware clock to system time", |
| 55 | &local_err); | 30 | &local_err); |
diff --git a/gnu/packages/patches/qemu-fix-test-virtio-version.patch b/gnu/packages/patches/qemu-fix-test-virtio-version.patch index 8e466324e7e..43fb527a875 100644 --- a/gnu/packages/patches/qemu-fix-test-virtio-version.patch +++ b/gnu/packages/patches/qemu-fix-test-virtio-version.patch | |||
| @@ -5,8 +5,8 @@ There were some discussion in <https://gitlab.com/qemu-project/qemu/-/issues/162 | |||
| 5 | 5 | ||
| 6 | diff --git a/tests/functional/test_virtio_version.py b/tests/functional/test_virtio_version.py | 6 | diff --git a/tests/functional/test_virtio_version.py b/tests/functional/test_virtio_version.py |
| 7 | index a5ea73237f..501545f655 100755 | 7 | index a5ea73237f..501545f655 100755 |
| 8 | --- a/tests/functional/test_virtio_version.py | 8 | --- a/tests/functional/x86_64/test_virtio_version.py |
| 9 | +++ b/tests/functional/test_virtio_version.py | 9 | +++ b/tests/functional/x86_64/test_virtio_version.py |
| 10 | @@ -10,6 +10,8 @@ | 10 | @@ -10,6 +10,8 @@ |
| 11 | # This work is licensed under the terms of the GNU GPL, version 2 or | 11 | # This work is licensed under the terms of the GNU GPL, version 2 or |
| 12 | # later. See the COPYING file in the top-level directory. | 12 | # later. See the COPYING file in the top-level directory. |
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index 9e81d8e8d59..40c5f463b70 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | ;;; Copyright © 2020, 2021 Brice Waegeneire <brice@waegenei.re> | 15 | ;;; Copyright © 2020, 2021 Brice Waegeneire <brice@waegenei.re> |
| 16 | ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com> | 16 | ;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com> |
| 17 | ;;; Copyright © 2020, 2021, 2022 Marius Bakke <marius@gnu.org> | 17 | ;;; Copyright © 2020, 2021, 2022 Marius Bakke <marius@gnu.org> |
| 18 | ;;; Copyright © 2020-2025 Maxim Cournoyer <maxim@guixotic.coop> | 18 | ;;; Copyright © 2020-2026 Maxim Cournoyer <maxim@guixotic.coop> |
| 19 | ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org> | 19 | ;;; Copyright © 2020 Brett Gilio <brettg@gnu.org> |
| 20 | ;;; Copyright © 2021 Leo Famulari <leo@famulari.name> | 20 | ;;; Copyright © 2021 Leo Famulari <leo@famulari.name> |
| 21 | ;;; Copyright © 2021, 2022 Pierre Langlois <pierre.langlois@gmx.com> | 21 | ;;; Copyright © 2021, 2022 Pierre Langlois <pierre.langlois@gmx.com> |
| @@ -201,14 +201,14 @@ | |||
| 201 | ;; Do not forget to update the various firmware used by QEMU, and sync the | 201 | ;; Do not forget to update the various firmware used by QEMU, and sync the |
| 202 | ;; configuration options used by the seabios-qemu package with those | 202 | ;; configuration options used by the seabios-qemu package with those |
| 203 | ;; provided by QEMU. | 203 | ;; provided by QEMU. |
| 204 | (version "10.1.0") | 204 | (version "10.2.0") |
| 205 | (source | 205 | (source |
| 206 | (origin | 206 | (origin |
| 207 | (method url-fetch) | 207 | (method url-fetch) |
| 208 | (uri (string-append "https://download.qemu.org/qemu-" | 208 | (uri (string-append "https://download.qemu.org/qemu-" |
| 209 | version ".tar.xz")) | 209 | version ".tar.xz")) |
| 210 | (sha256 | 210 | (sha256 |
| 211 | (base32 "0ldyh3qia7zwv0xq6f67cp567i6ma1hb11gsqaz3x9qcnm4p6lg0")) | 211 | (base32 "0fl8hlkngmm61h65822xxb6cyfbz56mx30hm01il8ywzicdssc4y")) |
| 212 | (patches (search-patches "qemu-build-info-manual.patch" | 212 | (patches (search-patches "qemu-build-info-manual.patch" |
| 213 | "qemu-fix-agent-paths.patch" | 213 | "qemu-fix-agent-paths.patch" |
| 214 | "qemu-fix-test-virtio-version.patch")) | 214 | "qemu-fix-test-virtio-version.patch")) |
