mirror of
https://github.com/SELinuxProject/selinux
synced 2025-01-12 16:39:26 +00:00
41764b73a7
flake8 is a Python linter which is able to detect issues in Python code (syntax errors, undefined variables, etc.). It has been used to find bugs in the project. In order to prevent the introduction of new bugs which can be detected by it, add a script which runs it and use it in Travis-CI. flake8 can be used to detect code which is not written according to PEP8 style guide (which forbids whitespaces in some places, enforces the use of space-indenting, specifies how many blank lines are used between functions, etc.). As SELinux code does not follow this style guide, scripts/run-flake8 disables many warnings related to this when running the linter. In order to silence flake8 warnings, the Python code can also be modified. However fixing every "do not use bare 'except'" in the project needs to be done carefully and takes much time. This is why the warnings which are disabled have been ordered in three lists: * The warnings which can be activated in a not-so-distant future after the code has been modified. * The warnings related to PEP8 which cannot be activated without a major cleaning work of the codebase (for example to modify white spaces) * The warnings which are introduced by code generated by SWIG 3.0.12, which would require patches in SWIG in order to be activated (there is right now only one such warning). Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org> |
||
---|---|---|
checkpolicy | ||
dbus | ||
gui | ||
libselinux | ||
libsemanage | ||
libsepol | ||
mcstrans | ||
policycoreutils | ||
python | ||
restorecond | ||
sandbox | ||
scripts | ||
secilc | ||
semodule-utils | ||
.gitignore | ||
.travis.yml | ||
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 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. To install libsepol on macOS (mainly for policy analysis): cd libsepol; make PREFIX=/usr/local install This requires GNU coreutils (brew install coreutils).