Accepting request 791204 from security:SELinux

OBS-URL: https://build.opensuse.org/request/show/791204
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/setools?expand=0&rev=34
This commit is contained in:
Dominique Leuenberger 2020-04-05 18:49:56 +00:00 committed by Git OBS Bridge
commit 1389b93696
5 changed files with 32 additions and 79 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:826ab1974579357c8ec7c01aa0a2997b46beb85b8ad915898273c9619cd27a80
size 364717

View File

@ -1,67 +0,0 @@
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,6 @@ import os
import shutil
from os.path import join
from itertools import chain
-from contextlib import suppress
from Cython.Build import cythonize
@@ -48,12 +47,16 @@ class CleanCommand(clean):
dirs_to_remove.append(join(root, d))
for file in files_to_remove:
- with suppress(Exception):
+ try:
os.unlink(file)
+ except Exception:
+ pass
for dir_ in dirs_to_remove:
- with suppress(Exception):
+ try:
shutil.rmtree(dir_, ignore_errors=True)
+ except Exception:
+ pass
clean.run(self)
@@ -81,12 +84,14 @@ class QtHelpCommand(Command):
lib_dirs = ['.', '/usr/lib64', '/usr/lib', '/usr/local/lib']
include_dirs = []
-with suppress(KeyError):
+try:
userspace_src = os.environ["USERSPACE_SRC"]
include_dirs.insert(0, userspace_src + "/libsepol/include")
include_dirs.insert(1, userspace_src + "/libselinux/include")
lib_dirs.insert(0, userspace_src + "/libsepol/src")
lib_dirs.insert(1, userspace_src + "/libselinux/src")
+except KeyError:
+ pass
if sys.platform.startswith('darwin'):
macros=[('DARWIN',1)]
@@ -100,12 +105,19 @@ if enable_coverage:
cython_annotate = bool(os.environ.get("SETOOLS_ANNOTATE", False))
+linked_libraries = ['selinux', 'sepol']
+py_ver = sys.version_info[:2]
+if py_ver >= (3, 8):
+ linked_libraries.append('python{:d}.{:d}{}'.format(py_ver[0],
+ py_ver[1],
+ sys.abiflags))
+
ext_py_mods = [Extension('setools.policyrep', ['setools/policyrep.pyx'],
include_dirs=include_dirs,
- libraries=['selinux', 'sepol'],
+ libraries=linked_libraries,
library_dirs=lib_dirs,
define_macros=macros,
- extra_compile_args=['-Werror', '-Wextra',
+ extra_compile_args=['-Wextra',
'-Waggregate-return',
'-Wfloat-equal',
'-Wformat', '-Wformat=2',

3
setools-4.3.0.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:315df3ae0eb29b399123c5e3330480c5d1c0da038671c9fd62a439c49a6f9105
size 249694

View File

@ -1,3 +1,21 @@
-------------------------------------------------------------------
Fri Apr 3 08:45:25 UTC 2020 - Johannes Segitz <jsegitz@suse.de>
- Update to the upstream version 4.3.0:
* Revised sediff method for TE rules. This drastically reduced memory
and run time.
* Added infiniband context support to seinfo, sediff, and apol.
* Added apol configuration for location of Qt assistant.
* Fixed sediff issue where properties header would display when not
requested.
* Fixed sediff issue with type_transition file name comparison.
* Fixed permission map socket sendto information flow direction.
* Added methods to TypeAttribute class to make it a complete Python
collection.
* Genfscon now will look up classes rather than using fixed values
which were dropped from libsepol
- Dropped python3.8-compat.patch
-------------------------------------------------------------------
Thu Oct 31 12:02:30 CET 2019 - Matej Cepl <mcepl@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package setools
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -22,16 +22,13 @@
%define skip_python2 1
Name: setools
Version: 4.2.2
Version: 4.3.0
Release: 0
Url: https://github.com/SELinuxProject/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/SELinuxProject/setools/archive/%{version}.tar.gz
# PATCH-FIX-UPSTREAM python3.8-compat.patch mcepl@suse.com
# allow build with Python 3.8
Patch0: python3.8-compat.patch
Source: https://github.com/SELinuxProject/setools/releases/download/%{version}/setools-%{version}.tar.bz2
BuildRequires: %{python_module Cython}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
@ -101,8 +98,7 @@ This package includes the following graphical tools:
apol policy analysis tool
%prep
%setup -q -n %{name}-%{version}
%autopatch -p1
%setup -q -n %{name}
%build
%python_build
@ -129,6 +125,12 @@ This package includes the following graphical tools:
%{_mandir}/man1/sediff.1.gz
%{_mandir}/man1/seinfo.1.gz
%{_mandir}/man1/sesearch.1.gz
%{_mandir}/ru/man1/apol.1.gz
%{_mandir}/ru/man1/sediff.1.gz
%{_mandir}/ru/man1/sedta.1.gz
%{_mandir}/ru/man1/seinfo.1.gz
%{_mandir}/ru/man1/seinfoflow.1.gz
%{_mandir}/ru/man1/sesearch.1.gz
%files gui
%defattr(-,root,root,-)