|
|
|
1 |
commit b6a3f4baf2c28996072ca3c4f10d9f00a8f1e380 |
2 |
Author: Mathieu Parent <math.parent@gmail.com> |
3 |
Date: Thu Aug 29 10:47:51 2019 +0200 |
4 |
|
5 |
Move to Python3 (from Ubuntu) |
6 |
|
7 |
diff --git debian/control debian/control |
8 |
index 7aa228e..babcd50 100644 |
9 |
--- debian/control |
10 |
+++ debian/control |
11 |
@@ -56,6 +56,14 @@ Build-Depends: bison, |
12 |
python-tdb (>= 1.3.16~), |
13 |
python-testtools, |
14 |
python3, |
15 |
+ python3-all-dev, |
16 |
+ python3-dnspython, |
17 |
+ python3-etcd, |
18 |
+ python3-ldb, |
19 |
+ python3-ldb-dev, |
20 |
+ python3-talloc-dev, |
21 |
+ python3-tdb, |
22 |
+ python3-testtools, |
23 |
xfslibs-dev [linux-any], |
24 |
xsltproc, |
25 |
zlib1g-dev (>= 1:1.2.3) |
26 |
@@ -456,3 +464,24 @@ Description: clustered database to store temporary data |
27 |
* CTDB supports a system of application specific management scripts, allowing |
28 |
applications that depend on network or filesystem resources to be managed in |
29 |
a highly available manner on a cluster. |
30 |
+ |
31 |
+Package: python3-samba |
32 |
+Pre-Depends: ${misc:Pre-Depends} |
33 |
+Architecture: any |
34 |
+Section: python |
35 |
+Provides: ${python3:Provides} |
36 |
+Suggests: python3-gpgme |
37 |
+Depends: python3-crypto, |
38 |
+ python3-ldb, |
39 |
+ python3-tdb, |
40 |
+ samba-libs (= ${binary:Version}), |
41 |
+ ${misc:Depends}, |
42 |
+ ${python3:Depends}, |
43 |
+ ${shlibs:Depends} |
44 |
+Description: Python bindings for Samba |
45 |
+ Samba is an implementation of the SMB/CIFS protocol for Unix systems, |
46 |
+ providing support for cross-platform file sharing with Microsoft Windows, OS X, |
47 |
+ and other Unix systems. Samba can also function as a domain controller |
48 |
+ or member server in both NT4-style and Active Directory domains. |
49 |
+ . |
50 |
+ This package contains Python bindings for most Samba libraries. |
51 |
diff --git debian/python-samba.install debian/python-samba.install |
52 |
index 353fe0d..490ac41 100644 |
53 |
--- debian/python-samba.install |
54 |
+++ debian/python-samba.install |
55 |
@@ -1 +1 @@ |
56 |
-usr/lib/python*/*-packages/samba |
57 |
+usr/lib/python2*/*-packages/samba |
58 |
diff --git debian/python3-samba.install debian/python3-samba.install |
59 |
new file mode 100644 |
60 |
index 0000000..5908173 |
61 |
--- /dev/null |
62 |
+++ debian/python3-samba.install |
63 |
@@ -0,0 +1 @@ |
64 |
+usr/lib/python3*/*-packages/samba |
65 |
diff --git debian/python3-samba.lintian-overrides debian/python3-samba.lintian-overrides |
66 |
new file mode 100644 |
67 |
index 0000000..89facf8 |
68 |
--- /dev/null |
69 |
+++ debian/python3-samba.lintian-overrides |
70 |
@@ -0,0 +1,2 @@ |
71 |
+# False positives, see #896012 |
72 |
+python3-samba: library-not-linked-against-libc * |
73 |
diff --git debian/rules debian/rules |
74 |
index 36acb1c..456787f 100755 |
75 |
--- debian/rules |
76 |
+++ debian/rules |
77 |
@@ -15,12 +15,12 @@ PYVERS=$(shell pyversions -vr) |
78 |
|
79 |
LDB_VERSION = $(shell pkg-config --modversion ldb) |
80 |
LDB_EPOCH = $(shell dpkg-query -f '$${Version}' -W libldb-dev | sed 's/:.*//') |
81 |
-LDB_NEXT_VERSION = $(shell python -c "x = '$(LDB_VERSION)'.split('.'); x[-1] = str(int(x[-1])+1); print '.'.join(x)") |
82 |
+LDB_NEXT_VERSION = $(shell python3 -c "x = '$(LDB_VERSION)'.split('.'); x[-1] = str(int(x[-1])+1); print('.'.join(x))") |
83 |
# samba ships ldb modules, which are specific to the ldb version, so we need a |
84 |
# strict dependency on the upstream ldb version |
85 |
# this also mean samba needs a rebuild when the upstream ldb version changes |
86 |
LDB_DEPENDS = "libldb1 (<< $(LDB_EPOCH):$(LDB_NEXT_VERSION)~), libldb1 (>> $(LDB_EPOCH):$(LDB_VERSION)~)" |
87 |
-export PYSHORT=$(shell pyversions -d) |
88 |
+export PYSHORT=python3 |
89 |
export PYTHON=$(shell which $(PYSHORT)) |
90 |
export PYTHON_CONFIG="$(PYTHON)-config" |
91 |
WAF = $(PYTHON) ./buildtools/bin/waf -v |
92 |
@@ -76,6 +76,7 @@ conf_args = \ |
93 |
--minimum-library-version="$(shell ./debian/autodeps.py --minimum-library-version)" \ |
94 |
--with-cluster-support \ |
95 |
--with-socketpath=/var/run/ctdb/ctdbd.socket \ |
96 |
+ --extra-python=/usr/bin/python2 \ |
97 |
--with-logdir=/var/log/ctdb |
98 |
|
99 |
ifeq ($(DEB_HOST_ARCH_OS), linux) |
100 |
@@ -92,10 +93,10 @@ ifeq ($(DEB_HOST_ARCH_CPU), amd64) |
101 |
endif |
102 |
|
103 |
%: |
104 |
- dh $* --with python2 |
105 |
+ dh $* --with python2,python3 |
106 |
|
107 |
override_dh_auto_configure: |
108 |
- $(WAF) configure $(conf_args) |
109 |
+ PYTHON="" $(WAF) configure $(conf_args) |
110 |
|
111 |
override_dh_auto_clean: |
112 |
-$(WAF) clean |
113 |
@@ -134,7 +135,7 @@ override_dh_install: |
114 |
# get list of files in build log |
115 |
find ${DESTDIR} |
116 |
# Included in python-tevent |
117 |
- rm $(DESTDIR)/usr/lib/python*/*-packages/_tevent.so |
118 |
+ rm $(DESTDIR)/usr/lib/python*/*-packages/_tevent.* |
119 |
rm $(DESTDIR)/usr/lib/python*/*-packages/tevent.py |
120 |
# Already documented in debian/copyright |
121 |
-rm $(DESTDIR)/usr/share/samba/setup/ad-schema/licence.txt |
122 |
@@ -160,9 +161,11 @@ override_dh_install: |
123 |
install -m755 debian/samba-common.dhcp $(DESTDIR)/etc/dhcp/dhclient-enter-hooks.d/samba |
124 |
# Install other stuff not installed by "make install" |
125 |
install -m 0755 debian/mksmbpasswd.awk $(DESTDIR)/usr/sbin/mksmbpasswd |
126 |
+ # This moves the dckeytab module to the samba package in order to avoid |
127 |
+ # a circular dependency between python3-samba, samba and samba-common-bin |
128 |
mkdir -p debian/samba/usr/lib/$(PYSHORT)/dist-packages/samba |
129 |
- mv $(DESTDIR)/usr/lib/$(PYSHORT)/dist-packages/samba/dckeytab.so \ |
130 |
- debian/samba/usr/lib/$(PYSHORT)/dist-packages/samba/dckeytab.so |
131 |
+ mv $(DESTDIR)/usr/lib/$(PYSHORT)/dist-packages/samba/dckeytab*.so \ |
132 |
+ debian/samba/usr/lib/$(PYSHORT)/dist-packages/samba/ |
133 |
mkdir -p $(DESTDIR)/etc/ufw/applications.d |
134 |
install -m644 debian/samba.ufw.profile $(DESTDIR)/etc/ufw/applications.d/samba |
135 |
# use upstream version of smb.conf.5 if there is no built version |
136 |
diff --git debian/samba-dev.install debian/samba-dev.install |
137 |
index 6a8dc5f..351b7e1 100644 |
138 |
--- debian/samba-dev.install |
139 |
+++ debian/samba-dev.install |
140 |
@@ -93,6 +93,7 @@ usr/lib/*/libsamba-errors.so |
141 |
usr/lib/*/libsamba-hostconfig.so |
142 |
usr/lib/*/libsamba-passdb.so |
143 |
usr/lib/*/libsamba-policy.so |
144 |
+usr/lib/*/libsamba-policy.cpython-*.so |
145 |
usr/lib/*/libsamba-util.so |
146 |
usr/lib/*/libsamdb.so |
147 |
usr/lib/*/libsmbconf.so |
148 |
@@ -109,5 +110,6 @@ usr/lib/*/pkgconfig/netapi.pc |
149 |
usr/lib/*/pkgconfig/samba-credentials.pc |
150 |
usr/lib/*/pkgconfig/samba-hostconfig.pc |
151 |
usr/lib/*/pkgconfig/samba-policy.pc |
152 |
+usr/lib/*/pkgconfig/samba-policy.cpython-*.pc |
153 |
usr/lib/*/pkgconfig/samba-util.pc |
154 |
usr/lib/*/pkgconfig/samdb.pc |
155 |
diff --git debian/samba-libs.install debian/samba-libs.install |
156 |
index a2742f0..27ddc2f 100644 |
157 |
--- debian/samba-libs.install |
158 |
+++ debian/samba-libs.install |
159 |
@@ -12,6 +12,7 @@ usr/lib/*/libsamba-errors.so.* |
160 |
usr/lib/*/libsamba-hostconfig.so.* |
161 |
usr/lib/*/libsamba-passdb.so.* |
162 |
usr/lib/*/libsamba-policy.so.* |
163 |
+usr/lib/*/libsamba-policy.cpython-*.so.* |
164 |
usr/lib/*/libsamba-util.so.* |
165 |
usr/lib/*/libsamdb.so.* |
166 |
usr/lib/*/libsmbconf.so.0 |
167 |
@@ -105,6 +106,8 @@ usr/lib/*/samba/libsamba-debug.so.0 |
168 |
usr/lib/*/samba/libsamba-modules.so.* |
169 |
usr/lib/*/samba/libsamba-net.so.* |
170 |
usr/lib/*/samba/libsamba-python.so.0 |
171 |
+usr/lib/*/samba/libsamba-net.cpython-*.so.* |
172 |
+usr/lib/*/samba/libsamba-python.cpython-*.so.0 |
173 |
usr/lib/*/samba/libsamba-security.so.* |
174 |
usr/lib/*/samba/libsamba-sockets.so.* |
175 |
usr/lib/*/samba/libsamba3-util.so.* |
176 |
diff --git debian/samba-libs.lintian-overrides debian/samba-libs.lintian-overrides |
177 |
index e9f8aed..15dac80 100644 |
178 |
--- debian/samba-libs.lintian-overrides |
179 |
+++ debian/samba-libs.lintian-overrides |
180 |
@@ -1,6 +1,6 @@ |
181 |
# the samba-libs package contains a number of libraries |
182 |
# it doesn't make sense to have them in separate packages, as this would |
183 |
# result in circular dependencies |
184 |
-samba-libs: package-name-doesnt-match-sonames libdcerpc-binding0 libdcerpc-samr0 libdcerpc-server0 libdcerpc0 libndr-krb5pac0 libndr-nbt0 libndr-standard0 libndr0 libnetapi0 libsamba-credentials0 libsamba-errors1 libsamba-hostconfig0 libsamba-passdb0 libsamba-policy0 libsamba-util0 libsamdb0 libsmbconf0 libsmbldap2 libtevent-util0 |
185 |
+samba-libs: package-name-doesnt-match-sonames libdcerpc-binding0 libdcerpc-samr0 libdcerpc-server0 libdcerpc0 libndr-krb5pac0 libndr-nbt0 libndr-standard0 libndr0 libnetapi0 libsamba-credentials0 libsamba-errors1 libsamba-hostconfig0 libsamba-passdb0 libsamba-policy0 libsamba-policy.cpython-* libsamba-util0 libsamdb0 libsmbconf0 libsmbldap2 libtevent-util0 |
186 |
# Embedded Heimdal is patched |
187 |
samba-libs: embedded-library usr/lib/*/samba/libgssapi-samba4.so.*: heimdal |
188 |
diff --git debian/tests/python-smoke debian/tests/python-smoke |
189 |
index 01e6681..31a6be6 100644 |
190 |
--- debian/tests/python-smoke |
191 |
+++ debian/tests/python-smoke |
192 |
@@ -1,2 +1,2 @@ |
193 |
#!/bin/sh |
194 |
-python -c 'import samba.samba3' |
195 |
+python -c 'import samba.samba3' && python3 -c 'import samba.samba3' |