[root@localhost ~]# rpm -q selinux-policy-devel selinux-policy-devel-2.4.6-106.el5_1.3 [root@localhost ~]# /usr/share/selinux/devel/policygentool Traceback (most recent call last): File "/usr/share/selinux/devel/policygentool", line 25, in ? import polgen ImportError: No module named polgen [root@localhost ~]# The version from 5.0 did work, this seems to be a regression/rebase problem. [root@localhost ~]# scp athienem@porkchop:/mnt/redhat/released/RHEL-5-Server/GOLD/i386/os/Server/selinux-policy-devel-2.4.6-30.el5.noarch.rpm . [root@localhost ~]# cd /tmp [root@localhost tmp]# rpm2cpio < /root/selinux-policy-devel-2.4.6-30.el5.noarch.rpm | cpio -id 4730 blocks [root@localhost tmp]# cd usr/share/selinux/devel [root@localhost devel]# ls example.fc example.if example.te include Makefile policygentool policyhelp [root@localhost devel]# ./policygentool ./policygentool ModuleName Executable [root@localhost devel]#
A short patch fixing the initial problems: --- policygentool.orig 2008-02-04 12:14:18.000000000 +0100 +++ policygentool 2008-02-04 12:21:13.000000000 +0100 @@ -21,8 +21,10 @@ # # import os, sys, getopt +sys.path.append('/usr/share/system-config-selinux/'); import re import polgen +import polgengui def errorExit(error): sys.stderr.write("%s: " % sys.argv[0]) sys.stderr.write("%s\n" % error) @@ -73,8 +75,8 @@ 4 User Application """ input = sys.stdin.readline().rstrip() - if input > "0" and input < 5: - type = int(type) + if input > "0" and input < "5": + type = int(input) break print 'If the module uses pidfiles, what is the pidfile called?' It's not enough though, the script fails with the gen_policy call. Traceback (most recent call last): File "./policygentool", line 111, in ? gen_policy( NameError: name 'gen_policy' is not defined
If you just remove the polgen line, does it work?
Reverting back to previous version selinux-policy-2.4.6-119
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
This bugzilla has Keywords: Regression. Since no regressions are allowed between releases, it is also being proposed as a blocker for this release. Please resolve ASAP.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on the solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2008-0465.html