Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
07141d11a7
!49 [sync] PR-46: 【轻量级 PR】:setools:打开测试用例
From: @openeuler-sync-bot 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
2023-03-03 08:04:06 +00:00
jinlun
d48c3916c1 setools:打开测试用例
Signed-off-by: jinlun <jinlun@huawei.com>
(cherry picked from commit c7941715dca78c5c22f36bcfe81a37425dcd19f5)
2023-02-22 11:42:53 +08:00
openeuler-ci-bot
3e85e0f79e
!38 [sync] PR-37: 【轻量级 PR】:fix-安装setools-gui后执行apol报错,找不到PyQt5,networkx模块
From: @openeuler-sync-bot 
Reviewed-by: @HuaxinLuGitee 
Signed-off-by: @HuaxinLuGitee
2023-01-06 06:28:08 +00:00
jinlun
a565d0a533 fix-安装setools-gui后执行apol报错,找不到PyQt5,networkx模块
添加运行依赖

Signed-off-by: jinlun <jinlun@huawei.com>
(cherry picked from commit 5edf7a8fcf469088207f8636590138c9ce42763f)
2023-01-04 11:41:01 +08:00
openeuler-ci-bot
b389b44beb
!36 [sync] PR-34: Rebuild for new release number
From: @openeuler-sync-bot 
Reviewed-by: @zhujianwei001 
Signed-off-by: @zhujianwei001
2022-12-14 03:59:22 +00:00
jinlun
097704ef88 Rebuild for new release number
Signed-off-by: jinlun <jinlun@huawei.com>
(cherry picked from commit 9ce988f31c969792f9061bca81d457260fcadf6c)
2022-12-12 15:16:06 +08:00
openeuler-ci-bot
0fbf85771b
!31 add BuildRequires: libselinux-devel
Merge pull request !31 from panxh_purple/openEuler-22.03-LTS-Next
2022-01-22 12:50:14 +00:00
panxiaohe
f4a61ad510 add BuildRequires: libselinux-devel 2022-01-21 15:17:19 +08:00
openeuler-ci-bot
b76f4f9707 !29 update setools to 4.4.0
Merge pull request !29 from panxh_purple/openEuler-22.03-LTS-Next
2021-12-14 09:18:23 +00:00
panxiaohe
6a1ac0eb83 update setools to 4.4.0 2021-12-14 16:51:07 +08:00
6 changed files with 51 additions and 80 deletions

View File

@ -1,49 +0,0 @@
From 4b3dc6b38abbd32cda557d5ef9ea1383ac5fdcf2 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Thu, 23 Feb 2017 08:17:07 +0100
Subject: [PATCH 2/3] Do not use -Werror during build
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
There are new warnings when setools are built with gcc 7 therefore we
want to suppress -Werror for now
Fixes:
libqpol/policy_extend.c: In function policy_extend:
libqpol/policy_extend.c:161:27: error: %04zd directive output may be truncated writing between 4 and 10 bytes into a region of size 5 [-Werror=format-truncation=]
snprintf(buff, 9, "@ttr%04zd", i + 1);
^~~~~
libqpol/policy_extend.c:161:22: note: directive argument in the range [1, 4294967295]
snprintf(buff, 9, "@ttr%04zd", i + 1);
^~~~~~~~~~~
In file included from /usr/include/stdio.h:939:0,
from /usr/include/sepol/policydb/policydb.h:53,
from libqpol/policy_extend.c:29:
/usr/include/bits/stdio2.h:64:10: note: __builtin___snprintf_chk output between 9 and 15 bytes into a destination of size 9
return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
__bos (__s), __fmt, __va_arg_pack ());
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
error: command 'gcc' failed with exit status 1
---
setup.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/setup.py b/setup.py
index c94daf1..a7442ac 100644
--- a/setup.py
+++ b/setup.py
@@ -105,7 +105,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.17.2

Binary file not shown.

BIN
4.4.0.tar.gz Normal file

Binary file not shown.

View File

