summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-crypt/moolticute/files')
-rw-r--r--app-crypt/moolticute/files/50-mooltipass.rule1
-rw-r--r--app-crypt/moolticute/files/50-mooltipass.rules15
-rw-r--r--app-crypt/moolticute/files/moolticute-1.03.0-fix-return-type.patch13
-rw-r--r--app-crypt/moolticute/files/moolticuted.init6
4 files changed, 31 insertions, 4 deletions
diff --git a/app-crypt/moolticute/files/50-mooltipass.rule b/app-crypt/moolticute/files/50-mooltipass.rule
deleted file mode 100644
index 4bfd907d7257..000000000000
--- a/app-crypt/moolticute/files/50-mooltipass.rule
+++ /dev/null
@@ -1 +0,0 @@
-SUBSYSTEM=="usb", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="09a0", TAG+="uaccess"
diff --git a/app-crypt/moolticute/files/50-mooltipass.rules b/app-crypt/moolticute/files/50-mooltipass.rules
new file mode 100644
index 000000000000..8492743bab93
--- /dev/null
+++ b/app-crypt/moolticute/files/50-mooltipass.rules
@@ -0,0 +1,15 @@
+# udev rules for allowing console user(s) and libusb access to Mooltipass Mini devices
+# Used udev rules from https://github.com/mooltipass/mooltipass-udev
+ACTION!="add|change", GOTO="mooltipass_end"
+
+# console user
+SUBSYSTEM=="hidraw", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="09a0", MODE="0660", SYMLINK+="mooltipass_keyboard", TAG+="uaccess", TAG+="udev-acl"
+SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="4321", MODE="0660", SYMLINK+="mooltipass_keyboard", TAG+="uaccess", TAG+="udev-acl"
+# libusb
+SUBSYSTEM=="usb", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="09a0", MODE="0660", SYMLINK+="mooltipass_device", TAG+="uaccess"
+SUBSYSTEM=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="4321", MODE="0660", SYMLINK+="mooltipass_device", TAG+="uaccess"
+
+# required for newer versions of bluez
+SUBSYSTEM=="hidraw", KERNELS=="*1209:4321*", MODE="0660", SYMLINK+="mooltipass_keyboard", TAG+="uaccess", TAG+="udev-acl"
+
+LABEL="mooltipass_end"
diff --git a/app-crypt/moolticute/files/moolticute-1.03.0-fix-return-type.patch b/app-crypt/moolticute/files/moolticute-1.03.0-fix-return-type.patch
new file mode 100644
index 000000000000..039f2ccb6605
--- /dev/null
+++ b/app-crypt/moolticute/files/moolticute-1.03.0-fix-return-type.patch
@@ -0,0 +1,13 @@
+https://github.com/mooltipass/moolticute/pull/1204
+https://bugs.gentoo.org/916994
+--- a/src/MPDeviceBleImpl.cpp
++++ b/src/MPDeviceBleImpl.cpp
+@@ -735,7 +735,7 @@ bool MPDeviceBleImpl::processReceivedData(const QByteArray &data, QByteArray &da
+ {
+ if (data.size() < 2)
+ {
+- return {0};
++ return {QByteArray::number(0)};
+ }
+ QVector<QByteArray> res;
+ for (int i = 0; i < data.size() - 1; i += 2)
diff --git a/app-crypt/moolticute/files/moolticuted.init b/app-crypt/moolticute/files/moolticuted.init
index 4a331db1c3a4..56b15ff3d5c2 100644
--- a/app-crypt/moolticute/files/moolticuted.init
+++ b/app-crypt/moolticute/files/moolticuted.init
@@ -1,11 +1,11 @@
#!/sbin/openrc-run
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
command=/usr/bin/moolticuted
-command_args=""
+command_background="yes"
pidfile=/var/run/moolticuted.pid
-start_stop_daemon_args="--make-pidfile --background --user nobody --group usb"
+command_user="nobody:usb"
depend() {
need udev