Closed kyokenn closed 1 year ago
common.spec requires make
as a build dependency.
common.spec requires
make
as a build dependency.
done
Also probably need to split the dkms build into its own .spec file, or possibly adjust Requires
. I can't install openrazer-daemon
without the dkms package as it stands.
Edit: Oof, I can see that getting kind of tricky, though. The daemon requires the module somehow. I'm not familiar with .spec, so I'm not sure if there's a way to require a "role" and have multiple packages fulfill that role.
I can't install openrazer-daemon without the dkms package as it stands.
I have solved this one. Now openrazer-kmod-common package acts as replacement for the dkms one, so daemon could be installed.
Edit: Forgot environment info. Currently running Silverblue 36.
Awesome, got it installed. Started the service with sudo systemctl --user enable --now openrazer-daemon
, but it errors out.
It initially returns a single line:
$ sudo systemctl --user restart openrazer-daemon.service
Failed to connect to bus: No medium found
and journalctl --user -xe -u openrazer-daemon
has the following output
Apr 12 15:20:44 thematrix openrazer-daemon[5233]: Starting daemon.
Apr 12 15:20:44 thematrix openrazer-daemon[5233]: 2022-04-12 15:20:44 | razer | CRITICAL | User is not a member of the plugdev group
Apr 12 15:20:44 thematrix openrazer-daemon[5233]: 2022-04-12 15:20:44 | razer | CRITICAL | Please run the command 'sudo gpasswd -a $USER plugdev' and then reboot!
Apr 12 15:20:44 thematrix openrazer-daemon[5233]: Stopping daemon.
Apr 12 15:20:44 thematrix openrazer-daemon[5233]: Exception ignored in atexit callback: <bound method Daemonize.exit of <daemonize.Daemonize object at 0x7fcad37efb80>>
Apr 12 15:20:44 thematrix openrazer-daemon[5233]: Traceback (most recent call last):
Apr 12 15:20:44 thematrix openrazer-daemon[5233]: File "/usr/lib/python3.10/site-packages/daemonize.py", line 72, in exit
Apr 12 15:20:44 thematrix openrazer-daemon[5233]: sys.exit(0)
Apr 12 15:20:44 thematrix openrazer-daemon[5233]: SystemExit: 0
Apr 12 15:20:44 thematrix systemd[2214]: openrazer-daemon.service: Main process exited, code=exited, status=1/FAILURE
However, when I run the command, I get:
$ sudo gpasswd -a $USER plugdev
gpasswd: group 'plugdev' does not exist in /etc/group
Edit 2: Oh, I see, looks like the dkms package is setting up the plugdev group. That should probably go in the common.spec since it's providing the required dkms package.
Okay, so I got it to work by running as root:
# grep -E '^plugdev:' /usr/lib/group >> /etc/group
# usermod -aG plugdev brian
First line might need to go into the common.spec instead of what the dkms spec is doing.
How to test this? I cloned this repo, then did a rpmbuild -ba openrazer-kmod*.spec
Then I went to ~/rpmbuilds/RPMS/x86_64
and did an rpm-ostree install *.rpm
This gives me the following error.
Building /usr/src/akmods/openrazer-kmod-3.3.0-1.fc36.1.src.rpm for kernel 5.17.>
ERROR: Can't find SRPM /usr/src/akmods/openrazer-kmod-3.3.0-1.fc36.1.src.rpm
I followed the instructions here for building the rpms. You have to make sure you're pulling all the .spec files from kyokenn's branch. Note that the openrazer.spec puts its rpms in the noarch
folder, not the x86_64
folder. Then install every rpm except the dkms one. I found it easier to copy them to a single directory and rpm-ostree install *.rpm
.
Works fine for me.
Would like to see this posted to rpmfusion so I can make sure it is upgraded as new versions come out.
gpasswd: group 'plugdev' does not exist in /etc/group
I have added plugdev group creation by openrazer-kmod-common package also updated version to 3.3.0.
It's actually not recommended to have plugdev group in Fedora, but openrazer heavily depends on it. And this group was hardcoded in too many places.
Can confirm this works on Fedora Silverblue (Kinoite) 36.
I can't seem to manage to install it on Fedora 36 Silverblue. When I try to rpm-ostree install openrazer-kernel-modules-dkms-3.3.0-1.fc36.noarch.rpm
, it gives me this:
Jun 27 14:36:47 fedora.home rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[7930]: EFI variables are not supported on this system
Jun 27 14:36:47 fedora.home rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[7927]: Sign command: /lib/modules/5.17.5-300.fc36.x86_64/build/scripts/sign-file
Jun 27 14:36:47 fedora.home rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[7927]: Signing key: /var/lib/dkms/mok.key
Jun 27 14:36:47 fedora.home rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[7927]: Public certificate (MOK): /var/lib/dkms/mok.pub
Jun 27 14:36:47 fedora.home rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[7927]: Certificate or key are missing, generating self signed certificate for MOK...
Jun 27 14:36:47 fedora.home rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[7927]: Creating symlink /var/lib/dkms/openrazer-driver/3.3.0/source -> /usr/src/openrazer-driver-3.3.0
Jun 27 14:36:47 fedora.home rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[7986]: mkdir: cannot create directory ‘/var/lib/dkms’: Read-only file system
Jun 27 14:36:47 fedora.home rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[7987]: ln: failed to create symbolic link '/var/lib/dkms/openrazer-driver/3.3.0/source': No such file or directory
Jun 27 14:36:47 fedora.home rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[7995]: ls: cannot access '/var/lib/dkms/openrazer-driver/3.3.0/source': No such file or directory
Jun 27 14:36:47 fedora.home rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[7998]: Error! The directory /var/lib/dkms/openrazer-driver/3.3.0/source does not appear to have module source located within it.
Jun 27 14:36:47 fedora.home rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[7998]: Build halted.
-- Boot b6940f1ac6dd4ece92eab8096d8f1eb3 --
Jun 28 00:57:24 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[5298]: EFI variables are not supported on this system
Jun 28 00:57:24 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[5295]: Sign command: /lib/modules/5.18.6-200.fc36.x86_64/build/scripts/sign-file
Jun 28 00:57:24 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[5295]: Signing key: /var/lib/dkms/mok.key
Jun 28 00:57:24 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[5295]: Public certificate (MOK): /var/lib/dkms/mok.pub
Jun 28 00:57:24 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[5295]: Certificate or key are missing, generating self signed certificate for MOK...
Jun 28 00:57:24 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[5295]: Creating symlink /var/lib/dkms/openrazer-driver/3.3.0/source -> /usr/src/openrazer-driver-3.3.0
Jun 28 00:57:24 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[5356]: mkdir: cannot create directory ‘/var/lib/dkms’: Read-only file system
Jun 28 00:57:24 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[5357]: ln: failed to create symbolic link '/var/lib/dkms/openrazer-driver/3.3.0/source': No such file or directory
Jun 28 00:57:24 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[5365]: ls: cannot access '/var/lib/dkms/openrazer-driver/3.3.0/source': No such file or directory
Jun 28 00:57:24 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[5368]: Error! The directory /var/lib/dkms/openrazer-driver/3.3.0/source does not appear to have module source located within it.
Jun 28 00:57:24 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[5368]: Build halted.
Jun 28 01:32:16 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[12250]: EFI variables are not supported on this system
Jun 28 01:32:16 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[12247]: Sign command: /lib/modules/5.18.6-200.fc36.x86_64/build/scripts/sign-file
Jun 28 01:32:16 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[12247]: Signing key: /var/lib/dkms/mok.key
Jun 28 01:32:16 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[12247]: Public certificate (MOK): /var/lib/dkms/mok.pub
Jun 28 01:32:16 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[12247]: Certificate or key are missing, generating self signed certificate for MOK...
Jun 28 01:32:16 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[12247]: Creating symlink /var/lib/dkms/openrazer-driver/3.3.0/source -> /usr/src/openrazer-driver-3.3.0
Jun 28 01:32:16 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[12308]: mkdir: cannot create directory ‘/var/lib/dkms’: Read-only file system
Jun 28 01:32:16 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[12309]: ln: failed to create symbolic link '/var/lib/dkms/openrazer-driver/3.3.0/source': No such file or directory
Jun 28 01:32:16 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[12317]: ls: cannot access '/var/lib/dkms/openrazer-driver/3.3.0/source': No such file or directory
Jun 28 01:32:16 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[12320]: Error! The directory /var/lib/dkms/openrazer-driver/3.3.0/source does not appear to have module source located within it.
Jun 28 01:32:16 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[12320]: Build halted.
Jun 28 01:34:20 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[13123]: EFI variables are not supported on this system
Jun 28 01:34:20 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[13120]: Sign command: /lib/modules/5.18.6-200.fc36.x86_64/build/scripts/sign-file
Jun 28 01:34:20 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[13120]: Signing key: /var/lib/dkms/mok.key
Jun 28 01:34:20 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[13120]: Public certificate (MOK): /var/lib/dkms/mok.pub
Jun 28 01:34:20 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[13120]: Certificate or key are missing, generating self signed certificate for MOK...
Jun 28 01:34:20 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[13120]: Creating symlink /var/lib/dkms/openrazer-driver/3.3.0/source -> /usr/src/openrazer-driver-3.3.0
Jun 28 01:34:20 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[13181]: mkdir: cannot create directory ‘/var/lib/dkms’: Read-only file system
Jun 28 01:34:20 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[13182]: ln: failed to create symbolic link '/var/lib/dkms/openrazer-driver/3.3.0/source': No such file or directory
Jun 28 01:34:20 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[13190]: ls: cannot access '/var/lib/dkms/openrazer-driver/3.3.0/source': No such file or directory
Jun 28 01:34:20 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[13193]: Error! The directory /var/lib/dkms/openrazer-driver/3.3.0/source does not appear to have module source located within it.
Jun 28 01:34:20 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[13193]: Build halted.
Jun 28 01:35:32 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[13808]: EFI variables are not supported on this system
Jun 28 01:35:32 solaire rpm-ostree(openrazer-kernel-modules-dkms.posttrans)[13805]: Sign command: /lib/modules/5.18.6-200.fc36.x86_64/build/scripts/sign-file
Any idea why it's doing this?
When I try to rpm-ostree install openrazer-kernel-modules-dkms-3.3.0-1.fc36.noarch.rpm
Please don't try to install DKMS packages. Install KMOD packages instead, because they are made as replacement.
I see. I tried to install any of the other packages I built with spectool -g -R
(trying to build openrazer-kmod-common.spec, openrazer-kmod.spec and openrazer.spec) and I'm getting these four .rpm:
Edit: I figured it out. For anybody else wondering, follow this link that @BrianAllred posted above. Pull the three spec files, run spectool -g -R <spec file>
on all of them (if you're using Silverblue, you might want to use a toolbox for it and install the packaging tools on there).
After that, build the dependencies for all of the spec files, and build them. The kmod packages will be under ~/rpmbuild/RPMS/x86_64
, you want to navigate there and install them with rpm-ostree
. Then proceed to install the other ones that are under ~/rpmbuild/RPMS/noarch
, which are the actual openrazer packages (but don't install the openrazer-kernel-modules-dkms
one).
Keep in mind that if you build the packages through a toolbox container, you might have to create the plugdev group yourself.
grep -E '^plugdev:' /usr/lib/group >> /etc/group usermod -aG plugdev brian
That worked for me.
Sorry for the delay on this. If we add these spec files here, does then build.opensuse.org (where the Fedora packages get built) build the rpms as normal and a user can install the packages from the repo then? How is this supposed to work?
there's no plugdev in /usr/lib/group, at least not anymore
there's no plugdev in /usr/lib/group, at least not anymore
It should be added in /etc/group during installation.
there's no plugdev in /usr/lib/group, at least not anymore
It should be added in /etc/group during installation.
thanks, works amazingly... now I do not get cpu spikes in gnome-shell while moving the mouse
So I was told that build.opensuse.org where we build & host our Fedora packages (amongst others) doesn't support Fedora Silverblue (at least now). Not sure where else to have them, apart from letting people built it themselves when needed.
I see, so it's pointless to merge.
Maybe you can maintain a separate repo that also includes build instructions, or put it somewhere where it's auto-built (where?). I'd be happy to link it in the installation instructions on our website.
Maybe you can maintain a separate repo that also includes build instructions
Yeah, that is what I wanted to do.
Thanks for tackling this!
I'm not sure if it's compatible with current build service, but at least some people can manually build RPMs for their AKMOD/KMOD-based systems.
Fixes https://github.com/openrazer/openrazer/issues/1747