SHA256
1
0
forked from pool/audit
audit/audit-secondary.spec
Marcus Meissner 85d7f2569e Accepting request 161029 from home:elvigia:branches:security
- Buildrequires cap-ng library 

- --with-libcap-ng=yes has no effect if libcap-ng is not 
buildrequired and the lack of those requires causes a broken
configure script after autoreconf add pkgconfig(libcap-ng)
to both audit and audit-secondary, cap-ng is actually only
use in the latter.

- Version 2.2.3
- Code cleanups
- In spec file, don't own lib64/audit
- Update man pages
- Aureport no longer reads auditd.conf when stdin is used
- Don't let systemd kill auditd if auditctl errors out
- Update syscall table for 3.7 and 3.8 kernels
- Add interpretation for setns and unshare syscalls
- Code cleanup (Tyler Hicks)
- Documentation cleanups (Laurent Bigonville)
- Add dirfd interpretation to the *at functions
- Add termination signal to clone flags interpretation
- Update stig.rules
- In auditctl, when listing rules don't print numeric value of dir fields
- Add support for rng resource type in auvirt
- Fix aulast bad login output (#922508)
- In ausearch, allow negative numbers for session and auid searches
- In audisp-remote, if disk_full_action is stop then stop sending (#908977)

OBS-URL: https://build.opensuse.org/request/show/161029
OBS-URL: https://build.opensuse.org/package/show/security/audit?expand=0&rev=47
2013-03-26 08:57:41 +00:00

137 lines
5.1 KiB
RPMSpec

#
# spec file for package audit-secondary
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define _name audit
Name: audit-secondary
BuildRequires: gcc-c++
BuildRequires: openldap2-devel
BuildRequires: pkg-config
BuildRequires: python-devel
BuildRequires: swig
Summary: Python Bindings for libaudit
License: GPL-2.0+
Group: System/Monitoring
Version: 2.2.3
Release: 0
Url: http://people.redhat.com/sgrubb/audit/
Source0: http://people.redhat.com/sgrubb/audit/%{_name}-%{version}.tar.gz
Patch1: audit-plugins-path.patch
Requires: audit = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
PreReq: %insserv_prereq %fillup_prereq
BuildRequires: audit-devel = %{version}
BuildRequires: autoconf >= 2.12
BuildRequires: libtool
BuildRequires: pkgconfig(libcap-ng)
%description
The audit-libs-python package contains the bindings for using libaudit
by python.
%package -n audit-libs-python
Summary: Python Bindings for libaudit
License: LGPL-2.1+
Group: System/Monitoring
%py_requires
%description -n audit-libs-python
The audit-libs-python package contains the bindings for using libaudit
by python.
%package -n audit-audispd-plugins
Summary: Default plugins for the audit dispatcher
License: GPL-2.0+
Group: System/Monitoring
Requires: openldap2
%description -n audit-audispd-plugins
The audit-audispd-plugins package contains plugin components for the
audit dispatcher (audispd).
%prep
# remove selinux policy
rm -rf audisp/plugins/zos-remote/policy
# we don't build prelude
rm -rf audisp/plugins/prelude
%setup -q -n %{_name}-%{version}
%patch1 -p1
%build
autoreconf -fi
export CFLAGS="%{optflags} -fno-strict-aliasing"
export CXXFLAGS="$CFLAGS"
%configure --sbindir=/sbin \
--libdir=/%{_lib} --libexecdir=%{_prefix}/lib/%{name} \
--with-apparmor \
--disable-static --with-pic
%{__make} %{?_smp_mflags}
%install
mkdir -p $RPM_BUILD_ROOT/usr/sbin
mkdir -p $RPM_BUILD_ROOT/_tmp
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/{man5,man8}
make DESTDIR=$RPM_BUILD_ROOT install -C swig
make DESTDIR=$RPM_BUILD_ROOT install -C bindings
make DESTDIR=$RPM_BUILD_ROOT install -C audisp/plugins
make DESTDIR=$RPM_BUILD_ROOT/_tmp install -C docs
# Clean up some unneeded library files
rm -f $RPM_BUILD_ROOT/%{_libdir}/python%{py_ver}/site-packages/_audit.a
rm -f $RPM_BUILD_ROOT/%{_libdir}/python%{py_ver}/site-packages/_audit.la
rm -f $RPM_BUILD_ROOT/%{_libdir}/python%{py_ver}/site-packages/_auparse.a
rm -f $RPM_BUILD_ROOT/%{_libdir}/python%{py_ver}/site-packages/_auparse.la
rm -f $RPM_BUILD_ROOT/%{_libdir}/python%{py_ver}/site-packages/auparse.a
rm -f $RPM_BUILD_ROOT/%{_libdir}/python%{py_ver}/site-packages/auparse.la
rm -f $RPM_BUILD_ROOT/%{_libdir}/python%{py_ver}/site-packages/auparse-1.0-py%{py_ver}.egg-info
# Cleanup plugins
# audispd-zos-remote uses ldap which is in /usr/lib so move to /usr/sbin
# audisp-remote shouldn't be in /sbin either, it's not 'essential'
mv $RPM_BUILD_ROOT/sbin/{audispd-zos-remote,audisp-remote} $RPM_BUILD_ROOT/usr/sbin
# af_unix/syslog (builtin) is packaged by main spec file
rm -f $RPM_BUILD_ROOT/etc/audisp/plugins.d/{af_unix,syslog}.conf
# Just need selecteed man pages
mv $RPM_BUILD_ROOT/_tmp/%{_mandir}/man8/audispd-zos-remote.8 $RPM_BUILD_ROOT/%{_mandir}/man8
mv $RPM_BUILD_ROOT/_tmp/%{_mandir}/man5/zos-remote.conf.5 $RPM_BUILD_ROOT/%{_mandir}/man5
rm -rf $RPM_BUILD_ROOT/_tmp
%check
make check
%files -n audit-libs-python
%defattr(-,root,root,-)
%attr(755,root,root) %{_libdir}/python%{py_ver}/site-packages/_audit.so
%attr(755,root,root) %{_libdir}/python%{py_ver}/site-packages/auparse.so
%{_libdir}/python%{py_ver}/site-packages/audit.py*
%files -n audit-audispd-plugins
%defattr(-,root,root,-)
%attr(644,root,root) %{_mandir}/man8/audispd-zos-remote.8.gz
%attr(644,root,root) %{_mandir}/man5/zos-remote.conf.5.gz
%attr(750,root,root) %dir /etc/audisp
%attr(750,root,root) %dir /etc/audisp/plugins.d
%config(noreplace) %attr(640,root,root) /etc/audisp/plugins.d/audispd-zos-remote.conf
%config(noreplace) %attr(640,root,root) /etc/audisp/zos-remote.conf
%attr(750,root,root) /usr/sbin/audispd-zos-remote
%config(noreplace) %attr(640,root,root) /etc/audisp/audisp-remote.conf
%config(noreplace) %attr(640,root,root) /etc/audisp/plugins.d/au-remote.conf
%attr(750,root,root) /usr/sbin/audisp-remote
%attr(644,root,root) %{_mandir}/man5/audisp-remote.conf.5.gz
%attr(644,root,root) %{_mandir}/man8/audisp-remote.8.gz
%changelog