4d3357
%global sepol_ver 3.4-1
4d3357
%global selinux_ver 3.4-1
5752ef
5752ef
Name:           setools
bccf27
Version:        4.4.1
bccf27
Release:        1%{?dist}
5752ef
Summary:        Policy analysis tools for SELinux
5752ef
bccf27
License:        GPL-2.0-only and LGPL-2.1-only
5752ef
URL:            https://github.com/SELinuxProject/setools/wiki
5752ef
Source0:        https://github.com/SELinuxProject/setools/archive/%{version}.tar.gz
5752ef
Source1:        setools.pam
5752ef
Source2:        apol.desktop
bccf27
Patch0001:      0001-Make-NetworkX-optional.patch
5752ef
Patch1003:      1003-Require-networkx-on-package-level.patch
5752ef
Obsoletes:      setools < 4.0.0, setools-devel < 4.0.0
5752ef
BuildRequires:  flex,  bison
5752ef
BuildRequires:  glibc-devel, gcc, git-core
5752ef
BuildRequires:  libsepol-devel >= %{sepol_ver}, libsepol-static >= %{sepol_ver}
5752ef
BuildRequires:  qt5-qtbase-devel
5752ef
BuildRequires:  swig
5752ef
BuildRequires:  python3-Cython
5752ef
BuildRequires:  python3-devel
5752ef
BuildRequires:  python3-setuptools
5752ef
BuildRequires:  libselinux-devel
5752ef
5752ef
Requires:       %{name}-console = %{version}-%{release}
5752ef
Requires:       %{name}-console-analyses = %{version}-%{release}
5752ef
Requires:       %{name}-gui = %{version}-%{release}
5752ef
5752ef
%description
5752ef
SETools is a collection of graphical tools, command-line tools, and
5752ef
Python modules designed to facilitate SELinux policy analysis.
5752ef
5752ef
%package     console
5752ef
Summary:     Policy analysis command-line tools for SELinux
bccf27
License:     GPL-2.0-only
5752ef
Requires:    python3-setools = %{version}-%{release}
5752ef
Requires:    libselinux >= %{selinux_ver}
5752ef
5752ef
%description console
5752ef
SETools is a collection of graphical tools, command-line tools, and
5752ef
libraries designed to facilitate SELinux policy analysis.
5752ef
5752ef
This package includes the following console tools:
5752ef
5752ef
  sediff       Compare two policies to find differences.
5752ef
  seinfo       List policy components.
5752ef
  sesearch     Search rules (allow, type_transition, etc.)
5752ef
5752ef
5752ef
%package     console-analyses
5752ef
Summary:     Policy analysis command-line tools for SELinux
bccf27
License:     GPL-2.0-only
5752ef
Requires:    python3-setools = %{version}-%{release}
5752ef
Requires:    libselinux >= %{selinux_ver}
5752ef
Requires:    python3-networkx
5752ef
5752ef
%description console-analyses
5752ef
SETools is a collection of graphical tools, command-line tools, and
5752ef
libraries designed to facilitate SELinux policy analysis.
5752ef
5752ef
This package includes the following console tools:
5752ef
5752ef
  sedta        Perform domain transition analyses.
5752ef
  seinfoflow   Perform information flow analyses.
