Bug 49720 - Samba source package doesn't generate python3-Packages yet
Samba source package doesn't generate python3-Packages yet
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Samba
UCS 4.4
All Linux
: P5 normal (vote)
: UCS 5.0
Assigned To: Florian Best
Arvid Requate
:
Depends on:
Blocks: 51503 49060 51663
  Show dependency treegraph
 
Reported: 2019-06-24 14:14 CEST by Arvid Requate
Modified: 2021-05-25 16:01 CEST (History)
3 users (show)

See Also:
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:
best: Patch_Available+


Attachments
0001-Bug-49720-build-talloc-including-python3-package.patch (16.47 KB, patch)
2019-11-29 13:10 CET, Florian Best
Details | Diff
0002-Bug-49720-build-tdb-including-python3-package.patch (6.03 KB, patch)
2019-11-29 13:11 CET, Florian Best
Details | Diff
0003-Bug-49720-build-ldb-including-python3-package.patch (15.67 KB, patch)
2019-11-29 13:11 CET, Florian Best
Details | Diff
0004-Bug-49720-build-samba-including-python3-package.patch (35.68 KB, patch)
2019-11-29 13:11 CET, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2019-06-24 14:14:15 CEST
The samba and ldb (maybe also tdb, talloc and tevent) source packages don't generate python3-Packages yet, even though Samba 4.10 is now supporting Python3 and is intended as the transition window from Python2.

I also currently don't see anything in this direction in the Debian packaging team repo:

https://salsa.debian.org/samba-team/samba/blob/master/debian/control
https://salsa.debian.org/samba-team/samba/blob/experimental/debian/control

For python3-univention-lib we need this.



+++ This bug was initially created as a clone of Bug #49129 Comment 6 +++

~FAIL: python3-univention-lib -> python3-ldb python3-samba
 Currently there are no Python3 modules for Samba, so the module remains uninstallable.
Comment 1 Florian Best univentionstaff 2019-06-24 17:16:29 CEST
The files are meant to work with Python3 already (in verison 2:4.10.1)?
At least there are some errors:

/usr/lib/python2.7/dist-packages/samba# python flake8 --select E999
./upgrade.py:152:24: E999 SyntaxError: invalid syntax
./dbchecker.py:2153:28: E999 SyntaxError: invalid syntax
./provision/__init__.py:1807:41: E999 SyntaxError: invalid syntax
./netcmd/upn.py:140:25: E999 SyntaxError: invalid syntax
Comment 2 Arvid Requate univentionstaff 2019-06-24 20:18:43 CEST
See https://www.samba.org/samba/history/samba-4.10.0.html , I guess out default of "dh build --with python2" turns off python3 support. Also, there are no python3-* packages defined in debian/control. Compare

* https://packages.ubuntu.com/disco/python3-samba
* https://packages.ubuntu.com/disco/python3-ldb
* https://packages.ubuntu.com/disco/python3-tdb
* https://packages.ubuntu.com/disco/python3-talloc

> /usr/lib/python2.7/dist-packages/samba

I guess this is not the right place to look for python3 packages.
Comment 3 Florian Best univentionstaff 2019-11-29 13:10:50 CET
Created attachment 10237 [details]
0001-Bug-49720-build-talloc-including-python3-package.patch
Comment 4 Florian Best univentionstaff 2019-11-29 13:11:08 CET
Created attachment 10238 [details]
0002-Bug-49720-build-tdb-including-python3-package.patch
Comment 5 Florian Best univentionstaff 2019-11-29 13:11:25 CET
Created attachment 10239 [details]
0003-Bug-49720-build-ldb-including-python3-package.patch
Comment 6 Florian Best univentionstaff 2019-11-29 13:11:43 CET
Created attachment 10240 [details]
0004-Bug-49720-build-samba-including-python3-package.patch
Comment 7 Florian Best univentionstaff 2019-11-29 13:13:25 CET
Patches for talloc, tdb, ldb and samba attached.
Comment 8 Florian Best univentionstaff 2019-12-16 10:52:15 CET
There is probably some Breaks/Replaces missing:

Entpacken von python-samba (2:4.10.1-1+python3) über (2:4.10.1-1A~4.4.0.201912031949) ...
dpkg: Fehler beim Bearbeiten des Archivs /tmp/apt-dpkg-install-mspt5y/008-python-samba_2%3a4.10.1-1+python3_amd64.deb (--unpack):
 Versuch, »/usr/lib/python2.7/dist-packages/samba/dckeytab.x86_64-linux-gnu.so« zu überschreiben, welches auch in Paket samba 2:4.10.1-1A~4.4.0.201912031949 ist
dpkg-deb: Fehler: Unterprozess einfügen wurde durch Signal (Datenübergabe unterbrochen (broken pipe)) getötet

Missing is also the migration of the current patches/, which add python 2 things.
Comment 9 Florian Best univentionstaff 2020-05-19 13:55:35 CEST
(In reply to Florian Best from comment #8)
> Missing is also the migration of the current patches/, which add python 2
> things.
I updated the patches in patches/samba/4.4-0-0-ucs/2:4.10.1-1-python3, so the patched things seem python3 compatible.
Comment 10 Arvid Requate univentionstaff 2020-06-12 14:33:22 CEST
I've cherrypicked the packages and Florians patches to the 5.0-0 scope and only had to adjust the dependency from python3.5 to python3.7 for buster to make the packages build. I created Bug #51481 for the Samba update.
Comment 11 Florian Best univentionstaff 2020-06-24 17:08:09 CEST
I saw a lot of these messages in the samba.log file:

[2020/06/24 16:52:26.738382,  0, pid=18501] ../../lib/util/become_daemon.c:136(daemon_ready)
  daemon_ready: daemon 'samba' finished starting up and ready to serve connections
[2020/06/24 16:52:26.868415,  0, pid=18531] ../../lib/util/util_runcmd.c:327(samba_runcmd_io_handler)
  /usr/sbin/samba_dnsupdate: Traceback (most recent call last):
[2020/06/24 16:52:26.868485,  0, pid=18531] ../../lib/util/util_runcmd.c:327(samba_runcmd_io_handler)
  /usr/sbin/samba_dnsupdate:   File "/usr/sbin/samba_dnsupdate", line 26, in <module>
[2020/06/24 16:52:26.868503,  0, pid=18531] ../../lib/util/util_runcmd.c:327(samba_runcmd_io_handler)
  /usr/sbin/samba_dnsupdate:     import netifaces
[2020/06/24 16:52:26.868526,  0, pid=18531] ../../lib/util/util_runcmd.c:327(samba_runcmd_io_handler)
  /usr/sbin/samba_dnsupdate: ModuleNotFoundError: No module named 'netifaces'

Fixed in:
r19076 | Bug #49720: fix dependency on python{3,}-netifaces
Comment 12 Florian Best univentionstaff 2021-05-25 16:01:04 CEST
UCS 5.0 has been released:
 https://docs.software-univention.de/release-notes-5.0-0-en.html
 https://docs.software-univention.de/release-notes-5.0-0-de.html

If this error occurs again, please use "Clone This Bug".