vifino / vifino-overlay

My personal overlay for Gentoo. Contains openrazer ebuilds and friends mostly.
MIT License
10 stars 4 forks source link

app-misc/openrazer: Get kernel from « /usr/src/linux » instead of « uname -r » #30

Closed JulienDlq closed 4 years ago

JulienDlq commented 4 years ago

The issue here is that if a new kernel pop from portage tree, you have to compile it, boot on it, before emerge openrazer.

Instead, it could be better to get version of last compiled kernel from /usr/src/linux symlink. As x11-drivers/nvidia-drivers do or any other package that check existence of a valid /usr/src/linux/.config file and then compile against the kernel corresponding to /usr/src/linux symlink.

Something like this:

basename $( readlink -f /usr/src/linux ) | sed 's/linux-//'
5.4.13-gentoo

Instead of:

uname -r
5.4.12-gentoo

Here are the occurrence of « uname -r »:

pwd
/var/tmp/portage/app-misc/openrazer-9999/work/openrazer-9999

grep -irl 'uname -r'                                      
scripts/ci/install-driver-deps.sh
debian/openrazer-driver-dkms.README.Debian
debian/changelog
Makefile
ppfeufer commented 4 years ago

I'm pretty sure that issue belongs here » https://github.com/openrazer/openrazer (https://github.com/openrazer/openrazer/blob/master/scripts/ci/install-driver-deps.sh)

JulienDlq commented 4 years ago

Mmmh not so sure, this script seems to be related to Debian/Ubuntu distros. Maybe, a Gentoo distro specific section in upstream openrazer could be a solution?

ppfeufer commented 4 years ago

Which still is an issue for openrazer, not for the ebuild maintainer afaik.

The ebuild uses the Debian version btw.

ppfeufer commented 4 years ago

But nonetheless, try this one #31, maybe it does the trick

ppfeufer commented 4 years ago

Nevermind, doesn't work ....

JulienDlq commented 4 years ago

That's strange that it uses Debian version, since it is compiled from sources, or sources are the same for Debian and other distributions, maybe? I don't know.

Anyway, I also tried to patch only Makefile. It seems to work for compilation this time! But, in the end, the installation is performed in /lib/modules/(uname -r) version of Kernel, not the one from symlink /usr/src/linux. So… it does not work as expected! :cry:

vifino commented 4 years ago

Hey. As of 0895a479b4082207a486c433abce5c8d92a67293, this should be fixed as well. Closing, reopen if it's still broken!