Package: release.debian.org Severity: normal Tags: buster User: release.debian....@packages.debian.org Usertags: pu
Hi release team, I would like to update orocos-kdl in buster to fix #956254 (PyKDL crashes Python 3 interpreter). The bug shows a simple way to reproduce the issue and the patch was taken from the upstream git. The diff to the package is attached. Cheers Jochen -- System Information: Debian Release: bullseye/sid APT prefers buildd-unstable APT policy: (500, 'buildd-unstable'), (500, 'unstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.5.0-1-amd64 (SMP w/8 CPU cores) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), LANGUAGE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
diff --git a/debian/changelog b/debian/changelog index 451fd76..9dc72bf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +orocos-kdl (1.4.0-7+deb10u1) buster; urgency=medium + + * Add patch for python3 std string conversion (Closes: #956254) + + -- Jochen Sprickerhof <jspri...@debian.org> Thu, 09 Apr 2020 18:46:55 +0200 + orocos-kdl (1.4.0-7) unstable; urgency=medium * Add missing dependency (Closes: #913803) diff --git a/debian/patches/0005-Fixed-python3-std-string-conversion-issue.patch b/debian/patches/0005-Fixed-python3-std-string-conversion-issue.patch new file mode 100644 index 0000000..fd138cf --- /dev/null +++ b/debian/patches/0005-Fixed-python3-std-string-conversion-issue.patch @@ -0,0 +1,35 @@ +From: Zihan Chen <zihan.chen....@gmail.com> +Date: Mon, 14 May 2018 11:54:04 -0700 +Subject: Fixed python3 std string conversion issue + +--- + python_orocos_kdl/PyKDL/std_string.sip | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +diff --git a/python_orocos_kdl/PyKDL/std_string.sip b/python_orocos_kdl/PyKDL/std_string.sip +index e31324a..a399c9b 100644 +--- a/python_orocos_kdl/PyKDL/std_string.sip ++++ b/python_orocos_kdl/PyKDL/std_string.sip +@@ -47,17 +47,16 @@ + *sipCppPtr = new std::string; + return 1; + } +- if (PyUnicode_Check(sipPy)) { +- PyObject* s = PyUnicode_AsEncodedString(sipPy, "UTF-8", ""); +- *sipCppPtr = new std::string(PyUnicode_AS_DATA(s)); +- Py_DECREF(s); +- return 1; +- } + #if PY_MAJOR_VERSION < 3 + if (PyString_Check(sipPy)) { + *sipCppPtr = new std::string(PyString_AS_STRING(sipPy)); + return 1; + } ++#else ++ if (PyUnicode_Check(sipPy)) { ++ *sipCppPtr = new std::string(PyUnicode_AsUTF8(sipPy)); ++ return 1; ++ } + #endif + + return 0; diff --git a/debian/patches/series b/debian/patches/series index dbffb60..da119f6 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ 0001-Added-CMakeLists-to-build-the-package.patch 0002-Support-in-tree-compilation.patch 0003-Don-t-install-OrocosKDLTargets.patch +0005-Fixed-python3-std-string-conversion-issue.patch