Bug 14965 - samba-tool in file server only environment throws exception
Summary: samba-tool in file server only environment throws exception
Status: RESOLVED INVALID
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Other (show other bugs)
Version: 4.15.3
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: David Mulder
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-01-28 16:58 UTC by Andreas Schneider
Modified: 2022-02-23 11:59 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Schneider 2022-01-28 16:58:35 UTC
[root@samba ~]# samba-tool 
ERROR(<class 'ImportError'>): uncaught exception - cannot import name
'dnsserver' from 'samba.dcerpc'
(/usr/lib64/python3.10/site-packages/samba/dcerpc/__init__.py)
  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
__getitem__
    self[attr] = getattr(__import__('samba.netcmd.%s' % package,
  File "/usr/lib64/python3.10/site-packages/samba/netcmd/computer.py", line 31,
in <module>
    from samba.dcerpc import dnsserver, dnsp, security


https://bugzilla.redhat.com/show_bug.cgi?id=2036443
Comment 1 David Mulder 2022-01-28 18:00:32 UTC
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.
Comment 2 David Mulder 2022-02-23 11:59:30 UTC
Closing.