Bug 49997

Summary: 53_samba-common/60_local_config failed
Product: UCS Reporter: Florian Best <best>
Component: SambaAssignee: Samba maintainers <samba-maintainers>
Status: RESOLVED DUPLICATE QA Contact: Samba maintainers <samba-maintainers>
Severity: normal    
Priority: P5 CC: best, hahn, requate
Version: UCS 4.4   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
URL: https://jenkins.knut.univention.de:8181/job/UCS-4.4/job/UCS-4.4-1/job/AutotestJoin/lastCompletedBuild/SambaVersion=s4,Systemrolle=slave/testReport/53_samba-common/60_local_config/slave095/
See Also: https://forge.univention.org/bugzilla/show_bug.cgi?id=46975
What kind of report is it?: Development Internal What type of bug is this?: ---
Who will be affected by this bug?: --- How will those affected feel about the bug?: ---
User Pain: Enterprise Customer affected?:
School Customer affected?: ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: Bug group (optional):
Max CVSS v3 score:
Bug Depends on: 48698, 49978    
Bug Blocks: 49944, 49945    

Description Florian Best univentionstaff 2019-08-12 17:11:35 CEST
The rebuild of the package univention-samba in Bug #48698 caused a failing ucs-test:

[2019-08-12 03:55:32.623154] Create samba/global/options/netbios aliases
[2019-08-12 03:55:32.736892] Script: /etc/univention/templates/scripts/samba.local.config.py
[2019-08-12 03:55:32.776292] Multifile: /etc/samba/smb.conf
[2019-08-12 03:55:33.367050] netbios aliases is set to ; expected myubinu8
(2019-08-12 03:55:33.368119) error 2019-08-12 03:55:33	 **************** Test failed above this line (1) ****************
[2019-08-12 03:55:33.403276] Unsetting samba/global/options/netbios aliases
[2019-08-12 03:55:33.516673] Script: /etc/univention/templates/scripts/samba.local.config.py
[2019-08-12 03:55:33.555644] Multifile: /etc/samba/smb.conf


Further analysing shows:
# ucr set samba/global/options/"netbios aliases"="value"                                                                                                                                                                       
Create samba/global/options/netbios aliases
Script: /etc/univention/templates/scripts/samba.local.config.py
Multifile: /etc/samba/smb.conf

/etc/univention/templates/scripts/samba.local.config.py contains:
try:
        from univention.lib.share_restrictions import ShareConfiguration
except ImportError:
        sys.exit(0)

# python
>>> from univention.lib.share_restrictions import ShareConfiguration
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named share_restrictions

# ls -l /usr/share/pyshared/univention/lib/share_restrictions.py

The package is missing a:
/usr/share/python-support/univention-samba-local-config.public

Probably a build dependency on python-support is missing.

+++ This bug was initially created as a clone of Bug #48698 +++
Comment 1 Florian Best univentionstaff 2019-08-12 17:21:10 CEST
The try-except block was introduced in Bug #46975.
Can we remove it?

We should fix this Bug by doing Bug #49177.
Comment 2 Florian Best univentionstaff 2019-08-12 17:51:48 CEST

*** This bug has been marked as a duplicate of bug 49177 ***