qemu: 7.2.1 -> 8.0.0

Now that shaderinclude is Python, I don't think we need Perl any more.

virtiofsd has been removed in favor of the standalone virtiofsd package.

Co-authored-by: Will Cohen <willcohen@users.noreply.github.com>

+25 -32
+13 -19
pkgs/applications/virtualization/qemu/default.nix
··· 1 1 { lib, stdenv, fetchurl, fetchpatch, python3Packages, zlib, pkg-config, glib, buildPackages 2 - , perl, pixman, vde2, alsa-lib, texinfo, flex 2 + , pixman, vde2, alsa-lib, texinfo, flex 3 3 , bison, lzo, snappy, libaio, libtasn1, gnutls, nettle, curl, ninja, meson, sigtool 4 4 , makeWrapper, runtimeShell, removeReferencesTo 5 5 , attr, libcap, libcap_ng, socat, libslirp 6 6 , CoreServices, Cocoa, Hypervisor, rez, setfile, vmnet 7 - , guestAgentSupport ? with stdenv.hostPlatform; isLinux || isSunOS || isWindows 7 + , guestAgentSupport ? with stdenv.hostPlatform; isLinux || isNetBSD || isOpenBSD || isSunOS || isWindows 8 8 , numaSupport ? stdenv.isLinux && !stdenv.isAarch32, numactl 9 9 , seccompSupport ? stdenv.isLinux, libseccomp 10 10 , alsaSupport ? lib.hasSuffix "linux" stdenv.hostPlatform.system && !nixosTestRunner ··· 37 37 , qemu # for passthru.tests 38 38 }: 39 39 40 + let 41 + hexagonSupport = hostCpuTargets == null || lib.elem "hexagon" hostCpuTargets; 42 + in 43 + 40 44 stdenv.mkDerivation rec { 41 45 pname = "qemu" 42 46 + lib.optionalString xenSupport "-xen" 43 47 + lib.optionalString hostCpuOnly "-host-cpu-only" 44 48 + lib.optionalString nixosTestRunner "-for-vm-tests"; 45 - version = "7.2.1"; 49 + version = "8.0.0"; 46 50 47 51 src = fetchurl { 48 52 url = "https://download.qemu.org/qemu-${version}.tar.xz"; 49 - sha256 = "jIVpms+dekOl/immTN1WNwsMLRrQdLr3CYqCTReq1zs="; 53 + sha256 = "u2DwNBUxGB1sw5ad0ZoBPQQnqH+RgZOXDZrbkRMeVtA="; 50 54 }; 51 55 52 - depsBuildBuild = [ buildPackages.stdenv.cc ]; 56 + depsBuildBuild = [ buildPackages.stdenv.cc ] 57 + ++ lib.optionals hexagonSupport [ pkg-config ]; 53 58 54 59 nativeBuildInputs = [ 55 60 makeWrapper removeReferencesTo 56 - pkg-config flex bison meson ninja perl 61 + pkg-config flex bison meson ninja 57 62 58 63 # Don't change this to python3 and python3.pkgs.*, breaks cross-compilation 59 64 python3Packages.python python3Packages.sphinx python3Packages.sphinx-rtd-theme 60 65 ] 61 66 ++ lib.optionals gtkSupport [ wrapGAppsHook ] 67 + ++ lib.optionals hexagonSupport [ glib ] 62 68 ++ lib.optionals stdenv.isDarwin [ sigtool ]; 63 69 64 - buildInputs = [ zlib glib perl pixman 70 + buildInputs = [ zlib glib pixman 65 71 vde2 texinfo lzo snappy libtasn1 66 72 gnutls nettle curl libslirp 67 73 ] ··· 116 122 url = "https://gitlab.com/qemu-project/qemu/-/commit/3e4546d5bd38a1e98d4bd2de48631abf0398a3a2.diff"; 117 123 sha256 = "sha256-oC+bRjEHixv1QEFO9XAm4HHOwoiT+NkhknKGPydnZ5E="; 118 124 revert = true; 119 - }) 120 - # glibc >=2.37 compat, see https://lore.kernel.org/qemu-devel/20230110174901.2580297-1-berrange@redhat.com/ 121 - (fetchpatch { 122 - url = "https://gitlab.com/qemu-project/qemu/-/commit/9f0246539ae84a5e21efd1cc4516fc343f08115a.patch"; 123 - sha256 = "sha256-1iWOWkLH0WP1Hk23fmrRVdX7YZWUXOvWRMTt8QM93BI="; 124 - }) 125 - (fetchpatch { 126 - url = "https://gitlab.com/qemu-project/qemu/-/commit/6003159ce18faad4e1bc7bf9c85669019cd4950e.patch"; 127 - sha256 = "sha256-DKGCbR+VDIFLp6FhER78gyJ3Rn1dD47pMtkcIIMd0B8="; 128 125 }) 129 126 ] 130 127 ++ lib.optional nixosTestRunner ./force-uid0-on-9p.patch; ··· 241 238 # Add a ‘qemu-kvm’ wrapper for compatibility/convenience. 242 239 postInstall = '' 243 240 ln -s $out/bin/qemu-system-${stdenv.hostPlatform.qemuArch} $out/bin/qemu-kvm 244 - '' + lib.optionalString stdenv.isLinux '' 245 - ln -s $out/libexec/virtiofsd $out/bin 246 241 ''; 247 242 248 243 passthru = { ··· 262 257 mainProgram = "qemu-kvm"; 263 258 maintainers = with maintainers; [ eelco qyliss ]; 264 259 platforms = platforms.unix; 265 - priority = 10; # Prefer virtiofsd from the virtiofsd package. 266 260 }; 267 261 }
+12 -13
pkgs/applications/virtualization/qemu/provide-fallback-for-utimensat.patch
··· 1 - From 747a741772cde6bb340eb8bdb493390280de8d16 Mon Sep 17 00:00:00 2001 1 + From 2ec149ea3f0046fa83e3be74aca192649a60be47 Mon Sep 17 00:00:00 2001 2 2 From: Keno Fischer <keno@juliacomputing.com> 3 3 Date: Sat, 16 Jun 2018 20:56:54 -0400 4 4 Subject: [PATCH] 9p: darwin: Provide fallback impl for utimensat ··· 29 29 4 files changed, 111 insertions(+), 1 deletion(-) 30 30 31 31 diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c 32 - index d42ce6d8b8..b2c1fa42e1 100644 32 + index 9d07620235..9c77a431d5 100644 33 33 --- a/hw/9pfs/9p-local.c 34 34 +++ b/hw/9pfs/9p-local.c 35 - @@ -1085,7 +1085,7 @@ static int local_utimensat(FsContext *s, V9fsPath *fs_path, 35 + @@ -1081,7 +1081,7 @@ static int local_utimensat(FsContext *s, V9fsPath *fs_path, 36 36 goto out; 37 37 } 38 38 39 - - ret = utimensat(dirfd, name, buf, AT_SYMLINK_NOFOLLOW); 39 + - ret = qemu_utimensat(dirfd, name, buf, AT_SYMLINK_NOFOLLOW); 40 40 + ret = utimensat_nofollow(dirfd, name, buf); 41 41 close_preserve_errno(dirfd); 42 42 out: 43 43 g_free(dirpath); 44 44 diff --git a/hw/9pfs/9p-util-darwin.c b/hw/9pfs/9p-util-darwin.c 45 - index bec0253474..2fc0475292 100644 45 + index 95146e7354..74ab2a7f99 100644 46 46 --- a/hw/9pfs/9p-util-darwin.c 47 47 +++ b/hw/9pfs/9p-util-darwin.c 48 - @@ -95,3 +95,99 @@ int qemu_mknodat(int dirfd, const char *filename, mode_t mode, dev_t dev) 48 + @@ -145,3 +145,99 @@ int qemu_mknodat(int dirfd, const char *filename, mode_t mode, dev_t dev) 49 49 } 50 50 51 51 #endif ··· 160 160 + return utimensat(dirfd, filename, times, AT_SYMLINK_NOFOLLOW); 161 161 +} 162 162 diff --git a/hw/9pfs/9p-util.h b/hw/9pfs/9p-util.h 163 - index 97e681e167..fd50d6243a 100644 163 + index c314cf381d..12d57f3398 100644 164 164 --- a/hw/9pfs/9p-util.h 165 165 +++ b/hw/9pfs/9p-util.h 166 - @@ -36,6 +36,12 @@ static inline int qemu_lsetxattr(const char *path, const char *name, 167 - #define qemu_lsetxattr lsetxattr 168 - #endif 166 + @@ -101,6 +101,12 @@ static inline int errno_to_dotl(int err) { 167 + #define qemu_utimensat utimensat 168 + #define qemu_unlinkat unlinkat 169 169 170 170 +/* Compatibility with old SDK Versions for Darwin */ 171 171 +#if defined(CONFIG_DARWIN) && !defined(UTIME_NOW) ··· 176 176 static inline void close_preserve_errno(int fd) 177 177 { 178 178 int serrno = errno; 179 - @@ -98,6 +104,8 @@ ssize_t flistxattrat_nofollow(int dirfd, const char *filename, 179 + @@ -163,6 +169,8 @@ ssize_t flistxattrat_nofollow(int dirfd, const char *filename, 180 180 char *list, size_t size); 181 181 ssize_t fremovexattrat_nofollow(int dirfd, const char *filename, 182 182 const char *name); ··· 186 186 /* 187 187 * Darwin has d_seekoff, which appears to function similarly to d_off. 188 188 -- 189 - 2.35.1 190 - 189 + 2.39.2