25b21b
Summary: A tool for generating SELinux security policies for containers
25b21b
Name: udica
25b21b
Version: 0.2.6
3cd131
Release: 3%{?dist}
25b21b
Source0: https://github.com/containers/udica/archive/v%{version}.tar.gz
3cd131
Patch0: 0001-Make-sure-each-section-of-the-inspect-exists-before-.patch
25b21b
License: GPLv3+
25b21b
BuildArch: noarch
25b21b
Url: https://github.com/containers/udica
25b21b
%if 0%{?fedora} || 0%{?rhel} > 7
25b21b
BuildRequires: python3 python3-devel python3-setuptools
25b21b
Requires: python3 python3-libsemanage python3-libselinux
25b21b
%else
25b21b
BuildRequires: python2 python2-devel python2-setuptools
25b21b
Requires: python2 libsemanage-python libselinux-python
25b21b
%endif
25b21b
# container-selinux provides policy templates
25b21b
Requires: container-selinux >= 2.168.0-2
25b21b
25b21b
%description
25b21b
Tool for generating SELinux security profiles for containers based on
25b21b
inspection of container JSON file.
25b21b
25b21b
%prep
25b21b
%autosetup -p 1
25b21b
25b21b
%build
25b21b
%if 0%{?fedora} || 0%{?rhel} > 7
25b21b
%{__python3} setup.py build
25b21b
%else
25b21b
%{__python2} setup.py build
25b21b
%endif
25b21b
25b21b
%install
25b21b
%if 0%{?fedora} || 0%{?rhel} > 7
25b21b
%{__python3} setup.py install --single-version-externally-managed --root=%{buildroot}
25b21b
%else
25b21b
%{__python2} setup.py install --single-version-externally-managed --root=%{buildroot}
25b21b
%endif
25b21b
25b21b
install --directory %{buildroot}%{_mandir}/man8
25b21b
install -m 0644 udica/man/man8/udica.8 %{buildroot}%{_mandir}/man8/udica.8
25b21b
25b21b
%files
25b21b
%{_mandir}/man8/udica.8*
25b21b
%{_bindir}/udica
25b21b
%dir %{_datadir}/udica
25b21b
%dir %{_datadir}/udica/ansible
25b21b
%{_datadir}/udica/ansible/*
25b21b
25b21b
%if 0%{?fedora} || 0%{?rhel} > 7
25b21b
%license LICENSE
25b21b
%{python3_sitelib}/udica/
25b21b
%{python3_sitelib}/udica-*.egg-info
25b21b
%else
25b21b
%{_datarootdir}/licenses/udica/LICENSE
25b21b
%{python2_sitelib}/udica/
25b21b
%{python2_sitelib}/udica-*.egg-info
25b21b
%endif
25b21b
25b21b
%changelog
3cd131
* Wed Dec 01 2021 Vit Mojzis <vmojzis@redhat.com> - 0.2.6-3
3cd131
- Make sure each section of the inspect exists before accessing (#2027662)
3cd131
3cd131
* Tue Sep 21 2021 Vit Mojzis <vmojzis@redhat.com> - 0.2.6-2
25b21b
- Require container-selinux shipping policy templates (#2005866)
25b21b
25b21b
* Fri Sep 17 2021 Jindrich Novy <jnovy@redhat.com> - 0.2.6-1
25b21b
- update to https://github.com/containers/udica/releases/tag/v0.2.6
25b21b
- Related: #2001445
25b21b
25b21b
* Fri Aug 27 2021 Jindrich Novy <jnovy@redhat.com> - 0.2.5-2
25b21b
- New rebase https://github.com/containers/udica/releases/tag/v0.2.5 (#1995041)
25b21b
- Replace capability dictionary with str.lower()
25b21b
- Enable udica to generate policies with fifo class
25b21b
- Sort container inspect data before processing
25b21b
- Update templates to work properly with new cil parser
25b21b
- Related: #1934415
25b21b
25b21b
* Thu Aug 26 2021 Jindrich Novy <jnovy@redhat.com> - 0.2.5-1
25b21b
- update to https://github.com/containers/udica/releases/tag/v0.2.5
25b21b
- Related: #1934415
25b21b
25b21b
* Tue Jun 15 2021 Jindrich Novy <jnovy@redhat.com> - 0.2.4-2
25b21b
- remove %%check again and all related BRs
25b21b
- Related: #1934415
25b21b
25b21b
* Thu Nov 26 2020 Jindrich Novy <jnovy@redhat.com> - 0.2.4-1
25b21b
- update to https://github.com/containers/udica/releases/tag/v0.2.4
25b21b
- Related: #1883490
25b21b
25b21b
* Wed Oct 21 2020 Jindrich Novy <jnovy@redhat.com> - 0.2.3-1
25b21b
- synchronize with stream-container-tools-rhel8
25b21b
- Related: #1883490
25b21b
25b21b
* Mon Aug 10 2020 Jindrich Novy <jnovy@redhat.com> - 0.2.2-1
25b21b
- https://github.com/containers/udica/releases/tag/v0.2.2
25b21b
- Related: #1821193
25b21b
25b21b
* Tue Nov 26 2019 Jindrich Novy <jnovy@redhat.com> - 0.2.1-2
25b21b
- initial import to container-tools 8.2.0
25b21b
- Related: RHELPLAN-25139
25b21b
25b21b
* Fri Oct 25 2019 Lukas Vrabec <lvrabec@redhat.com> - 0.2.1-1
25b21b
- New rebase https://github.com/containers/udica/releases/tag/v0.2.0
25b21b
Resolves: rhbz#1757693
25b21b
25b21b
* Wed Oct 02 2019 Lukas Vrabec <lvrabec@redhat.com> - 0.2.0-1
25b21b
- New rebase https://github.com/containers/udica/releases/tag/v0.2.0
25b21b
Resolves: rhbz#1757693
25b21b
25b21b
* Thu Jul 11 2019 Lukas Vrabec <lvrabec@redhat.com> - 0.1.8-1
25b21b
- Udica supports podman version 1.4.0+
25b21b
Resolves: rhbz#1729115
25b21b
25b21b
* Fri May 17 2019 Lukas Vrabec <lvrabec@redhat.com> - 0.1.6-1
25b21b
- Update testsuite from upstream release
25b21b
Resolves: rhbz#1673643
25b21b
25b21b
* Wed May 15 2019 Lukas Vrabec <lvrabec@redhat.com> - 0.1.5-2
25b21b
- Bump release because of gating tests
25b21b
25b21b
* Fri Apr 19 2019 Lukas Vrabec <lvrabec@redhat.com> - 0.1.5-1
25b21b
- Create mock selinux and semanage module
25b21b
- Update testing section in README
25b21b
- Add travis file for Travis CI
25b21b
- Grammar fixes in the udica.8 manpage file
25b21b
- Support port ranges (Resolves: #16)
25b21b
- Test port ranges
25b21b
25b21b
* Mon Mar 11 2019 Lukas Vrabec <lvrabec@redhat.com> - 0.1.4-1
25b21b
- Fix minor problems reported by pylint #11
25b21b
- Catch FileNotFoundError when inspecting containers #12
25b21b
- Create basic tests #13
25b21b
- Restore working directory #14
25b21b
- udica cannot use the container ID once it is provided #10
25b21b
25b21b
* Mon Feb 25 2019 Lukas Vrabec <lvrabec@redhat.com> - 0.1.3-4
25b21b
- Update manpage with the latest known bug described in https://github.com/containers/udica/issues/8
25b21b
- Add check if runtimes are installed on the system
25b21b
25b21b
* Sun Feb 17 2019 Lukas Vrabec <lvrabec@redhat.com> - 0.1.3-3
25b21b
- Improve capability parsing for docker containers
25b21b
- Update small changes in manpage, like issue with mandatory option '-c' for docker containers
25b21b
- Fix parsing Mountpoints in docker inspect JSON file
25b21b
25b21b
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.3-2
25b21b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
25b21b
25b21b
* Wed Jan 23 2019 Lukas Vrabec <lvrabec@redhat.com> - 0.1.3-1
25b21b
- Fix capability allow rules when capabilities are specified in JSON file
25b21b
- Add additional SELinux allow rules to base container template to allow container to read proc_type types.
25b21b
25b21b
* Fri Jan 04 2019 Lukas Vrabec <lvrabec@redhat.com> - 0.1.2-1
25b21b
- Fix invalid syntax output when policy is using just one template
25b21b
Resolves: #6
25b21b
25b21b
* Tue Oct 23 2018 Lukas Vrabec <lvrabec@redhat.com> - 0.1.1-2
25b21b
- Fix small issues in spec file like improve description and change files section.
25b21b
25b21b
* Mon Oct 22 2018 Lukas Vrabec <lvrabec@redhat.com> - 0.1.1-1
25b21b
- Add proper shebang to all source files
25b21b
- Add License to all source files
25b21b
25b21b
* Sat Oct 13 2018 Lukas Vrabec <lvrabec@redhat.com> - 0.1.0-1
25b21b
- Add support for docker containers
25b21b
25b21b
* Mon Oct 08 2018 Lukas Vrabec <lvrabec@redhat.com> - 0.0.5-1
25b21b
- Update x_container template based on testing container related to Nvidia Cuda operations
25b21b
25b21b
* Mon Oct 08 2018 Lukas Vrabec <lvrabec@redhat.com> - 0.0.4-2
25b21b
- Build udica on Red Hat Enterprise Linux 7 with python version 2
25b21b
25b21b
* Mon Oct 08 2018 Lukas Vrabec <lvrabec@redhat.com> - 0.0.4-1
25b21b
- Add manpages
25b21b
- Add support for communicating with libvirt daemon
25b21b
- Add support for communicating with X server.
25b21b
- Add support for read/write to the controlling terminal
25b21b
25b21b
* Sun Oct 07 2018 Lukas Vrabec <lvrabec@redhat.com> - 0.0.3-1
25b21b
- Remove required parameters -i or -j and added support for reading json file from stdin.
25b21b
- Remove "-n" or "--name" parameter. Name of the container will be required for this tool
25b21b
25b21b
* Tue Sep 25 2018 Lukas Vrabec <lvrabec@redhat.com> - 0.0.2-1
25b21b
- Use subprocess.Popen instead of subprocess.run for inspecting to support also python2
25b21b
25b21b
* Thu Sep 20 2018 Lukas Vrabec <lvrabec@redhat.com> - 0.0.1-3
25b21b
- Update readme and setup.py files after migration to github
25b21b
25b21b
* Sun Sep 16 2018 Lukas Vrabec <lvrabec@redhat.com> - 0.0.1-2
25b21b
- Update LICENSE
25b21b
- Improve %%files section
25b21b
25b21b
* Sun Sep 16 2018 Lukas Vrabec <lvrabec@redhat.com> - 0.0.1-1
25b21b
- Initial build