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

View File

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