View | Details | Raw Unified | Return to bug 49720 | Differences between
and this patch

Collapse All | Expand All

(-)a/ldb/20_python3.patch (+119 lines)
Line 0    Link Here 
1
commit 13eb70eba4cd8d9f0b811160336a9ff7f323e173
2
Author: Timo Aaltonen <tjaalton@debian.org>
3
Date:   Wed Aug 14 11:44:54 2019 +0300
4
5
    Add python3 packages.
6
7
diff --git debian/control debian/control
8
index 769c93b..da9e2de 100644
9
--- debian/control
10
+++ debian/control
11
@@ -17,10 +17,15 @@ Build-Depends: debhelper (>> 9),
12
                libtevent-dev (>= 0.9.37~),
13
                pkg-config,
14
                python (>= 2.6.6-3),
15
+               python3,
16
                python-all-dbg (>= 2.6.6-3),
17
+               python3-all-dbg,
18
                python-all-dev (>= 2.6.6-3),
19
+               python3-all-dev,
20
                python-talloc-dev (>= 2.1.14~),
21
+               python3-talloc-dev,
22
                python-tdb (>= 1.3.16~),
23
+               python3-tdb,
24
                xsltproc
25
 Homepage: http://ldb.samba.org/
26
 Standards-Version: 4.0.0
27
@@ -122,3 +127,37 @@ Description: LDB Python bindings - development files
28
  database.
29
  .
30
  This package contains the development files for the Python bindings.
31
+
32
+Package: python3-ldb
33
+Pre-Depends: ${misc:Pre-Depends}
34
+Section: python
35
+Architecture: any
36
+Depends: libldb1 (= ${binary:Version}),
37
+         ${misc:Depends},
38
+         ${python3:Depends},
39
+         ${shlibs:Depends}
40
+Provides: ${python:Provides}
41
+Breaks: ${python:Breaks}
42
+Description: Python 3 bindings for LDB
43
+ ldb is a LDAP-like embedded database built on top of TDB.
44
+ .
45
+ This package contains the Python 3 bindings.
46
+
47
+Package: python3-ldb-dev
48
+Section: libdevel
49
+Architecture: any
50
+Multi-Arch: same
51
+Depends: libc6-dev,
52
+         libldb-dev,
53
+         pkg-config,
54
+         python3-ldb (= ${binary:Version}),
55
+         ${misc:Depends}
56
+Description: LDB Python 3 bindings - development files
57
+ ldb is a LDAP-like embedded database built on top of TDB.
58
+ .
59
+ It is a fast database with an LDAP-like API designed
60
+ to be used within an application. In some ways it can be seen as a
61
+ intermediate solution between key-value pair databases and a real LDAP
62
+ database.
63
+ .
64
+ This package contains the development files for the Python 3 bindings.
65
diff --git debian/python3-ldb-dev.install debian/python3-ldb-dev.install
66
new file mode 100644
67
index 0000000..ddf0e1a
68
--- /dev/null
69
+++ debian/python3-ldb-dev.install
70
@@ -0,0 +1,3 @@
71
+usr/include/pyldb.h
72
+usr/lib/*/libpyldb-util.cpython-*.so
73
+usr/lib/*/pkgconfig/pyldb-util.cpython-*.pc
74
diff --git debian/python3-ldb.install debian/python3-ldb.install
75
new file mode 100644
76
index 0000000..b8d6112
77
--- /dev/null
78
+++ debian/python3-ldb.install
79
@@ -0,0 +1,2 @@
80
+usr/lib/*/libpyldb-util.cpython-*.so.*
81
+usr/lib/python3*
82
diff --git debian/rules debian/rules
83
index a420954..4b37eb6 100755
84
--- debian/rules
85
+++ debian/rules
86
@@ -20,7 +20,7 @@ LDFLAGS += -Wl,--as-needed
87
 
88
 DESTDIR=$(CURDIR)/debian/tmp
89
 
90
-export PYTHON=$(shell which `pyversions -d`)
91
+export PYTHON=$(shell which python3)
92
 export PYTHON_CONFIG="$(PYTHON)-config"
93
 export WAF=$(PYTHON) ./buildtools/bin/waf
94
 
95
@@ -28,15 +28,16 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
96
 DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
97
 
98
 %:
99
-	dh $* --with python2
100
+	dh $* --with python2,python3
101
 
102
 override_dh_auto_configure:
103
-	PYTHON="$(PYTHON)" PYTHON_CONFIG="$(PYTHON_CONFIG)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
104
+	PYTHON="" PYTHON_CONFIG="$(PYTHON_CONFIG)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
105
 		$(WAF) configure --prefix=/usr --disable-rpath-install \
106
 		--builtin-libraries=ccan,replace,tdb_compat \
107
 		--bundled-libraries=NONE,pytevent \
108
 		--minimum-library-version="$(shell ./debian/autodeps.py --minimum-library-version)" \
109
 		--libdir=/usr/lib/$(DEB_HOST_MULTIARCH) \
110
+		--extra-python=/usr/bin/python2 \
111
 		--with-modulesdir=/usr/lib/$(DEB_HOST_MULTIARCH)/ldb/modules
112
 
113
 get-packaged-orig-source:
114
@@ -80,4 +81,5 @@ override_dh_missing:
115
 
116
 override_dh_makeshlibs:
117
 	dh_makeshlibs -Xldb.so -ppython-ldb -- -c4
118
+	dh_makeshlibs -Xldb. -ppython3-ldb -- -c4
119
 	dh_makeshlibs -X/usr/lib/$(DEB_HOST_MULTIARCH)/ldb -plibldb1 -- -c4
(-)a/ldb/21_python3.patch (+43 lines)
Line 0    Link Here 
1
commit 16aa74d7a12ed3f7d9907bb68495bd22f319625b
2
Author: Timo Aaltonen <tjaalton@debian.org>
3
Date:   Wed Aug 14 11:50:31 2019 +0300
4
5
    d/control, d/python3-ldb-dev.install, d/rules: use dh-exec and install the python header file in a version-dependent include dir.
6
7
diff --git debian/control debian/control
8
index 5325c22..1c39223 100644
9
--- debian/control
10
+++ debian/control
11
@@ -6,6 +6,7 @@ Uploaders: Jelmer Vernooij <jelmer@debian.org>,
12
            Mathieu Parent <sathieu@debian.org>
13
 Build-Depends: debhelper (>> 9),
14
                dh-python,
15
+               dh-exec,
16
                docbook-xml,
17
                docbook-xsl,
18
                libcmocka-dev (>= 1.1.1~),
19
diff --git debian/python3-ldb-dev.install debian/python3-ldb-dev.install
20
index ddf0e1a..a2f5db4 100644
21
--- debian/python3-ldb-dev.install
22
+++ debian/python3-ldb-dev.install
23
@@ -1,3 +1,4 @@
24
-usr/include/pyldb.h
25
+#! /usr/bin/dh-exec
26
+usr/include/pyldb.h ${DEB_PY3_INCDIR}
27
 usr/lib/*/libpyldb-util.cpython-*.so
