Accepting request 923462 from home:favogt:branches:security:idm

- Only install the selinux policy if necessary
- Add missing dependency on the main package to the certmonger
  subpackage
- Use %license and move it to the common subpackage
- Avoid bashisms
- Fix file list for the python subpackage for 3.10+

OBS-URL: https://build.opensuse.org/request/show/923462
OBS-URL: https://build.opensuse.org/package/show/security:idm/cepces?expand=0&rev=9
This commit is contained in:
David Mulder 2021-10-06 13:41:37 +00:00 committed by Git OBS Bridge
parent 84465dd6bf
commit 32660987b5
2 changed files with 18 additions and 7 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Wed Oct 6 09:03:40 UTC 2021 - Fabian Vogt <fvogt@suse.com>
- Only install the selinux policy if necessary
- Add missing dependency on the main package to the certmonger
subpackage
- Use %license and move it to the common subpackage
- Avoid bashisms
- Fix file list for the python subpackage for 3.10+
-------------------------------------------------------------------
Tue Oct 5 14:28:05 UTC 2021 - David Mulder <david.mulder@suse.com>

View File

@ -31,10 +31,10 @@ Source0: %{name}-%{version}.tar.bz2
BuildArch: noarch
Requires: %{app_name}-certmonger == %{version}
%if 0%{?sle_version} > 150400 || 0%{?suse_version} > 1500
Requires: %{app_name}-selinux == %{version}
%endif
Requires: python3-%{app_name} == %{version}
%if 0%{?sle_version} > 150400 || 0%{?suse_version} > 1500
Requires: (%{app_name}-selinux == %{version} if selinux-policy)
%endif
%description
%{app_name} is an application for enrolling certificates through CEP and CES.
@ -60,6 +60,7 @@ This package provides the Python part for CEP and CES interaction.
%package certmonger
Summary: certmonger integration for %{app_name}
Requires: %{name} == %{version}
Requires: certmonger
%description certmonger
@ -155,14 +156,14 @@ fi
%post certmonger
# Install the CA into certmonger.
if [[ "$1" == "1" ]]; then
if [ $1 -eq 1 ]; then
getcert add-ca -c %{app_name} \
-e %{_libexecdir}/certmonger/%{app_name}-submit >/dev/null || :
fi
%preun certmonger
# Remove the CA from certmonger, unless it's an upgrade.
if [[ "$1" == "0" ]]; then
if [ $1 -eq 0 ]; then
getcert remove-ca -c %{app_name} >/dev/null || :
fi
@ -172,7 +173,6 @@ pushd tests
popd
%files
%doc LICENSE
%doc README.rst
%dir %{_sysconfdir}/%{app_name}/
%config(noreplace) %{_sysconfdir}/%{app_name}/%{app_name}.conf
@ -180,8 +180,9 @@ popd
%dir %{logdir}
%files -n python3-%{app_name}
%license LICENSE
%{python3_sitelib}/%{app_name}
%{python3_sitelib}/%{app_name}-%{version}-py?.?.egg-info
%{python3_sitelib}/%{app_name}-%{version}-py*.egg-info
%files certmonger
%dir %{_libexecdir}/certmonger