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