28
 usr/lib/*/pkgconfig/pyldb-util.cpython-*.pc
29
diff --git debian/rules debian/rules
30
index 62d526a..e38d76d 100755
31
--- debian/rules
32
+++ debian/rules
33
@@ -69,6 +69,10 @@ endif
34
 override_dh_python2:
35
 	dh_python2 --no-guessing-versions
36
 
37
+override_dh_install:
38
+	DEB_PY3_INCDIR=$(shell python3-config --includes | sed 's,^-I\([^ ]*\).*,\1,') \
39
+		dh_install
40
+
41
 override_dh_auto_install:
42
 	DESTDIR=$(DESTDIR) $(WAF) install
43
 	rm $(DESTDIR)/usr/lib/python*/dist-packages/_tevent.so
(-)a/ldb/24_python3.patch (+23 lines)
Line 0    Link Here 
1
commit e45ef92b6f0e08561b201d754f290236eafd7bac
2
Author: Timo Aaltonen <tjaalton@debian.org>
3
Date:   Wed Aug 14 11:45:58 2019 +0300
4
5
    d/rules: clean extra paths in the clean target
6
7
diff --git debian/rules debian/rules
8
index e38d76d..20fd30b 100755
9
--- debian/rules
10
+++ debian/rules
11
@@ -50,11 +50,7 @@ override_dh_auto_clean:
12
 	rm -f .lock-wscript
13
 	# Waf should be doing this; see
14
 	# https://bugzilla.samba.org/show_bug.cgi?id=8855