@ -1,4 +1,4 @@
From 0575455a0abda5ee63c442433384268a959c4fbc Mon Sep 17 00:00:00 2001
From e47d19f4985098ca316eea4a383510d419ec6055 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):
@@ -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 @@
@ -56,7 +59,7 @@ index f10c39de4d8e..fee749a83bb5 100755
import argparse
import sys
import logging
@@ -101,7 +101,7 @@ elif args.booleans is not None:
@@ -102,7 +102,7 @@ elif args.booleans is not None:
try:
p = setools.SELinuxPolicy(args.policy)
m = setools.PermissionMap(args.map)
@ -66,27 +69,27 @@ index f10c39de4d8e..fee749a83bb5 100755
if args.shortest_path or args.all_paths:
diff --git a/setools/__init__.py b/setools/__init__.py
index 26fa5aa34a19..b7e51c43c4bb 100644
index d72d343e7e79..642485b9018d 100644
--- a/setools/__init__.py
+++ b/setools/__init__.py
@@ -75,12 +75,8 @@ from .pcideviceconquery import PcideviceconQuery
@@ -91,12 +91,8 @@ from .pcideviceconquery import PcideviceconQuery
from .devicetreeconquery import DevicetreeconQuery
# Information Flow Analysis
-from .infoflow import InfoFlowAnalysis
from .permmap import PermissionMap
from .permmap import PermissionMap, RuleWeight, Mapping
-# Domain Transition Analysis
-from .dta import DomainTransitionAnalysis
-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
index 62dbf04d9a5e..0ea000e790f0 100644
--- a/setoolsgui/apol/dta.py
+++ b/setoolsgui/apol/dta.py
@@ -23,7 +23,7 @@ from PyQt5.QtCore import pyqtSignal, Qt, QStringListModel, QThread
@@ -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
@ -94,9 +97,9 @@ index 4608b9dbf34e..2cde44c142e9 100644
+from setools.dta import DomainTransitionAnalysis
from ..logtosignal import LogHandlerToSignal
from .analysistab import AnalysisTab
from .analysistab import AnalysisSection, AnalysisTab
diff --git a/setoolsgui/apol/infoflow.py b/setoolsgui/apol/infoflow.py
index 7bca299d23fc..7fee2778f35f 100644
index 28009aa2329c..92d350bf727c 100644
--- a/setoolsgui/apol/infoflow.py
+++ b/setoolsgui/apol/infoflow.py
@@ -26,7 +26,7 @@ from PyQt5.QtCore import pyqtSignal, Qt, QStringListModel, QThread
@ -135,5 +138,5 @@ index aa0e44a7e4f8..fca2848aeca5 100644
from setools.exception import InvalidType
from setools.permmap import PermissionMap
--
2.26.0.rc2
2.30.0

View File

@ -1,5 +1,5 @@
Name: setools
Version: 4.3.0
Version: 4.4.0
Release: 5
Summary: Policy Analysis Tools for SELinux
License: GPLv2
@ -8,15 +8,14 @@ Source0: https://github.com/SELinuxProject/setools/archive/%{version}.tar.gz
Source1: setools.pam
Source2: apol.desktop
Patch0: 0001-Do-not-use-Werror-during-build.patch
Patch1: 0002-Do-not-export-use-setools.InfoFlowAnalysis-and-setoo.patch
Patch2: 0003-Require-networkx-on-package-level.patch
Patch0: Do-not-export-use-setools.InfoFlowAnalysis-and-setoo.patch
Patch1: Require-networkx-on-package-level.patch
BuildRequires: flex bison glibc-devel gcc swig git python3-setuptools
BuildRequires: qt5-qtbase-devel python3-devel
BuildRequires: libsepol-devel >= 3.1 libsepol-static >= 3.1
BuildRequires: libsepol-devel >= 3.2 libsepol-static >= 3.2 libselinux-devel
BuildRequires: python3-Cython
BuildRequires: python3-setuptools
BuildRequires: python3-setuptools python3-networkx checkpolicy
Obsoletes: setools < 4.0.0, setools-devel < 4.0.0
%description
@ -26,7 +25,7 @@ and command line.
%package console
Summary: Console packages for setools
License: GPLv2
Requires: python3-setools = %{version}-%{release} libselinux >= 3.1
Requires: python3-setools = %{version}-%{release} libselinux >= 3.2
%description console
Console packages for setools.
@ -35,7 +34,7 @@ Console packages for setools.
Summary: Analyses files for setools-console
License: GPLv2
Requires: python3-setools = %{version}-%{release}
Requires: libselinux >= 3.1
Requires: libselinux >= 3.2
%description console-analyses
Analyses files for setools-console.
@ -56,6 +55,8 @@ Python3 package for setools.
%package gui
Summary: Gui packages for setools
Requires: python3-setools = %{version}-%{release}
Requires: python3-qt5
Requires: python3-networkx
%description gui
Gui packages for setools.
@ -72,14 +73,15 @@ Gui packages for setools.
%py3_install
%check
%if %{?_with_check:1}%{!?_with_check:0}
sed -i "s#from setools import InfoFlowAnalysis#from setools.infoflow import InfoFlowAnalysis#" ./tests/conditionalinfoflow.py
%{__python3} setup.py test
%endif
%files
%files console
%defattr(-,root,root)
%{_bindir}/sechecker
%{_bindir}/sediff
%{_bindir}/seinfo
%{_bindir}/sesearch
@ -108,7 +110,22 @@ Gui packages for setools.
%{_mandir}/ru/man1/*
%changelog
* Wed Mar 23 2021 panxiaohe <panxiaohe@huawei.com> - 4.3.0-5
* Thu Feb 16 2023 jinlun <jinlun@huawei.com> - 4.4.0-5
- add code check
* Wed Jan 4 2023 jinlun <jinlun@huawei.com> - 4.4.0-4
- add Requires in gui
* Tue Oct 18 2022 jinlun <jinlun@huawei.com> - 4.4.0-3
- Rebuild for new release number
* Fri Jan 21 2022 panxiaohe <panxiaohe@huawei.com> - 4.4.0-2
- add BuildRequires: libselinux-devel
* Tue Dec 14 2021 panxiaohe <panxiaohe@huawei.com> - 4.4.0-1
- update setools to 4.4.0
* Tue Mar 23 2021 panxiaohe <panxiaohe@huawei.com> - 4.3.0-5
- add debuginfo package and make ELF files stripped
* Tue Dec 1 2020 Liquor <lirui130@huawei.com> - 4.3.0-4