GNU bug report logs -
#73642
[PATCH] gnu: Add kvmfr-linux-module.
Previous Next
Reported by: Oleg Pykhalov <go.wigust <at> gmail.com>
Date: Sat, 5 Oct 2024 14:08:02 UTC
Severity: normal
Tags: patch
Done: Oleg Pykhalov <go.wigust <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Fri, 01 Nov 2024 19:14:14 +0300
with message-id <877c9nszhl.fsf <at> gmail.com>
and subject line Re: [bug#73642] [PATCH] gnu: Add kvmfr-linux-module.
has caused the debbugs.gnu.org bug report #73642,
regarding [PATCH] gnu: Add kvmfr-linux-module.
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
73642: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73642
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
* gnu/packages/patches/kvmfr-fix-build.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add patch.
* gnu/packages/video.scm (kvmfr-linux-module): New variable.
Change-Id: I113c1c8e1f6c9ebd541083b620ea0e098d56d588
---
gnu/local.mk | 3 +-
.../kvmfr-linux-module-fix-build.patch | 41 +++++++++++++++++++
gnu/packages/video.scm | 28 +++++++++++++
3 files changed, 71 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/kvmfr-linux-module-fix-build.patch
diff --git a/gnu/local.mk b/gnu/local.mk
index 2adf196a87..2808e301b5 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -17,7 +17,7 @@
# Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe <at> gmail.com>
# Copyright © 2017, 2018, 2019 Gábor Boskovits <boskovits <at> gmail.com>
# Copyright © 2018 Amirouche Boubekki <amirouche <at> hypermove.net>
-# Copyright © 2018, 2019, 2020, 2021, 2022 Oleg Pykhalov <go.wigust <at> gmail.com>
+# Copyright © 2018, 2019, 2020, 2021, 2022, 2024 Oleg Pykhalov <go.wigust <at> gmail.com>
# Copyright © 2018 Stefan Stefanović <stefanx2ovic <at> gmail.com>
# Copyright © 2018, 2020, 2021, 2022, 2023, 2024 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
# Copyright © 2019, 2020, 2021, 2022, 2024 Guillaume Le Vaillant <glv <at> posteo.net>
@@ -1639,6 +1639,7 @@ dist_patch_DATA = \
%D%/packages/patches/kodi-set-libcurl-ssl-parameters.patch \
%D%/packages/patches/kodi-mesa-eglchromium.patch \
%D%/packages/patches/krita-bump-sip-abi-version-to-12.8.patch \
+ %D%/packages/patches/kvmfr-linux-module-fix-build.patch \
%D%/packages/patches/kwin-unwrap-executable-name-for-dot-desktop-search.patch\
%D%/packages/patches/laby-make-install.patch \
%D%/packages/patches/laby-use-tmpdir-from-runtime.patch \
diff --git a/gnu/packages/patches/kvmfr-linux-module-fix-build.patch b/gnu/packages/patches/kvmfr-linux-module-fix-build.patch
new file mode 100644
index 0000000000..49c1a713a5
--- /dev/null
+++ b/gnu/packages/patches/kvmfr-linux-module-fix-build.patch
@@ -0,0 +1,41 @@
+Copied from
+https://github.com/gnif/LookingGlass/issues/1075#issuecomment-1546422678 and
+https://github.com/gnif/LookingGlass/issues/1134 with adjustments for current
+kvmfr source version.
+
+From c4950a830fbe2ca27337793aa227c86f5c044f46 Mon Sep 17 00:00:00 2001
+From: Oleg Pykhalov <go.wigust <at> gmail.com>
+Date: Sat, 5 Oct 2024 16:11:45 +0300
+Subject: [PATCH] Fix build
+
+---
+ module/kvmfr.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/module/kvmfr.c b/module/kvmfr.c
+index 121aae5..4c386f9 100644
+--- a/module/kvmfr.c
++++ b/module/kvmfr.c
+@@ -30,6 +30,7 @@
+ #include <linux/highmem.h>
+ #include <linux/memremap.h>
+ #include <linux/version.h>
++#include <linux/vmalloc.h>
+
+ #include <asm/io.h>
+
+@@ -539,7 +540,11 @@ static int __init kvmfr_module_init(void)
+ if (kvmfr->major < 0)
+ goto out_free;
+
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
+ kvmfr->pClass = class_create(THIS_MODULE, KVMFR_DEV_NAME);
++#else
++ kvmfr->pClass = class_create(KVMFR_DEV_NAME);
++#endif
+ if (IS_ERR(kvmfr->pClass))
+ goto out_unreg;
+
+--
+2.41.0
+
diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 1d2ab5fbeb..86a30c2cca 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -104,6 +104,7 @@ (define-module (gnu packages video)
#:use-module (guix build-system gnu)
#:use-module (guix build-system go)
#:use-module (guix build-system glib-or-gtk)
+ #:use-module (guix build-system linux-module)
#:use-module (guix build-system meson)
#:use-module (guix build-system perl)
#:use-module (guix build-system pyproject)
@@ -4349,6 +4350,33 @@ (define-public obs-looking-glass
your host privately.")
(license license:gpl2+)))
+(define-public kvmfr-linux-module
+ (package
+ (name "kvmfr-linux-module")
+ (version "B6")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://looking-glass.io/artifact/" version
+ "/source"))
+ (file-name (string-append name "-" version ".tar.gz"))
+ (sha256
+ (base32
+ "15d7wwbzfw28yqbz451b6n33ixy50vv8acyzi8gig1mq5a8gzdib"))
+ (patches (search-patches "kvmfr-linux-module-fix-build.patch"))))
+ (build-system linux-module-build-system)
+ (inputs (list bash-minimal))
+ (arguments
+ (list
+ #:tests? #f ;there are none.
+ #:source-directory "module"))
+ (home-page "https://looking-glass.io/")
+ (synopsis
+ "Linux Kernel module to interface with Looking Glass")
+ (description
+ "This kernel module implements a basic interface to the IVSHMEM device for
+Looking Glass.")
+ (license license:gpl2+)))
+
(define-public obs-move-transition
(package
(name "obs-move-transition")
base-commit: 73ec844389e91cb0f5a2647070516fc8d19d8730
--
2.41.0
[Message part 3 (message/rfc822, inline)]
[Message part 4 (text/plain, inline)]
Oleg Pykhalov <go.wigust <at> gmail.com> writes:
> * gnu/packages/patches/kvmfr-fix-build.patch: New file.
> * gnu/local.mk (dist_patch_DATA): Add patch.
> * gnu/packages/video.scm (kvmfr-linux-module): New variable.
>
> Change-Id: I113c1c8e1f6c9ebd541083b620ea0e098d56d588
[…]
Pushed as 94e0028d6f0f60cc390b98866718245ebb197f54 to master.
Oleg.
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 261 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.