setools-4.4.0-0.2.20201102git05e90ee.fc34

- Fix imports in /usr/bin/sedta

Fixes:
    $ sedta
    Traceback (most recent call last):
      File "/usr/bin/sedta", line 28, in <module>
        def print_transition(trans: setools.DomainTransition) -> None:
    AttributeError: module 'setools' has no attribute 'DomainTransition'
This commit is contained in:
Petr Lautrbach 2020-12-10 17:12:14 +01:00
parent 3c028107aa
commit b028c6a81b
2 changed files with 17 additions and 11 deletions

View File

@ -1,4 +1,4 @@
From 0575455a0abda5ee63c442433384268a959c4fbc Mon Sep 17 00:00:00 2001
From fa776e6abd019a7bdaca37486d714d307cbd332f Mon Sep 17 00:00:00 2001
From: Vit Mojzis <vmojzis@redhat.com>
Date: Fri, 26 Apr 2019 15:27:25 +0200
Subject: [PATCH] Do not export/use setools.InfoFlowAnalysis and
@ -12,29 +12,32 @@ Therefore it's better to use setools.infoflow.InfoFlowAnalysis and
setools.dta.DomainTransitionAnalysis and let the package containing
sedta and seinfoflow to require python3-networkx
---
sedta | 4 ++--
sedta | 5 +++--
seinfoflow | 4 ++--
setools/__init__.py | 4 ----
setoolsgui/apol/dta.py | 2 +-
setoolsgui/apol/infoflow.py | 2 +-
tests/dta.py | 2 +-
tests/infoflow.py | 2 +-
7 files changed, 8 insertions(+), 12 deletions(-)
7 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/sedta b/sedta
index 60861ca630a5..41e38a237b42 100755
index 57070098fe10..51890ea8ea73 100755
--- a/sedta
+++ b/sedta
@@ -22,7 +22,7 @@ import argparse
import logging
@@ -23,9 +23,10 @@ import logging
import signal
-import setools
import setools
+import setools.dta
def print_transition(trans: setools.DomainTransition) -> None:
@@ -114,7 +114,7 @@ else:
-def print_transition(trans: setools.DomainTransition) -> None:
+def print_transition(trans: setools.dta.DomainTransition) -> None:
if trans.transition:
print("Domain transition rule(s):")
for t in trans.transition:
@@ -114,7 +115,7 @@ else:
try:
p = setools.SELinuxPolicy(args.policy)
@ -44,7 +47,7 @@ index 60861ca630a5..41e38a237b42 100755
if args.shortest_path or args.all_paths:
if args.shortest_path:
diff --git a/seinfoflow b/seinfoflow
index f10c39de4d8e..fee749a83bb5 100755
index 0ddcfdc7c1fb..8321718b2640 100755
--- a/seinfoflow
+++ b/seinfoflow
@@ -17,7 +17,7 @@

View File

@ -7,7 +7,7 @@
Name: setools
Version: 4.4.0
Release: 0.1.20201102git%{setools_pre_ver}%{?dist}
Release: 0.2.20201102git%{setools_pre_ver}%{?dist}
Summary: Policy analysis tools for SELinux
License: GPLv2
@ -147,6 +147,9 @@ Python modules designed to facilitate SELinux policy analysis.
%{_mandir}/ru/man1/apol*
%changelog
* Thu Dec 10 2020 Petr Lautrbach <plautrba@redhat.com> - 4.4.0-0.2.20201102git05e90ee
- Fix imports in /usr/bin/sedta
* Tue Nov 3 2020 Petr Lautrbach <plautrba@redhat.com> - 4.4.0-0.1.20201102git05e90ee
- Update to 05e90ee
- Add /usr/bin/sechecker