15
-	rm -f buildtools/wafsamba/*.pyc \
16
-		third_party/waf/wafadmin/*.pyc \
17
-		third_party/waf/wafadmin/Tools/*.pyc \
18
-		third_party/waf/waflib/*/*.pyc \
19
-		third_party/waf/waflib/*.pyc
20
+	find . -name __pycache__ -o -name "*.pyc" -exec rm -rf {} \;
21
 
22
 override_dh_auto_build:
23
 	$(WAF) build
(-)a/ldb/25_python3.patch (+19 lines)
Line 0    Link Here 
1
commit cbf1c191bcc37c43a78acf93392d994b693233a9
2
Author: Timo Aaltonen <tjaalton@debian.org>
3
Date:   Wed Aug 14 12:01:51 2019 +0300
4
5
    d/rules: fix tevent globbing used in its removal
6
7
diff --git debian/rules debian/rules
8
index 20fd30b..6291cf8 100755
9
--- debian/rules
10
+++ debian/rules
11
@@ -71,7 +71,7 @@ override_dh_install:
12
 
13
 override_dh_auto_install:
14
 	DESTDIR=$(DESTDIR) $(WAF) install
15
-	rm $(DESTDIR)/usr/lib/python*/dist-packages/_tevent.so
16
+	rm $(DESTDIR)/usr/lib/python*/dist-packages/_tevent*.so
17
 	rm $(DESTDIR)/usr/lib/python*/dist-packages/tevent.py
