package/setools: bump to version 4.4.0
authorAdam Duskett <aduskett@gmail.com>
Thu, 20 May 2021 17:46:48 +0000 (10:46 -0700)
committerYann E. MORIN <yann.morin.1998@free.fr>
Fri, 21 May 2021 10:02:58 +0000 (12:02 +0200)
- Remove upstream patch 0001-remove-werror-flag-from-setup.patch
- Refactor Do-not-export-use-setools.InfoFlowAnalysis-and-setoo.patch to apply
  to 4.4.0

Signed-off-by: Adam Duskett <aduskett@gmail.com>
Tested-by: Matthew Weber <matthew.weber@collins.com>
Tested-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
package/setools/0001-Do-not-export-use-setools.InfoFlowAnalysis-and-setoo.patch [new file with mode: 0644]
package/setools/0001-remove-werror-flag-from-setup.patch [deleted file]
package/setools/0002-Do-not-export-use-setools.InfoFlowAnalysis-and-setoo.patch [deleted file]
package/setools/setools.hash
package/setools/setools.mk

diff --git a/package/setools/0001-Do-not-export-use-setools.InfoFlowAnalysis-and-setoo.patch b/package/setools/0001-Do-not-export-use-setools.InfoFlowAnalysis-and-setoo.patch
new file mode 100644 (file)
index 0000000..3c3ae97
--- /dev/null
@@ -0,0 +1,145 @@
+From ae84e5ef59bb24d5b8fd17e6756952f42c2d5c36 Mon Sep 17 00:00:00 2001
+From: rpm-build <rpm-build>
+Date: Thu, 23 Feb 2017 08:17:07 +0100
+Subject: [PATCH] Do not export/use setools.InfoFlowAnalysis and
+ setools.DomainTransitionAnalysis
+
+dta and infoflow modules require networkx which brings lot of dependencies.
+These dependencies are not necessary for setools module itself as it's
+used in policycoreutils.
+
+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
+
+Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
+[Refreshed for 4.3.0]
+Signed-off-by: Adam Duskett <aduskett@gmail.com>
+[Refreshed for 4.4.0]
+---
+ sedta                       | 3 ++-
+ seinfoflow                  | 5 +++--
+ 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, 11 insertions(+), 9 deletions(-)
+
+diff --git a/sedta b/sedta
+index 60861ca630a5..0056172a55e5 100755
+--- a/sedta
++++ b/sedta
+@@ -23,6 +23,7 @@ import logging
+ import signal
+ import setools
++import setools.dta
+ def print_transition(trans: setools.DomainTransition) -> None:
+@@ -114,7 +115,7 @@ else:
+ try:
+     p = setools.SELinuxPolicy(args.policy)
+-    g = setools.DomainTransitionAnalysis(p, reverse=args.reverse, exclude=args.exclude)
++    g = setools.dta.DomainTransitionAnalysis(p, reverse=args.reverse, exclude=args.exclude)
+     if args.shortest_path or args.all_paths:
+         if args.shortest_path:
+diff --git a/seinfoflow b/seinfoflow
+index f10c39de4d8e..fe733bbd0787 100755
+--- a/seinfoflow
++++ b/seinfoflow
+@@ -18,6 +18,7 @@
+ #
+ import setools
++import setools.infoflow
+ import argparse
+ import sys
+ import logging
+@@ -102,8 +103,8 @@ elif args.booleans is not None:
+ try:
+     p = setools.SELinuxPolicy(args.policy)
+     m = setools.PermissionMap(args.map)
+-    g = setools.InfoFlowAnalysis(p, m, min_weight=args.min_weight, exclude=args.exclude,
+-                                 booleans=booleans)
++    g = setools.infoflow.InfoFlowAnalysis(p, m, min_weight=args.min_weight, exclude=args.exclude,
++                                          booleans=booleans)
+     if args.shortest_path or args.all_paths:
+         if args.shortest_path:
+diff --git a/setools/__init__.py b/setools/__init__.py
+index d72d343..4d5aaaa 100644
+--- a/setools/__init__.py
++++ b/setools/__init__.py
+@@ -91,11 +91,11 @@ from .pcideviceconquery import PcideviceconQuery
+ from .devicetreeconquery import DevicetreeconQuery
+ # Information Flow Analysis
+-from .infoflow import InfoFlowAnalysis
++# from .infoflow import InfoFlowAnalysis
+ from .permmap import PermissionMap, RuleWeight, Mapping
+ # Domain Transition Analysis
+-from .dta import DomainTransitionAnalysis, DomainEntrypoint, DomainTransition
++# from .dta import DomainTransitionAnalysis, DomainEntrypoint, DomainTransition
+ # Policy difference
+ from .diff import PolicyDifference
+diff --git a/setoolsgui/apol/dta.py b/setoolsgui/apol/dta.py
+index 4608b9dbf34e..2cde44c142e9 100644
+--- a/setoolsgui/apol/dta.py
++++ b/setoolsgui/apol/dta.py
+@@ -24,7 +24,7 @@ from PyQt5.QtCore import pyqtSignal, Qt, QStringListModel, QThread
+ from PyQt5.QtGui import QPalette, QTextCursor
+ from PyQt5.QtWidgets import QCompleter, QHeaderView, QMessageBox, QProgressDialog, \
+     QTreeWidgetItem
+-from setools import DomainTransitionAnalysis
++from setools.dta import DomainTransitionAnalysis
+ from ..logtosignal import LogHandlerToSignal
+ from .analysistab import AnalysisSection, AnalysisTab
+diff --git a/setoolsgui/apol/infoflow.py b/setoolsgui/apol/infoflow.py
+index 7bca299d23fc..7fee2778f35f 100644
+--- a/setoolsgui/apol/infoflow.py
++++ b/setoolsgui/apol/infoflow.py
+@@ -26,7 +26,7 @@ from PyQt5.QtCore import pyqtSignal, Qt, QStringListModel, QThread
+ from PyQt5.QtGui import QPalette, QTextCursor
+ from PyQt5.QtWidgets import QCompleter, QHeaderView, QMessageBox, QProgressDialog, \
+     QTreeWidgetItem
+-from setools import InfoFlowAnalysis
++from setools.infoflow import InfoFlowAnalysis
+ from setools.exception import UnmappedClass, UnmappedPermission
+ from ..logtosignal import LogHandlerToSignal
+diff --git a/tests/dta.py b/tests/dta.py
+index a0cc9381469c..177e6fb0b961 100644
+--- a/tests/dta.py
++++ b/tests/dta.py
+@@ -18,7 +18,7 @@
+ import os
+ import unittest
+-from setools import DomainTransitionAnalysis
++from setools.dta import DomainTransitionAnalysis
+ from setools import TERuletype as TERT
+ from setools.exception import InvalidType
+ from setools.policyrep import Type
+diff --git a/tests/infoflow.py b/tests/infoflow.py
+index aa0e44a7e4f8..fca2848aeca5 100644
+--- a/tests/infoflow.py
++++ b/tests/infoflow.py
+@@ -18,7 +18,7 @@
+ import os
+ import unittest
+-from setools import InfoFlowAnalysis
++from setools.infoflow import InfoFlowAnalysis
+ from setools import TERuletype as TERT
+ from setools.exception import InvalidType
+ from setools.permmap import PermissionMap
+-- 
+2.26.2
+
diff --git a/package/setools/0001-remove-werror-flag-from-setup.patch b/package/setools/0001-remove-werror-flag-from-setup.patch
deleted file mode 100644 (file)
index 0ab4006..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-From 8ab5a49247d870d92a8287db6134877ebf7a4379 Mon Sep 17 00:00:00 2001
-From: Adam Duskett <aduskett@gmail.com>
-Date: Thu, 12 Oct 2017 22:04:58 -0400
-Subject: [PATCH] remove werror flag from setup
-
-Compilers older than gcc6 will generate uninitialized variable warnings which
-will cause compiling to fail.
-
-Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
-[Refreshed for 4.3.0]
-Signed-off-by: Adam Duskett <aduskett@gmail.com>
----
- setup.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/setup.py b/setup.py
-index 457c83049ca5..4dcb30196abf 100644
---- a/setup.py
-+++ b/setup.py
-@@ -106,7 +106,7 @@ ext_py_mods = [Extension('setools.policyrep', ['setools/policyrep.pyx'],
-                          libraries=['selinux', 'sepol'],
-                          library_dirs=lib_dirs,
-                          define_macros=macros,
--                         extra_compile_args=['-Werror', '-Wextra',
-+                         extra_compile_args=['-Wextra',
-                                              '-Waggregate-return',
-                                              '-Wfloat-equal',
-                                              '-Wformat', '-Wformat=2',
--- 
-2.26.2
-
diff --git a/package/setools/0002-Do-not-export-use-setools.InfoFlowAnalysis-and-setoo.patch b/package/setools/0002-Do-not-export-use-setools.InfoFlowAnalysis-and-setoo.patch
deleted file mode 100644 (file)
index f9519a0..0000000
+++ /dev/null
@@ -1,144 +0,0 @@
-From ae84e5ef59bb24d5b8fd17e6756952f42c2d5c36 Mon Sep 17 00:00:00 2001
-From: rpm-build <rpm-build>
-Date: Thu, 23 Feb 2017 08:17:07 +0100
-Subject: [PATCH] Do not export/use setools.InfoFlowAnalysis and
- setools.DomainTransitionAnalysis
-
-dta and infoflow modules require networkx which brings lot of dependencies.
-These dependencies are not necessary for setools module itself as it's
-used in policycoreutils.
-
-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
-
-Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
-[Refreshed for 4.3.0]
-Signed-off-by: Adam Duskett <aduskett@gmail.com>
----
- sedta                       | 3 ++-
- seinfoflow                  | 5 +++--
- 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, 11 insertions(+), 9 deletions(-)
-
-diff --git a/sedta b/sedta
-index 60861ca630a5..0056172a55e5 100755
---- a/sedta
-+++ b/sedta
-@@ -23,6 +23,7 @@ import logging
- import signal
- import setools
-+import setools.dta
- def print_transition(trans):
-@@ -114,7 +115,7 @@ else:
- try:
-     p = setools.SELinuxPolicy(args.policy)
--    g = setools.DomainTransitionAnalysis(p, reverse=args.reverse, exclude=args.exclude)
-+    g = setools.dta.DomainTransitionAnalysis(p, reverse=args.reverse, exclude=args.exclude)
-     if args.shortest_path or args.all_paths:
-         if args.shortest_path:
-diff --git a/seinfoflow b/seinfoflow
-index f10c39de4d8e..fe733bbd0787 100755
---- a/seinfoflow
-+++ b/seinfoflow
-@@ -18,6 +18,7 @@
- #
- import setools
-+import setools.infoflow
- import argparse
- import sys
- import logging
-@@ -101,8 +102,8 @@ elif args.booleans is not None:
- try:
-     p = setools.SELinuxPolicy(args.policy)
-     m = setools.PermissionMap(args.map)
--    g = setools.InfoFlowAnalysis(p, m, min_weight=args.min_weight, exclude=args.exclude,
--                                 booleans=booleans)
-+    g = setools.infoflow.InfoFlowAnalysis(p, m, min_weight=args.min_weight, exclude=args.exclude,
-+                                          booleans=booleans)
-     if args.shortest_path or args.all_paths:
-         if args.shortest_path:
-diff --git a/setools/__init__.py b/setools/__init__.py
-index 26fa5aa34a19..9e9058a6bf90 100644
---- a/setools/__init__.py
-+++ b/setools/__init__.py
-@@ -75,11 +75,11 @@ from .pcideviceconquery import PcideviceconQuery
- from .devicetreeconquery import DevicetreeconQuery
- # Information Flow Analysis
--from .infoflow import InfoFlowAnalysis
-+# from .infoflow import InfoFlowAnalysis
- from .permmap import PermissionMap
- # Domain Transition Analysis
--from .dta import DomainTransitionAnalysis
-+# from .dta import DomainTransitionAnalysis
- # Policy difference
- from .diff import PolicyDifference
-diff --git a/setoolsgui/apol/dta.py b/setoolsgui/apol/dta.py
-index 4608b9dbf34e..2cde44c142e9 100644
---- a/setoolsgui/apol/dta.py
-+++ b/setoolsgui/apol/dta.py
-@@ -23,7 +23,7 @@ from PyQt5.QtCore import pyqtSignal, Qt, QStringListModel, QThread
- from PyQt5.QtGui import QPalette, QTextCursor
- from PyQt5.QtWidgets import QCompleter, QHeaderView, QMessageBox, QProgressDialog, \
-     QTreeWidgetItem
--from setools import DomainTransitionAnalysis
-+from setools.dta import DomainTransitionAnalysis
- from ..logtosignal import LogHandlerToSignal
- from .analysistab import AnalysisTab
-diff --git a/setoolsgui/apol/infoflow.py b/setoolsgui/apol/infoflow.py
-index 7bca299d23fc..7fee2778f35f 100644
---- a/setoolsgui/apol/infoflow.py
-+++ b/setoolsgui/apol/infoflow.py
-@@ -26,7 +26,7 @@ from PyQt5.QtCore import pyqtSignal, Qt, QStringListModel, QThread
- from PyQt5.QtGui import QPalette, QTextCursor
- from PyQt5.QtWidgets import QCompleter, QHeaderView, QMessageBox, QProgressDialog, \
-     QTreeWidgetItem
--from setools import InfoFlowAnalysis
-+from setools.infoflow import InfoFlowAnalysis
- from setools.exception import UnmappedClass, UnmappedPermission
- from ..logtosignal import LogHandlerToSignal
-diff --git a/tests/dta.py b/tests/dta.py
-index a0cc9381469c..177e6fb0b961 100644
---- a/tests/dta.py
-+++ b/tests/dta.py
-@@ -18,7 +18,7 @@
- import os
- import unittest
--from setools import DomainTransitionAnalysis
-+from setools.dta import DomainTransitionAnalysis
- from setools import TERuletype as TERT
- from setools.exception import InvalidType
- from setools.policyrep import Type
-diff --git a/tests/infoflow.py b/tests/infoflow.py
-index aa0e44a7e4f8..fca2848aeca5 100644
---- a/tests/infoflow.py
-+++ b/tests/infoflow.py
-@@ -18,7 +18,7 @@
- import os
- import unittest
--from setools import InfoFlowAnalysis
-+from setools.infoflow import InfoFlowAnalysis
- from setools import TERuletype as TERT
- from setools.exception import InvalidType
- from setools.permmap import PermissionMap
--- 
-2.26.2
-
index 689b20a3570cd99e3d0934aeb96b30e8a707fad9..74428a177c77187640fbcb33b6f2a361c21055f8 100644 (file)
@@ -1,5 +1,5 @@
 # Locally computed
-sha256 da2c1d23edd24c4aa17d01d78e86c9e5fb5bf3aa38c71d5d63f41c750f6ef26c setools-4.3.0.tar.gz
+sha256 202eac5f857475937bee8136cff278aa2b4a4b94a0dec63fbbbe18c9eb644a4e setools-4.4.0.tar.gz
 sha256  2f7547e10f76a382c24c053595f38a5cc6dda9347f508f254ca490e0046a9624 COPYING
 sha256  8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING.GPL
 sha256  dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 COPYING.LGPL
index a07b1367a26ef995819d1a5b0a4c45879583f8e7..8e1c0d2cc6a98a4a11c290001f2fdd61d317bd23 100644 (file)
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-SETOOLS_VERSION = 4.3.0
+SETOOLS_VERSION = 4.4.0
 SETOOLS_SITE = $(call github,SELinuxProject,setools,$(SETOOLS_VERSION))
 SETOOLS_DEPENDENCIES = libselinux libsepol python-setuptools host-bison host-flex host-python-cython host-swig
 SETOOLS_INSTALL_STAGING = YES