From c3ca74230201b3f0a5b04a70272988c336923bb1b821d11416534d80d894a06a Mon Sep 17 00:00:00 2001 From: Johannes Segitz Date: Fri, 23 Nov 2018 15:27:19 +0000 Subject: [PATCH 1/3] OBS-URL: https://build.opensuse.org/package/show/security:SELinux/setools?expand=0&rev=63 --- 4.1.1.tar.gz | 3 --- 4.2.0.tar.gz | 3 +++ setools.changes | 8 +++++++ setools.spec | 61 ++++++++++++++++++++++++++----------------------- warning.patch | 13 ----------- 5 files changed, 44 insertions(+), 44 deletions(-) delete mode 100644 4.1.1.tar.gz create mode 100644 4.2.0.tar.gz delete mode 100644 warning.patch diff --git a/4.1.1.tar.gz b/4.1.1.tar.gz deleted file mode 100644 index 9a986be..0000000 --- a/4.1.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:46a927ea2b163cbe1d35cc35da43e45853e13720c7e02d4cf75a498783c19610 -size 461649 diff --git a/4.2.0.tar.gz b/4.2.0.tar.gz new file mode 100644 index 0000000..6eac53b --- /dev/null +++ b/4.2.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6a8893fbaf3bd79154b5e9677ae16cb20c02de8c52c95890a61cecb07daaa700 +size 363802 diff --git a/setools.changes b/setools.changes index f267623..7db2557 100644 --- a/setools.changes +++ b/setools.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Nov 21 14:17:32 UTC 2018 - jsegitz@suse.com + +- Upgrade to 4.2.0 +- Dropped warning.patch +- Single spec, limited to python3. Obsoletes python-setools, provides + python3-setools + ------------------------------------------------------------------- Mon Jun 11 08:14:26 UTC 2018 - jsegitz@suse.com diff --git a/setools.spec b/setools.spec index 4054c1d..4696961 100644 --- a/setools.spec +++ b/setools.spec @@ -16,24 +16,29 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} + +# doesn't work for python 2 +%define skip_python2 1 + Name: setools -Version: 4.1.1 +Version: 4.2.0 Release: 0 -Url: https://github.com/TresysTechnology/setools/ +Url: https://github.com/SELinuxProject/setools Summary: Policy analysis tools for SELinux License: GPL-2.0-only Group: System/Management -Source: https://github.com/TresysTechnology/setools/archive/%{version}.tar.gz -Patch0: warning.patch - -BuildRoot: %{_tmppath}/%{name}-%{version}-build +Source: https://github.com/SELinuxProject/setools/archive/%{version}.tar.gz +BuildRequires: %{python_module Cython} +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} BuildRequires: bison +BuildRequires: fdupes BuildRequires: flex BuildRequires: gcc +BuildRequires: libselinux-devel BuildRequires: libsepol-devel -BuildRequires: libsepol-devel-static -BuildRequires: python-devel -BuildRequires: python-setuptools +BuildRequires: python-rpm-macros BuildRequires: swig Requires: setools-console = %{version}-%{release} Requires: setools-gui = %{version}-%{release} @@ -45,16 +50,6 @@ libraries designed to facilitate SELinux policy analysis. This meta-package depends upon the main packages necessary to run SETools. -%package -n python-setools -Summary: Python bindings for SELinux policy analysis -License: LGPL-2.0-only -Group: Development/Languages/Python -Requires: python - -%description -n python-setools -SETools is a collection of graphical tools, command-line tools, and -libraries designed to facilitate SELinux policy analysis. - %package console Summary: Policy analysis command-line tools for SELinux License: GPL-2.0-only @@ -73,6 +68,17 @@ This package includes the following console tools: seinfoflow Information flow analysis tool sediff Semantic policy difference tool +%package -n python3-setools +Summary: Python bindings for SELinux policy analysis +License: LGPL-2.0-only +Group: Development/Languages/Python +Requires: python +Obsoletes: python-setools < %{version} + +%description -n python3-setools +SETools is a collection of graphical tools, command-line tools, and +libraries designed to facilitate SELinux policy analysis. + %package gui Summary: Policy analysis graphical tools for SELinux License: GPL-2.0-only @@ -92,19 +98,19 @@ This package includes the following graphical tools: %prep %setup -q -n %{name}-%{version} -%patch0 %build -python setup.py build_ext -i +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%fdupes -s %{buildroot}%{python3_sitearch} -%files -n python-setools +%files -n python3-setools %defattr(-,root,root,-) -%{python_sitearch}/setools*.egg-info -%dir %{python_sitearch}/setools -%{python_sitearch}/setools/* +%dir %{python3_sitearch}/setools/ +%{python3_sitearch}/setools/* +%{python3_sitearch}/setools*egg-info* %files console %defattr(-,root,root,-) @@ -121,8 +127,7 @@ python setup.py install --prefix=%{_prefix} --root=%{buildroot} %files gui %defattr(-,root,root,-) -%dir %{python_sitearch}/setoolsgui -%{python_sitearch}/setoolsgui/* +%{python3_sitearch}/setoolsgui* %{_bindir}/apol %{_mandir}/man1/apol.1.gz diff --git a/warning.patch b/warning.patch deleted file mode 100644 index 94921c0..0000000 --- a/warning.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: setup.py -=================================================================== ---- setup.py.orig -+++ setup.py -@@ -146,7 +146,7 @@ ext_py_mods = [Extension('setools.policy - 'libqpol/policy_scan.c', - 'libqpol/xen_query.c'], - include_dirs=include_dirs, -- extra_compile_args=['-Werror', '-Wextra', -+ extra_compile_args=['-Wextra', - '-Waggregate-return', - '-Wfloat-equal', - '-Wformat', '-Wformat=2', From 4d58a6f9180ebc4f0fa3849496cb61af56de159773a9ba42773bfaa54aeec164 Mon Sep 17 00:00:00 2001 From: Johannes Segitz Date: Thu, 6 Dec 2018 14:43:39 +0000 Subject: [PATCH 2/3] OBS-URL: https://build.opensuse.org/package/show/security:SELinux/setools?expand=0&rev=64 --- setools.changes | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/setools.changes b/setools.changes index 7db2557..d2b26d7 100644 --- a/setools.changes +++ b/setools.changes @@ -2,6 +2,12 @@ Wed Nov 21 14:17:32 UTC 2018 - jsegitz@suse.com - Upgrade to 4.2.0 + * Support for Python 2.7 was dropped + * Symbol names are now available as the name attribute (e.g. Boolean.name, Type.name, etc.) + * Move constraint expression to its own class. + * Made Conditional.evaluate() more useful and added BaseTERule.enabled() method to determine if a rule is enabled.. + * Added support for SCTP portcons + * Updated permission maps - Dropped warning.patch - Single spec, limited to python3. Obsoletes python-setools, provides python3-setools From 77000e5e1d6b263f38a3c5c2a3f6a40b1498bdecd440af34779b137efadf0d05 Mon Sep 17 00:00:00 2001 From: Johannes Segitz Date: Wed, 12 Dec 2018 09:16:42 +0000 Subject: [PATCH 3/3] Accepting request 657418 from home:jsegitz:branches:security:SELinux - Changed requires of console subpackage to python3-setools OBS-URL: https://build.opensuse.org/request/show/657418 OBS-URL: https://build.opensuse.org/package/show/security:SELinux/setools?expand=0&rev=65 --- setools.changes | 5 +++++ setools.spec | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/setools.changes b/setools.changes index d2b26d7..f2feab2 100644 --- a/setools.changes +++ b/setools.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Dec 7 15:10:14 UTC 2018 - jsegitz@suse.com + +- Changed requires of console subpackage to python3-setools + ------------------------------------------------------------------- Wed Nov 21 14:17:32 UTC 2018 - jsegitz@suse.com diff --git a/setools.spec b/setools.spec index 4696961..b96e33a 100644 --- a/setools.spec +++ b/setools.spec @@ -54,7 +54,7 @@ SETools. Summary: Policy analysis command-line tools for SELinux License: GPL-2.0-only Group: System/Base -Requires: python-setools = %{version} +Requires: python3-setools = %{version} %description console SETools is a collection of graphical tools, command-line tools, and