Blame SPECS/setools.spec

44fb84
# % global setools_pre_ver rc
44fb84
# % global gitver f1e5b20
44fb84
6e0e92
%global sepol_ver 2.9-1
6e0e92
%global selinux_ver 2.9-1
44fb84
e6e076
%bcond_without     networkx
44fb84
44fb84
Name:           setools
437d0a
Version:        4.3.0
e7395b
Release:        3%{?setools_pre_ver:.%{setools_pre_ver}}%{?dist}
44fb84
Summary:        Policy analysis tools for SELinux
44fb84
44fb84
License:        GPLv2
44fb84
URL:            https://github.com/SELinuxProject/setools/wiki
44fb84
Source0:        https://github.com/SELinuxProject/setools/archive/%{version}%{?setools_pre_ver:-%{setools_pre_ver}}.tar.gz
44fb84
Source1:        setools.pam
44fb84
Source2:        apol.desktop
437d0a
Patch0001:      0001-Support-old-boolean-names-in-policy-queries.patch
e7395b
Patch0002:      0002-Make-seinfo-output-predictable.patch
44fb84
Patch1001:      1001-Do-not-use-Werror-during-build.patch
44fb84
Patch1002:      1002-Do-not-export-use-setools.InfoFlowAnalysis-and-setoo.patch
437d0a
Patch1003:      1003-Require-networkx-on-package-level.patch
437d0a
Patch1004:      1004-Do-not-use-NoteNotFound-as-it-s-not-implemented-in-n.patch
44fb84
44fb84
Obsoletes:      setools < 4.0.0, setools-devel < 4.0.0
44fb84
BuildRequires:  flex,  bison
44fb84
BuildRequires:  glibc-devel, gcc, git
44fb84
BuildRequires:  libsepol-devel >= %{sepol_ver}, libsepol-static >= %{sepol_ver}
44fb84
BuildRequires:  qt5-qtbase-devel
44fb84
BuildRequires:  swig
44fb84
BuildRequires:  python3-Cython
44fb84
BuildRequires:  python3-devel
44fb84
BuildRequires:  python3-setuptools
44fb84
BuildRequires:  libselinux-devel
44fb84
44fb84
# BuildArch:      
437d0a
Requires:       %{name}-console = %{version}-%{release}
437d0a
%if %{with networkx}
437d0a
Requires:       %{name}-console-analyses = %{version}-%{release}
437d0a
Requires:       %{name}-gui = %{version}-%{release}
437d0a
%endif
44fb84
44fb84
%description
44fb84
SETools is a collection of graphical tools, command-line tools, and
44fb84
Python modules designed to facilitate SELinux policy analysis.
44fb84
44fb84
%package     console
44fb84
Summary:     Policy analysis command-line tools for SELinux
44fb84
License:     GPLv2
44fb84
Requires:    python3-setools = %{version}-%{release}
44fb84
Requires:    libselinux >= %{selinux_ver}
44fb84
44fb84
%description console
44fb84
SETools is a collection of graphical tools, command-line tools, and
44fb84
libraries designed to facilitate SELinux policy analysis.
44fb84
44fb84
This package includes the following console tools:
44fb84
44fb84
  sediff       Compare two policies to find differences.
44fb84
  seinfo       List policy components.
44fb84
  sesearch     Search rules (allow, type_transition, etc.)
44fb84
44fb84
44fb84
%if %{with networkx}
44fb84
%package     console-analyses
44fb84
Summary:     Policy analysis command-line tools for SELinux
44fb84
License:     GPLv2
44fb84
Requires:    python3-setools = %{version}-%{release}
44fb84
Requires:    libselinux >= %{selinux_ver}
44fb84
Requires:    python3-networkx
44fb84
44fb84
%description console-analyses
44fb84
SETools is a collection of graphical tools, command-line tools, and
44fb84
libraries designed to facilitate SELinux policy analysis.
44fb84
44fb84
This package includes the following console tools:
44fb84
44fb84
  sedta        Perform domain transition analyses.
44fb84
  seinfoflow   Perform information flow analyses.
