[root@samba ~]# samba-tool
ERROR(<class 'ImportError'>): uncaught exception - cannot import name
'dnsserver' from 'samba.dcerpc'
File "/usr/bin/samba-tool", line 44, in <module>
retval = cmd._run("samba-tool", subcommand, *args)
File "/usr/lib64/python3.10/site-packages/samba/netcmd/__init__.py", line
259, in _run
cmd = self.subcommands[cmd_name]
File "/usr/lib64/python3.10/site-packages/samba/netcmd/main.py", line 35, in
self[attr] = getattr(__import__('samba.netcmd.%s' % package,
File "/usr/lib64/python3.10/site-packages/samba/netcmd/computer.py", line 31,
from samba.dcerpc import dnsserver, dnsp, security
This is a packaging issue.
The samba-tool without addc changes were not meant to make samba-tool work when addc is not installed, they were to make samba-tool work when addc is not built at all.
I just tested rpm builds on openSUSE with addc enabled and a build with it disabled (--without-ad-dc).
Both work as expected. When addc is disabled during the build, samba-tool obviously does not depend on addc and works fine. When addc is enabled during the build, samba-tool works fine and depends on addc.