18
 	ar cr libldb.a bin/default/common/*.o
19
 	mv libldb.a $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)
(-)a/ldb/26_python3.quilt (+91 lines)
Line 0    Link Here 
1
commit 6fdcda70d2abfc6165cd71827b5a45b948338776
2
Author: Timo Aaltonen <tjaalton@debian.org>
3
Date:   Wed Aug 14 11:55:31 2019 +0300
4
5
    d/python3-ldb.symbols.*: add per-architecture symbols files
6
7
diff --git debian/python3-ldb.symbols.amd64 debian/python3-ldb.symbols.amd64
8
new file mode 100644
9
index 0000000..bfebdff
10
--- /dev/null
11
+++ debian/python3-ldb.symbols.amd64
12
@@ -0,0 +1,3 @@
13
+libpyldb-util.cpython-35m-x86-64-linux-gnu.so.1 python3-ldb #MINVER#
14
+ PYLDB_UTIL.CPYTHON_35M_X86_64_LINUX_GNU_1.5.4@PYLDB_UTIL.CPYTHON_35M_X86_64_LINUX_GNU_1.5.4 2:1.5.4-1
15
+#include "python3-ldb.symbols.common"
16
diff --git debian/python3-ldb.symbols.arm64 debian/python3-ldb.symbols.arm64
17
new file mode 100644
18
index 0000000..18a3a0b
19
--- /dev/null
20
+++ debian/python3-ldb.symbols.arm64
21
@@ -0,0 +1,3 @@
22
+libpyldb-util.cpython-37m-aarch64-linux-gnu.so.1 python3-ldb #MINVER#
23
+ PYLDB_UTIL.CPYTHON_37M_AARCH64_LINUX_GNU_1.5.5@PYLDB_UTIL.CPYTHON_37M_AARCH64_LINUX_GNU_1.5.5 1.5.5
24
+#include "python3-ldb.symbols.common"
25
diff --git debian/python3-ldb.symbols.armhf debian/python3-ldb.symbols.armhf
26
new file mode 100644
27
index 0000000..bace8bc
28
--- /dev/null
29
+++ debian/python3-ldb.symbols.armhf
30
@@ -0,0 +1,3 @@
31
+libpyldb-util.cpython-37m-arm-linux-gnueabihf.so.1 python3-ldb #MINVER#
32
+ PYLDB_UTIL.CPYTHON_37M_ARM_LINUX_GNUEABIHF_1.5.5@PYLDB_UTIL.CPYTHON_37M_ARM_LINUX_GNUEABIHF_1.5.5 1.5.5
33
+#include "python3-ldb.symbols.common"
34
diff --git debian/python3-ldb.symbols.common debian/python3-ldb.symbols.common
35
new file mode 100644
36
index 0000000..d0b7037
37
--- /dev/null
38
+++ debian/python3-ldb.symbols.common
39
@@ -0,0 +1,25 @@
40
+ PYLDB_UTIL.PY3_1.1.23@PYLDB_UTIL.PY3_1.1.23 2:1.5.4-1
41
+ PYLDB_UTIL.PY3_1.1.24@PYLDB_UTIL.PY3_1.1.24 2:1.5.4-1
42
+ PYLDB_UTIL.PY3_1.1.25@PYLDB_UTIL.PY3_1.1.25 2:1.5.4-1
43
+ PYLDB_UTIL.PY3_1.1.26@PYLDB_UTIL.PY3_1.1.26 2:1.5.4-1
44
+ PYLDB_UTIL.PY3_1.1.27@PYLDB_UTIL.PY3_1.1.27 2:1.5.4-1
45
+ PYLDB_UTIL.PY3_1.1.28@PYLDB_UTIL.PY3_1.1.28 2:1.5.4-1
46
+ PYLDB_UTIL.PY3_1.1.29@PYLDB_UTIL.PY3_1.1.29 2:1.5.4-1
47
+ PYLDB_UTIL.PY3_1.1.30@PYLDB_UTIL.PY3_1.1.30 2:1.5.4-1
48
+ PYLDB_UTIL.PY3_1.1.31@PYLDB_UTIL.PY3_1.1.31 2:1.5.4-1
49
+ PYLDB_UTIL.PY3_1.2.0@PYLDB_UTIL.PY3_1.2.0 2:1.5.4-1
50
+ PYLDB_UTIL.PY3_1.2.1@PYLDB_UTIL.PY3_1.2.1 2:1.5.4-1
51
+ PYLDB_UTIL.PY3_1.2.2@PYLDB_UTIL.PY3_1.2.2 2:1.5.4-1
52
+ PYLDB_UTIL.PY3_1.2.3@PYLDB_UTIL.PY3_1.2.3 2:1.5.4-1
53
+ PYLDB_UTIL.PY3_1.3.0@PYLDB_UTIL.PY3_1.3.0 2:1.5.4-1
54
+ PYLDB_UTIL.PY3_1.3.1@PYLDB_UTIL.PY3_1.3.1 2:1.5.4-1
55
+ PYLDB_UTIL.PY3_1.3.2@PYLDB_UTIL.PY3_1.3.2 2:1.5.4-1
56
+ PYLDB_UTIL.PY3_1.4.0@PYLDB_UTIL.PY3_1.4.0 2:1.5.4-1
57
+ PYLDB_UTIL.PY3_1.4.1@PYLDB_UTIL.PY3_1.4.1 2:1.5.4-1
58
+ PYLDB_UTIL.PY3_1.5.0@PYLDB_UTIL.PY3_1.5.0 2:1.5.4-1
59
+ PYLDB_UTIL.PY3_1.5.1@PYLDB_UTIL.PY3_1.5.1 2:1.5.4-1
60
+ PYLDB_UTIL.PY3_1.5.2@PYLDB_UTIL.PY3_1.5.2 2:1.5.4-1
61
+ PYLDB_UTIL.PY3_1.5.3@PYLDB_UTIL.PY3_1.5.3 2:1.5.4-1
62
+ PYLDB_UTIL.PY3_1.5.4@PYLDB_UTIL.PY3_1.5.4 2:1.5.4-1
63
+ pyldb_Dn_FromDn@PYLDB_UTIL.PY3_1.1.23 2:1.5.4-1
64
+ pyldb_Object_AsDn@PYLDB_UTIL.PY3_1.1.23 2:1.5.4-1
65
diff --git debian/python3-ldb.symbols.i386 debian/python3-ldb.symbols.i386
66
new file mode 100644
67
index 0000000..8eaf553
68
--- /dev/null
69
+++ debian/python3-ldb.symbols.i386
70
@@ -0,0 +1,3 @@
71
+libpyldb-util.cpython-35m-i386-linux-gnu.so.1 python3-ldb #MINVER#
72
+ PYLDB_UTIL.CPYTHON_35M_I386_LINUX_GNU_1.5.5@PYLDB_UTIL.CPYTHON_35M_I386_LINUX_GNU_1.5.5 1.5.5
73
+#include "python3-ldb.symbols.common"
74
diff --git debian/python3-ldb.symbols.ppc64el debian/python3-ldb.symbols.ppc64el
75
new file mode 100644
76
index 0000000..6be9e03
77
--- /dev/null
78
+++ debian/python3-ldb.symbols.ppc64el
79
@@ -0,0 +1,3 @@
80
+libpyldb-util.cpython-37m-powerpc64le-linux-gnu.so.1 python3-ldb #MINVER#
81
+ PYLDB_UTIL.CPYTHON_37M_POWERPC64LE_LINUX_GNU_1.5.5@PYLDB_UTIL.CPYTHON_37M_POWERPC64LE_LINUX_GNU_1.5.5 1.5.5
82
+#include "python3-ldb.symbols.common"
83
diff --git debian/python3-ldb.symbols.s390x debian/python3-ldb.symbols.s390x
84
new file mode 100644
85
index 0000000..75c431b
86
--- /dev/null
87
+++ debian/python3-ldb.symbols.s390x
88
@@ -0,0 +1,3 @@
89
+libpyldb-util.cpython-37m-s390x-linux-gnu.so.1 python3-ldb #MINVER#
90
+ PYLDB_UTIL.CPYTHON_37M_S390X_LINUX_GNU_1.5.5@PYLDB_UTIL.CPYTHON_37M_S390X_LINUX_GNU_1.5.5 1.5.5
91
+#include "python3-ldb.symbols.common"
(-)a/ldb/27_python3.patch (+14 lines)
Line 0    Link Here 
1
commit c0ab892e42e6aeb676fca5e89b16f5be8a3e529a
2
Author: Florian Best <best@univention.de>
3
Date:   Mon Nov 25 20:07:42 2019 +0100
4
5
    Fix python installation files
6
7
diff --git debian/python-ldb.install debian/python-ldb.install
8
index d6f9c1b..7ad4b68 100644
9
--- debian/python-ldb.install
10
+++ debian/python-ldb.install
11
@@ -1,2 +1,2 @@
12
 usr/lib/*/libpyldb-util.so.*