5752ef
5752ef
5752ef
%package     -n python3-setools
bccf27
Summary:     Policy analysis tools for SELinux
bccf27
License:     LGPL-2.1-only
5752ef
Obsoletes:   setools-libs < 4.0.0
5752ef
%{?python_provide:%python_provide python3-setools}
5752ef
Requires:    python3-setuptools
5752ef
5752ef
%description -n python3-setools
5752ef
SETools is a collection of graphical tools, command-line tools, and
5752ef
Python 3 modules designed to facilitate SELinux policy analysis.
5752ef
5752ef
5752ef
%package     gui
5752ef
Summary:     Policy analysis graphical tools for SELinux
bccf27
License:     GPL-2.0-only
5752ef
Requires:    python3-setools = %{version}-%{release}
5752ef
Requires:    python3-qt5
5752ef
Requires:    python3-networkx
5752ef
5752ef
%description gui
5752ef
SETools is a collection of graphical tools, command-line tools, and
5752ef
Python modules designed to facilitate SELinux policy analysis.
5752ef
5752ef
5752ef
%prep
5752ef
%autosetup -p 1 -S git -n setools-%{version}
5752ef
5752ef
5752ef
%build
5752ef
%py3_build
5752ef
5752ef
5752ef
%install
5752ef
%py3_install
5752ef
5752ef
%check
5752ef
%if %{?_with_check:1}%{!?_with_check:0}
5752ef
%{__python3} setup.py test
5752ef
%endif
5752ef
5752ef
5752ef
%files
5752ef
5752ef
%files console
bccf27
%license COPYING.GPL
5752ef
%{_bindir}/sechecker
5752ef
%{_bindir}/sediff
5752ef
%{_bindir}/seinfo
5752ef
%{_bindir}/sesearch
5752ef
%{_mandir}/man1/sechecker*
5752ef
%{_mandir}/man1/sediff*
5752ef
%{_mandir}/man1/seinfo*
5752ef
%{_mandir}/man1/sesearch*
5752ef
%{_mandir}/ru/man1/sediff*
5752ef
%{_mandir}/ru/man1/seinfo*
5752ef
%{_mandir}/ru/man1/sesearch*
5752ef
5752ef
%files console-analyses
bccf27
%license COPYING.GPL
5752ef
%{_bindir}/sedta
5752ef
%{_bindir}/seinfoflow
5752ef
%{_mandir}/man1/sedta*
5752ef
%{_mandir}/man1/seinfoflow*
5752ef
%{_mandir}/ru/man1/sedta*
5752ef
%{_mandir}/ru/man1/seinfoflow*
5752ef
5752ef
%files -n python3-setools
bccf27
%license COPYING COPYING.LGPL
5752ef
%{python3_sitearch}/setools
5752ef
%{python3_sitearch}/setools-*
5752ef
5752ef
%files gui
bccf27
%license COPYING.GPL
5752ef
%{_bindir}/apol
5752ef
%{python3_sitearch}/setoolsgui
5752ef
%{_mandir}/man1/apol*
5752ef
%{_mandir}/ru/man1/apol*
5752ef
5752ef
%changelog
bccf27
* Mon Feb  6 2023 Petr Lautrbach <lautrbach@redhat.com> - 4.4.1-1
bccf27
- SETools 4.4.1 release
bccf27
4d3357
* Fri Jun 10 2022 Petr Lautrbach <plautrba@redhat.com> - 4.4.0-5
4d3357
- Update required userspace versions to 3.4
4d3357
- Drop unnecessary Recommends
4d3357
5752ef
* Fri Nov 19 2021 Petr Lautrbach <plautrba@redhat.com> - 4.4.0-4
5752ef
- Make seinfo output predictable
5752ef
  https://github.com/SELinuxProject/setools/issues/65
5752ef
5752ef
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 4.4.0-3
5752ef
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
5752ef
  Related: rhbz#1991688
5752ef
5752ef
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 4.4.0-2
5752ef
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
5752ef
5752ef
* Mon Mar  8 2021 Petr Lautrbach <plautrba@redhat.com> - 4.4.0-1
5752ef
- SETools 4.4.0 release
5752ef
5752ef
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-0.3.20210121git16c0696
5752ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
5752ef
5752ef
* Thu Jan 21 2021 Petr Lautrbach <plautrba@redhat.com> - 4.4.0-0.2.20210121git16c0696
5752ef
- Rebuild with SELinux userspace 3.2-rc1
5752ef
- Update to 16c0696
5752ef
5752ef
* Thu Dec 10 2020 Petr Lautrbach <plautrba@redhat.com> - 4.4.0-0.2.20201102git05e90ee
5752ef
- Fix imports in /usr/bin/sedta
5752ef
5752ef
* Tue Nov  3 2020 Petr Lautrbach <plautrba@redhat.com> - 4.4.0-0.1.20201102git05e90ee
5752ef
- Update to 05e90ee
5752ef
- Add /usr/bin/sechecker
5752ef
- Adapt to new libsepol filename transition structures
5752ef
- Rebuild with libsepol.so.2
5752ef
5752ef
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.0-5
5752ef
- Second attempt - Rebuilt for
5752ef
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
5752ef
5752ef
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.0-4
5752ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
5752ef
5752ef
* Thu Jul 16 2020 Petr Lautrbach <plautrba@redhat.com> - 4.3.0-3
5752ef
- rebuild with SELinux userspace 3.1 release
5752ef
5752ef
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 4.3.0-2
5752ef
- Rebuilt for Python 3.9
5752ef
5752ef
* Thu Apr  2 2020 Petr Lautrbach <plautrba@redhat.com> - 4.3.0-1
5752ef
- SETools 4.3.0 release
5752ef
- Revised sediff method for TE rules. This drastically reduced memory and run time.
5752ef
- Added infiniband context support to seinfo, sediff, and apol.
5752ef
- Added apol configuration for location of Qt assistant.
5752ef
- Fixed sediff issue where properties header would display when not requested.
5752ef
- Fixed sediff issue with type_transition file name comparison.
5752ef
- Fixed permission map socket sendto information flow direction.
5752ef
- Added methods to TypeAttribute class to make it a complete Python collection.
5752ef
- Genfscon now will look up classes rather than using fixed values which
5752ef
    were dropped from libsepol.
