diff --git a/app-admin/sudo-rs/metadata.xml b/app-admin/sudo-rs/metadata.xml
index 7d858a5f4f..b928ed379e 100644
--- a/app-admin/sudo-rs/metadata.xml
+++ b/app-admin/sudo-rs/metadata.xml
@@ -5,11 +5,11 @@
kupravagoodman@proton.me
Timur Kuprava
+
https://github.com/trifectatechfoundation/sudo-rs/issues
trifectatechfoundation/sudo-rs
-
diff --git a/app-admin/sudo-rs/sudo-rs-0.2.7.ebuild b/app-admin/sudo-rs/sudo-rs-0.2.7.ebuild
index 63b933c2e2..4dcbf9566f 100644
--- a/app-admin/sudo-rs/sudo-rs-0.2.7.ebuild
+++ b/app-admin/sudo-rs/sudo-rs-0.2.7.ebuild
@@ -45,12 +45,22 @@ RDEPEND="
DOCS=( README.md CHANGELOG.md )
+src_test() {
+ local skip=(
+ # Tests failing due to sandbox violations
+ --skip test_traverse_secure_open_positive
+ --skip permission_test
+ )
+
+ cargo_src_test -- "${skip[@]}"
+}
+
src_install() {
- dobin "$(cargo_target_dir)/sudo" || die
- dobin "$(cargo_target_dir)/visudo" || die
+ dobin "$(cargo_target_dir)/sudo"
+ dobin "$(cargo_target_dir)/visudo"
if use su ; then
- dobin "$(cargo_target_dir)/su" || die
+ dobin "$(cargo_target_dir)/su"
fi
fowners 0:0 /usr/bin/sudo
diff --git a/app-admin/sudo-rs/sudo-rs-0.2.8.ebuild b/app-admin/sudo-rs/sudo-rs-0.2.8.ebuild
index 63b933c2e2..4dcbf9566f 100644
--- a/app-admin/sudo-rs/sudo-rs-0.2.8.ebuild
+++ b/app-admin/sudo-rs/sudo-rs-0.2.8.ebuild
@@ -45,12 +45,22 @@ RDEPEND="
DOCS=( README.md CHANGELOG.md )
+src_test() {
+ local skip=(
+ # Tests failing due to sandbox violations
+ --skip test_traverse_secure_open_positive
+ --skip permission_test
+ )
+
+ cargo_src_test -- "${skip[@]}"
+}
+
src_install() {
- dobin "$(cargo_target_dir)/sudo" || die
- dobin "$(cargo_target_dir)/visudo" || die
+ dobin "$(cargo_target_dir)/sudo"
+ dobin "$(cargo_target_dir)/visudo"
if use su ; then
- dobin "$(cargo_target_dir)/su" || die
+ dobin "$(cargo_target_dir)/su"
fi
fowners 0:0 /usr/bin/sudo
diff --git a/dev-python/pynput/Manifest b/dev-python/pynput/Manifest
index 42a186bc9f..b5e74eac5a 100644
--- a/dev-python/pynput/Manifest
+++ b/dev-python/pynput/Manifest
@@ -1 +1,2 @@
DIST pynput-1.7.6.tar.gz 79501 BLAKE2B cb356271ef0688ff6532fb79b858c10fb3a52abc4f6db5f4758948cb16f01e96e9377894ea211952b58f5ff6d997ceeec9ba51a29aef866e65cd83900a9894ae SHA512 66639096a83b7ea7c926bfab67ef6c54b913fc4ffe5814bbc4ace6e4d298237a3623066f4f5c08a2bcf1cc5e40d18dc35b77c18afbd0d00b7b4bf4ed2233d9ff
+DIST pynput-1.8.1.tar.gz 82289 BLAKE2B 07338c7d3f755af103d0f61874d536a0444cdddf0c3a450e51cf87e1375943fffcf20a747f25b2ca53365250e8e09d403421cf658077603b7c86a9e5794d3bd6 SHA512 4f28bbc908a4ecbfb8ef1d5b222ddc36269fe2f6361a45609afd60196eb05474569efd2267ae2028abfb85eae6825cea6215351974419ca640c7e069e6983132
diff --git a/dev-python/pynput/files/patches/uinput.patch b/dev-python/pynput/files/patches/uinput.patch
new file mode 100644
index 0000000000..a464b02af0
--- /dev/null
+++ b/dev-python/pynput/files/patches/uinput.patch
@@ -0,0 +1,37 @@
+diff --git a/lib/pynput/_util/uinput.py b/lib/pynput/_util/uinput.py
+index b0a6a78..c891b83 100644
+--- a/lib/pynput/_util/uinput.py
++++ b/lib/pynput/_util/uinput.py
+@@ -72,6 +72,14 @@ def _device(self, paths):
+ except OSError:
+ continue
+
++ # Some programmable mouse devices report each programmable input as
++ # a separate capability, so it is possible for a mouse to exceed
++ # keyboards in capability count; for this reason we will prefer a
++ # device with "keyboard" in its name
++ if 'keyboard' in next_dev.name.lower():
++ dev = next_dev
++ break
++
+ # Does this device provide more handled event codes?
+ capabilities = next_dev.capabilities()
+ next_count = sum(
+diff --git a/lib/pynput/keyboard/_uinput.py b/lib/pynput/keyboard/_uinput.py
+index 2f63dd3..747d19d 100644
+--- a/lib/pynput/keyboard/_uinput.py
++++ b/lib/pynput/keyboard/_uinput.py
+@@ -204,10 +204,10 @@ def as_char(k):
+ as_char(key): (
+ vk,
+ set()
+- | {Key.shift} if i & 1 else set()
+- | {Key.alt_gr} if i & 2 else set())
++ | ({Key.shift} if i & 1 else set())
++ | ({Key.alt_gr} if i & 2 else set()))
+ for vk, keys in self._vk_table.items()
+- for i, key in enumerate(keys)
++ for i, key in reversed(list(enumerate(keys)))
+ if key is not None and as_char(key) is not None}
+
+ def for_vk(self, vk, modifiers):
diff --git a/dev-python/pynput/files/patches/wheel.patch b/dev-python/pynput/files/patches/wheel.patch
new file mode 100644
index 0000000000..064b21ce5f
--- /dev/null
+++ b/dev-python/pynput/files/patches/wheel.patch
@@ -0,0 +1,11 @@
+diff --git a/setup.cfg b/setup.cfg
+index 99723b7..8ae701e 100644
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -1,6 +1,3 @@
+-[bdist_wheel]
+-universal = 1
+-
+ [build_sphinx]
+ source-dir = docs
+ build-dir = build/docs
diff --git a/dev-python/pynput/pynput-1.8.1.ebuild b/dev-python/pynput/pynput-1.8.1.ebuild
new file mode 100644
index 0000000000..4c03e9e57b
--- /dev/null
+++ b/dev-python/pynput/pynput-1.8.1.ebuild
@@ -0,0 +1,28 @@
+# Copyright 2021-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+PYTHON_COMPAT=( python3_{11..13} )
+DISTUTILS_USE_PEP517=setuptools
+inherit distutils-r1 pypi
+
+DESCRIPTION="Sends virtual input commands"
+HOMEPAGE="https://github.com/moses-palmer/pynput https://pypi.org/project/pynput"
+RDEPEND="
+ dev-python/evdev[${PYTHON_USEDEP}]
+ X? ( dev-python/python-xlib[${PYTHON_USEDEP}] )
+ dev-python/six[${PYTHON_USEDEP}]
+"
+
+LICENSE="LGPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~x86"
+IUSE="X"
+
+PATCHES=(
+ # issue # 657
+ "${FILESDIR}/patches/uinput.patch"
+ # Remove deprecated bdist_wheel.universal
+ "${FILESDIR}/patches/wheel.patch"
+)