Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package udiskie for openSUSE:Factory checked in at 2026-11-26 15:53:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/udiskie (Old) and /work/SRC/openSUSE:Factory/.udiskie.new.1340718 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "udiskie" Thu Nov 26 15:53:57 2026 rev:12 rq:1400621 version:2.7.0 Changes: -------- --- /work/SRC/openSUSE:Factory/udiskie/udiskie.changes 2026-09-17 16:59:22.139988739 +0200 +++ /work/SRC/openSUSE:Factory/.udiskie.new.1340718/udiskie.changes 2026-11-26 15:54:26.113370384 +0100 @@ -1,0 +2,12 @@ +Wed Nov 25 17:52:25 UTC 2026 - Dominique Leuenberger <[email protected]> + +- Add udiskie-read_key-nul-bytes.patch: Fix keyutils.read_key + truncating at NUL bytes (gh#coldfix/udiskie@b75fd77d) which caused + test_list_keys to fail on 32-bit arches like i586. + +------------------------------------------------------------------- +Wed Nov 25 13:22:15 UTC 2026 - Dominique Leuenberger <[email protected]> + +- Own %{_datadir}/zsh and %{_datadir}/zsh/site-functions directories. + +------------------------------------------------------------------- New: ---- udiskie-read_key-nul-bytes.patch ----------(New B)---------- New: - Add udiskie-read_key-nul-bytes.patch: Fix keyutils.read_key truncating at NUL bytes (gh#coldfix/udiskie@b75fd77d) which caused ----------(New E)---------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ udiskie.spec ++++++ --- /var/tmp/diff_new_pack.dbsYzj/_old 2026-11-26 15:54:27.193416267 +0100 +++ /var/tmp/diff_new_pack.dbsYzj/_new 2026-11-26 15:54:27.195416352 +0100 @@ -23,6 +23,8 @@ License: MIT URL: https://github.com/coldfix/udiskie Source: https://files.pythonhosted.org/packages/source/u/%{name}/%{name}-%{version}.tar.gz +# PATCH-FIX-UPSTREAM b75fd77dfb15bc879d9209c091a0bc19fce38835 Fix keyutils.read_key truncating at NUL bytes +Patch0: udiskie-read_key-nul-bytes.patch BuildRequires: asciidoc BuildRequires: fdupes BuildRequires: gettext-tools @@ -110,6 +112,8 @@ %{python3_sitelib}/%{name} %{python3_sitelib}/%{name}-*-py%{py3_ver}.egg-info %{_mandir}/man?/%{name}*.?%{ext_man} +%dir %{_datadir}/zsh +%dir %{_datadir}/zsh/site-functions %{_datadir}/zsh/site-functions/_udiskie* %{_datadir}/bash-completion/completions/* ++++++ udiskie-read_key-nul-bytes.patch ++++++ >From b75fd77dfb15bc879d9209c091a0bc19fce38835 Mon Sep 17 00:00:00 2001 From: desmitry <[email protected]> Date: Sat, 14 Nov 2026 14:33:54 +0500 Subject: [PATCH] Fix keyutils.read_key truncating at NUL bytes read_key returned ctypes' buffer.value, which stops at the first NUL byte. Keyring contents are a binary array of 32-bit key IDs, so list_keys() raised 'ValueError: bytes length not a multiple of item size' whenever a key ID contained a zero byte (PasswordCache.__bool__ hit this randomly). Return the exact bytes the kernel wrote instead. test_invalidate: the kernel may still report a just-invalidated key as revoked (EKEYREVOKED) until its garbage collector removes it, so accept KeyRevoked as well as KeyNotAvailable. Assisted-by: Claude Code (Claude Opus 5.5) --- test/test_keyutils.py | 4 +++- udiskie/keyutils.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_keyutils.py b/test/test_keyutils.py index f008279..891a67d 100644 --- a/test/test_keyutils.py +++ b/test/test_keyutils.py @@ -60,7 +60,9 @@ def test_invalidate(self): keyutils.invalidate(key_id) with self.assertRaises(keyutils.KeyutilsError): keyutils.read_key(key_id) - with self.assertRaises(keyutils.KeyNotAvailable): + # The kernel may still report the invalidated key as revoked until + # its garbage collector has removed it. + with self.assertRaises((keyutils.KeyNotAvailable, keyutils.KeyRevoked)): keyutils.request_key(key) def test_update(self): diff --git a/udiskie/keyutils.py b/udiskie/keyutils.py index 7c504bd..da24028 100644 --- a/udiskie/keyutils.py +++ b/udiskie/keyutils.py @@ -159,7 +159,7 @@ def read_key(key_id: int) -> bytes: buffer = ctypes.create_string_buffer(buflen) ret = _errcheck(_keyctl_read(key_id, buffer, buflen)) if 0 <= ret <= buflen: - return buffer.value + return buffer.raw[:ret] buflen = ret
