SHA256
1
0
forked from pool/audit

Accepting request 566726 from home:scarabeus_iv:branches:security

- Add conditions around python plugins to allow us to conditionalize
  them in enviroment without python2

OBS-URL: https://build.opensuse.org/request/show/566726
OBS-URL: https://build.opensuse.org/package/show/security/audit?expand=0&rev=94
This commit is contained in:
Tony Jones 2018-01-17 21:04:11 +00:00 committed by Git OBS Bridge
parent 32adeb8614
commit b1e7f92a48
3 changed files with 26 additions and 12 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Jan 17 15:25:55 UTC 2018 - tchvatal@suse.com
- Add conditions around python plugins to allow us to conditionalize
them in enviroment without python2
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Nov 9 16:21:23 UTC 2017 - mpluskal@suse.com Thu Nov 9 16:21:23 UTC 2017 - mpluskal@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package audit-secondary # spec file for package audit-secondary
# #
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -16,6 +16,8 @@
# #
%bcond_without python2
%bcond_without python3
# This package contains all audit functionality except for audit-libs. # This package contains all audit functionality except for audit-libs.
# The seperation is required to minimize unnecessary build cycles. # The seperation is required to minimize unnecessary build cycles.
%define _name audit %define _name audit
@ -38,8 +40,12 @@ BuildRequires: kernel-headers >= 2.6.30
BuildRequires: libtool BuildRequires: libtool
BuildRequires: openldap2-devel BuildRequires: openldap2-devel
BuildRequires: pkgconfig BuildRequires: pkgconfig
%if %{with python2}
BuildRequires: python2-devel BuildRequires: python2-devel
%endif
%if %{with python3}
BuildRequires: python3-devel BuildRequires: python3-devel
%endif
BuildRequires: swig BuildRequires: swig
BuildRequires: systemd-rpm-macros BuildRequires: systemd-rpm-macros
BuildRequires: tcpd-devel BuildRequires: tcpd-devel
@ -144,10 +150,8 @@ rm -rf %{buildroot}%{_sysconfdir}/rc.d/init.d
# https://lists.fedoraproject.org/pipermail/devel/2012-June/169411.html # https://lists.fedoraproject.org/pipermail/devel/2012-June/169411.html
rm -rf %{buildroot}%{_libexecdir}/audit rm -rf %{buildroot}%{_libexecdir}/audit
# Clean up some unneeded library files # Clean up some unneeded library files
for ver in %{py_ver} %{py3_ver}; do rm -f %{buildroot}/%{_libdir}/python*/site-packages/{_audit,_auparse,auparse}.{a,la}
rm -f %{buildroot}/%{_libdir}/python${ver}/site-packages/{_audit,_auparse,auparse}.{a,la} rm -rf %{buildroot}/%{_libdir}/python*/site-packages/__pycache__
rm -rf %{buildroot}/%{_libdir}/python${ver}/site-packages/__pycache__
done
# cleanup makefiles for the rules (installed by %%docs command) # cleanup makefiles for the rules (installed by %%docs command)
rm -f %{buildroot}/%{_libdir}/pkgconfig/{audit,auparse}.pc rm -f %{buildroot}/%{_libdir}/pkgconfig/{audit,auparse}.pc
# cleanup files handled by audit.spec # cleanup files handled by audit.spec
@ -246,15 +250,19 @@ fi
%{_unitdir}/auditd.service %{_unitdir}/auditd.service
%{_sbindir}/rcauditd %{_sbindir}/rcauditd
%if %{with python2}
%files -n python2-audit %files -n python2-audit
%attr(755,root,root) %{_libdir}/python%{py_ver}/site-packages/_audit.so %attr(755,root,root) %{python2_sitearch}/_audit.so
%attr(755,root,root) %{_libdir}/python%{py_ver}/site-packages/auparse.so %attr(755,root,root) %{python2_sitearch}/auparse.so
%{_libdir}/python%{py_ver}/site-packages/audit.py* %{python2_sitearch}/audit.py*
%endif
%if %{with python3}
%files -n python3-audit %files -n python3-audit
%attr(755,root,root) %{_libdir}/python%{py3_ver}/site-packages/_audit.so %attr(755,root,root) %{python3_sitearch}/_audit.so
%attr(755,root,root) %{_libdir}/python%{py3_ver}/site-packages/auparse.so %attr(755,root,root) %{python3_sitearch}/auparse.so
%{_libdir}/python%{py3_ver}/site-packages/audit.py* %{python3_sitearch}/audit.py*
%endif
%files -n audit-audispd-plugins %files -n audit-audispd-plugins
%attr(644,root,root) %{_mandir}/man8/audispd-zos-remote.8.gz %attr(644,root,root) %{_mandir}/man8/audispd-zos-remote.8.gz

View File

@ -1,7 +1,7 @@
# #
# spec file for package audit # spec file for package audit
# #
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed