Debian Bug report logs - #372543
ImportError: No module named semanage

version graph

Package: policycoreutils; Maintainer for policycoreutils is Debian SELinux maintainers <>; Source for policycoreutils is src:policycoreutils.

Reported by: Uwe Hermann <>

Date: Sat, 10 Jun 2006 00:48:12 UTC

Severity: important

Found in version policycoreutils/1.30-2

Fixed in version policycoreutils/1.30.25-1

Done: Manoj Srivastava <>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox

Report forwarded to,, Manoj Srivastava <>:
Bug#372543; Package policycoreutils. Full text and rfc822 format available.

Acknowledgement sent to Uwe Hermann <>:
New Bug report received and forwarded. Copy sent to, Manoj Srivastava <>. Full text and rfc822 format available.

Message #5 received at (full text, mbox):

From: Uwe Hermann <>
To: Debian Bug Tracking System <>
Subject: ImportError: No module named semanage
Date: Sat, 10 Jun 2006 02:32:17 +0200
[Message part 1 (text/plain, inline)]
Package: policycoreutils
Version: 1.30-2
Severity: important


after some changes in /etc/selinux/src, and then running "make load",
I see the following error:

Traceback (most recent call last):
  File "/usr/sbin/genhomedircon", line 28, in ?
    from semanage import *;
ImportError: No module named semanage

A quick check reveals that /usr/bin/python points to python2.3 on my
system (fresh sarge install, dist-upgraded to unstable). However,
python2.4-semanage obviously only contains the Python 2.4 version
of /usr/lib/python2.4/site-packages/
As /usr/sbin/genhomedircon starts with "#! /usr/bin/python" (which means
Python 2.3), it cannot find the semanage module.

I'm not sure what the correct fix is; maybe change /usr/sbin/genhomedircon
to start with "#! /usr/bin/python2.4"? I don't think you could/should
force SELinux users to switch to a specific default Python version (?)
Or provide a 2.3 _and_ a 2.4 version of the semanage Python lib?

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages policycoreutils depends on:
ii  libc6                         2.3.6-13   GNU C Library: Shared libraries
ii  libpam0g                      0.79-3.1   Pluggable Authentication Modules l
ii  libselinux1                   1.30-1     SELinux shared libraries
ii  libsemanage1                  1.6-1      shared libraries used by SELinux p
ii  libsepol1                     1.12-1     Security Enhanced Linux policy lib
ii  python2.4                     2.4.3-3    An interactive high-level object-o
ii  python2.4-selinux             1.30-1     Python2.4 bindings to SELinux shar
ii  python2.4-semanage            1.6-1      Python2.4 bindings  for SELinux po

policycoreutils recommends no packages.

-- no debconf information

HTH, Uwe.
Uwe Hermann  | |
[signature.asc (application/pgp-signature, inline)]

Reply sent to Manoj Srivastava <>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Uwe Hermann <>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #10 received at (full text, mbox):

From: Manoj Srivastava <>
Subject: Bug#372543: fixed in policycoreutils 1.30.25-1
Date: Sat, 12 Aug 2006 22:19:34 -0700
Source: policycoreutils
Source-Version: 1.30.25-1

We believe that the bug you reported is fixed in the latest version of
policycoreutils, which is due to be installed in the Debian FTP archive:

  to pool/main/p/policycoreutils/policycoreutils_1.30.25-1.diff.gz
  to pool/main/p/policycoreutils/policycoreutils_1.30.25-1.dsc
  to pool/main/p/policycoreutils/policycoreutils_1.30.25-1_i386.deb
  to pool/main/p/policycoreutils/policycoreutils_1.30.25.orig.tar.gz

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Manoj Srivastava <> (supplier of updated policycoreutils package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing

Hash: SHA1

Format: 1.7
Date: Sat, 12 Aug 2006 23:52:53 -0500
Source: policycoreutils
Binary: policycoreutils
Architecture: source i386
Version: 1.30.25-1
Distribution: unstable
Urgency: low
Maintainer: Manoj Srivastava <>
Changed-By: Manoj Srivastava <>
 policycoreutils - SELinux core policy utilities
Closes: 369852 372543
 policycoreutils (1.30.25-1) unstable; urgency=low
   * New upstream point release.
     * Merged patch from Dan Walsh with:
       * audit2allow: process MAC_POLICY_LOAD events
       * newrole:  run shell with - prefix to start a login shell
       * po:  po file updates
       * restorecond:  bail if SELinux not enabled
       * fixfiles: omit -q
       * genhomedircon:  fix exit code if non-root
       * semodule_deps:  install man page
     * Merged secon Makefile fix from Joshua Brindle.
     * Merged netfilter contexts support patch from Chris PeBenito.
     * Merged restorecond size_t fix from Joshua Brindle.
     * Merged secon keycreate patch from Michael LeMay.
     * Merged restorecond fixes from Dan Walsh.
       Merged updated po files from Dan Walsh.
     * Merged python gettext patch from Stephen Bennett.
     * Merged semodule_deps from Karl MacMillan.
     * Lindent.
     * Merged patch from Dan Walsh with:
       * -p option (progress) for setfiles and restorecon.
       * disable context translation for setfiles and restorecon.
       * on/off values for setsebool.
     * Merged setfiles and semodule_link fixes from Joshua Brindle.
     * Merged fix for setsebool error path from Serge Hallyn.
     * Merged patch from Dan Walsh with:
     *    Updated po files.
     *    Fixes for genhomedircon and seobject.
     *    Audit message for mass relabel by setfiles.
     * Updated fixfiles script for new setfiles location in /sbin.
     * Merged more translations from Dan Walsh.
     * Merged patch to relocate setfiles to /sbin for early relabel
       when /usr might not be mounted from Dan Walsh.
     * Merged semanage/seobject patch to preserve fcontext ordering in list.
     * Merged secon patch from James Antill.
     * Merged patch with updates to audit2allow, secon, genhomedircon,
       and semanage from Dan Walsh.
     * Fixed audit2allow and po Makefiles for DESTDIR= builds.
     * Merged .po file patch from Dan Walsh.
     * Merged bug fix for genhomedircon.
     * Merged patch from Dan Walsh.
       This includes audit2allow changes for analysis plugins,
       internationalization support for several additional programs
       and added po files, some fixes for semanage, and several cleanups.
       It also adds a new secon utility.
     * Merged fix warnings patch from Karl MacMillan.
     * Merged semanage prefix support from Russell Coker.
     * Added a test to setfiles to check that the spec file is
       a regular file.
     * Merged audit2allow fixes for refpolicy from Dan Walsh.
     * Merged fixfiles patch from Dan Walsh.
     * Merged restorecond daemon from Dan Walsh.
     * Merged semanage non-MLS fixes from Chris PeBenito.
     * Merged semanage and semodule man page examples from Thomas Bleher.
     * Merged semanage labeling prefix patch from Ivan Gyurdiev.
   * Bug fix: "ImportError: No module named semanage", thanks to Uwe
     Hermann. Since the new semanage package has moved to the new Python
     policy, and we depend on it, this issue is resolved.  (Closes: #372543).
   * Bug fix: "policycoreutils: incorrect syntax in genhomedircon", thanks
     to Piotr Meyer. The new point release fixes this.     (Closes: #369852).
   * Remove support for restorecond, since we do not have support for
     inotify in glibc (glibc 2.4 is sitting in experimental)
 02def2d7f69ef8f3511e4b2bbd39a65d 702 utils optional policycoreutils_1.30.25-1.dsc
 bb916682b2c22502e82ba50e566657d4 222974 utils optional policycoreutils_1.30.25.orig.tar.gz
 8590e8e3b09b79f39b01d64ad2874483 51847 utils optional policycoreutils_1.30.25-1.diff.gz
 b5207d3a4ec899ebfe335750326434e7 335882 utils optional policycoreutils_1.30.25-1_i386.deb

Version: GnuPG v1.4.5 (GNU/Linux)


Bug archived. Request was from Debbugs Internal Request <> to (Mon, 25 Jun 2007 09:50:13 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.

Debian bug tracking system administrator <>. Last modified: Sat Apr 19 10:10:52 2014; Machine Name:

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.