13
-usr/lib/python*
14
+usr/lib/python2*
(-)a/ldb/28_python3.patch (-1 / +65 lines)
Line 0    Link Here 
0
- 
1
commit 3dd07a1d219e34e183db3dfc85baf6bc939bf96d
2
Author: Timo Aaltonen <tjaalton@debian.org>
3
Date:   Wed Aug 14 11:40:36 2019 +0300
4
5
    d/rules: use Makefile targets instead of direct WAF calls
6
7
diff --git debian/rules debian/rules
8
index 6291cf8..582a5aa 100755
9
--- debian/rules
10
+++ debian/rules
11
@@ -20,10 +20,6 @@ LDFLAGS += -Wl,--as-needed
12
 
13
 DESTDIR=$(CURDIR)/debian/tmp
14
 
15
-export PYTHON=$(shell which python3)
16
-export PYTHON_CONFIG="$(PYTHON)-config"
17
-export WAF=$(PYTHON) ./buildtools/bin/waf
18
-
19
 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
20
 DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
21
 
22
@@ -31,8 +27,8 @@ DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
23
 	dh $* --with python2,python3
24
 
25
 override_dh_auto_configure:
26
-	PYTHON="" PYTHON_CONFIG="$(PYTHON_CONFIG)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
27
-		$(WAF) configure --prefix=/usr --disable-rpath-install \
28
+	CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" CPPFLAGS="$(CPPFLAGS)" \
29
+		./configure --prefix=/usr --disable-rpath-install \
30
 		--builtin-libraries=ccan,replace,tdb_compat \
31
 		--bundled-libraries=NONE,pytevent \
32
 		--minimum-library-version="$(shell ./debian/autodeps.py --minimum-library-version)" \
33
@@ -44,7 +40,7 @@ get-packaged-orig-source:
34
 	./debian/build-orig.sh
35
 
36
 override_dh_auto_clean:
37
-	-$(WAF) clean
38
+	[ ! -f Makefile ] || $(MAKE) distclean
39
 	# Waf should be doing this; see
40
 	# https://bugzilla.samba.org/show_bug.cgi?id=8854
41
 	rm -f .lock-wscript
42
@@ -53,12 +49,12 @@ override_dh_auto_clean:
43
 	find . -name __pycache__ -o -name "*.pyc" -exec rm -rf {} \;
44
 
45
 override_dh_auto_build:
46
-	$(WAF) build
47
+	$(MAKE) all
48
 
49
 override_dh_auto_test:
50
 ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS)))
51
 ifeq ($(DEB_HOST_ARCH_CPU), amd64)
52
-	$(WAF) test
53
+	#$(MAKE) test
54
 endif
55
 endif
56
 
57
@@ -70,7 +66,7 @@ override_dh_install:
58
 		dh_install
59
 
60
 override_dh_auto_install:
61
-	DESTDIR=$(DESTDIR) $(WAF) install
62
+	DESTDIR=$(DESTDIR) $(MAKE) install
63
 	rm $(DESTDIR)/usr/lib/python*/dist-packages/_tevent*.so
64
 	rm $(DESTDIR)/usr/lib/python*/dist-packages/tevent.py
65
 	ar cr libldb.a bin/default/common/*.o

Return to bug 49720