gnu: QEMU: Update to 7.1.0.
* gnu/packages/patches/qemu-build-info-manual.patch: Remove configure script stanza. * gnu/packages/patches/qemu-fix-agent-paths.patch: Adjust patch context. Use execl instead of execle to stay consistent with upstream. * gnu/packages/virtualization.scm (qemu): Update to 7.1.0.
This commit is contained in:
		
							parent
							
								
									abf21ba578
								
							
						
					
					
						commit
						0f6f9317ac
					
				
					 3 changed files with 25 additions and 65 deletions
				
			
		| 
						 | 
					@ -8,53 +8,14 @@ manual.  The Texinfo format allows for more structure and info readers
 | 
				
			||||||
provide more advanced navigation capabilities compared to manpages
 | 
					provide more advanced navigation capabilities compared to manpages
 | 
				
			||||||
readers.
 | 
					readers.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* configure (infodir): Add an --infodir option, which allows
 | 
					 | 
				
			||||||
configuring the directory under which the info manuals are installed.
 | 
					 | 
				
			||||||
* docs/meson.build (texi, info): New targets.
 | 
					* docs/meson.build (texi, info): New targets.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
 | 
					Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
diff --git a/configure b/configure
 | 
					 | 
				
			||||||
--- a/configure
 | 
					 | 
				
			||||||
+++ b/configure
 | 
					 | 
				
			||||||
@@ -951,6 +951,8 @@ for opt do
 | 
					 | 
				
			||||||
     static="yes"
 | 
					 | 
				
			||||||
     QEMU_PKG_CONFIG_FLAGS="--static $QEMU_PKG_CONFIG_FLAGS"
 | 
					 | 
				
			||||||
   ;;
 | 
					 | 
				
			||||||
+  --infodir=*) infodir="$optarg"
 | 
					 | 
				
			||||||
+  ;;
 | 
					 | 
				
			||||||
   --mandir=*) mandir="$optarg"
 | 
					 | 
				
			||||||
   ;;
 | 
					 | 
				
			||||||
   --bindir=*) bindir="$optarg"
 | 
					 | 
				
			||||||
@@ -978,7 +980,7 @@ for opt do
 | 
					 | 
				
			||||||
   --host=*|--build=*|\
 | 
					 | 
				
			||||||
   --disable-dependency-tracking|\
 | 
					 | 
				
			||||||
   --sbindir=*|--sharedstatedir=*|\
 | 
					 | 
				
			||||||
-  --oldincludedir=*|--datarootdir=*|--infodir=*|\
 | 
					 | 
				
			||||||
+  --oldincludedir=*|--datarootdir=*|\
 | 
					 | 
				
			||||||
   --htmldir=*|--dvidir=*|--pdfdir=*|--psdir=*)
 | 
					 | 
				
			||||||
     # These switches are silently ignored, for compatibility with
 | 
					 | 
				
			||||||
     # autoconf-generated configure scripts. This allows QEMU's
 | 
					 | 
				
			||||||
@@ -1599,6 +1601,7 @@ else
 | 
					 | 
				
			||||||
 fi
 | 
					 | 
				
			||||||
 mandir="${mandir:-$prefix/share/man}"
 | 
					 | 
				
			||||||
 datadir="${datadir:-$prefix/share}"
 | 
					 | 
				
			||||||
+infodir="${infodir:-$datadir/info}"
 | 
					 | 
				
			||||||
 docdir="${docdir:-$prefix/share/doc}"
 | 
					 | 
				
			||||||
 sysconfdir="${sysconfdir:-$prefix/etc}"
 | 
					 | 
				
			||||||
 local_statedir="${local_statedir:-$prefix/var}"
 | 
					 | 
				
			||||||
@@ -1736,6 +1739,7 @@ Advanced options (experts only):
 | 
					 | 
				
			||||||
   --with-git-submodules=validate fail if git submodules are not up to date
 | 
					 | 
				
			||||||
   --with-git-submodules=ignore   do not update or check git submodules (default if no .git dir)
 | 
					 | 
				
			||||||
   --static                 enable static build [$static]
 | 
					 | 
				
			||||||