5752ef
5752ef
* Mon Mar 23 2020 Petr Lautrbach <plautrba@redhat.com> - 4.2.2-5
5752ef
- setools requires -console, -console-analyses and -gui packages (#1794314)
5752ef
5752ef
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.2-4
5752ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
5752ef
5752ef
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 4.2.2-3
5752ef
- Rebuilt for Python 3.8.0rc1 (#1748018)
5752ef
5752ef
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 4.2.2-2
5752ef
- Rebuilt for Python 3.8
5752ef
5752ef
* Mon Jul 08 2019 Vit Mojzis <vmojzis@redhat.com> - 4.2.2-1}
5752ef
- SETools 4.2.2 release
5752ef
5752ef
* Mon May 13 2019 Vit Mojzis <vmojzis@redhat.com> - 4.2.1-3
5752ef
- Use %set_build_flags instead of %optflags
5752ef
5752ef
* Mon May 06 2019 Vit Mojzis <vmojzis@redhat.com> - 4.2.1-2
5752ef
- SELinuxPolicy: Create a map of aliases on policy load (#1672631)
5752ef
5752ef
* Tue Mar 26 2019 Petr Lautrbach <plautrba@redhat.com> - 4.2.1-1
5752ef
- SETools 4.2.1 release (#1581761, #1595582)
5752ef
5752ef
* Wed Nov 14 2018 Vit Mojzis <vmojzis@redhat.com> - 4.2.0-1
5752ef
- Update source to SETools 4.2.0 release
5752ef
5752ef
* Mon Oct 01 2018 Vit Mojzis <vmojzis@redhat.com> - 4.2.0-0.3.rc
5752ef
- Update upstream source to 4.2.0-rc
5752ef
5752ef
* Wed Sep 19 2018 Vit Mojzis <vmojzis@redhat.com> - 4.2.0-0.2.beta
5752ef
- Require userspace release 2.8
5752ef
- setools-gui requires python3-setools
5752ef
- Add Requires for python[23]-setuptools - no longer required (just recommended) by python[23] (#1623371)
5752ef
- Drop python2 subpackage (4.2.0 no longer supports python2)
5752ef
5752ef
* Wed Aug 29 2018 Vit Mojzis <vmojzis@redhat.com> - 4.1.1-13
5752ef
- Add Requires for python[23]-setuptools - no longer required (just recommended)
5752ef
  by python[23] (#1623371)
5752ef
5752ef
* Wed Aug 22 2018 Petr Lautrbach <plautrba@redhat.com> - 4.1.1-12.1
5752ef
- Fix SCTP patch - https://github.com/SELinuxProject/setools/issues/9
5752ef
5752ef
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.1-11
5752ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
5752ef
5752ef
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 4.1.1-10
5752ef
- Rebuilt for Python 3.7
5752ef
5752ef
* Thu Jun 14 2018 Petr Lautrbach <plautrba@redhat.com> - 4.1.1-9
5752ef
- Move gui python files to -gui subpackage
5752ef
5752ef
* Thu Apr 26 2018 Vit Mojzis <vmojzis@redhat.com> - 4.1.1-8
5752ef
- Add support for SCTP protocol (#1568333)
5752ef
5752ef
* Thu Apr 19 2018 Iryna Shcherbina <shcherbina.iryna@gmail.com> - 4.1.1-7
5752ef
- Update Python 2 dependency declarations to new packaging standards
5752ef
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
5752ef
5752ef
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.1-6
5752ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
5752ef
5752ef
* Mon Sep 04 2017 Petr Lautrbach <plautrba@redhat.com> - 4.1.1-5
5752ef
- setools-python2 requires python2-enum34
5752ef
5752ef
* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.1.1-4
5752ef
- Add Provides for the old name without %%_isa
5752ef
5752ef
* Thu Aug 10 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.1.1-3
5752ef
- Python 2 binary package renamed to python2-setools
5752ef
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
5752ef
- Python 3 binary package renamed to python3-setools
5752ef
5752ef
* Thu Aug 10 2017 Petr Lautrbach <plautrba@redhat.com> - 4.1.1-2
5752ef
- bswap_* macros are defined in byteswap.h
5752ef
5752ef
* Mon Aug 07 2017 Petr Lautrbach <plautrba@redhat.com> - 4.1.1-1
5752ef
- New upstream release
5752ef
5752ef
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.0-5
5752ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
5752ef
5752ef
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.0-4
5752ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
5752ef
5752ef
* Mon May 22 2017 Petr Lautrbach <plautrba@redhat.com> - 4.1.0-3
5752ef
- setools-python{,3} packages should have a weak dependency on libselinux-python{,3}
5752ef
  (#1447747)
5752ef
5752ef
* Thu Feb 23 2017 Petr Lautrbach <plautrba@redhat.com> - 4.1.0-2
5752ef
- Move python networkx dependency to -gui and -console-analyses
5752ef
- Ship sedta and seinfoflow in setools-console-analyses
5752ef
5752ef
* Wed Feb 15 2017 Petr Lautrbach <plautrba@redhat.com> - 4.1.0-1
5752ef
- New upstream release.