mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-12 00:55:03 +00:00
671f83b42b
get_rpm_nvr_list can fail to get the version of selinux-policy rpm package, which leads to error during spec file creation (attempt to invoke __getitem__ of "None" object). This patch sets the policy number to "0.0.0" in case rpm failed to get it. This change should be safe because it affects only an example of spec file. Variable "POLICYCOREUTILSVER" was removed (unused). fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1321499 Failed to retrieve rpm info for selinux-policy Traceback (most recent call last): File "/bin/selinux-polgengui", line 360, in forward self.generate_policy() File "/bin/selinux-polgengui", line 506, in generate_policy self.info(my_policy.generate(outputdir)) File "/usr/lib64/python2.7/site-packages/sepolicy/generate.py", line 1382, in generate out += "%s # %s\n" % (self.write_spec(out_dir), _("Spec file")) File "/usr/lib64/python2.7/site-packages/sepolicy/generate.py", line 1228, in write_spec fd.write(self.generate_spec()) File "/usr/lib64/python2.7/site-packages/sepolicy/generate.py", line 1190, in generate_spec selinux_policyver = get_rpm_nvr_list("selinux-policy")[1] TypeError: 'NoneType' object has no attribute '__getitem__' Signed-off-by: Vit Mojzis <vmojzis@redhat.com> |
||
---|---|---|
checkpolicy | ||
libselinux | ||
libsemanage | ||
libsepol | ||
policycoreutils | ||
scripts | ||
secilc | ||
sepolgen | ||
.gitignore | ||
Android.mk | ||
CleanSpec.mk | ||
Makefile | ||
README |
Please submit all bug reports and patches to selinux@tycho.nsa.gov. Subscribe via selinux-join@tycho.nsa.gov. Build dependencies on Fedora: yum install audit-libs-devel bison bzip2-devel dbus-devel dbus-glib-devel flex flex-devel flex-static glib2-devel libcap-devel libcap-ng-devel pam-devel pcre-devel python-devel setools-devel swig ustr-devel xmlto redhat-rpm-config To build and install everything under a private directory, run: make DESTDIR=~/obj install install-pywrap To install as the default system libraries and binaries (overwriting any previously installed ones - dangerous!), on x86_64, run: make LIBDIR=/usr/lib64 SHLIBDIR=/lib64 install install-pywrap relabel or on x86 (32-bit), run: make install install-pywrap relabel This may render your system unusable if the upstream SELinux userspace lacks library functions or other dependencies relied upon by your distribution. If it breaks, you get to keep both pieces.