From c9f64b8b413315b36cfcc0a9c00bd04ac6866205 Mon Sep 17 00:00:00 2001 From: Tomas Tomecek Date: Tue, 30 May 2017 11:49:45 +0200 Subject: [PATCH 1/3] add explicit BR on py{2,3} setuptools Signed-off-by: Tomas Tomecek --- setools.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/setools.spec b/setools.spec index abc3d75..becf19e 100644 --- a/setools.spec +++ b/setools.spec @@ -28,12 +28,13 @@ BuildRequires: glibc-devel, gcc, git BuildRequires: libsepol-devel >= %{sepol_ver}, libsepol-static >= %{sepol_ver} BuildRequires: qt5-qtbase-devel BuildRequires: swig -BuildRequires: python-devel +BuildRequires: python2-devel +BuildRequires: python2-setuptools +BuildRequires: python3-devel +BuildRequires: python3-setuptools # BuildArch: -BuildRequires: python-devel Requires: %{name}-python3 = %{version}-%{release} -BuildRequires: python3-devel %description SETools is a collection of graphical tools, command-line tools, and From 31fd610d91c4c6080c3996c329f7802b4d9b1654 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Thu, 10 Aug 2017 08:59:30 +0200 Subject: [PATCH 2/3] setools-4.1.0-4 - bswap_* macros are defined in byteswap.h Fixes ImportError on s390x: /usr/lib64/python3.6/site-packages/setools/policyrep/_qpol.cpython-36m-s390x-linux-gnu.so: undefined symbol: bswap_32 --- ...ap_-macros-are-defined-in-byteswap.h.patch | 26 +++++++++++++++++++ setools.spec | 8 ++++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 0003-bswap_-macros-are-defined-in-byteswap.h.patch diff --git a/0003-bswap_-macros-are-defined-in-byteswap.h.patch b/0003-bswap_-macros-are-defined-in-byteswap.h.patch new file mode 100644 index 0000000..f5445a9 --- /dev/null +++ b/0003-bswap_-macros-are-defined-in-byteswap.h.patch @@ -0,0 +1,26 @@ +From 2ac588919dd96d3d624e6ec20c67d1d91386e879 Mon Sep 17 00:00:00 2001 +From: Petr Lautrbach +Date: Thu, 10 Aug 2017 08:23:47 +0200 +Subject: [PATCH] bswap_* macros are defined in byteswap.h + +Fixes ImportError on s390x: +/usr/lib64/python3.6/site-packages/setools/policyrep/_qpol.cpython-36m-s390x-linux-gnu.so: undefined symbol: bswap_32 +--- + libqpol/policy.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/libqpol/policy.c b/libqpol/policy.c +index ae3acb5..e412be0 100644 +--- a/libqpol/policy.c ++++ b/libqpol/policy.c +@@ -28,6 +28,7 @@ + + #include "qpol_internal.h" + #include ++#include + #include + #include + #include +-- +2.13.3 + diff --git a/setools.spec b/setools.spec index becf19e..f9d5361 100644 --- a/setools.spec +++ b/setools.spec @@ -11,7 +11,7 @@ Name: setools Version: 4.1.0 -Release: 3%{?setools_pre_ver:.%{setools_pre_ver}}%{?dist} +Release: 4%{?setools_pre_ver:.%{setools_pre_ver}}%{?dist} Summary: Policy analysis tools for SELinux License: GPLv2 @@ -21,6 +21,7 @@ Source1: setools.pam Source2: apol.desktop Patch1: 0001-Do-not-use-Werror-during-build.patch Patch2: 0002-Do-not-export-use-setools.InfoFlowAnalysis-and-setoo.patch +Patch3: 0003-bswap_-macros-are-defined-in-byteswap.h.patch Obsoletes: setools < 4.0.0, setools-devel < 4.0.0 BuildRequires: flex, bison @@ -177,7 +178,10 @@ popd %{_mandir}/man1/apol* %changelog -* Mon May 22 2017 Petr Lautrbach - 4.1.0-3} +* Mon Sep 04 2017 Petr Lautrbach - 4.1.0-4 +- bswap_* macros are defined in byteswap.h + +* Mon May 22 2017 Petr Lautrbach - 4.1.0-3 - setools-python{,3} packages should have a weak dependency on libselinux-python{,3} (#1447747) From 03687f1d4b00888adbaab4525c602621f47a702d Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Mon, 4 Sep 2017 18:13:55 +0200 Subject: [PATCH 3/3] setools-python requires python-enum34 Fixes: >>> import setools Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python2.7/site-packages/setools/__init__.py", line 31, in from . import policyrep File "/usr/lib64/python2.7/site-packages/setools/policyrep/__init__.py", line 26, in from .bounds import BoundsRuletype File "/usr/lib64/python2.7/site-packages/setools/policyrep/bounds.py", line 24, in from .util import PolicyEnum File "/usr/lib64/python2.7/site-packages/setools/policyrep/util.py", line 21, in from enum import Enum ImportError: No module named enum --- setools.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setools.spec b/setools.spec index f9d5361..8dc31c5 100644 --- a/setools.spec +++ b/setools.spec @@ -11,7 +11,7 @@ Name: setools Version: 4.1.0 -Release: 4%{?setools_pre_ver:.%{setools_pre_ver}}%{?dist} +Release: 5%{?setools_pre_ver:.%{setools_pre_ver}}%{?dist} Summary: Policy analysis tools for SELinux License: GPLv2 @@ -80,6 +80,7 @@ This package includes the following console tools: %package python Summary: Policy analysis tools for SELinux Recommends: libselinux-python +Requires: python-enum34 %description python SETools is a collection of graphical tools, command-line tools, and @@ -178,6 +179,9 @@ popd %{_mandir}/man1/apol* %changelog +* Mon Sep 04 2017 Petr Lautrbach - 4.1.0-5} +- setools-python requires python-enum34 + * Mon Sep 04 2017 Petr Lautrbach - 4.1.0-4 - bswap_* macros are defined in byteswap.h