[Pkg-libvirt-maintainers] Bug#646383: hivex: implicit pointer conversion

Colin Watson cjwatson at ubuntu.com
Wed Nov 16 11:16:14 UTC 2011


On Sun, Oct 23, 2011 at 07:59:25PM +0200, Julian Taylor wrote:
> When building hivex one gets these types of warnings:
> ../../../python/hivex-py.c:810:3: warning: implicit declaration of
> function 'Py_InitModule' [-Wimplicit-function-declaration]
> 
> This issue should be fixed as it is an potential bug.
> 
> from http://wiki.debian.org/ImplicitPointerConversions:
> "Sometimes this doesn't cause a problem - for example, if the first 32
> bits of the pointer are 0s then the truncation won't actually break
> anything. This is often the case on some architectures, e.g. amd64. This
> will never be the case for other architectures, e.g. ia64, which will
> always break (segfault) if the pointer is dereferenced."
> 
> Also it causes the build to fail in ubuntu (see the very end of the log):
> https://launchpadlibrarian.net/83036225/buildlog_ubuntu-precise-amd64.hivex_1.3.1-1_FAILEDTOBUILD.txt.gz

These are while building the extension for Python 3.  The presence of
things like PyString_AsString are a good sign that this extension hasn't
actually been ported to Python 3 upstream; that symbol is simply absent
from Python 3.  Shipping this extension is useless as it will very
likely just segfault.  For that matter, the module can't even be
imported:

  $ python3
  Python 3.2.2 (default, Sep  5 2011, 22:09:30)
  [GCC 4.6.1] on linux2
  Type "help", "copyright", "credits" or "license" for more information.
  >>> import hivex
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "/usr/lib/python3/dist-packages/hivex.py", line 35
      """
        ^
  SyntaxError: invalid syntax

Furthermore, even if this did work, it isn't packaged in a
policy-compliant way.
http://www.debian.org/doc/packaging-manuals/python-policy/ch-module_packages.html
says "Python 3 modules must be in a separate binary package prefixed
with python3- to preserve run time separation between python and
python3".

Please apply this patch to remove the useless Python 3 build until such
time as it actually works.

  * Drop Python 3 support for now; it doesn't look like it's actually been
    ported (e.g. relies on PyString_AsString), and the packaging does not
    conform to Debian policy for Python 3 modules.

diff -Nru hivex-1.3.2/debian/control hivex-1.3.2/debian/control
--- hivex-1.3.2/debian/control	2011-10-25 23:16:30.000000000 +0100
+++ hivex-1.3.2/debian/control	2011-11-16 11:12:29.000000000 +0000
@@ -10,7 +10,7 @@
  libreadline-dev,
  libio-stringy-perl,
  ocaml-findlib, dh-ocaml (>= 0.9~), ocaml-nox (>= 3.11.1-3~),
- python-all-dev, python3-all-dev
+ python-all-dev
 Standards-Version: 3.9.2
 Homepage: http://libguestfs.org/
 Vcs-Git: git://git.debian.org/git/pkg-libvirt/hivex.git
diff -Nru hivex-1.3.2/debian/rules hivex-1.3.2/debian/rules
--- hivex-1.3.2/debian/rules	2011-10-25 23:16:30.000000000 +0100
+++ hivex-1.3.2/debian/rules	2011-11-16 11:04:07.000000000 +0000
@@ -9,13 +9,13 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-PYTHONS        := $(shell pyversions --installed; py3versions --installed)
+PYTHONS        := $(shell pyversions --installed)
 PYTHON_DEFAULT := $(shell pyversions --default)
 
 %:
 	dh \
 		--without python-support \
-		--with autotools-dev,ocaml,python2,python3 $@
+		--with autotools-dev,ocaml,python2 $@
 
 override_dh_auto_configure:
 	set -e; for p in $(PYTHONS); do \

-- 
Colin Watson                                       [cjwatson at ubuntu.com]





More information about the Pkg-libvirt-maintainers mailing list