44fb84
%endif
44fb84
44fb84
44fb84
%package     -n python3-setools
44fb84
Summary:     Policy analysis tools for SELinux  
44fb84
Obsoletes:   setools-libs < 4.0.0, setools-libs-tcl
44fb84
Recommends:  libselinux-python3
44fb84
# Remove before F30
44fb84
Provides: %{name}-python3 = %{version}-%{release}
44fb84
Provides: %{name}-python3%{?_isa} = %{version}-%{release}
44fb84
Obsoletes: %{name}-python3 < %{version}-%{release}
44fb84
%if 0%{?rhel} && 0%{?rhel} >= 8
44fb84
Requires:    platform-python-setuptools
44fb84
%else
44fb84
Requires:    python3-setuptools
44fb84
%endif
44fb84
44fb84
%description -n python3-setools
44fb84
SETools is a collection of graphical tools, command-line tools, and
44fb84
Python 3 modules designed to facilitate SELinux policy analysis.
44fb84
44fb84
44fb84
%if %{with networkx}
44fb84
%package     gui
44fb84
Summary:     Policy analysis graphical tools for SELinux
44fb84
Requires:    python3-setools = %{version}-%{release}
44fb84
Requires:    python3-qt5
44fb84
Requires:    python3-networkx
44fb84
44fb84
%description gui
44fb84
SETools is a collection of graphical tools, command-line tools, and
44fb84
Python modules designed to facilitate SELinux policy analysis.
44fb84
%endif
44fb84
44fb84
44fb84
%prep
44fb84
%autosetup -p 1 -S git -n setools-%{version}%{?setools_pre_ver:-%{setools_pre_ver}}
44fb84
44fb84
44fb84
%build
44fb84
# Remove CFLAGS=... for noarch packages (unneeded)
6e0e92
%set_build_flags
6e0e92
%{__python3} setup.py build
44fb84
44fb84
44fb84
%install
44fb84
%{__python3} setup.py install --root %{buildroot}
44fb84
44fb84
%if %{without networkx}
44fb84
rm -f %{buildroot}%{_bindir}/sedta %{buildroot}%{_bindir}/seinfoflow \
437d0a
  %{buildroot}%{_mandir}*/man1/sedta* %{buildroot}%{_mandir}*/man1/sedinfoflow* \
44fb84
rm -rf %{buildroot}%{_bindir}/apol %{buildroot}%{python3_sitearch}/setoolsgui \
437d0a
  %{buildroot}%{_mandir}*/man1/apol*
