Merge pull request #184992 from wegank/prl-tools-5.19-rc5

authored by

Sandro and committed by
GitHub
ae920835 f0f5be95

+53 -6
+24 -6
pkgs/os-specific/linux/prl-tools/default.nix
··· 1 - { stdenv, lib, makeWrapper, p7zip 2 - , gawk, util-linux, xorg, glib, dbus-glib, zlib, bbe, bash, timetrap, netcat, cups 3 - , kernel ? null, libsOnly ? false 4 - , fetchurl, undmg, perl, autoPatchelfHook 1 + { stdenv 2 + , lib 3 + , makeWrapper 4 + , p7zip 5 + , gawk 6 + , util-linux 7 + , xorg 8 + , glib 9 + , dbus-glib 10 + , zlib 11 + , bbe 12 + , bash 13 + , timetrap 14 + , netcat 15 + , cups 16 + , kernel ? null 17 + , libsOnly ? false 18 + , fetchurl 19 + , undmg 20 + , perl 21 + , autoPatchelfHook 5 22 }: 6 23 7 24 assert (!libsOnly) -> kernel != null; ··· 14 31 # We download the full distribution to extract prl-tools-lin.iso from 15 32 # => ${dmg}/Parallels\ Desktop.app/Contents/Resources/Tools/prl-tools-lin.iso 16 33 src = fetchurl { 17 - url = "https://download.parallels.com/desktop/v${lib.versions.major version}/${version}/ParallelsDesktop-${version}.dmg"; 34 + url = "https://download.parallels.com/desktop/v${lib.versions.major version}/${version}/ParallelsDesktop-${version}.dmg"; 18 35 sha256 = "sha256-gjLxQOTFuVghv1Bj+zfbNW97q1IN2rurSnPQi13gzRA="; 19 36 }; 20 37 ··· 39 56 fi 40 57 ''; 41 58 42 - patches = lib.optionals (lib.versionAtLeast kernel.version "5.18") [ ./prl-tools.patch ]; 59 + patches = lib.optional (lib.versionAtLeast kernel.version "5.18") ./prl-tools-5.18.patch 60 + ++ lib.optional (lib.versionAtLeast kernel.version "5.19") ./prl-tools-5.19.patch; 43 61 44 62 kernelVersion = lib.optionalString (!libsOnly) kernel.modDirVersion; 45 63 kernelDir = lib.optionalString (!libsOnly) "${kernel.dev}/lib/modules/${kernelVersion}";
+29
pkgs/os-specific/linux/prl-tools/prl-tools-5.19.patch
··· 1 + diff -puNr prl-tools-build/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c prl-tools-build/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c 2 + --- prl-tools-build/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c 3 + +++ prl-tools-build/kmods/prl_fs/SharedFolders/Guest/Linux/prl_fs/inode.c 4 + @@ -851,7 +851,7 @@ ssize_t prlfs_rw(struct inode *inode, char *buf, size_t size, 5 + loff_t *off, unsigned int rw, int user, int flags); 6 + 7 + 8 + -int prlfs_readpage(struct file *file, struct page *page) { 9 + +int prlfs_read_folio(struct file *file, struct folio *folio) { 10 + char *buf; 11 + ssize_t ret; 12 + #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0) 13 + @@ -859,6 +859,7 @@ int prlfs_readpage(struct file *file, struct page *page) { 14 + #else 15 + struct inode *inode = file->f_dentry->d_inode; 16 + #endif 17 + + struct page *page = &folio->page; 18 + loff_t off = page->index << PAGE_SHIFT; 19 + 20 + if (!file) { 21 + @@ -950,7 +951,7 @@ out: 22 + } 23 + 24 + static const struct address_space_operations prlfs_aops = { 25 + - .readpage = prlfs_readpage, 26 + + .read_folio = prlfs_read_folio, 27 + .writepage = prlfs_writepage, 28 + .write_begin = simple_write_begin, 29 + .write_end = prlfs_write_end,
pkgs/os-specific/linux/prl-tools/prl-tools.patch pkgs/os-specific/linux/prl-tools/prl-tools-5.18.patch