Python module packaged in very non-standard way

Bug #800647 reported by Colin Watson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ecryptfs-utils (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Here's the policy document for Python modules:

  http://www.debian.org/doc/packaging-manuals/python-policy/ch-module_packages.html

The ecryptfs module is strange in many ways:

 * It is not in a package named python-*
 * It does not use *any* of the available Python packaging helpers (the one to use nowadays would be dh_python2)
 * While the .pyc file is removed from the package, the .pyo file is not, and furthermore because the package isn't using any of the helpers it doesn't arrange for the module to be byte-compiled on installation or when the default Python version is changed
 * It is only built for the current Python version, rather than for all supported Python versions
 * The module is installed to /usr/lib/python2.7/dist-packages/ecryptfs-utils/libecryptfs.py; since you can't have a dash in a Python module name (http://docs.python.org/reference/simple_stmts.html#the-import-statement), this means that importing the module requires modifying sys.path in awkward ways

I noticed this because I'm working on removing .pyc files from the live filesystem and recreating them at installation time, and this package showed up as a discrepancy because it was a rare case where the .pyc file was missing from the live filesystem but reappeared after my installer modifications. I'm not going to let this block my work, but it clearly ought to be fixed.

The last issue in particular makes me wonder whether anyone is actually using this module. Do you know? Perhaps it would be acceptable to move it to a python-ecryptfs package without requiring any particular transition mechanism?

Related branches

Revision history for this message
Colin Watson (cjwatson) wrote :

Incidentally, I would be happy to provide a patch to fix most of these issues, but I'd need guidance on what you want to do about the package naming (move to python-libecryptfs without a transition?) and the anomalous ecryptfs-utils/libecryptfs.py installation location (what should people have to type after 'import'?).

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Thanks, Colin.

I don't remember doing this packaging myself, and I can't say that I've ever used the python bindings either. I believe that these are vestigial remnants of some key escrow service work Michael Halcrow had started.

python-libecryptfs is perfectly fine by me. We can drop the "-utils" from the path, so just ecryptfs/libecryptfs.

I don't know of a single person using this module. I don't think a transition is required.

If you could propose a merge to lp:ecryptfs, that would be ideal. Thanks.

Changed in ecryptfs-utils (Ubuntu):
status: New → Triaged
importance: Undecided → High
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

This was fixed in ecryptfs-utils-95. Thanks.

Changed in ecryptfs-utils (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Lee Griffiths (poddster) wrote :

The python file is still installed into a path that can't be imported by Python.

As seen here http://packages.ubuntu.com/xenial/i386/python-ecryptfs/filelist, it's installed to

    /usr/lib/python2.7/dist-packages/ecryptfs-utils/libecryptfs.py

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.