diff --git a/0014-boolsub.patch b/0014-boolsub.patch new file mode 100644 index 0000000..2890628 --- /dev/null +++ b/0014-boolsub.patch @@ -0,0 +1,24 @@ +diff -up ./setools-3.3.7/secmds/seinfo.c~ ./setools-3.3.7/secmds/seinfo.c +--- ./setools-3.3.7/secmds/seinfo.c~ 2013-03-14 15:26:31.467121596 -0400 ++++ ./setools-3.3.7/secmds/seinfo.c 2013-03-14 15:35:20.154650517 -0400 +@@ -1705,7 +1705,7 @@ int main(int argc, char **argv) + case 'b': /* conditional booleans */ + bools = 1; + if (optarg != 0) +- bool_name = optarg; ++ bool_name = selinux_boolean_sub(optarg); + break; + case OPT_INITIALSID: + isids = 1; +diff -up ./setools-3.3.7/secmds/sesearch.c~ ./setools-3.3.7/secmds/sesearch.c +--- ./setools-3.3.7/secmds/sesearch.c~ 2013-03-14 15:26:31.539121944 -0400 ++++ ./setools-3.3.7/secmds/sesearch.c 2013-03-14 15:34:36.615445562 -0400 +@@ -1056,7 +1056,7 @@ int main(int argc, char **argv) + printf("Missing boolean for -b (--bool)\n"); + exit(1); + } +- cmd_opts.bool_name = strdup(optarg); ++ cmd_opts.bool_name = strdup(selinux_boolean_sub(optarg)); + if (!cmd_opts.bool_name) { + fprintf(stderr, "%s\n", strerror(errno)); + exit(1); diff --git a/setools.spec b/setools.spec index 8ee8d11..eb1b704 100644 --- a/setools.spec +++ b/setools.spec @@ -1,11 +1,9 @@ %define setools_maj_ver 3.3 %define setools_min_ver 7 -%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} Name: setools Version: %{setools_maj_ver}.%{setools_min_ver} -Release: 34%{?dist} +Release: 36%{?dist} License: GPLv2 URL: http://oss.tresys.com/projects/setools BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -25,6 +23,7 @@ Patch10: 0010-selinux_current_policy_path.patch Patch11: 0011-setools-noship.patch Patch12: 0012-seaudit.patch Patch13: 0013-swig.patch +Patch14: 0014-boolsub.patch Summary: Policy analysis tools for SELinux Group: System Environment/Base @@ -34,7 +33,6 @@ Requires: setools-libs = %{version}-%{release} setools-libs-tcl = %{version}-%{r %define autoconf_ver 2.59 %define bwidget_ver 1.8 %define gtk_ver 2.8 -%define python_ver 2.3 %define sepol_ver 2.1.8-5 %define selinux_ver 2.1.12-10 %define sqlite_ver 3.2.0 @@ -54,7 +52,7 @@ Summary: Policy analysis support libraries for SELinux Group: System Environment/Libraries Requires: libselinux >= %{selinux_ver} libsepol >= %{sepol_ver} sqlite >= %{sqlite_ver} Obsoletes: setools-libs-java -BuildRequires: flex bison pkgconfig +BuildRequires: flex bison pkgconfig bzip2-libs BuildRequires: glibc-devel libstdc++-devel gcc gcc-c++ BuildRequires: libselinux-devel >= %{selinux_ver} libsepol-devel >= %{sepol_ver} BuildRequires: libsepol-static >= %{sepol_ver} @@ -74,25 +72,6 @@ This package includes the following run-time libraries: libseaudit parse and filter SELinux audit messages in log files libsefs SELinux file contexts library -%package libs-python -License: LGPLv2 -Summary: Python bindings for SELinux policy analysis -Group: Development/Languages -Requires: setools-libs = %{version}-%{release} python2 >= %{python_ver} bzip2-libs -BuildRequires: python2-devel >= %{python_ver} swig >= %{swig_ver} bzip2-devel - -%description libs-python -SETools is a collection of graphical tools, command-line tools, and -libraries designed to facilitate SELinux policy analysis. - -This package includes Python bindings for the following libraries: - - libapol policy analysis library - libpoldiff semantic policy difference library - libqpol library that abstracts policy internals - libseaudit parse and filter SELinux audit messages in log files - libsefs SELinux file contexts library - %package libs-tcl License: LGPLv2 Summary: Tcl bindings for SELinux policy analysis @@ -167,8 +146,6 @@ This package includes the following graphical tools: seaudit audit log analysis tool %define setoolsdir %{_datadir}/setools-%{setools_maj_ver} -%define pkg_py_lib %{python_sitelib}/setools -%define pkg_py_arch %{python_sitearch}/setools %define tcllibdir %{_libdir}/setools %prep @@ -185,6 +162,7 @@ This package includes the following graphical tools: %patch11 -p 1 -b .noship %patch12 -p 1 -b .seaudit %patch13 -p 1 -b .swig +%patch14 -p 2 -b .boolsub %ifarch sparc sparcv9 sparc64 s390 s390x for file in `find . -name Makefile.am`; do sed -i -e 's:-fpic:-fPIC:' $file; @@ -199,9 +177,8 @@ autoreconf -if %build automake %configure --libdir=%{_libdir} --disable-bwidget-check --disable-selinux-check \ - --enable-swig-python --enable-swig-tcl + --enable-swig-tcl # work around issue with gcc 4.3 + gnu99 + swig-generated code: -sed -i -e 's:$(CC):gcc -std=gnu89:' libseaudit/swig/python/Makefile make %{?_smp_mflags} %install @@ -223,7 +200,6 @@ rm -f ${RPM_BUILD_ROOT}/%{_libdir}/*.a # ensure permissions are correct chmod 0755 ${RPM_BUILD_ROOT}/%{_libdir}/*.so.* chmod 0755 ${RPM_BUILD_ROOT}/%{_libdir}/%{name}/*/*.so.* -chmod 0755 ${RPM_BUILD_ROOT}/%{pkg_py_arch}/*.so.* chmod 0644 ${RPM_BUILD_ROOT}/%{tcllibdir}/*/pkgIndex.tcl %clean @@ -242,13 +218,6 @@ rm -rf ${RPM_BUILD_ROOT} %{_libdir}/libseaudit.so.* %dir %{setoolsdir} -%files libs-python -%defattr(-,root,root,-) -%{pkg_py_lib}/ -%ifarch x86_64 ppc64 sparc64 s390x -%{pkg_py_arch}/ -%endif - %files libs-tcl %defattr(-,root,root,-) %dir %{tcllibdir} @@ -310,6 +279,12 @@ rm -rf ${RPM_BUILD_ROOT} %postun libs-tcl -p /sbin/ldconfig %changelog +* Fri Mar 15 2013 Dan Walsh - 3.3.7-36 +- Drop support for python bindings + +* Thu Mar 14 2013 Dan Walsh - 3.3.7-35 +- Add support for substituting bools to sesearch and seinfo + * Wed Jan 30 2013 Dan Walsh - 3.3.7-34 - Rebuild using pristine source from Tresys