Update to upstream

2.1.2 2011-08-17
	* print error debug info for buggy fc
	* introduce semanage_set_root and friends
	* throw exceptions in python rather than return
	* python3 support.
	* patch for MCS/MLS in user files
This commit is contained in:
Dan Walsh 2011-08-22 10:55:59 -04:00
parent 5e780f2aa2
commit f6b3fbbaf6
1 changed files with 5 additions and 33 deletions

View File

@ -93,18 +93,10 @@ SELinux management applications.
# a specific runtime:
BuildPythonWrapper() {
BinaryName=$1
Prefix=$2
PyDsoSuffix=$3
PyIncludeFlags=$4
PyLdFlags=$5
# Perform the build from the upstream Makefile:
make \
PYTHON=$BinaryName \
PYPREFIX=$Prefix \
PY_DSO_SUFFIX=$PyDsoSuffix \
PY_INCLUDE_FLAGS="$PyIncludeFlags" \
PY_LD_FLAGS="$PyLdFlags" \
CFLAGS="%{optflags}" LIBDIR="%{_libdir}" SHLIBDIR="%{_lib}" \
pywrap
}
@ -114,33 +106,19 @@ make CFLAGS="%{optflags}" swigify
make CFLAGS="%{optflags}" LIBDIR="%{_libdir}" SHLIBDIR="%{_lib}" all
BuildPythonWrapper \
%{__python} \
python2 \
.so \
"$(python-config --includes)" \
"$(python-config --libs)"
%{__python}
%if 0%{?with_python3}
BuildPythonWrapper \
%{__python3} \
python3 \
$(python3-config --extension-suffix) \
"$(python3-config --includes)" \
"$(python3-config --libs)"
%{__python3}
%endif # with_python3
%install
InstallPythonWrapper() {
BinaryName=$1
Prefix=$2
PyDsoSuffix=$3
PyIncludeFlags=$4
PyLdFlags=$5
make \
PYTHON=$BinaryName \
PYPREFIX=$Prefix \
PY_DSO_SUFFIX=$PyDsoSuffix PY_INCLUDE_FLAGS=$PyIncludeFlags \
DESTDIR="${RPM_BUILD_ROOT}" LIBDIR="${RPM_BUILD_ROOT}%{_libdir}" SHLIBDIR="${RPM_BUILD_ROOT}/%{_libdir}" \
install-pywrap
}
@ -152,18 +130,12 @@ make DESTDIR="${RPM_BUILD_ROOT}" LIBDIR="${RPM_BUILD_ROOT}%{_libdir}" SHLIBDIR="
InstallPythonWrapper \
%{__python} \
python2 \
.so \
"$(python-config --includes)" \
"$(python-config --libs)"
.so
%if 0%{?with_python3}
InstallPythonWrapper \
%{__python3} \
python3 \
$(python3-config --extension-suffix) \
"$(python3-config --includes)" \
"$(python3-config --libs)"
$(python3-config --extension-suffix)
%endif # with_python3
cp %{SOURCE1} ${RPM_BUILD_ROOT}/etc/selinux/semanage.conf
@ -201,7 +173,7 @@ rm -rf ${RPM_BUILD_ROOT}
%if 0%{?with_python3}
%files python3
%defattr(-,root,root)
%{python3_sitearch}/_semanage.cpython-3?mu.so
%{python3_sitearch}/*.so
%{python3_sitearch}/semanage.py*
%{python3_sitearch}/__pycache__/semanage*
%endif # if with_python3