Accepting request 744477 from home:mcepl:branches:security:SELinux
- Add python3.8-compat.patch to allow build with Python 3.8 Still doesn't work perfectly because of gh#SELinuxProject/setools#31 (I had to remove -Werror) - Update to the upstream version 4.2.2: - Remove source policy references from man pages, as loading source policies is no longer supported. - Fixed a performance regression in alias loading after alias dereferencing fixes in 4.2.1. OBS-URL: https://build.opensuse.org/request/show/744477 OBS-URL: https://build.opensuse.org/package/show/security:SELinux/setools?expand=0&rev=69
This commit is contained in:
parent
e04835ddc2
commit
05e359c230
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:da08f9b044d0054acfec8e0c450430f4757ba1843d858ddfd71b756c92db47df
|
||||
size 365096
|
3
4.2.2.tar.gz
Normal file
3
4.2.2.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:826ab1974579357c8ec7c01aa0a2997b46beb85b8ad915898273c9619cd27a80
|
||||
size 364717
|
67
python3.8-compat.patch
Normal file
67
python3.8-compat.patch
Normal file
@ -0,0 +1,67 @@
|
||||
--- 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',
|
@ -1,3 +1,18 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 31 12:02:30 CET 2019 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Add python3.8-compat.patch to allow build with Python 3.8
|
||||
Still doesn't work though because of gh#SELinuxProject/setools#31
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 31 09:38:27 CET 2019 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Update to the upstream version 4.2.2:
|
||||
- Remove source policy references from man pages, as loading
|
||||
source policies is no longer supported.
|
||||
- Fixed a performance regression in alias loading after alias
|
||||
dereferencing fixes in 4.2.1.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 5 08:01:41 UTC 2019 - jsegitz@suse.com
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
@ -22,13 +22,16 @@
|
||||
%define skip_python2 1
|
||||
|
||||
Name: setools
|
||||
Version: 4.2.1
|
||||
Version: 4.2.2
|
||||
Release: 0
|
||||
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
|
||||
BuildRequires: %{python_module Cython}
|
||||
BuildRequires: %{python_module devel}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
@ -99,6 +102,7 @@ This package includes the following graphical tools:
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
Loading…
Reference in New Issue
Block a user