Accepting request 1001362 from security:SELinux
OBS-URL: https://build.opensuse.org/request/show/1001362 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/setools?expand=0&rev=41
This commit is contained in:
commit
7cb5f93ea8
2
README.SUSE
Normal file
2
README.SUSE
Normal file
@ -0,0 +1,2 @@
|
||||
Additional functionality for these tools can be gained by installing python3-networkx. This pulls in many dependencies and is
|
||||
not needed for most people, therefor it's not required or recommended due to the size of the required dependencies
|
@ -1,7 +1,7 @@
|
||||
From 716a1d9e1db6701c0b310dd7e10dc4a10656da0f Mon Sep 17 00:00:00 2001
|
||||
From: Chris PeBenito <chpebeni@linux.microsoft.com>
|
||||
Date: Tue, 14 Dec 2021 14:24:20 -0500
|
||||
Subject: [PATCH 1/1] Make NetworkX optional.
|
||||
Subject: [PATCH] Make NetworkX optional.
|
||||
|
||||
The CLI tools get installed to most distros, but sedta and seinfoflow are
|
||||
not typically used or separated into a different package. This will allow
|
||||
@ -9,17 +9,16 @@ seinfo, sesearch, and sediff to function if NetworkX is missing, since they
|
||||
don't require it.
|
||||
|
||||
Signed-off-by: Chris PeBenito <chpebeni@linux.microsoft.com>
|
||||
Acked-by: Shung-Hsi Yu <shung-hsi.yu@suse.com>
|
||||
---
|
||||
setools/dta.py | 18 ++++++++++++++----
|
||||
setools/infoflow.py | 17 +++++++++++++----
|
||||
2 files changed, 27 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/setools/dta.py b/setools/dta.py
|
||||
index ce5a364..ded88ff 100644
|
||||
--- a/setools/dta.py
|
||||
+++ b/setools/dta.py
|
||||
@@ -10,8 +10,11 @@ from collections import defaultdict
|
||||
Index: setools/setools/dta.py
|
||||
===================================================================
|
||||
--- setools.orig/setools/dta.py
|
||||
+++ setools/setools/dta.py
|
||||
@@ -24,8 +24,11 @@ from collections import defaultdict
|
||||
from contextlib import suppress
|
||||
from typing import DefaultDict, Iterable, List, NamedTuple, Optional, Union
|
||||
|
||||
@ -33,7 +32,7 @@ index ce5a364..ded88ff 100644
|
||||
|
||||
from .descriptors import EdgeAttrDict, EdgeAttrList
|
||||
from .policyrep import AnyTERule, SELinuxPolicy, TERuletype, Type
|
||||
@@ -73,8 +76,15 @@ class DomainTransitionAnalysis:
|
||||
@@ -87,8 +90,15 @@ class DomainTransitionAnalysis:
|
||||
self.reverse = reverse
|
||||
self.rebuildgraph = True
|
||||
self.rebuildsubgraph = True
|
||||
@ -51,11 +50,11 @@ index ce5a364..ded88ff 100644
|
||||
|
||||
@property
|
||||
def reverse(self) -> bool:
|
||||
diff --git a/setools/infoflow.py b/setools/infoflow.py
|
||||
index 0ef240a..4b94a0c 100644
|
||||
--- a/setools/infoflow.py
|
||||
+++ b/setools/infoflow.py
|
||||
@@ -7,8 +7,11 @@ import logging
|
||||
Index: setools/setools/infoflow.py
|
||||
===================================================================
|
||||
--- setools.orig/setools/infoflow.py
|
||||
+++ setools/setools/infoflow.py
|
||||
@@ -21,8 +21,11 @@ import logging
|
||||
from contextlib import suppress
|
||||
from typing import cast, Iterable, List, Mapping, Optional, Union
|
||||
|
||||
@ -69,7 +68,7 @@ index 0ef240a..4b94a0c 100644
|
||||
|
||||
from .descriptors import EdgeAttrIntMax, EdgeAttrList
|
||||
from .permmap import PermissionMap
|
||||
@@ -54,8 +57,14 @@ class InfoFlowAnalysis:
|
||||
@@ -68,8 +71,14 @@ class InfoFlowAnalysis:
|
||||
self.rebuildgraph = True
|
||||
self.rebuildsubgraph = True
|
||||
|
||||
@ -86,6 +85,3 @@ index 0ef240a..4b94a0c 100644
|
||||
|
||||
@property
|
||||
def min_weight(self) -> int:
|
||||
--
|
||||
2.35.1
|
||||
|
@ -1,7 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 2 09:24:56 UTC 2022 - Johannes Segitz <jsegitz@suse.com>
|
||||
|
||||
- Added README.SUSE and drop recommend for python3-networkx altogether
|
||||
(bsc#1202676)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 22 09:13:19 UTC 2022 - Shung-Hsi Yu <shung-hsi.yu@suse.com>
|
||||
|
||||
- Add make-networkx-optional.patch to cut down installation requirements
|
||||
- Add make_networkx_optional.patch to cut down installation requirements
|
||||
- Change python3-networkx from require into recommend
|
||||
|
||||
-------------------------------------------------------------------
|
||||
|
@ -33,8 +33,9 @@ Summary: Policy analysis tools for SELinux
|
||||
License: GPL-2.0-only
|
||||
Group: System/Management
|
||||
Source: https://github.com/SELinuxProject/setools/releases/download/%{version}/%{name}-%{version}.tar.bz2
|
||||
Source2: README.SUSE
|
||||
# PATCH-FIX-UPSTREAM https://github.com/SELinuxProject/setools/pull/68
|
||||
Patch1: make-networkx-optional.patch
|
||||
Patch1: make_networkx_optional.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: libselinux-devel
|
||||
BuildRequires: libsepol-devel
|
||||
@ -75,7 +76,6 @@ Summary: Python bindings for SELinux policy analysis
|
||||
License: LGPL-2.0-only
|
||||
Group: Development/Languages/Python
|
||||
Requires: python3 >= 3.4
|
||||
Recommends: python3-networkx
|
||||
Obsoletes: python-setools < %{version}-%{release}
|
||||
Provides: python-setools = %{version}-%{release}
|
||||
%if "%{python3_primary_provider}" != "python3"
|
||||
@ -112,12 +112,15 @@ This package includes the following graphical tools:
|
||||
|
||||
%install
|
||||
%python_install
|
||||
install -m 644 -D %{SOURCE2} %{buildroot}%{_docdir}/%{name}/README.SUSE
|
||||
%fdupes -s %{buildroot}%{python3_sitearch}
|
||||
|
||||
%files -n %{python3_primary_provider}-setools
|
||||
%defattr(-,root,root,-)
|
||||
%{python3_sitearch}/setools
|
||||
%{python3_sitearch}/setools-%{version}*-info
|
||||
%dir %{_docdir}/%{name}/
|
||||
%{_docdir}/%{name}/*
|
||||
|
||||
%files console
|
||||
%defattr(-,root,root,-)
|
||||
|
Loading…
Reference in New Issue
Block a user