+  --infodir=PATH           install info manual in PATH
 | 
					 | 
				
			||||||
   --mandir=PATH            install man pages in PATH
 | 
					 | 
				
			||||||
   --datadir=PATH           install firmware in PATH/$qemu_suffix
 | 
					 | 
				
			||||||
   --localedir=PATH         install translation in PATH/$qemu_suffix
 | 
					 | 
				
			||||||
diff --git a/docs/meson.build b/docs/meson.build
 | 
					diff --git a/docs/meson.build b/docs/meson.build
 | 
				
			||||||
--- a/docs/meson.build
 | 
					--- a/docs/meson.build
 | 
				
			||||||
+++ b/docs/meson.build
 | 
					+++ b/docs/meson.build
 | 
				
			||||||
@@ -104,4 +104,25 @@ if build_docs
 | 
					@@ -92,4 +92,25 @@ if build_docs
 | 
				
			||||||
   alias_target('sphinxdocs', sphinxdocs)
 | 
					   alias_target('sphinxdocs', sphinxdocs)
 | 
				
			||||||
   alias_target('html', sphinxdocs)
 | 
					   alias_target('html', sphinxdocs)
 | 
				
			||||||
   alias_target('man', sphinxmans)
 | 
					   alias_target('man', sphinxmans)
 | 
				
			||||||
| 
						 | 
					@ -83,7 +44,7 @@ diff --git a/docs/meson.build b/docs/meson.build
 | 
				
			||||||
diff --git a/meson.build b/meson.build
 | 
					diff --git a/meson.build b/meson.build
 | 
				
			||||||
--- a/meson.build
 | 
					--- a/meson.build
 | 
				
			||||||
+++ b/meson.build
 | 
					+++ b/meson.build
 | 
				
			||||||
@@ -35,6 +35,7 @@ endif
 | 
					@@ -37,6 +37,7 @@ endif
 | 
				
			||||||
 qemu_confdir = get_option('sysconfdir') / get_option('qemu_suffix')
 | 
					 qemu_confdir = get_option('sysconfdir') / get_option('qemu_suffix')
 | 
				
			||||||
 qemu_datadir = get_option('datadir') / get_option('qemu_suffix')
 | 
					 qemu_datadir = get_option('datadir') / get_option('qemu_suffix')
 | 
				
			||||||
 qemu_docdir = get_option('docdir') / get_option('qemu_suffix')
 | 
					 qemu_docdir = get_option('docdir') / get_option('qemu_suffix')
 | 
				
			||||||
| 
						 | 
					@ -91,11 +52,11 @@ diff --git a/meson.build b/meson.build
 | 
				
			||||||
 qemu_moddir = get_option('libdir') / get_option('qemu_suffix')
 | 
					 qemu_moddir = get_option('libdir') / get_option('qemu_suffix')
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 qemu_desktopdir = get_option('datadir') / 'applications'
 | 
					 qemu_desktopdir = get_option('datadir') / 'applications'
 | 
				
			||||||
@@ -2433,6 +2434,7 @@ else
 | 
					@@ -3698,6 +3699,7 @@ else
 | 
				
			||||||
   summary_info += {'local state directory': 'queried at runtime'}
 | 
					   summary_info += {'local state directory': 'queried at runtime'}
 | 
				
			||||||
 endif
 | 
					 endif
 | 
				
			||||||
 summary_info += {'Doc directory':     get_option('docdir')}
 | 
					 summary_info += {'Doc directory':     get_option('prefix') / get_option('docdir')}
 | 
				
			||||||
+summary_info += {'Info directory':    get_option('infodir')}
 | 
					+summary_info += {'Info directory':    get_option('prefix') / get_option('infodir')}
 | 
				
			||||||
 summary_info += {'Build directory':   meson.current_build_dir()}
 | 
					 summary_info += {'Build directory':   meson.current_build_dir()}
 | 
				
			||||||
 summary_info += {'Source path':       meson.current_source_dir()}
 | 
					 summary_info += {'Source path':       meson.current_source_dir()}
 | 
				
			||||||
 summary_info += {'GIT submodules':    config_host['GIT_SUBMODULES']}
 | 
					 summary_info += {'GIT submodules':    config_host['GIT_SUBMODULES']}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -4,7 +4,6 @@ after the patch from the Nix package:
 | 
				
			||||||