44fb84
%endif
44fb84
44fb84
%check
44fb84
%if %{?_with_check:1}%{!?_with_check:0}
44fb84
%{__python3} setup.py test
44fb84
%endif
44fb84
44fb84
44fb84
%files
44fb84
44fb84
%files console
44fb84
%{_bindir}/sediff
44fb84
%{_bindir}/seinfo
44fb84
%{_bindir}/sesearch
44fb84
%{_mandir}/man1/sediff*
44fb84
%{_mandir}/man1/seinfo*
44fb84
%{_mandir}/man1/sesearch*
437d0a
%{_mandir}/ru/man1/sediff*
437d0a
%{_mandir}/ru/man1/seinfo*
437d0a
%{_mandir}/ru/man1/sesearch*
44fb84
44fb84
%if %{with networkx}
44fb84
%files console-analyses
44fb84
%{_bindir}/sedta
44fb84
%{_bindir}/seinfoflow
44fb84
%{_mandir}/man1/sedta*
44fb84
%{_mandir}/man1/seinfoflow*
437d0a
%{_mandir}/ru/man1/sedta*
437d0a
%{_mandir}/ru/man1/seinfoflow*
44fb84
%endif
44fb84
44fb84
%files -n python3-setools
44fb84
%license COPYING COPYING.GPL COPYING.LGPL
44fb84
%{python3_sitearch}/setools
44fb84
%{python3_sitearch}/setools-*
44fb84
44fb84
%if %{with networkx}
44fb84
%files gui
44fb84
%{_bindir}/apol
44fb84
%{python3_sitearch}/setoolsgui
44fb84
%{_mandir}/man1/apol*
437d0a
%{_mandir}/ru/man1/apol*
44fb84
%endif
44fb84
44fb84
%changelog
e7395b
* Tue Nov 30 2021 Vit Mojzis <vmojzis@redhat.com> - 4.3.0-3}
e7395b
- Make seinfo output predictable (#2019961)
e7395b
437d0a
* Tue Jun 30 2020 Vit Mojzis <vmojzis@redhat.com> - 4.3.0-2
437d0a
- Support old boolean names in policy queries (#1595572, #1581848)
437d0a
437d0a
* Fri Apr 03 2020 Vit Mojzis <vmojzis@redhat.com> - 4.3.0-1
437d0a
- SETools 4.3.0 release (#1820079)
437d0a
- Revised sediff method for TE rules. This drastically reduced memory and run time.
437d0a
- Added infiniband context support to seinfo, sediff, and apol.
437d0a
- Added apol configuration for location of Qt assistant.
437d0a
- Fixed sediff issue where properties header would display when not requested.
437d0a
- Fixed sediff issue with type_transition file name comparison.
437d0a
- Fixed permission map socket sendto information flow direction.
437d0a
- Added methods to TypeAttribute class to make it a complete Python collection.
437d0a
- Genfscon now will look up classes rather than using fixed values which
437d0a
  were dropped from libsepol.
437d0a
- setools requires -console, -console-analyses and -gui packages (#1820078)
437d0a
e6e076
* Sat Nov 30 2019 Petr Lautrbach <plautrba@redhat.com> - 4.2.2-2
e6e076
- Build setools-console-analyses and setools-gui (#1731519)
e6e076
6e0e92
* Mon Jul 08 2019 Vit Mojzis <vmojzis@redhat.com> - 4.2.2-1
6e0e92
- SETools 4.2.2 release
6e0e92
6e0e92
* Mon May 13 2019 Vit Mojzis <vmojzis@redhat.com> - 4.2.1-3
6e0e92
- Use %set_build_flags instead of %optflags
6e0e92
6e0e92
* Mon May 06 2019 Vit Mojzis <vmojzis@redhat.com> - 4.2.1-2
6e0e92
- SELinuxPolicy: Create a map of aliases on policy load (#1672631)
6e0e92
6e0e92
* Tue Mar 26 2019 Petr Lautrbach <plautrba@redhat.com> - 4.2.1-1
6e0e92
- SETools 4.2.1 release (#1581761, #1595582)
6e0e92
44fb84
* Fri Nov 16 2018 Lumír Balhar <lbalhar@redhat.com> - 4.2.0-2
44fb84
- Require platform-python-setuptools instead of python3-setuptools
44fb84
- Resolves: rhbz#1650548
44fb84
44fb84
* Tue Nov 13 2018 Petr Lautrbach <plautrba@redhat.com> - 4.2.0-1
44fb84
- SETools 4.2.0 release
44fb84
44fb84
* Mon Oct 01 2018 Vit Mojzis <vmojzis@redhat.com> - 4.2.0-0.3.rc
44fb84
- Update upstream source to 4.2.0-rc
44fb84
44fb84
* Wed Aug 22 2018 Petr Lautrbach <plautrba@redhat.com> - 4.1.1-11
44fb84
- Fix SCTP patch - https://github.com/SELinuxProject/setools/issues/9
44fb84
44fb84
* Thu Jun 14 2018 Petr Lautrbach <plautrba@redhat.com> - 4.1.1-10
44fb84
- Move gui python files to -gui subpackage
44fb84
- Do not build gui and console-analyses by default
44fb84
44fb84
* Wed Jun  6 2018 Petr Lautrbach <plautrba@redhat.com> - 4.1.1-9
44fb84
- Don't build the Python 2 subpackage (#1567362)
44fb84
44fb84
* Thu Apr 26 2018 Vit Mojzis <vmojzis@redhat.com> - 4.1.1-8
44fb84
- Add support for SCTP protocol (#1568333)
44fb84
44fb84
* Thu Apr 19 2018 Iryna Shcherbina <shcherbina.iryna@gmail.com> - 4.1.1-7
44fb84
- Update Python 2 dependency declarations to new packaging standards
44fb84
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
44fb84
44fb84
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.1-6
44fb84
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
44fb84
44fb84
* Mon Sep 04 2017 Petr Lautrbach <plautrba@redhat.com> - 4.1.1-5
44fb84
- setools-python2 requires python2-enum34
44fb84
44fb84
* Sun Aug 20 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.1.1-4
44fb84
- Add Provides for the old name without %%_isa
44fb84
44fb84
* Thu Aug 10 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.1.1-3
44fb84
- Python 2 binary package renamed to python2-setools
44fb84
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
44fb84
- Python 3 binary package renamed to python3-setools
44fb84
44fb84
* Thu Aug 10 2017 Petr Lautrbach <plautrba@redhat.com> - 4.1.1-2
44fb84
- bswap_* macros are defined in byteswap.h
44fb84
44fb84
* Mon Aug 07 2017 Petr Lautrbach <plautrba@redhat.com> - 4.1.1-1
44fb84
- New upstream release
44fb84
44fb84
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.0-5
44fb84
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
44fb84
44fb84
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.0-4
44fb84
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
44fb84
44fb84
* Mon May 22 2017 Petr Lautrbach <plautrba@redhat.com> - 4.1.0-3
44fb84
- setools-python{,3} packages should have a weak dependency on libselinux-python{,3}
44fb84
  (#1447747)
44fb84
44fb84
* Thu Feb 23 2017 Petr Lautrbach <plautrba@redhat.com> - 4.1.0-2
44fb84
- Move python networkx dependency to -gui and -console-analyses
44fb84
- Ship sedta and seinfoflow in setools-console-analyses
44fb84
44fb84
* Wed Feb 15 2017 Petr Lautrbach <plautrba@redhat.com> - 4.1.0-1
44fb84
- New upstream release.