[Pkg-samba-maint] Bug#1086768: python3-samba: Missing dependency on python3-cryptography

Holger Schletz schletz at zfg-dortmund.de
Tue Nov 5 16:34:32 GMT 2024


Package: python3-samba
Version: 2:4.21.1+dfsg-2~bpo12+1
Severity: normal

Dear Maintainer,

After upgrading from 4.20.x to 4.21.x, "samba-tool domain backup offline" stopped working:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/samba/netcmd/main.py", line 93, in samba_tool
cmd, argv = cmd_sambatool()._resolve("samba-tool", *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 412, in _resolve
sub = self.subcommands[a]
~~~~~~~~~~~~~~~^^^
File "/usr/lib/python3/dist-packages/samba/netcmd/main.py", line 37, in __getitem__
self[attr] = getattr(__import__('samba.netcmd.%s' % package,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/samba/netcmd/domain/__init__.py", line 29, in <module>
from .backup import cmd_domain_backup
File "/usr/lib/python3/dist-packages/samba/netcmd/domain/backup.py", line 34, in <module>
from samba.join import DCJoinContext, join_clone, DCCloneAndRenameContext
File "/usr/lib/python3/dist-packages/samba/join.py", line 30, in <module>
from samba.provision import (secretsdb_self_join, provision, provision_fill,
File "/usr/lib/python3/dist-packages/samba/provision/__init__.py", line 76, in <module>
from samba.gkdi import (
File "/usr/lib/python3/dist-packages/samba/gkdi.py", line 25, in <module>
from cryptography.hazmat.primitives import hashes
ModuleNotFoundError: No module named 'cryptography'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/bin/samba-tool", line 35, in <module>
retval = samba_tool(*sys.argv[1:])
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/samba/netcmd/main.py", line 98, in samba_tool
cmd.show_command_error(e)
^^^
UnboundLocalError: cannot access local variable 'cmd' where it is not associated with a value


The root cause was the import of the "cryptography" module in /usr/lib/python3/dist-packages/samba/gkdi.py, where the module was not installed on my system.
I fixed the problem by installing python3-samba manually. This package should become a dependency of python3-samba.

-- System Information:
Debian Release: 12.7
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-26-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python3-samba depends on:
ii  libbsd0               0.11.7-2
ii  libc6                 2.36-9+deb12u8
ii  libgnutls30           3.7.9-2+deb12u3
ii  libldb2               2:2.10.0+samba4.21.1+dfsg-2~bpo12+1
ii  libpython3.11         3.11.2-6+deb12u3
ii  libtalloc2            2.4.2-1~bpo12+1
ii  libtevent0            0.16.1-2~bpo12+1
ii  python3               3.11.2-1+b1
ii  python3-ldb           2:2.10.0+samba4.21.1+dfsg-2~bpo12+1
ii  python3-talloc        2.4.2-1~bpo12+1
ii  python3-tdb           1.4.12-1~bpo12+1
ii  samba-libs [libndr5]  2:4.21.1+dfsg-2~bpo12+1

Versions of packages python3-samba recommends:
pn  python3-gpg  <none>
ii  tdb-tools    1.4.12-1~bpo12+1

python3-samba suggests no packages.

-- no debconf information



More information about the Pkg-samba-maint mailing list