https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/virtualization/qemu/fix-qemu-ga.patch
 | 
					https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/virtualization/qemu/fix-qemu-ga.patch
 | 
				
			||||||
 | 
					
 | 
				
			||||||
diff --git a/qga/commands-posix.c b/qga/commands-posix.c
 | 
					diff --git a/qga/commands-posix.c b/qga/commands-posix.c
 | 
				
			||||||
index 75dbaab..b416b03 100644
 | 
					 | 
				
			||||||
--- a/qga/commands-posix.c
 | 
					--- a/qga/commands-posix.c
 | 
				
			||||||
+++ b/qga/commands-posix.c
 | 
					+++ b/qga/commands-posix.c
 | 
				
			||||||
@@ -84,6 +84,7 @@ static void ga_wait_child(pid_t pid, int *status, Error **errp)
 | 
					@@ -84,6 +84,7 @@ static void ga_wait_child(pid_t pid, int *status, Error **errp)
 | 
				
			||||||
| 
						 | 
					@ -15,33 +14,33 @@ index 75dbaab..b416b03 100644
 | 
				
			||||||
     Error *local_err = NULL;
 | 
					     Error *local_err = NULL;
 | 
				
			||||||
     pid_t pid;
 | 
					     pid_t pid;
 | 
				
			||||||
     int status;
 | 
					     int status;
 | 
				
			||||||
@@ -91,10 +92,13 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp)
 | 
					@@ -101,10 +102,13 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp)
 | 
				
			||||||
     slog("guest-shutdown called, mode: %s", mode);
 | 
					     slog("guest-shutdown called, mode: %s", mode);
 | 
				
			||||||
     if (!has_mode || strcmp(mode, "powerdown") == 0) {
 | 
					     if (!has_mode || strcmp(mode, "powerdown") == 0) {
 | 
				
			||||||
         shutdown_flag = "-P";
 | 
					         shutdown_flag = powerdown_flag;
 | 
				
			||||||
+        command = "shutdown";
 | 
					+        command = "shutdown";
 | 
				
			||||||
     } else if (strcmp(mode, "halt") == 0) {
 | 
					     } else if (strcmp(mode, "halt") == 0) {
 | 
				
			||||||
         shutdown_flag = "-H";
 | 
					         shutdown_flag = halt_flag;
 | 
				
			||||||
+        command = "halt";
 | 
					+        command = "halt";
 | 
				
			||||||
     } else if (strcmp(mode, "reboot") == 0) {
 | 
					     } else if (strcmp(mode, "reboot") == 0) {
 | 
				
			||||||
         shutdown_flag = "-r";
 | 
					         shutdown_flag = reboot_flag;
 | 
				
			||||||
+        command = "reboot";
 | 
					+        command = "reboot";
 | 
				
			||||||
     } else {
 | 
					     } else {
 | 
				
			||||||
         error_setg(errp,
 | 
					         error_setg(errp,
 | 
				
			||||||
                    "mode is invalid (valid values are: halt|powerdown|reboot");
 | 
					                    "mode is invalid (valid values are: halt|powerdown|reboot");
 | 
				
			||||||
@@ -109,6 +113,11 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp)
 | 
					@@ -123,6 +127,11 @@ void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp)
 | 
				
			||||||
         reopen_fd_to_null(1);
 | 
					         execl("/sbin/shutdown", "shutdown", shutdown_flag, "-g0", "-y",
 | 
				
			||||||
         reopen_fd_to_null(2);
 | 
					               "hypervisor initiated shutdown", (char *)NULL);
 | 
				
			||||||
 
 | 
					 #else
 | 
				
			||||||
+        /* try Guix’s shutdown/halt/reboot first */
 | 
					+        /* try Guix’s shutdown/halt/reboot first */
 | 
				
			||||||
+        char *path = g_strdup_printf("/run/current-system/profile/sbin/%s", command);
 | 
					+        char *path = g_strdup_printf("/run/current-system/profile/sbin/%s", command);
 | 
				
			||||||
+        execle(path, command, (char *)NULL, environ);
 | 
					+        execl(path, command, (char *)NULL);
 | 
				
			||||||
+        g_free(path);
 | 
					+        g_free(path);
 | 
				
			||||||
