From a771bf7950d922833e8864336e84081877c891c0 Mon Sep 17 00:00:00 2001 From: Atapi <34801996+Sterophonick@users.noreply.github.com> Date: Thu, 18 Apr 2024 00:55:54 -0600 Subject: [PATCH] fix(ds-inhibit): autoload hid-playstation to avoid hook conflicts (#991) --- spec_files/ds-inhibit/10-modprobe-ds.conf | 2 ++ spec_files/ds-inhibit/ds-inhibit.spec | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 spec_files/ds-inhibit/10-modprobe-ds.conf diff --git a/spec_files/ds-inhibit/10-modprobe-ds.conf b/spec_files/ds-inhibit/10-modprobe-ds.conf new file mode 100644 index 00000000..82803689 --- /dev/null +++ b/spec_files/ds-inhibit/10-modprobe-ds.conf @@ -0,0 +1,2 @@ +# autoload hid-playstation so ds-inhibit works correctly +hid-playstation diff --git a/spec_files/ds-inhibit/ds-inhibit.spec b/spec_files/ds-inhibit/ds-inhibit.spec index 0b155513..ce649eda 100644 --- a/spec_files/ds-inhibit/ds-inhibit.spec +++ b/spec_files/ds-inhibit/ds-inhibit.spec @@ -5,7 +5,8 @@ Summary: DualShock 4/DualSense mouse inhibitor License: BSD-2-Clause URL: https://github.com/ublue-os/bazzite -Source: https://gitlab.com/evlaV/%{name}/-/archive/main/%{name}-main.tar.gz +Source0: https://gitlab.com/evlaV/%{name}/-/archive/main/%{name}-main.tar.gz +Source1: 10-modprobe-ds.conf BuildArch: noarch Patch0: fedora.patch @@ -31,8 +32,10 @@ chmod +x ds_inhibit.py %install mkdir -p %{buildroot}%{_bindir}/ mkdir -p %{buildroot}%{_unitdir}/ +mkdir -p %{buildroot}%{_sysconfdir}/modules-load.d cp -v ds_inhibit.py %{buildroot}%{_bindir}/ds-inhibit cp -v systemd.service %{buildroot}%{_unitdir}/ds-inhibit.service +cp %{SOURCE1} %{buildroot}%{_sysconfdir}/modules-load.d # Do post-installation %post @@ -52,8 +55,9 @@ cp -v systemd.service %{buildroot}%{_unitdir}/ds-inhibit.service %license LICENSE %{_bindir}/ds-inhibit %{_unitdir}/ds-inhibit.service +%{_sysconfdir}/modules-load.d/10-modprobe-ds.conf # Finally, changes from the latest release of your application are generated from # your project's Git history. It will be empty until you make first annotated Git tag. %changelog -{{{ git_dir_changelog }}} \ No newline at end of file +{{{ git_dir_changelog }}}