mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-31 18:02:57 +02:00
acpi_call-dkms: update to 1.2.1 and patch for kernel 5.13
This commit is contained in:
parent
20ae218b06
commit
d11afb4d3b
5 changed files with 108 additions and 37 deletions
69
srcpkgs/acpi_call-dkms/patches/dkms_conf_from_outside.patch
Normal file
69
srcpkgs/acpi_call-dkms/patches/dkms_conf_from_outside.patch
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
From 4b14040db865034eb4aa215efd212307a9c60167 Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?=C3=89rico=20Nogueira?= <erico.erc@gmail.com>
|
||||||
|
Date: Sun, 18 Jul 2021 18:16:13 -0300
|
||||||
|
Subject: [PATCH] Allow dkms.conf to be used outside of the repository
|
||||||
|
|
||||||
|
Add a Makefile target that turns the dkms.conf.in template into a
|
||||||
|
dkms.conf file that has all the necessary informantion to be installed
|
||||||
|
directly on a system.
|
||||||
|
|
||||||
|
All the dkms-* targets need to depend on the dkms.conf file, now.
|
||||||
|
---
|
||||||
|
.gitignore | 1 +
|
||||||
|
Makefile | 11 +++++++----
|
||||||
|
dkms.conf => dkms.conf.in | 2 +-
|
||||||
|
3 files changed, 9 insertions(+), 5 deletions(-)
|
||||||
|
rename dkms.conf => dkms.conf.in (84%)
|
||||||
|
|
||||||
|
diff --git a/.gitignore b/.gitignore
|
||||||
|
index a73e5d1..9f39b24 100644
|
||||||
|
--- a/.gitignore
|
||||||
|
+++ b/.gitignore
|
||||||
|
@@ -9,3 +9,4 @@ MANIFEST
|
||||||
|
Module.symvers
|
||||||
|
debian/tmp/*
|
||||||
|
modules.order
|
||||||
|
+dkms.conf
|
||||||
|
diff --git a/Makefile b/Makefile
|
||||||
|
index 269b43f..0094f7e 100644
|
||||||
|
--- a/Makefile
|
||||||
|
+++ b/Makefile
|
||||||
|
@@ -17,16 +17,19 @@ load:
|
||||||
|
-/sbin/rmmod acpi_call
|
||||||
|
/sbin/insmod acpi_call.ko
|
||||||
|
|
||||||
|
-dkms-add:
|
||||||
|
+dkms.conf: dkms.conf.in
|
||||||
|
+ sed "s/@@VERSION@@/$(VERSION)/" $^ > $@
|
||||||
|
+
|
||||||
|
+dkms-add: dkms.conf
|
||||||
|
/usr/sbin/dkms add $(CURDIR)
|
||||||
|
|
||||||
|
-dkms-build:
|
||||||
|
+dkms-build: dkms.conf
|
||||||
|
/usr/sbin/dkms build acpi_call/$(VERSION)
|
||||||
|
|
||||||
|
-dkms-install:
|
||||||
|
+dkms-install: dkms.conf
|
||||||
|
/usr/sbin/dkms install acpi_call/$(VERSION)
|
||||||
|
|
||||||
|
-dkms-remove:
|
||||||
|
+dkms-remove: dkms.conf
|
||||||
|
/usr/sbin/dkms remove acpi_call/$(VERSION) --all
|
||||||
|
|
||||||
|
modprobe-install:
|
||||||
|
diff --git a/dkms.conf b/dkms.conf.in
|
||||||
|
similarity index 84%
|
||||||
|
rename from dkms.conf
|
||||||
|
rename to dkms.conf.in
|
||||||
|
index 780fb50..b927370 100644
|
||||||
|
--- a/dkms.conf
|
||||||
|
+++ b/dkms.conf.in
|
||||||
|
@@ -1,5 +1,5 @@
|
||||||
|
PACKAGE_NAME="acpi_call"
|
||||||
|
-PACKAGE_VERSION="$(cat VERSION)"
|
||||||
|
+PACKAGE_VERSION="@@VERSION@@"
|
||||||
|
MAKE="KDIR=/lib/modules/${kernelver}/build make"
|
||||||
|
CLEAN="make clean"
|
||||||
|
BUILT_MODULE_NAME[0]="acpi_call"
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- a/acpi_call.c 2017-01-03 17:17:55.000000000 +0000
|
|
||||||
+++ b/acpi_call.c 2017-07-15 00:28:28.259960007 +0000
|
|
||||||
@@ -7,7 +7,7 @@
|
|
||||||
#include <linux/version.h>
|
|
||||||
#include <linux/proc_fs.h>
|
|
||||||
#include <linux/slab.h>
|
|
||||||
-#include <asm/uaccess.h>
|
|
||||||
+#include <linux/uaccess.h>
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
|
|
||||||
#include <linux/acpi.h>
|
|
||||||
#else
|
|
|
@ -1,21 +0,0 @@
|
||||||
--- a/acpi_call.c 2017-01-03 18:17:55.000000000 +0100
|
|
||||||
+++ b/acpi_call.c 2020-03-31 10:35:40.493575868 +0200
|
|
||||||
@@ -347,11 +347,18 @@
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
|
|
||||||
+static struct proc_ops proc_acpi_operations = {
|
|
||||||
+ .proc_read = acpi_proc_read,
|
|
||||||
+ .proc_write = acpi_proc_write,
|
|
||||||
+};
|
|
||||||
+#else
|
|
||||||
static struct file_operations proc_acpi_operations = {
|
|
||||||
.owner = THIS_MODULE,
|
|
||||||
.read = acpi_proc_read,
|
|
||||||
.write = acpi_proc_write,
|
|
||||||
};
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
#else
|
|
||||||
static int acpi_proc_read(char *page, char **start, off_t off,
|
|
30
srcpkgs/acpi_call-dkms/patches/null_pointer_exception.patch
Normal file
30
srcpkgs/acpi_call-dkms/patches/null_pointer_exception.patch
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
From 48011f82726c263f49a2b9ca3d9f674bdb4cfd22 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alexander Wetzel <alexander@wetzel-home.de>
|
||||||
|
Date: Thu, 8 Jul 2021 16:37:43 +0200
|
||||||
|
Subject: [PATCH] Fix for 5.13+ kernels
|
||||||
|
|
||||||
|
Upstream commit d4455faccd6c ('proc: mandate ->proc_lseek
|
||||||
|
in "struct proc_ops"') made seek support for proc mandatory.
|
||||||
|
|
||||||
|
Not providing it will cause a null pointer exception for kernels
|
||||||
|
>=5.13.0
|
||||||
|
|
||||||
|
Signed-off-by: Alexander Wetzel <alexander@wetzel-home.de>
|
||||||
|
---
|
||||||
|
acpi_call.c | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/acpi_call.c b/acpi_call.c
|
||||||
|
index ebdda25..9fd9886 100644
|
||||||
|
--- a/acpi_call.c
|
||||||
|
+++ b/acpi_call.c
|
||||||
|
@@ -369,6 +369,9 @@ static ssize_t acpi_proc_read( struct file *filp, char __user *buff,
|
||||||
|
static struct proc_ops proc_acpi_operations = {
|
||||||
|
.proc_read = acpi_proc_read,
|
||||||
|
.proc_write = acpi_proc_write,
|
||||||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0)
|
||||||
|
+ .proc_lseek = default_llseek,
|
||||||
|
+#endif
|
||||||
|
};
|
||||||
|
#else
|
||||||
|
static struct file_operations proc_acpi_operations = {
|
|
@ -1,19 +1,23 @@
|
||||||
# Template file for 'acpi_call-dkms'
|
# Template file for 'acpi_call-dkms'
|
||||||
pkgname=acpi_call-dkms
|
pkgname=acpi_call-dkms
|
||||||
version=1.2.0
|
version=1.2.1
|
||||||
revision=3
|
revision=1
|
||||||
archs="i686 x86_64*"
|
archs="i686 x86_64*"
|
||||||
wrksrc=acpi_call-${version}
|
wrksrc=acpi_call-${version}
|
||||||
short_desc="Kernel module allowing calls to ACPI methods through /proc/acpi/call"
|
short_desc="Kernel module allowing calls to ACPI methods through /proc/acpi/call"
|
||||||
maintainer="Daniel A. Maierhofer <git@damadmai.at>"
|
maintainer="Daniel A. Maierhofer <git@damadmai.at>"
|
||||||
license="GPL-3.0-or-later"
|
license="GPL-3.0-or-later"
|
||||||
homepage="https://github.com/damadmai/acpi_call"
|
homepage="https://github.com/nix-community/acpi_call"
|
||||||
distfiles="$homepage/archive/v$version.tar.gz"
|
distfiles="${homepage}/archive/refs/tags/v${version}.tar.gz"
|
||||||
checksum=c48a0a8768d657a8da7b59d7dbf6276554313fa6a0cb012fa4cf85a77e55f44b
|
checksum=aa84ac8a209e18ee6de5fa809abd3474fdca67cda3c3256f0650c4fce78d4a0f
|
||||||
|
|
||||||
dkms_modules="acpi_call ${version}"
|
dkms_modules="acpi_call ${version}"
|
||||||
depends="dkms"
|
depends="dkms"
|
||||||
|
|
||||||
|
do_build() {
|
||||||
|
make dkms.conf
|
||||||
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
vmkdir usr/src/acpi_call-${version}
|
vmkdir usr/src/acpi_call-${version}
|
||||||
vcopy Makefile usr/src/acpi_call-${version}
|
vcopy Makefile usr/src/acpi_call-${version}
|
||||||
|
|
Loading…
Add table
Reference in a new issue