+
 | 
					+
 | 
				
			||||||
         execle("/sbin/shutdown", "shutdown", "-h", shutdown_flag, "+0",
 | 
					         execl("/sbin/shutdown", "shutdown", "-h", shutdown_flag, "+0",
 | 
				
			||||||
                "hypervisor initiated shutdown", (char *)NULL, environ);
 | 
					                "hypervisor initiated shutdown", (char *)NULL);
 | 
				
			||||||
         _exit(EXIT_FAILURE);
 | 
					 #endif
 | 
				
			||||||
@@ -158,10 +167,12 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp)
 | 
					@@ -159,10 +168,12 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp)
 | 
				
			||||||
     Error *local_err = NULL;
 | 
					     Error *local_err = NULL;
 | 
				
			||||||
     struct timeval tv;
 | 
					     struct timeval tv;
 | 
				
			||||||
     static const char hwclock_path[] = "/sbin/hwclock";
 | 
					     static const char hwclock_path[] = "/sbin/hwclock";
 | 
				
			||||||
| 
						 | 
					@ -55,12 +54,12 @@ index 75dbaab..b416b03 100644
 | 
				
			||||||
     }
 | 
					     }
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
     if (!hwclock_available) {
 | 
					     if (!hwclock_available) {
 | 
				
			||||||
@@ -207,6 +218,8 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp)
 | 
					@@ -208,6 +219,8 @@ void qmp_guest_set_time(bool has_time, int64_t time_ns, Error **errp)
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
         /* Use '/sbin/hwclock -w' to set RTC from the system time,
 | 
					         /* Use '/sbin/hwclock -w' to set RTC from the system time,
 | 
				
			||||||
          * or '/sbin/hwclock -s' to set the system time from RTC. */
 | 
					          * or '/sbin/hwclock -s' to set the system time from RTC. */
 | 
				
			||||||
+        execle(hwclock_path_guix, "hwclock", has_time ? "-w" : "-s",
 | 
					+        execl(hwclock_path_guix, "hwclock", has_time ? "-w" : "-s",
 | 
				
			||||||
+               NULL, environ);
 | 
					+               NULL);
 | 
				
			||||||
         execle(hwclock_path, "hwclock", has_time ? "-w" : "-s",
 | 
					         execl(hwclock_path, "hwclock", has_time ? "-w" : "-s", NULL);
 | 
				
			||||||
                NULL, environ);
 | 
					 | 
				
			||||||
         _exit(EXIT_FAILURE);
 | 
					         _exit(EXIT_FAILURE);
 | 
				
			||||||
 | 
					     } else if (pid < 0) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -158,7 +158,7 @@
 | 
				
			||||||
(define-public qemu
 | 
					(define-public qemu
 | 
				
			||||||
  (package
 | 
					  (package
 | 
				
			||||||
    (name "qemu")
 | 
					    (name "qemu")
 | 
				
			||||||
    (version "6.2.0")
 | 
					    (version "7.1.0")
 | 
				
			||||||
    (source
 | 
					    (source
 | 
				
			||||||
     (origin
 | 
					     (origin
 | 
				
			||||||
       (method url-fetch)
 | 
					       (method url-fetch)
 | 
				
			||||||
| 
						 | 
					@ -166,7 +166,7 @@
 | 
				
			||||||
                           version ".tar.xz"))
 | 
					                           version ".tar.xz"))
 | 
				
			||||||
       (sha256
 | 
					       (sha256
 | 
				
			||||||
        (base32
 | 
					        (base32
 | 
				
			||||||
         "0iavlsy9hin8k38230j8lfmyipx3965zljls1dp34mmc8n75vqb8"))
 | 
					         "1rmvrgqjhrvcmchnz170dxvrrf14n6nm39y8ivrprmfydd9lwqx0"))
 | 
				
			||||||
       (patches (search-patches "qemu-build-info-manual.patch"
 | 
					       (patches (search-patches "qemu-build-info-manual.patch"
 | 
				
			||||||
                                "qemu-fix-agent-paths.patch"))
 | 
					                                "qemu-fix-agent-paths.patch"))
 | 
				
			||||||
       (modules '((guix build utils)))
 | 
					       (modules '((guix build utils)))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Reference in a new issue